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

Use @babel/parser in TypeScript parser #291

Merged
merged 2 commits into from
Dec 5, 2018

Conversation

elliottsj
Copy link
Contributor

Previously, the TypeScript parser would fail due to the 'babylon' package having the incorrect version (v6). Added a test which will detect this:

  ● jscodeshift CLI › --parser=ts › parses TypeScript sources

    expect(string).not.toContain(value)

    Expected string:
      "Processing 1 files...
     ERR /var/folders/ms/t3l222rn1v3dkvvnytj4vfkw0000gn/T/f-118113-6659-hurec.taoyh Transformation error (Unexpected token, expected ; (1:5))
    SyntaxError: Unexpected token, expected ; (1:5)

Switching to '@babel/parser' fixes this.

@elliottsj elliottsj changed the title Fix TypeScript parser Use @babel/parser in TypeScript parser Dec 4, 2018
@fkling
Copy link
Contributor

fkling commented Dec 4, 2018

Ugh, thanks for catching that! I remember doing these changes but ... ¯_(ツ)_/¯ .

Will release a fixed version asap.

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

Successfully merging this pull request may close these issues.

3 participants