diff --git a/api.js b/api.js
index 9c6e775d6..5a9c2b128 100644
--- a/api.js
+++ b/api.js
@@ -57,10 +57,13 @@ class Api extends EventEmitter {
}
_runFile(file, runStatus, execArgv) {
- const hash = this.precompiler.precompileFile(file);
- const precompiled = Object.assign({}, this._precompiledHelpers);
- const resolvedfpath = fs.realpathSync(file);
- precompiled[resolvedfpath] = hash;
+ const precompiled = {};
+ if (this.precompiler) {
+ Object.assign(precompiled, this._precompiledHelpers);
+ const hash = this.precompiler.precompileFile(file);
+ const resolvedfpath = fs.realpathSync(file);
+ precompiled[resolvedfpath] = hash;
+ }
const options = Object.assign({}, this.options, {precompiled});
if (runStatus.updateSnapshots) {
@@ -117,19 +120,24 @@ class Api extends EventEmitter {
this.options.cacheDir = cacheDir;
- const isPowerAssertEnabled = this.options.powerAssert !== false;
- return babelConfigHelper.build(this.options.projectDir, cacheDir, this.options.babelConfig, isPowerAssertEnabled)
+ const compileEnhancements = this.options.compileEnhancements !== false;
+ return babelConfigHelper.build(this.options.projectDir, cacheDir, this.options.babelConfig, compileEnhancements)
.then(result => {
- this.precompiler = new CachingPrecompiler({
- path: cacheDir,
- getBabelOptions: result.getOptions,
- babelCacheKeys: result.cacheKeys
- });
+ if (result) {
+ this.precompiler = new CachingPrecompiler({
+ path: cacheDir,
+ getBabelOptions: result.getOptions,
+ babelCacheKeys: result.cacheKeys
+ });
+ }
});
}
_precompileHelpers() {
this._precompiledHelpers = {};
+ if (!this.precompiler) {
+ return Promise.resolve();
+ }
// Assumes the tests only load helpers from within the `resolveTestsFrom`
// directory. Without arguments this is the `projectDir`, else it's
@@ -138,7 +146,7 @@ class Api extends EventEmitter {
// processes, avoiding the need for precompilation.
return new AvaFiles({cwd: this.options.resolveTestsFrom})
.findTestHelpers()
- .map(file => { // eslint-disable-line array-callback-return
+ .each(file => { // eslint-disable-line array-callback-return
const hash = this.precompiler.precompileFile(file);
this._precompiledHelpers[file] = hash;
});
diff --git a/docs/recipes/babel.md b/docs/recipes/babel.md
new file mode 100644
index 000000000..fa028b310
--- /dev/null
+++ b/docs/recipes/babel.md
@@ -0,0 +1,115 @@
+# Configuring Babel
+
+AVA uses [Babel 7](https://babeljs.io) so you can use the latest JavaScript syntax in your tests. We do this by compiling test and helper files using our [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) preset. We also use a [second preset](https://github.com/avajs/babel-preset-transform-test-files) to enable [enhanced assertion messages](../../readme#enhanced-assertion-messages) and detect improper use of `t.throws()` assertions.
+
+By default our Babel pipeline is applied to test and helper files ending in `.js`. If your project uses Babel then we'll automatically compile files using your project's Babel configuration.
+
+AVA only looks for Babel configuration files in your project directory. That is, `.babelrc` or `.babelrc.js` files next to your `package.json` file, or the `package.json` file itself.
+
+## Customize how AVA compiles your test files
+
+You can override the default Babel configuration AVA uses for test file compilation in `package.json`. For example, the configuration below adds support for JSX syntax and stage 3 features:
+
+```json
+{
+ "ava": {
+ "babel": {
+ "testOptions": {
+ "plugins": ["@babel/plugin-syntax-jsx"],
+ "presets": ["@babel/preset-stage-3"]
+ }
+ }
+ }
+}
+```
+
+All `.babelrc` options are allowed inside the `testOptions` object.
+
+## Make AVA skip your project's Babel options
+
+You may not want AVA to use your project's Babel options, for example if your project is relying on Babel 6. You can set the `babelrc` option to `false`:
+
+```json
+{
+ "ava": {
+ "babel": {
+ "testOptions": {
+ "babelrc": false
+ }
+ }
+ }
+}
+```
+
+## Disable AVA's stage-4 preset
+
+You can disable AVA's stage-4 preset:
+
+```json
+{
+ "ava": {
+ "babel": {
+ "testOptions": {
+ "presets": [
+ ["module:ava/stage-4", false]
+ ]
+ }
+ }
+ }
+}
+```
+
+Note that this *does not* stop AVA from compiling your test files using Babel.
+
+## Disable AVA's Babel pipeline
+
+You can completely disable AVA's use of Babel:
+
+```json
+{
+ "ava": {
+ "babel": false,
+ "compileEnhancements": false
+ }
+}
+```
+
+## Use Babel polyfills
+
+AVA lets you write your tests using new JavaScript syntax, even on Node.js versions that otherwise wouldn't support it. However, it doesn't add or modify built-ins of your current environment. Using AVA would, for example, not provide modern features such as `Object.entries()` to an underlying Node.js 6 environment.
+
+By loading [Babel's `polyfill` module](https://babeljs.io/docs/usage/polyfill/) you can opt in to these features. Note that this will modify the environment, which may influence how your program behaves.
+
+You can enable the `polyfill` module by adding it to AVA's `require` option:
+
+```json
+{
+ "ava": {
+ "require": [
+ "@babel/polyfill"
+ ]
+ }
+}
+```
+
+You'll need to install `@babel/polyfill` yourself.
+
+## Compile sources
+
+AVA does not currently compile source files. You'll have to load [Babel's `register` module](http://babeljs.io/docs/usage/require/), which will compile source files as needed.
+
+You can enable the `register` module by adding it to AVA's `require` option:
+
+```json
+{
+ "ava": {
+ "require": [
+ "@babel/register"
+ ]
+ }
+}
+```
+
+You'll need to install `@babel/register` yourself.
+
+Note that loading `@babel/register` in every worker process has a non-trivial performance cost. If you have lots of test files, you may want to consider using a build step to compile your sources *before* running your tests. This isn't ideal, since it complicates using AVA's watch mode, so we recommend using `@babel/register` until the performance penalty becomes too great. Setting up a precompilation step is out of scope for this document, but we recommend you check out one of the many [build systems that support Babel](http://babeljs.io/docs/setup/). There is an [issue](https://github.com/avajs/ava/issues/577) discussing ways we could make this experience better.
diff --git a/docs/recipes/babelrc.md b/docs/recipes/babelrc.md
index 0a4073367..bb1fddaf1 100644
--- a/docs/recipes/babelrc.md
+++ b/docs/recipes/babelrc.md
@@ -2,150 +2,8 @@
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/babelrc.md)
-There are multiple options for configuring how AVA transpiles your tests using Babel.
+This recipe has moved. Please see our [new Babel recipe](babel.md).
- - [AVA's default transpiler behavior](#avas-default-transpiler-behavior)
- - [Customizing how AVA transpiles your tests](#customizing-how-ava-transpiles-your-tests)
- - [Transpiling Sources](#transpiling-sources)
- - [Transpiling tests and sources the same way](#transpiling-tests-and-sources-the-same-way)
- - [Extend your source transpilation configuration](#extend-your-source-transpilation-configuration)
- - [Extend an alternate config file (i.e. not `.babelrc`)](#extend-an-alternate-config-file)
+---
-## AVA's default transpiler behavior
-
-AVA lets you use some nifty JavaScript features, like [async functions](https://github.com/avajs/ava#async-function-support). To make this work on older Node.js versions AVA transpiles the tests and helper files using the [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) Babel preset. This is great for projects where you do not use Babel for your source, but do want to use the newest JavaScript features for your tests.
-
-### Using object rest/spread properties
-
-As of Node.js [8.3.0](https://github.com/nodejs/node/blob/v8.3.0/doc/changelogs/CHANGELOG_V8.md#8.3.0) [object rest/spread properties](https://github.com/tc39/proposal-object-rest-spread) is supported directly. This new language feature however has not yet reached [stage 4](http://2ality.com/2015/11/tc39-process.html#stage-4-finished), which means that AVA won't support it by default. That said, if you're using Node.js 8.3.0 or newer, AVA will load the [`syntax-object-rest-spread`](https://www.npmjs.com/package/babel-plugin-syntax-object-rest-spread) plugin for you. This means you *can* use object rest/spread properties in your tests as long as you're not targeting older Node.js versions.
-
-Note that if you customize the Babel configuration you'll have to explicitly specify the `syntax-object-rest-spread` plugin.
-
-## Customizing how AVA transpiles your tests
-
-You can override the default Babel configuration AVA uses for test transpilation in `package.json`. For example, the configuration below adds the Babel `rewire` plugin, and adds the Babel [`stage-3`](http://babeljs.io/docs/plugins/preset-stage-3/) preset.
-
-```json
-{
- "ava": {
- "babel": {
- "plugins": ["rewire"],
- "presets": ["@ava/stage-4", "stage-3"]
- }
- }
-}
-```
-
-Note that this only affects how AVA transpiles your tests. If you use `babel-register` you'll still need to add separate Babel configuration as explained [here](#transpiling-sources).
-
-## Use Babel Polyfills
-
-AVA lets you write your tests using new JavaScript syntax, even on Node.js versions that otherwise wouldn't support it. However, it doesn't add or modify built-ins of your current environment. Using AVA would, for example, not provide modern features such as `Array.prototype.includes()` to an underlying Node.js 4 environment.
-
-By loading [Babel's Polyfill module](https://babeljs.io/docs/usage/polyfill/) you can opt in to these features. Note that this will modify the environment, which may influence how your program behaves.
-
-You can enable `babel-polyfill` by adding it to AVA's `require` option:
-
-```json
-{
- "ava": {
- "require": [
- "babel-polyfill"
- ]
- }
-}
-```
-
-## Transpiling Sources
-
-To transpile your sources, you will need to define a [`babel config` ](http://babeljs.io/docs/usage/babelrc/) in `package.json` or a `.babelrc` file. Also, you will need to tell AVA to load [`babel-register`](http://babeljs.io/docs/usage/require/) in every forked process, by adding it to the `require` section of your AVA config:
-
-`package.json`
-
-```json
-{
- "ava": {
- "require": ["babel-register"]
- },
- "babel": {
- "presets": ["@ava/stage-4"]
- }
-}
-```
-
-Note that loading `babel-register` in every forked process has a non-trivial performance cost. If you have lots of test files, you may want to consider using a build step to transpile your sources *before* running your tests. This isn't ideal, since it complicates using AVA's watch mode, so we recommend using `babel-register` until the performance penalty becomes too great. Setting up a precompilation step is out of scope for this document, but we recommend you check out one of the many [build systems that support Babel](http://babeljs.io/docs/setup/). There is an [open issue](https://github.com/avajs/ava/issues/577) discussing ways we could make this experience better.
-
-## Transpiling tests and sources the same way
-
-Using the `"inherit"` shortcut will cause your tests to be transpiled the same as your sources (as specified in your [`babelrc`](http://babeljs.io/docs/usage/babelrc/)). AVA will add a few additional [internal plugins](#notes) when transpiling your tests, but they won't affect the behavior of your test code.
-
-`package.json`:
-
-```json
-{
- "ava": {
- "require": "babel-register",
- "babel": "inherit"
- },
- "babel": {
- "presets": [
- "@ava/stage-4",
- "react"
- ]
- }
-}
-```
-
-In the above example, both tests and sources will be transpiled using the [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) and [`react`](http://babeljs.io/docs/plugins/preset-react/) presets.
-
-AVA will only look for a `.babelrc` file in the same directory as the `package.json` file. If not found then it assumes your Babel config lives in the `package.json` file.
-
-## Extend your source transpilation configuration
-
-When specifying the Babel config for your tests, you can set the `babelrc` option to `true`. This will merge the specified plugins with those from your [`babelrc`](http://babeljs.io/docs/usage/babelrc/).
-
-`package.json`:
-
-```json
-{
- "ava": {
- "require": "babel-register",
- "babel": {
- "babelrc": true,
- "plugins": ["custom-plugin-name"],
- "presets": ["custom-preset"]
- }
- },
- "babel": {
- "presets": [
- "@ava/stage-4",
- "react"
- ]
- }
-}
-```
-
-In the above example, *sources* are compiled use [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) and [`react`](http://babeljs.io/docs/plugins/preset-react/), *tests* use those same plugins, plus the additional `custom` plugins specified.
-
-AVA will only look for a `.babelrc` file in the same directory as the `package.json` file. If not found then it assumes your Babel config lives in the `package.json` file.
-
-## Extend an alternate config file.
-
-If, for some reason, your Babel config is not specified in one of the default locations ([`.babelrc` or `package.json`](http://babeljs.io/docs/usage/babelrc/), you can set the `extends` option to the alternate config you want to use during testing.
-
-`package.json`:
-
-```json
-{
- "ava": {
- "require": "babel-register",
- "babel": {
- "extends": "./babel-test-config.json",
- "plugins": ["custom-plugin-name"],
- "presets": ["custom-preset"]
- }
- }
-}
-```
-
-The above uses `babel-test-config.json` as the transpilation config for *sources*, and as the base config for *tests*. For *tests*, it extends that base config with the custom plugins and presets specified.
+If you're using an older AVA version, please see [version 0.25.0 of this recipe](https://github.com/avajs/ava/blob/v0.25.0/docs/recipes/babelrc.md).
diff --git a/docs/recipes/code-coverage.md b/docs/recipes/code-coverage.md
index f5a492924..7f0989ecc 100644
--- a/docs/recipes/code-coverage.md
+++ b/docs/recipes/code-coverage.md
@@ -1,3 +1,7 @@
+> **Please note, this recipe has not yet been updated for Babel 7 support in AVA 1.0.**
+
+---
+
# Code coverage
Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/docs/recipes/code-coverage.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/code-coverage.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/docs/recipes/code-coverage.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/docs/recipes/code-coverage.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/docs/recipes/code-coverage.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/docs/recipes/code-coverage.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/docs/recipes/code-coverage.md)
diff --git a/docs/recipes/jspm-systemjs.md b/docs/recipes/jspm-systemjs.md
index e6afd3ee4..79819ed1e 100644
--- a/docs/recipes/jspm-systemjs.md
+++ b/docs/recipes/jspm-systemjs.md
@@ -1,3 +1,7 @@
+> **Please note, this recipe has not yet been updated for Babel 7 support in AVA 1.0.**
+
+---
+
# JSPM and SystemJS for ES2015
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/jspm-systemjs.md)
diff --git a/docs/recipes/precompiling-with-webpack.md b/docs/recipes/precompiling-with-webpack.md
index 4d9465d3b..e1ca64211 100644
--- a/docs/recipes/precompiling-with-webpack.md
+++ b/docs/recipes/precompiling-with-webpack.md
@@ -1,3 +1,7 @@
+> **Please note, this recipe has not yet been updated for Babel 7 support in AVA 1.0.**
+
+---
+
## Precompiling source files with webpack
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/precompiling-with-webpack.md)
diff --git a/docs/recipes/react.md b/docs/recipes/react.md
index 07fe4979a..343e3502f 100644
--- a/docs/recipes/react.md
+++ b/docs/recipes/react.md
@@ -1,3 +1,7 @@
+> **Please note, this recipe has not yet been updated for Babel 7 support in AVA 1.0.**
+
+---
+
# Testing React components
Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/docs/recipes/react.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/react.md)
diff --git a/docs/recipes/vue.md b/docs/recipes/vue.md
index 2f39e97cb..ff72d460a 100644
--- a/docs/recipes/vue.md
+++ b/docs/recipes/vue.md
@@ -1,3 +1,7 @@
+> **Please note, this recipe has not yet been updated for Babel 7 support in AVA 1.0.**
+
+---
+
# Testing Vue.js components
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/vue.md)
diff --git a/lib/babel-config.js b/lib/babel-config.js
index d58b700b8..01b5a83cb 100644
--- a/lib/babel-config.js
+++ b/lib/babel-config.js
@@ -9,29 +9,27 @@ const makeDir = require('make-dir');
const semver = require('semver');
const colors = require('./colors');
+const stage4Path = require.resolve('../stage-4');
+const syntaxObjectRestSpreadPath = require.resolve('@babel/plugin-syntax-object-rest-spread');
+const transformTestFilesPath = require.resolve('@ava/babel-preset-transform-test-files');
+
function validate(conf) {
- if (conf === undefined || conf === null) {
- conf = 'default';
+ if (conf === false) {
+ return null;
}
- // Check for valid babel config shortcuts (can be either `default` or `inherit`)
- const isValidShortcut = conf === 'default' || conf === 'inherit';
-
- if (!conf || (typeof conf === 'string' && !isValidShortcut)) {
- let message = colors.error(figures.cross);
- message += ' Unexpected Babel configuration for AVA. ';
- message += 'See ' + chalk.underline('https://github.com/avajs/ava#es2017-support') + ' for allowed values.';
+ if (conf === undefined) {
+ return {testOptions: {}};
+ }
- throw new Error(message);
+ if (!conf || typeof conf !== 'object' || !conf.testOptions || typeof conf.testOptions !== 'object' || Array.isArray(conf.testOptions) || Object.keys(conf).length > 1) {
+ throw new Error(`${colors.error(figures.cross)} Unexpected Babel configuration for AVA. See ${chalk.underline('https://github.com/avajs/ava/blob/master/docs/recipes/babel.md')} for allowed values.`);
}
return conf;
}
-const SOURCE = '(AVA) Base Babel config';
-const AVA_DIR = path.join(__dirname, '..');
-
-function verifyExistingOptions(verifierFile, baseConfig, cache) {
+function verifyExistingOptions(verifierFile, baseConfig, cache, envName) {
return new Promise((resolve, reject) => {
try {
resolve(fs.readFileSync(verifierFile));
@@ -54,7 +52,7 @@ function verifyExistingOptions(verifierFile, baseConfig, cache) {
if (baseConfig.extends) {
fixedSourceHashes.set(baseConfig.extends.source, baseConfig.extends.hash);
}
- return verifier.verifyCurrentEnv({sources: fixedSourceHashes}, cache)
+ return verifier.verifyEnv(envName, {sources: fixedSourceHashes}, cache)
.then(result => {
if (!result.cacheKeys) {
return null;
@@ -69,26 +67,37 @@ function verifyExistingOptions(verifierFile, baseConfig, cache) {
});
}
-function resolveOptions(baseConfig, cache, optionsFile, verifierFile) {
- return configManager.fromConfig(baseConfig, {cache})
+function resolveOptions(baseConfig, cache, envName, optionsFile, verifierFile) { // eslint-disable-line max-params
+ return configManager.fromConfig(baseConfig, {cache, expectedEnvNames: [envName]})
.then(result => {
fs.writeFileSync(optionsFile, result.generateModule());
return result.createVerifier()
.then(verifier => {
fs.writeFileSync(verifierFile, verifier.toBuffer());
- return verifier.cacheKeysForCurrentEnv();
+ return verifier.cacheKeysForEnv(envName);
});
});
}
-function build(projectDir, cacheDir, userOptions, powerAssert) {
+function build(projectDir, cacheDir, userOptions, compileEnhancements) {
+ if (!userOptions && !compileEnhancements) {
+ return Promise.resolve(null);
+ }
+
+ // Note that Babel ignores empty string values, even for NODE_ENV. Here
+ // default to 'test' unless NODE_ENV is defined, in which case fall back to
+ // Babel's default of 'development' if it's empty.
+ const envName = process.env.BABEL_ENV || ('NODE_ENV' in process.env ? process.env.NODE_ENV : 'test') || 'development';
+
// Compute a seed based on the Node.js version and the project directory.
// Dependency hashes may vary based on the Node.js version, e.g. with the
// @ava/stage-4 Babel preset. Sources and dependencies paths are absolute in
// the generated module and verifier state. Those paths wouldn't necessarily
// be valid if the project directory changes.
- const seed = md5Hex([process.versions.node, projectDir]);
+ // Also include `envName`, so options can be cached even if users change
+ // BABEL_ENV or NODE_ENV between runs.
+ const seed = md5Hex([process.versions.node, projectDir, envName]);
// Ensure cacheDir exists
makeDir.sync(cacheDir);
@@ -101,53 +110,89 @@ function build(projectDir, cacheDir, userOptions, powerAssert) {
const baseOptions = {
babelrc: false,
plugins: [],
- presets: [
- ['@ava/transform-test-files', {powerAssert}]
- ]
+ presets: []
};
- if (userOptions === 'default') {
- baseOptions.presets.unshift('@ava/stage-4');
- }
- // Include object rest spread support for node versions that support it
- // natively.
- if (userOptions === 'default' && semver.satisfies(process.versions.node, '>= 8.3.0')) {
- baseOptions.plugins.push('babel-plugin-syntax-object-rest-spread');
+ if (userOptions) {
+ // Always apply the stage-4 preset.
+ baseOptions.presets.push(stage4Path);
+
+ // By default extend the project's Babel configuration, but allow this to be
+ // disabled through userOptions.
+ if (userOptions.testOptions.babelrc !== false) {
+ baseOptions.babelrc = true;
+ }
+ if (userOptions.testOptions.extends) {
+ baseOptions.extends = userOptions.testOptions.extends;
+ }
+
+ // Include object rest spread support for Node.js versions that support it
+ // natively.
+ if (semver.satisfies(process.versions.node, '>= 8.3.0')) {
+ baseOptions.plugins.push(syntaxObjectRestSpreadPath);
+ }
}
const baseConfig = configManager.createConfig({
- dir: AVA_DIR, // Presets are resolved relative to this directory
+ dir: projectDir,
+ fileType: 'JSON',
hash: md5Hex(JSON.stringify(baseOptions)),
- json5: false,
options: baseOptions,
- source: SOURCE
+ source: '(AVA) baseConfig'
});
- if (userOptions !== 'default') {
- baseConfig.extend(configManager.createConfig({
+ let intermediateConfig = baseConfig;
+ if (userOptions && Object.keys(userOptions.testOptions).length > 0) {
+ // At this level, babelrc *must* be false.
+ const options = Object.assign({}, userOptions.testOptions, {babelrc: false});
+ // Any extends option has been applied in baseConfig.
+ delete options.extends;
+ intermediateConfig = configManager.createConfig({
+ dir: projectDir,
+ fileType: 'JSON',
+ hash: md5Hex(JSON.stringify(options)),
+ options,
+ source: path.join(projectDir, 'package.json') + '#ava.babel'
+ });
+ intermediateConfig.extend(baseConfig);
+ }
+
+ let finalConfig = intermediateConfig;
+ if (compileEnhancements) {
+ finalConfig = configManager.createConfig({
dir: projectDir,
- options: userOptions === 'inherit' ?
- {babelrc: true} :
- userOptions,
- source: path.join(projectDir, 'package.json') + '#ava.babel',
- hash: md5Hex(JSON.stringify(userOptions))
- }));
+ fileType: 'JSON',
+ hash: '', // This is deterministic, so no actual value necessary.
+ options: {
+ babelrc: false,
+ presets: [
+ [transformTestFilesPath, {powerAssert: true}]
+ ]
+ },
+ source: '(AVA) compileEnhancements'
+ });
+ finalConfig.extend(intermediateConfig);
}
const cache = configManager.prepareCache();
- return verifyExistingOptions(verifierFile, baseConfig, cache)
+ return verifyExistingOptions(verifierFile, finalConfig, cache, envName)
.then(cacheKeys => {
if (cacheKeys) {
return cacheKeys;
}
- return resolveOptions(baseConfig, cache, optionsFile, verifierFile);
+ return resolveOptions(finalConfig, cache, envName, optionsFile, verifierFile);
})
- .then(cacheKeys => ({
- getOptions: require(optionsFile).getOptions,
- // Include the seed in the cache keys used to store compilation results.
- cacheKeys: Object.assign({seed}, cacheKeys)
- }));
+ .then(cacheKeys => {
+ const getOptions = require(optionsFile).getOptions;
+ return {
+ getOptions() {
+ return getOptions(envName, cache);
+ },
+ // Include the seed in the cache keys used to store compilation results.
+ cacheKeys: Object.assign({seed}, cacheKeys)
+ };
+ });
}
module.exports = {
diff --git a/lib/caching-precompiler.js b/lib/caching-precompiler.js
index d7fc5e91a..cba756857 100644
--- a/lib/caching-precompiler.js
+++ b/lib/caching-precompiler.js
@@ -16,11 +16,7 @@ function getSourceMap(filePath, code) {
sourceMap = convertSourceMap.fromMapFileSource(code, dirPath);
}
- if (sourceMap) {
- sourceMap = sourceMap.toObject();
- }
-
- return sourceMap;
+ return sourceMap ? sourceMap.toObject() : undefined;
}
class CachingPrecompiler {
@@ -45,7 +41,7 @@ class CachingPrecompiler {
// Conditionally called by caching-transform when precompiling is required
_init() {
- this.babel = require('babel-core');
+ this.babel = require('@babel/core');
return this._transform;
}
@@ -84,7 +80,7 @@ class CachingPrecompiler {
_createTransform() {
const salt = packageHash.sync([
require.resolve('../package.json'),
- require.resolve('babel-core/package.json')
+ require.resolve('@babel/core/package.json')
], this.babelCacheKeys);
return cachingTransform({
diff --git a/lib/cli.js b/lib/cli.js
index 0c2c2f82f..a95c7a94f 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -37,7 +37,6 @@ exports.run = () => {
--tap, -t Generate TAP output
--verbose, -v Enable verbose output
--no-cache Disable the transpiler cache
- --no-power-assert Disable Power Assert
--color Force color output
--no-color Disable color output
--match, -m Only run tests with matching title (Can be repeated)
@@ -80,7 +79,6 @@ exports.run = () => {
failFast: conf.failFast,
init: conf.init,
match: conf.match,
- powerAssert: conf.powerAssert,
serial: conf.serial,
tap: conf.tap,
timeout: conf.timeout,
@@ -140,7 +138,7 @@ exports.run = () => {
serial: conf.serial,
require: arrify(conf.require),
cacheEnabled: conf.cache !== false,
- powerAssert: conf.powerAssert !== false,
+ compileEnhancements: conf.compileEnhancements !== false,
explicitTitles: conf.watch,
match: arrify(conf.match),
babelConfig: babelConfigHelper.validate(conf.babel),
diff --git a/lib/enhance-assert.js b/lib/enhance-assert.js
index 6991caf40..ac8e6d735 100644
--- a/lib/enhance-assert.js
+++ b/lib/enhance-assert.js
@@ -1,7 +1,7 @@
'use strict';
const concordance = require('concordance');
const dotProp = require('dot-prop');
-const generate = require('babel-generator').default;
+const generate = require('@babel/generator').default;
const concordanceOptions = require('./concordance-options').default;
// When adding patterns, don't forget to add to
@@ -16,7 +16,7 @@ const PATTERNS = [
't.notRegex(contents, regex, [message])'
];
-const computeStatement = node => generate(node, {quotes: 'single'}).code;
+const computeStatement = node => generate(node).code;
const getNode = (ast, path) => dotProp.get(ast, path.replace(/\//g, '.'));
const formatter = context => {
diff --git a/package-lock.json b/package-lock.json
index df6c2c61d..92dd998c8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,54 +5,34 @@
"requires": true,
"dependencies": {
"@ava/babel-plugin-throws-helper": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz",
- "integrity": "sha1-L8H+PCEacQcaTsp7j3r1hCzRrnw="
+ "version": "3.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-3.0.0-beta.1.tgz",
+ "integrity": "sha512-R2A1xb8shFuQ6wVyzi4Fl4MtNbx9WeahLoPPZkQgiPGv6Mz+IOyhGUV1I9yk/BECHCi9LFzBmUmbmj5EXtSY5Q=="
},
"@ava/babel-preset-stage-4": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz",
- "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==",
- "requires": {
- "babel-plugin-check-es2015-constants": "6.22.0",
- "babel-plugin-syntax-trailing-function-commas": "6.22.0",
- "babel-plugin-transform-async-to-generator": "6.24.1",
- "babel-plugin-transform-es2015-destructuring": "6.23.0",
- "babel-plugin-transform-es2015-function-name": "6.24.1",
- "babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
- "babel-plugin-transform-es2015-parameters": "6.24.1",
- "babel-plugin-transform-es2015-spread": "6.22.0",
- "babel-plugin-transform-es2015-sticky-regex": "6.24.1",
- "babel-plugin-transform-es2015-unicode-regex": "6.24.1",
- "babel-plugin-transform-exponentiation-operator": "6.24.1",
- "package-hash": "1.2.0"
- },
- "dependencies": {
- "md5-hex": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz",
- "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=",
- "requires": {
- "md5-o-matic": "0.1.1"
- }
- },
- "package-hash": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-1.2.0.tgz",
- "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=",
- "requires": {
- "md5-hex": "1.3.0"
- }
- }
+ "version": "2.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-2.0.0-beta.1.tgz",
+ "integrity": "sha512-6lWnbxCSkU33eiwzqZ7U+b7LdkpagAmQMtWIn2lT9sTdNmV8fcNM0pVRYCCdiaYJczVHtZ9/aBs+EocWLRlS5Q==",
+ "requires": {
+ "@babel/plugin-check-constants": "7.0.0-beta.38",
+ "@babel/plugin-transform-async-to-generator": "7.0.0-beta.38",
+ "@babel/plugin-transform-destructuring": "7.0.0-beta.38",
+ "@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.38",
+ "@babel/plugin-transform-function-name": "7.0.0-beta.38",
+ "@babel/plugin-transform-modules-commonjs": "7.0.0-beta.38",
+ "@babel/plugin-transform-parameters": "7.0.0-beta.38",
+ "@babel/plugin-transform-spread": "7.0.0-beta.38",
+ "@babel/plugin-transform-sticky-regex": "7.0.0-beta.38",
+ "@babel/plugin-transform-unicode-regex": "7.0.0-beta.38"
}
},
"@ava/babel-preset-transform-test-files": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-3.0.0.tgz",
- "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=",
+ "version": "4.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-4.0.0-beta.1.tgz",
+ "integrity": "sha512-IcOh5qIsqhAd8ssK+nJIjl2fcKMx/iwPjN+VxVp+DV0kgzQ7azAJHWP5lFXQ+RgdA3X5C5vgxFAPdU03xAZNhg==",
"requires": {
- "@ava/babel-plugin-throws-helper": "2.0.0",
- "babel-plugin-espower": "2.3.2"
+ "@ava/babel-plugin-throws-helper": "3.0.0-beta.1",
+ "babel-plugin-espower": "3.0.0-beta.1"
}
},
"@ava/write-file-atomic": {
@@ -65,6 +45,520 @@
"slide": "1.1.6"
}
},
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz",
+ "integrity": "sha512-JNHofQND7Iiuy3f6RXSillN1uBe87DAp+1ktsBfSxfL3xWeGFyJC9jH5zu2zs7eqVGp2qXWvJZFiJIwOYnaCQw==",
+ "requires": {
+ "chalk": "2.0.1",
+ "esutils": "2.0.2",
+ "js-tokens": "3.0.1"
+ }
+ },
+ "@babel/core": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.0.0-beta.38.tgz",
+ "integrity": "sha512-xIDdSeSElby0p6QMowawWrU9VulpMk1yq6RaKYjaZBRT7s40kztTsDw8+VUVuQmdRbqLh8DpLWs15oaUWphsPg==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/generator": "7.0.0-beta.38",
+ "@babel/helpers": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "convert-source-map": "1.5.1",
+ "debug": "3.0.1",
+ "json5": "0.5.1",
+ "lodash": "4.17.4",
+ "micromatch": "2.3.11",
+ "resolve": "1.5.0",
+ "source-map": "0.5.6"
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz",
+ "integrity": "sha512-JNHofQND7Iiuy3f6RXSillN1uBe87DAp+1ktsBfSxfL3xWeGFyJC9jH5zu2zs7eqVGp2qXWvJZFiJIwOYnaCQw==",
+ "requires": {
+ "chalk": "2.0.1",
+ "esutils": "2.0.2",
+ "js-tokens": "3.0.1"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.38.tgz",
+ "integrity": "sha512-vLOtqh2PMbvOXL/+DlwH6A2/y+81l518Z0x7232T4E8HiMBQbkv3rNg4GmjJ5M6GcZzj7UKTBrVt8AXcH4OTdA==",
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ty3muWaxHPcvdwihBWqGBD+s+hjt4Tua3In43eA4BvLMKWtTYsJBGdLoWQUY4TXhVgDe7wPzqxIv2AUbnIh/vQ==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ygOSe1+ekKVkn5zxCH0rqv5sZtvLfC72yPQSaXLTHtYSYdAyXNqOW7q1ua1zJll9glk0UWYAnUEcehQXXc3fEA==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.38.tgz",
+ "integrity": "sha512-qbrc59aPCnMCj3uroG7QXdFMmrFLFvEfcwfVzmF2MXh2a7OhRzs73g/PNN8Xb0W/4Z1H4ZTY95CczmfDmXapnw==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/generator": "7.0.0-beta.38",
+ "@babel/helper-function-name": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "debug": "3.0.1",
+ "globals": "11.1.0",
+ "invariant": "2.2.2",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.38.tgz",
+ "integrity": "sha512-SAtyEjmA7KiEoL2eAOAUM6M9arQJGWxJKK0S9x0WyPOosHS420RXoxPhn57u/8orRnK8Kxm0nHQQNTX203cP1Q==",
+ "requires": {
+ "esutils": "2.0.2",
+ "lodash": "4.17.4",
+ "to-fast-properties": "2.0.0"
+ }
+ },
+ "babylon": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ukc+RoVsxNjsFGTgXtCGr/RcNHQ4/OKBZQ2B6C2XBQwrbxXGWxgOMF9xgQ2WAQJQtvur3N6xakpIGMRNfGtt8Q=="
+ },
+ "globals": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.1.0.tgz",
+ "integrity": "sha512-uEuWt9mqTlPDwSqi+sHjD4nWU/1N+q0fiWI9T1mZpD2UENqX20CFD5T/ziLZvztPaBKl7ZylUi1q6Qfm7E2CiQ=="
+ },
+ "resolve": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
+ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
+ "requires": {
+ "path-parse": "1.0.5"
+ }
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.38.tgz",
+ "integrity": "sha512-aOHQPhsEyaB6p2n+AK981+onHoc+Ork9rcAQVSUJR33wUkGiWRpu6/C685knRyIZVsKeSdG5Q4xMiYeFUhuLzA==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38",
+ "jsesc": "2.5.1",
+ "lodash": "4.17.4",
+ "source-map": "0.5.6",
+ "trim-right": "1.0.1"
+ },
+ "dependencies": {
+ "@babel/types": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.38.tgz",
+ "integrity": "sha512-SAtyEjmA7KiEoL2eAOAUM6M9arQJGWxJKK0S9x0WyPOosHS420RXoxPhn57u/8orRnK8Kxm0nHQQNTX203cP1Q==",
+ "requires": {
+ "esutils": "2.0.2",
+ "lodash": "4.17.4",
+ "to-fast-properties": "2.0.0"
+ }
+ },
+ "jsesc": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
+ "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ }
+ }
+ },
+ "@babel/helper-annotate-as-pure": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.38.tgz",
+ "integrity": "sha512-7k67bppxvfSS+hu2yiDeuVTf8GHOlz8haHwRJZDXiXwjm2IBqEYYA6Dvi+xNMHy05pZVBy012qpS7BpguXoW4A==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-builder-binary-assignment-operator-visitor": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-beta.38.tgz",
+ "integrity": "sha512-CgTc4zaS4dLCKIMzCP9Q4Uhy9upBCFcA3NY7ZNwF+6S8BRCcNwoyTh2eHGt5ct1tM+Vd3VI6iIORIhqYzjHuXA==",
+ "requires": {
+ "@babel/helper-explode-assignable-expression": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-call-delegate": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.38.tgz",
+ "integrity": "sha512-73K4lywDxQTHlBEcF7YJBvBMpIxd0CTvmWjJ2pVqnkMGPmLTzWLNsrDEoJdv5ri9RXT0YJIoMPlqPBsM4FBIow==",
+ "requires": {
+ "@babel/helper-hoist-variables": "7.0.0-beta.38",
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-explode-assignable-expression": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-beta.38.tgz",
+ "integrity": "sha512-bSaaJpH0Yt5iKlZ9KJkrZTIkyLcrRW14z9Pt5Jh+DDXzW+3/F0wfHzoPn5qlnad70LeW5OHO8J8PriRKSqLTkg==",
+ "requires": {
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.38.tgz",
+ "integrity": "sha512-vLOtqh2PMbvOXL/+DlwH6A2/y+81l518Z0x7232T4E8HiMBQbkv3rNg4GmjJ5M6GcZzj7UKTBrVt8AXcH4OTdA==",
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ty3muWaxHPcvdwihBWqGBD+s+hjt4Tua3In43eA4BvLMKWtTYsJBGdLoWQUY4TXhVgDe7wPzqxIv2AUbnIh/vQ==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-hoist-variables": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.38.tgz",
+ "integrity": "sha512-bn4shp3AGjRDmCsq4lKxTjOWSak+3wNGaDjc9ePmk0fMfua1HcDpxQ7d84lweq6tvHMOgXK8dhu/zj36r8SNvQ==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-module-imports": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.38.tgz",
+ "integrity": "sha512-A/KUU0SC25pgI7k0K4habJqOYu9sp0UsMz3lRl26cIWhaLb5e9QRfCn1nmPnkBgCjc6IZl7pOxu4511Qfo/YxQ==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/helper-module-transforms": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.38.tgz",
+ "integrity": "sha512-MnluW457L9EAykzbGYTx9mF1SUXO0Brh1UrNSSGu/C+VjMXf4EmQ9RCWOaGT3WCxLVp063xS8ejkdjGwAJqIDw==",
+ "requires": {
+ "@babel/helper-module-imports": "7.0.0-beta.38",
+ "@babel/helper-simple-access": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/helper-regex": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ovwkKMmLkZspr7ge5y8w7JQoO1MXPXcp8UaLxcmP5Akw0uAmISvd4vGFy4tpwtnsgPU1N7J5NyomTdMPqn78Aw==",
+ "requires": {
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/helper-remap-async-to-generator": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-beta.38.tgz",
+ "integrity": "sha512-7V2WVMz5KRLxE33p1lb4SduDxoLF8TQ4rTGi9rzpEuly8KnlLkZR0ts62hnqZYVyBB3Gq1nfOgLG56AvflBgOg==",
+ "requires": {
+ "@babel/helper-annotate-as-pure": "7.0.0-beta.38",
+ "@babel/helper-wrap-function": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-simple-access": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.38.tgz",
+ "integrity": "sha512-Az+xsA1KgBrnpTjpqaNoL84a2g3gZCluf45MFijTuImZtoqg3TbObOdwOnbBy/qyNYRBCJ2Qexf7hNRb2xhLaQ==",
+ "requires": {
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/helper-wrap-function": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.38.tgz",
+ "integrity": "sha512-JQY2Hc/NCuVukBavW2mA7GqWZlpScXpurmviG+hKAvxpci5ZdsmocgwOAKWpO+u18OyI0PrZ5lUTGnjlaq0j9A==",
+ "requires": {
+ "@babel/helper-function-name": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helpers": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.0.0-beta.38.tgz",
+ "integrity": "sha512-DNdEZABrx2oNSpqijJHjxR/V36hMIQgFkdgv/iQsJ7xhXhObIrH1FMXsd3jbnlgblTc/7/hYed6wNKYxxXX0eQ==",
+ "requires": {
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/traverse": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz",
+ "integrity": "sha512-JNHofQND7Iiuy3f6RXSillN1uBe87DAp+1ktsBfSxfL3xWeGFyJC9jH5zu2zs7eqVGp2qXWvJZFiJIwOYnaCQw==",
+ "requires": {
+ "chalk": "2.0.1",
+ "esutils": "2.0.2",
+ "js-tokens": "3.0.1"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.38.tgz",
+ "integrity": "sha512-vLOtqh2PMbvOXL/+DlwH6A2/y+81l518Z0x7232T4E8HiMBQbkv3rNg4GmjJ5M6GcZzj7UKTBrVt8AXcH4OTdA==",
+ "requires": {
+ "@babel/helper-get-function-arity": "7.0.0-beta.38",
+ "@babel/template": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ty3muWaxHPcvdwihBWqGBD+s+hjt4Tua3In43eA4BvLMKWtTYsJBGdLoWQUY4TXhVgDe7wPzqxIv2AUbnIh/vQ==",
+ "requires": {
+ "@babel/types": "7.0.0-beta.38"
+ }
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ygOSe1+ekKVkn5zxCH0rqv5sZtvLfC72yPQSaXLTHtYSYdAyXNqOW7q1ua1zJll9glk0UWYAnUEcehQXXc3fEA==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.38.tgz",
+ "integrity": "sha512-qbrc59aPCnMCj3uroG7QXdFMmrFLFvEfcwfVzmF2MXh2a7OhRzs73g/PNN8Xb0W/4Z1H4ZTY95CczmfDmXapnw==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/generator": "7.0.0-beta.38",
+ "@babel/helper-function-name": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "debug": "3.0.1",
+ "globals": "11.1.0",
+ "invariant": "2.2.2",
+ "lodash": "4.17.4"
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.38.tgz",
+ "integrity": "sha512-SAtyEjmA7KiEoL2eAOAUM6M9arQJGWxJKK0S9x0WyPOosHS420RXoxPhn57u/8orRnK8Kxm0nHQQNTX203cP1Q==",
+ "requires": {
+ "esutils": "2.0.2",
+ "lodash": "4.17.4",
+ "to-fast-properties": "2.0.0"
+ }
+ },
+ "babylon": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ukc+RoVsxNjsFGTgXtCGr/RcNHQ4/OKBZQ2B6C2XBQwrbxXGWxgOMF9xgQ2WAQJQtvur3N6xakpIGMRNfGtt8Q=="
+ },
+ "globals": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.1.0.tgz",
+ "integrity": "sha512-uEuWt9mqTlPDwSqi+sHjD4nWU/1N+q0fiWI9T1mZpD2UENqX20CFD5T/ziLZvztPaBKl7ZylUi1q6Qfm7E2CiQ=="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ }
+ }
+ },
+ "@babel/plugin-check-constants": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz",
+ "integrity": "sha512-MjdGn/2sMLu0fnNFbkILut0OsegzRTeCOJ/uGHH88TwTXPzxONx2cTVJ36i3cTQXHMiIOUT3hX6HqzWM99Q6vA=="
+ },
+ "@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ecDBcMwYJaZQaj0xKJJpjvVS00HCqzvXFjdb2WrmTqjp9lrv/hlb7XLsSQsEtscbyyWgYasFkccjp5HVPN9Mtw=="
+ },
+ "@babel/plugin-transform-async-to-generator": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0-beta.38.tgz",
+ "integrity": "sha512-l3A58LHNzp/Q1l8SdinAoSNsCwR0Fe3YG8y+N19IAYG/wD5NWyYobTv19UXePe9RmPLg3dUBSTwGAcMXwZrxFQ==",
+ "requires": {
+ "@babel/helper-module-imports": "7.0.0-beta.38",
+ "@babel/helper-remap-async-to-generator": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-destructuring": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.38.tgz",
+ "integrity": "sha512-3DD17TSYkgmwBO+12pO3LP6RK8Pv7EGTLYOfBDU217mMnmC+xaGi4I5BFlTroK+1+IJLys3ObetRMobV4VU0bQ=="
+ },
+ "@babel/plugin-transform-exponentiation-operator": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-beta.38.tgz",
+ "integrity": "sha512-6FyrtyZswMw9rhf25hXoZEGWhuleB8zWdzU7kmgh1Pztm/Xv4tVBUHMevbOZIt3KCJQucpwhb/T58FrZ/mPwcg==",
+ "requires": {
+ "@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-function-name": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.38.tgz",
+ "integrity": "sha512-jvkRISpOr8b+bsnQ3d7oNgjUJqrtME2T8ken0Z8o98TY3YdFGwQVdpyWgoe5JKA5iV9WQK131en+LHj169R6gA==",
+ "requires": {
+ "@babel/helper-function-name": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-modules-commonjs": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ZOQ9vK2+FF3pYxjtqQkMoGkU2x8yMOWmc/DBCGptXN5F7ypOLE1DYl1qj+5j/PHLcLTBkZMTuC2yvjYdWQEn1A==",
+ "requires": {
+ "@babel/helper-module-transforms": "7.0.0-beta.38",
+ "@babel/helper-simple-access": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-parameters": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.38.tgz",
+ "integrity": "sha512-D8aOMPvzGSJ+7uDPoanWlZNM7/F6F6kffvT7f63qQtjktikwusknduy/4jXhEWWeOaQcUcDbirvxVT0abTS6SQ==",
+ "requires": {
+ "@babel/helper-call-delegate": "7.0.0-beta.38",
+ "@babel/helper-get-function-arity": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-spread": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.38.tgz",
+ "integrity": "sha512-KQItm2CD8JthjpcmccTEoi4db9AJ0C4vPBy5Ds/AuIBqmFKBkWVanzyciUsX5yupNrZRYcbnCQ2hflDUpFIN8Q=="
+ },
+ "@babel/plugin-transform-sticky-regex": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-beta.38.tgz",
+ "integrity": "sha512-kwH7JLQ+UqDJK4ZkEimL/mMrRSTS/Agm8+EzEJomgr2P2xzSI7fHQ4a6F4m6PFFk3ZUpdF2TDp1V/7q4Hy8Etg==",
+ "requires": {
+ "@babel/helper-regex": "7.0.0-beta.38"
+ }
+ },
+ "@babel/plugin-transform-unicode-regex": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-beta.38.tgz",
+ "integrity": "sha512-yDlQX//HQusXLy+ujZvgt8JTKSU6b71/77KINIXb6utsegiy2qkJq6eoqmidpBh78ncEnK9zgtLjY3wt1PBDYQ==",
+ "requires": {
+ "@babel/helper-regex": "7.0.0-beta.38",
+ "regexpu-core": "4.1.3"
+ }
+ },
+ "@babel/template": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ygOSe1+ekKVkn5zxCH0rqv5sZtvLfC72yPQSaXLTHtYSYdAyXNqOW7q1ua1zJll9glk0UWYAnUEcehQXXc3fEA==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "lodash": "4.17.4"
+ },
+ "dependencies": {
+ "babylon": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ukc+RoVsxNjsFGTgXtCGr/RcNHQ4/OKBZQ2B6C2XBQwrbxXGWxgOMF9xgQ2WAQJQtvur3N6xakpIGMRNfGtt8Q=="
+ }
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.38.tgz",
+ "integrity": "sha512-qbrc59aPCnMCj3uroG7QXdFMmrFLFvEfcwfVzmF2MXh2a7OhRzs73g/PNN8Xb0W/4Z1H4ZTY95CczmfDmXapnw==",
+ "requires": {
+ "@babel/code-frame": "7.0.0-beta.38",
+ "@babel/generator": "7.0.0-beta.38",
+ "@babel/helper-function-name": "7.0.0-beta.38",
+ "@babel/types": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
+ "debug": "3.0.1",
+ "globals": "11.2.0",
+ "invariant": "2.2.2",
+ "lodash": "4.17.4"
+ },
+ "dependencies": {
+ "babylon": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ukc+RoVsxNjsFGTgXtCGr/RcNHQ4/OKBZQ2B6C2XBQwrbxXGWxgOMF9xgQ2WAQJQtvur3N6xakpIGMRNfGtt8Q=="
+ },
+ "globals": {
+ "version": "11.2.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.2.0.tgz",
+ "integrity": "sha512-RDC7Tj17I/56wpVvCVLSXtnn2Fo6CQZ9vaj+ARn+qlzm/ozbKQZe+j9fvHZCbSq+4JSGjTpKEt7p/AA1IKXRFA=="
+ }
+ }
+ },
+ "@babel/types": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.38.tgz",
+ "integrity": "sha512-SAtyEjmA7KiEoL2eAOAUM6M9arQJGWxJKK0S9x0WyPOosHS420RXoxPhn57u/8orRnK8Kxm0nHQQNTX203cP1Q==",
+ "requires": {
+ "esutils": "2.0.2",
+ "lodash": "4.17.4",
+ "to-fast-properties": "2.0.0"
+ },
+ "dependencies": {
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ }
+ }
+ },
"@concordance/react": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz",
@@ -131,9 +625,9 @@
}
},
"@std/esm": {
- "version": "0.19.1",
- "resolved": "https://registry.npmjs.org/@std/esm/-/esm-0.19.1.tgz",
- "integrity": "sha512-4Ph4hdaDIkt5sChK565oU16Wa9jcBwLbiNAMEB6fyQZlBw5uz3UpxTo/ZohjeILgJfNtb/l1HzVql1ys5s74Ww==",
+ "version": "0.19.7",
+ "resolved": "https://registry.npmjs.org/@std/esm/-/esm-0.19.7.tgz",
+ "integrity": "sha512-bPBbpu1vqgOOD70aMVG5tgioPdttKXQQFq6xodjZxVbPprtZIcm8NcTEJoB+/1QoH8z1TIqjaEN1Wm3YndnfNQ==",
"dev": true
},
"abbrev": {
@@ -273,7 +767,8 @@
"argv": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz",
- "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas="
+ "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=",
+ "dev": true
},
"arr-diff": {
"version": "2.0.0",
@@ -460,46 +955,11 @@
}
}
},
- "babel-core": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.24.1.tgz",
- "integrity": "sha1-jEKFZNzh4fQfszfsNPTDsCK1rYM=",
- "requires": {
- "babel-code-frame": "6.22.0",
- "babel-generator": "6.26.0",
- "babel-helpers": "6.24.1",
- "babel-messages": "6.23.0",
- "babel-register": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1",
- "babylon": "6.17.2",
- "convert-source-map": "1.5.1",
- "debug": "2.6.9",
- "json5": "0.5.1",
- "lodash": "4.17.4",
- "minimatch": "3.0.4",
- "path-is-absolute": "1.0.1",
- "private": "0.1.7",
- "slash": "1.0.0",
- "source-map": "0.5.6"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
"babel-generator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
"integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=",
+ "dev": true,
"requires": {
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
@@ -515,6 +975,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+ "dev": true,
"requires": {
"core-js": "2.4.1",
"regenerator-runtime": "0.11.0"
@@ -524,6 +985,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+ "dev": true,
"requires": {
"babel-runtime": "6.26.0",
"esutils": "2.0.2",
@@ -534,107 +996,17 @@
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
- "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
+ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+ "dev": true
},
"regenerator-runtime": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz",
- "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A=="
+ "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==",
+ "dev": true
}
}
},
- "babel-helper-builder-binary-assignment-operator-visitor": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
- "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=",
- "requires": {
- "babel-helper-explode-assignable-expression": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-call-delegate": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
- "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
- "requires": {
- "babel-helper-hoist-variables": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-explode-assignable-expression": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz",
- "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-function-name": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
- "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
- "requires": {
- "babel-helper-get-function-arity": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-get-function-arity": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
- "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-hoist-variables": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
- "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-helper-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz",
- "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1",
- "lodash": "4.17.4"
- }
- },
- "babel-helper-remap-async-to-generator": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz",
- "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=",
- "requires": {
- "babel-helper-function-name": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-helpers": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
- "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1"
- }
- },
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
@@ -643,168 +1015,24 @@
"babel-runtime": "6.23.0"
}
},
- "babel-plugin-check-es2015-constants": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
- "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
- "requires": {
- "babel-runtime": "6.23.0"
- }
- },
"babel-plugin-espower": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.3.2.tgz",
- "integrity": "sha1-VRa4/NsmyfDh2BYHSfbkxl5xJx4=",
+ "version": "3.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-3.0.0-beta.1.tgz",
+ "integrity": "sha512-mYTgLnrzk3zuevZWQZVIvu33cTleDiLKJe5LsdUEB5KDm4EI+u4GqcHahA5ZyOvKgTTJbpHXrGnz0v1cFYqnCQ==",
"requires": {
- "babel-generator": "6.26.0",
- "babylon": "6.17.2",
+ "@babel/generator": "7.0.0-beta.38",
+ "babylon": "7.0.0-beta.38",
"call-matcher": "1.0.1",
"core-js": "2.4.1",
"espower-location-detector": "1.0.0",
"espurify": "1.7.0",
"estraverse": "4.2.0"
- }
- },
- "babel-plugin-syntax-async-functions": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
- "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU="
- },
- "babel-plugin-syntax-exponentiation-operator": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz",
- "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4="
- },
- "babel-plugin-syntax-object-rest-spread": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
- "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
- },
- "babel-plugin-syntax-trailing-function-commas": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
- "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM="
- },
- "babel-plugin-transform-async-to-generator": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
- "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=",
- "requires": {
- "babel-helper-remap-async-to-generator": "6.24.1",
- "babel-plugin-syntax-async-functions": "6.13.0",
- "babel-runtime": "6.23.0"
- }
- },
- "babel-plugin-transform-es2015-destructuring": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
- "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
- "requires": {
- "babel-runtime": "6.23.0"
- }
- },
- "babel-plugin-transform-es2015-function-name": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
- "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
- "requires": {
- "babel-helper-function-name": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-plugin-transform-es2015-modules-commonjs": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz",
- "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=",
- "requires": {
- "babel-plugin-transform-strict-mode": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-plugin-transform-es2015-parameters": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
- "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
- "requires": {
- "babel-helper-call-delegate": "6.24.1",
- "babel-helper-get-function-arity": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-template": "6.24.1",
- "babel-traverse": "6.24.1",
- "babel-types": "6.24.1"
- }
- },
- "babel-plugin-transform-es2015-spread": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
- "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
- "requires": {
- "babel-runtime": "6.23.0"
- }
- },
- "babel-plugin-transform-es2015-sticky-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
- "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
- "requires": {
- "babel-helper-regex": "6.24.1",
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-plugin-transform-es2015-unicode-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
- "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
- "requires": {
- "babel-helper-regex": "6.24.1",
- "babel-runtime": "6.23.0",
- "regexpu-core": "2.0.0"
- }
- },
- "babel-plugin-transform-exponentiation-operator": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",
- "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",
- "requires": {
- "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1",
- "babel-plugin-syntax-exponentiation-operator": "6.13.0",
- "babel-runtime": "6.23.0"
- }
- },
- "babel-plugin-transform-strict-mode": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
- "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
- "requires": {
- "babel-runtime": "6.23.0",
- "babel-types": "6.24.1"
- }
- },
- "babel-register": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz",
- "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=",
- "requires": {
- "babel-core": "6.24.1",
- "babel-runtime": "6.23.0",
- "core-js": "2.4.1",
- "home-or-tmp": "2.0.0",
- "lodash": "4.17.4",
- "mkdirp": "0.5.1",
- "source-map-support": "0.4.18"
},
"dependencies": {
- "source-map-support": {
- "version": "0.4.18",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
- "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
- "requires": {
- "source-map": "0.5.6"
- }
+ "babylon": {
+ "version": "7.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.38.tgz",
+ "integrity": "sha512-ukc+RoVsxNjsFGTgXtCGr/RcNHQ4/OKBZQ2B6C2XBQwrbxXGWxgOMF9xgQ2WAQJQtvur3N6xakpIGMRNfGtt8Q=="
}
}
},
@@ -821,6 +1049,7 @@
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.24.1.tgz",
"integrity": "sha1-BK5RTx+Ts6JTfyoPYKWkX7gwgzM=",
+ "dev": true,
"requires": {
"babel-runtime": "6.23.0",
"babel-traverse": "6.24.1",
@@ -833,6 +1062,7 @@
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.24.1.tgz",
"integrity": "sha1-qzZnP9NW+aCUhlnnszjV/q2zFpU=",
+ "dev": true,
"requires": {
"babel-code-frame": "6.22.0",
"babel-messages": "6.23.0",
@@ -849,6 +1079,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -859,6 +1090,7 @@
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.24.1.tgz",
"integrity": "sha1-oTaHncFbNga9oNkMH8dDBML/CXU=",
+ "dev": true,
"requires": {
"babel-runtime": "6.23.0",
"esutils": "2.0.2",
@@ -1746,6 +1978,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
+ "dev": true,
"requires": {
"repeating": "2.0.1"
}
@@ -3251,15 +3484,6 @@
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
- "home-or-tmp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
- "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
- "requires": {
- "os-homedir": "1.0.2",
- "os-tmpdir": "1.0.2"
- }
- },
"hosted-git-info": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz",
@@ -3276,41 +3500,35 @@
}
},
"hullabaloo-config-manager": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.0.tgz",
- "integrity": "sha512-Y73/Famlt4ZESK0x/qDhC/lmJ73A92kAIIDgvHgiQ+anSlf5nfdMMVaNrfFrh/X6R0BBjp3aE/bAYZdRtvVv6A==",
+ "version": "2.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-2.0.0-beta.1.tgz",
+ "integrity": "sha512-9+UtlODAD8BWtYX7ORlroygdovMIpgopkeS5TQOCcjU9Z8CVX96rSerPCet8Z/KrBrfMrTEElixrwE7iICGlIA==",
"requires": {
- "codecov": "2.3.1",
- "dot-prop": "4.1.1",
- "es6-error": "4.0.2",
+ "dot-prop": "4.2.0",
"graceful-fs": "4.1.11",
- "indent-string": "3.1.0",
+ "indent-string": "3.2.0",
"json5": "0.5.1",
- "lodash.clonedeep": "4.5.0",
- "lodash.clonedeepwith": "4.5.0",
"lodash.isequal": "4.5.0",
"lodash.merge": "4.6.0",
"md5-hex": "2.0.0",
"package-hash": "2.0.0",
+ "pirates": "3.0.2",
"pkg-dir": "2.0.0",
- "resolve-from": "3.0.0",
- "safe-buffer": "5.1.1"
+ "resolve-from": "4.0.0"
},
"dependencies": {
- "codecov": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/codecov/-/codecov-2.3.1.tgz",
- "integrity": "sha1-fdqUXNWKH2CBAltbA+4Bou8g+G4=",
+ "dot-prop": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
+ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
"requires": {
- "argv": "0.0.2",
- "request": "2.77.0",
- "urlgrey": "0.4.4"
+ "is-obj": "1.0.1"
}
},
- "node-uuid": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
- "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc="
+ "indent-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
+ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok="
},
"pkg-dir": {
"version": "2.0.0",
@@ -3320,37 +3538,10 @@
"find-up": "2.1.0"
}
},
- "request": {
- "version": "2.77.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.77.0.tgz",
- "integrity": "sha1-KwDYIDDt7cyXCJ/6XYgQqcKqMUs=",
- "requires": {
- "aws-sign2": "0.6.0",
- "aws4": "1.6.0",
- "caseless": "0.11.0",
- "combined-stream": "1.0.5",
- "extend": "3.0.1",
- "forever-agent": "0.6.1",
- "form-data": "2.1.4",
- "har-validator": "2.0.6",
- "hawk": "3.1.3",
- "http-signature": "1.1.1",
- "is-typedarray": "1.0.0",
- "isstream": "0.1.2",
- "json-stringify-safe": "5.0.1",
- "mime-types": "2.1.15",
- "node-uuid": "1.4.8",
- "oauth-sign": "0.8.2",
- "qs": "6.3.2",
- "stringstream": "0.0.5",
- "tough-cookie": "2.3.2",
- "tunnel-agent": "0.4.3"
- }
- },
"resolve-from": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
- "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
}
}
},
@@ -4562,6 +4753,11 @@
"is-stream": "1.1.0"
}
},
+ "node-modules-regexp": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
+ "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
+ },
"node-pre-gyp": {
"version": "0.6.33",
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz",
@@ -5161,7 +5357,8 @@
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "dev": true
},
"os-locale": {
"version": "2.1.0",
@@ -5328,8 +5525,7 @@
"path-parse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
- "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
- "dev": true
+ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
},
"path-to-regexp": {
"version": "1.7.0",
@@ -5380,6 +5576,14 @@
"pinkie": "2.0.4"
}
},
+ "pirates": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/pirates/-/pirates-3.0.2.tgz",
+ "integrity": "sha512-c5CgUJq6H2k6MJz72Ak1F5sN9n9wlSlJyEnwvpm9/y3WB4E3pHBDT2c6PEiS1vyJvq2bUxUAIu0EGf8Cx4Ic7Q==",
+ "requires": {
+ "node-modules-regexp": "1.0.0"
+ }
+ },
"pkg-conf": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz",
@@ -5467,11 +5671,6 @@
"plur": "2.1.2"
}
},
- "private": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz",
- "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE="
- },
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
@@ -5700,9 +5899,17 @@
}
},
"regenerate": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz",
- "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA="
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz",
+ "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg=="
+ },
+ "regenerate-unicode-properties": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-5.1.3.tgz",
+ "integrity": "sha512-Yjy6t7jFQczDhYE+WVm7pg6gWYE258q4sUkk9qDErwXJIqx7jU9jGrMFHutJK/SRfcg7MEkXjGaYiVlOZyev/A==",
+ "requires": {
+ "regenerate": "1.3.3"
+ }
},
"regenerator-runtime": {
"version": "0.10.5",
@@ -5719,13 +5926,16 @@
}
},
"regexpu-core": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
- "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.1.3.tgz",
+ "integrity": "sha512-mB+njEzO7oezA57IbQxxd6fVPOeWKDmnGvJ485CwmfNchjHe5jWwqKepapmzUEj41yxIAqOg+C4LbXuJlkiO8A==",
"requires": {
- "regenerate": "1.3.2",
- "regjsgen": "0.2.0",
- "regjsparser": "0.1.5"
+ "regenerate": "1.3.3",
+ "regenerate-unicode-properties": "5.1.3",
+ "regjsgen": "0.3.0",
+ "regjsparser": "0.2.1",
+ "unicode-match-property-ecmascript": "1.0.3",
+ "unicode-match-property-value-ecmascript": "1.0.1"
}
},
"registry-auth-token": {
@@ -5746,14 +5956,14 @@
}
},
"regjsgen": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
- "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc="
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.3.0.tgz",
+ "integrity": "sha1-DuSj6SdkMM2iXx54nqbBW4ewy0M="
},
"regjsparser": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
- "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.2.1.tgz",
+ "integrity": "sha1-w3h1U/rwTndcMCEC7zRtmVAA7Bw=",
"requires": {
"jsesc": "0.5.0"
}
@@ -6886,6 +7096,11 @@
"resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz",
"integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I="
},
+ "unicode-canonical-property-names-ecmascript": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.3.tgz",
+ "integrity": "sha512-iG/2t0F2LAU8aZYPkX5gi7ebukHnr3sWFESpb+zPQeeaQwOkfoO6ZW17YX7MdRPNG9pCy+tjzGill+Ah0Em0HA=="
+ },
"unicode-length": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz",
@@ -6907,6 +7122,25 @@
}
}
},
+ "unicode-match-property-ecmascript": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.3.tgz",
+ "integrity": "sha512-nFcaBFcr08UQNF15ZgI5ISh3yUnQm7SJRRxwYrL5VYX46pS+6Q7TCTv4zbK+j6/l7rQt0mMiTL2zpmeygny6rA==",
+ "requires": {
+ "unicode-canonical-property-names-ecmascript": "1.0.3",
+ "unicode-property-aliases-ecmascript": "1.0.3"
+ }
+ },
+ "unicode-match-property-value-ecmascript": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.1.tgz",
+ "integrity": "sha512-lM8B0FDZQh9yYGgiabRQcyWicB27VLOolSBRIxsO7FeQPtg+79Oe7sC8Mzr8BObDs+G9CeYmC/shHo6OggNEog=="
+ },
+ "unicode-property-aliases-ecmascript": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.3.tgz",
+ "integrity": "sha512-TdDmDOTxEf2ad1g3ZBpM6cqKIb2nJpVlz1Q++casDryKz18tpeMBhSng9hjC1CTQCkOV9Rw2knlSB6iRo7ad1w=="
+ },
"unique-string": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
@@ -6957,7 +7191,8 @@
"urlgrey": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz",
- "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8="
+ "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=",
+ "dev": true
},
"user-home": {
"version": "2.0.0",
diff --git a/package.json b/package.json
index bbdf22744..c2b6673c7 100644
--- a/package.json
+++ b/package.json
@@ -61,9 +61,12 @@
"flow"
],
"dependencies": {
- "@ava/babel-preset-stage-4": "^1.1.0",
- "@ava/babel-preset-transform-test-files": "^3.0.0",
+ "@ava/babel-preset-stage-4": "^2.0.0-beta.1",
+ "@ava/babel-preset-transform-test-files": "^4.0.0-beta.1",
"@ava/write-file-atomic": "^2.2.0",
+ "@babel/core": "^7.0.0-beta.38",
+ "@babel/generator": "^7.0.0-beta.38",
+ "@babel/plugin-syntax-object-rest-spread": "^7.0.0-beta.38",
"@concordance/react": "^1.0.0",
"@ladjs/time-require": "^0.1.4",
"ansi-escapes": "^3.0.0",
@@ -74,9 +77,6 @@
"arrify": "^1.0.0",
"auto-bind": "^1.1.0",
"ava-init": "^0.2.0",
- "babel-core": "^6.17.0",
- "babel-generator": "^6.26.0",
- "babel-plugin-syntax-object-rest-spread": "^6.13.0",
"bluebird": "^3.0.0",
"caching-transform": "^1.0.0",
"chalk": "^2.0.1",
@@ -103,7 +103,7 @@
"get-port": "^3.0.0",
"globby": "^6.0.0",
"has-flag": "^2.0.0",
- "hullabaloo-config-manager": "^1.1.0",
+ "hullabaloo-config-manager": "^2.0.0-beta.1",
"ignore-by-default": "^1.0.0",
"import-local": "^0.1.1",
"indent-string": "^3.0.0",
diff --git a/profile.js b/profile.js
index 3067e663a..4ae43036e 100644
--- a/profile.js
+++ b/profile.js
@@ -37,7 +37,9 @@ Promise.longStackTraces();
const conf = pkgConf.sync('ava', {
defaults: {
- babel: 'default'
+ babel: {
+ testOptions: {}
+ }
}
});
@@ -76,7 +78,7 @@ const cacheDir = findCacheDir({
files: [file]
}) || uniqueTempDir();
-babelConfigHelper.build(process.cwd(), cacheDir, conf.babel, true)
+babelConfigHelper.build(process.cwd(), cacheDir, babelConfigHelper.validate(conf.babel), true)
.then(result => {
const precompiler = new CachingPrecompiler({
path: cacheDir,
diff --git a/readme.md b/readme.md
index ff4b58d35..033188bb0 100644
--- a/readme.md
+++ b/readme.md
@@ -45,7 +45,7 @@ Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/rea
- Includes TypeScript & Flow type definitions
- [Magic assert](#magic-assert)
- [Isolated environment for each test file](#process-isolation)
-- [Write your tests in ES2017](#es2017-support)
+- [Write your tests using the latest JavaScript syntax](#latest-javascript-support)
- [Promise support](#promise-support)
- [Generator function support](#generator-function-support)
- [Async function support](#async-function-support)
@@ -163,7 +163,6 @@ $ ava --help
--tap, -t Generate TAP output
--verbose, -v Enable verbose output
--no-cache Disable the transpiler cache
- --no-power-assert Disable Power Assert
--color Force color output
--no-color Disable color output
--match, -m Only run tests with matching title (Can be repeated)
@@ -266,11 +265,15 @@ All of the CLI options can be configured in the `ava` section of your `package.j
"failFast": true,
"failWithoutAssertions": false,
"tap": true,
- "powerAssert": false,
+ "compileEnhancements": false,
"require": [
- "babel-register"
+ "@babel/register"
],
- "babel": "inherit"
+ "babel": {
+ "testOptions": {
+ "babelrc": false
+ }
+ }
}
}
```
@@ -286,9 +289,9 @@ Arguments passed to the CLI will always take precedence over the configuration i
- `failWithoutAssertions`: if `false`, does not fail a test if it doesn't run [assertions](#assertions)
- `tap`: if `true`, enables the [TAP reporter](#tap-reporter)
- `snapshotDir`: specifies a fixed location for storing snapshot files. Use this if your snapshots are ending up in the wrong location
-- `powerAssert`: if `false`, disables [power-assert](https://github.com/power-assert-js/power-assert) which otherwise helps provide more descriptive error messages
+- `compileEnhancements`: if `false`, disables [power-assert](https://github.com/power-assert-js/power-assert) — which otherwise helps provide more descriptive error messages — and detection of improper use of the `t.throws()` assertion
- `require`: extra modules to require before tests are run. Modules are required in the [worker processes](#process-isolation)
-- `babel`: test file specific Babel options. See [ES2017 support](#es2017-support) for more details
+- `babel`: test file specific Babel options. See our [Babel recipe] for more details
Note that providing files on the CLI overrides the `files` option. If you've configured a glob pattern, for instance `test/**/*.test.js`, you may want to repeat it when using the CLI: `ava 'test/integration/*.test.js'`.
@@ -701,57 +704,15 @@ test(t => {
});
```
-### ES2017 support
+### Latest JavaScript support
-AVA comes with built-in support for ES2017 through [Babel 6](https://babeljs.io). Just write your tests in ES2017. No extra setup needed. You can use any Babel version in your project. We use our own bundled Babel with our [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) preset, as well as [custom transforms](https://github.com/avajs/babel-preset-transform-test-files) for test and helper files.
+AVA uses [Babel 7](https://babeljs.io) so you can use the latest JavaScript syntax in your tests. There is no extra setup required. You don't need to be using Babel in your own project for this to work either.
-The corresponding Babel config for AVA's setup is as follows:
+We aim support all [finished syntax proposals](https://github.com/tc39/proposals/blob/master/finished-proposals.md), as well as all syntax from ratified JavaScript versions (e.g. ES2017). See our [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) preset for the currently supported proposals.
-```json
-{
- "presets": [
- "@ava/stage-4",
- "@ava/transform-test-files"
- ]
-}
-```
-
-You can customize how AVA transpiles the test files through the `babel` option in AVA's [`package.json` configuration](#configuration). For example to override the presets you can use:
-
-```json
-{
- "ava": {
- "babel": {
- "presets": [
- "es2015",
- "stage-0",
- "react"
- ]
- }
- }
-}
-```
+Please note that we do not add or modify built-ins. For example, if you use [`Object.entries()`](https://github.com/tc39/proposal-object-values-entries) in your tests, they will crash in Node.js 6 which does not implement this method.
-You can also use the special `"inherit"` keyword. This makes AVA defer to the Babel config in your [`.babelrc` or `package.json` file](https://babeljs.io/docs/usage/babelrc/). This way your test files will be transpiled using the same config as your source files without having to repeat it just for AVA:
-
-```json
-{
- "babel": {
- "presets": [
- "es2015",
- "stage-0",
- "react"
- ]
- },
- "ava": {
- "babel": "inherit"
- }
-}
-```
-
-See AVA's [`.babelrc` recipe](docs/recipes/babelrc.md) for further examples and a more detailed explanation of configuration options.
-
-Note that AVA will *always* apply [a few internal plugins](docs/recipes/babelrc.md#notes) regardless of configuration, but they should not impact the behavior of your code.
+You can disable this syntax support, or otherwise customize AVA's Babel pipeline. See our [Babel recipe] for more details.
### TypeScript support
@@ -1179,7 +1140,7 @@ It's the [Andromeda galaxy](https://simple.wikipedia.org/wiki/Andromeda_galaxy).
- [When to use `t.plan()`](docs/recipes/when-to-use-plan.md)
- [Browser testing](docs/recipes/browser-testing.md)
- [TypeScript](docs/recipes/typescript.md)
-- [Configuring Babel](docs/recipes/babelrc.md)
+- [Configuring Babel][Babel recipe]
- [Testing React components](docs/recipes/react.md)
- [Testing Vue.js components](docs/recipes/vue.md)
- [JSPM and SystemJS](docs/recipes/jspm-systemjs.md)
@@ -1232,3 +1193,5 @@ It's the [Andromeda galaxy](https://simple.wikipedia.org/wiki/Andromeda_galaxy).
+
+[Babel recipe]: docs/recipes/babel.md
diff --git a/stage-4.js b/stage-4.js
new file mode 100644
index 000000000..26f08bf3f
--- /dev/null
+++ b/stage-4.js
@@ -0,0 +1 @@
+module.exports = require('@ava/babel-preset-stage-4');
diff --git a/test/api.js b/test/api.js
index 7cd598c02..b83255ee0 100644
--- a/test/api.js
+++ b/test/api.js
@@ -12,8 +12,7 @@ const ROOT_DIR = path.join(__dirname, '..');
function apiCreator(options) {
options = options || {};
- options.babelConfig = options.babelConfig || 'default';
- options.powerAssert = true;
+ options.babelConfig = options.babelConfig || {testOptions: {}};
options.projectDir = options.projectDir || ROOT_DIR;
options.resolveTestsFrom = options.resolveTestsFrom || options.projectDir;
const instance = new Api(options);
@@ -374,8 +373,8 @@ function generateTests(prefix, apiCreator) {
test(`${prefix} enhanced assertion formatting necessary whitespace and empty strings`, t => {
const expected = [
[
- /foo === '' && '' === foo/,
- /foo === ''/,
+ /foo === "" && "" === foo/,
+ /foo === ""/,
/foo/
],
[
@@ -385,9 +384,9 @@ function generateTests(prefix, apiCreator) {
/foo/
],
[
- /\[foo].filter\(item => {\n\s+return item === 'bar';\n}\).length > 0/,
- /\[foo].filter\(item => {\n\s+return item === 'bar';\n}\).length/,
- /\[foo].filter\(item => {\n\s+return item === 'bar';\n}\)/,
+ /\[foo].filter\(item => {\n\s+return item === "bar";\n}\).length > 0/,
+ /\[foo].filter\(item => {\n\s+return item === "bar";\n}\).length/,
+ /\[foo].filter\(item => {\n\s+return item === "bar";\n}\)/,
/\[foo]/,
/foo/
]
@@ -818,13 +817,14 @@ function generateTests(prefix, apiCreator) {
});
});
- test(`${prefix} Custom Babel Plugin Support`, t => {
+ test(`${prefix} babel.testOptions with a custom plugin`, t => {
t.plan(2);
const api = apiCreator({
babelConfig: {
- presets: ['@ava/stage-4'],
- plugins: [testCapitalizerPlugin]
+ testOptions: {
+ plugins: [testCapitalizerPlugin]
+ }
},
cacheEnabled: false,
projectDir: __dirname
@@ -842,8 +842,8 @@ function generateTests(prefix, apiCreator) {
}, t.threw);
});
- test(`${prefix} Default babel config doesn't use .babelrc`, t => {
- t.plan(2);
+ test(`${prefix} babel.testOptions.babelrc effectively defaults to true`, t => {
+ t.plan(3);
const api = apiCreator({
projectDir: path.join(__dirname, 'fixture/babelrc')
@@ -851,28 +851,30 @@ function generateTests(prefix, apiCreator) {
api.on('test-run', runStatus => {
runStatus.on('test', data => {
- t.is(data.title, 'foo');
+ t.ok((data.title === 'foo') || (data.title === 'repeated test: foo'));
});
});
return api.run()
.then(result => {
- t.is(result.passCount, 1);
+ t.is(result.passCount, 2);
});
});
- test(`${prefix} babelConfig:"inherit" uses .babelrc`, t => {
+ test(`${prefix} babel.testOptions.babelrc can explicitly be true`, t => {
t.plan(3);
const api = apiCreator({
- babelConfig: 'inherit',
+ babelConfig: {
+ testOptions: {babelrc: true}
+ },
cacheEnabled: false,
projectDir: path.join(__dirname, 'fixture/babelrc')
});
api.on('test-run', runStatus => {
runStatus.on('test', data => {
- t.ok((data.title === 'foo') || (data.title === 'repeated test: foo'));
+ t.ok(data.title === 'foo' || data.title === 'repeated test: foo');
});
});
@@ -882,34 +884,38 @@ function generateTests(prefix, apiCreator) {
});
});
- test(`${prefix} babelConfig:{babelrc:true} uses .babelrc`, t => {
- t.plan(3);
+ test(`${prefix} babel.testOptions.babelrc can explicitly be false`, t => {
+ t.plan(2);
const api = apiCreator({
- babelConfig: {babelrc: true},
+ babelConfig: {
+ testOptions: {babelrc: false}
+ },
cacheEnabled: false,
projectDir: path.join(__dirname, 'fixture/babelrc')
});
api.on('test-run', runStatus => {
runStatus.on('test', data => {
- t.ok(data.title === 'foo' || data.title === 'repeated test: foo');
+ t.is(data.title, 'foo');
});
});
return api.run()
.then(result => {
- t.is(result.passCount, 2);
+ t.is(result.passCount, 1);
});
});
- test(`${prefix} babelConfig:{babelrc:true, plugins:[...]} merges plugins with .babelrc`, t => {
+ test(`${prefix} babelConfig.testOptions merges plugins with .babelrc`, t => {
t.plan(3);
const api = apiCreator({
babelConfig: {
- plugins: [testCapitalizerPlugin],
- babelrc: true
+ testOptions: {
+ babelrc: true,
+ plugins: [testCapitalizerPlugin]
+ }
},
cacheEnabled: false,
projectDir: path.join(__dirname, 'fixture/babelrc')
@@ -917,7 +923,7 @@ function generateTests(prefix, apiCreator) {
api.on('test-run', runStatus => {
runStatus.on('test', data => {
- t.ok(data.title === 'FOO' || data.title === 'repeated test: FOO');
+ t.ok(data.title === 'FOO' || data.title === 'repeated test: foo');
});
});
@@ -927,13 +933,15 @@ function generateTests(prefix, apiCreator) {
});
});
- test(`${prefix} babelConfig:{extends:path, plugins:[...]} merges plugins with .babelrc`, t => {
+ test(`${prefix} babelConfig.testOptions with extends still merges plugins with .babelrc`, t => {
t.plan(3);
const api = apiCreator({
babelConfig: {
- plugins: [testCapitalizerPlugin],
- extends: path.join(__dirname, 'fixture/babelrc/.alt-babelrc')
+ testOptions: {
+ plugins: [testCapitalizerPlugin],
+ extends: path.join(__dirname, 'fixture/babelrc/.alt-babelrc')
+ }
},
cacheEnabled: false,
projectDir: path.join(__dirname, 'fixture/babelrc')
@@ -941,7 +949,7 @@ function generateTests(prefix, apiCreator) {
api.on('test-run', runStatus => {
runStatus.on('test', data => {
- t.ok(data.title === 'BAR' || data.title === 'repeated test: BAR');
+ t.ok(data.title === 'BAR' || data.title === 'repeated test: bar');
});
});
diff --git a/test/babel-config.js b/test/babel-config.js
index ab1898fd6..4ab9541d8 100644
--- a/test/babel-config.js
+++ b/test/babel-config.js
@@ -1,10 +1,10 @@
'use strict';
+const assert = require('assert');
const fs = require('fs');
const path = require('path');
const test = require('tap').test;
const makeDir = require('make-dir');
const uniqueTempDir = require('unique-temp-dir');
-const configManager = require('hullabaloo-config-manager');
const babelConfigHelper = require('../lib/babel-config');
@@ -23,141 +23,153 @@ function withNodeVersion(version, run) {
return promise;
}
-test('uses default presets when userOptions is "default"', t => {
- const userOptions = 'default';
- const powerAssert = true;
+function withNodeEnv(value, run) {
+ assert(!('NODE_ENV' in process.env));
+ process.env.NODE_ENV = value;
+ const reset = () => {
+ delete process.env.NODE_ENV;
+ };
+ const promise = new Promise(resolve => {
+ resolve(run());
+ });
+ promise.then(reset, reset);
+ return promise;
+}
+
+test('includes testOptions in Babel compilation', t => {
+ const customFile = require.resolve(fixture('babel-noop-plugin-or-preset'));
+ const custom = require(fixture('babel-noop-plugin-or-preset'));
+ const testOptions = {
+ plugins: [customFile],
+ presets: [customFile]
+ };
+ const compileEnhancements = true;
+
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, compileEnhancements)
+ .then(result => {
+ const options = result.getOptions();
+ t.false(options.babelrc);
+ if (options.plugins.length === 1) {
+ t.is(options.plugins[0][0].wrapped, custom);
+ } else {
+ t.is(options.plugins[1][0].wrapped, custom);
+ }
+ t.is(options.presets[0][0].wrapped, require('@ava/babel-preset-stage-4'));
+ t.is(options.presets[1][0].wrapped, custom);
+ t.is(options.presets[2][0].wrapped, require('@ava/babel-preset-transform-test-files'));
+ t.same(options.presets[2][1], {powerAssert: true});
+ });
+});
+
+test('testOptions can disable ava/stage-4', t => {
+ const testOptions = {
+ presets: [['module:ava/stage-4', false]]
+ };
+ const transpileEnhancements = true;
const projectDir = uniqueTempDir();
const cacheDir = path.join(projectDir, 'cache');
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, powerAssert)
+ fs.mkdirSync(projectDir);
+ fs.mkdirSync(path.join(projectDir, 'node_modules'));
+ fs.mkdirSync(path.join(projectDir, 'node_modules', 'ava'));
+ fs.writeFileSync(path.join(projectDir, 'node_modules', 'ava', 'stage-4.js'), `module.exports = require(${JSON.stringify(require.resolve('@ava/babel-preset-stage-4'))})`);
+
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, transpileEnhancements)
.then(result => {
const options = result.getOptions();
-
t.false(options.babelrc);
- t.same(options.presets, [
- require.resolve('@ava/babel-preset-stage-4'),
- [
- require.resolve('@ava/babel-preset-transform-test-files'),
- {powerAssert}
- ]
- ]);
+ t.is(options.presets[0][0].wrapped, require('@ava/babel-preset-stage-4'));
+ t.is(options.presets[0][1], false);
});
});
-test('uses options from babelrc when userOptions is "inherit"', t => {
- const userOptions = 'inherit';
- const powerAssert = true;
+test('uses "development" environment if NODE_ENV is the empty string', t => {
+ const compileEnhancements = true;
const projectDir = fixture('babelrc');
const cacheDir = path.join(uniqueTempDir(), 'cache');
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, powerAssert)
+ return withNodeEnv('', () => babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, compileEnhancements))
.then(result => {
const options = result.getOptions();
t.false(options.babelrc);
- t.same(options.plugins, [require.resolve(fixture('babel-plugin-test-doubler'))]);
- t.same(options.presets, [require.resolve('@ava/babel-preset-stage-4')]);
- const envOptions = options.env[configManager.currentEnv()];
- t.same(envOptions, {
- plugins: [],
- presets: [
- [
- require.resolve('@ava/babel-preset-transform-test-files'),
- {powerAssert}
- ]
- ]
- });
+ t.is(options.plugins[0][0].wrapped, require(fixture('babel-plugin-test-capitalizer')));
+ t.is(options.presets[0][0].wrapped, require('@ava/babel-preset-stage-4'));
+ t.is(options.presets[1][0].wrapped, require('@ava/babel-preset-transform-test-files'));
+ t.same(options.presets[1][1], {powerAssert: true});
});
});
-test('uses userOptions for babel options when userOptions is an object', t => {
- const custom = require.resolve(fixture('empty'));
- const userOptions = {
- presets: [custom],
- plugins: [custom]
- };
- const powerAssert = true;
+test('supports .babelrc.js files', t => {
+ const compileEnhancements = true;
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, powerAssert)
+ const projectDir = fixture('babelrc-js');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, compileEnhancements)
.then(result => {
const options = result.getOptions();
t.false(options.babelrc);
- t.same(options.presets, userOptions.presets);
- t.same(options.plugins, userOptions.plugins);
- t.same(options.env.development.presets, [
- [
- require.resolve('@ava/babel-preset-transform-test-files'),
- {powerAssert}
- ]
- ]);
+ t.is(options.plugins[0][0].wrapped, require(fixture('babel-plugin-test-doubler')));
+ t.is(options.presets[0][0].wrapped, require('@ava/babel-preset-stage-4'));
+ t.is(options.presets[1][0].wrapped, require('@ava/babel-preset-transform-test-files'));
+ t.same(options.presets[1][1], {powerAssert: true});
});
});
test('adds babel-plugin-syntax-object-rest-spread for node versions > 8.3.0', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
- return withNodeVersion('9.0.0', () => babelConfigHelper.build(projectDir, cacheDir, 'default', true))
+ return withNodeVersion('9.0.0', () => babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true))
.then(result => {
const options = result.getOptions();
- t.same(options.plugins, [
- require.resolve('babel-plugin-syntax-object-rest-spread')
- ]);
+ t.is(options.plugins[0][0].wrapped, require('@babel/plugin-syntax-object-rest-spread').default);
});
});
test('adds babel-plugin-syntax-object-rest-spread for node versions == 8.3.0', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
- return withNodeVersion('8.3.0', () => babelConfigHelper.build(projectDir, cacheDir, 'default', true))
+ return withNodeVersion('8.3.0', () => babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true))
.then(result => {
const options = result.getOptions();
- t.same(options.plugins, [
- require.resolve('babel-plugin-syntax-object-rest-spread')
- ]);
+ t.is(options.plugins[0][0].wrapped, require('@babel/plugin-syntax-object-rest-spread').default);
});
});
test('does not add babel-plugin-syntax-object-rest-spread for node versions < 8.3.0', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
- return withNodeVersion('8.2.0', () => babelConfigHelper.build(projectDir, cacheDir, 'default', true))
+ return withNodeVersion('8.2.0', () => babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true))
.then(result => {
const options = result.getOptions();
- t.same(options.plugins, []);
+ t.true(!options.plugins);
});
});
-test('should disable power-assert when powerAssert is false', t => {
- const userOptions = 'default';
- const powerAssert = false;
+test('should not include transform-test-files when compileEnhancements is false', t => {
+ const compileEnhancements = false;
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, powerAssert)
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, compileEnhancements)
.then(result => {
const options = result.getOptions();
t.false(options.babelrc);
- t.same(options.presets, [
- require.resolve('@ava/babel-preset-stage-4'),
- [
- require.resolve('@ava/babel-preset-transform-test-files'),
- {powerAssert}
- ]
- ]);
+ t.is(options.presets.length, 1);
});
});
test('caches and uses results', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
- return babelConfigHelper.build(projectDir, cacheDir, 'default', true)
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true)
.then(result => {
const files = fs.readdirSync(cacheDir);
t.is(files.length, 2);
@@ -171,7 +183,7 @@ test('caches and uses results', t => {
delete stats[1].atime;
delete stats[1].atimeMs;
- return babelConfigHelper.build(projectDir, cacheDir, 'default', true)
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true)
.then(result => {
const newStats = files.map(f => fs.statSync(path.join(cacheDir, f)));
delete newStats[0].atime;
@@ -185,18 +197,18 @@ test('caches and uses results', t => {
});
});
-test('discards cache if userOptions change', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
- const userOptions = {};
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, true)
+test('discards cache if testOptions change', t => {
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
+ const testOptions = {};
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, true)
.then(result => {
const files = fs.readdirSync(cacheDir);
const contents = files.map(f => fs.readFileSync(path.join(cacheDir, f), 'utf8'));
const firstCacheKeys = result.cacheKeys;
- userOptions.foo = 'bar';
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, true)
+ testOptions.foo = 'bar';
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, true)
.then(result => {
t.notSame(files.map(f => fs.readFileSync(path.join(cacheDir, f), 'utf8')), contents);
t.notSame(result.cacheKeys, firstCacheKeys);
@@ -205,24 +217,25 @@ test('discards cache if userOptions change', t => {
});
test('updates cached verifier if dependency hashes change', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
- const depFile = path.join(projectDir, 'plugin.js');
+ const projectDir = fixture('no-babel-config');
+ const tempDir = uniqueTempDir();
+ const cacheDir = path.join(tempDir, 'cache');
+ const depFile = path.join(tempDir, 'plugin.js');
makeDir.sync(cacheDir);
- fs.writeFileSync(depFile, 'foo');
+ fs.writeFileSync(depFile, 'module.exports = () => ({})');
- const userOptions = {
- plugins: ['./plugin.js']
+ const testOptions = {
+ plugins: [depFile]
};
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, true)
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, true)
.then(result => {
const verifierFile = fs.readdirSync(cacheDir).find(f => /\.verifier\.bin$/.test(f));
const contents = fs.readFileSync(path.join(cacheDir, verifierFile), 'utf8');
const firstCacheKeys = result.cacheKeys;
fs.writeFileSync(depFile, 'bar');
- return babelConfigHelper.build(projectDir, cacheDir, userOptions, true)
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions}, true)
.then(result => {
t.notSame(contents, fs.readFileSync(path.join(cacheDir, verifierFile), 'utf8'));
t.notSame(result.cacheKeys.dependencies, firstCacheKeys.dependencies);
@@ -232,18 +245,18 @@ test('updates cached verifier if dependency hashes change', t => {
});
test('crashes if cached files cannot be read', t => {
- const projectDir = uniqueTempDir();
- const cacheDir = path.join(projectDir, 'cache');
+ const projectDir = fixture('no-babel-config');
+ const cacheDir = path.join(uniqueTempDir(), 'cache');
t.plan(1);
- return babelConfigHelper.build(projectDir, cacheDir, 'default', true)
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true)
.then(() => {
for (const f of fs.readdirSync(cacheDir)) {
fs.unlinkSync(path.join(cacheDir, f));
fs.mkdirSync(path.join(cacheDir, f));
}
- return babelConfigHelper.build(projectDir, cacheDir, 'default', true)
+ return babelConfigHelper.build(projectDir, cacheDir, {testOptions: {}}, true)
.catch(err => {
t.is(err.code, 'EISDIR');
});
diff --git a/test/caching-precompiler.js b/test/caching-precompiler.js
index e84296cf0..740edd8e4 100644
--- a/test/caching-precompiler.js
+++ b/test/caching-precompiler.js
@@ -5,7 +5,7 @@ const test = require('tap').test;
const uniqueTempDir = require('unique-temp-dir');
const sinon = require('sinon');
const proxyquire = require('proxyquire');
-const babel = require('babel-core');
+const babel = require('@babel/core');
const fromMapFileSource = require('convert-source-map').fromMapFileSource;
const CachingPrecompiler = require('../lib/caching-precompiler');
@@ -87,7 +87,7 @@ test('disables babel cache', t => {
const tempDir = uniqueTempDir();
const CachingPrecompiler = proxyquire('../lib/caching-precompiler', {
- 'babel-core': Object.assign({}, babel, {
+ '@babel/core': Object.assign({}, babel, {
transform(code, options) {
t.same(process.env.BABEL_DISABLE_CACHE, '1');
return babel.transform(code, options);
diff --git a/test/cli.js b/test/cli.js
index 83014abb8..081961259 100644
--- a/test/cli.js
+++ b/test/cli.js
@@ -67,7 +67,7 @@ test('disallow invalid babel config shortcuts', t => {
let expectedOutput = '\n ';
expectedOutput += figures.cross + ' Unexpected Babel configuration for AVA.';
- expectedOutput += ' See https://github.com/avajs/ava#es2017-support for allowed values.';
+ expectedOutput += ' See https://github.com/avajs/ava/blob/master/docs/recipes/babel.md for allowed values.';
expectedOutput += '\n';
t.is(stderr, expectedOutput);
@@ -824,3 +824,43 @@ test('doesn\'t set NODE_ENV when it is set', t => {
t.end();
});
});
+
+test('skips test file compilation when babel=false and compileEnhancements=false', t => {
+ execCli(['import.js'], {dirname: 'fixture/no-babel-compilation'}, (err, stdout, stderr) => {
+ t.ok(err);
+ t.match(stderr, /SyntaxError: Unexpected (reserved word|token import)/);
+ t.end();
+ });
+});
+
+test('skips helper file compilation when babel=false and compileEnhancements=false', t => {
+ execCli(['require-helper.js'], {dirname: 'fixture/no-babel-compilation'}, (err, stdout, stderr) => {
+ t.ifError(err);
+ t.match(stderr, /1 passed/);
+ t.end();
+ });
+});
+
+test('no power-assert when babel=false and compileEnhancements=false', t => {
+ execCli(['no-power-assert.js'], {dirname: 'fixture/no-babel-compilation'}, (err, stdout, stderr) => {
+ t.ok(err);
+ t.notMatch(stripAnsi(stderr), /bool\n.*=> false/);
+ t.end();
+ });
+});
+
+test('skips stage-4 transform when babel=false and compileEnhancements=true', t => {
+ execCli(['import.js'], {dirname: 'fixture/just-enhancement-compilation'}, (err, stdout, stderr) => {
+ t.ok(err);
+ t.match(stderr, /SyntaxError: Unexpected (reserved word|token import)/);
+ t.end();
+ });
+});
+
+test('power-assert when babel=false and compileEnhancements=true', t => {
+ execCli(['power-assert.js'], {dirname: 'fixture/just-enhancement-compilation'}, (err, stdout, stderr) => {
+ t.ok(err);
+ t.match(stripAnsi(stderr), /bool\n.*=> false/);
+ t.end();
+ });
+});
diff --git a/test/fixture/_generate-source-map-initial.js b/test/fixture/_generate-source-map-initial.js
index 5a446d18d..ff70aba7a 100644
--- a/test/fixture/_generate-source-map-initial.js
+++ b/test/fixture/_generate-source-map-initial.js
@@ -1,7 +1,7 @@
'use strict';
const fs = require('fs');
const path = require('path');
-const babel = require('babel-core');
+const babel = require('@babel/core');
const transformed = babel.transform(`
import {mapFile} from 'source-map-fixtures';
diff --git a/test/fixture/babel-noop-plugin-or-preset.js b/test/fixture/babel-noop-plugin-or-preset.js
new file mode 100644
index 000000000..17f95feab
--- /dev/null
+++ b/test/fixture/babel-noop-plugin-or-preset.js
@@ -0,0 +1 @@
+module.exports = () => ({});
diff --git a/test/fixture/babelrc-js/.babelrc.js b/test/fixture/babelrc-js/.babelrc.js
new file mode 100644
index 000000000..7c8af964c
--- /dev/null
+++ b/test/fixture/babelrc-js/.babelrc.js
@@ -0,0 +1,7 @@
+module.exports = api => {
+ api.cache.forever();
+ return {
+ 'plugins': ['../babel-plugin-test-doubler'],
+ 'presets': ['@ava/stage-4']
+ };
+};
diff --git a/test/fixture/babelrc-js/package.json b/test/fixture/babelrc-js/package.json
new file mode 100644
index 000000000..daa8ae391
--- /dev/null
+++ b/test/fixture/babelrc-js/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "application-name",
+ "version": "0.0.1"
+}
diff --git a/test/fixture/babelrc-js/test.js b/test/fixture/babelrc-js/test.js
new file mode 100644
index 000000000..4da86f81c
--- /dev/null
+++ b/test/fixture/babelrc-js/test.js
@@ -0,0 +1,11 @@
+import test from '../../../';
+
+const fixture = [1, 2];
+
+test('foo', t => {
+ // Using destructuring to ensure it transpiles on Node.js 4
+ // since that is a Node.js 6 feature
+ const [one, two] = fixture;
+ t.is(one, 1);
+ t.is(two, 2);
+});
diff --git a/test/fixture/babelrc/.alt-babelrc b/test/fixture/babelrc/.alt-babelrc
index 53013ef80..dfbee3980 100644
--- a/test/fixture/babelrc/.alt-babelrc
+++ b/test/fixture/babelrc/.alt-babelrc
@@ -1,4 +1,3 @@
{
- "presets": ["@ava/stage-4"],
"plugins": ["../babel-plugin-foo-to-bar"]
}
diff --git a/test/fixture/babelrc/.babelrc b/test/fixture/babelrc/.babelrc
index 2c73538a1..08776fc24 100644
--- a/test/fixture/babelrc/.babelrc
+++ b/test/fixture/babelrc/.babelrc
@@ -1,4 +1,11 @@
{
"presets": ["@ava/stage-4"],
- "plugins": ["../babel-plugin-test-doubler"]
+ "env": {
+ "development": {
+ "plugins": ["../babel-plugin-test-capitalizer"]
+ },
+ "test": {
+ "plugins": ["../babel-plugin-test-doubler"],
+ }
+ }
}
diff --git a/test/fixture/just-enhancement-compilation/_helper.js b/test/fixture/just-enhancement-compilation/_helper.js
new file mode 100644
index 000000000..db7a73f4f
--- /dev/null
+++ b/test/fixture/just-enhancement-compilation/_helper.js
@@ -0,0 +1 @@
+import dependency from './dependency'; // eslint-disable-line no-unused-vars
diff --git a/test/fixture/just-enhancement-compilation/dependency.js b/test/fixture/just-enhancement-compilation/dependency.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/fixture/just-enhancement-compilation/import.js b/test/fixture/just-enhancement-compilation/import.js
new file mode 100644
index 000000000..db7a73f4f
--- /dev/null
+++ b/test/fixture/just-enhancement-compilation/import.js
@@ -0,0 +1 @@
+import dependency from './dependency'; // eslint-disable-line no-unused-vars
diff --git a/test/fixture/just-enhancement-compilation/package.json b/test/fixture/just-enhancement-compilation/package.json
new file mode 100644
index 000000000..43c1f864f
--- /dev/null
+++ b/test/fixture/just-enhancement-compilation/package.json
@@ -0,0 +1,6 @@
+{
+ "ava": {
+ "babel": false,
+ "compileEnhancements": true
+ }
+}
diff --git a/test/fixture/just-enhancement-compilation/power-assert.js b/test/fixture/just-enhancement-compilation/power-assert.js
new file mode 100644
index 000000000..b7e6fa92f
--- /dev/null
+++ b/test/fixture/just-enhancement-compilation/power-assert.js
@@ -0,0 +1,8 @@
+'use strict';
+
+const test = require('../../../');
+
+test(t => {
+ const bool = false;
+ t.true(bool);
+});
diff --git a/test/fixture/no-babel-compilation/_helper.js b/test/fixture/no-babel-compilation/_helper.js
new file mode 100644
index 000000000..db7a73f4f
--- /dev/null
+++ b/test/fixture/no-babel-compilation/_helper.js
@@ -0,0 +1 @@
+import dependency from './dependency'; // eslint-disable-line no-unused-vars
diff --git a/test/fixture/no-babel-compilation/dependency.js b/test/fixture/no-babel-compilation/dependency.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/fixture/no-babel-compilation/import.js b/test/fixture/no-babel-compilation/import.js
new file mode 100644
index 000000000..db7a73f4f
--- /dev/null
+++ b/test/fixture/no-babel-compilation/import.js
@@ -0,0 +1 @@
+import dependency from './dependency'; // eslint-disable-line no-unused-vars
diff --git a/test/fixture/no-babel-compilation/no-power-assert.js b/test/fixture/no-babel-compilation/no-power-assert.js
new file mode 100644
index 000000000..b7e6fa92f
--- /dev/null
+++ b/test/fixture/no-babel-compilation/no-power-assert.js
@@ -0,0 +1,8 @@
+'use strict';
+
+const test = require('../../../');
+
+test(t => {
+ const bool = false;
+ t.true(bool);
+});
diff --git a/test/fixture/no-babel-compilation/package.json b/test/fixture/no-babel-compilation/package.json
new file mode 100644
index 000000000..ee673a6d2
--- /dev/null
+++ b/test/fixture/no-babel-compilation/package.json
@@ -0,0 +1,6 @@
+{
+ "ava": {
+ "babel": false,
+ "compileEnhancements": false
+ }
+}
diff --git a/test/fixture/no-babel-compilation/require-helper.js b/test/fixture/no-babel-compilation/require-helper.js
new file mode 100644
index 000000000..f2f158a3a
--- /dev/null
+++ b/test/fixture/no-babel-compilation/require-helper.js
@@ -0,0 +1,7 @@
+'use strict';
+
+const test = require('../../../');
+
+test(t => {
+ t.throws(() => require('./_helper'), SyntaxError);
+});
diff --git a/test/fixture/no-babel-config/.gitkeep b/test/fixture/no-babel-config/.gitkeep
new file mode 100644
index 000000000..e69de29bb