sebastienros / jint

Javascript Interpreter for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Announcement] Jint 3.0.0-beta released

sebastienros opened this issue · comments

I have managed to port Jint to using Esprima .NET. All unit tests from Jint 2.0 are passing so I am confident with the stability and feature set. Right now it targets both net45 and dotnet core, and it's missing the portable target but it's temporary. It has been released on nuget and is under the es6 branch of this repository.

The goal of this version is to support ECMAScript 2016 aka ES6. Esprima .NET being a fully compliant ECMAScript 2016 parser, we can know start working on new feature one by one. All ES6 programs will be parsed correctly, we just need to handle them and implement their behavior by following the standard, like it was done for ES5 in Jint 2.0.

Useful links:

A GitHub project was created to follow the evolution of the implementation. A new Beta nuget package will ship for any tasks reaching completion.

Any updates on this? The last commit on both Esprima .NET and es6 branch are from October 2016. Is it still in beta?

I haven't been able to make progress on it since then ... been too busy since then. But it is still my goal to complete this.

But it is still my goal to complete this.

Any plans for ECMAScript 7 (published June 2016) and ECMAScript 8 (published June 2017)?
You need to keep up, man!

Also desperate for update please! Good work so far:)

There has been some progress. I shipped a refreshed 3.0 beta version. It contains the support for Symbol. I also have started updating the internal implementation for the support of let and const.

commented

This is awesome, thanks so much awesome stuff. How near to completion is the 3.0 beta version? Think it could be used in production yet :)

"The goal of this version is to support ECMAScript 2016 aka ES6. "
Isn't ECMAScript 2016 ES7 and ES6 is ECMAScript 2015? Can you clarify?

Note Esprima .NET says: "Full support for ECMAScript 2016 (ECMA-262 7th Edition)"

Any updates on this?

Any Updates ?

Any updates?

Map and Set support just landed to dev and probably soon on NuGet. Work continues with other ES6 features.

Most of missing string and array functions have landed to dev branch.

Thanks for taking your time on this project and the value you provide to the .NET eco-system - you rock!

Since Jint v3 and AngleSharp's v0.10 seem both to be stuck in a forever loop (yes, I try to release it soon and it seems I can now do it this Christmas 🎄 ) I wonder if we somewhat can join forces here ...

Since ES6 also a couple of things happened and I would love to see some parts of the newer specs being implemented (especially await / async). Could we do something about it?

Maybe its time to form some umbrella foundation around AngleSharp + Jint + rel. projects to be something like a ".NET web tool projects foundation" (to find new contributors and foster more active development). What is your opinion @sebastienros ?

Spread, rest and default parameters have landed to dev branch.

Also in case anyone has missed it we have a list of es6 feature on the main readme that is updated with what has been implemented so far.

Fantastic work and really appreciate the effort you have put into this project. Can I ask, did you have any thoughts on when you would likely start the Arrows function item on the backlog?

Arrow functions have landed into dev /cc @kevinroast

great stuff!

Awesome !

Proxy and Reflect are now in dev

Latest version on nuget depends on Esprima 1.0.1256 which is missing.

BTW: This issue should be pinned. :-)

Since last update for-of is now implemented and object spread with some missing Object APIs:

Currently there's work ongoing around Promise and let/const support.

Lexical scoping of variables, a.k.a. let/const support just landed in dev.

any chance to get a new prerelease to nuget.org?

ES2020 feature nullish coalescing (myNumericVar ?? 0) has landed to dev.

class support has landed dev.

Array.prototype.flatand Array.prototype.flatMap have landed dev.

Promise support has landed dev, async and await keywords have not yet been implemented.

Optional?.chaining?.has?.landed?.main

Optional catch binding has landed main and now high on heels also a new release is on NuGet for you to consume, enjoy!

WeakMap and WeakSet have strongly landed to main.

Internal feature of having Realm and Intrinsics concepts has landed main. This basically makes it easier to follow the specification and hopefully paves way for JS API for realms, which is in the works.

ArrayBuffer and DataView have landed main.

Typed arrays have landed main.

If you are backed by a commercial entity benefiting from my/our work, please consider sponsoring, even a one time donation will buy some beer and adds some motivation. Completing these tasks can take days of free time from family life.

Hi @sebastienros , @lahma
Is it possible to have an alpha version published on NuGet?

@savornicesei even better, you can download the beta from NuGet which contains the work items discussed here so far.

Ohhhh.... I might have not checked the "Prerelease" checkbox in Rider. Sorry, sorry!
Then I can check if it works with latest highlight.js lib.

Thanks!

