diff --git a/.gitignore b/.gitignore index d3e8cecde..7dfe0318f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ pnpm-debug.log .idea !packages/node-resolve/test/fixtures/**/node_modules +!packages/commonjs/test/**/node_modules diff --git a/README.md b/README.md index e3195c240..6e03cabba 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ This repository houses plugins that Rollup considers critical to every day use o | [auto-install](packages/auto-install) | Automatically install dependencies that are imported by a bundle. | | [beep](packages/beep) | System beeps on errors and warnings | | [buble](packages/buble) | Compile ES2015 with buble | +| [commonjs](packages/commonjs) | Convert CommonJS modules to ES6 | | [dsv](packages/dsv) | Convert .csv and .tsv files into JavaScript modules with d3-dsv | | [html](packages/html) | Creates HTML files to serve Rollup bundles | | [image](packages/image) | Import JPG, PNG, GIF, SVG, and WebP files | diff --git a/packages/commonjs/.eslintignore b/packages/commonjs/.eslintignore new file mode 100644 index 000000000..259714bbb --- /dev/null +++ b/packages/commonjs/.eslintignore @@ -0,0 +1,2 @@ +test/**/node_modules +test/fixtures/form diff --git a/packages/commonjs/CHANGELOG.md b/packages/commonjs/CHANGELOG.md new file mode 100644 index 000000000..43b2ffdc8 --- /dev/null +++ b/packages/commonjs/CHANGELOG.md @@ -0,0 +1,356 @@ +# @rollup/plugin-commonjs changelog + +## 11.0.0 + +_2019-12-13_ + +- **Breaking:** Minimum compatible Rollup version is 1.2.0 +- **Breaking:** Minimum supported Node version is 8.0.0 +- Published as @rollup/plugin-commonjs + +## 10.1.0 + +_2019-08-27_ + +- Normalize ids before looking up in named export map ([#406](https://github.com/rollup/rollup-plugin-commonjs/issues/406)) +- Update README.md with note on symlinks ([#405](https://github.com/rollup/rollup-plugin-commonjs/issues/405)) + +## 10.0.2 + +_2019-08-03_ + +- Support preserveSymlinks: false ([#401](https://github.com/rollup/rollup-plugin-commonjs/issues/401)) + +## 10.0.1 + +_2019-06-27_ + +- Make tests run with Node 6 again and update dependencies ([#389](https://github.com/rollup/rollup-plugin-commonjs/issues/389)) +- Handle builtins appropriately for resolve 1.11.0 ([#395](https://github.com/rollup/rollup-plugin-commonjs/issues/395)) + +## 10.0.0 + +_2019-05-15_ + +- Use new Rollup@1.12 context functions, fix issue when resolveId returns an object ([#387](https://github.com/rollup/rollup-plugin-commonjs/issues/387)) + +## 9.3.4 + +_2019-04-04_ + +- Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384)) +- Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385)) + +## 9.3.3 + +_2019-04-04_ + +- Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371)) + +## 9.3.2 + +_2019-04-04_ + +- Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303)) + +## 9.3.1 + +_2019-04-04_ + +- Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382)) + +## 9.3.0 + +_2019-04-03_ + +- Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363)) + +## 9.2.3 + +_2019-04-02_ + +- Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364)) +- Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372)) +- Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373)) + +## 9.2.2 + +_2019-03-25_ + +- Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379)) + +## 9.2.1 + +_2019-02-23_ + +- Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370)) + +## 9.2.0 + +_2018-10-10_ + +- Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349)) +- Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346)) + +## 9.1.8 + +_2018-09-18_ + +- Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327)) +- Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330)) + +## 9.1.6 + +_2018-08-24_ + +- Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338)) + +## 9.1.5 + +_2018-08-09_ + +- Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329)) + +## 9.1.4 + +_2018-07-27_ + +- Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320)) + +## 9.1.3 + +_2018-04-30_ + +- Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316)) + +## 9.1.2 + +_2018-04-30_ + +- Re-publication of 9.1.0 + +## 9.1.1 + +_2018-04-30_ + +- Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302)) + +## 9.1.0 + +- Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302)) + +## 9.0.0 + +- Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300)) + +## 8.4.1 + +- Re-release of 8.3.0 as #287 was actually a breaking change + +## 8.4.0 + +- Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285)) +- Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287)) +- Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288)) + +## 8.3.0 + +- Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283)) +- Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272)) +- Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264)) +- Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271)) + +## 8.2.4 + +- Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206)) + +## 8.2.3 + +- Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230)) +- Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226)) +- Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232)) + +## 8.2.1 + +- Fix magic-string deprecation warning + +## 8.2.0 + +- Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208)) + +## 8.1.1 + +- Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220)) + +## 8.1.0 + +- Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212)) +- Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195)) + +## 8.0.2 + +- Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181)) + +## 8.0.1 + +- Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179)) + +## 8.0.0 + +- Prefer the names dependencies are imported by for the common `var foo = require('foo')` pattern ([#176](https://github.com/rollup/rollup-plugin-commonjs/issues/176)) + +## 7.1.0 + +- Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174)) + +## 7.0.2 + +- Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158)) + +## 7.0.1 + +- Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168)) + +## 7.0.0 + +- Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151)) + +## 6.0.1 + +- Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127)) + +## 6.0.0 + +- Rewrite top-level `define` as `undefined`, so AMD-first UMD blocks do not cause breakage ([#144](https://github.com/rollup/rollup-plugin-commonjs/issues/144)) +- Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132)) +- Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116)) + +## 5.0.5 + +- Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120)) + +## 5.0.4 + +- Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112)) + +## 5.0.3 + +- Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35)) + +## 5.0.2 + +- Replace `require` (outside call expressions) with `commonjsRequire` helper ([#77](https://github.com/rollup/rollup-plugin-commonjs/issues/77), [#83](https://github.com/rollup/rollup-plugin-commonjs/issues/83)) + +## 5.0.1 + +- Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84)) + +## 5.0.0 + +- Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106)) +- Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96)) + +## 4.1.0 + +- Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93)) + +## 4.0.1 + +- Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86)) + +## 4.0.0 + +- Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92)) + +## 3.3.1 + +- Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554)) + +## 3.3.0 + +- Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43)) +- Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42)) + +## 3.2.0 + +- Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524)) + +## 3.1.0 + +- Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38)) +- Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63)) + +## 3.0.2 + +- Handle multiple references to `global` + +## 3.0.1 + +- Return a `name` + +## 3.0.0 + +- Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71)) +- Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50)) +- Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48)) + +## 2.2.1 + +- Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36)) + +## 2.2.0 + +- Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31)) + +## 2.1.0 + +- Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20)) +- Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18)) +- Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23)) +- Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21)) +- Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27)) + +## 2.0.0 + +- Support for transpiled modules – `exports.default` is used as the default export in place of `module.exports`, if applicable, and `__esModule` is not exported ([#16](https://github.com/rollup/rollup-plugin-commonjs/pull/16)) + +## 1.4.0 + +- Generate sourcemaps by default + +## 1.3.0 + +- Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6)) + +## 1.2.0 + +- Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5)) +- Handle shadowed `require`/`module`/`exports` + +## 1.1.0 + +- Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3)) +- Wrap modules in IIFE for more readable output + +## 1.0.0 + +- Stable release, now that Rollup supports plugins + +## 0.2.1 + +- Allow mixed CommonJS/ES6 imports/exports +- Use `var` instead of `let` + +## 0.2.0 + +- Sourcemap support +- Support `options.include` and `options.exclude` +- Bail early if module is obviously not a CommonJS module + +## 0.1.1 + +Add dist files to package (whoops!) + +## 0.1.0 + +- First release diff --git a/packages/commonjs/README.md b/packages/commonjs/README.md new file mode 100644 index 000000000..111f96848 --- /dev/null +++ b/packages/commonjs/README.md @@ -0,0 +1,172 @@ +[npm]: https://img.shields.io/npm/v/@rollup/plugin-commonjs +[npm-url]: https://www.npmjs.com/package/@rollup/plugin-commonjs +[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-commonjs +[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-commonjs + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/plugin-commonjs + +🍣 A Rollup plugin to convert CommonJS modules to ES6, so they can be included in a Rollup bundle + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. + +## Install + +Using npm: + +```bash +npm install @rollup/plugin-commonjs --save-dev +``` + +## Usage + +Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin: + +```js +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: 'src/index.js', + output: { + dir: 'output', + format: 'cjs' + }, + plugins: [commonjs()] +}; +``` + +Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api). + +## Options + +### `exclude` + +Type: `String` | `Array[...String]` +Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default non-CommonJS modules are ignored. + +### `include` + +Type: `String` | `Array(String)` \ +Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted. + +### `extensions` + +Type: `Array(String)` \ +Default: `['.js']` + +Search for extensions other than .js in the order specified. + +### `ignoreGlobal` + +Type: `Boolean` \ +Default: `false` + +If true, uses of `global` won't be dealt with by this plugin. + +### `sourceMap` + +Type: `Boolean` \ +Default: `true` + +If false, skips source map generation for CommonJS modules. + +### `namedExports` + +Type: `Object` \ +Default: `null` + +Explicitly specify unresolvable named exports. + +This plugin will attempt to create named exports, where appropriate, so you can do this... + +```js +// importer.js +import { named } from './exporter.js'; + +// exporter.js +module.exports = { named: 42 }; // or `exports.named = 42;` +``` + +...but that's not always possible: + +```js +// importer.js +import { named } from 'my-lib'; + +// my-lib.js +var myLib = exports; +myLib.named = "you can't see me"; +``` + +In those cases, you can specify custom named exports: + +```js +commonjs({ + namedExports: { + // left-hand side can be an absolute path, a path + // relative to the current directory, or the name + // of a module in node_modules + 'my-lib': ['named'] + } +}); +``` + +### `ignore` + +Type: `Array(String | (String) => Boolean)` \ +Default: `[]` + +Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing! + +## Using with @rollup/plugin-node-resolve + +Since most CommonJS packages you are importing are probably depdenencies in `node_modules`, you may need to use [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/packages/node-resolve): + +```js +// rollup.config.js +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: 'main.js', + output: { + file: 'bundle.js', + format: 'iife', + name: 'MyModule' + }, + plugins: [resolve(), commonjs()] +}; +``` + +## Usage with symlinks + +Symlinks are common in monorepos and are also created by the `npm link` command. Rollup with `@rollup/plugin-node-resolve` resolves modules to their real paths by default. So `include` and `exclude` paths should handle real paths rather than symlinked paths (e.g. `../common/node_modules/**` instead of `node_modules/**`). You may also use a regular expression for `include` that works regardless of base path. Try this: + +```js +commonjs({ + include: /node_modules/ +}); +``` + +Whether symlinked module paths are [realpathed](http://man7.org/linux/man-pages/man3/realpath.3.html) or preserved depends on Rollup's `preserveSymlinks` setting, which is false by default, matching Node.js' default behavior. Setting `preserveSymlinks` to true in your Rollup config will cause `import` and `export` to match based on symlinked paths instead. + +## Strict mode + +ES modules are _always_ parsed in strict mode. That means that certain non-strict constructs (like octal literals) will be treated as syntax errors when Rollup parses modules that use them. Some older CommonJS modules depend on those constructs, and if you depend on them your bundle will blow up. There's basically nothing we can do about that. + +Luckily, there is absolutely no good reason _not_ to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them. + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json new file mode 100644 index 000000000..17edadc50 --- /dev/null +++ b/packages/commonjs/package.json @@ -0,0 +1,91 @@ +{ + "name": "@rollup/plugin-commonjs", + "version": "11.0.0", + "publishConfig": { + "access": "public" + }, + "description": "Convert CommonJS modules to ES2015", + "license": "MIT", + "repository": "rollup/plugins", + "author": "Rich Harris ", + "homepage": "https://github.com/rollup/plugins/packages/commonjs/#readme", + "bugs": "https://github.com/rollup/plugins/issues", + "main": "dist/index.js", + "engines": { + "node": ">= 8.0.0" + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm run build && pnpm run lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint:docs": "prettier --single-quote --write README.md", + "lint:js": "eslint --fix --cache src test", + "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", + "prebuild": "del-cli dist", + "prepare": "pnpm run build", + "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run test:ts", + "pretest": "pnpm run build", + "test": "ava", + "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" + }, + "files": [ + "dist", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "npm", + "modules", + "commonjs", + "require" + ], + "peerDependencies": { + "rollup": "^1.20.0" + }, + "dependencies": { + "@rollup/pluginutils": "^3.0.0", + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + }, + "devDependencies": { + "@babel/core": "^7.4.5", + "@babel/preset-env": "^7.4.5", + "@babel/register": "^7.4.4", + "acorn": "^6.1.1", + "eslint": "^6.0.1", + "eslint-plugin-import": "^2.18.0", + "husky": "^2.4.1", + "lint-staged": "^8.2.1", + "locate-character": "^2.0.5", + "mocha": "^6.1.4", + "prettier": "^1.18.2", + "require-relative": "^0.8.7", + "rollup": "^1.16.2", + "rollup-plugin-babel": "^4.3.3", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-node-resolve": "^6.0.0", + "shx": "^0.3.2", + "source-map": "^0.6.1", + "source-map-support": "^0.5.12", + "typescript": "^3.5.2" + }, + "ava": { + "files": [ + "!**/fixtures/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "jsnext:main": "dist/index.es.js", + "module": "dist/index.es.js", + "types": "types/index.d.ts" +} diff --git a/packages/commonjs/rollup.config.js b/packages/commonjs/rollup.config.js new file mode 100644 index 000000000..21a6abb16 --- /dev/null +++ b/packages/commonjs/rollup.config.js @@ -0,0 +1,36 @@ +import babel from 'rollup-plugin-babel'; +import json from '@rollup/plugin-json'; + +import pkg from './package.json'; + +export default { + input: 'src/index.js', + plugins: [ + json(), + babel({ + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 6 + } + } + ] + ] + }) + ], + external: Object.keys(pkg.dependencies).concat(['fs', 'path']), + output: [ + { + file: pkg.module, + format: 'es', + sourcemap: true + }, + { + file: pkg.main, + format: 'cjs', + sourcemap: true + } + ] +}; diff --git a/packages/commonjs/src/ast-utils.js b/packages/commonjs/src/ast-utils.js new file mode 100644 index 000000000..1c4a557e9 --- /dev/null +++ b/packages/commonjs/src/ast-utils.js @@ -0,0 +1,98 @@ +/* eslint-disable no-undefined */ +export { default as isReference } from 'is-reference'; + +const operators = { + '==': (x) => equals(x.left, x.right, false), + + '!=': (x) => not(operators['=='](x)), + + '===': (x) => equals(x.left, x.right, true), + + '!==': (x) => not(operators['==='](x)), + + '!': (x) => isFalsy(x.argument), + + '&&': (x) => isTruthy(x.left) && isTruthy(x.right), + + '||': (x) => isTruthy(x.left) || isTruthy(x.right) +}; + +const extractors = { + Identifier(names, node) { + names.push(node.name); + }, + + ObjectPattern(names, node) { + node.properties.forEach((prop) => { + getExtractor(prop.value.type)(names, prop.value); + }); + }, + + ArrayPattern(names, node) { + node.elements.forEach((element) => { + if (!element) return; + getExtractor(element.type)(names, element); + }); + }, + + RestElement(names, node) { + getExtractor(node.argument.type)(names, node.argument); + }, + + AssignmentPattern(names, node) { + getExtractor(node.left.type)(names, node.left); + } +}; + +export function flatten(node) { + const parts = []; + + while (node.type === 'MemberExpression') { + if (node.computed) return null; + + parts.unshift(node.property.name); + // eslint-disable-next-line no-param-reassign + node = node.object; + } + + if (node.type !== 'Identifier') return null; + + const { name } = node; + parts.unshift(name); + + return { name, keypath: parts.join('.') }; +} + +export function extractNames(node) { + const names = []; + extractors[node.type](names, node); + return names; +} + +function getExtractor(type) { + const extractor = extractors[type]; + if (!extractor) throw new SyntaxError(`${type} pattern not supported.`); + return extractor; +} + +export function isTruthy(node) { + if (node.type === 'Literal') return !!node.value; + if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression); + if (node.operator in operators) return operators[node.operator](node); + return undefined; +} + +export function isFalsy(node) { + return not(isTruthy(node)); +} + +function not(value) { + return value === undefined ? value : !value; +} + +function equals(a, b, strict) { + if (a.type !== b.type) return undefined; + // eslint-disable-next-line eqeqeq + if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value; + return undefined; +} diff --git a/packages/commonjs/src/helpers.js b/packages/commonjs/src/helpers.js new file mode 100644 index 000000000..d99788129 --- /dev/null +++ b/packages/commonjs/src/helpers.js @@ -0,0 +1,30 @@ +export const PROXY_SUFFIX = '?commonjs-proxy'; +export const getProxyId = (id) => `\0${id}${PROXY_SUFFIX}`; +export const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length); + +export const EXTERNAL_SUFFIX = '?commonjs-external'; +export const getExternalProxyId = (id) => `\0${id}${EXTERNAL_SUFFIX}`; +export const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length); + +export const HELPERS_ID = '\0commonjsHelpers.js'; + +// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers. +// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled. +export const HELPERS = ` +export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +export function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +export function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +export function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +export function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +}`; diff --git a/packages/commonjs/src/index.js b/packages/commonjs/src/index.js new file mode 100644 index 000000000..176a573a1 --- /dev/null +++ b/packages/commonjs/src/index.js @@ -0,0 +1,180 @@ +import { realpathSync, existsSync } from 'fs'; +import { extname, resolve, normalize } from 'path'; + +import { sync as nodeResolveSync, isCore } from 'resolve'; +import { createFilter } from '@rollup/pluginutils'; + +import { peerDependencies } from '../package.json'; + +import { + EXTERNAL_SUFFIX, + getIdFromExternalProxyId, + getIdFromProxyId, + HELPERS, + HELPERS_ID, + PROXY_SUFFIX +} from './helpers'; +import { getIsCjsPromise, setIsCjsPromise } from './is-cjs'; +import getResolveId from './resolve-id'; +import { checkEsModule, hasCjsKeywords, transformCommonjs } from './transform'; +import { getName } from './utils'; + +export default function commonjs(options = {}) { + const extensions = options.extensions || ['.js']; + const filter = createFilter(options.include, options.exclude); + const { ignoreGlobal } = options; + + const customNamedExports = {}; + if (options.namedExports) { + Object.keys(options.namedExports).forEach((id) => { + let resolveId = id; + let resolvedId; + + if (isCore(id)) { + // resolve will not find npm modules with the same name as + // core modules without a trailing slash. Since core modules + // must be external, we can assume any core modules defined + // here are npm modules by that name. + resolveId += '/'; + } + + try { + resolvedId = nodeResolveSync(resolveId, { basedir: process.cwd() }); + } catch (err) { + resolvedId = resolve(id); + } + + // Note: customNamedExport's keys must be normalized file paths. + // resolve and nodeResolveSync both return normalized file paths + // so no additional normalization is necessary. + customNamedExports[resolvedId] = options.namedExports[id]; + + if (existsSync(resolvedId)) { + const realpath = realpathSync(resolvedId); + if (realpath !== resolvedId) { + customNamedExports[realpath] = options.namedExports[id]; + } + } + }); + } + + const esModulesWithoutDefaultExport = new Set(); + const esModulesWithDefaultExport = new Set(); + // TODO maybe this should be configurable? + const allowDynamicRequire = !!options.ignore; + + const ignoreRequire = + typeof options.ignore === 'function' + ? options.ignore + : Array.isArray(options.ignore) + ? (id) => options.ignore.includes(id) + : () => false; + + const resolveId = getResolveId(extensions); + + const sourceMap = options.sourceMap !== false; + + function transformAndCheckExports(code, id) { + const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id); + if (isEsModule) { + (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id); + return null; + } + + // it is not an ES module but it does not have CJS-specific elements. + if (!hasCjsKeywords(code, ignoreGlobal)) { + esModulesWithoutDefaultExport.add(id); + return null; + } + + const normalizedId = normalize(id); + + const transformed = transformCommonjs( + this.parse, + code, + id, + this.getModuleInfo(id).isEntry, + ignoreGlobal, + ignoreRequire, + customNamedExports[normalizedId], + sourceMap, + allowDynamicRequire, + ast + ); + if (!transformed) { + esModulesWithoutDefaultExport.add(id); + return null; + } + + return transformed; + } + + return { + name: 'commonjs', + + buildStart() { + const [major, minor] = this.meta.rollupVersion.split('.').map(Number); + const minVersion = peerDependencies.rollup.slice(2); + const [minMajor, minMinor] = minVersion.split('.').map(Number); + if (major < minMajor || (major === minMajor && minor < minMinor)) { + this.error( + `Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.` + ); + } + }, + + resolveId, + + load(id) { + if (id === HELPERS_ID) return HELPERS; + + // generate proxy modules + if (id.endsWith(EXTERNAL_SUFFIX)) { + const actualId = getIdFromExternalProxyId(id); + const name = getName(actualId); + + return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + } + + if (id.endsWith(PROXY_SUFFIX)) { + const actualId = getIdFromProxyId(id); + const name = getName(actualId); + + return getIsCjsPromise(actualId).then((isCjs) => { + if (isCjs) + return `import { __moduleExports } from ${JSON.stringify( + actualId + )}; export default __moduleExports;`; + else if (esModulesWithoutDefaultExport.has(actualId)) + return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + else if (esModulesWithDefaultExport.has(actualId)) { + return `export {default} from ${JSON.stringify(actualId)};`; + } + return `import * as ${name} from ${JSON.stringify( + actualId + )}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`; + }); + } + + return null; + }, + + transform(code, id) { + if (!filter(id) || extensions.indexOf(extname(id)) === -1) { + setIsCjsPromise(id, null); + return null; + } + + let transformed; + try { + transformed = transformAndCheckExports.call(this, code, id); + } catch (err) { + transformed = null; + this.error(err, err.loc); + } + + setIsCjsPromise(id, Boolean(transformed)); + return transformed; + } + }; +} diff --git a/packages/commonjs/src/is-cjs.js b/packages/commonjs/src/is-cjs.js new file mode 100644 index 000000000..695441e63 --- /dev/null +++ b/packages/commonjs/src/is-cjs.js @@ -0,0 +1,30 @@ +/* eslint-disable no-undefined */ +const isCjsPromises = new Map(); + +export function getIsCjsPromise(id) { + let isCjsPromise = isCjsPromises.get(id); + if (isCjsPromise) return isCjsPromise.promise; + + const promise = new Promise((resolve) => { + isCjsPromise = { + resolve, + promise: undefined + }; + isCjsPromises.set(id, isCjsPromise); + }); + isCjsPromise.promise = promise; + + return promise; +} + +export function setIsCjsPromise(id, resolution) { + const isCjsPromise = isCjsPromises.get(id); + if (isCjsPromise) { + if (isCjsPromise.resolve) { + isCjsPromise.resolve(resolution); + isCjsPromise.resolve = undefined; + } + } else { + isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined }); + } +} diff --git a/packages/commonjs/src/resolve-id.js b/packages/commonjs/src/resolve-id.js new file mode 100644 index 000000000..f60c79fd8 --- /dev/null +++ b/packages/commonjs/src/resolve-id.js @@ -0,0 +1,76 @@ +/* eslint-disable no-param-reassign, no-undefined */ +import { statSync } from 'fs'; +import { dirname, resolve, sep } from 'path'; + +import { + getExternalProxyId, + getIdFromProxyId, + getProxyId, + HELPERS_ID, + PROXY_SUFFIX +} from './helpers'; + +function getCandidatesForExtension(resolved, extension) { + return [resolved + extension, `${resolved}${sep}index${extension}`]; +} + +function getCandidates(resolved, extensions) { + return extensions.reduce( + (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), + [resolved] + ); +} + +export default function getResolveId(extensions) { + function resolveExtensions(importee, importer) { + // not our problem + if (importee[0] !== '.' || !importer) return undefined; + + const resolved = resolve(dirname(importer), importee); + const candidates = getCandidates(resolved, extensions); + + for (let i = 0; i < candidates.length; i += 1) { + try { + const stats = statSync(candidates[i]); + if (stats.isFile()) return { id: candidates[i] }; + } catch (err) { + /* noop */ + } + } + + return undefined; + } + + function resolveId(importee, importer) { + const isProxyModule = importee.endsWith(PROXY_SUFFIX); + if (isProxyModule) { + importee = getIdFromProxyId(importee); + } else if (importee.startsWith('\0')) { + if (importee === HELPERS_ID) { + return importee; + } + return null; + } + + if (importer && importer.endsWith(PROXY_SUFFIX)) { + importer = getIdFromProxyId(importer); + } + + return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => { + if (!resolved) { + resolved = resolveExtensions(importee, importer); + } + if (isProxyModule) { + if (!resolved) { + return { id: getExternalProxyId(importee), external: false }; + } + resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id); + resolved.external = false; + return resolved; + } + return resolved; + }); + } + + return resolveId; +} diff --git a/packages/commonjs/src/transform.js b/packages/commonjs/src/transform.js new file mode 100644 index 000000000..03060b455 --- /dev/null +++ b/packages/commonjs/src/transform.js @@ -0,0 +1,522 @@ +/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle */ +import { walk } from 'estree-walker'; +import MagicString from 'magic-string'; +import { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils'; + +import { flatten, isFalsy, isReference, isTruthy } from './ast-utils'; +import { getProxyId, HELPERS_ID } from './helpers'; +import { getName } from './utils'; + +const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split( + ' ' +); +const blacklist = { __esModule: true }; +reserved.forEach((word) => (blacklist[word] = true)); + +const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/; + +const firstpassGlobal = /\b(?:require|module|exports|global)\b/; +const firstpassNoGlobal = /\b(?:require|module|exports)\b/; +const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/; +const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/; + +function deconflict(scope, globals, identifier) { + let i = 1; + let deconflicted = identifier; + + while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) { + deconflicted = `${identifier}_${i}`; + i += 1; + } + scope.declarations[deconflicted] = true; + + return deconflicted; +} + +function tryParse(parse, code, id) { + try { + return parse(code, { allowReturnOutsideFunction: true }); + } catch (err) { + err.message += ` in ${id}`; + throw err; + } +} + +export function hasCjsKeywords(code, ignoreGlobal) { + const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal; + return firstpass.test(code); +} + +export function checkEsModule(parse, code, id) { + const ast = tryParse(parse, code, id); + + let isEsModule = false; + for (const node of ast.body) { + if (node.type === 'ExportDefaultDeclaration') + return { isEsModule: true, hasDefaultExport: true, ast }; + if (node.type === 'ExportNamedDeclaration') { + isEsModule = true; + for (const specifier of node.specifiers) { + if (specifier.exported.name === 'default') { + return { isEsModule: true, hasDefaultExport: true, ast }; + } + } + } else if (importExportDeclaration.test(node.type)) isEsModule = true; + } + + return { isEsModule, hasDefaultExport: false, ast }; +} + +export function transformCommonjs( + parse, + code, + id, + isEntry, + ignoreGlobal, + ignoreRequire, + customNamedExports, + sourceMap, + allowDynamicRequire, + astCache +) { + const ast = astCache || tryParse(parse, code, id); + + const magicString = new MagicString(code); + + const required = {}; + // Because objects have no guaranteed ordering, yet we need it, + // we need to keep track of the order in a array + const sources = []; + + let uid = 0; + + let scope = attachScopes(ast, 'scope'); + const uses = { module: false, exports: false, global: false, require: false }; + + let lexicalDepth = 0; + let programDepth = 0; + + const globals = new Set(); + + // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯ + const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers'); + + const namedExports = {}; + + // TODO handle transpiled modules + let shouldWrap = /__esModule/.test(code); + + function isRequireStatement(node) { + if (!node) return false; + if (node.type !== 'CallExpression') return false; + if (node.callee.name !== 'require' || scope.contains('require')) return false; + // Weird case of require() without arguments + if (node.arguments.length === 0) return false; + return true; + } + + function hasDynamicArguments(node) { + return ( + node.arguments.length > 1 || + (node.arguments[0].type !== 'Literal' && + (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0)) + ); + } + + function isStaticRequireStatement(node) { + if (!isRequireStatement(node)) return false; + if (hasDynamicArguments(node)) return false; + if (ignoreRequire(node.arguments[0].value)) return false; + return true; + } + + function getRequireStringArg(node) { + return node.arguments[0].type === 'Literal' + ? node.arguments[0].value + : node.arguments[0].quasis[0].value.cooked; + } + + function getRequired(node, name) { + const sourceId = getRequireStringArg(node); + const existing = required[sourceId]; + // eslint-disable-next-line no-undefined + if (existing === undefined) { + if (!name) { + do { + name = `require$$${uid}`; + uid += 1; + } while (scope.contains(name)); + } + + sources.push(sourceId); + required[sourceId] = { source: sourceId, name, importsDefault: false }; + } + + return required[sourceId]; + } + + // do a first pass, see which names are assigned to. This is necessary to prevent + // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`, + // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh) + const assignedTo = new Set(); + walk(ast, { + enter(node) { + if (node.type !== 'AssignmentExpression') return; + if (node.left.type === 'MemberExpression') return; + + extractAssignedNames(node.left).forEach((name) => { + assignedTo.add(name); + }); + } + }); + + walk(ast, { + enter(node, parent) { + if (sourceMap) { + magicString.addSourcemapLocation(node.start); + magicString.addSourcemapLocation(node.end); + } + + // skip dead branches + if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) { + if (node === parent.consequent && isFalsy(parent.test)) { + this.skip(); + return; + } + if (node === parent.alternate && isTruthy(parent.test)) { + this.skip(); + return; + } + } + + if (node._skip) { + this.skip(); + return; + } + + programDepth += 1; + + if (node.scope) ({ scope } = node); + if (functionType.test(node.type)) lexicalDepth += 1; + + // if toplevel return, we need to wrap it + if (node.type === 'ReturnStatement' && lexicalDepth === 0) { + shouldWrap = true; + } + + // rewrite `this` as `commonjsHelpers.commonjsGlobal` + if (node.type === 'ThisExpression' && lexicalDepth === 0) { + uses.global = true; + if (!ignoreGlobal) + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + return; + } + + // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151) + if (node.type === 'UnaryExpression' && node.operator === 'typeof') { + const flattened = flatten(node.argument); + if (!flattened) return; + + if (scope.contains(flattened.name)) return; + + if ( + flattened.keypath === 'module.exports' || + flattened.keypath === 'module' || + flattened.keypath === 'exports' + ) { + magicString.overwrite(node.start, node.end, `'object'`, { storeName: false }); + } + } + + // rewrite `require` (if not already handled) `global` and `define`, and handle free references to + // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule + if (node.type === 'Identifier') { + if (isReference(node, parent) && !scope.contains(node.name)) { + if (node.name in uses) { + if (node.name === 'require') { + if (allowDynamicRequire) return; + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, { + storeName: true + }); + } + + uses[node.name] = true; + if (node.name === 'global' && !ignoreGlobal) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + } + + // if module or exports are used outside the context of an assignment + // expression, we need to wrap the module + if (node.name === 'module' || node.name === 'exports') { + shouldWrap = true; + } + } + + if (node.name === 'define') { + magicString.overwrite(node.start, node.end, 'undefined', { storeName: true }); + } + + globals.add(node.name); + } + + return; + } + + // Is this an assignment to exports or module.exports? + if (node.type === 'AssignmentExpression') { + if (node.left.type !== 'MemberExpression') return; + + const flattened = flatten(node.left); + if (!flattened) return; + + if (scope.contains(flattened.name)) return; + + const match = exportsPattern.exec(flattened.keypath); + if (!match || flattened.keypath === 'exports') return; + + uses[flattened.name] = true; + + // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` – + // if this isn't top-level, we'll need to wrap the module + if (programDepth > 3) shouldWrap = true; + + node.left._skip = true; + + if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') { + node.right.properties.forEach((prop) => { + if (prop.computed || prop.key.type !== 'Identifier') return; + const { name } = prop.key; + if (name === makeLegalIdentifier(name)) namedExports[name] = true; + }); + return; + } + + if (match[1]) namedExports[match[1]] = true; + return; + } + + // if this is `var x = require('x')`, we can do `import x from 'x'` + if ( + node.type === 'VariableDeclarator' && + node.id.type === 'Identifier' && + isStaticRequireStatement(node.init) + ) { + // for now, only do this for top-level requires. maybe fix this in future + if (scope.parent) return; + + // edge case — CJS allows you to assign to imports. ES doesn't + if (assignedTo.has(node.id.name)) return; + + const required = getRequired(node.init, node.id.name); + required.importsDefault = true; + + if (required.name === node.id.name) { + node._shouldRemove = true; + } + } + + if (!isStaticRequireStatement(node)) return; + + const required = getRequired(node); + + if (parent.type === 'ExpressionStatement') { + // is a bare import, e.g. `require('foo');` + magicString.remove(parent.start, parent.end); + } else { + required.importsDefault = true; + magicString.overwrite(node.start, node.end, required.name); + } + + node.callee._skip = true; + }, + + leave(node) { + programDepth -= 1; + if (node.scope) scope = scope.parent; + if (functionType.test(node.type)) lexicalDepth -= 1; + + if (node.type === 'VariableDeclaration') { + let keepDeclaration = false; + let c = node.declarations[0].start; + + for (let i = 0; i < node.declarations.length; i += 1) { + const declarator = node.declarations[i]; + + if (declarator._shouldRemove) { + magicString.remove(c, declarator.end); + } else { + if (!keepDeclaration) { + magicString.remove(c, declarator.start); + keepDeclaration = true; + } + + c = declarator.end; + } + } + + if (!keepDeclaration) { + magicString.remove(node.start, node.end); + } + } + } + }); + + if ( + !sources.length && + !uses.module && + !uses.exports && + !uses.require && + (ignoreGlobal || !uses.global) + ) { + if (Object.keys(namedExports).length) { + throw new Error( + `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module` + ); + } + // not a CommonJS module + return null; + } + + const includeHelpers = shouldWrap || uses.global || uses.require; + const importBlock = `${(includeHelpers + ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] + : [] + ) + .concat( + sources.map( + (source) => + // import the actual module before the proxy, so that we know + // what kind of proxy to build + `import '${source}';` + ), + sources.map((source) => { + const { name, importsDefault } = required[source]; + return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`; + }) + ) + .join('\n')}\n\n`; + + const namedExportDeclarations = []; + let wrapperStart = ''; + let wrapperEnd = ''; + + const moduleName = deconflict(scope, globals, getName(id)); + if (!isEntry) { + const exportModuleExports = { + str: `export { ${moduleName} as __moduleExports };`, + name: '__moduleExports' + }; + + namedExportDeclarations.push(exportModuleExports); + } + + const name = getName(id); + + function addExport(x) { + const deconflicted = deconflict(scope, globals, name); + + const declaration = + deconflicted === name + ? `export var ${x} = ${moduleName}.${x};` + : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`; + + namedExportDeclarations.push({ + str: declaration, + name: x + }); + } + + if (customNamedExports) customNamedExports.forEach(addExport); + + const defaultExportPropertyAssignments = []; + let hasDefaultExport = false; + + if (shouldWrap) { + const args = `module${uses.exports ? ', exports' : ''}`; + + wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`; + wrapperEnd = `\n});`; + } else { + const names = []; + + ast.body.forEach((node) => { + if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') { + const { left } = node.expression; + const flattened = flatten(left); + + if (!flattened) return; + + const match = exportsPattern.exec(flattened.keypath); + if (!match) return; + + if (flattened.keypath === 'module.exports') { + hasDefaultExport = true; + magicString.overwrite(left.start, left.end, `var ${moduleName}`); + } else { + const [, name] = match; + const deconflicted = deconflict(scope, globals, name); + + names.push({ name, deconflicted }); + + magicString.overwrite(node.start, left.end, `var ${deconflicted}`); + + const declaration = + name === deconflicted + ? `export { ${name} };` + : `export { ${deconflicted} as ${name} };`; + + if (name !== 'default') { + namedExportDeclarations.push({ + str: declaration, + name + }); + delete namedExports[name]; + } + + defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`); + } + } + }); + + if (!hasDefaultExport && (names.length || !isEntry)) { + wrapperEnd = `\n\nvar ${moduleName} = {\n${names + .map(({ name, deconflicted }) => `\t${name}: ${deconflicted}`) + .join(',\n')}\n};`; + } + } + Object.keys(namedExports) + .filter((key) => !blacklist[key]) + .forEach(addExport); + + const defaultExport = /__esModule/.test(code) + ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});` + : `export default ${moduleName};`; + + const named = namedExportDeclarations + .filter((x) => x.name !== 'default' || !hasDefaultExport) + .map((x) => x.str); + + const exportBlock = `\n\n${[defaultExport] + .concat(named) + .concat(hasDefaultExport ? defaultExportPropertyAssignments : []) + .join('\n')}`; + + magicString + .trim() + .prepend(importBlock + wrapperStart) + .trim() + .append(wrapperEnd); + + if (hasDefaultExport || named.length > 0 || shouldWrap || !isEntry) { + magicString.append(exportBlock); + } + + code = magicString.toString(); + const map = sourceMap ? magicString.generateMap() : null; + + return { code, map }; +} diff --git a/packages/commonjs/src/utils.js b/packages/commonjs/src/utils.js new file mode 100644 index 000000000..0294c2fe9 --- /dev/null +++ b/packages/commonjs/src/utils.js @@ -0,0 +1,13 @@ +/* eslint-disable import/prefer-default-export */ +import { basename, dirname, extname, sep } from 'path'; + +import { makeLegalIdentifier } from '@rollup/pluginutils'; + +export function getName(id) { + const name = makeLegalIdentifier(basename(id, extname(id))); + if (name !== 'index') { + return name; + } + const segments = dirname(id).split(sep); + return makeLegalIdentifier(segments[segments.length - 1]); +} diff --git a/packages/commonjs/test/fixtures/.eslintrc b/packages/commonjs/test/fixtures/.eslintrc new file mode 100644 index 000000000..8cd798500 --- /dev/null +++ b/packages/commonjs/test/fixtures/.eslintrc @@ -0,0 +1,14 @@ +{ + "globals": { + "t": "readonly" + }, + "rules": { + "func-names": "off", + "no-console": "off", + "no-undefined": "off", + "import/prefer-default-export": "off", + "import/extensions": "off", + "import/no-unresolved": "off", + "@typescript-eslint/no-unused-vars": "off" + } +} diff --git a/packages/commonjs/test/fixtures/form/async-function/input.js b/packages/commonjs/test/fixtures/form/async-function/input.js new file mode 100644 index 000000000..9f69c2922 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/async-function/input.js @@ -0,0 +1,3 @@ +module.exports = async function () { + // TODO +}; diff --git a/packages/commonjs/test/fixtures/form/async-function/output.js b/packages/commonjs/test/fixtures/form/async-function/output.js new file mode 100644 index 000000000..b182c5b5a --- /dev/null +++ b/packages/commonjs/test/fixtures/form/async-function/output.js @@ -0,0 +1,6 @@ +var input = async function () { + // TODO +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/constant-template-literal/input.js b/packages/commonjs/test/fixtures/form/constant-template-literal/input.js new file mode 100644 index 000000000..2a4328319 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/constant-template-literal/input.js @@ -0,0 +1,2 @@ +var foo = require(`tape`); +console.log(foo); diff --git a/packages/commonjs/test/fixtures/form/constant-template-literal/output.js b/packages/commonjs/test/fixtures/form/constant-template-literal/output.js new file mode 100644 index 000000000..f86e76363 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/constant-template-literal/output.js @@ -0,0 +1,11 @@ +import 'tape'; +import foo from '_tape?commonjs-proxy'; + +console.log(foo); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/dynamic-template-literal/input.js b/packages/commonjs/test/fixtures/form/dynamic-template-literal/input.js new file mode 100644 index 000000000..12767b60b --- /dev/null +++ b/packages/commonjs/test/fixtures/form/dynamic-template-literal/input.js @@ -0,0 +1,3 @@ +var pe = 'pe'; +var foo = require(`ta${pe}`); +console.log(foo); diff --git a/packages/commonjs/test/fixtures/form/dynamic-template-literal/output.js b/packages/commonjs/test/fixtures/form/dynamic-template-literal/output.js new file mode 100644 index 000000000..2e6b342c1 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/dynamic-template-literal/output.js @@ -0,0 +1,12 @@ +import * as commonjsHelpers from '_commonjsHelpers.js'; + +var pe = 'pe'; +var foo = commonjsHelpers.commonjsRequire(`ta${pe}`); +console.log(foo); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/ignore-ids-function/_config.js b/packages/commonjs/test/fixtures/form/ignore-ids-function/_config.js new file mode 100644 index 000000000..7f0d48761 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids-function/_config.js @@ -0,0 +1,5 @@ +module.exports = { + options: { + ignore: id => id === 'foo' + } +}; diff --git a/packages/commonjs/test/fixtures/form/ignore-ids-function/input.js b/packages/commonjs/test/fixtures/form/ignore-ids-function/input.js new file mode 100644 index 000000000..572fe11e6 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids-function/input.js @@ -0,0 +1,2 @@ +var foo = require( 'foo' ); +var bar = require( 'bar' ); \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/form/ignore-ids-function/output.js b/packages/commonjs/test/fixtures/form/ignore-ids-function/output.js new file mode 100644 index 000000000..8857e268f --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids-function/output.js @@ -0,0 +1,11 @@ +import 'bar'; +import bar from '_bar?commonjs-proxy'; + +var foo = require( 'foo' ); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/ignore-ids/_config.js b/packages/commonjs/test/fixtures/form/ignore-ids/_config.js new file mode 100644 index 000000000..cdc9f6a3d --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids/_config.js @@ -0,0 +1,5 @@ +module.exports = { + options: { + ignore: ['foo'] + } +}; diff --git a/packages/commonjs/test/fixtures/form/ignore-ids/input.js b/packages/commonjs/test/fixtures/form/ignore-ids/input.js new file mode 100644 index 000000000..572fe11e6 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids/input.js @@ -0,0 +1,2 @@ +var foo = require( 'foo' ); +var bar = require( 'bar' ); \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/form/ignore-ids/output.js b/packages/commonjs/test/fixtures/form/ignore-ids/output.js new file mode 100644 index 000000000..8857e268f --- /dev/null +++ b/packages/commonjs/test/fixtures/form/ignore-ids/output.js @@ -0,0 +1,11 @@ +import 'bar'; +import bar from '_bar?commonjs-proxy'; + +var foo = require( 'foo' ); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/input.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/input.js new file mode 100644 index 000000000..c08000798 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/input.js @@ -0,0 +1,4 @@ +var a = require('./a') + , b = 42; + +console.log( a, b ); \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/output.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/output.js new file mode 100644 index 000000000..5d80fea29 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations-b/output.js @@ -0,0 +1,13 @@ +import './a'; +import a from '_./a?commonjs-proxy'; + +var b = 42; + +console.log( a, b ); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/input.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/input.js new file mode 100644 index 000000000..da506ce79 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/input.js @@ -0,0 +1,5 @@ +var a = 'a' + , b = require( './b' ) + , c = 'c'; + +console.log( a, b, c ); \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/output.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/output.js new file mode 100644 index 000000000..e1dca645c --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations-c/output.js @@ -0,0 +1,14 @@ +import './b'; +import b from '_./b?commonjs-proxy'; + +var a = 'a' + , c = 'c'; + +console.log( a, b, c ); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations/input.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations/input.js new file mode 100644 index 000000000..9a50394f8 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations/input.js @@ -0,0 +1,4 @@ +var a = require('./a')() + , b = require('./b'); + +console.log( a, b ); \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/form/multiple-var-declarations/output.js b/packages/commonjs/test/fixtures/form/multiple-var-declarations/output.js new file mode 100644 index 000000000..beb25c63f --- /dev/null +++ b/packages/commonjs/test/fixtures/form/multiple-var-declarations/output.js @@ -0,0 +1,15 @@ +import './a'; +import './b'; +import require$$0 from '_./a?commonjs-proxy'; +import b from '_./b?commonjs-proxy'; + +var a = require$$0(); + +console.log( a, b ); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/no-exports-entry/_config.js b/packages/commonjs/test/fixtures/form/no-exports-entry/_config.js new file mode 100644 index 000000000..9f8760126 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/no-exports-entry/_config.js @@ -0,0 +1,6 @@ +module.exports = { + options: { + ignore: [ 'foo' ] + }, + entry: './input.js' +}; diff --git a/packages/commonjs/test/fixtures/form/no-exports-entry/input.js b/packages/commonjs/test/fixtures/form/no-exports-entry/input.js new file mode 100644 index 000000000..0ce2e655c --- /dev/null +++ b/packages/commonjs/test/fixtures/form/no-exports-entry/input.js @@ -0,0 +1,7 @@ +var dummy = require('./dummy'); + +var foo = function () { + return; +}; + +var input = 42; diff --git a/packages/commonjs/test/fixtures/form/no-exports-entry/output.js b/packages/commonjs/test/fixtures/form/no-exports-entry/output.js new file mode 100644 index 000000000..a408c657a --- /dev/null +++ b/packages/commonjs/test/fixtures/form/no-exports-entry/output.js @@ -0,0 +1,8 @@ +import './dummy'; +import dummy from '_./dummy?commonjs-proxy'; + +var foo = function () { + return; +}; + +var input = 42; diff --git a/packages/commonjs/test/fixtures/form/no-toplevel-return/input.js b/packages/commonjs/test/fixtures/form/no-toplevel-return/input.js new file mode 100644 index 000000000..c53774250 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/no-toplevel-return/input.js @@ -0,0 +1,13 @@ +var foo = function () { + return; +}; + +var bar = () => { + return; +}; + +function baz () { + return; +} + +module.exports = 42; diff --git a/packages/commonjs/test/fixtures/form/no-toplevel-return/output.js b/packages/commonjs/test/fixtures/form/no-toplevel-return/output.js new file mode 100644 index 000000000..721fea34e --- /dev/null +++ b/packages/commonjs/test/fixtures/form/no-toplevel-return/output.js @@ -0,0 +1,16 @@ +var foo = function () { + return; +}; + +var bar = () => { + return; +}; + +function baz () { + return; +} + +var input = 42; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/input.js b/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/input.js new file mode 100644 index 000000000..e7b888049 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/input.js @@ -0,0 +1,2 @@ +var bar; +module.exports = bar = function foo () {}; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/output.js b/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/output.js new file mode 100644 index 000000000..545a7ccb9 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-function-double-assign/output.js @@ -0,0 +1,5 @@ +var bar; +var input = bar = function foo () {}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-function/input.js b/packages/commonjs/test/fixtures/form/optimised-default-export-function/input.js new file mode 100644 index 000000000..62c5888a7 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-function/input.js @@ -0,0 +1 @@ +module.exports = function foo () {}; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-function/output.js b/packages/commonjs/test/fixtures/form/optimised-default-export-function/output.js new file mode 100644 index 000000000..bfb9a4110 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-function/output.js @@ -0,0 +1,4 @@ +var input = function foo () {}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-iife/input.js b/packages/commonjs/test/fixtures/form/optimised-default-export-iife/input.js new file mode 100644 index 000000000..40afc12e4 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-iife/input.js @@ -0,0 +1,3 @@ +module.exports = (function foo () { + return function fooChild() {}; +}()); diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export-iife/output.js b/packages/commonjs/test/fixtures/form/optimised-default-export-iife/output.js new file mode 100644 index 000000000..d10c33f79 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export-iife/output.js @@ -0,0 +1,6 @@ +var input = (function foo () { + return function fooChild() {}; +}()); + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export/input.js b/packages/commonjs/test/fixtures/form/optimised-default-export/input.js new file mode 100644 index 000000000..888cae37a --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export/input.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/packages/commonjs/test/fixtures/form/optimised-default-export/output.js b/packages/commonjs/test/fixtures/form/optimised-default-export/output.js new file mode 100644 index 000000000..cb7be65cd --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-default-export/output.js @@ -0,0 +1,4 @@ +var input = 42; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/input.js b/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/input.js new file mode 100644 index 000000000..9b2c48957 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/input.js @@ -0,0 +1,5 @@ +var foo = 1; +var bar = 2; + +exports.foo = 'a'; +module.exports.bar = 'b'; diff --git a/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/output.js b/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/output.js new file mode 100644 index 000000000..f72d8ad68 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-named-export-conflicts/output.js @@ -0,0 +1,15 @@ +var foo = 1; +var bar = 2; + +var foo_1 = 'a'; +var bar_1 = 'b'; + +var input = { + foo: foo_1, + bar: bar_1 +}; + +export default input; +export { input as __moduleExports }; +export { foo_1 as foo }; +export { bar_1 as bar }; diff --git a/packages/commonjs/test/fixtures/form/optimised-named-export/input.js b/packages/commonjs/test/fixtures/form/optimised-named-export/input.js new file mode 100644 index 000000000..d8b6b125e --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-named-export/input.js @@ -0,0 +1,2 @@ +exports.foo = 'a'; +module.exports.bar = 'b'; diff --git a/packages/commonjs/test/fixtures/form/optimised-named-export/output.js b/packages/commonjs/test/fixtures/form/optimised-named-export/output.js new file mode 100644 index 000000000..32cb2fcb4 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/optimised-named-export/output.js @@ -0,0 +1,12 @@ +var foo = 'a'; +var bar = 'b'; + +var input = { + foo: foo, + bar: bar +}; + +export default input; +export { input as __moduleExports }; +export { foo }; +export { bar }; diff --git a/packages/commonjs/test/fixtures/form/require-collision/input.js b/packages/commonjs/test/fixtures/form/require-collision/input.js new file mode 100644 index 000000000..348c95cb0 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/require-collision/input.js @@ -0,0 +1,5 @@ +(function() { + var foo = require("foo"); + var require$$0 = "FAIL"; + console.log(foo); +})(); diff --git a/packages/commonjs/test/fixtures/form/require-collision/output.js b/packages/commonjs/test/fixtures/form/require-collision/output.js new file mode 100644 index 000000000..e689a4d8b --- /dev/null +++ b/packages/commonjs/test/fixtures/form/require-collision/output.js @@ -0,0 +1,15 @@ +import 'foo'; +import require$$1 from '_foo?commonjs-proxy'; + +(function() { + var foo = require$$1; + var require$$0 = "FAIL"; + console.log(foo); +})(); + +var input = { + +}; + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/typeof-module-exports/input.js b/packages/commonjs/test/fixtures/form/typeof-module-exports/input.js new file mode 100644 index 000000000..4f5fcffab --- /dev/null +++ b/packages/commonjs/test/fixtures/form/typeof-module-exports/input.js @@ -0,0 +1,9 @@ +var foo = 42; + +if ( typeof exports === 'object' && typeof module === 'object' ) { + module.exports = foo; +} else if ( typeof define === 'function' && define.amd ) { + define([], function () { return foo; }); +} else { + window.foo = foo; +} diff --git a/packages/commonjs/test/fixtures/form/typeof-module-exports/output.js b/packages/commonjs/test/fixtures/form/typeof-module-exports/output.js new file mode 100644 index 000000000..d40bec0cd --- /dev/null +++ b/packages/commonjs/test/fixtures/form/typeof-module-exports/output.js @@ -0,0 +1,16 @@ +import * as commonjsHelpers from '_commonjsHelpers.js'; + +var input = commonjsHelpers.createCommonjsModule(function (module, exports) { +var foo = 42; + +if ( 'object' === 'object' && 'object' === 'object' ) { + module.exports = foo; +} else if ( typeof undefined === 'function' && undefined.amd ) { + undefined([], function () { return foo; }); +} else { + window.foo = foo; +} +}); + +export default input; +export { input as __moduleExports }; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/input.js b/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/input.js new file mode 100644 index 000000000..3d5f6da1c --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/input.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +export default {}; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/output.js b/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/output.js new file mode 100644 index 000000000..3d5f6da1c --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-default-export/output.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +export default {}; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-import/input.js b/packages/commonjs/test/fixtures/form/unambiguous-with-import/input.js new file mode 100644 index 000000000..324f256a2 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-import/input.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +import './bar.js'; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-import/output.js b/packages/commonjs/test/fixtures/form/unambiguous-with-import/output.js new file mode 100644 index 000000000..324f256a2 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-import/output.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +import './bar.js'; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/input.js b/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/input.js new file mode 100644 index 000000000..64af25289 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/input.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +export {}; diff --git a/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/output.js b/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/output.js new file mode 100644 index 000000000..64af25289 --- /dev/null +++ b/packages/commonjs/test/fixtures/form/unambiguous-with-named-export/output.js @@ -0,0 +1,3 @@ +require( './foo.js' ); + +export {}; diff --git a/packages/commonjs/test/fixtures/function/__esModule/answer.js b/packages/commonjs/test/fixtures/function/__esModule/answer.js new file mode 100644 index 000000000..796c23159 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/__esModule/answer.js @@ -0,0 +1,3 @@ +/* eslint-disable no-underscore-dangle */ +exports.__esModule = true; +exports.answer = 42; diff --git a/packages/commonjs/test/fixtures/function/__esModule/main.js b/packages/commonjs/test/fixtures/function/__esModule/main.js new file mode 100644 index 000000000..be3be5c54 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/__esModule/main.js @@ -0,0 +1,5 @@ +import * as x from './answer'; + +t.truthy('answer' in x); +t.truthy('default' in x); +t.truthy(!('__esModule' in x)); diff --git a/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/foo.js b/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/foo.js new file mode 100644 index 000000000..b29826818 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/foo.js @@ -0,0 +1,5 @@ +const foo = {}; + +module.exports = foo; +module.exports.bar = 1; +exports.baz = 2; diff --git a/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/main.js b/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/main.js new file mode 100644 index 000000000..943ee34b3 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/assign-properties-to-default-export/main.js @@ -0,0 +1,4 @@ +import foo from './foo.js'; + +t.is(foo.bar, 1); +t.is(foo.baz, 2); diff --git a/packages/commonjs/test/fixtures/function/assumed-globals/_config.js b/packages/commonjs/test/fixtures/function/assumed-globals/_config.js new file mode 100644 index 000000000..84f84e831 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/assumed-globals/_config.js @@ -0,0 +1,5 @@ +module.exports = { + context: { + document: { real: true } + } +}; diff --git a/packages/commonjs/test/fixtures/function/assumed-globals/document.js b/packages/commonjs/test/fixtures/function/assumed-globals/document.js new file mode 100644 index 000000000..93c3dad06 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/assumed-globals/document.js @@ -0,0 +1,6 @@ +/* eslint-disable */ +if (typeof document !== 'undefined') { + module.exports = document; +} else { + module.exports = { fake: true }; +} diff --git a/packages/commonjs/test/fixtures/function/assumed-globals/main.js b/packages/commonjs/test/fixtures/function/assumed-globals/main.js new file mode 100644 index 000000000..f96d52ccc --- /dev/null +++ b/packages/commonjs/test/fixtures/function/assumed-globals/main.js @@ -0,0 +1,3 @@ +import document from './document.js'; + +t.deepEqual(document, { real: true }); diff --git a/packages/commonjs/test/fixtures/function/bare-import-comment/bar.js b/packages/commonjs/test/fixtures/function/bare-import-comment/bar.js new file mode 100644 index 000000000..3acfdc39e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import-comment/bar.js @@ -0,0 +1,2 @@ +// Great module +Math.bar = 42; diff --git a/packages/commonjs/test/fixtures/function/bare-import-comment/foo.js b/packages/commonjs/test/fixtures/function/bare-import-comment/foo.js new file mode 100644 index 000000000..e60e9db73 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import-comment/foo.js @@ -0,0 +1 @@ +require('./bar.js'); diff --git a/packages/commonjs/test/fixtures/function/bare-import-comment/main.js b/packages/commonjs/test/fixtures/function/bare-import-comment/main.js new file mode 100644 index 000000000..af3cfd526 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import-comment/main.js @@ -0,0 +1,3 @@ +import './foo.js'; + +t.is(Math.bar, 42); diff --git a/packages/commonjs/test/fixtures/function/bare-import/_config.js b/packages/commonjs/test/fixtures/function/bare-import/_config.js new file mode 100644 index 000000000..f053ebf79 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import/_config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/packages/commonjs/test/fixtures/function/bare-import/bar.js b/packages/commonjs/test/fixtures/function/bare-import/bar.js new file mode 100644 index 000000000..39ebcb98b --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import/bar.js @@ -0,0 +1 @@ +Math.bar = 42; diff --git a/packages/commonjs/test/fixtures/function/bare-import/foo.js b/packages/commonjs/test/fixtures/function/bare-import/foo.js new file mode 100644 index 000000000..e60e9db73 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import/foo.js @@ -0,0 +1 @@ +require('./bar.js'); diff --git a/packages/commonjs/test/fixtures/function/bare-import/main.js b/packages/commonjs/test/fixtures/function/bare-import/main.js new file mode 100644 index 000000000..af3cfd526 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/bare-import/main.js @@ -0,0 +1,3 @@ +import './foo.js'; + +t.is(Math.bar, 42); diff --git a/packages/commonjs/test/fixtures/function/basic/_config.js b/packages/commonjs/test/fixtures/function/basic/_config.js new file mode 100644 index 000000000..e65d17a47 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/basic/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports: (exports, t) => { + t.is(exports, 42); + } +}; diff --git a/packages/commonjs/test/fixtures/function/basic/foo.js b/packages/commonjs/test/fixtures/function/basic/foo.js new file mode 100644 index 000000000..ce0fffb75 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/basic/foo.js @@ -0,0 +1 @@ +module.exports = 21; diff --git a/packages/commonjs/test/fixtures/function/basic/main.js b/packages/commonjs/test/fixtures/function/basic/main.js new file mode 100644 index 000000000..ba12948f6 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/basic/main.js @@ -0,0 +1,3 @@ +const foo = require('./foo'); + +module.exports = foo * 2; diff --git a/packages/commonjs/test/fixtures/function/deconflict-export-and-local/index.js b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/index.js new file mode 100644 index 000000000..6efd26c3d --- /dev/null +++ b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/index.js @@ -0,0 +1,3 @@ +const someValueModule = require('./someValue'); + +exports.someValue = someValueModule.someValue; diff --git a/packages/commonjs/test/fixtures/function/deconflict-export-and-local/main.js b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/main.js new file mode 100644 index 000000000..724ef18e4 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/main.js @@ -0,0 +1,3 @@ +import { someValue } from './index.js'; + +t.is(someValue, 10); diff --git a/packages/commonjs/test/fixtures/function/deconflict-export-and-local/someValue.js b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/someValue.js new file mode 100644 index 000000000..57612904b --- /dev/null +++ b/packages/commonjs/test/fixtures/function/deconflict-export-and-local/someValue.js @@ -0,0 +1 @@ +exports.someValue = 10; diff --git a/packages/commonjs/test/fixtures/function/dot/foo.bar.js b/packages/commonjs/test/fixtures/function/dot/foo.bar.js new file mode 100644 index 000000000..40f6658d4 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/dot/foo.bar.js @@ -0,0 +1 @@ +module.exports = 'fubar'; diff --git a/packages/commonjs/test/fixtures/function/dot/main.js b/packages/commonjs/test/fixtures/function/dot/main.js new file mode 100644 index 000000000..0da47ff7e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/dot/main.js @@ -0,0 +1,3 @@ +const status = require('./foo.bar'); + +t.is(status, 'fubar'); diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/main.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/main.js new file mode 100644 index 000000000..59430afd8 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/main.js @@ -0,0 +1,3 @@ +import x from './x'; + +t.deepEqual(x, { default: 42 }); diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/x.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/x.js new file mode 100644 index 000000000..b7d716a10 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports-b/x.js @@ -0,0 +1,4 @@ +const x = {}; + +module.exports = x; +module.exports.default = 42; diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/exports.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/exports.js new file mode 100644 index 000000000..0b6c9844b --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/exports.js @@ -0,0 +1,6 @@ +exports.Foo = 1; +exports.var = 'VAR'; +exports.default = { + Foo: 2, + default: 3 +}; diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/main.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/main.js new file mode 100644 index 000000000..7b5967490 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports-c/main.js @@ -0,0 +1,12 @@ +/* eslint-disable */ +import E from './exports.js'; +import { Foo } from './exports.js'; +import { var as Var } from './exports.js'; + +t.is(E.Foo, 1); +t.is(E.var, 'VAR'); +t.deepEqual(E.default, { Foo: 2, default: 3 }); +t.is(E.default.Foo, 2); +t.is(E.default.default, 3); +t.is(Foo, 1); +t.is(Var, 'VAR'); diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports/main.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports/main.js new file mode 100644 index 000000000..db1d1e165 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports/main.js @@ -0,0 +1,3 @@ +import x from './x'; + +t.is(x.default, x); diff --git a/packages/commonjs/test/fixtures/function/duplicate-default-exports/x.js b/packages/commonjs/test/fixtures/function/duplicate-default-exports/x.js new file mode 100644 index 000000000..7c39097b4 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/duplicate-default-exports/x.js @@ -0,0 +1,4 @@ +const x = {}; + +module.exports = x; +module.exports.default = x; diff --git a/packages/commonjs/test/fixtures/function/export-default-from/_config.js b/packages/commonjs/test/fixtures/function/export-default-from/_config.js new file mode 100644 index 000000000..f053ebf79 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/export-default-from/_config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/packages/commonjs/test/fixtures/function/export-default-from/imported.js b/packages/commonjs/test/fixtures/function/export-default-from/imported.js new file mode 100644 index 000000000..c66568ed9 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/export-default-from/imported.js @@ -0,0 +1 @@ +export default 'default export'; diff --git a/packages/commonjs/test/fixtures/function/export-default-from/main.js b/packages/commonjs/test/fixtures/function/export-default-from/main.js new file mode 100644 index 000000000..7db9b0a2e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/export-default-from/main.js @@ -0,0 +1 @@ +t.is(require('./reexporter'), 'default export'); diff --git a/packages/commonjs/test/fixtures/function/export-default-from/reexporter.js b/packages/commonjs/test/fixtures/function/export-default-from/reexporter.js new file mode 100644 index 000000000..3b53c40e1 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/export-default-from/reexporter.js @@ -0,0 +1 @@ +export { default } from './imported'; diff --git a/packages/commonjs/test/fixtures/function/exports/_config.js b/packages/commonjs/test/fixtures/function/exports/_config.js new file mode 100644 index 000000000..db300fcbc --- /dev/null +++ b/packages/commonjs/test/fixtures/function/exports/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports: (exports, t) => { + t.is(exports, 'BARBAZ'); + } +}; diff --git a/packages/commonjs/test/fixtures/function/exports/foo.js b/packages/commonjs/test/fixtures/function/exports/foo.js new file mode 100644 index 000000000..4d6e59c74 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/exports/foo.js @@ -0,0 +1,2 @@ +exports.bar = 'BAR'; +exports.baz = 'BAZ'; diff --git a/packages/commonjs/test/fixtures/function/exports/main.js b/packages/commonjs/test/fixtures/function/exports/main.js new file mode 100644 index 000000000..7924fb704 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/exports/main.js @@ -0,0 +1,4 @@ +const { bar } = require('./foo'); +const { baz } = require('./foo'); + +module.exports = bar + baz; diff --git a/packages/commonjs/test/fixtures/function/external-imports/_config.js b/packages/commonjs/test/fixtures/function/external-imports/_config.js new file mode 100644 index 000000000..5c9e20c08 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/external-imports/_config.js @@ -0,0 +1,8 @@ +module.exports = { + options: { + external: ['foo'] + }, + exports: (exports, t) => { + t.is(exports, 'foo'); + } +}; diff --git a/packages/commonjs/test/fixtures/function/external-imports/main.js b/packages/commonjs/test/fixtures/function/external-imports/main.js new file mode 100644 index 000000000..e0af739fc --- /dev/null +++ b/packages/commonjs/test/fixtures/function/external-imports/main.js @@ -0,0 +1,3 @@ +const foo = require('foo'); + +module.exports = foo; diff --git a/packages/commonjs/test/fixtures/function/fallback-no-default/foo.js b/packages/commonjs/test/fixtures/function/fallback-no-default/foo.js new file mode 100644 index 000000000..a46b5888e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/fallback-no-default/foo.js @@ -0,0 +1,4 @@ +/* eslint-disable */ +export var one = 1; + +export var two = 2; diff --git a/packages/commonjs/test/fixtures/function/fallback-no-default/main.js b/packages/commonjs/test/fixtures/function/fallback-no-default/main.js new file mode 100644 index 000000000..bb137c7c5 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/fallback-no-default/main.js @@ -0,0 +1,4 @@ +const foo = require('./foo.js'); + +t.is(foo.one, 1); +t.is(foo.two, 2); diff --git a/packages/commonjs/test/fixtures/function/global-not-overwritten/_config.js b/packages/commonjs/test/fixtures/function/global-not-overwritten/_config.js new file mode 100644 index 000000000..dce1cc4d7 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/global-not-overwritten/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports(exports, t) { + t.is(exports.encoded, encodeURIComponent('test string')); + } +}; diff --git a/packages/commonjs/test/fixtures/function/global-not-overwritten/encode.js b/packages/commonjs/test/fixtures/function/global-not-overwritten/encode.js new file mode 100644 index 000000000..47df37ebe --- /dev/null +++ b/packages/commonjs/test/fixtures/function/global-not-overwritten/encode.js @@ -0,0 +1,6 @@ +exports.encodeURIComponent = function() { + return encodeURIComponent(this.str); +}; + +// to ensure module is wrapped +global.foo = exports; diff --git a/packages/commonjs/test/fixtures/function/global-not-overwritten/main.js b/packages/commonjs/test/fixtures/function/global-not-overwritten/main.js new file mode 100644 index 000000000..f626cb3b3 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/global-not-overwritten/main.js @@ -0,0 +1,9 @@ +/* eslint-disable */ +import { encodeURIComponent } from './encode.js'; + +const foo = { + str: 'test string', + encodeURIComponent +}; + +export var encoded = foo.encodeURIComponent(); diff --git a/packages/commonjs/test/fixtures/function/global-var/main.js b/packages/commonjs/test/fixtures/function/global-var/main.js new file mode 100644 index 000000000..4e6ce451e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/global-var/main.js @@ -0,0 +1,13 @@ +/* eslint-disable */ +function foo() { + const a = 1; + const global = {}; + global.modified = true; + return global; +} + +const notGlobal = foo(); +t.truthy(notGlobal.modified); +t.truthy(!global.modified); + +module.exports = {}; diff --git a/packages/commonjs/test/fixtures/function/index/foo/index.js b/packages/commonjs/test/fixtures/function/index/foo/index.js new file mode 100644 index 000000000..888cae37a --- /dev/null +++ b/packages/commonjs/test/fixtures/function/index/foo/index.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/packages/commonjs/test/fixtures/function/index/main.js b/packages/commonjs/test/fixtures/function/index/main.js new file mode 100644 index 000000000..521d6d540 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/index/main.js @@ -0,0 +1,3 @@ +const foo = require('./foo'); + +t.is(foo, 42); diff --git a/packages/commonjs/test/fixtures/function/inline/_config.js b/packages/commonjs/test/fixtures/function/inline/_config.js new file mode 100644 index 000000000..0b86623b6 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/inline/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports: (exports, t) => { + t.is(exports(), 2); + } +}; diff --git a/packages/commonjs/test/fixtures/function/inline/foo.js b/packages/commonjs/test/fixtures/function/inline/foo.js new file mode 100644 index 000000000..bd816eaba --- /dev/null +++ b/packages/commonjs/test/fixtures/function/inline/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/packages/commonjs/test/fixtures/function/inline/main.js b/packages/commonjs/test/fixtures/function/inline/main.js new file mode 100644 index 000000000..9c89da3ac --- /dev/null +++ b/packages/commonjs/test/fixtures/function/inline/main.js @@ -0,0 +1,4 @@ +/* eslint-disable global-require */ +module.exports = function() { + return require('./multiply')(2, require('./foo')); +}; diff --git a/packages/commonjs/test/fixtures/function/inline/multiply.js b/packages/commonjs/test/fixtures/function/inline/multiply.js new file mode 100644 index 000000000..1d31f4c02 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/inline/multiply.js @@ -0,0 +1,3 @@ +module.exports = function(a, b) { + return a * b; +}; diff --git a/packages/commonjs/test/fixtures/function/named-exports/foo.js b/packages/commonjs/test/fixtures/function/named-exports/foo.js new file mode 100644 index 000000000..7aabdbddb --- /dev/null +++ b/packages/commonjs/test/fixtures/function/named-exports/foo.js @@ -0,0 +1,2 @@ +exports.a = 1; +module.exports.b = 2; diff --git a/packages/commonjs/test/fixtures/function/named-exports/main.js b/packages/commonjs/test/fixtures/function/named-exports/main.js new file mode 100644 index 000000000..b731ecc3d --- /dev/null +++ b/packages/commonjs/test/fixtures/function/named-exports/main.js @@ -0,0 +1,4 @@ +import { a, b } from './foo.js'; + +t.is(a, 1); +t.is(b, 2); diff --git a/packages/commonjs/test/fixtures/function/ordering/bar.js b/packages/commonjs/test/fixtures/function/ordering/bar.js new file mode 100644 index 000000000..d94b3db81 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/ordering/bar.js @@ -0,0 +1,3 @@ +const shared = require('./shared'); + +module.exports = shared.fooLoaded; diff --git a/packages/commonjs/test/fixtures/function/ordering/foo.js b/packages/commonjs/test/fixtures/function/ordering/foo.js new file mode 100644 index 000000000..5fe571c95 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/ordering/foo.js @@ -0,0 +1,4 @@ +const shared = require('./shared'); + +// Mutate the shared module +shared.fooLoaded = true; diff --git a/packages/commonjs/test/fixtures/function/ordering/main.js b/packages/commonjs/test/fixtures/function/ordering/main.js new file mode 100644 index 000000000..3b8c37f36 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/ordering/main.js @@ -0,0 +1,5 @@ +require('./foo'); + +const fooLoaded = require('./bar'); + +t.truthy(fooLoaded); diff --git a/packages/commonjs/test/fixtures/function/ordering/shared.js b/packages/commonjs/test/fixtures/function/ordering/shared.js new file mode 100644 index 000000000..d0afe50c4 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/ordering/shared.js @@ -0,0 +1,3 @@ +module.exports = { + fooLoaded: false +}; diff --git a/packages/commonjs/test/fixtures/function/react-apollo/commonjs-bar.js b/packages/commonjs/test/fixtures/function/react-apollo/commonjs-bar.js new file mode 100644 index 000000000..afb51ea0e --- /dev/null +++ b/packages/commonjs/test/fixtures/function/react-apollo/commonjs-bar.js @@ -0,0 +1,7 @@ +/* eslint-disable no-underscore-dangle */ +function Bar() { + this.x = 42; +} + +exports.__esModule = true; +exports.default = Bar; diff --git a/packages/commonjs/test/fixtures/function/react-apollo/commonjs-foo.js b/packages/commonjs/test/fixtures/function/react-apollo/commonjs-foo.js new file mode 100644 index 000000000..7f2000b1c --- /dev/null +++ b/packages/commonjs/test/fixtures/function/react-apollo/commonjs-foo.js @@ -0,0 +1,5 @@ +/* eslint-disable no-underscore-dangle */ +const Bar = require('./commonjs-bar'); + +exports.__esModule = true; +exports.Bar = Bar.default; diff --git a/packages/commonjs/test/fixtures/function/react-apollo/main.js b/packages/commonjs/test/fixtures/function/react-apollo/main.js new file mode 100644 index 000000000..3f4ecb840 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/react-apollo/main.js @@ -0,0 +1,3 @@ +import { Bar } from './commonjs-foo.js'; + +t.is(new Bar().x, 42); diff --git a/packages/commonjs/test/fixtures/function/reassignment/foo.js b/packages/commonjs/test/fixtures/function/reassignment/foo.js new file mode 100644 index 000000000..4339553cf --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reassignment/foo.js @@ -0,0 +1,4 @@ +function foo() {} +foo.something = false; + +module.exports = foo; diff --git a/packages/commonjs/test/fixtures/function/reassignment/main.js b/packages/commonjs/test/fixtures/function/reassignment/main.js new file mode 100644 index 000000000..f67f1b718 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reassignment/main.js @@ -0,0 +1,8 @@ +let foo = require('./foo.js'); + +if (!foo.something) { + foo = function somethingElse() {}; + foo.something = true; +} + +t.truthy(foo.something); diff --git a/packages/commonjs/test/fixtures/function/reexports/_config.js b/packages/commonjs/test/fixtures/function/reexports/_config.js new file mode 100644 index 000000000..ae2a6deec --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reexports/_config.js @@ -0,0 +1,9 @@ +const path = require('path'); + +module.exports = { + pluginOptions: { + namedExports: { + [path.resolve(__dirname, 'foo.js')]: ['named'] + } + } +}; diff --git a/packages/commonjs/test/fixtures/function/reexports/bar.js b/packages/commonjs/test/fixtures/function/reexports/bar.js new file mode 100644 index 000000000..cbf3e94a5 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reexports/bar.js @@ -0,0 +1 @@ +exports.named = 42; diff --git a/packages/commonjs/test/fixtures/function/reexports/foo.js b/packages/commonjs/test/fixtures/function/reexports/foo.js new file mode 100644 index 000000000..8cb411907 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reexports/foo.js @@ -0,0 +1 @@ +module.exports = require('./bar.js'); diff --git a/packages/commonjs/test/fixtures/function/reexports/main.js b/packages/commonjs/test/fixtures/function/reexports/main.js new file mode 100644 index 000000000..65d3053db --- /dev/null +++ b/packages/commonjs/test/fixtures/function/reexports/main.js @@ -0,0 +1,3 @@ +import { named } from './foo.js'; + +t.is(named, 42); diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/_config.js b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/_config.js new file mode 100644 index 000000000..d30128b01 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/_config.js @@ -0,0 +1,16 @@ +module.exports = { + description: 'always resolve cjs detection even if an imported file has an unknown extension', + options: { + plugins: [ + { + resolveId(importee) { + if (importee === 'second') { + return `${__dirname}/second.x`; + } + return null; + } + } + ] + }, + pluginOptions: {} +}; diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/main.js b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/main.js new file mode 100644 index 000000000..7e0b3734d --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/main.js @@ -0,0 +1 @@ +t.is(require('second').result, 'second'); diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/second.x b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/second.x new file mode 100644 index 000000000..82e751f77 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-extension/second.x @@ -0,0 +1 @@ +export const result = 'second'; diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/_config.js b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/_config.js new file mode 100644 index 000000000..92a8ecd2f --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/_config.js @@ -0,0 +1,18 @@ +module.exports = { + description: 'always resolve cjs detection even if an imported file is filtered', + options: { + plugins: [ + { + resolveId(importee) { + if (importee === 'second') { + return `${__dirname}/second.js`; + } + return null; + } + } + ] + }, + pluginOptions: { + include: ['fixtures/function/resolve-is-cjs-filtered/main.js'] + } +}; diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/main.js b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/main.js new file mode 100644 index 000000000..7e0b3734d --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/main.js @@ -0,0 +1 @@ +t.is(require('second').result, 'second'); diff --git a/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/second.js b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/second.js new file mode 100644 index 000000000..82e751f77 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/resolve-is-cjs-filtered/second.js @@ -0,0 +1 @@ +export const result = 'second'; diff --git a/packages/commonjs/test/fixtures/function/shadowing/main.js b/packages/commonjs/test/fixtures/function/shadowing/main.js new file mode 100644 index 000000000..68f73baa5 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/shadowing/main.js @@ -0,0 +1,11 @@ +function foo(require) { + require('not-an-actual-require-statement'); +} + +let result; + +foo((msg) => { + result = msg; +}); + +t.is(result, 'not-an-actual-require-statement'); diff --git a/packages/commonjs/test/fixtures/function/skips-dead-branches/_config.js b/packages/commonjs/test/fixtures/function/skips-dead-branches/_config.js new file mode 100644 index 000000000..e42df1af7 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/skips-dead-branches/_config.js @@ -0,0 +1,7 @@ +module.exports = { + global: (global, t) => { + t.is(global.a, undefined); + t.is(global.b, 2); + t.is(global.c, undefined); + } +}; diff --git a/packages/commonjs/test/fixtures/function/skips-dead-branches/a.js b/packages/commonjs/test/fixtures/function/skips-dead-branches/a.js new file mode 100644 index 000000000..9830a83fd --- /dev/null +++ b/packages/commonjs/test/fixtures/function/skips-dead-branches/a.js @@ -0,0 +1 @@ +global.a = 1; diff --git a/packages/commonjs/test/fixtures/function/skips-dead-branches/b.js b/packages/commonjs/test/fixtures/function/skips-dead-branches/b.js new file mode 100644 index 000000000..89d532d27 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/skips-dead-branches/b.js @@ -0,0 +1,2 @@ +global.b = 2; +module.exports = 'b'; diff --git a/packages/commonjs/test/fixtures/function/skips-dead-branches/c.js b/packages/commonjs/test/fixtures/function/skips-dead-branches/c.js new file mode 100644 index 000000000..5574ed46f --- /dev/null +++ b/packages/commonjs/test/fixtures/function/skips-dead-branches/c.js @@ -0,0 +1,2 @@ +global.c = 3; +module.exports = 'c'; diff --git a/packages/commonjs/test/fixtures/function/skips-dead-branches/main.js b/packages/commonjs/test/fixtures/function/skips-dead-branches/main.js new file mode 100644 index 000000000..0066d0550 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/skips-dead-branches/main.js @@ -0,0 +1,6 @@ +/* eslint-disable */ +if ('development' === 'production') { + require('./a.js'); +} + +module.exports = true ? require('./b.js') : require('./c.js'); diff --git a/packages/commonjs/test/fixtures/function/this/foo.js b/packages/commonjs/test/fixtures/function/this/foo.js new file mode 100644 index 000000000..82e5ddd92 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/this/foo.js @@ -0,0 +1,5 @@ +module.exports = function augmentThis() { + this.x = 'x'; +}; + +this.y = 'y'; diff --git a/packages/commonjs/test/fixtures/function/this/main.js b/packages/commonjs/test/fixtures/function/this/main.js new file mode 100644 index 000000000..051cca398 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/this/main.js @@ -0,0 +1,7 @@ +const foo = require('./foo'); + +const obj = {}; +foo.call(obj); + +t.is(obj.x, 'x'); +t.is(this.y, 'y'); diff --git a/packages/commonjs/test/fixtures/function/toplevel-return-complex/_config.js b/packages/commonjs/test/fixtures/function/toplevel-return-complex/_config.js new file mode 100644 index 000000000..6a6ced06b --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return-complex/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports: (exports, t) => { + t.is(exports, 'bar'); + } +}; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return-complex/bar.js b/packages/commonjs/test/fixtures/function/toplevel-return-complex/bar.js new file mode 100644 index 000000000..6c780a1b8 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return-complex/bar.js @@ -0,0 +1,3 @@ +module.exports = function() { + return true; +}; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return-complex/foo.js b/packages/commonjs/test/fixtures/function/toplevel-return-complex/foo.js new file mode 100644 index 000000000..5aa1b8ef7 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return-complex/foo.js @@ -0,0 +1,7 @@ +const bar = require('./bar'); + +module.exports = 'bar'; +if (bar()) { + return; +} +module.exports = 'foo'; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return-complex/main.js b/packages/commonjs/test/fixtures/function/toplevel-return-complex/main.js new file mode 100644 index 000000000..ad34cb9a7 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return-complex/main.js @@ -0,0 +1,3 @@ +const foo = require('./foo'); + +module.exports = foo; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return/_config.js b/packages/commonjs/test/fixtures/function/toplevel-return/_config.js new file mode 100644 index 000000000..7112827a8 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return/_config.js @@ -0,0 +1,5 @@ +module.exports = { + exports: (exports, t) => { + t.is(exports, 'foo'); + } +}; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return/foo.js b/packages/commonjs/test/fixtures/function/toplevel-return/foo.js new file mode 100644 index 000000000..2651774ae --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return/foo.js @@ -0,0 +1 @@ +module.exports = 'foo'; diff --git a/packages/commonjs/test/fixtures/function/toplevel-return/main.js b/packages/commonjs/test/fixtures/function/toplevel-return/main.js new file mode 100644 index 000000000..41c901b97 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/toplevel-return/main.js @@ -0,0 +1,4 @@ +/* eslint-disable */ +const foo = require('./foo'); + +module.exports = 'foo'; diff --git a/packages/commonjs/test/fixtures/function/trailing-slash/foo/index.js b/packages/commonjs/test/fixtures/function/trailing-slash/foo/index.js new file mode 100644 index 000000000..888cae37a --- /dev/null +++ b/packages/commonjs/test/fixtures/function/trailing-slash/foo/index.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/packages/commonjs/test/fixtures/function/trailing-slash/main.js b/packages/commonjs/test/fixtures/function/trailing-slash/main.js new file mode 100644 index 000000000..969d0e841 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/trailing-slash/main.js @@ -0,0 +1,3 @@ +const foo = require('./foo/'); + +t.is(foo, 42); diff --git a/packages/commonjs/test/fixtures/function/typeof-require/foo.js b/packages/commonjs/test/fixtures/function/typeof-require/foo.js new file mode 100644 index 000000000..02a902fb0 --- /dev/null +++ b/packages/commonjs/test/fixtures/function/typeof-require/foo.js @@ -0,0 +1,5 @@ +if (typeof require === 'function' && require) { + module.exports = 1; +} else { + module.exports = 2; +} diff --git a/packages/commonjs/test/fixtures/function/typeof-require/main.js b/packages/commonjs/test/fixtures/function/typeof-require/main.js new file mode 100644 index 000000000..6f32f015a --- /dev/null +++ b/packages/commonjs/test/fixtures/function/typeof-require/main.js @@ -0,0 +1,3 @@ +import foo from './foo.js'; + +t.is(foo, 1); diff --git a/packages/commonjs/test/fixtures/samples/array-destructuring-assignment/main.js b/packages/commonjs/test/fixtures/samples/array-destructuring-assignment/main.js new file mode 100644 index 000000000..cb05c6670 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/array-destructuring-assignment/main.js @@ -0,0 +1,9 @@ +/* eslint-disable */ +function shuffleArray(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } +} + +exports.shuffleArray = shuffleArray; diff --git a/packages/commonjs/test/fixtures/samples/corejs/literal-with-default.js b/packages/commonjs/test/fixtures/samples/corejs/literal-with-default.js new file mode 100644 index 000000000..6d4f280cc --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/corejs/literal-with-default.js @@ -0,0 +1 @@ +module.exports = { default: 'foobar', __esModule: true }; diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports-browser-shims/main.js b/packages/commonjs/test/fixtures/samples/custom-named-exports-browser-shims/main.js new file mode 100644 index 000000000..e1783ae5a --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports-browser-shims/main.js @@ -0,0 +1,4 @@ +import { message, foo } from 'events'; + +t.is(message, 'this is not builtin'); +t.is(foo, 'this is a hidden export'); diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/main.js b/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/main.js new file mode 100644 index 000000000..dc5314327 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/main.js @@ -0,0 +1,3 @@ +import { thing } from './other.js'; + +t.is(thing, 'yes'); diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/other.js b/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/other.js new file mode 100644 index 000000000..b559a9cc8 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports-false-positive/other.js @@ -0,0 +1,3 @@ +/* require (https://github.com/rollup/rollup-plugin-commonjs/issues/36) */ +/* eslint-disable */ +export var thing = 'yes'; diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports-warn-builtins/main.js b/packages/commonjs/test/fixtures/samples/custom-named-exports-warn-builtins/main.js new file mode 100644 index 000000000..6620ad1be --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports-warn-builtins/main.js @@ -0,0 +1,3 @@ +import { message } from 'events'; + +t.is(message, 'this is not builtin'); diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports/main.js b/packages/commonjs/test/fixtures/samples/custom-named-exports/main.js new file mode 100644 index 000000000..70db426d5 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports/main.js @@ -0,0 +1,6 @@ +import { message } from 'external'; + +import { named } from './secret-named-exporter.js'; + +t.is(named, 42); +t.is(message, 'it works'); diff --git a/packages/commonjs/test/fixtures/samples/custom-named-exports/secret-named-exporter.js b/packages/commonjs/test/fixtures/samples/custom-named-exports/secret-named-exporter.js new file mode 100644 index 000000000..275a85813 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/custom-named-exports/secret-named-exporter.js @@ -0,0 +1,2 @@ +const myLib = exports; +myLib.named = 42; diff --git a/packages/commonjs/test/fixtures/samples/deconflict-helpers/main.js b/packages/commonjs/test/fixtures/samples/deconflict-helpers/main.js new file mode 100644 index 000000000..4f5b43392 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/deconflict-helpers/main.js @@ -0,0 +1,3 @@ +/* eslint-disable */ +const commonjsHelpers = { commonjsGlobal: 'nope' }; +module.exports = global; diff --git a/packages/commonjs/test/fixtures/samples/define-is-undefined/foo.js b/packages/commonjs/test/fixtures/samples/define-is-undefined/foo.js new file mode 100644 index 000000000..b31d6e038 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/define-is-undefined/foo.js @@ -0,0 +1,8 @@ +/* eslint-disable */ +(function(global, factory) { + typeof define === 'function' && define.amd + ? define(factory) + : typeof exports === 'object' && typeof module !== 'undefined' + ? (module.exports = factory()) + : (global.foo = factory()); +})(this, () => 42); diff --git a/packages/commonjs/test/fixtures/samples/define-is-undefined/main.js b/packages/commonjs/test/fixtures/samples/define-is-undefined/main.js new file mode 100644 index 000000000..c703fc2b0 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/define-is-undefined/main.js @@ -0,0 +1,4 @@ +/* eslint-disable */ +import foo from './foo.js'; + +export default 42; diff --git a/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/main.js b/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/main.js new file mode 100644 index 000000000..373efcb52 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/main.js @@ -0,0 +1,3 @@ +const { a } = require('./other.js'); + +t.is(a, 1); diff --git a/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/other.js b/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/other.js new file mode 100644 index 000000000..cc798ff50 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/es-modules-without-default-export/other.js @@ -0,0 +1 @@ +export const a = 1; diff --git a/packages/commonjs/test/fixtures/samples/extension/foo.coffee b/packages/commonjs/test/fixtures/samples/extension/foo.coffee new file mode 100644 index 000000000..ce0fffb75 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/extension/foo.coffee @@ -0,0 +1 @@ +module.exports = 21; diff --git a/packages/commonjs/test/fixtures/samples/extension/main.coffee b/packages/commonjs/test/fixtures/samples/extension/main.coffee new file mode 100644 index 000000000..7a8aa33b2 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/extension/main.coffee @@ -0,0 +1,2 @@ +var foo = require( './foo' ); +module.exports = foo * 2; diff --git a/packages/commonjs/test/fixtures/samples/external/main.js b/packages/commonjs/test/fixtures/samples/external/main.js new file mode 100644 index 000000000..01ccd93d8 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/external/main.js @@ -0,0 +1,3 @@ +import bar from 'bar'; + +export default bar().toUpperCase(); diff --git a/packages/commonjs/test/fixtures/samples/global-in-if-block/main.js b/packages/commonjs/test/fixtures/samples/global-in-if-block/main.js new file mode 100644 index 000000000..bc3e7994e --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/global-in-if-block/main.js @@ -0,0 +1,5 @@ +if (!global.count) { + global.count = 0; +} + +global.count += 1; diff --git a/packages/commonjs/test/fixtures/samples/global/main.js b/packages/commonjs/test/fixtures/samples/global/main.js new file mode 100644 index 000000000..55ec32fb5 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/global/main.js @@ -0,0 +1 @@ +global.foo = 'bar'; diff --git a/packages/commonjs/test/fixtures/samples/ignore-global/firstpass.js b/packages/commonjs/test/fixtures/samples/ignore-global/firstpass.js new file mode 100644 index 000000000..212a62107 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/ignore-global/firstpass.js @@ -0,0 +1,3 @@ +// eslint-disable-next-line +export var immediate = + typeof global.setImmediate === 'function' ? global.setImmediate : global.setTimeout; diff --git a/packages/commonjs/test/fixtures/samples/ignore-global/identifier.js b/packages/commonjs/test/fixtures/samples/ignore-global/identifier.js new file mode 100644 index 000000000..aeed8574b --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/ignore-global/identifier.js @@ -0,0 +1,4 @@ +// require (firstpass) +// eslint-disable-next-line +export var immediate = + typeof global.setImmediate === 'function' ? global.setImmediate : global.setTimeout; diff --git a/packages/commonjs/test/fixtures/samples/ignore-global/main.js b/packages/commonjs/test/fixtures/samples/ignore-global/main.js new file mode 100644 index 000000000..588798f50 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/ignore-global/main.js @@ -0,0 +1,3 @@ +export { immediate as immediate1 } from './firstpass'; +export { immediate as immediate2 } from './identifier'; +export { immediate as immediate3 } from './this'; diff --git a/packages/commonjs/test/fixtures/samples/ignore-global/this.js b/packages/commonjs/test/fixtures/samples/ignore-global/this.js new file mode 100644 index 000000000..a85e4a0d7 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/ignore-global/this.js @@ -0,0 +1,10 @@ +// require (firstpass) + +// "this" will be rewritten with "undefined" by rollup +// eslint-disable-next-line +export var immediate = + typeof this === 'undefined' + ? null + : typeof this.setImmediate === 'function' + ? this.setImmediate + : this.setTimeout; diff --git a/packages/commonjs/test/fixtures/samples/ignore-virtual-modules/main.js b/packages/commonjs/test/fixtures/samples/ignore-virtual-modules/main.js new file mode 100644 index 000000000..afe0809e5 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/ignore-virtual-modules/main.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line +module.exports = require('\0virtual'); diff --git a/packages/commonjs/test/fixtures/samples/invalid-syntax/main.js b/packages/commonjs/test/fixtures/samples/invalid-syntax/main.js new file mode 100644 index 000000000..d2627e404 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/invalid-syntax/main.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const foo = 2, \ No newline at end of file diff --git a/packages/commonjs/test/fixtures/samples/multiple-entry-points/2.js b/packages/commonjs/test/fixtures/samples/multiple-entry-points/2.js new file mode 100644 index 000000000..25ec1709d --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/multiple-entry-points/2.js @@ -0,0 +1,4 @@ +function second() { + console.log('second'); +} +exports.second = second; diff --git a/packages/commonjs/test/fixtures/samples/multiple-entry-points/3.js b/packages/commonjs/test/fixtures/samples/multiple-entry-points/3.js new file mode 100644 index 000000000..ef8ff499a --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/multiple-entry-points/3.js @@ -0,0 +1,5 @@ +function third() { + console.log('third'); +} + +exports.third = third; diff --git a/packages/commonjs/test/fixtures/samples/multiple-entry-points/4.js b/packages/commonjs/test/fixtures/samples/multiple-entry-points/4.js new file mode 100644 index 000000000..d4390690b --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/multiple-entry-points/4.js @@ -0,0 +1,3 @@ +export function fourth() { + console.log('fourth'); +} diff --git a/packages/commonjs/test/fixtures/samples/multiple-entry-points/b.js b/packages/commonjs/test/fixtures/samples/multiple-entry-points/b.js new file mode 100644 index 000000000..d348811cd --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/multiple-entry-points/b.js @@ -0,0 +1,5 @@ +import { second } from './2'; +import { third } from './3'; + +second(); +third(); diff --git a/packages/commonjs/test/fixtures/samples/multiple-entry-points/c.js b/packages/commonjs/test/fixtures/samples/multiple-entry-points/c.js new file mode 100644 index 000000000..3025ef7c4 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/multiple-entry-points/c.js @@ -0,0 +1,7 @@ +import { second } from './2'; +import { third } from './3'; +import { fourth } from './4'; + +second(); +third(); +fourth(); diff --git a/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/a.js b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/a.js new file mode 100644 index 000000000..bd816eaba --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/a.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/main.js b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/main.js new file mode 100644 index 000000000..1aacb6f84 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/main.js @@ -0,0 +1,5 @@ +import { a, b, c } from './other.js'; + +t.is(a, 1); +t.is(b, 2); +t.is(c, 3); diff --git a/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/other.js b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/other.js new file mode 100644 index 000000000..bc701abee --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/named-exports-from-object-literal/other.js @@ -0,0 +1,10 @@ +const a = require('./a.js'); + +const b = 2; + +module.exports = { + a, + b, + c: a + b, + 2: 1 + 1 +}; diff --git a/packages/commonjs/test/fixtures/samples/other-transforms/bar.js b/packages/commonjs/test/fixtures/samples/other-transforms/bar.js new file mode 100644 index 000000000..f9678122e --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/other-transforms/bar.js @@ -0,0 +1 @@ +module.exports = 40; diff --git a/packages/commonjs/test/fixtures/samples/other-transforms/foo.js b/packages/commonjs/test/fixtures/samples/other-transforms/foo.js new file mode 100644 index 000000000..18055f7ed --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/other-transforms/foo.js @@ -0,0 +1,3 @@ +const bar = require('./bar.js'); + +module.exports = bar + 1; diff --git a/packages/commonjs/test/fixtures/samples/other-transforms/main.js b/packages/commonjs/test/fixtures/samples/other-transforms/main.js new file mode 100644 index 000000000..3b101a9b5 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/other-transforms/main.js @@ -0,0 +1,3 @@ +import foo from './foo.js'; + +t.is(foo, 42); diff --git a/packages/commonjs/test/fixtures/samples/paren-expression/index.js b/packages/commonjs/test/fixtures/samples/paren-expression/index.js new file mode 100644 index 000000000..888cae37a --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/paren-expression/index.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/packages/commonjs/test/fixtures/samples/reexport/export.js b/packages/commonjs/test/fixtures/samples/reexport/export.js new file mode 100644 index 000000000..5cb323723 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/reexport/export.js @@ -0,0 +1 @@ +exports.named = 2; diff --git a/packages/commonjs/test/fixtures/samples/reexport/main.js b/packages/commonjs/test/fixtures/samples/reexport/main.js new file mode 100644 index 000000000..28abb9a60 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/reexport/main.js @@ -0,0 +1,3 @@ +import { named } from './reexport.js'; + +t.is(named, 2); diff --git a/packages/commonjs/test/fixtures/samples/reexport/reexport.js b/packages/commonjs/test/fixtures/samples/reexport/reexport.js new file mode 100644 index 000000000..fb12c5825 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/reexport/reexport.js @@ -0,0 +1 @@ +module.exports = require('./export.js'); diff --git a/packages/commonjs/test/fixtures/samples/rename-index/invalid-var/index.js b/packages/commonjs/test/fixtures/samples/rename-index/invalid-var/index.js new file mode 100644 index 000000000..57fba0ba9 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/rename-index/invalid-var/index.js @@ -0,0 +1 @@ +module.exports = 'invalid'; diff --git a/packages/commonjs/test/fixtures/samples/rename-index/main.js b/packages/commonjs/test/fixtures/samples/rename-index/main.js new file mode 100644 index 000000000..27dea0f8b --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/rename-index/main.js @@ -0,0 +1,5 @@ +import invalid from './invalid-var'; +import valid from './validVar'; +import other from './other/nonIndex'; + +console.log(invalid, valid, other); diff --git a/packages/commonjs/test/fixtures/samples/rename-index/other/nonIndex.js b/packages/commonjs/test/fixtures/samples/rename-index/other/nonIndex.js new file mode 100644 index 000000000..66de3ecc7 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/rename-index/other/nonIndex.js @@ -0,0 +1 @@ +module.exports = 'not an index file'; diff --git a/packages/commonjs/test/fixtures/samples/rename-index/validVar/index.js b/packages/commonjs/test/fixtures/samples/rename-index/validVar/index.js new file mode 100644 index 000000000..60540be55 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/rename-index/validVar/index.js @@ -0,0 +1 @@ +module.exports = 'valid'; diff --git a/packages/commonjs/test/fixtures/samples/reserved-as-property/main.js b/packages/commonjs/test/fixtures/samples/reserved-as-property/main.js new file mode 100644 index 000000000..63b60c76f --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/reserved-as-property/main.js @@ -0,0 +1 @@ +module.exports.delete = 'foo'; diff --git a/packages/commonjs/test/fixtures/samples/sourcemap/foo.js b/packages/commonjs/test/fixtures/samples/sourcemap/foo.js new file mode 100644 index 000000000..7a4e8a723 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/sourcemap/foo.js @@ -0,0 +1 @@ +export default 42; diff --git a/packages/commonjs/test/fixtures/samples/sourcemap/main.js b/packages/commonjs/test/fixtures/samples/sourcemap/main.js new file mode 100644 index 000000000..1108439c7 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/sourcemap/main.js @@ -0,0 +1,3 @@ +const foo = require('./foo'); + +console.log(foo); diff --git a/packages/commonjs/test/fixtures/samples/symlinked-node-modules/index.js b/packages/commonjs/test/fixtures/samples/symlinked-node-modules/index.js new file mode 100644 index 000000000..e533ce319 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/symlinked-node-modules/index.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +import { foo } from 'events'; diff --git a/packages/commonjs/test/fixtures/samples/symlinked-node-modules/node_modules/events/index.js b/packages/commonjs/test/fixtures/samples/symlinked-node-modules/node_modules/events/index.js new file mode 100644 index 000000000..ec2b410a0 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/symlinked-node-modules/node_modules/events/index.js @@ -0,0 +1,5 @@ +// eslint-disable-next-line +exports.message = 'this is not builtin'; + +const myLib = exports; +myLib.foo = 'this is a hidden export'; diff --git a/packages/commonjs/test/fixtures/samples/umd/correct-scoping.js b/packages/commonjs/test/fixtures/samples/umd/correct-scoping.js new file mode 100644 index 000000000..a4816cf64 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/umd/correct-scoping.js @@ -0,0 +1,5 @@ +if (typeof require === 'function') { + module.exports = (function(require) { + return typeof require; + })({}); +} diff --git a/packages/commonjs/test/fixtures/samples/umd/protobuf.js b/packages/commonjs/test/fixtures/samples/umd/protobuf.js new file mode 100644 index 000000000..62b643b3a --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/umd/protobuf.js @@ -0,0 +1,14 @@ +/* eslint-disable */ +// From https://github.com/rollup/rollup-plugin-commonjs/issues/38 +(function(global, factory) { + /* AMD */ if (typeof define === 'function' && define.amd) define(['foo'], factory); + /* CommonJS */ else if ( + typeof require === 'function' && + typeof module === 'object' && + module && + module.exports + ) + module.exports = factory(require('foo'), true); + /* Global */ else + (global.dcodeIO = global.dcodeIO || {}).ProtoBuf = factory(global.dcodeIO.ByteBuffer); +})(this, (ByteBuffer, isCommonJS) => isCommonJS); diff --git a/packages/commonjs/test/fixtures/samples/umd/sinon.js b/packages/commonjs/test/fixtures/samples/umd/sinon.js new file mode 100644 index 000000000..bed61cd52 --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/umd/sinon.js @@ -0,0 +1,41 @@ +/* eslint-disable */ +// From https://github.com/rollup/rollup-plugin-commonjs/issues/38 +const sinon = (function() { + // eslint-disable-line no-unused-vars + + let sinonModule; + const isNode = typeof module !== 'undefined' && module.exports && typeof require === 'function'; + const isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd; + + function loadDependencies(require, exports, module) { + sinonModule = module.exports = require('./sinon/util/core'); + require('./sinon/extend'); + require('./sinon/walk'); + require('./sinon/typeOf'); + require('./sinon/times_in_words'); + require('./sinon/spy'); + require('./sinon/call'); + require('./sinon/behavior'); + require('./sinon/stub'); + require('./sinon/mock'); + require('./sinon/collection'); + require('./sinon/assert'); + require('./sinon/sandbox'); + require('./sinon/test'); + require('./sinon/test_case'); + require('./sinon/match'); + require('./sinon/format'); + require('./sinon/log_error'); + } + + if (isAMD) { + define(loadDependencies); + } else if (isNode) { + loadDependencies(require, module.exports, module); + sinonModule = module.exports; + } else { + sinonModule = {}; + } + + return sinonModule; +})(); diff --git a/packages/commonjs/test/fixtures/samples/use-own-output/from-rollup.js b/packages/commonjs/test/fixtures/samples/use-own-output/from-rollup.js new file mode 100644 index 000000000..3246cbd9f --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/use-own-output/from-rollup.js @@ -0,0 +1,2 @@ +Object.defineProperty(exports, '__esModule', { value: true }); +exports.x = 10; diff --git a/packages/commonjs/test/fixtures/samples/use-own-output/main.js b/packages/commonjs/test/fixtures/samples/use-own-output/main.js new file mode 100644 index 000000000..bdebb3cfd --- /dev/null +++ b/packages/commonjs/test/fixtures/samples/use-own-output/main.js @@ -0,0 +1,4 @@ +/* eslint-disable no-undef */ +import * as b from './from-rollup'; + +window.b = b; diff --git a/packages/commonjs/test/form.js b/packages/commonjs/test/form.js new file mode 100644 index 000000000..403d94634 --- /dev/null +++ b/packages/commonjs/test/form.js @@ -0,0 +1,61 @@ +/* eslint-disable global-require, import/no-dynamic-require, no-console */ + +import { existsSync, readdirSync, readFileSync } from 'fs'; + +import * as acorn from 'acorn'; +import test from 'ava'; + +import { commonjs } from './helpers/util'; + +process.chdir(__dirname); + +const transformContext = { + parse: (input, options) => + acorn.parse(input, { + ecmaVersion: 9, + sourceType: 'module', + ...options + }) +}; + +readdirSync('./fixtures/form').forEach((dir) => { + let config; + + try { + config = require(`./fixtures/form/${dir}/_config.js`); + } catch (err) { + config = {}; + } + + (config.solo ? test.only : test)(dir, async (t) => { + const { transform } = commonjs(config.options); + const id = `./fixtures/form/${dir}/input.js`; + + transformContext.getModuleInfo = (moduleId) => { + return { + isEntry: config.entry && moduleId === id + }; + }; + transformContext.error = (base, props) => { + let error = base; + if (!(base instanceof Error)) error = Object.assign(new Error(base.message), base); + if (props) Object.assign(error, props); + throw error; + }; + + const input = readFileSync(id, 'utf-8'); + + let outputFile = `fixtures/form/${dir}/output`; + if (existsSync(`${outputFile}.${process.platform}.js`)) { + outputFile += `.${process.platform}.js`; + } else { + outputFile += '.js'; + } + + const expected = readFileSync(outputFile, 'utf-8').trim(); + + const transformed = transform.call(transformContext, input, id); + const actual = (transformed ? transformed.code : input).trim().replace(/\0/g, '_'); + t.is(actual, expected); + }); +}); diff --git a/packages/commonjs/test/function.js b/packages/commonjs/test/function.js new file mode 100644 index 000000000..6499782dd --- /dev/null +++ b/packages/commonjs/test/function.js @@ -0,0 +1,46 @@ +/* eslint-disable global-require, import/no-dynamic-require, no-console */ + +import { readdirSync } from 'fs'; + +import test from 'ava'; +import { rollup } from 'rollup'; + +import { commonjs, getCodeFromBundle, execute } from './helpers/util'; + +process.chdir(__dirname); + +readdirSync('./fixtures/function').forEach((dir) => { + let config; + + try { + config = require(`./fixtures/function/${dir}/_config.js`); + } catch (err) { + config = {}; + } + + (config.solo ? test.only : test)(dir, async (t) => { + const options = Object.assign( + { + input: `fixtures/function/${dir}/main.js` + }, + config.options || {}, + { + plugins: [ + ...((config.options && config.options.plugins) || []), + commonjs(config.pluginOptions) + ] + } + ); + + const bundle = await rollup(options); + const code = await getCodeFromBundle(bundle); + if (config.show || config.solo) { + console.error(code); + } + + const { exports, global } = execute(code, config.context, t); + + if (config.exports) config.exports(exports, t); + if (config.global) config.global(global, t); + }); +}); diff --git a/packages/commonjs/test/helpers/util.js b/packages/commonjs/test/helpers/util.js new file mode 100644 index 000000000..1a1eed8e4 --- /dev/null +++ b/packages/commonjs/test/helpers/util.js @@ -0,0 +1,65 @@ +const relative = require('require-relative'); + +const commonjsPlugin = require('../../dist/index'); + +function commonjs(options) { + delete require.cache[require.resolve('../..')]; + return commonjsPlugin(options); +} + +function execute(code, context = {}, t) { + let fn; + const contextKeys = Object.keys(context); + const argNames = contextKeys.concat( + 'module', + 'exports', + 'require', + 'global', + 't', + 'globalThis', + code + ); + + try { + fn = new Function(...argNames); // eslint-disable-line no-new-func + } catch (err) { + // syntax error + console.log(code); // eslint-disable-line no-console + throw err; + } + + const module = { exports: {} }; + const global = {}; + + const argValues = contextKeys + .map((key) => context[key]) + .concat(module, module.exports, (name) => relative(name, 'test/x.js'), global, t, global); + + fn(...argValues); + + return { + code, + exports: module.exports, + global + }; +} + +const getOutputFromGenerated = (generated) => (generated.output ? generated.output[0] : generated); + +async function getCodeFromBundle(bundle, customOptions = {}) { + const options = Object.assign({ format: 'cjs' }, customOptions); + return getOutputFromGenerated(await bundle.generate(options)).code; +} + +async function executeBundle(bundle, t, { context, exports } = {}) { + const code = await getCodeFromBundle(bundle, exports ? { exports } : {}); + return execute(code, context, t); +} + +module.exports = { + commonjs, + execute, + getOutputFromGenerated, + getCodeFromBundle, + executeBundle +}; diff --git a/packages/commonjs/test/node_modules/.gitkeep b/packages/commonjs/test/node_modules/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/commonjs/test/node_modules/bar/index.js b/packages/commonjs/test/node_modules/bar/index.js new file mode 100644 index 000000000..41bd6d6cb --- /dev/null +++ b/packages/commonjs/test/node_modules/bar/index.js @@ -0,0 +1,4 @@ +const baz = require('baz'); +module.exports = function () { + return baz; +}; \ No newline at end of file diff --git a/packages/commonjs/test/node_modules/baz/index.js b/packages/commonjs/test/node_modules/baz/index.js new file mode 100644 index 000000000..58deca10a --- /dev/null +++ b/packages/commonjs/test/node_modules/baz/index.js @@ -0,0 +1 @@ +module.exports = 'hello'; \ No newline at end of file diff --git a/packages/commonjs/test/node_modules/events/index.js b/packages/commonjs/test/node_modules/events/index.js new file mode 100644 index 000000000..cf10076c1 --- /dev/null +++ b/packages/commonjs/test/node_modules/events/index.js @@ -0,0 +1,4 @@ +exports.message = 'this is not builtin'; + +const myLib = exports; +myLib.foo = 'this is a hidden export'; \ No newline at end of file diff --git a/packages/commonjs/test/node_modules/external/index.js b/packages/commonjs/test/node_modules/external/index.js new file mode 100644 index 000000000..6a59a245b --- /dev/null +++ b/packages/commonjs/test/node_modules/external/index.js @@ -0,0 +1,2 @@ +var externalLib = exports; +externalLib.message = 'it works'; diff --git a/packages/commonjs/test/node_modules/foo/index.js b/packages/commonjs/test/node_modules/foo/index.js new file mode 100644 index 000000000..d00e0a2e1 --- /dev/null +++ b/packages/commonjs/test/node_modules/foo/index.js @@ -0,0 +1 @@ +module.exports = 'foo'; \ No newline at end of file diff --git a/packages/commonjs/test/test.js b/packages/commonjs/test/test.js new file mode 100644 index 000000000..255559db4 --- /dev/null +++ b/packages/commonjs/test/test.js @@ -0,0 +1,739 @@ +/* eslint-disable line-comment-position, no-new-func, no-undefined */ +import * as path from 'path'; + +import test from 'ava'; +import { SourceMapConsumer } from 'source-map'; +import { install } from 'source-map-support'; +import { getLocator } from 'locate-character'; +import { rollup } from 'rollup'; +import resolve from '@rollup/plugin-node-resolve'; + +import { testBundle } from '../../../util/test'; + +import { commonjs, getCodeFromBundle, getOutputFromGenerated, executeBundle } from './helpers/util'; + +install(); + +process.chdir(__dirname); + +// most of these should be moved over to function... +test('generates a sourcemap', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/sourcemap/main.js', + plugins: [commonjs({ sourceMap: true })] + }); + + const { code, map } = getOutputFromGenerated( + await bundle.generate({ + format: 'cjs', + sourcemap: true, + sourcemapFile: path.resolve('bundle.js') + }) + ); + + const smc = new SourceMapConsumer(map); + const locator = getLocator(code, { offsetLine: 1 }); + + let generatedLoc = locator('42'); + let loc = smc.originalPositionFor(generatedLoc); // 42 + t.is(loc.source, 'fixtures/samples/sourcemap/foo.js'); + t.is(loc.line, 1); + t.is(loc.column, 15); + + generatedLoc = locator('log'); + loc = smc.originalPositionFor(generatedLoc); // log + t.is(loc.source, 'fixtures/samples/sourcemap/main.js'); + t.is(loc.line, 3); + t.is(loc.column, 8); +}); + +test('supports an array of multiple entry points', async (t) => { + const bundle = await rollup({ + input: [ + 'fixtures/samples/multiple-entry-points/b.js', + 'fixtures/samples/multiple-entry-points/c.js' + ], + plugins: [commonjs()] + }); + + const { output } = await bundle.generate({ + format: 'cjs', + chunkFileNames: '[name].js' + }); + if (Array.isArray(output)) { + t.is(output.length, 3); + t.truthy(output.find(({ fileName }) => fileName === 'b.js')); + t.truthy(output.find(({ fileName }) => fileName === 'c.js')); + } else { + t.is(Object.keys(output).length, 3); + t.is('b.js' in output, true); + t.is('c.js' in output, true); + } +}); + +test('supports an object of multiple entry points', async (t) => { + const bundle = await rollup({ + input: { + b: require.resolve('./fixtures/samples/multiple-entry-points/b.js'), + c: require.resolve('./fixtures/samples/multiple-entry-points/c.js') + }, + plugins: [resolve(), commonjs()] + }); + + const { output } = await bundle.generate({ + format: 'cjs', + chunkFileNames: '[name].js' + }); + + if (Array.isArray(output)) { + t.is(output.length, 3); + t.truthy(output.find(({ fileName }) => fileName === 'b.js')); + t.truthy(output.find(({ fileName }) => fileName === 'c.js')); + } else { + t.is(Object.keys(output).length, 3); + t.is('b.js' in output, true); + t.is('c.js' in output, true); + } +}); + +test('handles references to `global`', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/global/main.js', + plugins: [commonjs()] + }); + + const code = await getCodeFromBundle(bundle); + + const mockWindow = {}; + const mockGlobal = {}; + const mockSelf = {}; + + const fn = new Function('module', 'globalThis', 'window', 'global', 'self', code); + + fn({}, undefined, mockWindow, mockGlobal, mockSelf); + t.is(mockWindow.foo, 'bar', code); + t.is(mockGlobal.foo, undefined, code); + t.is(mockSelf.foo, undefined, code); + + fn({}, undefined, undefined, mockGlobal, mockSelf); + t.is(mockGlobal.foo, 'bar', code); + t.is(mockSelf.foo, undefined, code); + + fn({}, undefined, undefined, undefined, mockSelf); + t.is(mockSelf.foo, 'bar', code); +}); + +test('handles multiple references to `global`', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/global-in-if-block/main.js', + plugins: [commonjs()] + }); + + const code = await getCodeFromBundle(bundle); + const fn = new Function('module', 'exports', 'globalThis', code); + const module = { exports: {} }; + const globalThis = {}; + + fn(module, module.exports, globalThis); + t.is(globalThis.count, 1); + + fn(module, module.exports, globalThis); + t.is(globalThis.count, 2); +}); + +test('handles transpiled CommonJS modules', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/corejs/literal-with-default.js', + plugins: [commonjs()] + }); + + const code = await getCodeFromBundle(bundle); + const module = { exports: {} }; + + const fn = new Function('module', 'exports', code); + fn(module, module.exports); + + t.is(module.exports, 'foobar', code); +}); + +test('handles successive builds', async (t) => { + const plugin = commonjs(); + let bundle = await rollup({ + input: 'fixtures/samples/corejs/literal-with-default.js', + plugins: [plugin] + }); + await bundle.generate({ + format: 'cjs' + }); + + bundle = await rollup({ + input: 'fixtures/samples/corejs/literal-with-default.js', + plugins: [plugin] + }); + const code = await getCodeFromBundle(bundle); + + const module = { exports: {} }; + + const fn = new Function('module', 'exports', code); + fn(module, module.exports); + + t.is(module.exports, 'foobar', code); +}); + +test('allows named exports to be added explicitly via config', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/custom-named-exports/main.js', + plugins: [ + resolve(), + commonjs({ + namedExports: { + 'fixtures/samples/custom-named-exports/secret-named-exporter.js': ['named'], + external: ['message'] + } + }) + ] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); + +test('handles warnings without error when resolving named exports', async (t) => { + await t.notThrowsAsync( + rollup({ + input: 'fixtures/samples/custom-named-exports-warn-builtins/main.js', + plugins: [ + resolve(), + commonjs({ + namedExports: { + events: ['message'] + } + }) + ] + }) + ); +}); + +test.serial('handles symlinked node_modules with preserveSymlinks: false', (t) => { + const cwd = process.cwd(); + + // ensure we resolve starting from a directory with + // symlinks in node_modules. + + process.chdir('fixtures/samples/symlinked-node-modules'); + + return t.notThrowsAsync( + rollup({ + input: './index.js', + onwarn(warning) { + // should not get a warning about unknown export 'foo' + throw new Error(`Unexpected warning: ${warning.message}`); + }, + plugins: [ + resolve({ + preserveSymlinks: false, + preferBuiltins: false + }), + commonjs({ + namedExports: { + events: ['foo'] + } + }) + ] + }) + .then((v) => { + process.chdir(cwd); + return v; + }) + .catch((err) => { + process.chdir(cwd); + throw err; + }) + ); +}); + +test('handles named exports for built-in shims', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/custom-named-exports-browser-shims/main.js', + plugins: [ + resolve({ + preferBuiltins: false + }), + commonjs({ + namedExports: { + events: ['foo'] + } + }) + ] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); + +test('ignores false positives with namedExports (#36)', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/custom-named-exports-false-positive/main.js', + plugins: [ + resolve(), + commonjs({ + namedExports: { + irrelevant: ['lol'] + } + }) + ] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); + +test('converts a CommonJS module with custom file extension', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/extension/main.coffee', + plugins: [commonjs({ extensions: ['.coffee'] })] + }); + + t.is((await executeBundle(bundle, t)).exports, 42); +}); + +test('identifies named exports from object literals', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/named-exports-from-object-literal/main.js', + plugins: [commonjs()] + }); + + t.plan(3); + await testBundle(t, bundle); +}); + +test('can ignore references to `global`', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/ignore-global/main.js', + plugins: [commonjs({ ignoreGlobal: true })], + onwarn: (warning) => { + if (warning.code === 'THIS_IS_UNDEFINED') return; + // eslint-disable-next-line no-console + console.warn(warning.message); + } + }); + + const code = await getCodeFromBundle(bundle); + const { exports, global } = await executeBundle(bundle, t); + + t.is(exports.immediate1, global.setImmediate, code); + t.is(exports.immediate2, global.setImmediate, code); + t.is(exports.immediate3, null, code); +}); + +test('can handle parens around right have node while producing default export', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/paren-expression/index.js', + plugins: [commonjs()] + }); + + t.is((await executeBundle(bundle, t)).exports, 42); +}); + +test('typeof transforms: correct-scoping', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/umd/correct-scoping.js', + plugins: [commonjs()] + }); + + t.is((await executeBundle(bundle, t)).exports, 'object'); +}); + +test('typeof transforms: protobuf', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/umd/protobuf.js', + external: ['bytebuffer'], + plugins: [commonjs()] + }); + + t.is((await executeBundle(bundle, t)).exports, true); +}); + +test('typeof transforms: sinon', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/umd/sinon.js', + plugins: [commonjs()] + }); + + const { code } = getOutputFromGenerated(await bundle.generate({ format: 'es' })); + + t.is(code.indexOf('typeof require'), -1, code); + // t.not( code.indexOf( 'typeof module' ), -1, code ); // #151 breaks this test + // t.not( code.indexOf( 'typeof define' ), -1, code ); // #144 breaks this test +}); + +test('deconflicts helper name', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/deconflict-helpers/main.js', + plugins: [commonjs()] + }); + + const { exports } = await executeBundle(bundle, t); + t.not(exports, 'nope'); +}); + +test('deconflicts reserved keywords', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/reserved-as-property/main.js', + plugins: [commonjs()] + }); + + const reservedProp = (await executeBundle(bundle, { exports: 'named' })).exports.delete; + t.is(reservedProp, 'foo'); +}); + +test('does not process the entry file when it has a leading "." (issue #63)', async (t) => { + const bundle = await rollup({ + input: './fixtures/function/basic/main.js', + plugins: [commonjs()] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); + +test('does not reexport named contents', async (t) => { + try { + await rollup({ + input: 'fixtures/samples/reexport/main.js', + plugins: [commonjs()] + }); + } catch (error) { + t.is( + error.message, + `'named' is not exported by fixtures/samples${path.sep}reexport${path.sep}reexport.js` + ); + } +}); + +test('respects other plugins', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/other-transforms/main.js', + plugins: [ + { + transform(code, id) { + if (id[0] === '\0') return null; + return code.replace('40', '41'); + } + }, + commonjs() + ] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); + +test('rewrites top-level defines', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/define-is-undefined/main.js', + plugins: [commonjs()] + }); + + function define() { + throw new Error('nope'); + } + + define.amd = true; + + const { exports } = await executeBundle(bundle, { context: { define } }); + t.is(exports, 42); +}); + +test('respects options.external', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/external/main.js', + plugins: [resolve(), commonjs()], + external: ['baz'] + }); + + const code = await getCodeFromBundle(bundle); + t.is(code.indexOf('hello'), -1); + + const { exports } = await executeBundle(bundle, t); + t.is(exports, 'HELLO'); +}); + +test('prefers to set name using directory for index files', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/rename-index/main.js', + plugins: [commonjs()] + }); + + const code = await getCodeFromBundle(bundle); + t.is(code.indexOf('var index'), -1); + t.not(code.indexOf('var invalidVar'), -1); + t.not(code.indexOf('var validVar'), -1); + t.not(code.indexOf('var nonIndex'), -1); +}); + +test('does not misassign default when consuming rollup output', async (t) => { + // Issue #224 + const bundle = await rollup({ + input: 'fixtures/samples/use-own-output/main.js', + plugins: [commonjs()] + }); + + const window = {}; + await executeBundle(bundle, t, { context: { window } }); + t.not(window.b.default, undefined); +}); + +test('does not warn even if the ES module not export "default"', async (t) => { + const warns = []; + await rollup({ + input: 'fixtures/samples/es-modules-without-default-export/main.js', + plugins: [commonjs()], + onwarn: (warn) => warns.push(warn) + }); + t.is(warns.length, 0); + + await rollup({ + input: 'fixtures/function/bare-import/bar.js', + plugins: [commonjs()], + onwarn: (warn) => warns.push(warn) + }); + t.is(warns.length, 0); + + await rollup({ + input: 'fixtures/function/bare-import-comment/main.js', + plugins: [commonjs()], + onwarn: (warn) => warns.push(warn) + }); + t.is(warns.length, 0); +}); + +test('compiles with cache', async (t) => { + // specific commonjs require() to ensure same instance is used + // eslint-disable-next-line global-require + const commonjsInstance = require('../dist/index'); + + const bundle = await rollup({ + input: 'fixtures/function/index/main.js', + plugins: [commonjsInstance()] + }); + + await t.notThrowsAsync( + rollup({ + input: 'fixtures/function/index/main.js', + plugins: [commonjsInstance()], + cache: bundle + }) + ); +}); + +test('creates an error with a code frame when parsing fails', async (t) => { + try { + await rollup({ + input: 'fixtures/samples/invalid-syntax/main.js', + plugins: [commonjs()] + }); + } catch (error) { + t.is( + error.frame, + '1: /* eslint-disable */\n2: export const foo = 2,\n ^' + ); + } +}); + +test('ignores virtual modules', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/ignore-virtual-modules/main.js', + plugins: [ + commonjs(), + { + resolveId(id) { + if (id === '\0virtual' || id === '\0resolved-virtual') { + return '\0resolved-virtual'; + } + return null; + }, + load(id) { + if (id === '\0resolved-virtual') { + return 'export default "Virtual export"'; + } + return null; + } + } + ] + }); + t.is((await executeBundle(bundle, t)).exports, 'Virtual export'); +}); + +test('does not produce warnings when importing .mjs without default export', async (t) => { + const bundle = await rollup({ + input: 'main.mjs', + onwarn(warning) { + // The interop should not trigger a "default is not exported" warning + throw new Error(`Unexpected warning: ${warning.message}`); + }, + plugins: [ + commonjs(), + { + load(id) { + if (id === 'main.mjs') { + return 'import cjs from "cjs.js"; export default cjs;'; + } + if (id === 'cjs.js') { + // CJS libraries expect to receive a CJS file here + return 'module.exports = require("fromNodeModules");'; + } + if (id === 'fromNodeModules.mjs') { + return 'export const result = "from esm";'; + } + return null; + }, + resolveId(id) { + // rollup-plugin-node-resolve usually prefers ESM versions + if (id === 'fromNodeModules') { + return 'fromNodeModules.mjs'; + } + return id; + } + } + ] + }); + t.deepEqual((await executeBundle(bundle, t)).exports, { result: 'from esm' }); +}); + +test('produces optimized code when importing esm with a known default export', async (t) => { + const bundle = await rollup({ + input: 'main.js', + plugins: [ + commonjs(), + { + load(id) { + if (id === 'main.js') { + return 'module.exports = require("esm.js")'; + } + if (id === 'esm.js') { + return 'export const ignored = "ignored"; export default "default"'; + } + return null; + }, + resolveId(id) { + return id; + } + } + ] + }); + const code = await getCodeFromBundle(bundle); + t.is( + code, + `'use strict'; + +var require$$0 = "default"; + +var main = require$$0; + +module.exports = main; +` + ); +}); + +test('produces optimized code when importing esm without a default export', async (t) => { + const bundle = await rollup({ + input: 'main.js', + plugins: [ + commonjs(), + { + load(id) { + if (id === 'main.js') { + return 'module.exports = require("esm.js")'; + } + if (id === 'esm.js') { + return 'export const value = "value";'; + } + return null; + }, + resolveId(id) { + return id; + } + } + ] + }); + const code = await getCodeFromBundle(bundle); + t.is( + code, + `'use strict'; + +const value = "value"; + +var esm = /*#__PURE__*/Object.freeze({ + __proto__: null, + value: value +}); + +var main = esm; + +module.exports = main; +` + ); +}); + +test('handles array destructuring assignment', async (t) => { + const bundle = await rollup({ + input: 'fixtures/samples/array-destructuring-assignment/main.js', + plugins: [commonjs({ sourceMap: true })] + }); + + const code = await getCodeFromBundle(bundle); + t.is( + code, + `'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/* eslint-disable */ +function shuffleArray(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } +} + +var shuffleArray_1 = shuffleArray; + +var main = { + shuffleArray: shuffleArray_1 +}; + +exports.default = main; +exports.shuffleArray = shuffleArray_1; +` + ); +}); + +test('normalizes paths used in the named export map', async (t) => { + // Deliberately denormalizes file paths and ensures named exports + // continue to work. + function hookedResolve() { + const resolvePlugin = resolve(); + const oldResolve = resolvePlugin.resolveId; + resolvePlugin.resolveId = async (...args) => { + const result = await oldResolve.apply(resolvePlugin, args); + if (result) { + result.id = result.id.replace(/\/|\\/, path.sep); + } + + return result; + }; + + return resolvePlugin; + } + + const bundle = await rollup({ + input: 'fixtures/samples/custom-named-exports/main.js', + plugins: [ + hookedResolve(), + commonjs({ + namedExports: { + 'fixtures/samples/custom-named-exports/secret-named-exporter.js': ['named'], + external: ['message'] + } + }) + ] + }); + + await t.notThrowsAsync(executeBundle(bundle, t)); +}); diff --git a/packages/commonjs/test/types.ts b/packages/commonjs/test/types.ts new file mode 100644 index 000000000..3dca2593b --- /dev/null +++ b/packages/commonjs/test/types.ts @@ -0,0 +1,22 @@ +import commonjs from '../types'; + +const config: import("rollup").RollupOptions = { + input: 'main.js', + output: { + file: 'bundle.js', + format: 'iife' + }, + plugins: [ + commonjs({ + include: 'node_modules/**', + exclude: [ 'node_modules/foo/**', 'node_modules/bar/**', /node_modules/ ], + extensions: [ '.js', '.coffee' ], + ignoreGlobal: false, + sourceMap: false, + namedExports: { './module.js': ['foo', 'bar' ] }, + ignore: [ 'conditional-runtime-dependency' ] + }) + ] +}; + +export default config; diff --git a/packages/commonjs/types/index.d.ts b/packages/commonjs/types/index.d.ts new file mode 100644 index 000000000..90530c87f --- /dev/null +++ b/packages/commonjs/types/index.d.ts @@ -0,0 +1,50 @@ +import { Plugin } from 'rollup'; + +interface RollupCommonJSOptions { + /** + * non-CommonJS modules will be ignored, but you can also + * specifically include/exclude files + * @default undefined + */ + include?: string | RegExp | ReadonlyArray, + /** + * non-CommonJS modules will be ignored, but you can also + * specifically include/exclude files + * @default undefined + */ + exclude?: string | RegExp | ReadonlyArray, + /** + * search for files other than .js files (must already + * be transpiled by a previous plugin!) + * @default [ '.js' ] + */ + extensions?: ReadonlyArray, + /** + * if true then uses of `global` won't be dealt with by this plugin + * @default false + */ + ignoreGlobal?: boolean, + /** + * if false then skip sourceMap generation for CommonJS modules + * @default true + */ + sourceMap?: boolean, + /** + * explicitly specify unresolvable named exports + * ([see below for more details](https://github.com/rollup/plugins/tree/master/packages/commonjs#named-exports)) + * @default undefined + */ + namedExports?: { [package: string]: ReadonlyArray }, + /** + * sometimes you have to leave require statements + * unconverted. Pass an array containing the IDs + * or a `id => boolean` function. Only use this + * option if you know what you're doing! + */ + ignore?: ReadonlyArray boolean)>, +} + +/** + * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle + */ +export default function commonjs(options?: RollupCommonJSOptions): Plugin; diff --git a/packages/node-resolve/README.md b/packages/node-resolve/README.md index f0eac2f8b..99cc3ed74 100755 --- a/packages/node-resolve/README.md +++ b/packages/node-resolve/README.md @@ -141,14 +141,14 @@ customResolveOptions: { } ``` -## Using with rollup-plugin-commonjs +## Using with @rollup/plugin-commonjs -Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs): +Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [@rollup/plugin-commonjs](https://github.com/rollup/plugins/packages/commonjs): ```js // rollup.config.js import resolve from '@rollup/plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; +import commonjs from '@rollup/plugin-commonjs'; export default { input: 'main.js', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 583491cd7..28accf803 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,8 +1,8 @@ importers: .: devDependencies: - '@typescript-eslint/eslint-plugin': 2.11.0_cb180cc210aa77d673b05caf1fc681e5 - '@typescript-eslint/parser': 2.11.0_typescript@3.7.3 + '@typescript-eslint/eslint-plugin': 2.12.0_66854ba8971b2256e3dae1b103509efe + '@typescript-eslint/parser': 2.12.0_typescript@3.7.3 ava: 2.4.0 chalk: 2.4.2 codecov-lite: 0.3.1 @@ -13,7 +13,7 @@ importers: husky: 3.1.0 lint-staged: 9.5.0 nyc: 14.1.1 - pnpm: 4.4.0 + pnpm: 4.5.0 prettier: 1.19.1 prettier-plugin-package: 0.3.1_prettier@1.19.1 rollup: 1.27.13 @@ -49,8 +49,8 @@ importers: slash: 3.0.0 devDependencies: del-cli: 3.0.0 - rollup: 1.27.13 - rollup-plugin-node-resolve: 5.2.0_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-node-resolve: 5.2.0_rollup@1.27.8 specifiers: del-cli: ^3.0.0 rollup: ^1.20.0 @@ -61,8 +61,8 @@ importers: node-noop: 1.0.0 devDependencies: del: 5.1.0 - rollup: 1.27.13 - rollup-plugin-node-resolve: 5.2.0_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-node-resolve: 5.2.0_rollup@1.27.8 specifiers: del: ^5.1.0 node-noop: ^1.0.0 @@ -76,7 +76,7 @@ importers: specifiers: {} packages/beep: devDependencies: - rollup: 1.27.13 + rollup: 1.27.8 strip-ansi: 5.2.0 specifiers: rollup: ^1.20.0 @@ -88,9 +88,9 @@ importers: rollup-pluginutils: 2.8.2 devDependencies: del-cli: 3.0.0 - rollup: 1.27.13 + rollup: 1.27.8 source-map: 0.7.3 - typescript: 3.7.3 + typescript: 3.7.2 specifiers: '@types/buble': ^0.19.2 buble: ^0.19.8 @@ -99,6 +99,60 @@ importers: rollup-pluginutils: ^2.8.2 source-map: ^0.7.3 typescript: ^3.7.2 + packages/commonjs: + dependencies: + '@rollup/pluginutils': 3.0.0_rollup@1.27.11 + estree-walker: 0.6.1 + is-reference: 1.1.4 + magic-string: 0.25.4 + resolve: 1.13.1 + devDependencies: + '@babel/core': 7.7.5 + '@babel/preset-env': 7.7.6_@babel+core@7.7.5 + '@babel/register': 7.7.4_@babel+core@7.7.5 + '@rollup/plugin-json': 4.0.0_rollup@1.27.11 + '@rollup/plugin-node-resolve': 6.0.0_rollup@1.27.11 + acorn: 6.4.0 + eslint: 6.7.2 + eslint-plugin-import: 2.19.1_eslint@6.7.2 + husky: 2.7.0 + lint-staged: 8.2.1 + locate-character: 2.0.5 + mocha: 6.2.2 + prettier: 1.19.1 + require-relative: 0.8.7 + rollup: 1.27.11 + rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.11 + shx: 0.3.2 + source-map: 0.6.1 + source-map-support: 0.5.16 + typescript: 3.7.3 + specifiers: + '@babel/core': ^7.4.5 + '@babel/preset-env': ^7.4.5 + '@babel/register': ^7.4.4 + '@rollup/plugin-json': ^4.0.0 + '@rollup/plugin-node-resolve': ^6.0.0 + '@rollup/pluginutils': ^3.0.0 + acorn: ^6.1.1 + eslint: ^6.0.1 + eslint-plugin-import: ^2.18.0 + estree-walker: ^0.6.1 + husky: ^2.4.1 + is-reference: ^1.1.2 + lint-staged: ^8.2.1 + locate-character: ^2.0.5 + magic-string: ^0.25.2 + mocha: ^6.1.4 + prettier: ^1.18.2 + require-relative: ^0.8.7 + resolve: ^1.11.0 + rollup: ^1.16.2 + rollup-plugin-babel: ^4.3.3 + shx: ^0.3.2 + source-map: ^0.6.1 + source-map-support: ^0.5.12 + typescript: ^3.5.2 packages/dsv: dependencies: d3-dsv: 0.1.14 @@ -106,7 +160,7 @@ importers: tosource: 1.0.0 devDependencies: del-cli: 3.0.0 - rollup: 1.27.13 + rollup: 1.27.8 specifiers: d3-dsv: ^0.1.14 del-cli: ^3.0.0 @@ -115,7 +169,7 @@ importers: tosource: ^1.0.0 packages/html: devDependencies: - rollup: 1.27.13 + rollup: 1.27.8 rollup-plugin-postcss: 2.0.3 specifiers: rollup: ^1.27.5 @@ -124,7 +178,7 @@ importers: dependencies: rollup-pluginutils: 2.8.2 devDependencies: - rollup: 1.27.13 + rollup: 1.27.8 rollup-plugin-buble: 0.10.0 specifiers: rollup: ^1.20.0 @@ -138,10 +192,10 @@ importers: devDependencies: del-cli: 3.0.0 locate-character: 2.0.5 - rollup: 1.27.13 + rollup: 1.27.8 rollup-plugin-buble: 0.19.8 source-map: 0.7.3 - typescript: 3.7.3 + typescript: 3.7.2 specifiers: del-cli: ^3.0.0 estree-walker: ^0.9.0 @@ -168,9 +222,9 @@ importers: specifiers: {} packages/legacy: devDependencies: - '@rollup/plugin-buble': 0.20.0_rollup@1.27.13 + '@rollup/plugin-buble': 0.20.0_rollup@1.27.8 del-cli: 3.0.0 - rollup: 1.27.13 + rollup: 1.27.8 specifiers: '@rollup/plugin-buble': ^0.20.0 del-cli: ^3.0.0 @@ -191,19 +245,19 @@ importers: rollup-plugin-babel: ^4.0.3 packages/node-resolve: dependencies: - '@rollup/pluginutils': 3.0.0_rollup@1.27.13 + '@rollup/pluginutils': 3.0.0_rollup@1.27.8 '@types/resolve': 0.0.8 builtin-modules: 3.1.0 is-module: 1.0.0 resolve: 1.13.1 devDependencies: - '@babel/core': 7.7.5 - '@babel/preset-env': 7.7.6_@babel+core@7.7.5 - '@rollup/plugin-json': 4.0.0_rollup@1.27.13 + '@babel/core': 7.7.4 + '@babel/preset-env': 7.7.4_@babel+core@7.7.4 + '@rollup/plugin-json': 4.0.0_rollup@1.27.8 es5-ext: 0.10.53 - rollup: 1.27.13 - rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.13 - rollup-plugin-commonjs: 10.1.0_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-babel: 4.3.3_@babel+core@7.7.4+rollup@1.27.8 + rollup-plugin-commonjs: 10.1.0_rollup@1.27.8 source-map: 0.7.3 string-capitalize: 1.0.1 specifiers: @@ -230,12 +284,12 @@ importers: '@types/estree': 0.0.39 '@types/jest': 24.0.23 '@types/micromatch': 3.1.1 - '@types/node': 12.12.18 + '@types/node': 12.12.14 micromatch: 4.0.2 rollup-plugin-commonjs: 10.1.0 rollup-plugin-node-resolve: 5.2.0 - rollup-plugin-typescript: 1.0.1_typescript@3.7.3 - typescript: 3.7.3 + rollup-plugin-typescript: 1.0.1_typescript@3.7.2 + typescript: 3.7.2 specifiers: '@types/estree': 0.0.39 '@types/jest': ^24.0.23 @@ -254,10 +308,10 @@ importers: devDependencies: del-cli: 3.0.0 locate-character: 2.0.5 - rollup: 1.27.13 + rollup: 1.27.8 rollup-plugin-buble: 0.19.8 source-map: 0.7.3 - typescript: 3.7.3 + typescript: 3.7.2 specifiers: del-cli: ^3.0.0 locate-character: ^2.0.5 @@ -270,7 +324,7 @@ importers: packages/run: devDependencies: del: 5.1.0 - rollup: 1.27.13 + rollup: 1.27.8 sinon: 7.5.0 specifiers: del: ^5.1.0 @@ -283,7 +337,7 @@ importers: rollup-pluginutils: 2.8.2 devDependencies: acorn: 6.4.0 - rollup: 1.27.13 + rollup: 1.27.8 specifiers: acorn: ^6.0.2 estree-walker: ^0.6.0 @@ -292,15 +346,15 @@ importers: rollup-pluginutils: ^2.8.1 packages/typescript: dependencies: - '@rollup/pluginutils': 3.0.0_rollup@1.27.13 + '@rollup/pluginutils': 3.0.0_rollup@1.27.8 resolve: 1.13.1 devDependencies: - '@rollup/plugin-buble': 0.20.0_rollup@1.27.13 + '@rollup/plugin-buble': 0.20.0_rollup@1.27.8 buble: 0.19.8 - rollup: 1.27.13 - rollup-plugin-commonjs: 9.3.4_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-commonjs: 9.3.4_rollup@1.27.8 tslib: 1.10.0 - typescript: 3.7.3 + typescript: 3.7.2 specifiers: '@rollup/plugin-buble': ^0.20.0 '@rollup/pluginutils': ^3.0.0 @@ -316,13 +370,13 @@ importers: mime: 2.4.4 rollup-pluginutils: 2.8.2 devDependencies: - '@babel/core': 7.7.5 - '@babel/preset-env': 7.7.6_@babel+core@7.7.5 - '@babel/register': 7.7.4_@babel+core@7.7.5 + '@babel/core': 7.7.4 + '@babel/preset-env': 7.7.4_@babel+core@7.7.4 + '@babel/register': 7.7.4_@babel+core@7.7.4 del: 5.1.0 globby: 10.0.1 - rollup: 1.27.13 - rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-babel: 4.3.3_@babel+core@7.7.4+rollup@1.27.8 specifiers: '@babel/core': ^7.7.4 '@babel/preset-env': ^7.7.4 @@ -336,15 +390,15 @@ importers: rollup-pluginutils: ^2.8.2 packages/virtual: devDependencies: - rollup: 1.27.13 - rollup-plugin-node-resolve: 5.2.0_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-node-resolve: 5.2.0_rollup@1.27.8 specifiers: rollup: ^1.20.0 rollup-plugin-node-resolve: ^5.2.0 packages/wasm: devDependencies: del-cli: 3.0.0 - rollup: 1.27.13 + rollup: 1.27.8 source-map: 0.7.3 specifiers: del-cli: ^3.0.0 @@ -356,12 +410,12 @@ importers: rollup-pluginutils: 2.8.2 tosource: 1.0.0 devDependencies: - '@babel/core': 7.7.5 - '@babel/preset-env': 7.7.6_@babel+core@7.7.5 + '@babel/core': 7.7.4 + '@babel/preset-env': 7.7.4_@babel+core@7.7.4 del-cli: 3.0.0 - rollup: 1.27.13 - rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.13 - rollup-plugin-node-resolve: 5.2.0_rollup@1.27.13 + rollup: 1.27.8 + rollup-plugin-babel: 4.3.3_@babel+core@7.7.4+rollup@1.27.8 + rollup-plugin-node-resolve: 5.2.0_rollup@1.27.8 source-map-support: 0.5.16 specifiers: '@babel/core': ^7.7.2 @@ -411,6 +465,27 @@ packages: dev: true resolution: integrity: sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + /@babel/core/7.7.4: + dependencies: + '@babel/code-frame': 7.5.5 + '@babel/generator': 7.7.4 + '@babel/helpers': 7.7.4 + '@babel/parser': 7.7.4 + '@babel/template': 7.7.4 + '@babel/traverse': 7.7.4 + '@babel/types': 7.7.4 + convert-source-map: 1.7.0 + debug: 4.1.1 + json5: 2.1.1 + lodash: 4.17.15 + resolve: 1.13.1 + semver: 5.7.1 + source-map: 0.5.7 + dev: true + engines: + node: '>=6.9.0' + resolution: + integrity: sha512-+bYbx56j4nYBmpsWtnPUsKW3NdnYxbqyfrP2w9wILBuHzdfIKz9prieZK0DFPyIzkjYVUe4QkusGL07r5pXznQ== /@babel/core/7.7.5: dependencies: '@babel/code-frame': 7.5.5 @@ -462,6 +537,16 @@ packages: dev: true resolution: integrity: sha512-8JH9/B7J7tCYJ2PpWVpw9JhPuEVHztagNVuQAFBVFYluRMlpG7F1CgKEgGeL6KFqcsIa92ZYVj6DSc0XwmN1ZA== + /@babel/helper-create-regexp-features-plugin/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-regex': 7.5.5 + regexpu-core: 4.6.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0 + resolution: + integrity: sha512-Mt+jBKaxL0zfOIWrfQpnfYCN7/rS6GKx6CCCfuoqVVd+17R8zNDlzVYmIi9qyb2wOk002NsmSTDymkIygDUH7A== /@babel/helper-create-regexp-features-plugin/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -519,6 +604,17 @@ packages: dev: true resolution: integrity: sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== + /@babel/helper-module-transforms/7.7.4: + dependencies: + '@babel/helper-module-imports': 7.7.4 + '@babel/helper-simple-access': 7.7.4 + '@babel/helper-split-export-declaration': 7.7.4 + '@babel/template': 7.7.4 + '@babel/types': 7.7.4 + lodash: 4.17.15 + dev: true + resolution: + integrity: sha512-ehGBu4mXrhs0FxAqN8tWkzF8GSIGAiEumu4ONZ/hD9M88uHcD+Yu2ttKfOCgwzoesJOJrtQh7trI5YPbRtMmnA== /@babel/helper-module-transforms/7.7.5: dependencies: '@babel/helper-module-imports': 7.7.4 @@ -603,6 +699,13 @@ packages: dev: true resolution: integrity: sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== + /@babel/parser/7.7.4: + dev: true + engines: + node: '>=6.0.0' + hasBin: true + resolution: + integrity: sha512-jIwvLO0zCL+O/LmEJQjWA75MQTWwx3c3u2JOTDK5D3/9egrWRRA0/0hk9XXywYnXZVVpzrBYeIQTmhwUaePI9g== /@babel/parser/7.7.5: dev: true engines: @@ -610,6 +713,17 @@ packages: hasBin: true resolution: integrity: sha512-KNlOe9+/nk4i29g0VXgl8PEXIRms5xKLJeuZ6UptN0fHv+jDiriG+y94X6qAgWTR0h3KaoM1wK5G5h7MHFRSig== + /@babel/plugin-proposal-async-generator-functions/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-remap-async-to-generator': 7.7.4 + '@babel/plugin-syntax-async-generators': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw== /@babel/plugin-proposal-async-generator-functions/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -621,6 +735,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw== + /@babel/plugin-proposal-dynamic-import/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/plugin-syntax-dynamic-import': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ== /@babel/plugin-proposal-dynamic-import/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -631,6 +755,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ== + /@babel/plugin-proposal-json-strings/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/plugin-syntax-json-strings': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw== /@babel/plugin-proposal-json-strings/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -641,6 +775,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw== + /@babel/plugin-proposal-object-rest-spread/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/plugin-syntax-object-rest-spread': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-rnpnZR3/iWKmiQyJ3LKJpSwLDcX/nSXhdLk4Aq/tXOApIvyu7qoabrige0ylsAJffaUC51WiBu209Q0U+86OWQ== /@babel/plugin-proposal-object-rest-spread/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -651,6 +795,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-rnpnZR3/iWKmiQyJ3LKJpSwLDcX/nSXhdLk4Aq/tXOApIvyu7qoabrige0ylsAJffaUC51WiBu209Q0U+86OWQ== + /@babel/plugin-proposal-optional-catch-binding/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/plugin-syntax-optional-catch-binding': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w== /@babel/plugin-proposal-optional-catch-binding/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -661,6 +815,18 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w== + /@babel/plugin-proposal-unicode-property-regex/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-create-regexp-features-plugin': 7.7.4_@babel+core@7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + engines: + node: '>=4' + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-cHgqHgYvffluZk85dJ02vloErm3Y6xtH+2noOBOJ2kXOJH3aVCDnj5eR/lVNlTnYu4hndAPJD3rTFjW3qee0PA== /@babel/plugin-proposal-unicode-property-regex/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -673,6 +839,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-cHgqHgYvffluZk85dJ02vloErm3Y6xtH+2noOBOJ2kXOJH3aVCDnj5eR/lVNlTnYu4hndAPJD3rTFjW3qee0PA== + /@babel/plugin-syntax-async-generators/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g== /@babel/plugin-syntax-async-generators/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -682,6 +857,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g== + /@babel/plugin-syntax-dynamic-import/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg== /@babel/plugin-syntax-dynamic-import/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -691,6 +875,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg== + /@babel/plugin-syntax-json-strings/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg== /@babel/plugin-syntax-json-strings/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -700,6 +893,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg== + /@babel/plugin-syntax-object-rest-spread/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg== /@babel/plugin-syntax-object-rest-spread/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -709,6 +911,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg== + /@babel/plugin-syntax-optional-catch-binding/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ== /@babel/plugin-syntax-optional-catch-binding/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -718,6 +929,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ== + /@babel/plugin-syntax-top-level-await/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg== /@babel/plugin-syntax-top-level-await/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -727,6 +947,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg== + /@babel/plugin-transform-arrow-functions/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA== /@babel/plugin-transform-arrow-functions/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -736,6 +965,17 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA== + /@babel/plugin-transform-async-to-generator/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-imports': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-remap-async-to-generator': 7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg== /@babel/plugin-transform-async-to-generator/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -747,6 +987,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg== + /@babel/plugin-transform-block-scoped-functions/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ== /@babel/plugin-transform-block-scoped-functions/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -756,6 +1005,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ== + /@babel/plugin-transform-block-scoping/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + lodash: 4.17.15 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg== /@babel/plugin-transform-block-scoping/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -766,6 +1025,22 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg== + /@babel/plugin-transform-classes/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-annotate-as-pure': 7.7.4 + '@babel/helper-define-map': 7.7.4 + '@babel/helper-function-name': 7.7.4 + '@babel/helper-optimise-call-expression': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-replace-supers': 7.7.4 + '@babel/helper-split-export-declaration': 7.7.4 + globals: 11.12.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg== /@babel/plugin-transform-classes/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -782,6 +1057,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg== + /@babel/plugin-transform-computed-properties/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ== /@babel/plugin-transform-computed-properties/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -791,6 +1075,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ== + /@babel/plugin-transform-destructuring/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA== /@babel/plugin-transform-destructuring/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -800,6 +1093,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA== + /@babel/plugin-transform-dotall-regex/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-create-regexp-features-plugin': 7.7.4_@babel+core@7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-mk0cH1zyMa/XHeb6LOTXTbG7uIJ8Rrjlzu91pUx/KS3JpcgaTDwMS8kM+ar8SLOvlL2Lofi4CGBAjCo3a2x+lw== /@babel/plugin-transform-dotall-regex/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -810,6 +1113,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-mk0cH1zyMa/XHeb6LOTXTbG7uIJ8Rrjlzu91pUx/KS3JpcgaTDwMS8kM+ar8SLOvlL2Lofi4CGBAjCo3a2x+lw== + /@babel/plugin-transform-duplicate-keys/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA== /@babel/plugin-transform-duplicate-keys/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -819,6 +1131,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA== + /@babel/plugin-transform-exponentiation-operator/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ== /@babel/plugin-transform-exponentiation-operator/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -829,6 +1151,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ== + /@babel/plugin-transform-for-of/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA== /@babel/plugin-transform-for-of/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -838,6 +1169,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA== + /@babel/plugin-transform-function-name/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-function-name': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g== /@babel/plugin-transform-function-name/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -848,6 +1189,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g== + /@babel/plugin-transform-literals/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw== /@babel/plugin-transform-literals/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -857,6 +1207,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw== + /@babel/plugin-transform-member-expression-literals/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA== /@babel/plugin-transform-member-expression-literals/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -866,6 +1225,17 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA== + /@babel/plugin-transform-modules-amd/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-transforms': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + babel-plugin-dynamic-import-node: 2.3.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-/542/5LNA18YDtg1F+QHvvUSlxdvjZoD/aldQwkq+E3WCkbEjNSN9zdrOXaSlfg3IfGi22ijzecklF/A7kVZFQ== /@babel/plugin-transform-modules-amd/7.7.5_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -877,6 +1247,18 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ== + /@babel/plugin-transform-modules-commonjs/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-transforms': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-simple-access': 7.7.4 + babel-plugin-dynamic-import-node: 2.3.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-k8iVS7Jhc367IcNF53KCwIXtKAH7czev866ThsTgy8CwlXjnKZna2VHwChglzLleYrcHz1eQEIJlGRQxB53nqA== /@babel/plugin-transform-modules-commonjs/7.7.5_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -889,6 +1271,17 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-9Cq4zTFExwFhQI6MT1aFxgqhIsMWQWDVwOgLzl7PTWJHsNaqFvklAU+Oz6AQLAS0dJKTwZSOCo20INwktxpi3Q== + /@babel/plugin-transform-modules-systemjs/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-hoist-variables': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + babel-plugin-dynamic-import-node: 2.3.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw== /@babel/plugin-transform-modules-systemjs/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -900,16 +1293,35 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw== + /@babel/plugin-transform-modules-umd/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-transforms': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw== /@babel/plugin-transform-modules-umd/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 - '@babel/helper-module-transforms': 7.7.5 + '@babel/helper-module-transforms': 7.7.4 '@babel/helper-plugin-utils': 7.0.0 dev: true peerDependencies: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw== + /@babel/plugin-transform-named-capturing-groups-regex/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-create-regexp-features-plugin': 7.7.4_@babel+core@7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0 + resolution: + integrity: sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw== /@babel/plugin-transform-named-capturing-groups-regex/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -919,6 +1331,15 @@ packages: '@babel/core': ^7.0.0 resolution: integrity: sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw== + /@babel/plugin-transform-new-target/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg== /@babel/plugin-transform-new-target/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -928,6 +1349,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg== + /@babel/plugin-transform-object-super/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-replace-supers': 7.7.4 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg== /@babel/plugin-transform-object-super/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -938,6 +1369,17 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg== + /@babel/plugin-transform-parameters/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-call-delegate': 7.7.4 + '@babel/helper-get-function-arity': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-VJwhVePWPa0DqE9vcfptaJSzNDKrWU/4FbYCjZERtmqEs05g3UMXnYMZoXja7JAJ7Y7sPZipwm/pGApZt7wHlw== /@babel/plugin-transform-parameters/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -948,7 +1390,16 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 resolution: - integrity: sha512-VJwhVePWPa0DqE9vcfptaJSzNDKrWU/4FbYCjZERtmqEs05g3UMXnYMZoXja7JAJ7Y7sPZipwm/pGApZt7wHlw== + integrity: sha512-VJwhVePWPa0DqE9vcfptaJSzNDKrWU/4FbYCjZERtmqEs05g3UMXnYMZoXja7JAJ7Y7sPZipwm/pGApZt7wHlw== + /@babel/plugin-transform-property-literals/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ== /@babel/plugin-transform-property-literals/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -958,6 +1409,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ== + /@babel/plugin-transform-regenerator/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + regenerator-transform: 0.14.1 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-e7MWl5UJvmPEwFJTwkBlPmqixCtr9yAASBqff4ggXTNicZiwbF8Eefzm6NVgfiBp7JdAGItecnctKTgH44q2Jw== /@babel/plugin-transform-regenerator/7.7.5_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -967,6 +1427,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-/8I8tPvX2FkuEyWbjRCt4qTAgZK0DVy8QRguhA524UH48RfGJy94On2ri+dCuwOpcerPRl9O4ebQkRcVzIaGBw== + /@babel/plugin-transform-reserved-words/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ== /@babel/plugin-transform-reserved-words/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -976,6 +1445,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ== + /@babel/plugin-transform-shorthand-properties/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q== /@babel/plugin-transform-shorthand-properties/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -985,6 +1463,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q== + /@babel/plugin-transform-spread/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q== /@babel/plugin-transform-spread/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -994,6 +1481,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q== + /@babel/plugin-transform-sticky-regex/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/helper-regex': 7.5.5 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A== /@babel/plugin-transform-sticky-regex/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1004,6 +1501,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A== + /@babel/plugin-transform-template-literals/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-annotate-as-pure': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ== /@babel/plugin-transform-template-literals/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1014,6 +1521,15 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ== + /@babel/plugin-transform-typeof-symbol/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg== /@babel/plugin-transform-typeof-symbol/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1023,6 +1539,16 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg== + /@babel/plugin-transform-unicode-regex/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-create-regexp-features-plugin': 7.7.4_@babel+core@7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw== /@babel/plugin-transform-unicode-regex/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1033,6 +1559,65 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw== + /@babel/preset-env/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-imports': 7.7.4 + '@babel/helper-plugin-utils': 7.0.0 + '@babel/plugin-proposal-async-generator-functions': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-proposal-dynamic-import': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-proposal-json-strings': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-proposal-object-rest-spread': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-proposal-optional-catch-binding': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-proposal-unicode-property-regex': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-async-generators': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-dynamic-import': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-json-strings': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-object-rest-spread': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-optional-catch-binding': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-syntax-top-level-await': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-arrow-functions': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-async-to-generator': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-block-scoped-functions': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-block-scoping': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-classes': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-computed-properties': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-destructuring': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-dotall-regex': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-duplicate-keys': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-exponentiation-operator': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-for-of': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-function-name': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-literals': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-member-expression-literals': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-modules-amd': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-modules-commonjs': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-modules-systemjs': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-modules-umd': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-named-capturing-groups-regex': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-new-target': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-object-super': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-parameters': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-property-literals': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-regenerator': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-reserved-words': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-shorthand-properties': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-spread': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-sticky-regex': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-template-literals': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-typeof-symbol': 7.7.4_@babel+core@7.7.4 + '@babel/plugin-transform-unicode-regex': 7.7.4_@babel+core@7.7.4 + '@babel/types': 7.7.4 + browserslist: 4.8.0 + core-js-compat: 3.4.7 + invariant: 2.2.4 + js-levenshtein: 1.1.6 + semver: 5.7.1 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-Dg+ciGJjwvC1NIe/DGblMbcGq1HOtKbw8RLl4nIjlfcILKEOkWT/vRqPpumswABEBVudii6dnVwrBtzD7ibm4g== /@babel/preset-env/7.7.6_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1092,6 +1677,19 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-k5hO17iF/Q7tR9Jv8PdNBZWYW6RofxhnxKjBMc0nG4JTaWvOTiPoO/RLFwAKcA4FpmuBFm6jkoqaRJLGi0zdaQ== + /@babel/register/7.7.4_@babel+core@7.7.4: + dependencies: + '@babel/core': 7.7.4 + find-cache-dir: 2.1.0 + lodash: 4.17.15 + make-dir: 2.1.0 + pirates: 4.0.1 + source-map-support: 0.5.16 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-/fmONZqL6ZMl9KJUYajetCrID6m0xmL4odX7v+Xvoxcv0DdbP/oO0TWIeLUCHqczQ6L6njDMqmqHFy2cp3FFsA== /@babel/register/7.7.4_@babel+core@7.7.5: dependencies: '@babel/core': 7.7.5 @@ -1183,30 +1781,64 @@ packages: node: '>= 8' resolution: integrity: sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== - /@rollup/plugin-buble/0.20.0_rollup@1.27.13: + /@rollup/plugin-buble/0.20.0_rollup@1.27.8: dependencies: buble: 0.19.8 - rollup: 1.27.13 + rollup: 1.27.8 rollup-pluginutils: 2.8.2 - typescript: 3.7.3 + typescript: 3.7.2 dev: true peerDependencies: rollup: ^1.20.0 resolution: integrity: sha512-3Qkoa3n+6NjQggLkN5R6ouVL3/jveyqjJjJXxbk04HEig/97YyOwoimWYIOC5vlQ60Z+xLhnAvGd6mM0gFY2wQ== - /@rollup/plugin-json/4.0.0_rollup@1.27.13: + /@rollup/plugin-json/4.0.0_rollup@1.27.11: dependencies: - rollup: 1.27.13 + rollup: 1.27.11 + rollup-pluginutils: 2.8.2 + dev: true + peerDependencies: + rollup: ^1.20.0 + resolution: + integrity: sha512-Z65CtEVWv40+ri4CvmswyhtuUtki9yP5p0UJN/GyCKKyU4jRuDS9CG0ZuV7/XuS7zGkoajyE7E4XBEaC4GW62A== + /@rollup/plugin-json/4.0.0_rollup@1.27.8: + dependencies: + rollup: 1.27.8 rollup-pluginutils: 2.8.2 dev: true peerDependencies: rollup: ^1.20.0 resolution: integrity: sha512-Z65CtEVWv40+ri4CvmswyhtuUtki9yP5p0UJN/GyCKKyU4jRuDS9CG0ZuV7/XuS7zGkoajyE7E4XBEaC4GW62A== - /@rollup/pluginutils/3.0.0_rollup@1.27.13: + /@rollup/plugin-node-resolve/6.0.0_rollup@1.27.11: + dependencies: + '@rollup/pluginutils': 3.0.0_rollup@1.27.11 + '@types/resolve': 0.0.8 + builtin-modules: 3.1.0 + is-module: 1.0.0 + resolve: 1.13.1 + rollup: 1.27.11 + dev: true + engines: + node: '>= 8.0.0' + peerDependencies: + rollup: ^1.20.0 + resolution: + integrity: sha512-GqWz1CfXOsqpeVMcoM315+O7zMxpRsmhWyhJoxLFHVSp9S64/u02i7len/FnbTNbmgYs+sZyilasijH8UiuboQ== + /@rollup/pluginutils/3.0.0_rollup@1.27.11: dependencies: estree-walker: 0.6.1 - rollup: 1.27.13 + rollup: 1.27.11 + engines: + node: '>= 8.0.0' + peerDependencies: + rollup: ^1.20.0 + resolution: + integrity: sha512-qBbGQQaUUiId/lBU9VMeYlVLOoRNvz1fV8HWY5tiGDpI2gdPZHbmOfCjzSdXPhdq3XOfyWvXEBlIPbnM3+9ogQ== + /@rollup/pluginutils/3.0.0_rollup@1.27.8: + dependencies: + estree-walker: 0.6.1 + rollup: 1.27.8 dev: false engines: node: '>= 8.0.0' @@ -1280,7 +1912,6 @@ packages: resolution: integrity: sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== /@types/estree/0.0.39: - dev: true resolution: integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== /@types/estree/0.0.40: @@ -1294,7 +1925,7 @@ packages: dependencies: '@types/events': 3.0.0 '@types/minimatch': 3.0.3 - '@types/node': 12.12.18 + '@types/node': 12.12.20 dev: true resolution: integrity: sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== @@ -1339,9 +1970,16 @@ packages: dev: true resolution: integrity: sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - /@types/node/12.12.18: + /@types/node/12.12.14: + resolution: + integrity: sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA== + /@types/node/12.12.17: + resolution: + integrity: sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA== + /@types/node/12.12.20: + dev: true resolution: - integrity: sha512-DBkZuIMFuAfjJHiunyRc+aNvmXYNwV1IPMgGKGlwCp6zh6MKrVtmvjSWK/axWcD25KJffkXgkfvFra8ndenXAw== + integrity: sha512-VAe+DiwpnC/g448uN+/3gRl4th0BTdrR9gSLIOHA+SUQskaYZQDOHG7xmjiE7JUhjbXnbXytf6Ih+/pA6CtMFQ== /@types/normalize-package-data/2.4.0: dev: true resolution: @@ -1352,7 +1990,7 @@ packages: integrity: sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== /@types/resolve/0.0.8: dependencies: - '@types/node': 12.12.18 + '@types/node': 12.12.14 resolution: integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== /@types/yargs-parser/13.1.0: @@ -1365,10 +2003,10 @@ packages: dev: true resolution: integrity: sha512-K8/LfZq2duW33XW/tFwEAfnZlqIfVsoyRB3kfXdPXYhl0nfM8mmh7GS0jg7WrX2Dgq/0Ha/pR1PaR+BvmWwjiQ== - /@typescript-eslint/eslint-plugin/2.11.0_cb180cc210aa77d673b05caf1fc681e5: + /@typescript-eslint/eslint-plugin/2.12.0_66854ba8971b2256e3dae1b103509efe: dependencies: - '@typescript-eslint/experimental-utils': 2.11.0_typescript@3.7.3 - '@typescript-eslint/parser': 2.11.0_typescript@3.7.3 + '@typescript-eslint/experimental-utils': 2.12.0_typescript@3.7.3 + '@typescript-eslint/parser': 2.12.0_typescript@3.7.3 eslint-utils: 1.4.3 functional-red-black-tree: 1.0.1 regexpp: 3.0.0 @@ -1385,11 +2023,11 @@ packages: typescript: optional: true resolution: - integrity: sha512-G2HHA1vpMN0EEbUuWubiCCfd0R3a30BB+UdvnFkxwZIxYEGOrWEXDv8tBFO9f44CWc47Xv9lLM3VSn4ORLI2bA== - /@typescript-eslint/experimental-utils/2.11.0_typescript@3.7.3: + integrity: sha512-1t4r9rpLuEwl3hgt90jY18wJHSyb0E3orVL3DaqwmpiSDHmHiSspVsvsFF78BJ/3NNG3qmeso836jpuBWYziAA== + /@typescript-eslint/experimental-utils/2.12.0_typescript@3.7.3: dependencies: '@types/json-schema': 7.0.3 - '@typescript-eslint/typescript-estree': 2.11.0_typescript@3.7.3 + '@typescript-eslint/typescript-estree': 2.12.0_typescript@3.7.3 eslint-scope: 5.0.0 dev: true engines: @@ -1398,22 +2036,26 @@ packages: eslint: '*' typescript: '*' resolution: - integrity: sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ== - /@typescript-eslint/parser/2.11.0_typescript@3.7.3: + integrity: sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA== + /@typescript-eslint/parser/2.12.0_typescript@3.7.3: dependencies: '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 2.11.0_typescript@3.7.3 - '@typescript-eslint/typescript-estree': 2.11.0_typescript@3.7.3 + '@typescript-eslint/experimental-utils': 2.12.0_typescript@3.7.3 + '@typescript-eslint/typescript-estree': 2.12.0_typescript@3.7.3 eslint-visitor-keys: 1.1.0 + typescript: 3.7.3 dev: true engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 typescript: '*' + peerDependenciesMeta: + typescript: + optional: true resolution: - integrity: sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A== - /@typescript-eslint/typescript-estree/2.11.0_typescript@3.7.3: + integrity: sha512-lPdkwpdzxEfjI8TyTzZqPatkrswLSVu4bqUgnB03fHSOwpC7KSerPgJRgIAf11UGNf7HKjJV6oaPZI4AghLU6g== + /@typescript-eslint/typescript-estree/2.12.0_typescript@3.7.3: dependencies: debug: 4.1.1 eslint-visitor-keys: 1.1.0 @@ -1432,7 +2074,7 @@ packages: typescript: optional: true resolution: - integrity: sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA== + integrity: sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ== /acorn-dynamic-import/4.0.0_acorn@6.4.0: dependencies: acorn: 6.4.0 @@ -1498,7 +2140,7 @@ packages: /ajv/6.10.2: dependencies: fast-deep-equal: 2.0.1 - fast-json-stable-stringify: 2.1.0 + fast-json-stable-stringify: 2.0.0 json-schema-traverse: 0.4.1 uri-js: 4.2.2 dev: true @@ -1514,6 +2156,12 @@ packages: dev: true resolution: integrity: sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== + /ansi-colors/3.2.3: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== /ansi-escapes/3.2.0: dev: true engines: @@ -1610,6 +2258,12 @@ packages: sprintf-js: 1.0.3 resolution: integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + /arr-diff/4.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= /arr-flatten/1.1.0: dev: true engines: @@ -1617,7 +2271,6 @@ packages: resolution: integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== /arr-union/3.1.0: - dev: false engines: node: '>=0.10.0' resolution: @@ -1667,6 +2320,12 @@ packages: node: '>=6' resolution: integrity: sha512-bdHxtev7FN6+MXI1YFW0Q8mQ8dTJc2S8AMfju+ZR77pbg2yAdVyDlwkaUI7Har0LyOMRFPHrJ9lYdyjZZswdlQ== + /array-unique/0.3.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= /array.prototype.flat/1.2.3: dependencies: define-properties: 1.1.3 @@ -1688,6 +2347,12 @@ packages: node: '>=8' resolution: integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + /assign-symbols/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= /astral-regex/1.0.0: dev: true engines: @@ -1706,6 +2371,13 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE= + /atob/2.1.2: + dev: true + engines: + node: '>= 4.5.0' + hasBin: true + resolution: + integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== /ava/2.4.0: dependencies: '@ava/babel-preset-stage-4': 4.0.0_@babel+core@7.7.5 @@ -1808,6 +2480,20 @@ packages: /balanced-match/1.0.0: resolution: integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + /base/0.11.2: + dependencies: + cache-base: 1.0.1 + class-utils: 0.3.6 + component-emitter: 1.3.0 + define-property: 1.0.0 + isobject: 3.0.1 + mixin-deep: 1.3.2 + pascalcase: 0.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== /big.js/3.2.0: dev: true resolution: @@ -1851,6 +2537,23 @@ packages: concat-map: 0.0.1 resolution: integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + /braces/2.3.2: + dependencies: + arr-flatten: 1.1.0 + array-unique: 0.3.2 + extend-shallow: 2.0.1 + fill-range: 4.0.0 + isobject: 3.0.1 + repeat-element: 1.1.3 + snapdragon: 0.8.2 + snapdragon-node: 2.1.1 + split-string: 3.1.0 + to-regex: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== /braces/3.0.2: dependencies: fill-range: 7.0.1 @@ -1859,9 +2562,22 @@ packages: node: '>=8' resolution: integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + /browser-stdout/1.3.1: + dev: true + resolution: + integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + /browserslist/4.8.0: + dependencies: + caniuse-lite: 1.0.30001013 + electron-to-chromium: 1.3.322 + node-releases: 1.1.41 + dev: true + hasBin: true + resolution: + integrity: sha512-HYnxc/oLRWvJ3TsGegR0SRL/UDnknGq2s/a8dYYEO+kOQ9m9apKoS5oiathLKZdh/e9uE+/J3j92qPlGD/vTqA== /browserslist/4.8.2: dependencies: - caniuse-lite: 1.0.30001016 + caniuse-lite: 1.0.30001015 electron-to-chromium: 1.3.322 node-releases: 1.1.42 dev: true @@ -1902,6 +2618,22 @@ packages: node: '>=6' resolution: integrity: sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + /cache-base/1.0.1: + dependencies: + collection-visit: 1.0.0 + component-emitter: 1.3.0 + get-value: 2.0.6 + has-value: 1.0.0 + isobject: 3.0.1 + set-value: 2.0.1 + to-object-path: 0.3.0 + union-value: 1.0.1 + unset-value: 1.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== /cacheable-request/6.1.0: dependencies: clone-response: 1.0.2 @@ -1994,17 +2726,21 @@ packages: integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== /caniuse-api/3.0.0: dependencies: - browserslist: 4.8.2 - caniuse-lite: 1.0.30001016 + browserslist: 4.8.0 + caniuse-lite: 1.0.30001013 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true resolution: integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - /caniuse-lite/1.0.30001016: + /caniuse-lite/1.0.30001013: + dev: true + resolution: + integrity: sha512-hOAXaWKuq/UVFgYawxIOdPdyMQdYcwOCDOjnZcKn7wCgFUrhP7smuNZjGLuJlPSgE6aRA4cRJ+bGSrhtEt7ZAg== + /caniuse-lite/1.0.30001015: dev: true resolution: - integrity: sha512-yYQ2QfotceRiH4U+h1Us86WJXtVHDmy3nEKIdYPsZCYnOV5/tMgGbmoIlrMzmh2VXlproqYtVaKeGDBkMZifFA== + integrity: sha512-/xL2AbW/XWHNu1gnIrO8UitBGoFthcsDgU9VLK1/dpsoxbaD5LscHozKze05R6WLsBvLhqv78dAPozMFQBYLbQ== /chalk/1.1.3: dependencies: ansi-styles: 2.2.1 @@ -2058,6 +2794,17 @@ packages: dev: true resolution: integrity: sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g== + /class-utils/0.3.6: + dependencies: + arr-union: 3.1.0 + define-property: 0.2.5 + isobject: 3.0.1 + static-extend: 0.1.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== /clean-stack/2.2.0: dev: true engines: @@ -2173,6 +2920,15 @@ packages: node: '>=8.6.0' resolution: integrity: sha512-AVLT4qyljd6lkzvUszA1tilsPj1fIBE1fL9/X/Q90qm+kTZh5JL2L1n+Ak9cPwUe/ZpSr0rzzJpH1kqlsi2i/g== + /collection-visit/1.0.0: + dependencies: + map-visit: 1.0.0 + object-visit: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= /color-convert/1.9.3: dependencies: color-name: 1.1.3 @@ -2219,6 +2975,10 @@ packages: dev: true resolution: integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + /component-emitter/1.3.0: + dev: true + resolution: + integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== /concat-map/0.0.1: resolution: integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= @@ -2277,6 +3037,19 @@ packages: node: '>= 4' resolution: integrity: sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU= + /copy-descriptor/0.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + /core-js-compat/3.4.7: + dependencies: + browserslist: 4.8.0 + semver: 6.3.0 + dev: true + resolution: + integrity: sha512-57+mgz/P/xsGdjwQYkwtBZR3LuISaxD1dEwVDtbk8xJMqAmwqaxLOvnNT7kdJ7jYE/NjNptyzXi+IQFMi/2fCw== /core-js-compat/3.5.0: dependencies: browserslist: 4.8.2 @@ -2362,7 +3135,7 @@ packages: integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= /css-declaration-sorter/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 timsort: 0.3.0 dev: true engines: @@ -2436,7 +3209,7 @@ packages: dependencies: css-declaration-sorter: 4.0.1 cssnano-util-raw-cache: 4.0.1 - postcss: 7.0.24 + postcss: 7.0.23 postcss-calc: 7.0.1 postcss-colormin: 4.0.3 postcss-convert-values: 4.0.1 @@ -2483,7 +3256,7 @@ packages: integrity: sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= /cssnano-util-raw-cache/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -2500,7 +3273,7 @@ packages: cosmiconfig: 5.2.1 cssnano-preset-default: 4.0.7 is-resolvable: 1.1.0 - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -2552,6 +3325,12 @@ packages: dev: true resolution: integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + /debug/3.2.6: + dependencies: + ms: 2.1.1 + dev: true + resolution: + integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== /debug/4.1.1: dependencies: ms: 2.1.2 @@ -2573,6 +3352,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + /decode-uri-component/0.2.0: + dev: true + engines: + node: '>=0.10' + resolution: + integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= /decompress-response/3.3.0: dependencies: mimic-response: 1.0.1 @@ -2632,6 +3417,31 @@ packages: node: '>= 0.4' resolution: integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + /define-property/0.2.5: + dependencies: + is-descriptor: 0.1.6 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + /define-property/1.0.0: + dependencies: + is-descriptor: 1.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + /define-property/2.0.2: + dependencies: + is-descriptor: 1.0.2 + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== /del-cli/3.0.0: dependencies: del: 5.1.0 @@ -2642,6 +3452,19 @@ packages: hasBin: true resolution: integrity: sha512-J4HDC2mpcN5aopya4VdkyiFXZaqAoo7ua9VpKbciX3DDUSbtJbPMc3ivggJsAAgS6EqonmbenIiMhBGtJPW9FA== + /del/3.0.0: + dependencies: + globby: 6.1.0 + is-path-cwd: 1.0.0 + is-path-in-cwd: 1.0.1 + p-map: 1.2.0 + pify: 3.0.0 + rimraf: 2.7.1 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= /del/4.1.1: dependencies: '@types/glob': 7.1.1 @@ -2815,6 +3638,23 @@ packages: dev: true resolution: integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + /es-abstract/1.16.3: + dependencies: + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.1 + is-callable: 1.1.4 + is-regex: 1.0.4 + object-inspect: 1.7.0 + object-keys: 1.1.1 + string.prototype.trimleft: 2.1.0 + string.prototype.trimright: 2.1.0 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw== /es-abstract/1.17.0-next.1: dependencies: es-to-primitive: 1.2.1 @@ -2863,6 +3703,10 @@ packages: dev: true resolution: integrity: sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + /es6-object-assign/1.1.0: + dev: true + resolution: + integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= /es6-symbol/3.1.3: dependencies: d: 1.0.1 @@ -2920,7 +3764,7 @@ packages: eslint-module-utils: 2.5.0 has: 1.0.3 minimatch: 3.0.4 - object.values: 1.1.1 + object.values: 1.1.0 read-pkg-up: 2.0.0 resolve: 1.13.1 dev: true @@ -2987,7 +3831,7 @@ packages: ignore: 4.0.6 import-fresh: 3.2.1 imurmurhash: 0.1.4 - inquirer: 7.0.1 + inquirer: 7.0.0 is-glob: 4.0.1 js-yaml: 3.13.1 json-stable-stringify-without-jsonify: 1.0.1 @@ -3131,6 +3975,20 @@ packages: node: ^8.12.0 || >=9.7.0 resolution: integrity: sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw== + /expand-brackets/2.1.4: + dependencies: + debug: 2.6.9 + define-property: 0.2.5 + extend-shallow: 2.0.1 + posix-character-classes: 0.1.1 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI= /expand-tilde/2.0.2: dependencies: homedir-polyfill: 1.0.3 @@ -3145,6 +4003,23 @@ packages: dev: true resolution: integrity: sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + /extend-shallow/2.0.1: + dependencies: + is-extendable: 0.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + /extend-shallow/3.0.2: + dependencies: + assign-symbols: 1.0.0 + is-extendable: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= /external-editor/3.1.0: dependencies: chardet: 0.7.0 @@ -3154,7 +4029,22 @@ packages: engines: node: '>=4' resolution: - integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + /extglob/2.0.4: + dependencies: + array-unique: 0.3.2 + define-property: 1.0.0 + expand-brackets: 2.1.4 + extend-shallow: 2.0.1 + fragment-cache: 0.2.1 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== /fast-deep-equal/2.0.1: dev: true resolution: @@ -3175,10 +4065,10 @@ packages: node: '>=8' resolution: integrity: sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== - /fast-json-stable-stringify/2.1.0: + /fast-json-stable-stringify/2.0.0: dev: true resolution: - integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + integrity: sha1-1RQsDK7msRifh9OnYREGT4bIu/I= /fast-levenshtein/2.0.6: dev: true resolution: @@ -3226,6 +4116,17 @@ packages: node: '>=4' resolution: integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + /fill-range/4.0.0: + dependencies: + extend-shallow: 2.0.1 + is-number: 3.0.0 + repeat-string: 1.6.1 + to-regex-range: 2.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= /fill-range/7.0.1: dependencies: to-regex-range: 5.0.1 @@ -3279,10 +4180,29 @@ packages: node: '>=4' resolution: integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + /flat/4.1.0: + dependencies: + is-buffer: 2.0.4 + dev: true + hasBin: true + resolution: + integrity: sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== /flatted/2.0.1: dev: true resolution: integrity: sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== + /fn-name/2.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc= + /for-in/1.0.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= /foreground-child/1.5.6: dependencies: cross-spawn: 4.0.2 @@ -3290,6 +4210,14 @@ packages: dev: true resolution: integrity: sha1-T9ca0t/elnibmApcCilZN8svXOk= + /fragment-cache/0.2.1: + dependencies: + map-cache: 0.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= /fs.realpath/1.0.0: resolution: integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= @@ -3308,6 +4236,16 @@ packages: dev: true resolution: integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + /g-status/2.0.2: + dependencies: + arrify: 1.0.1 + matcher: 1.1.1 + simple-git: 1.128.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA== /generic-names/1.0.3: dependencies: loader-utils: 0.2.17 @@ -3360,6 +4298,12 @@ packages: node: '>=8' resolution: integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + /get-value/2.0.6: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= /glob-parent/5.1.0: dependencies: is-glob: 4.0.1 @@ -3368,6 +4312,17 @@ packages: node: '>= 6' resolution: integrity: sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== + /glob/7.1.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.0.4 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + resolution: + integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== /glob/7.1.6: dependencies: fs.realpath: 1.0.0 @@ -3471,6 +4426,12 @@ packages: dev: true resolution: integrity: sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + /growl/1.10.5: + dev: true + engines: + node: '>=4.x' + resolution: + integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== /handlebars/4.5.3: dependencies: neo-async: 2.6.1 @@ -3523,6 +4484,41 @@ packages: node: '>= 0.4' resolution: integrity: sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + /has-value/0.3.1: + dependencies: + get-value: 2.0.6 + has-values: 0.1.4 + isobject: 2.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + /has-value/1.0.0: + dependencies: + get-value: 2.0.6 + has-values: 1.0.0 + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + /has-values/0.1.4: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-bWHeldkd/Km5oCCJrThL/49it3E= + /has-values/1.0.0: + dependencies: + is-number: 3.0.0 + kind-of: 4.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= /has-yarn/2.1.0: dev: true engines: @@ -3554,6 +4550,11 @@ packages: node: '>=8' resolution: integrity: sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA== + /he/1.2.0: + dev: true + hasBin: true + resolution: + integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== /hex-color-regex/1.1.0: dev: true resolution: @@ -3586,6 +4587,25 @@ packages: dev: true resolution: integrity: sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== + /husky/2.7.0: + dependencies: + cosmiconfig: 5.2.1 + execa: 1.0.0 + find-up: 3.0.0 + get-stdin: 7.0.0 + is-ci: 2.0.0 + pkg-dir: 4.2.0 + please-upgrade-node: 3.2.0 + read-pkg: 5.2.0 + run-node: 1.0.0 + slash: 3.0.0 + dev: true + engines: + node: '>=8' + hasBin: true + requiresBuild: true + resolution: + integrity: sha512-LIi8zzT6PyFpcYKdvWRCn/8X+6SuG2TgYYMrM6ckEYhlp44UcEduVymZGIZNLiwOUjrEud+78w/AsAiqJA/kRg== /husky/3.1.0: dependencies: chalk: 2.4.2 @@ -3718,7 +4738,7 @@ packages: /ini/1.3.5: resolution: integrity: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - /inquirer/7.0.1: + /inquirer/7.0.0: dependencies: ansi-escapes: 4.3.0 chalk: 2.4.2 @@ -3737,7 +4757,13 @@ packages: engines: node: '>=6.0.0' resolution: - integrity: sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw== + integrity: sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== + /interpret/1.2.0: + dev: true + engines: + node: '>= 0.10' + resolution: + integrity: sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== /invariant/2.2.4: dependencies: loose-envify: 1.4.0 @@ -3756,6 +4782,22 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + /is-accessor-descriptor/0.1.6: + dependencies: + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + /is-accessor-descriptor/1.0.0: + dependencies: + kind-of: 6.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== /is-arguments/1.0.4: dev: true engines: @@ -3778,6 +4820,16 @@ packages: node: '>=8' resolution: integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + /is-buffer/1.1.6: + dev: true + resolution: + integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + /is-buffer/2.0.4: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== /is-callable/1.1.4: dev: true engines: @@ -3802,12 +4854,48 @@ packages: dev: true resolution: integrity: sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + /is-data-descriptor/0.1.4: + dependencies: + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + /is-data-descriptor/1.0.0: + dependencies: + kind-of: 6.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== /is-date-object/1.0.1: dev: true engines: node: '>= 0.4' resolution: integrity: sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + /is-descriptor/0.1.6: + dependencies: + is-accessor-descriptor: 0.1.6 + is-data-descriptor: 0.1.4 + kind-of: 5.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + /is-descriptor/1.0.2: + dependencies: + is-accessor-descriptor: 1.0.0 + is-data-descriptor: 1.0.0 + kind-of: 6.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== /is-directory/0.3.1: dev: true engines: @@ -3818,6 +4906,20 @@ packages: dev: true resolution: integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg== + /is-extendable/0.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + /is-extendable/1.0.1: + dependencies: + is-plain-object: 2.0.4 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== /is-extglob/2.1.1: engines: node: '>=0.10.0' @@ -3877,6 +4979,14 @@ packages: node: '>=8' resolution: integrity: sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA== + /is-number/3.0.0: + dependencies: + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= /is-number/7.0.0: dev: true engines: @@ -3909,12 +5019,26 @@ packages: node: '>=8' resolution: integrity: sha512-fhBZv3eFKUbyHXZ1oHujdo2tZ+CNbdpdzzlENgCGZUC8keoGxUew2jYFLYcUB4qo7LDD03o4KK11m/QYD7kEjg== + /is-path-cwd/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= /is-path-cwd/2.2.0: dev: true engines: node: '>=6' resolution: integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + /is-path-in-cwd/1.0.1: + dependencies: + is-path-inside: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== /is-path-in-cwd/2.1.0: dependencies: is-path-inside: 2.1.0 @@ -3951,6 +5075,14 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + /is-plain-object/2.0.4: + dependencies: + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== /is-plain-object/3.0.0: dependencies: isobject: 4.0.0 @@ -3966,9 +5098,16 @@ packages: /is-reference/1.1.4: dependencies: '@types/estree': 0.0.39 - dev: true resolution: integrity: sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== + /is-regex/1.0.4: + dependencies: + has: 1.0.3 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= /is-regex/1.0.5: dependencies: has: 1.0.3 @@ -4034,7 +5173,6 @@ packages: resolution: integrity: sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= /is-windows/1.0.2: - dev: false engines: node: '>=0.10.0' resolution: @@ -4054,6 +5192,20 @@ packages: /isexe/2.0.0: resolution: integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + /isobject/2.1.0: + dependencies: + isarray: 1.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + /isobject/3.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-TkMekrEalzFjaqH5yNHMvP2reN8= /isobject/4.0.0: dev: true engines: @@ -4216,6 +5368,34 @@ packages: dev: true resolution: integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + /kind-of/3.2.2: + dependencies: + is-buffer: 1.1.6 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + /kind-of/4.0.0: + dependencies: + is-buffer: 1.1.6 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + /kind-of/5.1.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + /kind-of/6.0.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== /latest-version/5.1.0: dependencies: package-json: 6.5.0 @@ -4237,6 +5417,36 @@ packages: dev: true resolution: integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + /lint-staged/8.2.1: + dependencies: + chalk: 2.4.2 + commander: 2.20.3 + cosmiconfig: 5.2.1 + debug: 3.2.6 + dedent: 0.7.0 + del: 3.0.0 + execa: 1.0.0 + g-status: 2.0.2 + is-glob: 4.0.1 + is-windows: 1.0.2 + listr: 0.14.3_listr@0.14.3 + listr-update-renderer: 0.5.0_listr@0.14.3 + lodash: 4.17.15 + log-symbols: 2.2.0 + micromatch: 3.1.10 + npm-which: 3.0.1 + p-map: 1.2.0 + path-is-inside: 1.0.2 + pify: 3.0.0 + please-upgrade-node: 3.2.0 + staged-git-files: 1.1.2 + string-argv: 0.0.2 + stringify-object: 3.3.0 + yup: 0.27.0 + dev: true + hasBin: true + resolution: + integrity: sha512-n0tDGR/rTCgQNwXnUf/eWIpPNddGWxC32ANTNYsj2k02iZb7Cz5ox2tytwBu+2r0zDXMEMKw7Y9OD/qsav561A== /lint-staged/9.5.0: dependencies: chalk: 2.4.2 @@ -4540,6 +5750,12 @@ packages: dev: true resolution: integrity: sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + /map-cache/0.2.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= /map-obj/1.0.1: dev: true engines: @@ -4552,6 +5768,14 @@ packages: node: '>=4' resolution: integrity: sha1-plzSkIepJZi4eRJXpSPgISIqwfk= + /map-visit/1.0.0: + dependencies: + object-visit: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= /matched/1.0.2: dependencies: arr-union: 3.1.0 @@ -4565,6 +5789,14 @@ packages: node: '>= 0.12.0' resolution: integrity: sha512-7ivM1jFZVTOOS77QsR+TtYHH0ecdLclMkqbf5qiJdX2RorqfhsL65QHySPZgDE0ZjHoh+mQUNHTanNXIlzXd0Q== + /matcher/1.1.1: + dependencies: + escape-string-regexp: 1.0.5 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg== /matcher/2.1.0: dependencies: escape-string-regexp: 2.0.0 @@ -4629,6 +5861,26 @@ packages: node: '>= 6' resolution: integrity: sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + /micromatch/3.1.10: + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + braces: 2.3.2 + define-property: 2.0.2 + extend-shallow: 3.0.2 + extglob: 2.0.4 + fragment-cache: 0.2.1 + kind-of: 6.0.2 + nanomatch: 1.2.13 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== /micromatch/4.0.2: dependencies: braces: 3.0.2 @@ -4688,6 +5940,15 @@ packages: /minimist/1.2.0: resolution: integrity: sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + /mixin-deep/1.3.2: + dependencies: + for-in: 1.0.2 + is-extendable: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== /mkdirp/0.5.1: dependencies: minimist: 0.0.8 @@ -4695,10 +5956,45 @@ packages: hasBin: true resolution: integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + /mocha/6.2.2: + dependencies: + ansi-colors: 3.2.3 + browser-stdout: 1.3.1 + debug: 3.2.6 + diff: 3.5.0 + escape-string-regexp: 1.0.5 + find-up: 3.0.0 + glob: 7.1.3 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 3.13.1 + log-symbols: 2.2.0 + minimatch: 3.0.4 + mkdirp: 0.5.1 + ms: 2.1.1 + node-environment-flags: 1.0.5 + object.assign: 4.1.0 + strip-json-comments: 2.0.1 + supports-color: 6.0.0 + which: 1.3.1 + wide-align: 1.1.3 + yargs: 13.3.0 + yargs-parser: 13.1.1 + yargs-unparser: 1.6.0 + dev: true + engines: + node: '>= 6.0.0' + hasBin: true + resolution: + integrity: sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A== /ms/2.0.0: dev: true resolution: integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + /ms/2.1.1: + dev: true + resolution: + integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== /ms/2.1.2: dev: true resolution: @@ -4706,7 +6002,25 @@ packages: /mute-stream/0.0.8: dev: true resolution: - integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + /nanomatch/1.2.13: + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + define-property: 2.0.2 + extend-shallow: 3.0.2 + fragment-cache: 0.2.1 + is-windows: 1.0.2 + kind-of: 6.0.2 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== /natural-compare/1.4.0: dev: true resolution: @@ -4737,6 +6051,13 @@ packages: dev: true resolution: integrity: sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA== + /node-environment-flags/1.0.5: + dependencies: + object.getownpropertydescriptors: 2.0.3 + semver: 5.7.1 + dev: true + resolution: + integrity: sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== /node-modules-regexp/1.0.0: dev: true engines: @@ -4747,6 +6068,12 @@ packages: dev: false resolution: integrity: sha1-R6Pn2Az/qmRYNkvSLthcqzMHvnk= + /node-releases/1.1.41: + dependencies: + semver: 6.3.0 + dev: true + resolution: + integrity: sha512-+IctMa7wIs8Cfsa8iYzeaLTFwv5Y4r5jZud+4AnfymzeEXKBCavFX0KBgzVaPVqf0ywa6PrO8/b+bPqdwjGBSg== /node-releases/1.1.42: dependencies: semver: 6.3.0 @@ -4756,7 +6083,7 @@ packages: /normalize-package-data/2.5.0: dependencies: hosted-git-info: 2.8.5 - resolve: 1.13.1 + resolve: 1.14.0 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true @@ -4780,6 +6107,15 @@ packages: node: '>=8' resolution: integrity: sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + /npm-path/2.0.4: + dependencies: + which: 1.3.1 + dev: true + engines: + node: '>=0.8' + hasBin: true + resolution: + integrity: sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw== /npm-run-path/2.0.2: dependencies: path-key: 2.0.1 @@ -4796,6 +6132,17 @@ packages: node: '>=8' resolution: integrity: sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg== + /npm-which/3.0.1: + dependencies: + commander: 2.20.3 + npm-path: 2.0.4 + which: 1.3.1 + dev: true + engines: + node: '>=4.2.0' + hasBin: true + resolution: + integrity: sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo= /nth-check/1.0.2: dependencies: boolbase: 1.0.0 @@ -4847,6 +6194,16 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + /object-copy/0.1.0: + dependencies: + copy-descriptor: 0.1.1 + define-property: 0.2.5 + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-fn2Fi3gb18mRpBupde04EnVOmYw= /object-inspect/1.7.0: dev: true resolution: @@ -4863,6 +6220,14 @@ packages: node: '>= 0.4' resolution: integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + /object-visit/1.0.1: + dependencies: + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= /object.assign/4.1.0: dependencies: define-properties: 1.1.3 @@ -4874,26 +6239,34 @@ packages: node: '>= 0.4' resolution: integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - /object.getownpropertydescriptors/2.1.0: + /object.getownpropertydescriptors/2.0.3: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.0-next.1 + es-abstract: 1.16.3 dev: true engines: node: '>= 0.8' resolution: - integrity: sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - /object.values/1.1.1: + integrity: sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + /object.pick/1.3.0: + dependencies: + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + /object.values/1.1.0: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.0-next.1 + es-abstract: 1.16.3 function-bind: 1.1.1 has: 1.0.3 dev: true engines: node: '>= 0.4' resolution: - integrity: sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + integrity: sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg== /observable-to-promise/1.0.0: dependencies: is-observable: 2.0.0 @@ -5038,6 +6411,12 @@ packages: node: '>=8' resolution: integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + /p-map/1.2.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== /p-map/2.1.0: dev: true engines: @@ -5151,6 +6530,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + /pascalcase/0.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= /path-exists/3.0.0: dev: true engines: @@ -5308,17 +6693,23 @@ packages: node: '>=6' resolution: integrity: sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w== - /pnpm/4.4.0: + /pnpm/4.5.0: dev: true engines: node: '>=10' hasBin: true resolution: - integrity: sha512-by0Ny6fL9ka9XQ5SfLh4/iAwpi78XMU06q6mIYv9tzgvNx/A78438vXcnwt0wjtEbpm6U+FFM8wYgtAtb9tekg== + integrity: sha512-Gj+WorOwy+ySPI8enTV9UNlHFNjGpyhkosRgWWJbLxuZn8Zibc2j6i7VB1ivJljyEACFOVP0Y+3Y+3wcwfuZDw== + /posix-character-classes/0.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= /postcss-calc/7.0.1: dependencies: css-unit-converter: 1.1.1 - postcss: 7.0.24 + postcss: 7.0.23 postcss-selector-parser: 5.0.0 postcss-value-parser: 3.3.1 dev: true @@ -5326,10 +6717,10 @@ packages: integrity: sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ== /postcss-colormin/4.0.3: dependencies: - browserslist: 4.8.2 + browserslist: 4.8.0 color: 3.1.2 has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5338,7 +6729,7 @@ packages: integrity: sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== /postcss-convert-values/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5347,7 +6738,7 @@ packages: integrity: sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== /postcss-discard-comments/4.0.2: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5355,7 +6746,7 @@ packages: integrity: sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== /postcss-discard-duplicates/4.0.2: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5363,7 +6754,7 @@ packages: integrity: sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== /postcss-discard-empty/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5371,7 +6762,7 @@ packages: integrity: sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== /postcss-discard-overridden/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5389,7 +6780,7 @@ packages: /postcss-merge-longhand/4.0.11: dependencies: css-color-names: 0.0.4 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 stylehacks: 4.0.3 dev: true @@ -5399,10 +6790,10 @@ packages: integrity: sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== /postcss-merge-rules/4.0.3: dependencies: - browserslist: 4.8.2 + browserslist: 4.8.0 caniuse-api: 3.0.0 cssnano-util-same-parent: 4.0.1 - postcss: 7.0.24 + postcss: 7.0.23 postcss-selector-parser: 3.1.1 vendors: 1.0.3 dev: true @@ -5412,7 +6803,7 @@ packages: integrity: sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== /postcss-minify-font-values/4.0.2: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5423,7 +6814,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 is-color-stop: 1.1.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5433,9 +6824,9 @@ packages: /postcss-minify-params/4.0.2: dependencies: alphanum-sort: 1.0.2 - browserslist: 4.8.2 + browserslist: 4.8.0 cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 uniqs: 2.0.0 dev: true @@ -5447,7 +6838,7 @@ packages: dependencies: alphanum-sort: 1.0.2 has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 postcss-selector-parser: 3.1.1 dev: true engines: @@ -5486,14 +6877,14 @@ packages: css-modules-loader-core: 1.1.0 generic-names: 1.0.3 lodash.camelcase: 4.3.0 - postcss: 7.0.24 + postcss: 7.0.23 string-hash: 1.1.3 dev: true resolution: integrity: sha512-btTrbK+Xc3NBuYF8TPBjCMRSp5h6NoQ1iVZ6WiDQENIze6KIYCSf0+UFQuV3yJ7gRHA+4AAtF8i2jRvUpbBMMg== /postcss-normalize-charset/4.0.1: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5502,7 +6893,7 @@ packages: /postcss-normalize-display-values/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5513,7 +6904,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5524,7 +6915,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 cssnano-util-get-match: 4.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5534,7 +6925,7 @@ packages: /postcss-normalize-string/4.0.2: dependencies: has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5544,7 +6935,7 @@ packages: /postcss-normalize-timing-functions/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5553,8 +6944,8 @@ packages: integrity: sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== /postcss-normalize-unicode/4.0.1: dependencies: - browserslist: 4.8.2 - postcss: 7.0.24 + browserslist: 4.8.0 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5565,7 +6956,7 @@ packages: dependencies: is-absolute-url: 2.1.0 normalize-url: 3.3.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5574,7 +6965,7 @@ packages: integrity: sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== /postcss-normalize-whitespace/4.0.2: dependencies: - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5584,7 +6975,7 @@ packages: /postcss-ordered-values/4.1.2: dependencies: cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5593,10 +6984,10 @@ packages: integrity: sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== /postcss-reduce-initial/4.0.3: dependencies: - browserslist: 4.8.2 + browserslist: 4.8.0 caniuse-api: 3.0.0 has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 dev: true engines: node: '>=6.9.0' @@ -5606,7 +6997,7 @@ packages: dependencies: cssnano-util-get-match: 4.0.0 has: 1.0.3 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 dev: true engines: @@ -5636,7 +7027,7 @@ packages: /postcss-svgo/4.0.2: dependencies: is-svg: 3.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-value-parser: 3.3.1 svgo: 1.3.2 dev: true @@ -5647,7 +7038,7 @@ packages: /postcss-unique-selectors/4.0.1: dependencies: alphanum-sort: 1.0.2 - postcss: 7.0.24 + postcss: 7.0.23 uniqs: 2.0.0 dev: true engines: @@ -5668,7 +7059,7 @@ packages: node: '>=4.0.0' resolution: integrity: sha1-AA29H47vIXqjaLmiEsX8QLKo8/I= - /postcss/7.0.24: + /postcss/7.0.23: dependencies: chalk: 2.4.2 source-map: 0.6.1 @@ -5677,7 +7068,7 @@ packages: engines: node: '>=6.0.0' resolution: - integrity: sha512-Xl0XvdNWg+CblAXzNvbSOUvgJXwSjmbAKORqyw9V2AlHrm1js2gFw9y3jibBAhpKZi8b5JzJCVh/FyzPsTtgTA== + integrity: sha512-hOlMf3ouRIFXD+j2VJecwssTwbvsPGJVMzupptg+85WA+i7MwyrydmQAgY3R+m0Bc0exunhbJmijy8u8+vufuQ== /prelude-ls/1.1.2: dev: true engines: @@ -5752,6 +7143,10 @@ packages: node: '>=0.12' resolution: integrity: sha1-LMfr6Vn8OmYZwEq029yeRS2GS70= + /property-expr/1.5.1: + dev: true + resolution: + integrity: sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g== /pseudomap/1.0.2: dev: true resolution: @@ -5862,6 +7257,14 @@ packages: node: '>=8.10.0' resolution: integrity: sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== + /rechoir/0.6.2: + dependencies: + resolve: 1.13.1 + dev: true + engines: + node: '>= 0.10' + resolution: + integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= /redent/2.0.0: dependencies: indent-string: 3.2.0 @@ -5891,6 +7294,15 @@ packages: dev: true resolution: integrity: sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== + /regex-not/1.0.2: + dependencies: + extend-shallow: 3.0.2 + safe-regex: 1.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== /regexp.prototype.flags/1.3.0: dependencies: define-properties: 1.1.3 @@ -5925,7 +7337,7 @@ packages: regenerate: 1.4.0 regenerate-unicode-properties: 8.1.0 regjsgen: 0.5.1 - regjsparser: 0.6.1 + regjsparser: 0.6.0 unicode-match-property-ecmascript: 1.0.4 unicode-match-property-value-ecmascript: 1.1.0 engines: @@ -5963,12 +7375,12 @@ packages: hasBin: true resolution: integrity: sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - /regjsparser/0.6.1: + /regjsparser/0.6.0: dependencies: jsesc: 0.5.0 hasBin: true resolution: - integrity: sha512-7LutE94sz/NKSYegK+/4E77+8DipxF+Qn2Tmu362AcmsF2NYq/wx3+ObvU90TKEhjf7hQoFXo23ajjrXP7eUgg== + integrity: sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== /release-zalgo/1.0.0: dependencies: es6-error: 4.1.1 @@ -5977,6 +7389,18 @@ packages: node: '>=4' resolution: integrity: sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= + /repeat-element/1.1.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + /repeat-string/1.6.1: + dev: true + engines: + node: '>=0.10' + resolution: + integrity: sha1-jcrkcOHIirwtYA//Sndihtp15jc= /require-directory/2.1.1: dev: true engines: @@ -5993,6 +7417,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo= + /require-relative/0.8.7: + dev: true + resolution: + integrity: sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= /reserved-words/0.1.2: dev: true resolution: @@ -6032,11 +7460,21 @@ packages: node: '>=8' resolution: integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + /resolve-url/0.2.1: + dev: true + resolution: + integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= /resolve/1.13.1: dependencies: path-parse: 1.0.6 resolution: integrity: sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w== + /resolve/1.14.0: + dependencies: + path-parse: 1.0.6 + dev: true + resolution: + integrity: sha512-uviWSi5N67j3t3UKFxej1loCH0VZn5XuqdNxoLShPcYPw6cUZn74K1VRj+9myynRX03bxIBEkwlkob/ujLsJVw== /responselike/1.0.2: dependencies: lowercase-keys: 1.0.1 @@ -6061,6 +7499,12 @@ packages: node: '>=8' resolution: integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + /ret/0.1.15: + dev: true + engines: + node: '>=0.12' + resolution: + integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== /reusify/1.0.4: dev: true engines: @@ -6097,6 +7541,30 @@ packages: hasBin: true resolution: integrity: sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + /rollup-plugin-babel/4.3.3_@babel+core@7.7.4+rollup@1.27.8: + dependencies: + '@babel/core': 7.7.4 + '@babel/helper-module-imports': 7.7.4 + rollup: 1.27.8 + rollup-pluginutils: 2.8.2 + dev: true + peerDependencies: + '@babel/core': 7 || ^7.0.0-rc.2 + rollup: '>=0.60.0 <2' + resolution: + integrity: sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw== + /rollup-plugin-babel/4.3.3_@babel+core@7.7.5+rollup@1.27.11: + dependencies: + '@babel/core': 7.7.5 + '@babel/helper-module-imports': 7.7.4 + rollup: 1.27.11 + rollup-pluginutils: 2.8.2 + dev: true + peerDependencies: + '@babel/core': 7 || ^7.0.0-rc.2 + rollup: '>=0.60.0 <2' + resolution: + integrity: sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw== /rollup-plugin-babel/4.3.3_@babel+core@7.7.5+rollup@1.27.13: dependencies: '@babel/core': 7.7.5 @@ -6113,7 +7581,6 @@ packages: dependencies: buble: 0.10.7 rollup-pluginutils: 1.5.2 - deprecated: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble. dev: true resolution: integrity: sha1-ytP2gq66Q/vpQD5EexVZ9lscpHk= @@ -6121,7 +7588,6 @@ packages: dependencies: buble: 0.19.8 rollup-pluginutils: 2.8.2 - deprecated: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble. dev: true resolution: integrity: sha512-8J4zPk2DQdk3rxeZvxgzhHh/rm5nJkjwgcsUYisCQg1QbT5yagW+hehYEW7ZNns/NVbDCTv4JQ7h4fC8qKGOKw== @@ -6137,25 +7603,25 @@ packages: rollup: '>=1.12.0' resolution: integrity: sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== - /rollup-plugin-commonjs/10.1.0_rollup@1.27.13: + /rollup-plugin-commonjs/10.1.0_rollup@1.27.8: dependencies: estree-walker: 0.6.1 is-reference: 1.1.4 magic-string: 0.25.4 resolve: 1.13.1 - rollup: 1.27.13 + rollup: 1.27.8 rollup-pluginutils: 2.8.2 dev: true peerDependencies: rollup: '>=1.12.0' resolution: integrity: sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== - /rollup-plugin-commonjs/9.3.4_rollup@1.27.13: + /rollup-plugin-commonjs/9.3.4_rollup@1.27.8: dependencies: estree-walker: 0.6.1 magic-string: 0.25.4 resolve: 1.13.1 - rollup: 1.27.13 + rollup: 1.27.8 rollup-pluginutils: 2.8.2 dev: true peerDependencies: @@ -6169,21 +7635,19 @@ packages: is-module: 1.0.0 resolve: 1.13.1 rollup-pluginutils: 2.8.2 - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve. dev: true peerDependencies: rollup: '>=1.11.0' resolution: integrity: sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - /rollup-plugin-node-resolve/5.2.0_rollup@1.27.13: + /rollup-plugin-node-resolve/5.2.0_rollup@1.27.8: dependencies: '@types/resolve': 0.0.8 builtin-modules: 3.1.0 is-module: 1.0.0 resolve: 1.13.1 - rollup: 1.27.13 + rollup: 1.27.8 rollup-pluginutils: 2.8.2 - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve. dev: true peerDependencies: rollup: '>=1.11.0' @@ -6197,7 +7661,7 @@ packages: import-cwd: 2.1.0 p-queue: 2.4.2 pify: 3.0.0 - postcss: 7.0.24 + postcss: 7.0.23 postcss-load-config: 2.1.0 postcss-modules: 1.4.1 promise.series: 0.2.0 @@ -6210,12 +7674,11 @@ packages: node: '>=6' resolution: integrity: sha512-d12oKl6za/GGXmlytzVPzzTdPCKgti/Kq2kNhtfm5vv9hkNbyrTvizMBm6zZ5rRWX/sIWl3znjIJ8xy6Hofoeg== - /rollup-plugin-typescript/1.0.1_typescript@3.7.3: + /rollup-plugin-typescript/1.0.1_typescript@3.7.2: dependencies: resolve: 1.13.1 rollup-pluginutils: 2.8.2 - typescript: 3.7.3 - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-typescript. + typescript: 3.7.2 dev: true peerDependencies: tslib: '*' @@ -6234,14 +7697,31 @@ packages: estree-walker: 0.6.1 resolution: integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== + /rollup/1.27.11: + dependencies: + '@types/estree': 0.0.40 + '@types/node': 12.12.17 + acorn: 7.1.0 + hasBin: true + resolution: + integrity: sha512-ENXdvXk8tjtkNTvIvjRzOEu+vv54va7PiDR7VwP8TD+In6J87gKzzFmQMawQixEL2y9rsPEgomUS7ZVkq47Tww== /rollup/1.27.13: dependencies: '@types/estree': 0.0.40 - '@types/node': 12.12.18 + '@types/node': 12.12.20 acorn: 7.1.0 + dev: true hasBin: true resolution: integrity: sha512-hDi7M07MpmNSDE8YVwGVFA8L7n8jTLJ4lG65nMAijAyqBe//rtu4JdxjUBE7JqXfdpqxqDTbCDys9WcqdpsQvw== + /rollup/1.27.8: + dependencies: + '@types/estree': 0.0.40 + '@types/node': 12.12.14 + acorn: 7.1.0 + hasBin: true + resolution: + integrity: sha512-EVoEV5rAWl+5clnGznt1KY8PeVkzVQh/R0d2s3gHEkN7gfoyC4JmvIVuCtPbYE8NM5Ep/g+nAmvKXBjzaqTsHA== /run-async/2.3.0: dependencies: is-promise: 2.1.0 @@ -6277,6 +7757,12 @@ packages: dev: true resolution: integrity: sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + /safe-regex/1.1.0: + dependencies: + ret: 0.1.15 + dev: true + resolution: + integrity: sha1-QKNmnzsHfR6UPURinhV91IAjvy4= /safer-buffer/2.1.2: dev: true resolution: @@ -6316,6 +7802,17 @@ packages: dev: true resolution: integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + /set-value/2.0.1: + dependencies: + extend-shallow: 2.0.1 + is-extendable: 0.1.1 + is-plain-object: 2.0.4 + split-string: 3.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== /shebang-command/1.2.0: dependencies: shebang-regex: 1.0.0 @@ -6344,10 +7841,38 @@ packages: node: '>=8' resolution: integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + /shelljs/0.8.3: + dependencies: + glob: 7.1.6 + interpret: 1.2.0 + rechoir: 0.6.2 + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + /shx/0.3.2: + dependencies: + es6-object-assign: 1.1.0 + minimist: 1.2.0 + shelljs: 0.8.3 + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA== /signal-exit/3.0.2: dev: true resolution: integrity: sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + /simple-git/1.128.0: + dependencies: + debug: 4.1.1 + dev: true + resolution: + integrity: sha512-bi8ff+gA+GJgmskbkbLBuykkvsuWv0lPEXjCDQkUvr2DrOpsVcowk9BqqQAl8gQkiyLhzgFIKvirDiwWFBDMqg== /simple-swizzle/0.2.2: dependencies: is-arrayish: 0.3.2 @@ -6397,6 +7922,49 @@ packages: node: '>=8' resolution: integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + /snapdragon-node/2.1.1: + dependencies: + define-property: 1.0.0 + isobject: 3.0.1 + snapdragon-util: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + /snapdragon-util/3.0.1: + dependencies: + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + /snapdragon/0.8.2: + dependencies: + base: 0.11.2 + debug: 2.6.9 + define-property: 0.2.5 + extend-shallow: 2.0.1 + map-cache: 0.2.2 + source-map: 0.5.7 + source-map-resolve: 0.5.2 + use: 3.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + /source-map-resolve/0.5.2: + dependencies: + atob: 2.1.2 + decode-uri-component: 0.2.0 + resolve-url: 0.2.1 + source-map-url: 0.4.0 + urix: 0.1.0 + dev: true + resolution: + integrity: sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== /source-map-support/0.5.16: dependencies: buffer-from: 1.1.1 @@ -6404,6 +7972,10 @@ packages: dev: true resolution: integrity: sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + /source-map-url/0.4.0: + dev: true + resolution: + integrity: sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= /source-map/0.5.7: dev: true engines: @@ -6458,6 +8030,14 @@ packages: dev: true resolution: integrity: sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + /split-string/3.1.0: + dependencies: + extend-shallow: 3.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== /sprintf-js/1.0.3: resolution: integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= @@ -6471,6 +8051,26 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== + /staged-git-files/1.1.2: + dev: true + hasBin: true + resolution: + integrity: sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA== + /static-extend/0.1.2: + dependencies: + define-property: 0.2.5 + object-copy: 0.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + /string-argv/0.0.2: + dev: true + engines: + node: '>=0.6.19' + resolution: + integrity: sha1-2sMECGkMIfPDYwo/86BYd73L1zY= /string-argv/0.3.1: dev: true engines: @@ -6634,8 +8234,8 @@ packages: integrity: sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== /stylehacks/4.0.3: dependencies: - browserslist: 4.8.2 - postcss: 7.0.24 + browserslist: 4.8.0 + postcss: 7.0.23 postcss-selector-parser: 3.1.1 dev: true engines: @@ -6675,6 +8275,14 @@ packages: node: '>=4' resolution: integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + /supports-color/6.0.0: + dependencies: + has-flag: 3.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== /supports-color/6.1.0: dependencies: has-flag: 3.0.0 @@ -6701,7 +8309,7 @@ packages: csso: 4.0.2 js-yaml: 3.13.1 mkdirp: 0.5.1 - object.values: 1.1.1 + object.values: 1.1.0 sax: 1.2.4 stable: 0.1.8 unquote: 1.1.1 @@ -6718,6 +8326,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + /synchronous-promise/2.0.10: + dev: true + resolution: + integrity: sha512-6PC+JRGmNjiG3kJ56ZMNWDPL8hjyghF5cMXIFOKg+NiwwEZZIvxTWd0pinWKyD227odg9ygF8xVhhz7gb8Uq7A== /table/5.4.6: dependencies: ajv: 6.10.2 @@ -6780,12 +8392,29 @@ packages: node: '>=4' resolution: integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + /to-object-path/0.3.0: + dependencies: + kind-of: 3.2.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= /to-readable-stream/1.0.0: dev: true engines: node: '>=6' resolution: integrity: sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + /to-regex-range/2.1.1: + dependencies: + is-number: 3.0.0 + repeat-string: 1.6.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= /to-regex-range/5.0.1: dependencies: is-number: 7.0.0 @@ -6794,6 +8423,21 @@ packages: node: '>=8.0' resolution: integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + /to-regex/3.0.2: + dependencies: + define-property: 2.0.2 + extend-shallow: 3.0.2 + regex-not: 1.0.2 + safe-regex: 1.1.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + /toposort/2.0.2: + dev: true + resolution: + integrity: sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= /tosource/1.0.0: dev: false engines: @@ -6904,6 +8548,13 @@ packages: dev: true resolution: integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + /typescript/3.7.2: + dev: true + engines: + node: '>=4.2.0' + hasBin: true + resolution: + integrity: sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ== /typescript/3.7.3: dev: true engines: @@ -6949,6 +8600,17 @@ packages: node: '>=4' resolution: integrity: sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + /union-value/1.0.1: + dependencies: + arr-union: 3.1.0 + get-value: 2.0.6 + is-extendable: 0.1.1 + set-value: 2.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== /uniq/1.0.1: dev: true resolution: @@ -6979,6 +8641,15 @@ packages: dev: true resolution: integrity: sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + /unset-value/1.0.0: + dependencies: + has-value: 0.3.1 + isobject: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= /update-notifier/3.0.1: dependencies: boxen: 3.2.0 @@ -7004,6 +8675,10 @@ packages: dev: true resolution: integrity: sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + /urix/0.1.0: + dev: true + resolution: + integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= /url-parse-lax/3.0.0: dependencies: prepend-http: 2.0.0 @@ -7012,10 +8687,16 @@ packages: node: '>=4' resolution: integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + /use/3.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== /util.promisify/1.0.0: dependencies: define-properties: 1.1.3 - object.getownpropertydescriptors: 2.1.0 + object.getownpropertydescriptors: 2.0.3 dev: true resolution: integrity: sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== @@ -7074,6 +8755,12 @@ packages: hasBin: true resolution: integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + /wide-align/1.1.3: + dependencies: + string-width: 2.1.1 + dev: true + resolution: + integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== /widest-line/2.0.1: dependencies: string-width: 2.1.1 @@ -7182,6 +8869,16 @@ packages: dev: true resolution: integrity: sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + /yargs-unparser/1.6.0: + dependencies: + flat: 4.1.0 + lodash: 4.17.15 + yargs: 13.3.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== /yargs/13.3.0: dependencies: cliui: 5.0.0 @@ -7203,3 +8900,14 @@ packages: node: '>=6' resolution: integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + /yup/0.27.0: + dependencies: + '@babel/runtime': 7.7.6 + fn-name: 2.0.1 + lodash: 4.17.15 + property-expr: 1.5.1 + synchronous-promise: 2.0.10 + toposort: 2.0.2 + dev: true + resolution: + integrity: sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ==