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

build(deps): bump Jint from 4.0.3 to 4.1.0 #10326

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 28, 2024

Bumps Jint from 4.0.3 to 4.1.0.

Release notes

Sourced from Jint's releases.

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;
});

... (truncated)

Commits
  • 04466d0 Revert back to favoring SearchValues<char> (#1990)
  • 7ac9805 Add Options.InteropOptions.BuildCallStackHandler (#1793)
  • 8e3e320 Exclude static fields and properties from ObjectWrapper by default (#1981)
  • c3d86d8 Make JsSet int indexer internal (#1989)
  • 1461bf1 Make JsMap public (#1988)
  • 7d1de2d Make JsSet public (#1987)
  • 7381086 Optimize ValueStringBuilder and some character checks (#1986)
  • 6cb6d5d Early out in ObjectPool to avoid loop execution (#1985)
  • af0845f Made test of cancellation of engine execution more robust (#1984)
  • 1b0d5f8 Promise.withResolvers() returned object had resolve and reject functions swap...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [Jint](https://github.com/sebastienros/jint) from 4.0.3 to 4.1.0.
- [Release notes](https://github.com/sebastienros/jint/releases)
- [Commits](sebastienros/jint@v4.0.3...v4.1.0)

---
updated-dependencies:
- dependency-name: Jint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added .NET dependencies Pull requests that update a dependency file labels Oct 28, 2024
@github-actions github-actions bot enabled auto-merge (squash) October 28, 2024 07:26
@github-actions github-actions bot merged commit 5a3915d into main Oct 28, 2024
6 checks passed
@github-actions github-actions bot deleted the dependabot/nuget/main/Jint-4.1.0 branch October 28, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants