Comments (4)
I don't think if that's enough, in the current epoch of webpack, a lot of devs indifferently put the dependencies in either dictionary.
Maybe the check for "hasFlow" shouldn't be in upgradeDeps
but rather in index
after the 2 calls, with something like this:
if (options.hasFlow &&
!pkg.dependencies['@babel/preset-flow'] &&
!pkg.devDependencies['@babel/preset-flow']) {
pkg.devDependencies['@babel/preset-flow'] = getLatestVersion();
}
from babel-upgrade.
We should add some logic to decide which field should be upgraded at
Lines 59 to 73 in 683462c
from babel-upgrade.
Looks like the issue is there:
babel-upgrade/src/upgradeDeps.js
Lines 58 to 62 in 683462c
If hasFlow
is true, the dependency will be added in both dictionaries.
from babel-upgrade.
We could add a new key to the options
object to detect if we're modifying devDependencies
or not.
from babel-upgrade.
Related Issues (20)
- plugins aren't added to package.json
- [Ignore]
- SUGGESTION: Modify useBuiltIns for babel-preset-env in babelrc
- Plugins order are incorrect: proposal-decorators compatibility with proposal-class-properties
- Packages are capped at ^7.0.0 HOT 3
- add help
- Jest 24 dropped support for babel 6
- Upgrade failed
- "Move this into the monorepo when somewhat ready"
- Export package.json dependencies and .babelrc from repl
- @babel/core was added twice into package.json HOT 2
- cannot find module babel-plugin-transform-object-rest-spread HOT 1
- After upgrade to Babel7, I see Cannot find module '@babel/runtime-corejs2/core-js/reflect/construct' HOT 1
- Resolve duplicate entries HOT 2
- error on transform-export-extensions plugin upgrade
- Not have support to babel-plugin-transform-decorators-legacy HOT 1
- [ Bug ] Wrong behavior with unknown parameters HOT 1
- babel-upgrade is broken if you have spaces in user folder.
- ERROR in multi babel-polyfill ./src/client/index Module not found: Error: Can't resolve 'babel' in 'C:\Users\messi\New folder' @ multi babel-polyfill ./src/client/index main[1] HOT 2
- Babel Upgrade Online HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-upgrade.