Skip to content

Support custom parser options in programmatic API #327

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

Merged
merged 1 commit into from
Feb 15, 2019
Merged

Conversation

danez
Copy link
Collaborator

@danez danez commented Feb 15, 2019

Add logicalAssignment to the default plugins.

BREAKING CHANGE: Removed cli arguments --legacy-decorators and --decorators-before-export. Instead use a babel configuration file with the correct options for the transforms.
BREAKING CHANGE: Removed api options legacyDecorators and decoratorsBeforeExport. Instead use a babel configuration file or supply parserOptions and enable the plugins with the correct options.

Do you think this is okay and works with your usecases? I wanted to add this before doing 4.0.

So basically the options are now:

  1. No config file and no parserOptions => defaultPlugins
  2. No config file and parserOptions with plugins => parserOptions only
  3. No config file and parserOptions without plugins => parserOptions + defaultPlugins
  4. Config File and no parserOptions => config file only
  5. Config File and parserOptions with plugins => babel merges config file with parserOptions
  6. Config File and parserOptions without plugins => babel merges config file with parserOptions and defaultPlugins

In all 6 cases estree plugin is now added and tokens set to true, as both are required.

Add logicalAssignment to the default plugins.

BREAKING CHANGE: Removed cli arguments `--legacy-decorators` and `--decorators-before-export`. Instead use a babel configuration file with the correct options for the transforms.
BREAKING CHANGE: Removed api options `legacyDecorators` and `decoratorsBeforeExport`. Instead use a babel configuration file or supply `parserOptions` and enable the plugins with the correct options.
Copy link
Collaborator

@jquense jquense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@danez danez merged commit 1a13d7d into master Feb 15, 2019
@danez danez deleted the new-options branch February 15, 2019 01:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants