Skip to content

Updated to babel 7#64

Closed
vikr01 wants to merge 6 commits intoairbnb:masterfrom
vikr01:feature/babel-7
Closed

Updated to babel 7#64
vikr01 wants to merge 6 commits intoairbnb:masterfrom
vikr01:feature/babel-7

Conversation

@vikr01
Copy link
Copy Markdown
Contributor

@vikr01 vikr01 commented Sep 9, 2018

This requires airbnb/babel-preset-airbnb#37 to work.

  • Updated all babel dependencies
  • Fixed all test cases
  • Removed testing for babel-preset-es2015 since it's been deprecated in favor or @babel/preset-env

@wolfy1339
Copy link
Copy Markdown

wolfy1339 commented Sep 9, 2018

You might need to make a PR for babel-plugin-add-module-exports as well, since it is a devDependency, and also seems to use Babel 6
ref: 59naga/babel-plugin-add-module-exports#65.

@wolfy1339 wolfy1339 mentioned this pull request Sep 9, 2018
@wolfy1339
Copy link
Copy Markdown

Will close #56

@vikr01
Copy link
Copy Markdown
Contributor Author

vikr01 commented Sep 9, 2018

You might need to make a PR for babel-plugin-add-module-exports as well, since it is a devDependency, and also seems to use Babel 6

babel-plugin-add-module-exports is actually not good to use. Import statements will now use .default if it exists. See https://babeljs.io/docs/en/v7-migration-api#export-changes.

I forgot to remove it from the dependencies, but I did remove it from .babelrc.

@jacob-greenfield
Copy link
Copy Markdown

@ljharb Now that airbnb/babel-preset-airbnb#37 has been merged, is this ready too?

@wolfy1339
Copy link
Copy Markdown

They haven't released the changes to npm quite yet.

@ljharb
Copy link
Copy Markdown
Collaborator

ljharb commented Oct 8, 2018

I'll update this PR now.

@ljharb
Copy link
Copy Markdown
Collaborator

ljharb commented Oct 8, 2018

@vikr01 i'm going to re-add add-module-exports, since .default should still never be exposed to require.

@vikr01
Copy link
Copy Markdown
Contributor Author

vikr01 commented Oct 8, 2018

@ljharb Sure that’s fine. Just to note though, babel’s plugins now expose .default when using require.

@ljharb
Copy link
Copy Markdown
Collaborator

ljharb commented Oct 8, 2018

Sure, but just because they're doing the wrong thing doesn't mean we should :-)

@ljharb
Copy link
Copy Markdown
Collaborator

ljharb commented Oct 8, 2018

v2.2.0 is released, containing this commit which allows it to work on both babel 6 and 7.

I'm going to keep this PR and update it to become v3, which explicitly will only support babel 7.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants