-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Babel 7 compatibility and change tests #440
Conversation
…rt macro testing on babel 6 & 7
|
||
test('className as expression string', () => { | ||
const basic = | ||
import { createInlineTests, createExtractTests } from './util' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried doing this once and stopped at 2 files. Awesome work.
@@ -15,6 +15,7 @@ | |||
}, | |||
"dependencies": { | |||
"babel-generator": "^6.26.0", | |||
"babel-helper-module-imports": "^7.0.0-beta.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also published already as scoped - @babel/helper-module-imports
you probably should update other babel dependencies to their respective @babel/*@7-beta.5
and you should pin them to the exact versions (no ^
) as its not stable yet
…ly uses a single lockfile
Codecov Report
|
"babel-generator": "^6.26.0", | ||
"babel-macros": "^1.0.2", | ||
"@babel/helper-module-imports": "7.0.0-beta.31", | ||
"babel-macros": "^1.2.0", | ||
"babel-plugin-syntax-jsx": "^6.18.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mitchellhamilton is there a reason this plugin is left here with version 6? mixing babel 7 and babel 6 packages together might not work and is considered highly risky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@babel/plugin-syntax-jsx
has a peerDependency on @babel/core
whereas babel-plugin-syntax-jsx
doesn't and we want to maintain babel 6 compatibility for now. I understand it's not ideal.
"babel-plugin-syntax-jsx": "^6.18.0", | ||
"convert-source-map": "^1.5.0", | ||
"emotion-utils": "^8.0.9", | ||
"source-map": "^0.5.7", | ||
"touch": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0-beta.4", | ||
"babel-cli": "^6.24.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, also beta
packages should be synced in version for better stability, i would suggest upgrading all babel@beta-x to the latest, which is being 31 at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're still using babel 6 to build emotion, we're only using babel 7 to test the babel plugin. I just updated @babel/core
to beta 31.
What:
Babel 7 compatibility and change tests
Why:
Closes #437
Closes #169
How:
jest-in-case
, writing some helpers and a babel plugin i wrote to convert the boilerplately cases into objects .Checklist:
This isn't done yet, I'm having some problems with macro tests.
Once this is done, I'm thinking of switching to babel 7 for bundling so we get the smaller helpers and stuff.