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
Upgrade Babel 7 #332
Upgrade Babel 7 #332
Conversation
Awesome! Can you take a look at the integration test ( Reference: https://semaphoreci.com/nicolodavis/boardgame-io/branches/pull-request-332/builds/1 |
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"@storybook/react": "^4.1.4", | ||
"ajv": "^6.6.2", |
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.
What is this dependency for?
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.
Resolves this warning
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
It's a quick/easy fix to a known problem described in webpack/schema-utils#23 (comment) and npm/npm#19877 and npm/npm#19877 (comment)
Holding tight, |
Nevermind... babel-watch still doesn't support Babel 7 yet. I think I can accomplish the same thing though with Pros:
Cons:
|
I am just afraid that not being able to validate with the example app will make our life harder to manually test features. And this is important specially for some browser-dependent features like drag and drop that I am developing now. |
Could the drag-and-drop components be developed within |
Not really, because I am changing Token.js which is already included in /src/ui/... I could make a full new copy of the file and use that instead for development... That's a way. I think the drag and drop should be mostly done now, but I just wonder that this might also happen for other features that are not very easily unit-testable. |
But at the same time, I love TDD and I think that forcing people to look more into the tests and less into manually testing is a good thing. So I don't know, im just pointing the trade-offs here :) |
Yep yep, it is a tradeoff for sure. Quick question... are you using |
I use the examples a lot when developing to do quick sanity tests. I think it should still be possible to have a separate package.json with all the dev dependencies and also "symlink" the boardgame.io dependency to the code in the repo so that you can make changes and see them live, no? Also, I don't think anyone uses storybook. I'm in favor of removing it altogether. |
Any thoughts about the Babel regenerator runtime error that you get when running the integration test? |
Removed storybook in f853da8. |
Like symlinking the package into node_modules? Babel 7 no longer transpiles files in there by default... might take some more configuration. https://babeljs.io/docs/en/v7-migration#config-lookup-changes |
I see. OK, then let's just keep the examples in the same package.json as the main project until we can figure out a way to split them and still retain the ability to see library changes in the examples automatically. |
fac9854
to
ebf8f43
Compare
package-lock.json
Outdated
"dev": true, | ||
"requires": { | ||
"core-js": "2.5.5", | ||
"promise-polyfill": "7.1.2", | ||
"whatwg-fetch": "2.0.4" | ||
}, | ||
"dependencies": { | ||
"chokidar": { |
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 was weird.. it had the same hash as whatwg-fetch, too... responsible for the last 5 build fails.
would be great to see what @firebase/polyfill looked like for 0.3.3 and why this happened, but monorepos 🤷♂️
@nicolodavis integration test works now, that's a clever test... I like it. |
I guess last remaining unsolved question is how to get the examples webapp to hot-reload changes to a package outside of its dir. |
Thanks @philihp! Let's punt that to another PR. This is a good change to get in right now. Made one change, which is to remove the async-to-generator altogether (which avoids all the regeneratorRuntime hassle and also results in a smaller bundle). |
replace({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
}), | ||
uglify( |
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.
Missed this. Why are we no longer minifying the code here?
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'm guessing you deleted this because it was generating some errors and forgot to add it back.
Added rollup-plugin-terser
instead.
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.
Ah yeah, I removed it to simplify things. At first it was having some errors so I upgraded it but then the config for it was broken. rollup-plugin-terser
looks a better solution anyway, and zero config 💯
Also, about |
Thanks for the merge, the scope of this was starting to make me go crazy 🤕 . I'll take a stab at nodemon/babel-node. There's GOTTA to be a way to make this work. |
Yak shave to end all yak shaves
Upgrades Storybook(!) postcss plugin: The onwrite hook used by plugin postcss is deprecated. The generateBundle hook should be used instead.
, which I believe may be fixed by this: fixed: noonwrite
method in rollup version 0.60.7 egoist/rollup-plugin-postcss#113Tests run
npm run test
npm run prepare
npm run docsify
npm run storybook
npm run dev
npm run test:integration