@babel/standalone
Advanced tools
Comparing version 7.3.4 to 7.4.0
{ | ||
"name": "@babel/standalone", | ||
"version": "7.3.4", | ||
"version": "7.4.0", | ||
"description": "Standalone build of Babel for use in non-Node.js environments.", | ||
@@ -12,8 +12,8 @@ "main": "babel.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.3.4", | ||
"@babel/core": "^7.4.0", | ||
"@babel/helper-plugin-utils": "^7.0.0", | ||
"@babel/plugin-external-helpers": "^7.2.0", | ||
"@babel/plugin-proposal-async-generator-functions": "^7.2.0", | ||
"@babel/plugin-proposal-class-properties": "^7.3.4", | ||
"@babel/plugin-proposal-decorators": "^7.3.0", | ||
"@babel/plugin-proposal-class-properties": "^7.4.0", | ||
"@babel/plugin-proposal-decorators": "^7.4.0", | ||
"@babel/plugin-proposal-do-expressions": "^7.2.0", | ||
@@ -28,9 +28,9 @@ "@babel/plugin-proposal-export-default-from": "^7.2.0", | ||
"@babel/plugin-proposal-numeric-separator": "^7.2.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.3.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.0", | ||
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0", | ||
"@babel/plugin-proposal-optional-chaining": "^7.2.0", | ||
"@babel/plugin-proposal-pipeline-operator": "^7.3.2", | ||
"@babel/plugin-proposal-private-methods": "^7.3.4", | ||
"@babel/plugin-proposal-private-methods": "^7.4.0", | ||
"@babel/plugin-proposal-throw-expressions": "^7.2.0", | ||
"@babel/plugin-proposal-unicode-property-regex": "^7.2.0", | ||
"@babel/plugin-proposal-unicode-property-regex": "^7.4.0", | ||
"@babel/plugin-syntax-async-generators": "^7.2.0", | ||
@@ -53,14 +53,14 @@ "@babel/plugin-syntax-class-properties": "^7.2.0", | ||
"@babel/plugin-transform-arrow-functions": "^7.2.0", | ||
"@babel/plugin-transform-async-to-generator": "^7.3.4", | ||
"@babel/plugin-transform-async-to-generator": "^7.4.0", | ||
"@babel/plugin-transform-block-scoped-functions": "^7.2.0", | ||
"@babel/plugin-transform-block-scoping": "^7.3.4", | ||
"@babel/plugin-transform-classes": "^7.3.4", | ||
"@babel/plugin-transform-block-scoping": "^7.4.0", | ||
"@babel/plugin-transform-classes": "^7.4.0", | ||
"@babel/plugin-transform-computed-properties": "^7.2.0", | ||
"@babel/plugin-transform-destructuring": "^7.3.2", | ||
"@babel/plugin-transform-destructuring": "^7.4.0", | ||
"@babel/plugin-transform-dotall-regex": "^7.2.0", | ||
"@babel/plugin-transform-duplicate-keys": "^7.2.0", | ||
"@babel/plugin-transform-exponentiation-operator": "^7.2.0", | ||
"@babel/plugin-transform-flow-comments": "^7.2.0", | ||
"@babel/plugin-transform-flow-strip-types": "^7.3.4", | ||
"@babel/plugin-transform-for-of": "^7.2.0", | ||
"@babel/plugin-transform-flow-comments": "^7.4.0", | ||
"@babel/plugin-transform-flow-strip-types": "^7.4.0", | ||
"@babel/plugin-transform-for-of": "^7.4.0", | ||
"@babel/plugin-transform-function-name": "^7.2.0", | ||
@@ -72,10 +72,10 @@ "@babel/plugin-transform-instanceof": "^7.2.0", | ||
"@babel/plugin-transform-modules-amd": "^7.2.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.2.0", | ||
"@babel/plugin-transform-modules-systemjs": "^7.3.4", | ||
"@babel/plugin-transform-modules-commonjs": "^7.4.0", | ||
"@babel/plugin-transform-modules-systemjs": "^7.4.0", | ||
"@babel/plugin-transform-modules-umd": "^7.2.0", | ||
"@babel/plugin-transform-new-target": "^7.0.0", | ||
"@babel/plugin-transform-new-target": "^7.4.0", | ||
"@babel/plugin-transform-object-assign": "^7.2.0", | ||
"@babel/plugin-transform-object-set-prototype-of-to-assign": "^7.2.0", | ||
"@babel/plugin-transform-object-super": "^7.2.0", | ||
"@babel/plugin-transform-parameters": "^7.3.3", | ||
"@babel/plugin-transform-parameters": "^7.4.0", | ||
"@babel/plugin-transform-property-literals": "^7.2.0", | ||
@@ -91,4 +91,4 @@ "@babel/plugin-transform-property-mutators": "^7.2.0", | ||
"@babel/plugin-transform-react-jsx-source": "^7.2.0", | ||
"@babel/plugin-transform-regenerator": "^7.3.4", | ||
"@babel/plugin-transform-runtime": "^7.3.4", | ||
"@babel/plugin-transform-regenerator": "^7.4.0", | ||
"@babel/plugin-transform-runtime": "^7.4.0", | ||
"@babel/plugin-transform-shorthand-properties": "^7.2.0", | ||
@@ -100,3 +100,3 @@ "@babel/plugin-transform-spread": "^7.2.2", | ||
"@babel/plugin-transform-typeof-symbol": "^7.2.0", | ||
"@babel/plugin-transform-typescript": "^7.3.2", | ||
"@babel/plugin-transform-typescript": "^7.4.0", | ||
"@babel/plugin-transform-unicode-regex": "^7.2.0", | ||
@@ -123,3 +123,3 @@ "@babel/preset-flow": "^7.0.0", | ||
"homepage": "https://github.com/babel/babel-standalone#readme", | ||
"gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741" | ||
"gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804" | ||
} |
140
src/index.js
@@ -7,2 +7,3 @@ /** | ||
* and `registerPreset` respectively. | ||
* @flow | ||
*/ | ||
@@ -13,3 +14,16 @@ | ||
import * as Babel from "@babel/core"; | ||
import { | ||
transformFromAst as babelTransformFromAst, | ||
transform as babelTransform, | ||
buildExternalHelpers as babelBuildExternalHelpers, | ||
} from "@babel/core"; | ||
import { all } from "./generated/plugins"; | ||
import preset2015 from "./preset-es2015"; | ||
import presetStage0 from "./preset-stage-0"; | ||
import presetStage1 from "./preset-stage-1"; | ||
import presetStage2 from "./preset-stage-2"; | ||
import presetStage3 from "./preset-stage-3"; | ||
import presetReact from "@babel/preset-react"; | ||
import presetFlow from "@babel/preset-flow"; | ||
import presetTypescript from "@babel/preset-typescript"; | ||
@@ -89,16 +103,16 @@ import { runScripts } from "./transformScriptTags"; | ||
export function transform(code, options) { | ||
return Babel.transform(code, processOptions(options)); | ||
export function transform(code: string, options: Object) { | ||
return babelTransform(code, processOptions(options)); | ||
} | ||
export function transformFromAst(ast, code, options) { | ||
return Babel.transformFromAst(ast, code, processOptions(options)); | ||
export function transformFromAst(ast: Object, code: string, options: Object) { | ||
return babelTransformFromAst(ast, code, processOptions(options)); | ||
} | ||
export const availablePlugins = {}; | ||
export const availablePresets = {}; | ||
export const buildExternalHelpers = Babel.buildExternalHelpers; | ||
export const buildExternalHelpers = babelBuildExternalHelpers; | ||
/** | ||
* Registers a named plugin for use with Babel. | ||
*/ | ||
export function registerPlugin(name, plugin) { | ||
export function registerPlugin(name: string, plugin: Object | Function): void { | ||
if (availablePlugins.hasOwnProperty(name)) { | ||
@@ -115,3 +129,5 @@ console.warn( | ||
*/ | ||
export function registerPlugins(newPlugins) { | ||
export function registerPlugins(newPlugins: { | ||
[string]: Object | Function, | ||
}): void { | ||
Object.keys(newPlugins).forEach(name => | ||
@@ -125,3 +141,3 @@ registerPlugin(name, newPlugins[name]), | ||
*/ | ||
export function registerPreset(name, preset) { | ||
export function registerPreset(name: string, preset: Object | Function): void { | ||
if (availablePresets.hasOwnProperty(name)) { | ||
@@ -138,3 +154,5 @@ console.warn( | ||
*/ | ||
export function registerPresets(newPresets) { | ||
export function registerPresets(newPresets: { | ||
[string]: Object | Function, | ||
}): void { | ||
Object.keys(newPresets).forEach(name => | ||
@@ -148,80 +166,3 @@ registerPreset(name, newPresets[name]), | ||
// Wait! Please read https://github.com/babel/babel/pull/6177 first. | ||
registerPlugins({ | ||
"external-helpers": require("@babel/plugin-external-helpers"), | ||
"syntax-async-generators": require("@babel/plugin-syntax-async-generators"), | ||
"syntax-class-properties": require("@babel/plugin-syntax-class-properties"), | ||
"syntax-decorators": require("@babel/plugin-syntax-decorators"), | ||
"syntax-do-expressions": require("@babel/plugin-syntax-do-expressions"), | ||
"syntax-dynamic-import": require("@babel/plugin-syntax-dynamic-import"), | ||
"syntax-export-default-from": require("@babel/plugin-syntax-export-default-from"), | ||
"syntax-export-namespace-from": require("@babel/plugin-syntax-export-namespace-from"), | ||
"syntax-flow": require("@babel/plugin-syntax-flow"), | ||
"syntax-function-bind": require("@babel/plugin-syntax-function-bind"), | ||
"syntax-function-sent": require("@babel/plugin-syntax-function-sent"), | ||
"syntax-import-meta": require("@babel/plugin-syntax-import-meta"), | ||
"syntax-jsx": require("@babel/plugin-syntax-jsx"), | ||
"syntax-object-rest-spread": require("@babel/plugin-syntax-object-rest-spread"), | ||
"syntax-optional-catch-binding": require("@babel/plugin-syntax-optional-catch-binding"), | ||
"syntax-pipeline-operator": require("@babel/plugin-syntax-pipeline-operator"), | ||
"syntax-typescript": require("@babel/plugin-syntax-typescript"), | ||
"transform-async-to-generator": require("@babel/plugin-transform-async-to-generator"), | ||
"proposal-async-generator-functions": require("@babel/plugin-proposal-async-generator-functions"), | ||
"proposal-class-properties": require("@babel/plugin-proposal-class-properties"), | ||
"proposal-decorators": require("@babel/plugin-proposal-decorators"), | ||
"proposal-do-expressions": require("@babel/plugin-proposal-do-expressions"), | ||
"proposal-export-default-from": require("@babel/plugin-proposal-export-default-from"), | ||
"proposal-export-namespace-from": require("@babel/plugin-proposal-export-namespace-from"), | ||
"proposal-pipeline-operator": require("@babel/plugin-proposal-pipeline-operator"), | ||
"proposal-private-methods": require("@babel/plugin-proposal-private-methods"), | ||
"transform-arrow-functions": require("@babel/plugin-transform-arrow-functions"), | ||
"transform-block-scoped-functions": require("@babel/plugin-transform-block-scoped-functions"), | ||
"transform-block-scoping": require("@babel/plugin-transform-block-scoping"), | ||
"transform-classes": require("@babel/plugin-transform-classes"), | ||
"transform-computed-properties": require("@babel/plugin-transform-computed-properties"), | ||
"transform-destructuring": require("@babel/plugin-transform-destructuring"), | ||
"transform-dotall-regex": require("@babel/plugin-transform-dotall-regex"), | ||
"transform-duplicate-keys": require("@babel/plugin-transform-duplicate-keys"), | ||
"transform-for-of": require("@babel/plugin-transform-for-of"), | ||
"transform-function-name": require("@babel/plugin-transform-function-name"), | ||
"transform-instanceof": require("@babel/plugin-transform-instanceof"), | ||
"transform-literals": require("@babel/plugin-transform-literals"), | ||
"transform-modules-amd": require("@babel/plugin-transform-modules-amd"), | ||
"transform-modules-commonjs": require("@babel/plugin-transform-modules-commonjs"), | ||
"transform-modules-systemjs": require("@babel/plugin-transform-modules-systemjs"), | ||
"transform-modules-umd": require("@babel/plugin-transform-modules-umd"), | ||
"transform-object-super": require("@babel/plugin-transform-object-super"), | ||
"transform-parameters": require("@babel/plugin-transform-parameters"), | ||
"transform-shorthand-properties": require("@babel/plugin-transform-shorthand-properties"), | ||
"transform-spread": require("@babel/plugin-transform-spread"), | ||
"transform-sticky-regex": require("@babel/plugin-transform-sticky-regex"), | ||
"transform-template-literals": require("@babel/plugin-transform-template-literals"), | ||
"transform-typeof-symbol": require("@babel/plugin-transform-typeof-symbol"), | ||
"transform-typescript": require("@babel/plugin-transform-typescript"), | ||
"transform-unicode-regex": require("@babel/plugin-transform-unicode-regex"), | ||
"transform-member-expression-literals": require("@babel/plugin-transform-member-expression-literals"), | ||
"transform-property-literals": require("@babel/plugin-transform-property-literals"), | ||
"transform-property-mutators": require("@babel/plugin-transform-property-mutators"), | ||
"transform-exponentiation-operator": require("@babel/plugin-transform-exponentiation-operator"), | ||
"transform-flow-comments": require("@babel/plugin-transform-flow-comments"), | ||
"transform-flow-strip-types": require("@babel/plugin-transform-flow-strip-types"), | ||
"proposal-function-bind": require("@babel/plugin-proposal-function-bind"), | ||
"transform-jscript": require("@babel/plugin-transform-jscript"), | ||
"transform-new-target": require("@babel/plugin-transform-new-target"), | ||
"transform-object-assign": require("@babel/plugin-transform-object-assign"), | ||
"proposal-object-rest-spread": require("@babel/plugin-proposal-object-rest-spread"), | ||
"transform-object-set-prototype-of-to-assign": require("@babel/plugin-transform-object-set-prototype-of-to-assign"), | ||
"proposal-optional-catch-binding": require("@babel/plugin-proposal-optional-catch-binding"), | ||
"transform-proto-to-assign": require("@babel/plugin-transform-proto-to-assign"), | ||
"transform-react-constant-elements": require("@babel/plugin-transform-react-constant-elements"), | ||
"transform-react-display-name": require("@babel/plugin-transform-react-display-name"), | ||
"transform-react-inline-elements": require("@babel/plugin-transform-react-inline-elements"), | ||
"transform-react-jsx": require("@babel/plugin-transform-react-jsx"), | ||
"transform-react-jsx-compat": require("@babel/plugin-transform-react-jsx-compat"), | ||
"transform-react-jsx-self": require("@babel/plugin-transform-react-jsx-self"), | ||
"transform-react-jsx-source": require("@babel/plugin-transform-react-jsx-source"), | ||
"transform-regenerator": require("@babel/plugin-transform-regenerator"), | ||
"transform-runtime": require("@babel/plugin-transform-runtime"), | ||
"transform-strict-mode": require("@babel/plugin-transform-strict-mode"), | ||
"proposal-unicode-property-regex": require("@babel/plugin-proposal-unicode-property-regex"), | ||
}); | ||
registerPlugins(all); | ||
@@ -232,3 +173,3 @@ // All the presets we should bundle | ||
registerPresets({ | ||
es2015: require("./preset-es2015"), | ||
es2015: preset2015, | ||
es2016: () => { | ||
@@ -244,18 +185,19 @@ return { | ||
}, | ||
react: require("@babel/preset-react"), | ||
"stage-0": require("./preset-stage-0"), | ||
"stage-1": require("./preset-stage-1"), | ||
"stage-2": require("./preset-stage-2"), | ||
"stage-3": require("./preset-stage-3"), | ||
react: presetReact, | ||
"stage-0": presetStage0, | ||
"stage-1": presetStage1, | ||
"stage-2": presetStage2, | ||
"stage-3": presetStage3, | ||
"es2015-loose": { | ||
presets: [[require("./preset-es2015"), { loose: true }]], | ||
presets: [[preset2015, { loose: true }]], | ||
}, | ||
// ES2015 preset with es2015-modules-commonjs removed | ||
"es2015-no-commonjs": { | ||
presets: [[require("./preset-es2015"), { modules: false }]], | ||
presets: [[preset2015, { modules: false }]], | ||
}, | ||
typescript: require("@babel/preset-typescript"), | ||
flow: require("@babel/preset-flow"), | ||
typescript: presetTypescript, | ||
flow: presetFlow, | ||
}); | ||
// $FlowIgnore | ||
export const version = VERSION; | ||
@@ -277,3 +219,3 @@ | ||
*/ | ||
export function transformScriptTags(scriptTags) { | ||
export function transformScriptTags(scriptTags?: Array<any>) { | ||
runScripts(transform, scriptTags); | ||
@@ -280,0 +222,0 @@ } |
@@ -1,27 +0,5 @@ | ||
import transformES2015TemplateLiterals from "@babel/plugin-transform-template-literals"; | ||
import transformES2015Literals from "@babel/plugin-transform-literals"; | ||
import transformES2015FunctionName from "@babel/plugin-transform-function-name"; | ||
import transformES2015ArrowFunctions from "@babel/plugin-transform-arrow-functions"; | ||
import transformES2015BlockScopedFunctions from "@babel/plugin-transform-block-scoped-functions"; | ||
import transformES2015Classes from "@babel/plugin-transform-classes"; | ||
import transformES2015ObjectSuper from "@babel/plugin-transform-object-super"; | ||
import transformES2015ShorthandProperties from "@babel/plugin-transform-shorthand-properties"; | ||
import transformES2015DuplicateKeys from "@babel/plugin-transform-duplicate-keys"; | ||
import transformES2015ComputedProperties from "@babel/plugin-transform-computed-properties"; | ||
import transformES2015ForOf from "@babel/plugin-transform-for-of"; | ||
import transformES2015StickyRegex from "@babel/plugin-transform-sticky-regex"; | ||
import transformES2015UnicodeRegex from "@babel/plugin-transform-unicode-regex"; | ||
import transformES2015Spread from "@babel/plugin-transform-spread"; | ||
import transformES2015Parameters from "@babel/plugin-transform-parameters"; | ||
import transformES2015Destructuring from "@babel/plugin-transform-destructuring"; | ||
import transformES2015BlockScoping from "@babel/plugin-transform-block-scoping"; | ||
import transformES2015TypeofSymbol from "@babel/plugin-transform-typeof-symbol"; | ||
import transformES2015ModulesCommonJS from "@babel/plugin-transform-modules-commonjs"; | ||
import transformES2015ModulesSystemJS from "@babel/plugin-transform-modules-systemjs"; | ||
import transformES2015ModulesAMD from "@babel/plugin-transform-modules-amd"; | ||
import transformES2015ModulesUMD from "@babel/plugin-transform-modules-umd"; | ||
import transformES2015Instanceof from "@babel/plugin-transform-instanceof"; | ||
import transformRegenerator from "@babel/plugin-transform-regenerator"; | ||
// @flow | ||
import * as babelPlugins from "./generated/plugins"; | ||
export default (_, opts) => { | ||
export default (_: any, opts: Object): Object => { | ||
let loose = false; | ||
@@ -42,31 +20,37 @@ let modules = "commonjs"; | ||
plugins: [ | ||
[transformES2015TemplateLiterals, { loose, spec }], | ||
transformES2015Literals, | ||
transformES2015FunctionName, | ||
[transformES2015ArrowFunctions, { spec }], | ||
transformES2015BlockScopedFunctions, | ||
[transformES2015Classes, optsLoose], | ||
transformES2015ObjectSuper, | ||
transformES2015ShorthandProperties, | ||
transformES2015DuplicateKeys, | ||
[transformES2015ComputedProperties, optsLoose], | ||
[transformES2015ForOf, optsLoose], | ||
transformES2015StickyRegex, | ||
transformES2015UnicodeRegex, | ||
[transformES2015Spread, optsLoose], | ||
[transformES2015Parameters, optsLoose], | ||
[transformES2015Destructuring, optsLoose], | ||
transformES2015BlockScoping, | ||
transformES2015TypeofSymbol, | ||
transformES2015Instanceof, | ||
[babelPlugins.transformTemplateLiterals, { loose, spec }], | ||
babelPlugins.transformLiterals, | ||
babelPlugins.transformFunctionName, | ||
[babelPlugins.transformArrowFunctions, { spec }], | ||
babelPlugins.transformBlockScopedFunctions, | ||
[babelPlugins.transformClasses, optsLoose], | ||
babelPlugins.transformObjectSuper, | ||
babelPlugins.transformShorthandProperties, | ||
babelPlugins.transformDuplicateKeys, | ||
[babelPlugins.transformComputedProperties, optsLoose], | ||
[babelPlugins.transformForOf, optsLoose], | ||
babelPlugins.transformStickyRegex, | ||
babelPlugins.transformUnicodeRegex, | ||
[babelPlugins.transformSpread, optsLoose], | ||
[babelPlugins.transformParameters, optsLoose], | ||
[babelPlugins.transformDestructuring, optsLoose], | ||
babelPlugins.transformBlockScoping, | ||
babelPlugins.transformTypeofSymbol, | ||
babelPlugins.transformInstanceof, | ||
(modules === "commonjs" || modules === "cjs") && [ | ||
transformES2015ModulesCommonJS, | ||
babelPlugins.transformModulesCommonjs, | ||
optsLoose, | ||
], | ||
modules === "systemjs" && [transformES2015ModulesSystemJS, optsLoose], | ||
modules === "amd" && [transformES2015ModulesAMD, optsLoose], | ||
modules === "umd" && [transformES2015ModulesUMD, optsLoose], | ||
[transformRegenerator, { async: false, asyncGenerators: false }], | ||
modules === "systemjs" && [ | ||
babelPlugins.transformModulesSystemjs, | ||
optsLoose, | ||
], | ||
modules === "amd" && [babelPlugins.transformModulesAmd, optsLoose], | ||
modules === "umd" && [babelPlugins.transformModulesUmd, optsLoose], | ||
[ | ||
babelPlugins.transformRegenerator, | ||
{ async: false, asyncGenerators: false }, | ||
], | ||
].filter(Boolean), // filter out falsy values | ||
}; | ||
}; |
@@ -0,6 +1,6 @@ | ||
// @flow | ||
import presetStage1 from "./preset-stage-1"; | ||
import { proposalFunctionBind } from "./generated/plugins"; | ||
import transformFunctionBind from "@babel/plugin-proposal-function-bind"; | ||
export default (_, opts = {}) => { | ||
export default (_: any, opts: Object = {}) => { | ||
const { | ||
@@ -27,4 +27,4 @@ loose = false, | ||
], | ||
plugins: [transformFunctionBind], | ||
plugins: [proposalFunctionBind], | ||
}; | ||
}; |
@@ -0,11 +1,6 @@ | ||
// @flow | ||
import presetStage2 from "./preset-stage-2"; | ||
import * as babelPlugins from "./generated/plugins"; | ||
import transformExportDefaultFrom from "@babel/plugin-proposal-export-default-from"; | ||
import transformLogicalAssignmentOperators from "@babel/plugin-proposal-logical-assignment-operators"; | ||
import transformOptionalChaining from "@babel/plugin-proposal-optional-chaining"; | ||
import transformPipelineOperator from "@babel/plugin-proposal-pipeline-operator"; | ||
import transformNullishCoalescingOperator from "@babel/plugin-proposal-nullish-coalescing-operator"; | ||
import transformDoExpressions from "@babel/plugin-proposal-do-expressions"; | ||
export default (_, opts = {}) => { | ||
export default (_: any, opts: Object = {}) => { | ||
const { | ||
@@ -27,10 +22,10 @@ loose = false, | ||
plugins: [ | ||
transformExportDefaultFrom, | ||
transformLogicalAssignmentOperators, | ||
[transformOptionalChaining, { loose }], | ||
[transformPipelineOperator, { proposal: pipelineProposal }], | ||
[transformNullishCoalescingOperator, { loose }], | ||
transformDoExpressions, | ||
babelPlugins.proposalExportDefaultFrom, | ||
babelPlugins.proposalLogicalAssignmentOperators, | ||
[babelPlugins.proposalOptionalChaining, { loose }], | ||
[babelPlugins.proposalPipelineOperator, { proposal: pipelineProposal }], | ||
[babelPlugins.proposalNullishCoalescingOperator, { loose }], | ||
babelPlugins.proposalDoExpressions, | ||
], | ||
}; | ||
}; |
@@ -0,10 +1,6 @@ | ||
// @flow | ||
import presetStage3 from "./preset-stage-3"; | ||
import * as babelPlugins from "./generated/plugins"; | ||
import transformDecorators from "@babel/plugin-proposal-decorators"; | ||
import transformFunctionSent from "@babel/plugin-proposal-function-sent"; | ||
import transformExportNamespaceFrom from "@babel/plugin-proposal-export-namespace-from"; | ||
import transformNumericSeparator from "@babel/plugin-proposal-numeric-separator"; | ||
import transformThrowExpressions from "@babel/plugin-proposal-throw-expressions"; | ||
export default (_, opts = {}) => { | ||
export default (_: any, opts: Object = {}) => { | ||
const { | ||
@@ -21,11 +17,11 @@ loose = false, | ||
[ | ||
transformDecorators, | ||
babelPlugins.proposalDecorators, | ||
{ legacy: decoratorsLegacy, decoratorsBeforeExport }, | ||
], | ||
transformFunctionSent, | ||
transformExportNamespaceFrom, | ||
transformNumericSeparator, | ||
transformThrowExpressions, | ||
babelPlugins.proposalFunctionSent, | ||
babelPlugins.proposalExportNamespaceFrom, | ||
babelPlugins.proposalNumericSeparator, | ||
babelPlugins.proposalThrowExpressions, | ||
], | ||
}; | ||
}; |
@@ -1,8 +0,5 @@ | ||
import syntaxDynamicImport from "@babel/plugin-syntax-dynamic-import"; | ||
import syntaxImportMeta from "@babel/plugin-syntax-import-meta"; | ||
import transformClassProperties from "@babel/plugin-proposal-class-properties"; | ||
import transformJsonStrings from "@babel/plugin-proposal-json-strings"; | ||
import transformPrivateMethods from "@babel/plugin-proposal-private-methods"; | ||
// @flow | ||
import * as babelPlugins from "./generated/plugins"; | ||
export default (_, opts) => { | ||
export default (_: any, opts: Object) => { | ||
let loose = false; | ||
@@ -16,9 +13,9 @@ | ||
plugins: [ | ||
syntaxDynamicImport, | ||
syntaxImportMeta, | ||
[transformClassProperties, { loose }], | ||
transformJsonStrings, | ||
[transformPrivateMethods, { loose }], | ||
babelPlugins.syntaxDynamicImport, | ||
babelPlugins.syntaxImportMeta, | ||
[babelPlugins.proposalClassProperties, { loose }], | ||
babelPlugins.proposalJsonStrings, | ||
[babelPlugins.proposalPrivateMethods, { loose }], | ||
], | ||
}; | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
4604271
14
74036