Compare commits
20 Commits
v7.0.0-bet
...
v7.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6695f5e2f7 | ||
|
|
86ce2e4e0d | ||
|
|
8cffbbae75 | ||
|
|
cb51704745 | ||
|
|
a8224d40e2 | ||
|
|
3210a7a873 | ||
|
|
9c598a8e28 | ||
|
|
a149466001 | ||
|
|
ec8330870e | ||
|
|
363c5923f0 | ||
|
|
8173b6e694 | ||
|
|
e2d64f146c | ||
|
|
9392783738 | ||
|
|
810b7916c2 | ||
|
|
eb0e999987 | ||
|
|
5c728ea609 | ||
|
|
b8f9ebf638 | ||
|
|
55ca90b3fc | ||
|
|
1a0fe993f5 | ||
|
|
02760d0f70 |
@@ -4,8 +4,9 @@
|
||||
package.json
|
||||
lerna.json
|
||||
packages/babel-runtime
|
||||
!packages/babel-runtime/scripts
|
||||
!packages/babel-runtime/core-js.js
|
||||
!packages/babel-plugin-transform-runtime/scripts
|
||||
!packages/babel-runtime-corejs2/core-js.js
|
||||
packages/babel-runtime-corejs2
|
||||
packages/*/node_modules
|
||||
packages/*/lib
|
||||
packages/*/dist
|
||||
|
||||
31
.gitignore
vendored
31
.gitignore
vendored
@@ -12,24 +12,27 @@ coverage
|
||||
dist
|
||||
/.package.json
|
||||
package-lock.json
|
||||
/packages/babel-runtime/core-js/**/*.js
|
||||
!/packages/babel-runtime/core-js/map.js
|
||||
|
||||
/packages/babel-runtime/helpers/*.js
|
||||
!/packages/babel-runtime/helpers/toArray.js
|
||||
!/packages/babel-runtime/helpers/iterableToArray.js
|
||||
!/packages/babel-runtime/helpers/temporalRef.js
|
||||
/packages/babel-runtime/helpers/builtin/*.js
|
||||
!/packages/babel-runtime/helpers/builtin/toArray.js
|
||||
!/packages/babel-runtime/helpers/builtin/iterableToArray.js
|
||||
!/packages/babel-runtime/helpers/builtin/temporalRef.js
|
||||
/packages/babel-runtime/helpers/builtin/es6/*.js
|
||||
!/packages/babel-runtime/helpers/builtin/es6/toArray.js
|
||||
!/packages/babel-runtime/helpers/builtin/es6/iterableToArray.js
|
||||
!/packages/babel-runtime/helpers/builtin/es6/temporalRef.js
|
||||
/packages/babel-runtime/helpers/es6/*.js
|
||||
!/packages/babel-runtime/helpers/es6/toArray.js
|
||||
!/packages/babel-runtime/helpers/es6/iterableToArray.js
|
||||
!/packages/babel-runtime/helpers/es6/temporalRef.js
|
||||
/packages/babel-runtime/helpers/esm/*.js
|
||||
!/packages/babel-runtime/helpers/esm/toArray.js
|
||||
!/packages/babel-runtime/helpers/esm/iterableToArray.js
|
||||
!/packages/babel-runtime/helpers/esm/temporalRef.js
|
||||
|
||||
/packages/babel-runtime-corejs2/helpers/*.js
|
||||
!/packages/babel-runtime-corejs2/helpers/toArray.js
|
||||
!/packages/babel-runtime-corejs2/helpers/iterableToArray.js
|
||||
!/packages/babel-runtime-corejs2/helpers/temporalRef.js
|
||||
/packages/babel-runtime-corejs2/helpers/esm/*.js
|
||||
!/packages/babel-runtime-corejs2/helpers/esm/toArray.js
|
||||
!/packages/babel-runtime-corejs2/helpers/esm/iterableToArray.js
|
||||
!/packages/babel-runtime-corejs2/helpers/esm/temporalRef.js
|
||||
/packages/babel-runtime-corejs2/core-js/**/*.js
|
||||
!/packages/babel-runtime-corejs2/core-js/map.js
|
||||
|
||||
/packages/babel-register/test/.babel
|
||||
/packages/babel-cli/test/tmp
|
||||
/packages/babel-node/test/tmp
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
contributors and maintainers pledge to make participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
|
||||
@@ -186,7 +186,7 @@ For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https:/
|
||||
- If you need to expect an error, you can ignore creating the `output.js` file and pass a new `throws` key to the `options.json` that contains the error string that is created.
|
||||
- The second and preferred type is a test that actually evaluates the produced code and asserts that certain properties are true or false. We do this by creating an [`exec.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/comprehensive/exec.js) file.
|
||||
|
||||
In a fixture test, you simply write out the code you want transformed in `input.js`.
|
||||
In a fixture test, you simply write out the code you want to transform in `input.js`.
|
||||
|
||||
```js
|
||||
// input.js
|
||||
|
||||
9
Makefile
9
Makefile
@@ -1,5 +1,5 @@
|
||||
MAKEFLAGS = -j1
|
||||
FLOW_COMMIT = 395e045c18d537fcbbc552a96ef2cdcd70b4ab52
|
||||
FLOW_COMMIT = bea8b83f50f597454941d2a7ecef6e93a881e576
|
||||
TEST262_COMMIT = f90a52b39609a620c0854e0bd0b3a906c930fd17
|
||||
|
||||
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
|
||||
@@ -31,7 +31,7 @@ build-preset-env-standalone:
|
||||
build-dist: build
|
||||
cd packages/babel-polyfill; \
|
||||
scripts/build-dist.sh
|
||||
cd packages/babel-runtime; \
|
||||
cd packages/babel-plugin-transform-runtime; \
|
||||
node scripts/build-dist.js
|
||||
|
||||
watch: clean clean-lib
|
||||
@@ -108,7 +108,8 @@ publish:
|
||||
git pull --rebase
|
||||
make clean-lib
|
||||
rm -rf packages/babel-runtime/helpers
|
||||
rm -rf packages/babel-runtime/core-js
|
||||
rm -rf packages/babel-runtime-corejs2/helpers
|
||||
rm -rf packages/babel-runtime-corejs2/core-js
|
||||
BABEL_ENV=production make build-dist
|
||||
make test
|
||||
# not using lerna independent mode atm, so only update packages that have changed since we use ^
|
||||
@@ -120,7 +121,7 @@ bootstrap: clean-all
|
||||
yarn --ignore-engines
|
||||
./node_modules/.bin/lerna bootstrap -- --ignore-engines
|
||||
make build
|
||||
cd packages/babel-runtime; \
|
||||
cd packages/babel-plugin-transform-runtime; \
|
||||
node scripts/build-dist.js
|
||||
|
||||
clean-lib:
|
||||
|
||||
@@ -13,13 +13,18 @@ module.exports = function(api) {
|
||||
|
||||
let convertESM = true;
|
||||
let ignoreLib = true;
|
||||
let includeRuntime = false;
|
||||
|
||||
switch (env) {
|
||||
// Configs used during bundling builds.
|
||||
case "babel-parser":
|
||||
convertESM = false;
|
||||
ignoreLib = false;
|
||||
break;
|
||||
case "standalone":
|
||||
convertESM = false;
|
||||
ignoreLib = false;
|
||||
includeRuntime = true;
|
||||
break;
|
||||
case "production":
|
||||
// Config during builds before publish.
|
||||
@@ -41,6 +46,10 @@ module.exports = function(api) {
|
||||
}
|
||||
|
||||
const config = {
|
||||
// Our dependencies are all standard CommonJS, along with all sorts of
|
||||
// other random files in Babel's codebase, so we use script as the default,
|
||||
// and then mark actual modules as modules farther down.
|
||||
sourceType: "script",
|
||||
comments: false,
|
||||
ignore: [
|
||||
// These may not be strictly necessary with the newly-limited scope of
|
||||
@@ -84,7 +93,29 @@ module.exports = function(api) {
|
||||
convertESM ? "@babel/transform-modules-commonjs" : null,
|
||||
].filter(Boolean),
|
||||
},
|
||||
],
|
||||
{
|
||||
// The vast majority of our src files are modules, but we use
|
||||
// unambiguous to keep things simple until we get around to renaming
|
||||
// the modules to be more easily distinguished from CommonJS
|
||||
test: [
|
||||
"packages/*/src",
|
||||
"packages/*/test",
|
||||
"codemods/*/src",
|
||||
"codemods/*/test",
|
||||
],
|
||||
sourceType: "unambiguous",
|
||||
},
|
||||
{
|
||||
// The runtime transform shouldn't process its own runtime or core-js.
|
||||
exclude: [
|
||||
"packages/babel-runtime",
|
||||
/[\\/]node_modules[\\/](?:@babel\/runtime|babel-runtime|core-js)[\\/]/,
|
||||
],
|
||||
plugins: [includeRuntime ? "@babel/transform-runtime" : null].filter(
|
||||
Boolean
|
||||
),
|
||||
},
|
||||
].filter(Boolean),
|
||||
};
|
||||
|
||||
// we need to do this as long as we do not test everything from source
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-codemod-object-assign-to-object-spread",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Transforms Object.assign into object spread syntax",
|
||||
"repository": "https://github.com/babel/babel/tree/master/codemods/babel-plugin-codemod-object-assign-to-object-spread",
|
||||
"license": "MIT",
|
||||
@@ -10,14 +10,14 @@
|
||||
"@babel/plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.55"
|
||||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-codemod-optional-catch-binding",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Remove unused catch bindings",
|
||||
"repository": "https://github.com/babel/babel/tree/master/codemods/babel-plugin-codemod-remove-unused-catch-binding",
|
||||
"license": "MIT",
|
||||
@@ -10,13 +10,13 @@
|
||||
"@babel/plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.55"
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"lerna": "2.11.0",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"changelog": {
|
||||
"repo": "babel/babel",
|
||||
"cacheDir": ".changelog",
|
||||
|
||||
@@ -32,6 +32,20 @@ declare module "lodash/merge" {
|
||||
declare export default <T: Object>(T, Object) => T;
|
||||
}
|
||||
|
||||
declare module "semver" {
|
||||
declare module.exports: {
|
||||
valid(v: string): boolean;
|
||||
gt(v1: string, v2: string): boolean;
|
||||
lt(v1: string, v2: string): boolean;
|
||||
major(v: string): number;
|
||||
minor(v: string): number;
|
||||
patch(v: string): number;
|
||||
satisfies(v1: string, r1: string): boolean;
|
||||
|
||||
intersects(r1: string, r2: string): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "source-map" {
|
||||
declare export type SourceMap = {
|
||||
version: 3,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.0.0-beta.52",
|
||||
"@babel/core": "7.0.0-beta.52",
|
||||
"@babel/plugin-transform-runtime": "7.0.0-beta.52",
|
||||
"@babel/plugin-proposal-class-properties": "7.0.0-beta.52",
|
||||
"@babel/plugin-proposal-export-namespace-from": "7.0.0-beta.52",
|
||||
"@babel/plugin-proposal-numeric-separator": "7.0.0-beta.52",
|
||||
@@ -19,6 +20,7 @@
|
||||
"@babel/preset-env": "7.0.0-beta.52",
|
||||
"@babel/preset-flow": "7.0.0-beta.52",
|
||||
"@babel/register": "7.0.0-beta.52",
|
||||
"@babel/runtime": "7.0.0-beta.52",
|
||||
"babel-core": "^7.0.0-0",
|
||||
"babel-eslint": "^8.2.6",
|
||||
"babel-jest": "^23.4.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/cli",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel command line.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -33,8 +33,8 @@
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.56"
|
||||
},
|
||||
"bin": {
|
||||
"babel": "./bin/babel.js",
|
||||
|
||||
@@ -89,7 +89,7 @@ export default async function({ cliOptions, babelOptions }) {
|
||||
|
||||
const stat = fs.statSync(filenameOrDir);
|
||||
|
||||
if (stat.isDirectory(filenameOrDir)) {
|
||||
if (stat.isDirectory()) {
|
||||
const dirname = filenameOrDir;
|
||||
|
||||
let count = 0;
|
||||
|
||||
@@ -15,11 +15,15 @@ export function readdir(
|
||||
includeDotfiles: boolean,
|
||||
filter: ReaddirFilter,
|
||||
) {
|
||||
return readdirRecursive(
|
||||
dirname,
|
||||
filename =>
|
||||
(includeDotfiles || filename[0] !== ".") && (!filter || filter(filename)),
|
||||
);
|
||||
return readdirRecursive(dirname, (filename, _index, currentDirectory) => {
|
||||
const stat = fs.statSync(path.join(currentDirectory, filename));
|
||||
|
||||
if (stat.isDirectory()) return true;
|
||||
|
||||
return (
|
||||
(includeDotfiles || filename[0] !== ".") && (!filter || filter(filename))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function readdirForCompilable(
|
||||
|
||||
1
packages/babel-cli/test/fixtures/babel/dir --out-file/in-files/src/bar/bar.js
vendored
Normal file
1
packages/babel-cli/test/fixtures/babel/dir --out-file/in-files/src/bar/bar.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(() => 42)
|
||||
1
packages/babel-cli/test/fixtures/babel/dir --out-file/in-files/src/foo.js
vendored
Normal file
1
packages/babel-cli/test/fixtures/babel/dir --out-file/in-files/src/foo.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
arr.map(x => x * MULTIPLIER);
|
||||
3
packages/babel-cli/test/fixtures/babel/dir --out-file/options.json
vendored
Normal file
3
packages/babel-cli/test/fixtures/babel/dir --out-file/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"args": ["src", "--out-file", "test.js"]
|
||||
}
|
||||
10
packages/babel-cli/test/fixtures/babel/dir --out-file/out-files/test.js
vendored
Normal file
10
packages/babel-cli/test/fixtures/babel/dir --out-file/out-files/test.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
(function () {
|
||||
return 42;
|
||||
});
|
||||
"use strict";
|
||||
|
||||
arr.map(function (x) {
|
||||
return x * MULTIPLIER;
|
||||
});
|
||||
0
packages/babel-cli/test/fixtures/babel/dir --out-file/stdout.txt
vendored
Normal file
0
packages/babel-cli/test/fixtures/babel/dir --out-file/stdout.txt
vendored
Normal file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/code-frame",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,7 +8,7 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/highlight": "7.0.0-beta.55"
|
||||
"@babel/highlight": "7.0.0-beta.56"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chalk": "^2.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/core",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel compiler core.",
|
||||
"main": "lib/index.js",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
@@ -30,13 +30,13 @@
|
||||
"./lib/transform-file.js": "./lib/transform-file-browser.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "7.0.0-beta.55",
|
||||
"@babel/generator": "7.0.0-beta.55",
|
||||
"@babel/helpers": "7.0.0-beta.55",
|
||||
"@babel/parser": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/code-frame": "7.0.0-beta.56",
|
||||
"@babel/generator": "7.0.0-beta.56",
|
||||
"@babel/helpers": "7.0.0-beta.56",
|
||||
"@babel/parser": "7.0.0-beta.56",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"convert-source-map": "^1.1.0",
|
||||
"debug": "^3.1.0",
|
||||
"json5": "^0.5.0",
|
||||
@@ -46,7 +46,7 @@
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.55",
|
||||
"@babel/register": "7.0.0-beta.55"
|
||||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.56",
|
||||
"@babel/register": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { NodePath, Hub, Scope } from "@babel/traverse";
|
||||
import { codeFrameColumns } from "@babel/code-frame";
|
||||
import traverse from "@babel/traverse";
|
||||
import * as t from "@babel/types";
|
||||
import semver from "semver";
|
||||
|
||||
import type { NormalizedFile } from "../normalize-file";
|
||||
|
||||
@@ -64,6 +65,16 @@ export default class File {
|
||||
}
|
||||
|
||||
set(key: mixed, val: mixed) {
|
||||
if (key === "helpersNamespace") {
|
||||
throw new Error(
|
||||
"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." +
|
||||
"If you are using @babel/plugin-external-helpers you will need to use a newer " +
|
||||
"version than the one you currently have installed. " +
|
||||
"If you have your own implementation, you'll want to explore using 'helperGenerator' " +
|
||||
"alongside 'file.availableHelper()'.",
|
||||
);
|
||||
}
|
||||
|
||||
this._map.set(key, val);
|
||||
}
|
||||
|
||||
@@ -136,17 +147,38 @@ export default class File {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given helper is available in @babel/core's helper list.
|
||||
*
|
||||
* This _also_ allows you to pass a Babel version specifically. If the
|
||||
* helper exists, but was not available for the full given range, it will be
|
||||
* considered unavailable.
|
||||
*/
|
||||
availableHelper(name: string, versionRange: ?string) {
|
||||
let minVersion;
|
||||
try {
|
||||
minVersion = helpers.minVersion(name);
|
||||
} catch (err) {
|
||||
if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return (
|
||||
typeof versionRange !== "string" ||
|
||||
(!semver.intersects(`<${minVersion}`, versionRange) &&
|
||||
!semver.intersects(`>=8.0.0`, versionRange))
|
||||
);
|
||||
}
|
||||
|
||||
addHelper(name: string): Object {
|
||||
const declar = this.declarations[name];
|
||||
if (declar) return t.cloneNode(declar);
|
||||
|
||||
const generator = this.get("helperGenerator");
|
||||
const runtime = this.get("helpersNamespace");
|
||||
if (generator) {
|
||||
const res = generator(name);
|
||||
if (res) return res;
|
||||
} else if (runtime) {
|
||||
return t.memberExpression(t.cloneNode(runtime), t.identifier(name));
|
||||
}
|
||||
|
||||
const uid = (this.declarations[name] = this.scope.generateUidIdentifier(
|
||||
|
||||
@@ -31,6 +31,10 @@ export default class PluginPass {
|
||||
return this._map.get(key);
|
||||
}
|
||||
|
||||
availableHelper(name: string, versionRange: ?string) {
|
||||
return this.file.availableHelper(name, versionRange);
|
||||
}
|
||||
|
||||
addHelper(name: string) {
|
||||
return this.file.addHelper(name);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/generator",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Turns an AST into code.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -11,14 +11,14 @@
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"jsesc": "^2.5.1",
|
||||
"lodash": "^4.17.10",
|
||||
"source-map": "^0.5.0",
|
||||
"trim-right": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/helper-fixtures": "7.0.0-beta.55",
|
||||
"@babel/parser": "7.0.0-beta.55"
|
||||
"@babel/helper-fixtures": "7.0.0-beta.56",
|
||||
"@babel/parser": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ export function ClassPrivateProperty(node: Object) {
|
||||
this.space();
|
||||
}
|
||||
this.print(node.key, node);
|
||||
this.print(node.typeAnnotation, node);
|
||||
if (node.value) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
|
||||
@@ -72,6 +72,10 @@ class Foo {
|
||||
static prop1: string;
|
||||
prop2: number;
|
||||
}
|
||||
class Foo {
|
||||
#prop1: string;
|
||||
prop2: number;
|
||||
}
|
||||
var x: number | string = 4;
|
||||
class Array { concat(items:number | string) {}; }
|
||||
var x: () => number | () => string = fn;
|
||||
|
||||
1
packages/babel-generator/test/fixtures/flow/type-annotations/options.json
vendored
Normal file
1
packages/babel-generator/test/fixtures/flow/type-annotations/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "plugins": ["classPrivateProperties", "flow"] }
|
||||
@@ -168,6 +168,11 @@ class Foo {
|
||||
prop2: number;
|
||||
}
|
||||
|
||||
class Foo {
|
||||
#prop1: string;
|
||||
prop2: number;
|
||||
}
|
||||
|
||||
var x: number | string = 4;
|
||||
|
||||
class Array {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-annotate-as-pure",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@babel/helper-bindify-decorators",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to bindify decorators",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-bindify-decorators",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@babel/helper-builder-binary-assignment-operator-visitor",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to build binary assignment operator visitors",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-binary-assignment-operator-visitor",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-explode-assignable-expression": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-explode-assignable-expression": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@babel/helper-builder-react-jsx",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to build react jsx",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"esutils": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@babel/helper-call-delegate",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to call delegate",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-call-delegate",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-hoist-variables": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-hoist-variables": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@babel/helper-define-map",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to define a map",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-define-map",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-function-name": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/helper-function-name": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"lodash": "^4.17.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@babel/helper-explode-assignable-expression",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to explode an assignable expression",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-assignable-expression",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@babel/helper-explode-class",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to explode class",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-class",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-bindify-decorators": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-bindify-decorators": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-fixtures",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to support fixtures",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@babel/helper-function-name",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to change the property 'name' of every function",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-get-function-arity": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-get-function-arity": "7.0.0-beta.56",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-get-function-arity",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to get function arity",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-hoist-variables",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to hoist variables",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-hoist-variables",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@babel/helper-member-expression-to-functions",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to replace certain member expressions with function calls",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-member-expression-to-functions",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-module-imports",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel helper functions for inserting module loads",
|
||||
"author": "Logan Smyth <loganfsmyth@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,10 +8,10 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-module-imports",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"lodash": "^4.17.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,12 @@ function test(sourceType, opts, initializer, expectedCode) {
|
||||
function({ types: t }) {
|
||||
return {
|
||||
pre(file) {
|
||||
file.set("helpersNamespace", t.identifier("babelHelpers"));
|
||||
file.set("helperGenerator", name =>
|
||||
t.memberExpression(
|
||||
t.identifier("babelHelpers"),
|
||||
t.identifier(name),
|
||||
),
|
||||
);
|
||||
},
|
||||
visitor: {
|
||||
Program(path) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-module-transforms",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel helper functions for implementing ES6 module transformations",
|
||||
"author": "Logan Smyth <loganfsmyth@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,11 +8,11 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-module-transforms",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "7.0.0-beta.55",
|
||||
"@babel/helper-simple-access": "7.0.0-beta.55",
|
||||
"@babel/helper-split-export-declaration": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/helper-module-imports": "7.0.0-beta.56",
|
||||
"@babel/helper-simple-access": "7.0.0-beta.56",
|
||||
"@babel/helper-split-export-declaration": "7.0.0-beta.56",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"lodash": "^4.17.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-optimise-call-expression",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to optimise call expression",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-optimise-call-expression",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-plugin-test-runner",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to support test runner",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-test-runner",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.55"
|
||||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-plugin-utils",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "General utilities for plugins to use",
|
||||
"author": "Logan Smyth <loganfsmyth@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-regex",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to check for literal RegEx",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-regex",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@babel/helper-remap-async-to-generator",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to remap async functions to generators",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "7.0.0-beta.55",
|
||||
"@babel/helper-wrap-function": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-annotate-as-pure": "7.0.0-beta.56",
|
||||
"@babel/helper-wrap-function": "7.0.0-beta.56",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@babel/helper-replace-supers",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper function to replace supers",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-member-expression-to-functions": "7.0.0-beta.55",
|
||||
"@babel/helper-optimise-call-expression": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-member-expression-to-functions": "7.0.0-beta.56",
|
||||
"@babel/helper-optimise-call-expression": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-simple-access",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel helper for ensuring that access to a given value is performed through simple accesses",
|
||||
"author": "Logan Smyth <loganfsmyth@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,8 +8,8 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-simple-access",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56",
|
||||
"lodash": "^4.17.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@babel/helper-split-export-declaration",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-transform-fixture-test-runner",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Transform test runner for @babel/helper-fixtures module",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,10 +8,10 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-transform-fixture-test-runner",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "7.0.0-beta.55",
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.55",
|
||||
"@babel/polyfill": "7.0.0-beta.55",
|
||||
"@babel/code-frame": "7.0.0-beta.56",
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.56",
|
||||
"@babel/polyfill": "7.0.0-beta.56",
|
||||
"jest": "^22.4.2",
|
||||
"jest-diff": "^22.4.0",
|
||||
"lodash": "^4.17.10",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@babel/helper-wrap-function",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Helper to wrap functions inside a function call.",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-wrap-function",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-function-name": "7.0.0-beta.55",
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/helper-function-name": "7.0.0-beta.56",
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helpers",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Collection of helper functions used by Babel transforms.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -8,11 +8,11 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helpers",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/template": "7.0.0-beta.55",
|
||||
"@babel/traverse": "7.0.0-beta.55",
|
||||
"@babel/types": "7.0.0-beta.55"
|
||||
"@babel/template": "7.0.0-beta.56",
|
||||
"@babel/traverse": "7.0.0-beta.56",
|
||||
"@babel/types": "7.0.0-beta.56"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
// @flow
|
||||
|
||||
import template from "@babel/template";
|
||||
|
||||
const helpers = {};
|
||||
const helpers = Object.create(null);
|
||||
export default helpers;
|
||||
|
||||
helpers.typeof = () => template.program.ast`
|
||||
const helper = (minVersion: string) => tpl => ({
|
||||
minVersion,
|
||||
ast: () => template.program.ast(tpl),
|
||||
});
|
||||
|
||||
helpers.typeof = helper("7.0.0-beta.0")`
|
||||
export default function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function (obj) { return typeof obj; };
|
||||
@@ -19,7 +26,7 @@ helpers.typeof = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.jsx = () => template.program.ast`
|
||||
helpers.jsx = helper("7.0.0-beta.0")`
|
||||
var REACT_ELEMENT_TYPE;
|
||||
|
||||
export default function _createRawReactElement(type, props, key, children) {
|
||||
@@ -70,7 +77,7 @@ helpers.jsx = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.asyncIterator = () => template.program.ast`
|
||||
helpers.asyncIterator = helper("7.0.0-beta.0")`
|
||||
export default function _asyncIterator(iterable) {
|
||||
var method
|
||||
if (typeof Symbol === "function") {
|
||||
@@ -87,13 +94,13 @@ helpers.asyncIterator = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.AwaitValue = () => template.program.ast`
|
||||
helpers.AwaitValue = helper("7.0.0-beta.0")`
|
||||
export default function _AwaitValue(value) {
|
||||
this.wrapped = value;
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.AsyncGenerator = () => template.program.ast`
|
||||
helpers.AsyncGenerator = helper("7.0.0-beta.0")`
|
||||
import AwaitValue from "AwaitValue";
|
||||
|
||||
export default function AsyncGenerator(gen) {
|
||||
@@ -177,7 +184,7 @@ helpers.AsyncGenerator = () => template.program.ast`
|
||||
AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };
|
||||
`;
|
||||
|
||||
helpers.wrapAsyncGenerator = () => template.program.ast`
|
||||
helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")`
|
||||
import AsyncGenerator from "AsyncGenerator";
|
||||
|
||||
export default function _wrapAsyncGenerator(fn) {
|
||||
@@ -187,7 +194,7 @@ helpers.wrapAsyncGenerator = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.awaitAsyncGenerator = () => template.program.ast`
|
||||
helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")`
|
||||
import AwaitValue from "AwaitValue";
|
||||
|
||||
export default function _awaitAsyncGenerator(value) {
|
||||
@@ -195,7 +202,7 @@ helpers.awaitAsyncGenerator = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.asyncGeneratorDelegate = () => template.program.ast`
|
||||
helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")`
|
||||
export default function _asyncGeneratorDelegate(inner, awaitWrap) {
|
||||
var iter = {}, waiting = false;
|
||||
|
||||
@@ -237,7 +244,7 @@ helpers.asyncGeneratorDelegate = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.asyncToGenerator = () => template.program.ast`
|
||||
helpers.asyncToGenerator = helper("7.0.0-beta.0")`
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
@@ -272,7 +279,7 @@ helpers.asyncToGenerator = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classCallCheck = () => template.program.ast`
|
||||
helpers.classCallCheck = helper("7.0.0-beta.0")`
|
||||
export default function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -280,7 +287,7 @@ helpers.classCallCheck = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.createClass = () => template.program.ast`
|
||||
helpers.createClass = helper("7.0.0-beta.0")`
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i ++) {
|
||||
var descriptor = props[i];
|
||||
@@ -298,7 +305,7 @@ helpers.createClass = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.defineEnumerableProperties = () => template.program.ast`
|
||||
helpers.defineEnumerableProperties = helper("7.0.0-beta.0")`
|
||||
export default function _defineEnumerableProperties(obj, descs) {
|
||||
for (var key in descs) {
|
||||
var desc = descs[key];
|
||||
@@ -324,7 +331,7 @@ helpers.defineEnumerableProperties = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.defaults = () => template.program.ast`
|
||||
helpers.defaults = helper("7.0.0-beta.0")`
|
||||
export default function _defaults(obj, defaults) {
|
||||
var keys = Object.getOwnPropertyNames(defaults);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
@@ -338,7 +345,7 @@ helpers.defaults = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.defineProperty = () => template.program.ast`
|
||||
helpers.defineProperty = helper("7.0.0-beta.0")`
|
||||
export default function _defineProperty(obj, key, value) {
|
||||
// Shortcircuit the slow defineProperty path when possible.
|
||||
// We are trying to avoid issues where setters defined on the
|
||||
@@ -359,7 +366,7 @@ helpers.defineProperty = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.extends = () => template.program.ast`
|
||||
helpers.extends = helper("7.0.0-beta.0")`
|
||||
export default function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
@@ -377,7 +384,7 @@ helpers.extends = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.objectSpread = () => template.program.ast`
|
||||
helpers.objectSpread = helper("7.0.0-beta.0")`
|
||||
import defineProperty from "defineProperty";
|
||||
|
||||
export default function _objectSpread(target) {
|
||||
@@ -397,7 +404,7 @@ helpers.objectSpread = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.inherits = () => template.program.ast`
|
||||
helpers.inherits = helper("7.0.0-beta.0")`
|
||||
import setPrototypeOf from "setPrototypeOf";
|
||||
|
||||
export default function _inherits(subClass, superClass) {
|
||||
@@ -415,7 +422,7 @@ helpers.inherits = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.inheritsLoose = () => template.program.ast`
|
||||
helpers.inheritsLoose = helper("7.0.0-beta.0")`
|
||||
export default function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
@@ -423,7 +430,7 @@ helpers.inheritsLoose = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.getPrototypeOf = () => template.program.ast`
|
||||
helpers.getPrototypeOf = helper("7.0.0-beta.0")`
|
||||
export default function _getPrototypeOf(o) {
|
||||
_getPrototypeOf = Object.setPrototypeOf
|
||||
? Object.getPrototypeOf
|
||||
@@ -434,7 +441,7 @@ helpers.getPrototypeOf = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.setPrototypeOf = () => template.program.ast`
|
||||
helpers.setPrototypeOf = helper("7.0.0-beta.0")`
|
||||
export default function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
@@ -444,7 +451,7 @@ helpers.setPrototypeOf = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.construct = () => template.program.ast`
|
||||
helpers.construct = helper("7.0.0-beta.0")`
|
||||
import setPrototypeOf from "setPrototypeOf";
|
||||
|
||||
function isNativeReflectConstruct() {
|
||||
@@ -492,7 +499,7 @@ helpers.construct = () => template.program.ast`
|
||||
`;
|
||||
|
||||
// Based on https://github.com/WebReflection/babel-plugin-transform-builtin-classes
|
||||
helpers.wrapNativeSuper = () => template.program.ast`
|
||||
helpers.wrapNativeSuper = helper("7.0.0-beta.0")`
|
||||
import getPrototypeOf from "getPrototypeOf";
|
||||
import setPrototypeOf from "setPrototypeOf";
|
||||
import construct from "construct";
|
||||
@@ -528,7 +535,7 @@ helpers.wrapNativeSuper = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.instanceof = () => template.program.ast`
|
||||
helpers.instanceof = helper("7.0.0-beta.0")`
|
||||
export default function _instanceof(left, right) {
|
||||
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
||||
return right[Symbol.hasInstance](left);
|
||||
@@ -538,13 +545,13 @@ helpers.instanceof = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.interopRequireDefault = () => template.program.ast`
|
||||
helpers.interopRequireDefault = helper("7.0.0-beta.0")`
|
||||
export default function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.interopRequireWildcard = () => template.program.ast`
|
||||
helpers.interopRequireWildcard = helper("7.0.0-beta.0")`
|
||||
export default function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
@@ -570,7 +577,7 @@ helpers.interopRequireWildcard = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.newArrowCheck = () => template.program.ast`
|
||||
helpers.newArrowCheck = helper("7.0.0-beta.0")`
|
||||
export default function _newArrowCheck(innerThis, boundThis) {
|
||||
if (innerThis !== boundThis) {
|
||||
throw new TypeError("Cannot instantiate an arrow function");
|
||||
@@ -578,13 +585,13 @@ helpers.newArrowCheck = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.objectDestructuringEmpty = () => template.program.ast`
|
||||
helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")`
|
||||
export default function _objectDestructuringEmpty(obj) {
|
||||
if (obj == null) throw new TypeError("Cannot destructure undefined");
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.objectWithoutPropertiesLoose = () => template.program.ast`
|
||||
helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")`
|
||||
export default function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
|
||||
@@ -602,7 +609,7 @@ helpers.objectWithoutPropertiesLoose = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.objectWithoutProperties = () => template.program.ast`
|
||||
helpers.objectWithoutProperties = helper("7.0.0-beta.0")`
|
||||
import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose";
|
||||
|
||||
export default function _objectWithoutProperties(source, excluded) {
|
||||
@@ -625,7 +632,7 @@ helpers.objectWithoutProperties = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.assertThisInitialized = () => template.program.ast`
|
||||
helpers.assertThisInitialized = helper("7.0.0-beta.0")`
|
||||
export default function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
@@ -634,7 +641,7 @@ helpers.assertThisInitialized = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.possibleConstructorReturn = () => template.program.ast`
|
||||
helpers.possibleConstructorReturn = helper("7.0.0-beta.0")`
|
||||
import assertThisInitialized from "assertThisInitialized";
|
||||
|
||||
export default function _possibleConstructorReturn(self, call) {
|
||||
@@ -645,7 +652,7 @@ helpers.possibleConstructorReturn = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.superPropBase = () => template.program.ast`
|
||||
helpers.superPropBase = helper("7.0.0-beta.0")`
|
||||
import getPrototypeOf from "getPrototypeOf";
|
||||
|
||||
export default function _superPropBase(object, property) {
|
||||
@@ -658,7 +665,7 @@ helpers.superPropBase = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.get = () => template.program.ast`
|
||||
helpers.get = helper("7.0.0-beta.0")`
|
||||
import getPrototypeOf from "getPrototypeOf";
|
||||
import superPropBase from "superPropBase";
|
||||
|
||||
@@ -683,7 +690,7 @@ helpers.get = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.set = () => template.program.ast`
|
||||
helpers.set = helper("7.0.0-beta.0")`
|
||||
import getPrototypeOf from "getPrototypeOf";
|
||||
import superPropBase from "superPropBase";
|
||||
import defineProperty from "defineProperty";
|
||||
@@ -741,7 +748,7 @@ helpers.set = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.taggedTemplateLiteral = () => template.program.ast`
|
||||
helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")`
|
||||
export default function _taggedTemplateLiteral(strings, raw) {
|
||||
if (!raw) { raw = strings.slice(0); }
|
||||
return Object.freeze(Object.defineProperties(strings, {
|
||||
@@ -750,7 +757,7 @@ helpers.taggedTemplateLiteral = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.taggedTemplateLiteralLoose = () => template.program.ast`
|
||||
helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")`
|
||||
export default function _taggedTemplateLiteralLoose(strings, raw) {
|
||||
if (!raw) { raw = strings.slice(0); }
|
||||
strings.raw = raw;
|
||||
@@ -758,7 +765,7 @@ helpers.taggedTemplateLiteralLoose = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.temporalRef = () => template.program.ast`
|
||||
helpers.temporalRef = helper("7.0.0-beta.0")`
|
||||
import undef from "temporalUndefined";
|
||||
|
||||
export default function _temporalRef(val, name) {
|
||||
@@ -770,23 +777,23 @@ helpers.temporalRef = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.readOnlyError = () => template.program.ast`
|
||||
helpers.readOnlyError = helper("7.0.0-beta.0")`
|
||||
export default function _readOnlyError(name) {
|
||||
throw new Error("\\"" + name + "\\" is read-only");
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classNameTDZError = () => template.program.ast`
|
||||
helpers.classNameTDZError = helper("7.0.0-beta.0")`
|
||||
export default function _classNameTDZError(name) {
|
||||
throw new Error("Class \\"" + name + "\\" cannot be referenced in computed property keys.");
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.temporalUndefined = () => template.program.ast`
|
||||
helpers.temporalUndefined = helper("7.0.0-beta.0")`
|
||||
export default {};
|
||||
`;
|
||||
|
||||
helpers.slicedToArray = () => template.program.ast`
|
||||
helpers.slicedToArray = helper("7.0.0-beta.0")`
|
||||
import arrayWithHoles from "arrayWithHoles";
|
||||
import iterableToArrayLimit from "iterableToArrayLimit";
|
||||
import nonIterableRest from "nonIterableRest";
|
||||
@@ -796,7 +803,7 @@ helpers.slicedToArray = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.slicedToArrayLoose = () => template.program.ast`
|
||||
helpers.slicedToArrayLoose = helper("7.0.0-beta.0")`
|
||||
import arrayWithHoles from "arrayWithHoles";
|
||||
import iterableToArrayLimitLoose from "iterableToArrayLimitLoose";
|
||||
import nonIterableRest from "nonIterableRest";
|
||||
@@ -806,7 +813,7 @@ helpers.slicedToArrayLoose = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.toArray = () => template.program.ast`
|
||||
helpers.toArray = helper("7.0.0-beta.0")`
|
||||
import arrayWithHoles from "arrayWithHoles";
|
||||
import iterableToArray from "iterableToArray";
|
||||
import nonIterableRest from "nonIterableRest";
|
||||
@@ -816,7 +823,7 @@ helpers.toArray = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.toConsumableArray = () => template.program.ast`
|
||||
helpers.toConsumableArray = helper("7.0.0-beta.0")`
|
||||
import arrayWithoutHoles from "arrayWithoutHoles";
|
||||
import iterableToArray from "iterableToArray";
|
||||
import nonIterableSpread from "nonIterableSpread";
|
||||
@@ -826,7 +833,7 @@ helpers.toConsumableArray = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.arrayWithoutHoles = () => template.program.ast`
|
||||
helpers.arrayWithoutHoles = helper("7.0.0-beta.0")`
|
||||
export default function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
@@ -835,13 +842,13 @@ helpers.arrayWithoutHoles = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.arrayWithHoles = () => template.program.ast`
|
||||
helpers.arrayWithHoles = helper("7.0.0-beta.0")`
|
||||
export default function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.iterableToArray = () => template.program.ast`
|
||||
helpers.iterableToArray = helper("7.0.0-beta.0")`
|
||||
export default function _iterableToArray(iter) {
|
||||
if (
|
||||
Symbol.iterator in Object(iter) ||
|
||||
@@ -850,7 +857,7 @@ helpers.iterableToArray = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.iterableToArrayLimit = () => template.program.ast`
|
||||
helpers.iterableToArrayLimit = helper("7.0.0-beta.0")`
|
||||
export default function _iterableToArrayLimit(arr, i) {
|
||||
// this is an expanded form of \`for...of\` that properly supports abrupt completions of
|
||||
// iterators etc. variable names have been minimised to reduce the size of this massive
|
||||
@@ -885,7 +892,7 @@ helpers.iterableToArrayLimit = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.iterableToArrayLimitLoose = () => template.program.ast`
|
||||
helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")`
|
||||
export default function _iterableToArrayLimitLoose(arr, i) {
|
||||
var _arr = [];
|
||||
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
|
||||
@@ -896,19 +903,19 @@ helpers.iterableToArrayLimitLoose = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.nonIterableSpread = () => template.program.ast`
|
||||
helpers.nonIterableSpread = helper("7.0.0-beta.0")`
|
||||
export default function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.nonIterableRest = () => template.program.ast`
|
||||
helpers.nonIterableRest = helper("7.0.0-beta.0")`
|
||||
export default function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.skipFirstGeneratorNext = () => template.program.ast`
|
||||
helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")`
|
||||
export default function _skipFirstGeneratorNext(fn) {
|
||||
return function () {
|
||||
var it = fn.apply(this, arguments);
|
||||
@@ -918,7 +925,7 @@ helpers.skipFirstGeneratorNext = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.toPropertyKey = () => template.program.ast`
|
||||
helpers.toPropertyKey = helper("7.0.0-beta.0")`
|
||||
export default function _toPropertyKey(key) {
|
||||
if (typeof key === "symbol") {
|
||||
return key;
|
||||
@@ -932,7 +939,7 @@ helpers.toPropertyKey = () => template.program.ast`
|
||||
* Add a helper that will throw a useful error if the transform fails to detect the class
|
||||
* property assignment, so users know something failed.
|
||||
*/
|
||||
helpers.initializerWarningHelper = () => template.program.ast`
|
||||
helpers.initializerWarningHelper = helper("7.0.0-beta.0")`
|
||||
export default function _initializerWarningHelper(descriptor, context){
|
||||
throw new Error(
|
||||
'Decorating class property failed. Please ensure that ' +
|
||||
@@ -946,7 +953,7 @@ helpers.initializerWarningHelper = () => template.program.ast`
|
||||
/**
|
||||
* Add a helper to call as a replacement for class property definition.
|
||||
*/
|
||||
helpers.initializerDefineProperty = () => template.program.ast`
|
||||
helpers.initializerDefineProperty = helper("7.0.0-beta.0")`
|
||||
export default function _initializerDefineProperty(target, property, descriptor, context){
|
||||
if (!descriptor) return;
|
||||
|
||||
@@ -963,7 +970,7 @@ helpers.initializerDefineProperty = () => template.program.ast`
|
||||
* Add a helper to take an initial descriptor, apply some decorators to it, and optionally
|
||||
* define the property.
|
||||
*/
|
||||
helpers.applyDecoratedDescriptor = () => template.program.ast`
|
||||
helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")`
|
||||
export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){
|
||||
var desc = {};
|
||||
Object['ke' + 'ys'](descriptor).forEach(function(key){
|
||||
@@ -995,14 +1002,14 @@ helpers.applyDecoratedDescriptor = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classPrivateFieldLooseKey = () => template.program.ast`
|
||||
helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")`
|
||||
var id = 0;
|
||||
export default function _classPrivateFieldKey(name) {
|
||||
return "__private_" + (id++) + "_" + name;
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classPrivateFieldLooseBase = () => template.program.ast`
|
||||
helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")`
|
||||
export default function _classPrivateFieldBase(receiver, privateKey) {
|
||||
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
||||
throw new TypeError("attempted to use private field on non-instance");
|
||||
@@ -1011,7 +1018,7 @@ helpers.classPrivateFieldLooseBase = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classPrivateFieldGet = () => template.program.ast`
|
||||
helpers.classPrivateFieldGet = helper("7.0.0-beta.0")`
|
||||
export default function _classPrivateFieldGet(receiver, privateMap) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to get private field on non-instance");
|
||||
@@ -1020,7 +1027,7 @@ helpers.classPrivateFieldGet = () => template.program.ast`
|
||||
}
|
||||
`;
|
||||
|
||||
helpers.classPrivateFieldSet = () => template.program.ast`
|
||||
helpers.classPrivateFieldSet = helper("7.0.0-beta.0")`
|
||||
export default function _classPrivateFieldSet(receiver, privateMap, value) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to set private field on non-instance");
|
||||
|
||||
@@ -226,13 +226,19 @@ function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
|
||||
});
|
||||
}
|
||||
|
||||
const helperData = {};
|
||||
const helperData = Object.create(null);
|
||||
function loadHelper(name) {
|
||||
if (!helperData[name]) {
|
||||
if (!helpers[name]) throw new ReferenceError(`Unknown helper ${name}`);
|
||||
const helper = helpers[name];
|
||||
if (!helper) {
|
||||
throw Object.assign(new ReferenceError(`Unknown helper ${name}`), {
|
||||
code: "BABEL_HELPER_UNKNOWN",
|
||||
helper: name,
|
||||
});
|
||||
}
|
||||
|
||||
const fn = () => {
|
||||
return t.file(helpers[name]());
|
||||
return t.file(helper.ast());
|
||||
};
|
||||
|
||||
const metadata = getHelperMetadata(fn());
|
||||
@@ -247,6 +253,9 @@ function loadHelper(name) {
|
||||
globals: metadata.globals,
|
||||
};
|
||||
},
|
||||
minVersion() {
|
||||
return helper.minVersion;
|
||||
},
|
||||
dependencies: metadata.dependencies,
|
||||
};
|
||||
}
|
||||
@@ -263,6 +272,10 @@ export function get(
|
||||
return loadHelper(name).build(getDependency, id, localBindings);
|
||||
}
|
||||
|
||||
export function minVersion(name: string) {
|
||||
return loadHelper(name).minVersion();
|
||||
}
|
||||
|
||||
export function getDependencies(name: string): $ReadOnlyArray<string> {
|
||||
return Array.from(loadHelper(name).dependencies.values());
|
||||
}
|
||||
|
||||
@@ -17,7 +17,10 @@ export default function defineHelper(
|
||||
throw new Error(`The ${id} helper is already defined.`);
|
||||
}
|
||||
Object.defineProperty(helpers, id, {
|
||||
value: template.program(code),
|
||||
value: {
|
||||
minVersion: "7.0.0-beta.0",
|
||||
ast: template.program(code),
|
||||
},
|
||||
});
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/highlight",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Syntax highlight JavaScript strings for output in terminals.",
|
||||
"author": "suchipi <me@suchipi.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/node",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Babel command line",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -16,8 +16,8 @@
|
||||
"compiler"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "7.0.0-beta.55",
|
||||
"@babel/register": "7.0.0-beta.55",
|
||||
"@babel/polyfill": "7.0.0-beta.56",
|
||||
"@babel/register": "7.0.0-beta.56",
|
||||
"commander": "^2.8.1",
|
||||
"fs-readdir-recursive": "^1.0.0",
|
||||
"lodash": "^4.17.10",
|
||||
@@ -28,8 +28,8 @@
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.56"
|
||||
},
|
||||
"bin": {
|
||||
"babel-node": "./bin/babel-node.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/parser",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "A JavaScript parser",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -23,7 +23,7 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/helper-fixtures": "7.0.0-beta.55",
|
||||
"@babel/helper-fixtures": "7.0.0-beta.56",
|
||||
"charcodes": "0.1.0",
|
||||
"unicode-11.0.0": "^0.7.7"
|
||||
},
|
||||
|
||||
@@ -1917,6 +1917,15 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
return super.parseClassProperty(node);
|
||||
}
|
||||
|
||||
parseClassPrivateProperty(
|
||||
node: N.ClassPrivateProperty,
|
||||
): N.ClassPrivateProperty {
|
||||
if (this.match(tt.colon)) {
|
||||
node.typeAnnotation = this.flowParseTypeAnnotation();
|
||||
}
|
||||
return super.parseClassPrivateProperty(node);
|
||||
}
|
||||
|
||||
// determine whether or not we're currently in the position where a class method would appear
|
||||
isClassMethod(): boolean {
|
||||
return this.isRelational("<") || super.isClassMethod();
|
||||
|
||||
@@ -1535,6 +1535,17 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
cls.abstract = true;
|
||||
return cls;
|
||||
}
|
||||
|
||||
// export default interface allowed in:
|
||||
// https://github.com/Microsoft/TypeScript/pull/16040
|
||||
if (this.state.value === "interface") {
|
||||
return this.tsParseDeclaration(
|
||||
this.startNode(),
|
||||
this.state.value,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
return super.parseExportDefaultExpression();
|
||||
}
|
||||
|
||||
|
||||
@@ -717,6 +717,7 @@ export type ClassPrivateProperty = NodeBase & {
|
||||
value: ?Expression, // TODO: Not in spec that this is nullable.
|
||||
static: boolean,
|
||||
computed: false,
|
||||
typeAnnotation?: ?TypeAnnotation, // TODO: Not in spec
|
||||
};
|
||||
|
||||
export type OptClassDeclaration = ClassBase &
|
||||
|
||||
4
packages/babel-parser/test/fixtures/flow/class-private-property/1/input.js
vendored
Normal file
4
packages/babel-parser/test/fixtures/flow/class-private-property/1/input.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
#prop1: string;
|
||||
#prop2: number = value;
|
||||
}
|
||||
261
packages/babel-parser/test/fixtures/flow/class-private-property/1/output.json
vendored
Normal file
261
packages/babel-parser/test/fixtures/flow/class-private-property/1/output.json
vendored
Normal file
@@ -0,0 +1,261 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 0,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"identifierName": "A"
|
||||
},
|
||||
"name": "A"
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 8,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 12,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"key": {
|
||||
"type": "PrivateName",
|
||||
"start": 12,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 13,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
},
|
||||
"identifierName": "prop1"
|
||||
},
|
||||
"name": "prop1"
|
||||
}
|
||||
},
|
||||
"variance": null,
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 18,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"typeAnnotation": {
|
||||
"type": "StringTypeAnnotation",
|
||||
"start": 20,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 30,
|
||||
"end": 53,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"key": {
|
||||
"type": "PrivateName",
|
||||
"start": 30,
|
||||
"end": 36,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 31,
|
||||
"end": 36,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"identifierName": "prop2"
|
||||
},
|
||||
"name": "prop2"
|
||||
}
|
||||
},
|
||||
"variance": null,
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 36,
|
||||
"end": 44,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 38,
|
||||
"end": 44,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
"end": 52,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 24
|
||||
},
|
||||
"identifierName": "value"
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
4
packages/babel-parser/test/fixtures/flow/class-private-property/2/input.js
vendored
Normal file
4
packages/babel-parser/test/fixtures/flow/class-private-property/2/input.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
#prop1: string;
|
||||
#prop2: number;
|
||||
}
|
||||
245
packages/babel-parser/test/fixtures/flow/class-private-property/2/output.json
vendored
Normal file
245
packages/babel-parser/test/fixtures/flow/class-private-property/2/output.json
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 47,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 47,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 0,
|
||||
"end": 47,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"identifierName": "A"
|
||||
},
|
||||
"name": "A"
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 8,
|
||||
"end": 47,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 12,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"key": {
|
||||
"type": "PrivateName",
|
||||
"start": 12,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 13,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
},
|
||||
"identifierName": "prop1"
|
||||
},
|
||||
"name": "prop1"
|
||||
}
|
||||
},
|
||||
"variance": null,
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 18,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"typeAnnotation": {
|
||||
"type": "StringTypeAnnotation",
|
||||
"start": 20,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 30,
|
||||
"end": 45,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"key": {
|
||||
"type": "PrivateName",
|
||||
"start": 30,
|
||||
"end": 36,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 31,
|
||||
"end": 36,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"identifierName": "prop2"
|
||||
},
|
||||
"name": "prop2"
|
||||
}
|
||||
},
|
||||
"variance": null,
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 36,
|
||||
"end": 44,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 38,
|
||||
"end": 44,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
4
packages/babel-parser/test/fixtures/flow/class-private-property/options.json
vendored
Normal file
4
packages/babel-parser/test/fixtures/flow/class-private-property/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": [ "flow", "classPrivateProperties" ]
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
export interface I {}
|
||||
// `export default` does not work with interfaces
|
||||
export default interface A {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 71,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@@ -9,13 +9,13 @@
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 49
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 71,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 49
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
@@ -92,45 +92,72 @@
|
||||
},
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ExportDefaultDeclaration",
|
||||
"start": 22,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " `export default` does not work with interfaces",
|
||||
"start": 22,
|
||||
"end": 71,
|
||||
"declaration": {
|
||||
"type": "TSInterfaceDeclaration",
|
||||
"start": 37,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
"end": 48,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 49
|
||||
"column": 26
|
||||
},
|
||||
"identifierName": "A"
|
||||
},
|
||||
"name": "A"
|
||||
},
|
||||
"body": {
|
||||
"type": "TSInterfaceBody",
|
||||
"start": 49,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 29
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " `export default` does not work with interfaces",
|
||||
"start": 22,
|
||||
"end": 71,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 49
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-external-helpers",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "This plugin contains helper functions that’ll be placed at the top of the generated code",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-external-helpers",
|
||||
"license": "MIT",
|
||||
@@ -9,13 +9,13 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
import { declare } from "@babel/helper-plugin-utils";
|
||||
import { types as t } from "@babel/core";
|
||||
|
||||
export default declare(api => {
|
||||
export default declare((api, options) => {
|
||||
api.assertVersion(7);
|
||||
|
||||
const { helperVersion = "7.0.0-beta.0" } = options;
|
||||
|
||||
return {
|
||||
pre(file) {
|
||||
file.set("helpersNamespace", t.identifier("babelHelpers"));
|
||||
file.set("helperGenerator", name => {
|
||||
// If the helper didn't exist yet at the version given, we bail
|
||||
// out and let Babel either insert it directly, or throw an error
|
||||
// so that plugins can handle that case properly.
|
||||
if (
|
||||
file.availableHelper &&
|
||||
!file.availableHelper(name, helperVersion)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
return t.memberExpression(
|
||||
t.identifier("babelHelpers"),
|
||||
t.identifier(name),
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-async-generator-functions",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Turn async generator functions into ES2015 generators",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-async-generator-functions",
|
||||
"license": "MIT",
|
||||
@@ -9,15 +9,15 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/helper-remap-async-to-generator": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-async-generators": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/helper-remap-async-to-generator": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-async-generators": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-class-properties",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties",
|
||||
"license": "MIT",
|
||||
@@ -9,18 +9,18 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-function-name": "7.0.0-beta.55",
|
||||
"@babel/helper-member-expression-to-functions": "7.0.0-beta.55",
|
||||
"@babel/helper-optimise-call-expression": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/helper-replace-supers": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-class-properties": "7.0.0-beta.55"
|
||||
"@babel/helper-function-name": "7.0.0-beta.56",
|
||||
"@babel/helper-member-expression-to-functions": "7.0.0-beta.56",
|
||||
"@babel/helper-optimise-call-expression": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/helper-replace-supers": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-class-properties": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-decorators",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"author": "Logan Smyth <loganfsmyth@gmail.com>",
|
||||
"license": "MIT",
|
||||
"description": "Compile class and object decorators to ES5",
|
||||
@@ -12,14 +12,14 @@
|
||||
"decorators"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-decorators": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-decorators": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-do-expressions",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile do expressions to ES5",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-do-expressions",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-do-expressions": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-do-expressions": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-export-default-from",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile export default to ES2015",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-export-default-from",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-export-default-from": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-export-default-from": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-export-namespace-from",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile export namespace to ES2015",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-export-namespace-from",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-export-namespace-from": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-export-namespace-from": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-function-bind",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile function bind operator to ES5",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-function-bind",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-function-bind": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-function-bind": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-function-sent",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile the function.sent meta propety to valid ES2015 code",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-function-sent",
|
||||
"license": "MIT",
|
||||
@@ -9,15 +9,15 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/helper-wrap-function": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-function-sent": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/helper-wrap-function": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-function-sent": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-json-strings",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in JS strings",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-json-strings",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-json-strings": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-json-strings": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-logical-assignment-operators",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Transforms logical assignment operators into short-circuited assignments",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-logical-assignment-operators",
|
||||
"license": "MIT",
|
||||
@@ -9,16 +9,16 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-logical-assignment-operators": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-logical-assignment-operators": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Remove nullish coalescing operator",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-nullish-coalescing-opearator",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-numeric-separator",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Remove numeric separators from Decimal, Binary, Hex and Octal literals",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-numeric-separator",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-numeric-separator": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-numeric-separator": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-object-rest-spread",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile object rest and spread to ES5",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-optional-catch-binding",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile optional catch bindings",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-optional-catch-binding",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-optional-chaining",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Transform optional chaining operators into a series of nil checks",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-optional-chaining",
|
||||
"license": "MIT",
|
||||
@@ -9,15 +9,15 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-optional-chaining": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-optional-chaining": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55",
|
||||
"@babel/plugin-transform-block-scoping": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56",
|
||||
"@babel/plugin-transform-block-scoping": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-pipeline-operator",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Transform pipeline operator into call expressions",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-pipeline-operator",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-pipeline-operator": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-pipeline-operator": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-throw-expressions",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Wraps Throw Expressions in an IIFE",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-throw-expressions",
|
||||
"license": "MIT",
|
||||
@@ -9,14 +9,14 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/plugin-syntax-throw-expressions": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/plugin-syntax-throw-expressions": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-unicode-property-regex",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
@@ -19,15 +19,15 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-unicode-property-regex",
|
||||
"bugs": "https://github.com/babel/babel/issues",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55",
|
||||
"@babel/helper-regex": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56",
|
||||
"@babel/helper-regex": "7.0.0-beta.56",
|
||||
"regexpu-core": "^4.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56",
|
||||
"@babel/helper-plugin-test-runner": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-async-generators",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of async generator functions",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-bigint",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of BigInt literals",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-bigint",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-class-properties",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of class properties",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-class-properties",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-decorators",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of decorators",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-decorators",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-do-expressions",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of do expressions",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-do-expressions",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-dynamic-import",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of import()",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-dynamic-import",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-export-default-from",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of export default from",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-default-from",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-export-namespace-from",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of export namespace from",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-namespace-from",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-flow",
|
||||
"version": "7.0.0-beta.55",
|
||||
"version": "7.0.0-beta.56",
|
||||
"description": "Allow parsing of the flow syntax",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-flow",
|
||||
"license": "MIT",
|
||||
@@ -9,12 +9,12 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.55"
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.56"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.55"
|
||||
"@babel/core": "7.0.0-beta.56"
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user