ES2021 Logical Assignment (??=, &&=, ||=) has landed main and NuGet.

ES2020 BigInt has landed main.

ES6 module and module loader support has landed main. Things might still move a bit public-API-wise.

When will jint 3release none-beta version, any idea?

When will jint 3release none-beta version, any idea?

When it's ready 🤷🏻‍♂️

@lahma will there be new beta builds? The latest is v3.0.0-beta-2037 (from December 2021) but there are several new features in the latest beta that are not on nuget.

@MeikelLP we'll try to get a new preview on NuGet, requires an API key update so waiting for it, stay tuned.

@MeikelLP there's a new release on NuGet now.

String.prototype.replaceAll just got merged to main.

import.meta just got merged to main.

ShadowRealm (stage 3 proposal) just got merged to main.

AggregateError was merged to main.

WeakRef was merged to main.

Array.group and Array.groupToMap (stage 3 proposals) have been merged to main.

RegExp named capture groups were just merged to main.

RegExp match indices support was just merged to main.

Promise.any and Promise.allSettled were just merged to main.

A feature popular among the cool kids is now available on main branch/MyGet feed called async/await. Please try it out and prepare to make PRs if it doesn't work 😉

We can cross it out as completed if no-one complains too much.

Don't forget to donate all the big business money to GitHub sponsors, I spent a vacation day with this

A slightly exotic feature called FinalizationRegistry has landed main. As it's related to garbage collection there might still be some quirks to fix, but now also that feature box has been ticked.

Is there a Minimum Features list somewhere for what is expected for a Version 3 full release?

If there's no clearly defined minimum features list, then this thing is going to continue sitting in Beta forever.

Expecting 100% coverage is unrealistic, and it seems to me like the current coverage probably warrants non-beta.

Also, it would be great if this thing was easily added from NuGet package manager. Only version 2 seems visible right now.

@jhouxzirrus would you be ok with non-semantic versioning - like API and feature brreaking changes in minor releases?

commented

@jhouxzirrus would you be ok with non-semantic versioning - like API and feature brreaking changes in minor releases?

I think those concerns are secondary.

After establishing a minimum reasonable features set, then its possible to target that set for a major release followed by minor releases that consist of fixes to any discovered bugs or oversights.

Features beyond the minimum set would then be consideration either for minor releases where code impact is low (minimal to no breaking changes), or target the next major release (version 4).

I'm just saying.... when you build software without targeting a restricted feature set (especially for something as pervasive as ECMA features), you end up in "forever beta" territory and that has a distinct negative impact on users.... not to mention possible burnout for project contributors since they feel like the project will never be complete.

@pha3z If such minimum list would be established, would you like to help out implementing the missing bits? I think concrete help would be the key instead of talking about how software should be planned or released.

commented

I'm not sure I'm qualified to assist or have time.

I only observed that the project seems to be very mature, and so I poked my head into suggest that maybe its not really beta material anymore.... and wondered if maybe it needs a ribbon on it so it can be published to nuget and made easier for users to get started with it. :)

@cyraid please use discussions to keep this thread focused on 3.x delivery. See https://github.com/sebastienros/jint/blob/main/Jint.Tests/Runtime/InteropTests.MemberAccess.cs for member access strategies which should help you in this particular case.

All ECMAScript 2022 features should now be supported in main:

  • Class Fields
  • RegExp Match Indices
  • Top-level await
  • Ergonomic brand checks for Private Fields
  • .at()
  • Accessible Object.prototype.hasOwnProperty (Object.hasOwn)
  • Class Static Block
  • Error Cause

Also ECMAScript 2020 export * as ns from was actually already working for modules and covered by tests. Updated supported feature list can be seen on repo's README.md.

All ECMAScript 2022 features should now be supported in main:

  • Class Fields
  • RegExp Match Indices
  • Top-level await
  • Ergonomic brand checks for Private Fields
  • .at()
  • Accessible Object.prototype.hasOwnProperty (Object.hasOwn)
  • Class Static Block
  • Error Cause

Also ECMAScript 2020 export * as ns from was actually already working for modules and covered by tests. Updated supported feature list can be seen on repo's README.md.

Wow, seriously? What are you guys, machines? Jokes aside, good job!

Edit: What are you guys missing, just tail calls and generators?

Edit: What are you guys missing, just tail calls and generators?

Basically generators. Tail calls is a bit niche and might not be worth the effort. Async has some corner cases to fix too.

Now that ES2023 is nearing finalization, it seems that Jint has those features also covered, go figure. README has been updated to reflect that.

  • Array find from last
  • Change Array by copy
  • Hashbang Grammar
  • Symbols as WeakMap keys