From 0cf185695dcda117bd4addd2be4c36fcbaec65a6 Mon Sep 17 00:00:00 2001 From: DeMoorJasper Date: Fri, 31 Aug 2018 10:30:28 -0700 Subject: [PATCH] update to babel 7 --- .babelrc | 13 +++++++------ package.json | 14 +++++++++----- src/explode.js | 2 +- src/index.js | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.babelrc b/.babelrc index 2f93a0e..80387aa 100644 --- a/.babelrc +++ b/.babelrc @@ -1,8 +1,9 @@ { - "presets": [ - [ "es2015", { "loose": true } ] - ], - "plugins": [ - "transform-runtime" - ] + "presets": [["@babel/preset-env", { + "targets": { + "node": "6" + }, + "loose": true + }]], + "plugins": ["@babel/plugin-transform-runtime"] } diff --git a/package.json b/package.json index d374007..5bceda2 100644 --- a/package.json +++ b/package.json @@ -15,16 +15,20 @@ "type": "git", "url": "https://github.com/pugjs/babylon-walk.git" }, + "engines": { + "node": ">= 6.0.0" + }, "author": "Timothy Gu ", "license": "MIT", "dependencies": { - "babel-runtime": "^6.11.6", - "babel-types": "^6.15.0", + "@babel/runtime": "^7.0.0", + "@babel/types": "^7.0.0", "lodash.clone": "^4.5.0" }, "devDependencies": { - "babel-cli": "^6.14.0", - "babel-plugin-transform-runtime": "^6.15.0", - "babel-preset-es2015": "^6.14.0" + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/preset-env": "^7.0.0" } } diff --git a/src/explode.js b/src/explode.js index 101cb1c..3d23afc 100644 --- a/src/explode.js +++ b/src/explode.js @@ -2,7 +2,7 @@ // https://github.com/babel/babel/blob/07b3dc18a09f2217b38a3a63c8613add6df1b47d/packages/babel-traverse/src/visitors.js // import * as messages from 'babel-messages'; -import * as t from "babel-types"; +import * as t from "@babel/types"; import clone from "lodash.clone"; /** diff --git a/src/index.js b/src/index.js index ac7da59..610aef6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import * as t from 'babel-types'; +import * as t from '@babel/types'; import explode from './explode.js'; export function simple(node, visitors, state) {