v4.5.0
This is a significant milestone as this release graduates generators functionality from experimental and contains proper suspension and resume logic for both generators and async/await logic. There are a lot of changes to internals so make sure you test thoroughly.
Task interop is still marked as experimental and requires enabling explicitly in Engine options, but it also has had improvements to make it work better in Engine's event loop.
For background work to complete without engine interaction (evaluation) you need to manually process the tasks (for example if you have a timeout pending after script has been run).
engine.Execute(script);
for (var i = 0; i < 100; ++i)
{
engine.Advanced.ProcessTasks();
await Task.Delay(100);
}
What's Changed
- Allows the conversion of primses to tasks when pasing an async function as argument by @REscobar in https://github.com/sebastienros/jint/pull/2197
- Bump the all-dependencies group with 3 updates by @dependabot[bot] in https://github.com/sebastienros/jint/pull/2198
- Fix missing control characters in Json Parse Key by @H4ad in https://github.com/sebastienros/jint/pull/2202
- Use NET 10 SDK to build and test by @lahma in https://github.com/sebastienros/jint/pull/2185
- Upgrade packages by @lahma in https://github.com/sebastienros/jint/pull/2212
- Convert solution to slnx format by @lahma in https://github.com/sebastienros/jint/pull/2213
- Defer iterator next method check until actually iterating by @lahma in https://github.com/sebastienros/jint/pull/2214
- Add ArrayExpression and ObjectExpression to computed property key types by @lahma in https://github.com/sebastienros/jint/pull/2215
- Fix parameter TDZ and eval-var-scope handling by @lahma in https://github.com/sebastienros/jint/pull/2216
- ES6 Generators by @lahma in https://github.com/sebastienros/jint/pull/824
- Bump the all-dependencies group with 1 update by @dependabot[bot] in https://github.com/sebastienros/jint/pull/2217
- Refactor generator control flow from exceptions to flags by @lahma in https://github.com/sebastienros/jint/pull/2218
- Implement Iterator Helpers by @lahma in https://github.com/sebastienros/jint/pull/2032
- Implement Iterator Sequencing by @lahma in https://github.com/sebastienros/jint/pull/2031
- Update test262 test suite and fix issues by @lahma in https://github.com/sebastienros/jint/pull/2219
- Implement RegExp.escape() by @lahma in https://github.com/sebastienros/jint/pull/2220
- Implement Immutable ArrayBuffers by @lahma in https://github.com/sebastienros/jint/pull/2222
- Implement Joint Iteration by @lahma in https://github.com/sebastienros/jint/pull/2221
- Improve REPL for AI usage by @lahma in https://github.com/sebastienros/jint/pull/2224
- Implement JSON.parse source text access by @lahma in https://github.com/sebastienros/jint/pull/2223
- Rename IsGeneratorSuspended to IsSuspended by @lahma in https://github.com/sebastienros/jint/pull/2226
- ECMAScript-compliant async/await with proper suspension by @lahma in https://github.com/sebastienros/jint/pull/2225
- Filter TypeReference constructors using TypeResolver.MemberFilter by @lahma in https://github.com/sebastienros/jint/pull/2227
- Implement async-iteration by @lahma in https://github.com/sebastienros/jint/pull/2228
- Implement Array.fromAsync by @lahma in https://github.com/sebastienros/jint/pull/2229
- Add agent support to test262 testing by @lahma in https://github.com/sebastienros/jint/pull/2231
- Bump the all-dependencies group with 2 updates by @dependabot[bot] in https://github.com/sebastienros/jint/pull/2232
- Implement Atomics by @lahma in https://github.com/sebastienros/jint/pull/2230
- ValueTask and IAsyncEnumerable interop support by @lahma in https://github.com/sebastienros/jint/pull/2233
- Disable fail-fast in GitHub Actions workflow by @lahma in https://github.com/sebastienros/jint/pull/2235
- Add jsValue.UnwrapIfPromise(CancellationToken cancellationToken) by @lahma in https://github.com/sebastienros/jint/pull/2234
- Fix Test262Test setTimeout concurrency issue by @lahma in https://github.com/sebastienros/jint/pull/2236
- Type resolution should use runtime type when declared type has indexer by @lahma in https://github.com/sebastienros/jint/pull/2237
- JSE.GetBaseException() shouldn't return JavaScriptErrorWrapperException by @lahma in https://github.com/sebastienros/jint/pull/2238
- Enable decorator tests by @lahma in https://github.com/sebastienros/jint/pull/2239
- Fix Final_Sigma_U180E issue by @lahma in https://github.com/sebastienros/jint/pull/2240
- Improve TypeReference method parameter scoring by @lahma in https://github.com/sebastienros/jint/pull/2241
- Add test coverage for async functions by @lahma in https://github.com/sebastienros/jint/pull/2242
- Fall back to non-generic list wrapper on error by @lahma in https://github.com/sebastienros/jint/pull/2244
- Update VersionPrefix from 4.0.0 to 4.5.0 by @lahma in https://github.com/sebastienros/jint/pull/2245
- Cleanup suspend logic by @lahma in https://github.com/sebastienros/jint/pull/2246
New Contributors
- @REscobar made their first contribution in https://github.com/sebastienros/jint/pull/2197
- @H4ad made their first contribution in https://github.com/sebastienros/jint/pull/2202
Full Changelog: https://github.com/sebastienros/jint/compare/v4.4.2...v4.5.0