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

plugins aren't added to package.json #101

Open
camflan opened this issue Oct 24, 2018 · 0 comments
Open

plugins aren't added to package.json #101

camflan opened this issue Oct 24, 2018 · 0 comments

Comments

@camflan
Copy link

camflan commented Oct 24, 2018

babel-upgrade explodes all of the stage presets that we had into the individual plugins, which is great - but it doesn't add these plugins to our package.json for installation so we had to do this manually. Is this expected, or should it have inserted the plugins into package.json itself?

babel-upgrade output,

🙌  Thanks for trying out https://github.com/babel/babel-upgrade!

Updating .babelrc config at .babelrc
Index: .babelrc
===================================================================
--- .babelrc	Before Upgrade
+++ .babelrc	After Upgrade
@@ -1,28 +1,69 @@
 {
   "presets": [
     [
-      "es2015",
+      "@babel/preset-env",
       {
         "modules": false
       }
     ],
-    "es2016",
-    "es2017",
-    "react",
-    "stage-2"
+    "@babel/preset-env",
+    "@babel/preset-env",
+    "@babel/preset-react",
+    "@babel/preset-flow"
   ],
   "plugins": [
     "emotion",
-    "transform-async-to-generator",
-    "react-hot-loader/babel"
+    "@babel/plugin-transform-async-to-generator",
+    "react-hot-loader/babel",
+    "@babel/plugin-syntax-dynamic-import",
+    "@babel/plugin-syntax-import-meta",
+    "@babel/plugin-proposal-class-properties",
+    "@babel/plugin-proposal-json-strings",
+    [
+      "@babel/plugin-proposal-decorators",
+      {
+        "legacy": true
+      }
+    ],
+    "@babel/plugin-proposal-function-sent",
+    "@babel/plugin-proposal-export-namespace-from",
+    "@babel/plugin-proposal-numeric-separator",
+    "@babel/plugin-proposal-throw-expressions"
   ],
   "env": {
     "test": {
       "presets": [
-        "es2015",
-        "react",
-        "stage-0"
+        "@babel/preset-env",
+        "@babel/preset-react"
+      ],
+      "plugins": [
+        "@babel/plugin-syntax-dynamic-import",
+        "@babel/plugin-syntax-import-meta",
+        "@babel/plugin-proposal-class-properties",
+        "@babel/plugin-proposal-json-strings",
+        [
+          "@babel/plugin-proposal-decorators",
+          {
+            "legacy": true
+          }
+        ],
+        "@babel/plugin-proposal-function-sent",
+        "@babel/plugin-proposal-export-namespace-from",
+        "@babel/plugin-proposal-numeric-separator",
+        "@babel/plugin-proposal-throw-expressions",
+        "@babel/plugin-proposal-export-default-from",
+        "@babel/plugin-proposal-logical-assignment-operators",
+        "@babel/plugin-proposal-optional-chaining",
+        [
+          "@babel/plugin-proposal-pipeline-operator",
+          {
+            "proposal": "minimal"
+          }
+        ],
+        "@babel/plugin-proposal-nullish-coalescing-operator",
+        "@babel/plugin-proposal-do-expressions",
+        "@babel/plugin-proposal-function-bind"
       ]
     }
   }
 }
\ No newline at end of file


Updating closest package.json dependencies
Index: /Users/camron/src/lodgetools/inntender/package.json
===================================================================
--- /Users/camron/src/lodgetools/inntender/package.json	Before Upgrade
+++ /Users/camron/src/lodgetools/inntender/package.json	After Upgrade
@@ -27,15 +27,15 @@
     }
   },
   "proxy": "https://inntender.dev",
   "dependencies": {
+    "@babel/core": "^7.0.0",
+    "@babel/plugin-transform-async-to-generator": "^7.0.0",
+    "@babel/polyfill": "^7.0.0",
+    "@babel/preset-react": "^7.0.0",
     "autoprefixer": "^8.4.1",
     "axios": "^0.18.0",
-    "babel-core": "^6.26.3",
     "babel-plugin-emotion": "^9.1.2",
-    "babel-plugin-transform-async-to-generator": "^6.24.1",
-    "babel-polyfill": "^6.26.0",
-    "babel-preset-react": "^6.24.1",
     "bootstrap": "3.3.7",
     "css-loader": "^0.28.11",
     "cssnano": "^3.10.0",
     "csso": "^3.1.1",
@@ -61,24 +61,24 @@
     "redux": "^4.0.0",
     "style-loader": "^0.21.0"
   },
   "devDependencies": {
+    "@babel/cli": "^7.0.0",
+    "@babel/core": "^7.0.0",
+    "@babel/preset-env": "^7.0.0",
+    "@babel/preset-flow": "^7.0.0",
     "@kadira/storybook-addons": "^1.6.1",
     "@storybook/addon-info": "^3.4.3",
     "@storybook/addon-knobs": "^3.4.3",
     "@storybook/addon-options": "^3.4.3",
     "@storybook/react": "^3.4.3",
     "axios-mock-adapter": "^1.15.0",
-    "babel-cli": "^6.26.0",
-    "babel-eslint": "^8.2.3",
-    "babel-jest": "^22.4.3",
-    "babel-loader": "^7.1.4",
+    "babel-core": "^7.0.0-bridge.0",
+    "babel-eslint": "^9.0.0",
+    "babel-jest": "^23.4.2",
+    "babel-loader": "^8.0.0",
     "babel-minify": "^0.4.3",
     "babel-plugin-add-module-exports": "^0.2.1",
-    "babel-preset-es2015": "^6.24.1",
-    "babel-preset-es2016": "^6.24.1",
-    "babel-preset-es2017": "^6.24.1",
-    "babel-preset-flow": "^6.23.0",
     "compression-webpack-plugin": "^1.1.11",
     "eslint": "^4.19.1",
     "eslint-config-prettier": "^2.4.0",
     "eslint-plugin-flowtype": "^2.46.3",


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant