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

expose import.meta syntax parser option as plugin #7008

Merged
merged 6 commits into from Dec 16, 2017

Conversation

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Dec 10, 2017

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR
Any Dependency Changes?
License MIT

this plugin exposes the import.meta syntax parser option as plugin (in the same way as e.g. dynamicImport), which makes it possible to use Babel and import.meta syntax with e.g. std/esm without specifying the parser options in babelrc:

// .babelrc
{
  "parserOpts": {
    "plugins": ['importMeta']
  }
}

also added the plugin to the stage 3 preset as well as the babel standalone package.

@babel-bot

This comment has been minimized.

Copy link
Collaborator

babel-bot commented Dec 10, 2017

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6210/

Copy link
Member

nicolo-ribaudo left a comment

Thank you 🎉

"@babel/core": "7.0.0-beta.34"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.34"

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo Dec 10, 2017

Member

This devDependency isn't needed.

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Dec 10, 2017

Member

@nicolo-ribaudo This should be consistent with out other modules, so having it is the way to go.

This comment has been minimized.

Copy link
@Andarist

Andarist Dec 11, 2017

Member

@loganfsmyth whats the point of having peerDep here then?

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Dec 11, 2017

Member

@Andarist A peer just declares a peer without installing anything, so the dev dependency is needed for Lerna to add the symlinks to @babel/core. See my other comment though. That peerdep is supposed to be a general range, so it wouldn't normally be a repeat of the dev dependency.

"babel-plugin"
],
"peerDependencies": {
"@babel/core": "7.0.0-beta.34"

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Dec 10, 2017

Member

If you look at our other plugins, we've been doing a range for this dependency.

This comment has been minimized.

Copy link
@dnalborczyk

dnalborczyk Dec 11, 2017

Author Contributor

I looked through all babel-plugin-syntax packages and some others, it seems like they are all using the same value.

Though I checked the history, it appears that a range has been used prior to 7.0.0-beta.31

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Dec 11, 2017

Member

Oh dang, that may have been an accident. I'll have to look into it, but it won't be until next week. Guess if it is already like that this is fine then.

@babel babel deleted a comment from loganfsmyth Dec 11, 2017
@@ -0,0 +1,17 @@
{
"name": "@babel/plugin-syntax-import-meta",
"version": "7.0.0-beta.34",

This comment has been minimized.

Copy link
@hzoo

hzoo Dec 15, 2017

Member

I think these need to be beta.35 now

@existentialism

This comment has been minimized.

Copy link
Member

existentialism commented Dec 16, 2017

I updated the package.json versions to 35, we should note internally to revisit ranges in peerDependencies wrt @babel/core

@existentialism existentialism merged commit ed4d90b into babel:master Dec 16, 2017
4 checks passed
4 checks passed
babel/repl REPL preview is available
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 84.23% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dnalborczyk dnalborczyk deleted the dnalborczyk:import-meta-plugin branch Dec 17, 2017
@lock lock bot added the outdated label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.