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

Release 5.0 #1743

Open
2 of 12 tasks
ariya opened this issue Feb 1, 2017 · 6 comments
Open
2 of 12 tasks

Release 5.0 #1743

ariya opened this issue Feb 1, 2017 · 6 comments
Labels

Comments

@ariya
Copy link
Contributor

ariya commented Feb 1, 2017

(Only placeholder for now. More TBD)

What goes into this release? New ES2018 syntax support:

Release workflow:

  • Bump version number
  • Update ChangeLog
  • Update devDependencies
  • Activate the version at esprima.readthedocs.io
  • Check for performance regression
  • Tag the repository
  • Publish to npm
  • Announce in the mailing-list
  • Update the web site
@ariya ariya added the meta label Feb 1, 2017
@ariya ariya mentioned this issue Feb 1, 2017
27 tasks
@lastmjs
Copy link

lastmjs commented Apr 20, 2018

Are ES Modules going to be a part of this release?

@donnagf
Copy link

donnagf commented Nov 7, 2019

@ariya Any progress on this? Seems to be soon 2 years behind schedule. In the docs it is stated that Esprima should be updated every year.

@boutell
Copy link

boutell commented Feb 11, 2020

@ariya Hi, anything I can do to help 5.0 get to the finish line? I'm knee deep in a project depending rather heavily on it, with zero desire to switch, so I'm rather motivated...

@boutell
Copy link

boutell commented Feb 11, 2020

OK, this is awkward, but it turns out that moving to acorn was straightforward. Obviously I have just started using acorn, but so far it seems to cover my use case equally well, with the addition of support for newer syntax. Still interested in understanding this ecosystem and learning which use cases might still be stronger in esprima.

@Timmmm
Copy link

Timmmm commented Jan 27, 2021

Acorn is written in Javascript though, whereas Esprima seems to have upgraded to Typescript since V4, so I'd really like to use Esprima if possible.

@Timmmm
Copy link

Timmmm commented Jan 28, 2021

Esprima seems to have upgraded to Typescript since V4

Actually I was wrong on two counts:

  1. V4 already uses Typescript but unfortunately they don't generate and ship type definitions (.d.ts files), even though it's really easy - just add --declaration to the tsc command and then move all the .d.ts files into dist (and I guess add them to package.json:files.

  2. Although it technically is written in Typescript, they unfortunately haven't enabled the noImplicitAny option so loads of the code is like this:

    const program = isModule ? parser.parseModule() : parser.parseScript();
    const ast = program as any;

    if (collectComment && commentHandler) {
        ast.comments = commentHandler.comments;
    }

And the main generated types are kind of useless:

export declare function parse(code: string, options: any, delegate: any): any;
export declare function parseModule(code: string, options: any, delegate: any): any;
export declare function parseScript(code: string, options: any, delegate: any): any;
export declare function tokenize(code: string, options: any, delegate: any): any;

I made a task to fix that: #2066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants