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

Update babel to v7.0.0-beta.31 #24683

Merged
merged 2 commits into from
Nov 7, 2017
Merged

Update babel to v7.0.0-beta.31 #24683

merged 2 commits into from
Nov 7, 2017

Conversation

Johann-S
Copy link
Member

@Johann-S Johann-S commented Nov 5, 2017

/CC @hzoo if you have time 😄

@Johann-S
Copy link
Member Author

Johann-S commented Nov 5, 2017

Hmm I didn't checked babel-eslint 😟

@XhmikosR
Copy link
Member

XhmikosR commented Nov 5, 2017 via email

package.json Outdated
@@ -80,12 +80,12 @@
"popper.js": "^1.12.6"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

can update to beta.31 now 😛 https://github.com/babel/babel/releases/tag/v7.0.0-beta.31

It's only 5 -> 31 because babylon was at 30

@@ -1,11 +1,11 @@
module.exports = {
presets: [
[
'env',
'@babel/env',
Copy link
Member

Choose a reason for hiding this comment

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

Is this really needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep that's because the new babel namespace

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah it's actually because we can't really know to default env to babel-preset-env or @babel/preset-env or @x/preset-env etc

Copy link
Contributor

@hzoo hzoo left a comment

Choose a reason for hiding this comment

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

looks fine, just saying that you can change from beta.5 to beta.31 (it's supposed to be beta.6 but babylon was already at 30 and we moved it into the repo)

@XhmikosR
Copy link
Member

XhmikosR commented Nov 6, 2017

@hzoo: we get build errors in babel-eslint; see the Travis build and my comment above.

package.json Outdated
@@ -102,7 +102,7 @@
"qunit-phantomjs-runner": "^2.3.0",
"qunitjs": "^2.4.0",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-babel": "^4.0.0-beta.0",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should remove ^ here.

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

Ok that's unrelated to babel itself, I haven't looked at babel-eslint in a while actually but yeah maybe due to a newer version of eslint so it needs updates

@XhmikosR
Copy link
Member

XhmikosR commented Nov 6, 2017

The thing is that we don't get any errors if we don't update to beta.5. Something is wrong somewhere :/

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

Oh what, that really doesn't make sense then lol, since eslint is supposed to run on source code not the compiled code (right?), and they don't share dependencies either so that is really weird..🤔

@Johann-S
Copy link
Member Author

Johann-S commented Nov 6, 2017

I tried to update to the latest release of ESLint but we still have the same error 😟 https://travis-ci.org/twbs/bootstrap/jobs/297865624#L545

I removed external-helpers deps because rollup-plugin-babel in their new release handle that for us 👍

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

aside: curious why the babelrc file is part of files in package.json? it shouldn't be on npm (it's not an issue since we renamed to .babelrc.js anyway but yea?

@XhmikosR
Copy link
Member

XhmikosR commented Nov 6, 2017

@hzoo: exactly my point in #24582. It seems people were wrongfully pulling Bootstrap from npm and using our scripts, which is what I change in that PR.

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

If you distribute a build on npm and someone tries to compile node_modules with Babel it will current read it and try to compile with that config which doesn't make sense unless they install your devDeps too (haven't quite figured out what the behavior should be though)

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

Still have to investigate but I suppose it's an issue with npm trying to resolve different versions of the beta together? doesn't seem like there is any reason for it do be different because of a babel change

@XhmikosR
Copy link
Member

XhmikosR commented Nov 6, 2017

I believe that previously we allowed this, but it doesn't make sense to me, thus why I changed it in that PR.

I expect when I pull a package from npm to either use it as is, or use my scripts for further processing.

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

Ok lol so it must be a really weird dependency mismatch? I think 7.0.0-beta.0 is being matched by 7.0.0-beta.5 even though it's clearly a different version..

I just tested making the dependency scoped and it works.. https://github.com/babel/babel-eslint/blob/2004b913c7abef8d21cebca7f3ae39a9deaee767/package.json#L15

@hzoo
Copy link
Contributor

hzoo commented Nov 6, 2017

try "babel-eslint": "^8.0.2", (worked for my locally after checking out this pr)

And update do beta.31 instead of beta.5?

@XhmikosR
Copy link
Member

XhmikosR commented Nov 7, 2017

@hzoo: it seems babel-eslint 8.0.2 fixed the issue!

Now about beta.31, do we need to add babel/core manually?

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN bootstrap@4.0.0-beta.2 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/preset-env@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/cli@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN rollup-plugin-babel@4.0.0-beta.0 requires a peer of @babel/core@7 || ^7.0.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-check-constants@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-async-generator-functions@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-optional-catch-binding@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-object-rest-spread@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-optional-catch-binding@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-async-generators@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-async-to-generator@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-object-rest-spread@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-unicode-property-regex@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-arrow-functions@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-block-scoped-functions@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-classes@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-computed-properties@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-destructuring@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-exponentiation-operator@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-duplicate-keys@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-block-scoping@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-for-of@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-function-name@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-literals@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-modules-amd@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-modules-commonjs@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-modules-umd@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-new-target@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-object-super@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-modules-systemjs@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-parameters@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-regenerator@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-spread@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-shorthand-properties@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-sticky-regex@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-template-literals@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-typeof-symbol@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-unicode-regex@7.0.0-beta.31 requires a peer of @babel/core@7.0.0-beta.31 but none is installed. You must install peer dependencies yourself.

package.json Outdated
@@ -35,8 +35,8 @@
"js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/",
"js-lint-docs": "eslint --config js/tests/.eslintrc.json assets/js/ docs/ sw.js",
"js-compile": "npm-run-all --parallel js-compile-*",
"js-compile-standalone": "cross-env ROLLUP=true rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
"js-compile-bundle": "cross-env ROLLUP=true rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
"js-compile-standalone": "cross-env rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean we can get rid of cross-env in these 2 lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep thanks to the removal of external-helpers

Copy link
Member

Choose a reason for hiding this comment

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

Can you remove it where it's no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope we still use it one line under for js-compile-plugins instead of if we find a way to avoid the use of cross-env

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but it seems it's redundant in these 2 lines here (not the plugins script

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I'll remove it

@hzoo
Copy link
Contributor

hzoo commented Nov 7, 2017

Right @babel/core is a peerDep now so yes (so then you don't install v6 stuff)

@XhmikosR XhmikosR changed the title Update to babel beta 5 Update to babel to v7.0.0-beta.31 Nov 7, 2017
@XhmikosR XhmikosR changed the title Update to babel to v7.0.0-beta.31 Update babel to v7.0.0-beta.31 Nov 7, 2017
@XhmikosR
Copy link
Member

XhmikosR commented Nov 7, 2017 via email

@XhmikosR XhmikosR merged commit 4bacf8d into v4-dev Nov 7, 2017
@XhmikosR XhmikosR deleted the v4-dev-johann-update-babel branch November 7, 2017 23:04
@mdo mdo mentioned this pull request Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants