Comparing version 0.18.0 to 0.18.1
"use strict"; | ||
// Prefer the new @babel/parser package, but fall back to babylon if | ||
// that's what's available. | ||
const babylon = function () { | ||
try { | ||
return require("@babel/parser"); | ||
} catch (e) { | ||
return require("babylon"); | ||
} | ||
}(); | ||
exports.options = { | ||
allowImportExportEverywhere: true, | ||
allowReturnOutsideFunction: true, | ||
plugins: [ | ||
"*", "flow", "jsx", | ||
// The "*" glob no longer seems to include the following plugins: | ||
"asyncGenerators", | ||
"bigInt", | ||
"classPrivateMethods", | ||
"classPrivateProperties", | ||
"classProperties", | ||
// Since the "decorators" plugin cannot be used together with the | ||
// "decorators-legacy" plugin, and one of them must be used if the | ||
// @babel/plugin-proposal-decorators Babel plugin is used, it's not | ||
// safe to blindly include the "decorators" plugin here. | ||
// "decorators", | ||
"doExpressions", | ||
"dynamicImport", | ||
"exportDefaultFrom", | ||
"exportExtensions", | ||
"exportNamespaceFrom", | ||
"functionBind", | ||
"functionSent", | ||
"importMeta", | ||
"nullishCoalescingOperator", | ||
"numericSeparator", | ||
"objectRestSpread", | ||
"optionalCatchBinding", | ||
"optionalChaining", | ||
// https://github.com/babel/babel/pull/8196 | ||
["pipelineOperator", { | ||
proposal: "minimal" | ||
}], | ||
"throwExpressions", | ||
// Other experimental plugins that we could enable: | ||
// https://github.com/babel/babylon#plugins | ||
], | ||
sourceType: "module", | ||
strictMode: false | ||
}; | ||
function parse(code) { | ||
return babylon.parse(code, exports.options); | ||
} | ||
exports.parse = parse; | ||
Object.assign(exports, require("./babel.js")); |
@@ -11,3 +11,3 @@ "use strict"; | ||
if (REIFY_PARSER === "acorn" || | ||
REIFY_PARSER === "babylon" || | ||
REIFY_PARSER === "babel" || | ||
REIFY_PARSER === "top-level") { | ||
@@ -14,0 +14,0 @@ exports.parse = require("./" + process.env.REIFY_PARSER + ".js").parse; |
{ | ||
"name": "reify", | ||
"version": "0.18.0", | ||
"version": "0.18.1", | ||
"main": "node/index.js", | ||
@@ -38,11 +38,10 @@ "browser": "lib/empty.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0-beta.55", | ||
"@babel/parser": "^7.0.0-beta.55", | ||
"@babel/preset-env": "^7.0.0-beta.55", | ||
"@babel/core": "^7.1.2", | ||
"@babel/parser": "^7.1.3", | ||
"@babel/preset-env": "^7.1.0", | ||
"babel-plugin-transform-es2015-modules-reify": "^0.17.0", | ||
"babylon": "^7.0.0-beta.47", | ||
"lodash": "^4.17.10", | ||
"lodash": "^4.17.11", | ||
"mocha": "^5.2.0", | ||
"recast": "^0.15.0" | ||
"recast": "^0.15.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162817
7
42
2887