Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency jint to v4 #1604

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 12, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
Jint 3.0.1 -> 4.2.0 age adoption passing confidence

Release Notes

sebastienros/jint (Jint)

v4.2.0

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v4.1.0...v4.2.0

v4.1.0

This release contains a breaking change for interop for static fields and properties. They are no longer exposed as part of interop wrapper by default. You read more about the reasoning here.

To access public static fields or properties you should use registered TypeReferences.

Following example shows the new behavior:

[Fact]
public void StaticFieldsShouldFollowJsSemantics()
{
    _engine.Evaluate("Number.MAX_SAFE_INTEGER").AsNumber().Should().Be(NumberConstructor.MaxSafeInteger);
    _engine.Evaluate("new Number().MAX_SAFE_INTEGER").Should().Be(JsValue.Undefined);

    _engine.Execute("class MyJsClass { static MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; }");
    _engine.Evaluate("MyJsClass.MAX_SAFE_INTEGER").AsNumber().Should().Be(NumberConstructor.MaxSafeInteger);
    _engine.Evaluate("new MyJsClass().MAX_SAFE_INTEGER").Should().Be(JsValue.Undefined);

    _engine.SetValue("MyCsClass", typeof(MyClass));
    _engine.Evaluate("MyCsClass.MAX_SAFE_INTEGER").AsNumber().Should().Be(NumberConstructor.MaxSafeInteger);
    // NEW BEHAVIOR, NOW UNDEFINED
    _engine.Evaluate("new MyCsClass().MAX_SAFE_INTEGER").Should().Be(JsValue.Undefined);
}

private class MyClass
{
    public static JsNumber MAX_SAFE_INTEGER = new JsNumber(NumberConstructor.MaxSafeInteger);
}

If you want to expose static instance fields and properties as part of instance wrappers, you need to configure the engine to do so:

var engine = new Engine(options =>
{
    options.Interop.ObjectWrapperReportedFieldBindingFlags |= BindingFlags.Static;
    options.Interop.ObjectWrapperReportedPropertyBindingFlags |= BindingFlags.Static;
});

Static methods can still be accessed as before, but you could limit exposing them too if you wish to do so:

var engine = new Engine(options =>
{
    options.Interop.ObjectWrapperReportedMethodBindingFlags = BindingFlags.Instance | BindingFlags.Public;
});

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v4.0.3...v4.1.0

v4.0.3

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v4.0.2...v4.0.3

v4.0.2

With this release you will start to see CLR methods also reported as object members under interop when calling functions like Object.getOwnPropertyNames(x). You can revert back to old behavior by configuring an option options.Interop.ObjectWrapperReportedMemberTypes = MemberTypes.Field | MemberTypes.Property;.

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v4.0.1...v4.0.2

v4.0.1

What's Changed

Full Changelog: sebastienros/jint@v4.0.0...v4.0.1

v4.0.0

This release changes internal JavaScript parser from Esprima to Acornima and adds some new ECMAScript features.

Relevant bug fixes below have been backported into 3.x and are already part of its releases.

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v3.1.0...v4.0.0

v3.1.6

What's Changed

Full Changelog: sebastienros/jint@v3.1.5...v3.1.6

v3.1.5

What's Changed

Full Changelog: sebastienros/jint@v3.1.4...v3.1.5

v3.1.4

What's Changed

Full Changelog: sebastienros/jint@v3.1.3...v3.1.4

v3.1.3

What's Changed

Full Changelog: sebastienros/jint@v3.1.2...v3.1.3

v3.1.2

What's Changed

Full Changelog: sebastienros/jint@v3.1.1...v3.1.2

v3.1.1

What's Changed

Full Changelog: sebastienros/jint@v3.1.0...v3.1.1

v3.1.0

What's Changed

Full Changelog: sebastienros/jint@v3.0.2...v3.1.0

v3.0.2

What's Changed

New Contributors

Full Changelog: sebastienros/jint@v3.0.1...v3.0.2


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/jint-4.x branch from eb384eb to 1b2ceae Compare December 13, 2024 13:56
@renovate renovate bot force-pushed the renovate/jint-4.x branch from 1b2ceae to df16bf9 Compare January 20, 2025 19:22
@renovate renovate bot force-pushed the renovate/jint-4.x branch from df16bf9 to 3613da1 Compare January 28, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants