Codebase list node-rollup-plugin-commonjs / 5c8023c
New upstream version 17.0.0+repack Pirate Praveen 3 years ago
1145 changed file(s) with 3161 addition(s) and 42200 deletion(s). Raw diff Collapse all Expand all
+0
-115
.circleci/config.yml less more
0 version: 2
1 aliases:
2 - &checkout_master
3 name: checkout master
4 command: |
5 if [[ $(git rev-parse --abbrev-ref HEAD) != "master" ]]; then
6 git branch -f master origin/master;
7 fi
8 - &install_pnpm
9 name: Install pnpm
10 command: npm install pnpm@^4.0.0 -g
11 - &install_yarn
12 name: Install yarn
13 command: npm install yarn -g
14 - &pnpm_install
15 name: Install Dependencies
16 command: pnpm install --ignore-scripts
17 - &restore_cache
18 key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
19
20 coverage: &coverage
21 steps:
22 - checkout
23 - run: *checkout_master
24 - restore_cache: *restore_cache
25 - run: *install_pnpm
26 - run: *install_yarn
27 - run: *pnpm_install
28 - run:
29 name: Run unit tests.
30 command: pnpm run ci:coverage
31 - run:
32 name: Submit coverage data to codecov.
33 command: pnpm run ci:coverage:submit
34 when: on_success
35
36 unit_tests: &unit_tests
37 steps:
38 - checkout
39 - run: *checkout_master
40 - restore_cache: *restore_cache
41 - run: *install_pnpm
42 - run: *install_yarn
43 - run: *pnpm_install
44 - run:
45 name: Env Info
46 command: |
47 node --version
48 npm --version
49 pnpm --version
50 - run:
51 name: Run unit tests.
52 command: |
53 pnpm run ci:test
54 echo "prev return code: $?"
55
56 jobs:
57 analysis:
58 docker:
59 - image: rollupcabal/circleci-node-base:latest
60 steps:
61 - checkout
62 - run: *checkout_master
63 - run: *install_pnpm
64 - restore_cache: *restore_cache
65 - run: *pnpm_install
66 - run:
67 name: Run Security Checks
68 command: pnpm run security
69 - run:
70 name: Run linting.
71 command: pnpm run ci:lint
72 - save_cache:
73 key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
74 paths:
75 - ./node_modules
76 node-v10-latest:
77 docker:
78 - image: rollupcabal/circleci-node-v10:latest
79 <<: *unit_tests
80 node-v12-latest:
81 docker:
82 - image: rollupcabal/circleci-node-v12:latest
83 <<: *coverage
84 node-v14-latest:
85 docker:
86 - image: rollupcabal/circleci-node-v14:latest
87 <<: *coverage
88
89 workflows:
90 version: 2
91 validate-test:
92 jobs:
93 - analysis:
94 filters:
95 tags:
96 only: /.*/
97 - node-v10-latest:
98 requires:
99 - analysis
100 filters:
101 tags:
102 only: /.*/
103 - node-v12-latest:
104 requires:
105 - analysis
106 filters:
107 tags:
108 only: /.*/
109 - node-v14-latest:
110 requires:
111 - analysis
112 filters:
113 tags:
114 only: /.*/
+0
-17
.editorconfig less more
0 # editorconfig.org
1 root = true
2
3 [*]
4 charset = utf-8
5 indent_style = space
6 indent_size = 2
7 end_of_line = lf
8 insert_final_newline = true
9 trim_trailing_whitespace = true
10
11 [*.md]
12 insert_final_newline = true
13 trim_trailing_whitespace = false
14
15 [*.yml]
16 max_line_length = 500
+0
-1
.eslintignore less more
0 .eslintrc.js
+0
-47
.eslintrc.js less more
0 module.exports = {
1 extends: ['rollup', 'plugin:import/typescript'],
2 parser: '@typescript-eslint/parser',
3 parserOptions: {
4 project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
5 tsconfigRootDir: __dirname
6 },
7 plugins: ['@typescript-eslint'],
8 rules: {
9 '@typescript-eslint/consistent-type-assertions': 'error',
10 '@typescript-eslint/consistent-type-definitions': 'error',
11 '@typescript-eslint/member-ordering': 'error',
12 '@typescript-eslint/no-inferrable-types': 'error',
13 '@typescript-eslint/no-unnecessary-type-assertion': 'error',
14 '@typescript-eslint/no-unused-vars': [
15 'error',
16 {
17 vars: 'local',
18 args: 'after-used',
19 ignoreRestSiblings: true
20 }
21 ],
22 'import/extensions': [
23 'error',
24 'always',
25 {
26 js: 'never',
27 jsx: 'never',
28 ts: 'never',
29 tsx: 'never'
30 }
31 ],
32 'import/no-namespace': 'off',
33 'import/no-named-export': 'off',
34 'no-unused-vars': 'off',
35 'prettier/prettier': [
36 'error',
37 {
38 arrowParens: 'always',
39 printWidth: 100,
40 singleQuote: true,
41 trailingComma: 'none',
42 plugins: ['prettier-plugin-package']
43 }
44 ]
45 }
46 };
+0
-3
.npmrc less more
0 link-workspace-packages = false
1 shamefully-hoist = true
2 shared-workspace-shrinkwrap = true
+0
-1
.nvmrc less more
0 12
+0
-3
.prettierignore less more
0 .github/ISSUE_TEMPLATE
1 .github/ISSUE_TEMPLATE.md
2 .github/PULL_REQUEST_TEMPLATE.md
+0
-22
.vscode/launch.json less more
0 {
1 // Use IntelliSense to learn about possible attributes.
2 // Hover to view descriptions of existing attributes.
3 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
4 "version": "0.2.0",
5 "configurations": [
6 {
7 "type": "node",
8 "request": "launch",
9 "name": "Mocha Tests",
10 "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
11 "args": [
12 "-u",
13 "tdd",
14 "--timeout",
15 "999999",
16 "--colors"
17 ],
18 "console": "integratedTerminal"
19 }
20 ]
21 }
+0
-7
.vscode/settings.json less more
0 // Place your settings in this file to overwrite default and user settings.
1 {
2 "typescript.format.insertSpaceBeforeFunctionParenthesis": true,
3 "typescript.format.insertSpaceAfterConstructor": true,
4 "typescript.format.enable": true,
5 "eslint.enable": true
6 }
+0
-21
LICENSE less more
0 The MIT License (MIT)
1
2 Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
+0
-142
README.md less more
0 [cover]: https://codecov.io/gh/rollup/plugins/branch/master/graph/badge.svg
1 [cover-url]: https://codecov.io/gh/rollup/plugins
2 [tests]: https://img.shields.io/circleci/project/github/rollup/plugins.svg
3 [tests-url]: https://circleci.com/gh/rollup/plugins
4
5 [![tests][tests]][tests-url]
6 [![cover][cover]][cover-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # Rollup Plugins
10
11 🍣 The one-stop shop for official Rollup plugins
12
13 This repository houses plugins that Rollup considers critical to every day use of Rollup, plugins which the organization has adopted maintenance of, and plugins that the project recommends to its users.
14
15 ## Plugins Found Here
16
17 | | |
18 | ------------------------------------- | ----------------------------------------------------------------------------------------- |
19 | [alias](packages/alias) | Define and resolve aliases for bundle dependencies |
20 | [auto-install](packages/auto-install) | Automatically install dependencies that are imported by a bundle |
21 | [babel](packages/babel) | Compile your files with Babel |
22 | [beep](packages/beep) | System beeps on errors and warnings |
23 | [buble](packages/buble) | Compile ES2015 with buble |
24 | [commonjs](packages/commonjs) | Convert CommonJS modules to ES6 |
25 | [data-uri](packages/data-uri) | Import modules from Data URIs |
26 | [dsv](packages/dsv) | Convert .csv and .tsv files into JavaScript modules with d3-dsv |
27 | [html](packages/html) | Create HTML files to serve Rollup bundles |
28 | [image](packages/image) | Import JPG, PNG, GIF, SVG, and WebP files |
29 | [inject](packages/inject) | Scan modules for global variables and injects `import` statements where necessary |
30 | [json](packages/json) | Convert .json files to ES6 modules |
31 | [legacy](packages/legacy) | Add `export` declarations to legacy non-module scripts |
32 | [multi-entry](packages/multi-entry) | Use multiple entry points for a bundle |
33 | [node-resolve](packages/node-resolve) | Locate and bundle third-party dependencies in node_modules |
34 | [replace](packages/replace) | Replace strings in files while bundling |
35 | [run](packages/run) | Run your bundles in Node once they're built |
36 | [strip](packages/strip) | Remove debugger statements and functions like assert.equal and console.log from your code |
37 | [sucrase](packages/sucrase) | Compile TypeScript, Flow, JSX, etc with Sucrase |
38 | [typescript](packages/typescript) | Integration between Rollup and Typescript |
39 | [url](packages/url) | Import files as data-URIs or ES Modules |
40 | [virtual](packages/virtual) | Load virtual modules from memory |
41 | [wasm](packages/wasm) | Import WebAssembly code with Rollup |
42 | [yaml](packages/yaml) | Convert YAML files to ES6 modules |
43 | | |
44
45 ## Other Packages Found Here
46
47 | | |
48 | ----------------------------------- | ---------------------------------------------------------- |
49 | [pluginutils](packages/pluginutils) | A set of utility functions commonly used by Rollup plugins |
50 | | |
51
52 ## Contributing
53
54 This repository is a [monorepo](https://en.wikipedia.org/wiki/Monorepo) which leverages [pnpm](https://pnpm.js.org/) for dependency management.
55
56 To begin, please install `pnpm`:
57
58 ```console
59 $ npm install pnpm -g
60 ```
61
62 ### Working with Plugin Packages
63
64 All plugin packages are kept in the `/packages` directory.
65
66 #### Adding dependencies:
67
68 ```console
69 $ pnpm add <package> --filter ./packages/<name>
70 ```
71
72 Where `<package>` is the name of the NPM package you wish to add for a plugin package, and `<name>` is the proper name of the plugin. e.g. `@rollup/plugin-beep`.
73
74 #### Publishing:
75
76 ```console
77 $ pnpm run publish -- <name> [flags]
78 ```
79
80 Where `<name>` is the portion of the plugin package name following `@rollup/plugin-`. (e.g. `beep`)
81
82 The publish script performs the following actions:
83
84 - Gathers commits from the last release tag
85 - Determines the next appropriate version bump (major, minor, or patch)
86 - Updates `package.json`
87 - Generates a new ChangeLog entry
88 - Updates `CHANGELOG.md` for the target plugin
89 - Commits `package.json` and `CHANGELOG.md`, with a commit message is in the form `chore(release): <name>-v<version>`
90 - Publishes to NPM
91 - Tags the release in the form `<name>-v<version>` (e.g. `beep-v0.1.0`)
92 - Pushes the commit and tag to Github
93
94 ##### Flags
95
96 The following flags are available to modify the publish process:
97
98 - `--dry` tells the script to perform a dry-run, skipping any file modifications, NPM, or Git Actions. Results from version determination and new ChangeLog additions are displayed.
99 - `--major`, `--minor`, `--patch` can be used to force a particular type of semver bump.
100 - `--no-push` will instruct the script not to push changes and tags to Git.
101 - `--no-tag` will instruct the script not to tag the release.
102
103 #### Running Tests:
104
105 To run tests on all packages which have changes:
106
107 ```console
108 $ pnpm run test
109 ```
110
111 To run tests on a specific package:
112
113 ```console
114 $ pnpm run test --filter ./packages/<name>
115 ```
116
117 Linting:
118
119 To lint all packages which have changes:
120
121 ```console
122 $ pnpm run lint
123 ```
124
125 To lint a specific package:
126
127 ```console
128 $ pnpm run lint --filter ./packages/<name>
129 ```
130
131 _Note: Scripts in the repository will run the root `test` and `lint` script on those packages which have changes. This is also how the CI pipelines function. To run either on a package outside of that pipeline, use `pnpm run <script> -- @rollup/plugin-<name>`._
132
133 ## Adding Plugins
134
135 While we don't have an official procedure for adding third-party plugins to this repository, we are absolutely open to the idea. If you'd like to speak about your project being a part of this repo, please reach out to [@RollupJS](https://twitter.com/RollupJS) on Twitter.
136
137 ## Meta
138
139 [CONTRIBUTING](./.github/CONTRIBUTING.md)
140
141 [LICENSE (Mozilla Public License)](./LICENSE)
+0
-10
codecov.yml less more
0 codecov:
1 branch: master
2 coverage:
3 precision: 2
4 round: down
5 range: 70...100
6 status:
7 project: "no"
8 patch: "yes"
9 comment: "off"
+0
-43
legacy/.eslintrc.json less more
0 {
1 "root": true,
2 "rules": {
3 "indent": [ 2, "tab", { "SwitchCase": 1 } ],
4 "semi": [ 2, "always" ],
5 "keyword-spacing": [ 2, { "before": true, "after": true } ],
6 "space-before-blocks": [ 2, "always" ],
7 "no-mixed-spaces-and-tabs": [ 2, "smart-tabs" ],
8 "no-cond-assign": 0,
9 "no-unused-vars": 2,
10 "object-shorthand": [ 2, "always" ],
11 "no-const-assign": 2,
12 "no-class-assign": 2,
13 "no-this-before-super": 2,
14 "no-var": 2,
15 "no-unreachable": 2,
16 "valid-typeof": 2,
17 "quote-props": [ 2, "as-needed" ],
18 "one-var": [ 2, "never" ],
19 "prefer-arrow-callback": 2,
20 "prefer-const": [ 2, { "destructuring": "all" } ],
21 "arrow-spacing": 2
22 },
23 "env": {
24 "es6": true,
25 "browser": true,
26 "node": true
27 },
28 "extends": [
29 "eslint:recommended",
30 "plugin:import/errors",
31 "plugin:import/warnings"
32 ],
33 "parserOptions": {
34 "ecmaVersion": 8,
35 "sourceType": "module"
36 },
37 "settings": {
38 "import/ignore": [ 0, [
39 "\\.path.js$"
40 ] ]
41 }
42 }
+0
-6
legacy/.huskyrc less more
0 {
1 "hooks": {
2 "post-commit": "git reset",
3 "pre-commit": "lint-staged"
4 }
5 }
+0
-7
legacy/.lintstagedrc less more
0 {
1 "{src/**/*,test/test,test/**/_config}.js": [
2 "prettier --write",
3 "eslint --fix",
4 "git add"
5 ]
6 }
+0
-5
legacy/.prettierrc less more
0 {
1 "singleQuote": true,
2 "useTabs": true,
3 "printWidth": 100
4 }
+0
-289
legacy/CHANGELOG.md less more
0 # rollup-plugin-commonjs changelog
1
2 ## 9.3.4
3 *2019-04-04*
4 * Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384))
5 * Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385))
6
7 ## 9.3.3
8 *2019-04-04*
9 * Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371))
10
11 ## 9.3.2
12 *2019-04-04*
13 * Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303))
14
15 ## 9.3.1
16 *2019-04-04*
17 * Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382))
18
19 ## 9.3.0
20 *2019-04-03*
21 * Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363))
22
23 ## 9.2.3
24 *2019-04-02*
25 * Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364))
26 * Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372))
27 * Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373))
28
29 ## 9.2.2
30 *2019-03-25*
31 * Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379))
32
33 ## 9.2.1
34 *2019-02-23*
35 * Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370))
36
37 ## 9.2.0
38 *2018-10-10*
39 * Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349))
40 * Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346))
41
42 ## 9.1.8
43 *2018-09-18*
44 * Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327))
45 * Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330))
46
47 ## 9.1.6
48 *2018-08-24*
49 * Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338))
50
51 ## 9.1.5
52 *2018-08-09*
53 * Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329))
54
55 ## 9.1.4
56 *2018-07-27*
57 * Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320))
58
59 ## 9.1.3
60 *2018-04-30*
61 * Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316))
62
63 ## 9.1.2
64 *2018-04-30*
65 * Re-publication of 9.1.0
66
67 ## 9.1.1
68 *2018-04-30*
69 * Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
70
71 ## 9.1.0
72
73 * Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
74
75 ## 9.0.0
76
77 * Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300))
78
79 ## 8.4.1
80
81 * Re-release of 8.3.0 as #287 was actually a breaking change
82
83 ## 8.4.0
84
85 * Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285))
86 * Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287))
87 * Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288))
88
89 ## 8.3.0
90
91 * Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283))
92 * Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272))
93 * Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264))
94 * Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271))
95
96 ## 8.2.4
97
98 * Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206))
99
100 ## 8.2.3
101
102 * Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230))
103 * Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226))
104 * Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232))
105
106 ## 8.2.1
107
108 * Fix magic-string deprecation warning
109
110 ## 8.2.0
111
112 * Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208))
113
114 ## 8.1.1
115
116 * Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220))
117
118 ## 8.1.0
119
120 * Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212))
121 * Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195))
122
123 ## 8.0.2
124
125 * Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181))
126
127 ## 8.0.1
128
129 * Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179))
130
131 ## 8.0.0
132
133 * 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))
134
135 ## 7.1.0
136
137 * Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174))
138
139 ## 7.0.2
140
141 * Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158))
142
143 ## 7.0.1
144
145 * Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168))
146
147 ## 7.0.0
148
149 * Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151))
150
151 ## 6.0.1
152
153 * Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127))
154
155 ## 6.0.0
156
157 * 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))
158 * Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132))
159 * Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116))
160
161 ## 5.0.5
162 * Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120))
163
164 ## 5.0.4
165
166 * Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112))
167
168 ## 5.0.3
169
170 * Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35))
171
172 ## 5.0.2
173
174 * 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))
175
176 ## 5.0.1
177
178 * Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84))
179
180 ## 5.0.0
181
182 * Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106))
183 * Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96))
184
185 ## 4.1.0
186
187 * Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93))
188
189 ## 4.0.1
190
191 * Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86))
192
193 ## 4.0.0
194
195 * Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92))
196
197 ## 3.3.1
198
199 * Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554))
200
201 ## 3.3.0
202
203 * Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43))
204 * Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42))
205
206 ## 3.2.0
207
208 * Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524))
209
210 ## 3.1.0
211
212 * Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38))
213 * Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63))
214
215 ## 3.0.2
216
217 * Handle multiple references to `global`
218
219 ## 3.0.1
220
221 * Return a `name`
222
223 ## 3.0.0
224
225 * Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71))
226 * Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50))
227 * Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48))
228
229 ## 2.2.1
230
231 * Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36))
232
233 ## 2.2.0
234
235 * Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31))
236
237 ## 2.1.0
238
239 * Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20))
240 * Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18))
241 * Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23))
242 * Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21))
243 * Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27))
244
245 ## 2.0.0
246
247 * 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))
248
249 ## 1.4.0
250
251 * Generate sourcemaps by default
252
253 ## 1.3.0
254
255 * Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6))
256
257 ## 1.2.0
258
259 * Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5))
260 * Handle shadowed `require`/`module`/`exports`
261
262 ## 1.1.0
263
264 * Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3))
265 * Wrap modules in IIFE for more readable output
266
267 ## 1.0.0
268
269 * Stable release, now that Rollup supports plugins
270
271 ## 0.2.1
272
273 * Allow mixed CommonJS/ES6 imports/exports
274 * Use `var` instead of `let`
275
276 ## 0.2.0
277
278 * Sourcemap support
279 * Support `options.include` and `options.exclude`
280 * Bail early if module is obviously not a CommonJS module
281
282 ## 0.1.1
283
284 Add dist files to package (whoops!)
285
286 ## 0.1.0
287
288 * First release
+0
-21
legacy/LICENSE less more
0 The MIT License (MIT)
1
2 Copyright (c) 2017 [these people](https://github.com/rollup/rollup-plugin-commonjs/graphs/contributors)
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
+0
-125
legacy/README.md less more
0 # rollup-plugin-commonjs [![Build Status][travis-img]][travis]
1
2 [travis-img]: https://travis-ci.org/rollup/rollup-plugin-commonjs.svg
3 [travis]: https://travis-ci.org/rollup/rollup-plugin-commonjs
4
5 Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
6
7
8 ## Installation
9
10 ```bash
11 npm install --save-dev rollup-plugin-commonjs
12 ```
13
14
15 ## Usage
16
17 Typically, you would use this plugin alongside [rollup-plugin-node-resolve](https://github.com/rollup/rollup-plugin-node-resolve), so that you could bundle your CommonJS dependencies in `node_modules`.
18
19 ```js
20 // rollup.config.js
21 import commonjs from 'rollup-plugin-commonjs';
22 import nodeResolve from 'rollup-plugin-node-resolve';
23
24 export default {
25 input: 'main.js',
26 output: {
27 file: 'bundle.js',
28 format: 'iife'
29 },
30 plugins: [
31 nodeResolve({
32 jsnext: true,
33 main: true
34 }),
35
36 commonjs({
37 // non-CommonJS modules will be ignored, but you can also
38 // specifically include/exclude files
39 include: 'node_modules/**', // Default: undefined
40 exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ], // Default: undefined
41 // these values can also be regular expressions
42 // include: /node_modules/
43
44 // search for files other than .js files (must already
45 // be transpiled by a previous plugin!)
46 extensions: [ '.js', '.coffee' ], // Default: [ '.js' ]
47
48 // if true then uses of `global` won't be dealt with by this plugin
49 ignoreGlobal: false, // Default: false
50
51 // if false then skip sourceMap generation for CommonJS modules
52 sourceMap: false, // Default: true
53
54 // explicitly specify unresolvable named exports
55 // (see below for more details)
56 namedExports: { './module.js': ['foo', 'bar' ] }, // Default: undefined
57
58 // sometimes you have to leave require statements
59 // unconverted. Pass an array containing the IDs
60 // or a `id => boolean` function. Only use this
61 // option if you know what you're doing!
62 ignore: [ 'conditional-runtime-dependency' ]
63 })
64 ]
65 };
66 ```
67
68 ### Usage in monorepo
69
70 In case you are using a monorepo, you may want to use a regular expression for `include` as the string 'node_modules' will not match if your `node_modules` is not in your current working directory (i.e. '../node_modules'). Try this:
71
72 ```
73 commonjs({
74 include: /node_modules/
75 })
76 ```
77
78 ### Custom named exports
79
80 This plugin will attempt to create named exports, where appropriate, so you can do this...
81
82 ```js
83 // importer.js
84 import { named } from './exporter.js';
85
86 // exporter.js
87 module.exports = { named: 42 }; // or `exports.named = 42;`
88 ```
89
90 ...but that's not always possible:
91
92 ```js
93 // importer.js
94 import { named } from 'my-lib';
95
96 // my-lib.js
97 var myLib = exports;
98 myLib.named = 'you can\'t see me';
99 ```
100
101 In those cases, you can specify custom named exports:
102
103 ```js
104 commonjs({
105 namedExports: {
106 // left-hand side can be an absolute path, a path
107 // relative to the current directory, or the name
108 // of a module in node_modules
109 'node_modules/my-lib/index.js': [ 'named' ]
110 }
111 })
112 ```
113
114
115 ## Strict mode
116
117 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.
118
119 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.
120
121
122 ## License
123
124 MIT
+0
-31
legacy/appveyor.yml less more
0 # http://www.appveyor.com/docs/appveyor-yml
1
2 version: "{build}"
3
4 clone_depth: 10
5
6 init:
7 - git config --global core.autocrlf false
8
9 environment:
10 matrix:
11 # node.js
12 - nodejs_version: 8
13
14 install:
15 - ps: Install-Product node $env:nodejs_version
16 - IF %nodejs_version% LSS 7 npm -g install npm@4
17 - npm install
18
19 build: off
20
21 test_script:
22 - node --version && npm --version
23 - npm test
24
25 matrix:
26 fast_finish: false
27
28 # cache:
29 # - C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache
30 # - node_modules -> package.json # local npm modules
+0
-50
legacy/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 interface RollupCommonJSOptions {
3 /**
4 * non-CommonJS modules will be ignored, but you can also
5 * specifically include/exclude files
6 * @default undefined
7 */
8 include?: string | RegExp | ReadonlyArray<string | RegExp>,
9 /**
10 * non-CommonJS modules will be ignored, but you can also
11 * specifically include/exclude files
12 * @default undefined
13 */
14 exclude?: string | RegExp | ReadonlyArray<string | RegExp>,
15 /**
16 * search for files other than .js files (must already
17 * be transpiled by a previous plugin!)
18 * @default [ '.js' ]
19 */
20 extensions?: ReadonlyArray<string | RegExp>,
21 /**
22 * if true then uses of `global` won't be dealt with by this plugin
23 * @default false
24 */
25 ignoreGlobal?: boolean,
26 /**
27 * if false then skip sourceMap generation for CommonJS modules
28 * @default true
29 */
30 sourceMap?: boolean,
31 /**
32 * explicitly specify unresolvable named exports
33 * ([see below for more details](https://github.com/rollup/rollup-plugin-commonjs#custom-named-exports))
34 * @default undefined
35 */
36 namedExports?: { [package: string]: ReadonlyArray<string> },
37 /**
38 * sometimes you have to leave require statements
39 * unconverted. Pass an array containing the IDs
40 * or a `id => boolean` function. Only use this
41 * option if you know what you're doing!
42 */
43 ignore?: ReadonlyArray<string | ((id: string) => boolean)>,
44 }
45
46 /**
47 * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
48 */
49 export default function commonjs(options?: RollupCommonJSOptions): Plugin;
+0
-4069
legacy/package-lock.json less more
0 {
1 "name": "rollup-plugin-commonjs",
2 "version": "9.3.4",
3 "lockfileVersion": 1,
4 "requires": true,
5 "dependencies": {
6 "@babel/code-frame": {
7 "version": "7.0.0",
8 "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
9 "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
10 "dev": true,
11 "requires": {
12 "@babel/highlight": "^7.0.0"
13 }
14 },
15 "@babel/highlight": {
16 "version": "7.0.0",
17 "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
18 "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
19 "dev": true,
20 "requires": {
21 "chalk": "^2.0.0",
22 "esutils": "^2.0.2",
23 "js-tokens": "^4.0.0"
24 }
25 },
26 "@babel/runtime": {
27 "version": "7.0.0",
28 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz",
29 "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==",
30 "dev": true,
31 "requires": {
32 "regenerator-runtime": "^0.12.0"
33 }
34 },
35 "@samverschueren/stream-to-observable": {
36 "version": "0.3.0",
37 "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",
38 "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==",
39 "dev": true,
40 "requires": {
41 "any-observable": "^0.3.0"
42 }
43 },
44 "@types/estree": {
45 "version": "0.0.39",
46 "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
47 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
48 "dev": true
49 },
50 "@types/node": {
51 "version": "11.13.0",
52 "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.0.tgz",
53 "integrity": "sha512-rx29MMkRdVmzunmiA4lzBYJNnXsW/PhG4kMBy2ATsYaDjGGR75dCFEVVROKpNwlVdcUX3xxlghKQOeDPBJobng==",
54 "dev": true
55 },
56 "acorn": {
57 "version": "6.1.1",
58 "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
59 "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==",
60 "dev": true
61 },
62 "acorn-jsx": {
63 "version": "5.0.1",
64 "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz",
65 "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==",
66 "dev": true
67 },
68 "ajv": {
69 "version": "6.10.0",
70 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
71 "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
72 "dev": true,
73 "requires": {
74 "fast-deep-equal": "^2.0.1",
75 "fast-json-stable-stringify": "^2.0.0",
76 "json-schema-traverse": "^0.4.1",
77 "uri-js": "^4.2.2"
78 }
79 },
80 "ansi-colors": {
81 "version": "3.2.3",
82 "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
83 "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
84 "dev": true
85 },
86 "ansi-escapes": {
87 "version": "3.2.0",
88 "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
89 "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
90 "dev": true
91 },
92 "ansi-regex": {
93 "version": "3.0.0",
94 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
95 "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
96 "dev": true
97 },
98 "ansi-styles": {
99 "version": "3.2.1",
100 "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
101 "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
102 "dev": true,
103 "requires": {
104 "color-convert": "^1.9.0"
105 }
106 },
107 "any-observable": {
108 "version": "0.3.0",
109 "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz",
110 "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==",
111 "dev": true
112 },
113 "argparse": {
114 "version": "1.0.10",
115 "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
116 "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
117 "dev": true,
118 "requires": {
119 "sprintf-js": "~1.0.2"
120 }
121 },
122 "arr-diff": {
123 "version": "4.0.0",
124 "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
125 "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
126 },
127 "arr-flatten": {
128 "version": "1.1.0",
129 "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
130 "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
131 },
132 "arr-union": {
133 "version": "3.1.0",
134 "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
135 "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
136 },
137 "array-union": {
138 "version": "1.0.2",
139 "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
140 "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
141 "dev": true,
142 "requires": {
143 "array-uniq": "^1.0.1"
144 }
145 },
146 "array-uniq": {
147 "version": "1.0.3",
148 "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
149 "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
150 "dev": true
151 },
152 "array-unique": {
153 "version": "0.3.2",
154 "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
155 "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
156 },
157 "arrify": {
158 "version": "1.0.1",
159 "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
160 "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
161 "dev": true
162 },
163 "assign-symbols": {
164 "version": "1.0.0",
165 "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
166 "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
167 },
168 "astral-regex": {
169 "version": "1.0.0",
170 "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
171 "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
172 "dev": true
173 },
174 "atob": {
175 "version": "2.1.2",
176 "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
177 "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
178 },
179 "balanced-match": {
180 "version": "1.0.0",
181 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
182 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
183 "dev": true
184 },
185 "base": {
186 "version": "0.11.2",
187 "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
188 "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
189 "requires": {
190 "cache-base": "^1.0.1",
191 "class-utils": "^0.3.5",
192 "component-emitter": "^1.2.1",
193 "define-property": "^1.0.0",
194 "isobject": "^3.0.1",
195 "mixin-deep": "^1.2.0",
196 "pascalcase": "^0.1.1"
197 },
198 "dependencies": {
199 "define-property": {
200 "version": "1.0.0",
201 "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
202 "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
203 "requires": {
204 "is-descriptor": "^1.0.0"
205 }
206 },
207 "is-accessor-descriptor": {
208 "version": "1.0.0",
209 "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
210 "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
211 "requires": {
212 "kind-of": "^6.0.0"
213 }
214 },
215 "is-data-descriptor": {
216 "version": "1.0.0",
217 "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
218 "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
219 "requires": {
220 "kind-of": "^6.0.0"
221 }
222 },
223 "is-descriptor": {
224 "version": "1.0.2",
225 "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
226 "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
227 "requires": {
228 "is-accessor-descriptor": "^1.0.0",
229 "is-data-descriptor": "^1.0.0",
230 "kind-of": "^6.0.2"
231 }
232 }
233 }
234 },
235 "brace-expansion": {
236 "version": "1.1.11",
237 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
238 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
239 "dev": true,
240 "requires": {
241 "balanced-match": "^1.0.0",
242 "concat-map": "0.0.1"
243 }
244 },
245 "braces": {
246 "version": "2.3.2",
247 "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
248 "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
249 "requires": {
250 "arr-flatten": "^1.1.0",
251 "array-unique": "^0.3.2",
252 "extend-shallow": "^2.0.1",
253 "fill-range": "^4.0.0",
254 "isobject": "^3.0.1",
255 "repeat-element": "^1.1.2",
256 "snapdragon": "^0.8.1",
257 "snapdragon-node": "^2.0.1",
258 "split-string": "^3.0.2",
259 "to-regex": "^3.0.1"
260 },
261 "dependencies": {
262 "extend-shallow": {
263 "version": "2.0.1",
264 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
265 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
266 "requires": {
267 "is-extendable": "^0.1.0"
268 }
269 }
270 }
271 },
272 "browser-stdout": {
273 "version": "1.3.1",
274 "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
275 "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
276 "dev": true
277 },
278 "buble": {
279 "version": "0.19.6",
280 "resolved": "https://registry.npmjs.org/buble/-/buble-0.19.6.tgz",
281 "integrity": "sha512-9kViM6nJA1Q548Jrd06x0geh+BG2ru2+RMDkIHHgJY/8AcyCs34lTHwra9BX7YdPrZXd5aarkpr/SY8bmPgPdg==",
282 "dev": true,
283 "requires": {
284 "chalk": "^2.4.1",
285 "magic-string": "^0.25.1",
286 "minimist": "^1.2.0",
287 "os-homedir": "^1.0.1",
288 "regexpu-core": "^4.2.0",
289 "vlq": "^1.0.0"
290 },
291 "dependencies": {
292 "minimist": {
293 "version": "1.2.0",
294 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
295 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
296 "dev": true
297 }
298 }
299 },
300 "buffer-from": {
301 "version": "1.1.1",
302 "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
303 "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
304 "dev": true
305 },
306 "builtin-modules": {
307 "version": "1.1.1",
308 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
309 "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
310 "dev": true
311 },
312 "cache-base": {
313 "version": "1.0.1",
314 "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
315 "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
316 "requires": {
317 "collection-visit": "^1.0.0",
318 "component-emitter": "^1.2.1",
319 "get-value": "^2.0.6",
320 "has-value": "^1.0.0",
321 "isobject": "^3.0.1",
322 "set-value": "^2.0.0",
323 "to-object-path": "^0.3.0",
324 "union-value": "^1.0.0",
325 "unset-value": "^1.0.0"
326 }
327 },
328 "caller-callsite": {
329 "version": "2.0.0",
330 "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
331 "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
332 "requires": {
333 "callsites": "^2.0.0"
334 },
335 "dependencies": {
336 "callsites": {
337 "version": "2.0.0",
338 "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
339 "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA="
340 }
341 }
342 },
343 "caller-path": {
344 "version": "2.0.0",
345 "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
346 "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
347 "requires": {
348 "caller-callsite": "^2.0.0"
349 }
350 },
351 "callsites": {
352 "version": "3.0.0",
353 "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz",
354 "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==",
355 "dev": true
356 },
357 "camelcase": {
358 "version": "5.2.0",
359 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz",
360 "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==",
361 "dev": true
362 },
363 "chalk": {
364 "version": "2.4.1",
365 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
366 "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
367 "dev": true,
368 "requires": {
369 "ansi-styles": "^3.2.1",
370 "escape-string-regexp": "^1.0.5",
371 "supports-color": "^5.3.0"
372 }
373 },
374 "chardet": {
375 "version": "0.7.0",
376 "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
377 "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
378 "dev": true
379 },
380 "ci-info": {
381 "version": "2.0.0",
382 "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
383 "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
384 "dev": true
385 },
386 "class-utils": {
387 "version": "0.3.6",
388 "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
389 "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
390 "requires": {
391 "arr-union": "^3.1.0",
392 "define-property": "^0.2.5",
393 "isobject": "^3.0.0",
394 "static-extend": "^0.1.1"
395 },
396 "dependencies": {
397 "define-property": {
398 "version": "0.2.5",
399 "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
400 "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
401 "requires": {
402 "is-descriptor": "^0.1.0"
403 }
404 }
405 }
406 },
407 "cli-cursor": {
408 "version": "2.1.0",
409 "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
410 "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
411 "dev": true,
412 "requires": {
413 "restore-cursor": "^2.0.0"
414 }
415 },
416 "cli-truncate": {
417 "version": "0.2.1",
418 "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz",
419 "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=",
420 "dev": true,
421 "requires": {
422 "slice-ansi": "0.0.4",
423 "string-width": "^1.0.1"
424 },
425 "dependencies": {
426 "ansi-regex": {
427 "version": "2.1.1",
428 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
429 "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
430 "dev": true
431 },
432 "is-fullwidth-code-point": {
433 "version": "1.0.0",
434 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
435 "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
436 "dev": true,
437 "requires": {
438 "number-is-nan": "^1.0.0"
439 }
440 },
441 "slice-ansi": {
442 "version": "0.0.4",
443 "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
444 "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=",
445 "dev": true
446 },
447 "string-width": {
448 "version": "1.0.2",
449 "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
450 "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
451 "dev": true,
452 "requires": {
453 "code-point-at": "^1.0.0",
454 "is-fullwidth-code-point": "^1.0.0",
455 "strip-ansi": "^3.0.0"
456 }
457 },
458 "strip-ansi": {
459 "version": "3.0.1",
460 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
461 "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
462 "dev": true,
463 "requires": {
464 "ansi-regex": "^2.0.0"
465 }
466 }
467 }
468 },
469 "cli-width": {
470 "version": "2.2.0",
471 "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
472 "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
473 "dev": true
474 },
475 "cliui": {
476 "version": "4.1.0",
477 "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
478 "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
479 "dev": true,
480 "requires": {
481 "string-width": "^2.1.1",
482 "strip-ansi": "^4.0.0",
483 "wrap-ansi": "^2.0.0"
484 },
485 "dependencies": {
486 "ansi-regex": {
487 "version": "2.1.1",
488 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
489 "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
490 "dev": true
491 },
492 "is-fullwidth-code-point": {
493 "version": "1.0.0",
494 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
495 "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
496 "dev": true,
497 "requires": {
498 "number-is-nan": "^1.0.0"
499 }
500 },
501 "wrap-ansi": {
502 "version": "2.1.0",
503 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
504 "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
505 "dev": true,
506 "requires": {
507 "string-width": "^1.0.1",
508 "strip-ansi": "^3.0.1"
509 },
510 "dependencies": {
511 "string-width": {
512 "version": "1.0.2",
513 "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
514 "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
515 "dev": true,
516 "requires": {
517 "code-point-at": "^1.0.0",
518 "is-fullwidth-code-point": "^1.0.0",
519 "strip-ansi": "^3.0.0"
520 }
521 },
522 "strip-ansi": {
523 "version": "3.0.1",
524 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
525 "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
526 "dev": true,
527 "requires": {
528 "ansi-regex": "^2.0.0"
529 }
530 }
531 }
532 }
533 }
534 },
535 "code-point-at": {
536 "version": "1.1.0",
537 "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
538 "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
539 "dev": true
540 },
541 "collection-visit": {
542 "version": "1.0.0",
543 "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
544 "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
545 "requires": {
546 "map-visit": "^1.0.0",
547 "object-visit": "^1.0.0"
548 }
549 },
550 "color-convert": {
551 "version": "1.9.3",
552 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
553 "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
554 "dev": true,
555 "requires": {
556 "color-name": "1.1.3"
557 }
558 },
559 "color-name": {
560 "version": "1.1.3",
561 "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
562 "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
563 "dev": true
564 },
565 "commander": {
566 "version": "2.19.0",
567 "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
568 "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
569 "dev": true
570 },
571 "component-emitter": {
572 "version": "1.2.1",
573 "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
574 "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
575 },
576 "concat-map": {
577 "version": "0.0.1",
578 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
579 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
580 "dev": true
581 },
582 "contains-path": {
583 "version": "0.1.0",
584 "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
585 "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
586 "dev": true
587 },
588 "copy-descriptor": {
589 "version": "0.1.1",
590 "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
591 "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
592 },
593 "cosmiconfig": {
594 "version": "5.2.0",
595 "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz",
596 "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==",
597 "dev": true,
598 "requires": {
599 "import-fresh": "^2.0.0",
600 "is-directory": "^0.3.1",
601 "js-yaml": "^3.13.0",
602 "parse-json": "^4.0.0"
603 },
604 "dependencies": {
605 "import-fresh": {
606 "version": "2.0.0",
607 "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
608 "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
609 "dev": true,
610 "requires": {
611 "caller-path": "^2.0.0",
612 "resolve-from": "^3.0.0"
613 }
614 },
615 "parse-json": {
616 "version": "4.0.0",
617 "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
618 "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
619 "dev": true,
620 "requires": {
621 "error-ex": "^1.3.1",
622 "json-parse-better-errors": "^1.0.1"
623 }
624 },
625 "resolve-from": {
626 "version": "3.0.0",
627 "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
628 "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
629 "dev": true
630 }
631 }
632 },
633 "cross-spawn": {
634 "version": "6.0.5",
635 "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
636 "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
637 "dev": true,
638 "requires": {
639 "nice-try": "^1.0.4",
640 "path-key": "^2.0.1",
641 "semver": "^5.5.0",
642 "shebang-command": "^1.2.0",
643 "which": "^1.2.9"
644 }
645 },
646 "date-fns": {
647 "version": "1.30.1",
648 "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz",
649 "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==",
650 "dev": true
651 },
652 "debug": {
653 "version": "4.1.1",
654 "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
655 "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
656 "dev": true,
657 "requires": {
658 "ms": "^2.1.1"
659 }
660 },
661 "decamelize": {
662 "version": "1.2.0",
663 "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
664 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
665 "dev": true
666 },
667 "decode-uri-component": {
668 "version": "0.2.0",
669 "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
670 "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
671 },
672 "dedent": {
673 "version": "0.7.0",
674 "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
675 "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=",
676 "dev": true
677 },
678 "deep-is": {
679 "version": "0.1.3",
680 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
681 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
682 "dev": true
683 },
684 "define-properties": {
685 "version": "1.1.3",
686 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
687 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
688 "dev": true,
689 "requires": {
690 "object-keys": "^1.0.12"
691 }
692 },
693 "define-property": {
694 "version": "2.0.2",
695 "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
696 "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
697 "requires": {
698 "is-descriptor": "^1.0.2",
699 "isobject": "^3.0.1"
700 },
701 "dependencies": {
702 "is-accessor-descriptor": {
703 "version": "1.0.0",
704 "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
705 "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
706 "requires": {
707 "kind-of": "^6.0.0"
708 }
709 },
710 "is-data-descriptor": {
711 "version": "1.0.0",
712 "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
713 "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
714 "requires": {
715 "kind-of": "^6.0.0"
716 }
717 },
718 "is-descriptor": {
719 "version": "1.0.2",
720 "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
721 "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
722 "requires": {
723 "is-accessor-descriptor": "^1.0.0",
724 "is-data-descriptor": "^1.0.0",
725 "kind-of": "^6.0.2"
726 }
727 }
728 }
729 },
730 "del": {
731 "version": "3.0.0",
732 "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
733 "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
734 "dev": true,
735 "requires": {
736 "globby": "^6.1.0",
737 "is-path-cwd": "^1.0.0",
738 "is-path-in-cwd": "^1.0.0",
739 "p-map": "^1.1.1",
740 "pify": "^3.0.0",
741 "rimraf": "^2.2.8"
742 },
743 "dependencies": {
744 "pify": {
745 "version": "3.0.0",
746 "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
747 "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
748 "dev": true
749 }
750 }
751 },
752 "detect-file": {
753 "version": "1.0.0",
754 "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
755 "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
756 "dev": true
757 },
758 "diff": {
759 "version": "3.5.0",
760 "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
761 "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
762 "dev": true
763 },
764 "doctrine": {
765 "version": "3.0.0",
766 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
767 "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
768 "dev": true,
769 "requires": {
770 "esutils": "^2.0.2"
771 }
772 },
773 "elegant-spinner": {
774 "version": "1.0.1",
775 "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz",
776 "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=",
777 "dev": true
778 },
779 "emoji-regex": {
780 "version": "7.0.3",
781 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
782 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
783 "dev": true
784 },
785 "end-of-stream": {
786 "version": "1.4.1",
787 "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
788 "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
789 "dev": true,
790 "requires": {
791 "once": "^1.4.0"
792 }
793 },
794 "error-ex": {
795 "version": "1.3.2",
796 "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
797 "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
798 "dev": true,
799 "requires": {
800 "is-arrayish": "^0.2.1"
801 }
802 },
803 "es-abstract": {
804 "version": "1.13.0",
805 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
806 "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
807 "dev": true,
808 "requires": {
809 "es-to-primitive": "^1.2.0",
810 "function-bind": "^1.1.1",
811 "has": "^1.0.3",
812 "is-callable": "^1.1.4",
813 "is-regex": "^1.0.4",
814 "object-keys": "^1.0.12"
815 }
816 },
817 "es-to-primitive": {
818 "version": "1.2.0",
819 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
820 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
821 "dev": true,
822 "requires": {
823 "is-callable": "^1.1.4",
824 "is-date-object": "^1.0.1",
825 "is-symbol": "^1.0.2"
826 }
827 },
828 "es6-object-assign": {
829 "version": "1.1.0",
830 "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
831 "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=",
832 "dev": true
833 },
834 "escape-string-regexp": {
835 "version": "1.0.5",
836 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
837 "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
838 "dev": true
839 },
840 "eslint": {
841 "version": "5.16.0",
842 "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
843 "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
844 "dev": true,
845 "requires": {
846 "@babel/code-frame": "^7.0.0",
847 "ajv": "^6.9.1",
848 "chalk": "^2.1.0",
849 "cross-spawn": "^6.0.5",
850 "debug": "^4.0.1",
851 "doctrine": "^3.0.0",
852 "eslint-scope": "^4.0.3",
853 "eslint-utils": "^1.3.1",
854 "eslint-visitor-keys": "^1.0.0",
855 "espree": "^5.0.1",
856 "esquery": "^1.0.1",
857 "esutils": "^2.0.2",
858 "file-entry-cache": "^5.0.1",
859 "functional-red-black-tree": "^1.0.1",
860 "glob": "^7.1.2",
861 "globals": "^11.7.0",
862 "ignore": "^4.0.6",
863 "import-fresh": "^3.0.0",
864 "imurmurhash": "^0.1.4",
865 "inquirer": "^6.2.2",
866 "js-yaml": "^3.13.0",
867 "json-stable-stringify-without-jsonify": "^1.0.1",
868 "levn": "^0.3.0",
869 "lodash": "^4.17.11",
870 "minimatch": "^3.0.4",
871 "mkdirp": "^0.5.1",
872 "natural-compare": "^1.4.0",
873 "optionator": "^0.8.2",
874 "path-is-inside": "^1.0.2",
875 "progress": "^2.0.0",
876 "regexpp": "^2.0.1",
877 "semver": "^5.5.1",
878 "strip-ansi": "^4.0.0",
879 "strip-json-comments": "^2.0.1",
880 "table": "^5.2.3",
881 "text-table": "^0.2.0"
882 }
883 },
884 "eslint-import-resolver-node": {
885 "version": "0.3.2",
886 "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
887 "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==",
888 "dev": true,
889 "requires": {
890 "debug": "^2.6.9",
891 "resolve": "^1.5.0"
892 },
893 "dependencies": {
894 "debug": {
895 "version": "2.6.9",
896 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
897 "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
898 "dev": true,
899 "requires": {
900 "ms": "2.0.0"
901 }
902 },
903 "ms": {
904 "version": "2.0.0",
905 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
906 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
907 "dev": true
908 }
909 }
910 },
911 "eslint-module-utils": {
912 "version": "2.3.0",
913 "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz",
914 "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==",
915 "dev": true,
916 "requires": {
917 "debug": "^2.6.8",
918 "pkg-dir": "^2.0.0"
919 },
920 "dependencies": {
921 "debug": {
922 "version": "2.6.9",
923 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
924 "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
925 "dev": true,
926 "requires": {
927 "ms": "2.0.0"
928 }
929 },
930 "ms": {
931 "version": "2.0.0",
932 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
933 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
934 "dev": true
935 }
936 }
937 },
938 "eslint-plugin-import": {
939 "version": "2.16.0",
940 "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz",
941 "integrity": "sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A==",
942 "dev": true,
943 "requires": {
944 "contains-path": "^0.1.0",
945 "debug": "^2.6.9",
946 "doctrine": "1.5.0",
947 "eslint-import-resolver-node": "^0.3.2",
948 "eslint-module-utils": "^2.3.0",
949 "has": "^1.0.3",
950 "lodash": "^4.17.11",
951 "minimatch": "^3.0.4",
952 "read-pkg-up": "^2.0.0",
953 "resolve": "^1.9.0"
954 },
955 "dependencies": {
956 "debug": {
957 "version": "2.6.9",
958 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
959 "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
960 "dev": true,
961 "requires": {
962 "ms": "2.0.0"
963 }
964 },
965 "doctrine": {
966 "version": "1.5.0",
967 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
968 "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
969 "dev": true,
970 "requires": {
971 "esutils": "^2.0.2",
972 "isarray": "^1.0.0"
973 }
974 },
975 "ms": {
976 "version": "2.0.0",
977 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
978 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
979 "dev": true
980 }
981 }
982 },
983 "eslint-scope": {
984 "version": "4.0.3",
985 "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
986 "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
987 "dev": true,
988 "requires": {
989 "esrecurse": "^4.1.0",
990 "estraverse": "^4.1.1"
991 }
992 },
993 "eslint-utils": {
994 "version": "1.3.1",
995 "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
996 "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
997 "dev": true
998 },
999 "eslint-visitor-keys": {
1000 "version": "1.0.0",
1001 "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
1002 "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
1003 "dev": true
1004 },
1005 "espree": {
1006 "version": "5.0.1",
1007 "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz",
1008 "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==",
1009 "dev": true,
1010 "requires": {
1011 "acorn": "^6.0.7",
1012 "acorn-jsx": "^5.0.0",
1013 "eslint-visitor-keys": "^1.0.0"
1014 }
1015 },
1016 "esprima": {
1017 "version": "4.0.1",
1018 "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
1019 "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
1020 "dev": true
1021 },
1022 "esquery": {
1023 "version": "1.0.1",
1024 "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
1025 "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
1026 "dev": true,
1027 "requires": {
1028 "estraverse": "^4.0.0"
1029 }
1030 },
1031 "esrecurse": {
1032 "version": "4.2.1",
1033 "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
1034 "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
1035 "dev": true,
1036 "requires": {
1037 "estraverse": "^4.1.0"
1038 }
1039 },
1040 "estraverse": {
1041 "version": "4.2.0",
1042 "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
1043 "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
1044 "dev": true
1045 },
1046 "estree-walker": {
1047 "version": "0.6.0",
1048 "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz",
1049 "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw=="
1050 },
1051 "esutils": {
1052 "version": "2.0.2",
1053 "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
1054 "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
1055 "dev": true
1056 },
1057 "execa": {
1058 "version": "1.0.0",
1059 "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
1060 "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
1061 "dev": true,
1062 "requires": {
1063 "cross-spawn": "^6.0.0",
1064 "get-stream": "^4.0.0",
1065 "is-stream": "^1.1.0",
1066 "npm-run-path": "^2.0.0",
1067 "p-finally": "^1.0.0",
1068 "signal-exit": "^3.0.0",
1069 "strip-eof": "^1.0.0"
1070 }
1071 },
1072 "expand-brackets": {
1073 "version": "2.1.4",
1074 "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
1075 "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
1076 "requires": {
1077 "debug": "^2.3.3",
1078 "define-property": "^0.2.5",
1079 "extend-shallow": "^2.0.1",
1080 "posix-character-classes": "^0.1.0",
1081 "regex-not": "^1.0.0",
1082 "snapdragon": "^0.8.1",
1083 "to-regex": "^3.0.1"
1084 },
1085 "dependencies": {
1086 "debug": {
1087 "version": "2.6.9",
1088 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1089 "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1090 "requires": {
1091 "ms": "2.0.0"
1092 }
1093 },
1094 "define-property": {
1095 "version": "0.2.5",
1096 "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1097 "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
1098 "requires": {
1099 "is-descriptor": "^0.1.0"
1100 }
1101 },
1102 "extend-shallow": {
1103 "version": "2.0.1",
1104 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1105 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1106 "requires": {
1107 "is-extendable": "^0.1.0"
1108 }
1109 },
1110 "ms": {
1111 "version": "2.0.0",
1112 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1113 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1114 }
1115 }
1116 },
1117 "expand-tilde": {
1118 "version": "2.0.2",
1119 "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
1120 "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
1121 "dev": true,
1122 "requires": {
1123 "homedir-polyfill": "^1.0.1"
1124 }
1125 },
1126 "extend-shallow": {
1127 "version": "3.0.2",
1128 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
1129 "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
1130 "requires": {
1131 "assign-symbols": "^1.0.0",
1132 "is-extendable": "^1.0.1"
1133 },
1134 "dependencies": {
1135 "is-extendable": {
1136 "version": "1.0.1",
1137 "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
1138 "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
1139 "requires": {
1140 "is-plain-object": "^2.0.4"
1141 }
1142 }
1143 }
1144 },
1145 "external-editor": {
1146 "version": "3.0.3",
1147 "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz",
1148 "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==",
1149 "dev": true,
1150 "requires": {
1151 "chardet": "^0.7.0",
1152 "iconv-lite": "^0.4.24",
1153 "tmp": "^0.0.33"
1154 }
1155 },
1156 "extglob": {
1157 "version": "2.0.4",
1158 "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
1159 "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
1160 "requires": {
1161 "array-unique": "^0.3.2",
1162 "define-property": "^1.0.0",
1163 "expand-brackets": "^2.1.4",
1164 "extend-shallow": "^2.0.1",
1165 "fragment-cache": "^0.2.1",
1166 "regex-not": "^1.0.0",
1167 "snapdragon": "^0.8.1",
1168 "to-regex": "^3.0.1"
1169 },
1170 "dependencies": {
1171 "define-property": {
1172 "version": "1.0.0",
1173 "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
1174 "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
1175 "requires": {
1176 "is-descriptor": "^1.0.0"
1177 }
1178 },
1179 "extend-shallow": {
1180 "version": "2.0.1",
1181 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1182 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1183 "requires": {
1184 "is-extendable": "^0.1.0"
1185 }
1186 },
1187 "is-accessor-descriptor": {
1188 "version": "1.0.0",
1189 "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
1190 "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
1191 "requires": {
1192 "kind-of": "^6.0.0"
1193 }
1194 },
1195 "is-data-descriptor": {
1196 "version": "1.0.0",
1197 "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
1198 "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
1199 "requires": {
1200 "kind-of": "^6.0.0"
1201 }
1202 },
1203 "is-descriptor": {
1204 "version": "1.0.2",
1205 "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
1206 "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
1207 "requires": {
1208 "is-accessor-descriptor": "^1.0.0",
1209 "is-data-descriptor": "^1.0.0",
1210 "kind-of": "^6.0.2"
1211 }
1212 }
1213 }
1214 },
1215 "fast-deep-equal": {
1216 "version": "2.0.1",
1217 "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
1218 "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
1219 "dev": true
1220 },
1221 "fast-json-stable-stringify": {
1222 "version": "2.0.0",
1223 "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
1224 "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
1225 "dev": true
1226 },
1227 "fast-levenshtein": {
1228 "version": "2.0.6",
1229 "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
1230 "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
1231 "dev": true
1232 },
1233 "figures": {
1234 "version": "2.0.0",
1235 "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
1236 "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
1237 "dev": true,
1238 "requires": {
1239 "escape-string-regexp": "^1.0.5"
1240 }
1241 },
1242 "file-entry-cache": {
1243 "version": "5.0.1",
1244 "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
1245 "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
1246 "dev": true,
1247 "requires": {
1248 "flat-cache": "^2.0.1"
1249 }
1250 },
1251 "fill-range": {
1252 "version": "4.0.0",
1253 "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
1254 "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
1255 "requires": {
1256 "extend-shallow": "^2.0.1",
1257 "is-number": "^3.0.0",
1258 "repeat-string": "^1.6.1",
1259 "to-regex-range": "^2.1.0"
1260 },
1261 "dependencies": {
1262 "extend-shallow": {
1263 "version": "2.0.1",
1264 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1265 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1266 "requires": {
1267 "is-extendable": "^0.1.0"
1268 }
1269 }
1270 }
1271 },
1272 "find-parent-dir": {
1273 "version": "0.3.0",
1274 "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz",
1275 "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=",
1276 "dev": true
1277 },
1278 "find-up": {
1279 "version": "2.1.0",
1280 "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
1281 "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
1282 "dev": true,
1283 "requires": {
1284 "locate-path": "^2.0.0"
1285 }
1286 },
1287 "findup-sync": {
1288 "version": "2.0.0",
1289 "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
1290 "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
1291 "dev": true,
1292 "requires": {
1293 "detect-file": "^1.0.0",
1294 "is-glob": "^3.1.0",
1295 "micromatch": "^3.0.4",
1296 "resolve-dir": "^1.0.1"
1297 },
1298 "dependencies": {
1299 "is-glob": {
1300 "version": "3.1.0",
1301 "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
1302 "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
1303 "dev": true,
1304 "requires": {
1305 "is-extglob": "^2.1.0"
1306 }
1307 }
1308 }
1309 },
1310 "flat": {
1311 "version": "4.1.0",
1312 "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
1313 "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
1314 "dev": true,
1315 "requires": {
1316 "is-buffer": "~2.0.3"
1317 },
1318 "dependencies": {
1319 "is-buffer": {
1320 "version": "2.0.3",
1321 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
1322 "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
1323 "dev": true
1324 }
1325 }
1326 },
1327 "flat-cache": {
1328 "version": "2.0.1",
1329 "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
1330 "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
1331 "dev": true,
1332 "requires": {
1333 "flatted": "^2.0.0",
1334 "rimraf": "2.6.3",
1335 "write": "1.0.3"
1336 }
1337 },
1338 "flatted": {
1339 "version": "2.0.0",
1340 "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz",
1341 "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==",
1342 "dev": true
1343 },
1344 "fn-name": {
1345 "version": "2.0.1",
1346 "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz",
1347 "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=",
1348 "dev": true
1349 },
1350 "for-in": {
1351 "version": "1.0.2",
1352 "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
1353 "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
1354 },
1355 "fragment-cache": {
1356 "version": "0.2.1",
1357 "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
1358 "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
1359 "requires": {
1360 "map-cache": "^0.2.2"
1361 }
1362 },
1363 "fs.realpath": {
1364 "version": "1.0.0",
1365 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1366 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
1367 "dev": true
1368 },
1369 "function-bind": {
1370 "version": "1.1.1",
1371 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1372 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1373 "dev": true
1374 },
1375 "functional-red-black-tree": {
1376 "version": "1.0.1",
1377 "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
1378 "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
1379 "dev": true
1380 },
1381 "g-status": {
1382 "version": "2.0.2",
1383 "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz",
1384 "integrity": "sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==",
1385 "dev": true,
1386 "requires": {
1387 "arrify": "^1.0.1",
1388 "matcher": "^1.0.0",
1389 "simple-git": "^1.85.0"
1390 }
1391 },
1392 "get-caller-file": {
1393 "version": "1.0.3",
1394 "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
1395 "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
1396 "dev": true
1397 },
1398 "get-own-enumerable-property-symbols": {
1399 "version": "3.0.0",
1400 "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz",
1401 "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==",
1402 "dev": true
1403 },
1404 "get-stdin": {
1405 "version": "6.0.0",
1406 "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
1407 "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
1408 "dev": true
1409 },
1410 "get-stream": {
1411 "version": "4.1.0",
1412 "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
1413 "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
1414 "dev": true,
1415 "requires": {
1416 "pump": "^3.0.0"
1417 }
1418 },
1419 "get-value": {
1420 "version": "2.0.6",
1421 "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
1422 "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
1423 },
1424 "glob": {
1425 "version": "7.1.3",
1426 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1427 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1428 "dev": true,
1429 "requires": {
1430 "fs.realpath": "^1.0.0",
1431 "inflight": "^1.0.4",
1432 "inherits": "2",
1433 "minimatch": "^3.0.4",
1434 "once": "^1.3.0",
1435 "path-is-absolute": "^1.0.0"
1436 }
1437 },
1438 "global-modules": {
1439 "version": "1.0.0",
1440 "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
1441 "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
1442 "dev": true,
1443 "requires": {
1444 "global-prefix": "^1.0.1",
1445 "is-windows": "^1.0.1",
1446 "resolve-dir": "^1.0.0"
1447 }
1448 },
1449 "global-prefix": {
1450 "version": "1.0.2",
1451 "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
1452 "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
1453 "dev": true,
1454 "requires": {
1455 "expand-tilde": "^2.0.2",
1456 "homedir-polyfill": "^1.0.1",
1457 "ini": "^1.3.4",
1458 "is-windows": "^1.0.1",
1459 "which": "^1.2.14"
1460 }
1461 },
1462 "globals": {
1463 "version": "11.11.0",
1464 "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz",
1465 "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==",
1466 "dev": true
1467 },
1468 "globby": {
1469 "version": "6.1.0",
1470 "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
1471 "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
1472 "dev": true,
1473 "requires": {
1474 "array-union": "^1.0.1",
1475 "glob": "^7.0.3",
1476 "object-assign": "^4.0.1",
1477 "pify": "^2.0.0",
1478 "pinkie-promise": "^2.0.0"
1479 }
1480 },
1481 "graceful-fs": {
1482 "version": "4.1.15",
1483 "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
1484 "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
1485 "dev": true
1486 },
1487 "growl": {
1488 "version": "1.10.5",
1489 "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
1490 "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
1491 "dev": true
1492 },
1493 "has": {
1494 "version": "1.0.3",
1495 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1496 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1497 "dev": true,
1498 "requires": {
1499 "function-bind": "^1.1.1"
1500 }
1501 },
1502 "has-ansi": {
1503 "version": "2.0.0",
1504 "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
1505 "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
1506 "dev": true,
1507 "requires": {
1508 "ansi-regex": "^2.0.0"
1509 },
1510 "dependencies": {
1511 "ansi-regex": {
1512 "version": "2.1.1",
1513 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
1514 "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
1515 "dev": true
1516 }
1517 }
1518 },
1519 "has-flag": {
1520 "version": "3.0.0",
1521 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1522 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
1523 "dev": true
1524 },
1525 "has-symbols": {
1526 "version": "1.0.0",
1527 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
1528 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
1529 "dev": true
1530 },
1531 "has-value": {
1532 "version": "1.0.0",
1533 "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
1534 "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
1535 "requires": {
1536 "get-value": "^2.0.6",
1537 "has-values": "^1.0.0",
1538 "isobject": "^3.0.0"
1539 }
1540 },
1541 "has-values": {
1542 "version": "1.0.0",
1543 "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
1544 "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
1545 "requires": {
1546 "is-number": "^3.0.0",
1547 "kind-of": "^4.0.0"
1548 },
1549 "dependencies": {
1550 "kind-of": {
1551 "version": "4.0.0",
1552 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
1553 "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
1554 "requires": {
1555 "is-buffer": "^1.1.5"
1556 }
1557 }
1558 }
1559 },
1560 "he": {
1561 "version": "1.2.0",
1562 "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1563 "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
1564 "dev": true
1565 },
1566 "homedir-polyfill": {
1567 "version": "1.0.3",
1568 "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
1569 "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
1570 "dev": true,
1571 "requires": {
1572 "parse-passwd": "^1.0.0"
1573 }
1574 },
1575 "hosted-git-info": {
1576 "version": "2.7.1",
1577 "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
1578 "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
1579 "dev": true
1580 },
1581 "husky": {
1582 "version": "1.3.1",
1583 "resolved": "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz",
1584 "integrity": "sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==",
1585 "dev": true,
1586 "requires": {
1587 "cosmiconfig": "^5.0.7",
1588 "execa": "^1.0.0",
1589 "find-up": "^3.0.0",
1590 "get-stdin": "^6.0.0",
1591 "is-ci": "^2.0.0",
1592 "pkg-dir": "^3.0.0",
1593 "please-upgrade-node": "^3.1.1",
1594 "read-pkg": "^4.0.1",
1595 "run-node": "^1.0.0",
1596 "slash": "^2.0.0"
1597 },
1598 "dependencies": {
1599 "find-up": {
1600 "version": "3.0.0",
1601 "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
1602 "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
1603 "dev": true,
1604 "requires": {
1605 "locate-path": "^3.0.0"
1606 }
1607 },
1608 "import-fresh": {
1609 "version": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
1610 "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
1611 "requires": {
1612 "caller-path": "^2.0.0",
1613 "resolve-from": "^3.0.0"
1614 }
1615 },
1616 "locate-path": {
1617 "version": "3.0.0",
1618 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
1619 "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
1620 "dev": true,
1621 "requires": {
1622 "p-locate": "^3.0.0",
1623 "path-exists": "^3.0.0"
1624 }
1625 },
1626 "p-limit": {
1627 "version": "2.1.0",
1628 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
1629 "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
1630 "dev": true,
1631 "requires": {
1632 "p-try": "^2.0.0"
1633 }
1634 },
1635 "p-locate": {
1636 "version": "3.0.0",
1637 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
1638 "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
1639 "dev": true,
1640 "requires": {
1641 "p-limit": "^2.0.0"
1642 }
1643 },
1644 "p-try": {
1645 "version": "2.0.0",
1646 "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
1647 "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
1648 "dev": true
1649 },
1650 "parse-json": {
1651 "version": "4.0.0",
1652 "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
1653 "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
1654 "dev": true,
1655 "requires": {
1656 "error-ex": "^1.3.1",
1657 "json-parse-better-errors": "^1.0.1"
1658 }
1659 },
1660 "pify": {
1661 "version": "3.0.0",
1662 "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
1663 "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
1664 "dev": true
1665 },
1666 "pkg-dir": {
1667 "version": "3.0.0",
1668 "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
1669 "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
1670 "dev": true,
1671 "requires": {
1672 "find-up": "^3.0.0"
1673 }
1674 },
1675 "read-pkg": {
1676 "version": "4.0.1",
1677 "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz",
1678 "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=",
1679 "dev": true,
1680 "requires": {
1681 "normalize-package-data": "^2.3.2",
1682 "parse-json": "^4.0.0",
1683 "pify": "^3.0.0"
1684 }
1685 },
1686 "resolve-from": {
1687 "version": "3.0.0",
1688 "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
1689 "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
1690 }
1691 }
1692 },
1693 "iconv-lite": {
1694 "version": "0.4.24",
1695 "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
1696 "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
1697 "dev": true,
1698 "requires": {
1699 "safer-buffer": ">= 2.1.2 < 3"
1700 }
1701 },
1702 "ignore": {
1703 "version": "4.0.6",
1704 "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
1705 "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
1706 "dev": true
1707 },
1708 "import-fresh": {
1709 "version": "3.0.0",
1710 "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz",
1711 "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==",
1712 "dev": true,
1713 "requires": {
1714 "parent-module": "^1.0.0",
1715 "resolve-from": "^4.0.0"
1716 }
1717 },
1718 "imurmurhash": {
1719 "version": "0.1.4",
1720 "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
1721 "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
1722 "dev": true
1723 },
1724 "indent-string": {
1725 "version": "3.2.0",
1726 "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
1727 "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
1728 "dev": true
1729 },
1730 "inflight": {
1731 "version": "1.0.6",
1732 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1733 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
1734 "dev": true,
1735 "requires": {
1736 "once": "^1.3.0",
1737 "wrappy": "1"
1738 }
1739 },
1740 "inherits": {
1741 "version": "2.0.3",
1742 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
1743 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
1744 "dev": true
1745 },
1746 "ini": {
1747 "version": "1.3.5",
1748 "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
1749 "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
1750 "dev": true
1751 },
1752 "inquirer": {
1753 "version": "6.2.2",
1754 "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz",
1755 "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==",
1756 "dev": true,
1757 "requires": {
1758 "ansi-escapes": "^3.2.0",
1759 "chalk": "^2.4.2",
1760 "cli-cursor": "^2.1.0",
1761 "cli-width": "^2.0.0",
1762 "external-editor": "^3.0.3",
1763 "figures": "^2.0.0",
1764 "lodash": "^4.17.11",
1765 "mute-stream": "0.0.7",
1766 "run-async": "^2.2.0",
1767 "rxjs": "^6.4.0",
1768 "string-width": "^2.1.0",
1769 "strip-ansi": "^5.0.0",
1770 "through": "^2.3.6"
1771 },
1772 "dependencies": {
1773 "ansi-regex": {
1774 "version": "4.1.0",
1775 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1776 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1777 "dev": true
1778 },
1779 "chalk": {
1780 "version": "2.4.2",
1781 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1782 "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
1783 "dev": true,
1784 "requires": {
1785 "ansi-styles": "^3.2.1",
1786 "escape-string-regexp": "^1.0.5",
1787 "supports-color": "^5.3.0"
1788 }
1789 },
1790 "strip-ansi": {
1791 "version": "5.2.0",
1792 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1793 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1794 "dev": true,
1795 "requires": {
1796 "ansi-regex": "^4.1.0"
1797 }
1798 }
1799 }
1800 },
1801 "interpret": {
1802 "version": "1.1.0",
1803 "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
1804 "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
1805 "dev": true
1806 },
1807 "invert-kv": {
1808 "version": "2.0.0",
1809 "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
1810 "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
1811 "dev": true
1812 },
1813 "is-accessor-descriptor": {
1814 "version": "0.1.6",
1815 "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
1816 "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
1817 "requires": {
1818 "kind-of": "^3.0.2"
1819 },
1820 "dependencies": {
1821 "kind-of": {
1822 "version": "3.2.2",
1823 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1824 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1825 "requires": {
1826 "is-buffer": "^1.1.5"
1827 }
1828 }
1829 }
1830 },
1831 "is-arrayish": {
1832 "version": "0.2.1",
1833 "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
1834 "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
1835 "dev": true
1836 },
1837 "is-buffer": {
1838 "version": "1.1.6",
1839 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
1840 "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
1841 },
1842 "is-builtin-module": {
1843 "version": "1.0.0",
1844 "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
1845 "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
1846 "dev": true,
1847 "requires": {
1848 "builtin-modules": "^1.0.0"
1849 }
1850 },
1851 "is-callable": {
1852 "version": "1.1.4",
1853 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
1854 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
1855 "dev": true
1856 },
1857 "is-ci": {
1858 "version": "2.0.0",
1859 "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
1860 "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
1861 "dev": true,
1862 "requires": {
1863 "ci-info": "^2.0.0"
1864 }
1865 },
1866 "is-data-descriptor": {
1867 "version": "0.1.4",
1868 "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
1869 "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
1870 "requires": {
1871 "kind-of": "^3.0.2"
1872 },
1873 "dependencies": {
1874 "kind-of": {
1875 "version": "3.2.2",
1876 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1877 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1878 "requires": {
1879 "is-buffer": "^1.1.5"
1880 }
1881 }
1882 }
1883 },
1884 "is-date-object": {
1885 "version": "1.0.1",
1886 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
1887 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
1888 "dev": true
1889 },
1890 "is-descriptor": {
1891 "version": "0.1.6",
1892 "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
1893 "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
1894 "requires": {
1895 "is-accessor-descriptor": "^0.1.6",
1896 "is-data-descriptor": "^0.1.4",
1897 "kind-of": "^5.0.0"
1898 },
1899 "dependencies": {
1900 "kind-of": {
1901 "version": "5.1.0",
1902 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
1903 "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
1904 }
1905 }
1906 },
1907 "is-directory": {
1908 "version": "0.3.1",
1909 "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
1910 "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
1911 "dev": true
1912 },
1913 "is-extendable": {
1914 "version": "0.1.1",
1915 "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
1916 "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
1917 },
1918 "is-extglob": {
1919 "version": "2.1.1",
1920 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1921 "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
1922 "dev": true
1923 },
1924 "is-fullwidth-code-point": {
1925 "version": "2.0.0",
1926 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
1927 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
1928 "dev": true
1929 },
1930 "is-glob": {
1931 "version": "4.0.0",
1932 "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
1933 "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
1934 "dev": true,
1935 "requires": {
1936 "is-extglob": "^2.1.1"
1937 }
1938 },
1939 "is-module": {
1940 "version": "1.0.0",
1941 "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
1942 "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
1943 "dev": true
1944 },
1945 "is-number": {
1946 "version": "3.0.0",
1947 "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
1948 "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
1949 "requires": {
1950 "kind-of": "^3.0.2"
1951 },
1952 "dependencies": {
1953 "kind-of": {
1954 "version": "3.2.2",
1955 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1956 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1957 "requires": {
1958 "is-buffer": "^1.1.5"
1959 }
1960 }
1961 }
1962 },
1963 "is-obj": {
1964 "version": "1.0.1",
1965 "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
1966 "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
1967 "dev": true
1968 },
1969 "is-observable": {
1970 "version": "1.1.0",
1971 "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz",
1972 "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==",
1973 "dev": true,
1974 "requires": {
1975 "symbol-observable": "^1.1.0"
1976 }
1977 },
1978 "is-path-cwd": {
1979 "version": "1.0.0",
1980 "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
1981 "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
1982 "dev": true
1983 },
1984 "is-path-in-cwd": {
1985 "version": "1.0.1",
1986 "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz",
1987 "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==",
1988 "dev": true,
1989 "requires": {
1990 "is-path-inside": "^1.0.0"
1991 }
1992 },
1993 "is-path-inside": {
1994 "version": "1.0.1",
1995 "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
1996 "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
1997 "dev": true,
1998 "requires": {
1999 "path-is-inside": "^1.0.1"
2000 }
2001 },
2002 "is-plain-object": {
2003 "version": "2.0.4",
2004 "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2005 "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2006 "requires": {
2007 "isobject": "^3.0.1"
2008 }
2009 },
2010 "is-promise": {
2011 "version": "2.1.0",
2012 "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
2013 "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
2014 "dev": true
2015 },
2016 "is-regex": {
2017 "version": "1.0.4",
2018 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
2019 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
2020 "dev": true,
2021 "requires": {
2022 "has": "^1.0.1"
2023 }
2024 },
2025 "is-regexp": {
2026 "version": "1.0.0",
2027 "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
2028 "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
2029 "dev": true
2030 },
2031 "is-stream": {
2032 "version": "1.1.0",
2033 "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
2034 "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
2035 "dev": true
2036 },
2037 "is-symbol": {
2038 "version": "1.0.2",
2039 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
2040 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
2041 "dev": true,
2042 "requires": {
2043 "has-symbols": "^1.0.0"
2044 }
2045 },
2046 "is-windows": {
2047 "version": "1.0.2",
2048 "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
2049 "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
2050 },
2051 "isarray": {
2052 "version": "1.0.0",
2053 "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
2054 "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
2055 },
2056 "isexe": {
2057 "version": "2.0.0",
2058 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
2059 "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
2060 "dev": true
2061 },
2062 "isobject": {
2063 "version": "3.0.1",
2064 "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
2065 "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
2066 },
2067 "js-tokens": {
2068 "version": "4.0.0",
2069 "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
2070 "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
2071 "dev": true
2072 },
2073 "js-yaml": {
2074 "version": "3.13.0",
2075 "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
2076 "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
2077 "dev": true,
2078 "requires": {
2079 "argparse": "^1.0.7",
2080 "esprima": "^4.0.0"
2081 }
2082 },
2083 "jsesc": {
2084 "version": "0.5.0",
2085 "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
2086 "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
2087 "dev": true
2088 },
2089 "json-parse-better-errors": {
2090 "version": "1.0.2",
2091 "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
2092 "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
2093 "dev": true
2094 },
2095 "json-schema-traverse": {
2096 "version": "0.4.1",
2097 "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
2098 "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
2099 "dev": true
2100 },
2101 "json-stable-stringify-without-jsonify": {
2102 "version": "1.0.1",
2103 "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
2104 "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
2105 "dev": true
2106 },
2107 "kind-of": {
2108 "version": "6.0.2",
2109 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
2110 "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
2111 },
2112 "lcid": {
2113 "version": "2.0.0",
2114 "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
2115 "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
2116 "dev": true,
2117 "requires": {
2118 "invert-kv": "^2.0.0"
2119 }
2120 },
2121 "levn": {
2122 "version": "0.3.0",
2123 "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
2124 "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
2125 "dev": true,
2126 "requires": {
2127 "prelude-ls": "~1.1.2",
2128 "type-check": "~0.3.2"
2129 }
2130 },
2131 "lint-staged": {
2132 "version": "8.1.5",
2133 "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.5.tgz",
2134 "integrity": "sha512-e5ZavfnSLcBJE1BTzRTqw6ly8OkqVyO3GL2M6teSmTBYQ/2BuueD5GIt2RPsP31u/vjKdexUyDCxSyK75q4BDA==",
2135 "dev": true,
2136 "requires": {
2137 "chalk": "^2.3.1",
2138 "commander": "^2.14.1",
2139 "cosmiconfig": "^5.0.2",
2140 "debug": "^3.1.0",
2141 "dedent": "^0.7.0",
2142 "del": "^3.0.0",
2143 "execa": "^1.0.0",
2144 "find-parent-dir": "^0.3.0",
2145 "g-status": "^2.0.2",
2146 "is-glob": "^4.0.0",
2147 "is-windows": "^1.0.2",
2148 "listr": "^0.14.2",
2149 "listr-update-renderer": "^0.5.0",
2150 "lodash": "^4.17.11",
2151 "log-symbols": "^2.2.0",
2152 "micromatch": "^3.1.8",
2153 "npm-which": "^3.0.1",
2154 "p-map": "^1.1.1",
2155 "path-is-inside": "^1.0.2",
2156 "pify": "^3.0.0",
2157 "please-upgrade-node": "^3.0.2",
2158 "staged-git-files": "1.1.2",
2159 "string-argv": "^0.0.2",
2160 "stringify-object": "^3.2.2",
2161 "yup": "^0.26.10"
2162 },
2163 "dependencies": {
2164 "debug": {
2165 "version": "3.2.6",
2166 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
2167 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
2168 "dev": true,
2169 "requires": {
2170 "ms": "^2.1.1"
2171 }
2172 },
2173 "pify": {
2174 "version": "3.0.0",
2175 "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
2176 "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
2177 "dev": true
2178 }
2179 }
2180 },
2181 "listr": {
2182 "version": "0.14.3",
2183 "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz",
2184 "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==",
2185 "dev": true,
2186 "requires": {
2187 "@samverschueren/stream-to-observable": "^0.3.0",
2188 "is-observable": "^1.1.0",
2189 "is-promise": "^2.1.0",
2190 "is-stream": "^1.1.0",
2191 "listr-silent-renderer": "^1.1.1",
2192 "listr-update-renderer": "^0.5.0",
2193 "listr-verbose-renderer": "^0.5.0",
2194 "p-map": "^2.0.0",
2195 "rxjs": "^6.3.3"
2196 },
2197 "dependencies": {
2198 "p-map": {
2199 "version": "2.0.0",
2200 "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz",
2201 "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==",
2202 "dev": true
2203 }
2204 }
2205 },
2206 "listr-silent-renderer": {
2207 "version": "1.1.1",
2208 "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz",
2209 "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=",
2210 "dev": true
2211 },
2212 "listr-update-renderer": {
2213 "version": "0.5.0",
2214 "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz",
2215 "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==",
2216 "dev": true,
2217 "requires": {
2218 "chalk": "^1.1.3",
2219 "cli-truncate": "^0.2.1",
2220 "elegant-spinner": "^1.0.1",
2221 "figures": "^1.7.0",
2222 "indent-string": "^3.0.0",
2223 "log-symbols": "^1.0.2",
2224 "log-update": "^2.3.0",
2225 "strip-ansi": "^3.0.1"
2226 },
2227 "dependencies": {
2228 "ansi-regex": {
2229 "version": "2.1.1",
2230 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
2231 "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
2232 "dev": true
2233 },
2234 "ansi-styles": {
2235 "version": "2.2.1",
2236 "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
2237 "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
2238 "dev": true
2239 },
2240 "chalk": {
2241 "version": "1.1.3",
2242 "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
2243 "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
2244 "dev": true,
2245 "requires": {
2246 "ansi-styles": "^2.2.1",
2247 "escape-string-regexp": "^1.0.2",
2248 "has-ansi": "^2.0.0",
2249 "strip-ansi": "^3.0.0",
2250 "supports-color": "^2.0.0"
2251 }
2252 },
2253 "figures": {
2254 "version": "1.7.0",
2255 "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
2256 "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
2257 "dev": true,
2258 "requires": {
2259 "escape-string-regexp": "^1.0.5",
2260 "object-assign": "^4.1.0"
2261 }
2262 },
2263 "log-symbols": {
2264 "version": "1.0.2",
2265 "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz",
2266 "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=",
2267 "dev": true,
2268 "requires": {
2269 "chalk": "^1.0.0"
2270 }
2271 },
2272 "strip-ansi": {
2273 "version": "3.0.1",
2274 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
2275 "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
2276 "dev": true,
2277 "requires": {
2278 "ansi-regex": "^2.0.0"
2279 }
2280 },
2281 "supports-color": {
2282 "version": "2.0.0",
2283 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
2284 "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
2285 "dev": true
2286 }
2287 }
2288 },
2289 "listr-verbose-renderer": {
2290 "version": "0.5.0",
2291 "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz",
2292 "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==",
2293 "dev": true,
2294 "requires": {
2295 "chalk": "^2.4.1",
2296 "cli-cursor": "^2.1.0",
2297 "date-fns": "^1.27.2",
2298 "figures": "^2.0.0"
2299 }
2300 },
2301 "load-json-file": {
2302 "version": "2.0.0",
2303 "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
2304 "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
2305 "dev": true,
2306 "requires": {
2307 "graceful-fs": "^4.1.2",
2308 "parse-json": "^2.2.0",
2309 "pify": "^2.0.0",
2310 "strip-bom": "^3.0.0"
2311 }
2312 },
2313 "locate-character": {
2314 "version": "2.0.5",
2315 "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-2.0.5.tgz",
2316 "integrity": "sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==",
2317 "dev": true
2318 },
2319 "locate-path": {
2320 "version": "2.0.0",
2321 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
2322 "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
2323 "dev": true,
2324 "requires": {
2325 "p-locate": "^2.0.0",
2326 "path-exists": "^3.0.0"
2327 }
2328 },
2329 "lodash": {
2330 "version": "4.17.11",
2331 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
2332 "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
2333 "dev": true
2334 },
2335 "log-symbols": {
2336 "version": "2.2.0",
2337 "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
2338 "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
2339 "dev": true,
2340 "requires": {
2341 "chalk": "^2.0.1"
2342 }
2343 },
2344 "log-update": {
2345 "version": "2.3.0",
2346 "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz",
2347 "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=",
2348 "dev": true,
2349 "requires": {
2350 "ansi-escapes": "^3.0.0",
2351 "cli-cursor": "^2.0.0",
2352 "wrap-ansi": "^3.0.1"
2353 }
2354 },
2355 "magic-string": {
2356 "version": "0.25.2",
2357 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz",
2358 "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==",
2359 "requires": {
2360 "sourcemap-codec": "^1.4.4"
2361 }
2362 },
2363 "map-age-cleaner": {
2364 "version": "0.1.3",
2365 "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
2366 "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
2367 "dev": true,
2368 "requires": {
2369 "p-defer": "^1.0.0"
2370 }
2371 },
2372 "map-cache": {
2373 "version": "0.2.2",
2374 "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
2375 "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
2376 },
2377 "map-visit": {
2378 "version": "1.0.0",
2379 "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
2380 "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
2381 "requires": {
2382 "object-visit": "^1.0.0"
2383 }
2384 },
2385 "matcher": {
2386 "version": "1.1.1",
2387 "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz",
2388 "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==",
2389 "dev": true,
2390 "requires": {
2391 "escape-string-regexp": "^1.0.4"
2392 }
2393 },
2394 "mem": {
2395 "version": "4.2.0",
2396 "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz",
2397 "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==",
2398 "dev": true,
2399 "requires": {
2400 "map-age-cleaner": "^0.1.1",
2401 "mimic-fn": "^2.0.0",
2402 "p-is-promise": "^2.0.0"
2403 },
2404 "dependencies": {
2405 "mimic-fn": {
2406 "version": "2.0.0",
2407 "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz",
2408 "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==",
2409 "dev": true
2410 }
2411 }
2412 },
2413 "micromatch": {
2414 "version": "3.1.10",
2415 "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
2416 "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
2417 "requires": {
2418 "arr-diff": "^4.0.0",
2419 "array-unique": "^0.3.2",
2420 "braces": "^2.3.1",
2421 "define-property": "^2.0.2",
2422 "extend-shallow": "^3.0.2",
2423 "extglob": "^2.0.4",
2424 "fragment-cache": "^0.2.1",
2425 "kind-of": "^6.0.2",
2426 "nanomatch": "^1.2.9",
2427 "object.pick": "^1.3.0",
2428 "regex-not": "^1.0.0",
2429 "snapdragon": "^0.8.1",
2430 "to-regex": "^3.0.2"
2431 }
2432 },
2433 "mimic-fn": {
2434 "version": "1.2.0",
2435 "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
2436 "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
2437 "dev": true
2438 },
2439 "minimatch": {
2440 "version": "3.0.4",
2441 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
2442 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
2443 "dev": true,
2444 "requires": {
2445 "brace-expansion": "^1.1.7"
2446 }
2447 },
2448 "minimist": {
2449 "version": "0.0.8",
2450 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
2451 "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
2452 "dev": true
2453 },
2454 "mixin-deep": {
2455 "version": "1.3.1",
2456 "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
2457 "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
2458 "requires": {
2459 "for-in": "^1.0.2",
2460 "is-extendable": "^1.0.1"
2461 },
2462 "dependencies": {
2463 "is-extendable": {
2464 "version": "1.0.1",
2465 "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2466 "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2467 "requires": {
2468 "is-plain-object": "^2.0.4"
2469 }
2470 }
2471 }
2472 },
2473 "mkdirp": {
2474 "version": "0.5.1",
2475 "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
2476 "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
2477 "dev": true,
2478 "requires": {
2479 "minimist": "0.0.8"
2480 }
2481 },
2482 "mocha": {
2483 "version": "6.0.2",
2484 "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.0.2.tgz",
2485 "integrity": "sha512-RtTJsmmToGyeTznSOMoM6TPEk1A84FQaHIciKrRqARZx+B5ccJ5tXlmJzEKGBxZdqk9UjpRsesZTUkZmR5YnuQ==",
2486 "dev": true,
2487 "requires": {
2488 "ansi-colors": "3.2.3",
2489 "browser-stdout": "1.3.1",
2490 "debug": "3.2.6",
2491 "diff": "3.5.0",
2492 "escape-string-regexp": "1.0.5",
2493 "findup-sync": "2.0.0",
2494 "glob": "7.1.3",
2495 "growl": "1.10.5",
2496 "he": "1.2.0",
2497 "js-yaml": "3.13.0",
2498 "log-symbols": "2.2.0",
2499 "minimatch": "3.0.4",
2500 "mkdirp": "0.5.1",
2501 "ms": "2.1.1",
2502 "node-environment-flags": "1.0.4",
2503 "object.assign": "4.1.0",
2504 "strip-json-comments": "2.0.1",
2505 "supports-color": "6.0.0",
2506 "which": "1.3.1",
2507 "wide-align": "1.1.3",
2508 "yargs": "12.0.5",
2509 "yargs-parser": "11.1.1",
2510 "yargs-unparser": "1.5.0"
2511 },
2512 "dependencies": {
2513 "debug": {
2514 "version": "3.2.6",
2515 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
2516 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
2517 "dev": true,
2518 "requires": {
2519 "ms": "^2.1.1"
2520 }
2521 },
2522 "supports-color": {
2523 "version": "6.0.0",
2524 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
2525 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
2526 "dev": true,
2527 "requires": {
2528 "has-flag": "^3.0.0"
2529 }
2530 }
2531 }
2532 },
2533 "ms": {
2534 "version": "2.1.1",
2535 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
2536 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
2537 "dev": true
2538 },
2539 "mute-stream": {
2540 "version": "0.0.7",
2541 "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
2542 "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
2543 "dev": true
2544 },
2545 "nanomatch": {
2546 "version": "1.2.13",
2547 "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
2548 "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
2549 "requires": {
2550 "arr-diff": "^4.0.0",
2551 "array-unique": "^0.3.2",
2552 "define-property": "^2.0.2",
2553 "extend-shallow": "^3.0.2",
2554 "fragment-cache": "^0.2.1",
2555 "is-windows": "^1.0.2",
2556 "kind-of": "^6.0.2",
2557 "object.pick": "^1.3.0",
2558 "regex-not": "^1.0.0",
2559 "snapdragon": "^0.8.1",
2560 "to-regex": "^3.0.1"
2561 }
2562 },
2563 "natural-compare": {
2564 "version": "1.4.0",
2565 "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
2566 "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
2567 "dev": true
2568 },
2569 "nice-try": {
2570 "version": "1.0.5",
2571 "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
2572 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
2573 "dev": true
2574 },
2575 "node-environment-flags": {
2576 "version": "1.0.4",
2577 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.4.tgz",
2578 "integrity": "sha512-M9rwCnWVLW7PX+NUWe3ejEdiLYinRpsEre9hMkU/6NS4h+EEulYaDH1gCEZ2gyXsmw+RXYDaV2JkkTNcsPDJ0Q==",
2579 "dev": true,
2580 "requires": {
2581 "object.getownpropertydescriptors": "^2.0.3"
2582 }
2583 },
2584 "normalize-package-data": {
2585 "version": "2.4.0",
2586 "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
2587 "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
2588 "dev": true,
2589 "requires": {
2590 "hosted-git-info": "^2.1.4",
2591 "is-builtin-module": "^1.0.0",
2592 "semver": "2 || 3 || 4 || 5",
2593 "validate-npm-package-license": "^3.0.1"
2594 }
2595 },
2596 "npm-path": {
2597 "version": "2.0.4",
2598 "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz",
2599 "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==",
2600 "dev": true,
2601 "requires": {
2602 "which": "^1.2.10"
2603 }
2604 },
2605 "npm-run-path": {
2606 "version": "2.0.2",
2607 "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
2608 "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
2609 "dev": true,
2610 "requires": {
2611 "path-key": "^2.0.0"
2612 }
2613 },
2614 "npm-which": {
2615 "version": "3.0.1",
2616 "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz",
2617 "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=",
2618 "dev": true,
2619 "requires": {
2620 "commander": "^2.9.0",
2621 "npm-path": "^2.0.2",
2622 "which": "^1.2.10"
2623 }
2624 },
2625 "number-is-nan": {
2626 "version": "1.0.1",
2627 "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
2628 "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
2629 "dev": true
2630 },
2631 "object-assign": {
2632 "version": "4.1.1",
2633 "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
2634 "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
2635 "dev": true
2636 },
2637 "object-copy": {
2638 "version": "0.1.0",
2639 "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
2640 "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
2641 "requires": {
2642 "copy-descriptor": "^0.1.0",
2643 "define-property": "^0.2.5",
2644 "kind-of": "^3.0.3"
2645 },
2646 "dependencies": {
2647 "define-property": {
2648 "version": "0.2.5",
2649 "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2650 "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2651 "requires": {
2652 "is-descriptor": "^0.1.0"
2653 }
2654 },
2655 "kind-of": {
2656 "version": "3.2.2",
2657 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2658 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2659 "requires": {
2660 "is-buffer": "^1.1.5"
2661 }
2662 }
2663 }
2664 },
2665 "object-keys": {
2666 "version": "1.1.0",
2667 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz",
2668 "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==",
2669 "dev": true
2670 },
2671 "object-visit": {
2672 "version": "1.0.1",
2673 "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
2674 "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
2675 "requires": {
2676 "isobject": "^3.0.0"
2677 }
2678 },
2679 "object.assign": {
2680 "version": "4.1.0",
2681 "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
2682 "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
2683 "dev": true,
2684 "requires": {
2685 "define-properties": "^1.1.2",
2686 "function-bind": "^1.1.1",
2687 "has-symbols": "^1.0.0",
2688 "object-keys": "^1.0.11"
2689 }
2690 },
2691 "object.getownpropertydescriptors": {
2692 "version": "2.0.3",
2693 "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
2694 "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
2695 "dev": true,
2696 "requires": {
2697 "define-properties": "^1.1.2",
2698 "es-abstract": "^1.5.1"
2699 }
2700 },
2701 "object.pick": {
2702 "version": "1.3.0",
2703 "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
2704 "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
2705 "requires": {
2706 "isobject": "^3.0.1"
2707 }
2708 },
2709 "once": {
2710 "version": "1.4.0",
2711 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
2712 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
2713 "dev": true,
2714 "requires": {
2715 "wrappy": "1"
2716 }
2717 },
2718 "onetime": {
2719 "version": "2.0.1",
2720 "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
2721 "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
2722 "dev": true,
2723 "requires": {
2724 "mimic-fn": "^1.0.0"
2725 }
2726 },
2727 "optionator": {
2728 "version": "0.8.2",
2729 "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
2730 "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
2731 "dev": true,
2732 "requires": {
2733 "deep-is": "~0.1.3",
2734 "fast-levenshtein": "~2.0.4",
2735 "levn": "~0.3.0",
2736 "prelude-ls": "~1.1.2",
2737 "type-check": "~0.3.2",
2738 "wordwrap": "~1.0.0"
2739 }
2740 },
2741 "os-homedir": {
2742 "version": "1.0.2",
2743 "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
2744 "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
2745 "dev": true
2746 },
2747 "os-locale": {
2748 "version": "3.1.0",
2749 "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
2750 "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
2751 "dev": true,
2752 "requires": {
2753 "execa": "^1.0.0",
2754 "lcid": "^2.0.0",
2755 "mem": "^4.0.0"
2756 }
2757 },
2758 "os-tmpdir": {
2759 "version": "1.0.2",
2760 "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
2761 "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
2762 "dev": true
2763 },
2764 "p-defer": {
2765 "version": "1.0.0",
2766 "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
2767 "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
2768 "dev": true
2769 },
2770 "p-finally": {
2771 "version": "1.0.0",
2772 "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
2773 "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
2774 "dev": true
2775 },
2776 "p-is-promise": {
2777 "version": "2.0.0",
2778 "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz",
2779 "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==",
2780 "dev": true
2781 },
2782 "p-limit": {
2783 "version": "1.3.0",
2784 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
2785 "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
2786 "dev": true,
2787 "requires": {
2788 "p-try": "^1.0.0"
2789 }
2790 },
2791 "p-locate": {
2792 "version": "2.0.0",
2793 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
2794 "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
2795 "dev": true,
2796 "requires": {
2797 "p-limit": "^1.1.0"
2798 }
2799 },
2800 "p-map": {
2801 "version": "1.2.0",
2802 "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
2803 "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
2804 "dev": true
2805 },
2806 "p-try": {
2807 "version": "1.0.0",
2808 "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
2809 "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
2810 "dev": true
2811 },
2812 "parent-module": {
2813 "version": "1.0.1",
2814 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
2815 "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
2816 "dev": true,
2817 "requires": {
2818 "callsites": "^3.0.0"
2819 }
2820 },
2821 "parse-json": {
2822 "version": "2.2.0",
2823 "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
2824 "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
2825 "dev": true,
2826 "requires": {
2827 "error-ex": "^1.2.0"
2828 }
2829 },
2830 "parse-passwd": {
2831 "version": "1.0.0",
2832 "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
2833 "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
2834 "dev": true
2835 },
2836 "pascalcase": {
2837 "version": "0.1.1",
2838 "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
2839 "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
2840 },
2841 "path-exists": {
2842 "version": "3.0.0",
2843 "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
2844 "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
2845 "dev": true
2846 },
2847 "path-is-absolute": {
2848 "version": "1.0.1",
2849 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
2850 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
2851 "dev": true
2852 },
2853 "path-is-inside": {
2854 "version": "1.0.2",
2855 "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
2856 "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
2857 "dev": true
2858 },
2859 "path-key": {
2860 "version": "2.0.1",
2861 "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
2862 "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
2863 "dev": true
2864 },
2865 "path-parse": {
2866 "version": "1.0.6",
2867 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
2868 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
2869 },
2870 "path-type": {
2871 "version": "2.0.0",
2872 "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
2873 "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
2874 "dev": true,
2875 "requires": {
2876 "pify": "^2.0.0"
2877 }
2878 },
2879 "pify": {
2880 "version": "2.3.0",
2881 "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
2882 "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
2883 "dev": true
2884 },
2885 "pinkie": {
2886 "version": "2.0.4",
2887 "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
2888 "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
2889 "dev": true
2890 },
2891 "pinkie-promise": {
2892 "version": "2.0.1",
2893 "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
2894 "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
2895 "dev": true,
2896 "requires": {
2897 "pinkie": "^2.0.0"
2898 }
2899 },
2900 "pkg-dir": {
2901 "version": "2.0.0",
2902 "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
2903 "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
2904 "dev": true,
2905 "requires": {
2906 "find-up": "^2.1.0"
2907 }
2908 },
2909 "please-upgrade-node": {
2910 "version": "3.1.1",
2911 "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz",
2912 "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==",
2913 "dev": true,
2914 "requires": {
2915 "semver-compare": "^1.0.0"
2916 }
2917 },
2918 "posix-character-classes": {
2919 "version": "0.1.1",
2920 "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
2921 "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
2922 },
2923 "prelude-ls": {
2924 "version": "1.1.2",
2925 "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
2926 "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
2927 "dev": true
2928 },
2929 "prettier": {
2930 "version": "1.16.4",
2931 "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz",
2932 "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==",
2933 "dev": true
2934 },
2935 "progress": {
2936 "version": "2.0.3",
2937 "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
2938 "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
2939 "dev": true
2940 },
2941 "property-expr": {
2942 "version": "1.5.1",
2943 "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-1.5.1.tgz",
2944 "integrity": "sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==",
2945 "dev": true
2946 },
2947 "pump": {
2948 "version": "3.0.0",
2949 "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
2950 "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
2951 "dev": true,
2952 "requires": {
2953 "end-of-stream": "^1.1.0",
2954 "once": "^1.3.1"
2955 }
2956 },
2957 "punycode": {
2958 "version": "2.1.1",
2959 "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
2960 "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
2961 "dev": true
2962 },
2963 "read-pkg": {
2964 "version": "2.0.0",
2965 "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
2966 "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
2967 "dev": true,
2968 "requires": {
2969 "load-json-file": "^2.0.0",
2970 "normalize-package-data": "^2.3.2",
2971 "path-type": "^2.0.0"
2972 }
2973 },
2974 "read-pkg-up": {
2975 "version": "2.0.0",
2976 "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
2977 "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
2978 "dev": true,
2979 "requires": {
2980 "find-up": "^2.0.0",
2981 "read-pkg": "^2.0.0"
2982 }
2983 },
2984 "rechoir": {
2985 "version": "0.6.2",
2986 "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
2987 "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
2988 "dev": true,
2989 "requires": {
2990 "resolve": "^1.1.6"
2991 }
2992 },
2993 "regenerate": {
2994 "version": "1.4.0",
2995 "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
2996 "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==",
2997 "dev": true
2998 },
2999 "regenerate-unicode-properties": {
3000 "version": "7.0.0",
3001 "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz",
3002 "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==",
3003 "dev": true,
3004 "requires": {
3005 "regenerate": "^1.4.0"
3006 }
3007 },
3008 "regenerator-runtime": {
3009 "version": "0.12.1",
3010 "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
3011 "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==",
3012 "dev": true
3013 },
3014 "regex-not": {
3015 "version": "1.0.2",
3016 "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
3017 "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
3018 "requires": {
3019 "extend-shallow": "^3.0.2",
3020 "safe-regex": "^1.1.0"
3021 }
3022 },
3023 "regexpp": {
3024 "version": "2.0.1",
3025 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
3026 "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
3027 "dev": true
3028 },
3029 "regexpu-core": {
3030 "version": "4.4.0",
3031 "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz",
3032 "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==",
3033 "dev": true,
3034 "requires": {
3035 "regenerate": "^1.4.0",
3036 "regenerate-unicode-properties": "^7.0.0",
3037 "regjsgen": "^0.5.0",
3038 "regjsparser": "^0.6.0",
3039 "unicode-match-property-ecmascript": "^1.0.4",
3040 "unicode-match-property-value-ecmascript": "^1.0.2"
3041 }
3042 },
3043 "regjsgen": {
3044 "version": "0.5.0",
3045 "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz",
3046 "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==",
3047 "dev": true
3048 },
3049 "regjsparser": {
3050 "version": "0.6.0",
3051 "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz",
3052 "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==",
3053 "dev": true,
3054 "requires": {
3055 "jsesc": "~0.5.0"
3056 }
3057 },
3058 "repeat-element": {
3059 "version": "1.1.3",
3060 "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
3061 "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
3062 },
3063 "repeat-string": {
3064 "version": "1.6.1",
3065 "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
3066 "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
3067 },
3068 "require-directory": {
3069 "version": "2.1.1",
3070 "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
3071 "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
3072 "dev": true
3073 },
3074 "require-main-filename": {
3075 "version": "1.0.1",
3076 "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
3077 "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
3078 "dev": true
3079 },
3080 "require-relative": {
3081 "version": "0.8.7",
3082 "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
3083 "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
3084 "dev": true
3085 },
3086 "resolve": {
3087 "version": "1.10.0",
3088 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
3089 "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
3090 "requires": {
3091 "path-parse": "^1.0.6"
3092 }
3093 },
3094 "resolve-dir": {
3095 "version": "1.0.1",
3096 "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
3097 "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
3098 "dev": true,
3099 "requires": {
3100 "expand-tilde": "^2.0.0",
3101 "global-modules": "^1.0.0"
3102 }
3103 },
3104 "resolve-from": {
3105 "version": "4.0.0",
3106 "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
3107 "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
3108 "dev": true
3109 },
3110 "resolve-url": {
3111 "version": "0.2.1",
3112 "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
3113 "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
3114 },
3115 "restore-cursor": {
3116 "version": "2.0.0",
3117 "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
3118 "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
3119 "dev": true,
3120 "requires": {
3121 "onetime": "^2.0.0",
3122 "signal-exit": "^3.0.2"
3123 }
3124 },
3125 "ret": {
3126 "version": "0.1.15",
3127 "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
3128 "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
3129 },
3130 "rimraf": {
3131 "version": "2.6.3",
3132 "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
3133 "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
3134 "dev": true,
3135 "requires": {
3136 "glob": "^7.1.3"
3137 }
3138 },
3139 "rollup": {
3140 "version": "1.8.0",
3141 "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.8.0.tgz",
3142 "integrity": "sha512-dKxL6ihUZ9YrVySKf/LBz5joW2sqwWkiuki34279Ppr2cL+O6Za6Ujovk+rtTX0AFCIsH1rs6y8LYKdZZ/7C5A==",
3143 "dev": true,
3144 "requires": {
3145 "@types/estree": "0.0.39",
3146 "@types/node": "^11.11.6",
3147 "acorn": "^6.1.1"
3148 }
3149 },
3150 "rollup-plugin-buble": {
3151 "version": "0.19.6",
3152 "resolved": "https://registry.npmjs.org/rollup-plugin-buble/-/rollup-plugin-buble-0.19.6.tgz",
3153 "integrity": "sha512-El5Fut4/wEO17ZN/n9BZvqd7DXXB2WbJr/DKvr89LXChC/cHllE0XwiUDeAalrTkgr0WrnyLDTCQvEv+cGywWQ==",
3154 "dev": true,
3155 "requires": {
3156 "buble": "^0.19.6",
3157 "rollup-pluginutils": "^2.3.3"
3158 }
3159 },
3160 "rollup-plugin-node-resolve": {
3161 "version": "4.0.1",
3162 "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.1.tgz",
3163 "integrity": "sha512-fSS7YDuCe0gYqKsr5OvxMloeZYUSgN43Ypi1WeRZzQcWtHgFayV5tUSPYpxuaioIIWaBXl6NrVk0T2/sKwueLg==",
3164 "dev": true,
3165 "requires": {
3166 "builtin-modules": "^3.0.0",
3167 "is-module": "^1.0.0",
3168 "resolve": "^1.10.0"
3169 },
3170 "dependencies": {
3171 "builtin-modules": {
3172 "version": "3.0.0",
3173 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz",
3174 "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==",
3175 "dev": true
3176 }
3177 }
3178 },
3179 "rollup-pluginutils": {
3180 "version": "2.6.0",
3181 "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz",
3182 "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==",
3183 "requires": {
3184 "estree-walker": "^0.6.0",
3185 "micromatch": "^3.1.10"
3186 }
3187 },
3188 "run-async": {
3189 "version": "2.3.0",
3190 "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
3191 "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
3192 "dev": true,
3193 "requires": {
3194 "is-promise": "^2.1.0"
3195 }
3196 },
3197 "run-node": {
3198 "version": "1.0.0",
3199 "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz",
3200 "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==",
3201 "dev": true
3202 },
3203 "rxjs": {
3204 "version": "6.4.0",
3205 "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz",
3206 "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==",
3207 "dev": true,
3208 "requires": {
3209 "tslib": "^1.9.0"
3210 }
3211 },
3212 "safe-regex": {
3213 "version": "1.1.0",
3214 "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
3215 "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
3216 "requires": {
3217 "ret": "~0.1.10"
3218 }
3219 },
3220 "safer-buffer": {
3221 "version": "2.1.2",
3222 "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
3223 "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
3224 "dev": true
3225 },
3226 "semver": {
3227 "version": "5.6.0",
3228 "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
3229 "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
3230 "dev": true
3231 },
3232 "semver-compare": {
3233 "version": "1.0.0",
3234 "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
3235 "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
3236 "dev": true
3237 },
3238 "set-blocking": {
3239 "version": "2.0.0",
3240 "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
3241 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
3242 "dev": true
3243 },
3244 "set-value": {
3245 "version": "2.0.0",
3246 "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
3247 "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
3248 "requires": {
3249 "extend-shallow": "^2.0.1",
3250 "is-extendable": "^0.1.1",
3251 "is-plain-object": "^2.0.3",
3252 "split-string": "^3.0.1"
3253 },
3254 "dependencies": {
3255 "extend-shallow": {
3256 "version": "2.0.1",
3257 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
3258 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
3259 "requires": {
3260 "is-extendable": "^0.1.0"
3261 }
3262 }
3263 }
3264 },
3265 "shebang-command": {
3266 "version": "1.2.0",
3267 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
3268 "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
3269 "dev": true,
3270 "requires": {
3271 "shebang-regex": "^1.0.0"
3272 }
3273 },
3274 "shebang-regex": {
3275 "version": "1.0.0",
3276 "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
3277 "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
3278 "dev": true
3279 },
3280 "shelljs": {
3281 "version": "0.8.2",
3282 "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz",
3283 "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==",
3284 "dev": true,
3285 "requires": {
3286 "glob": "^7.0.0",
3287 "interpret": "^1.0.0",
3288 "rechoir": "^0.6.2"
3289 }
3290 },
3291 "shx": {
3292 "version": "0.3.2",
3293 "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz",
3294 "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==",
3295 "dev": true,
3296 "requires": {
3297 "es6-object-assign": "^1.0.3",
3298 "minimist": "^1.2.0",
3299 "shelljs": "^0.8.1"
3300 },
3301 "dependencies": {
3302 "minimist": {
3303 "version": "1.2.0",
3304 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
3305 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
3306 "dev": true
3307 }
3308 }
3309 },
3310 "signal-exit": {
3311 "version": "3.0.2",
3312 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
3313 "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
3314 "dev": true
3315 },
3316 "simple-git": {
3317 "version": "1.110.0",
3318 "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz",
3319 "integrity": "sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==",
3320 "dev": true,
3321 "requires": {
3322 "debug": "^4.0.1"
3323 }
3324 },
3325 "slash": {
3326 "version": "2.0.0",
3327 "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
3328 "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
3329 "dev": true
3330 },
3331 "slice-ansi": {
3332 "version": "2.1.0",
3333 "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
3334 "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
3335 "dev": true,
3336 "requires": {
3337 "ansi-styles": "^3.2.0",
3338 "astral-regex": "^1.0.0",
3339 "is-fullwidth-code-point": "^2.0.0"
3340 }
3341 },
3342 "snapdragon": {
3343 "version": "0.8.2",
3344 "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
3345 "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
3346 "requires": {
3347 "base": "^0.11.1",
3348 "debug": "^2.2.0",
3349 "define-property": "^0.2.5",
3350 "extend-shallow": "^2.0.1",
3351 "map-cache": "^0.2.2",
3352 "source-map": "^0.5.6",
3353 "source-map-resolve": "^0.5.0",
3354 "use": "^3.1.0"
3355 },
3356 "dependencies": {
3357 "debug": {
3358 "version": "2.6.9",
3359 "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
3360 "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
3361 "requires": {
3362 "ms": "2.0.0"
3363 }
3364 },
3365 "define-property": {
3366 "version": "0.2.5",
3367 "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
3368 "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
3369 "requires": {
3370 "is-descriptor": "^0.1.0"
3371 }
3372 },
3373 "extend-shallow": {
3374 "version": "2.0.1",
3375 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
3376 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
3377 "requires": {
3378 "is-extendable": "^0.1.0"
3379 }
3380 },
3381 "ms": {
3382 "version": "2.0.0",
3383 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
3384 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
3385 },
3386 "source-map": {
3387 "version": "0.5.7",
3388 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
3389 "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
3390 }
3391 }
3392 },
3393 "snapdragon-node": {
3394 "version": "2.1.1",
3395 "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
3396 "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
3397 "requires": {
3398 "define-property": "^1.0.0",
3399 "isobject": "^3.0.0",
3400 "snapdragon-util": "^3.0.1"
3401 },
3402 "dependencies": {
3403 "define-property": {
3404 "version": "1.0.0",
3405 "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
3406 "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
3407 "requires": {
3408 "is-descriptor": "^1.0.0"
3409 }
3410 },
3411 "is-accessor-descriptor": {
3412 "version": "1.0.0",
3413 "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
3414 "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
3415 "requires": {
3416 "kind-of": "^6.0.0"
3417 }
3418 },
3419 "is-data-descriptor": {
3420 "version": "1.0.0",
3421 "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
3422 "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
3423 "requires": {
3424 "kind-of": "^6.0.0"
3425 }
3426 },
3427 "is-descriptor": {
3428 "version": "1.0.2",
3429 "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
3430 "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
3431 "requires": {
3432 "is-accessor-descriptor": "^1.0.0",
3433 "is-data-descriptor": "^1.0.0",
3434 "kind-of": "^6.0.2"
3435 }
3436 }
3437 }
3438 },
3439 "snapdragon-util": {
3440 "version": "3.0.1",
3441 "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
3442 "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
3443 "requires": {
3444 "kind-of": "^3.2.0"
3445 },
3446 "dependencies": {
3447 "kind-of": {
3448 "version": "3.2.2",
3449 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3450 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3451 "requires": {
3452 "is-buffer": "^1.1.5"
3453 }
3454 }
3455 }
3456 },
3457 "source-map": {
3458 "version": "0.7.3",
3459 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
3460 "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
3461 "dev": true
3462 },
3463 "source-map-resolve": {
3464 "version": "0.5.2",
3465 "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
3466 "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
3467 "requires": {
3468 "atob": "^2.1.1",
3469 "decode-uri-component": "^0.2.0",
3470 "resolve-url": "^0.2.1",
3471 "source-map-url": "^0.4.0",
3472 "urix": "^0.1.0"
3473 }
3474 },
3475 "source-map-support": {
3476 "version": "0.5.11",
3477 "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz",
3478 "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==",
3479 "dev": true,
3480 "requires": {
3481 "buffer-from": "^1.0.0",
3482 "source-map": "^0.6.0"
3483 },
3484 "dependencies": {
3485 "source-map": {
3486 "version": "0.6.1",
3487 "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
3488 "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
3489 "dev": true
3490 }
3491 }
3492 },
3493 "source-map-url": {
3494 "version": "0.4.0",
3495 "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
3496 "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
3497 },
3498 "sourcemap-codec": {
3499 "version": "1.4.4",
3500 "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz",
3501 "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg=="
3502 },
3503 "spdx-correct": {
3504 "version": "3.1.0",
3505 "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
3506 "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
3507 "dev": true,
3508 "requires": {
3509 "spdx-expression-parse": "^3.0.0",
3510 "spdx-license-ids": "^3.0.0"
3511 }
3512 },
3513 "spdx-exceptions": {
3514 "version": "2.2.0",
3515 "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
3516 "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
3517 "dev": true
3518 },
3519 "spdx-expression-parse": {
3520 "version": "3.0.0",
3521 "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
3522 "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
3523 "dev": true,
3524 "requires": {
3525 "spdx-exceptions": "^2.1.0",
3526 "spdx-license-ids": "^3.0.0"
3527 }
3528 },
3529 "spdx-license-ids": {
3530 "version": "3.0.3",
3531 "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz",
3532 "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==",
3533 "dev": true
3534 },
3535 "split-string": {
3536 "version": "3.1.0",
3537 "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
3538 "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
3539 "requires": {
3540 "extend-shallow": "^3.0.0"
3541 }
3542 },
3543 "sprintf-js": {
3544 "version": "1.0.3",
3545 "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
3546 "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
3547 "dev": true
3548 },
3549 "staged-git-files": {
3550 "version": "1.1.2",
3551 "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.2.tgz",
3552 "integrity": "sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA==",
3553 "dev": true
3554 },
3555 "static-extend": {
3556 "version": "0.1.2",
3557 "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
3558 "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
3559 "requires": {
3560 "define-property": "^0.2.5",
3561 "object-copy": "^0.1.0"
3562 },
3563 "dependencies": {
3564 "define-property": {
3565 "version": "0.2.5",
3566 "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
3567 "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
3568 "requires": {
3569 "is-descriptor": "^0.1.0"
3570 }
3571 }
3572 }
3573 },
3574 "string-argv": {
3575 "version": "0.0.2",
3576 "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz",
3577 "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=",
3578 "dev": true
3579 },
3580 "string-width": {
3581 "version": "2.1.1",
3582 "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
3583 "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
3584 "dev": true,
3585 "requires": {
3586 "is-fullwidth-code-point": "^2.0.0",
3587 "strip-ansi": "^4.0.0"
3588 }
3589 },
3590 "stringify-object": {
3591 "version": "3.3.0",
3592 "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
3593 "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
3594 "dev": true,
3595 "requires": {
3596 "get-own-enumerable-property-symbols": "^3.0.0",
3597 "is-obj": "^1.0.1",
3598 "is-regexp": "^1.0.0"
3599 }
3600 },
3601 "strip-ansi": {
3602 "version": "4.0.0",
3603 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
3604 "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
3605 "dev": true,
3606 "requires": {
3607 "ansi-regex": "^3.0.0"
3608 }
3609 },
3610 "strip-bom": {
3611 "version": "3.0.0",
3612 "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
3613 "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
3614 "dev": true
3615 },
3616 "strip-eof": {
3617 "version": "1.0.0",
3618 "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
3619 "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
3620 "dev": true
3621 },
3622 "strip-json-comments": {
3623 "version": "2.0.1",
3624 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
3625 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
3626 "dev": true
3627 },
3628 "supports-color": {
3629 "version": "5.5.0",
3630 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
3631 "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
3632 "dev": true,
3633 "requires": {
3634 "has-flag": "^3.0.0"
3635 }
3636 },
3637 "symbol-observable": {
3638 "version": "1.2.0",
3639 "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
3640 "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==",
3641 "dev": true
3642 },
3643 "synchronous-promise": {
3644 "version": "2.0.6",
3645 "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.6.tgz",
3646 "integrity": "sha512-TyOuWLwkmtPL49LHCX1caIwHjRzcVd62+GF6h8W/jHOeZUFHpnd2XJDVuUlaTaLPH1nuu2M69mfHr5XbQJnf/g==",
3647 "dev": true
3648 },
3649 "table": {
3650 "version": "5.2.3",
3651 "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz",
3652 "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==",
3653 "dev": true,
3654 "requires": {
3655 "ajv": "^6.9.1",
3656 "lodash": "^4.17.11",
3657 "slice-ansi": "^2.1.0",
3658 "string-width": "^3.0.0"
3659 },
3660 "dependencies": {
3661 "ansi-regex": {
3662 "version": "4.1.0",
3663 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
3664 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
3665 "dev": true
3666 },
3667 "string-width": {
3668 "version": "3.1.0",
3669 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
3670 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
3671 "dev": true,
3672 "requires": {
3673 "emoji-regex": "^7.0.1",
3674 "is-fullwidth-code-point": "^2.0.0",
3675 "strip-ansi": "^5.1.0"
3676 }
3677 },
3678 "strip-ansi": {
3679 "version": "5.2.0",
3680 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
3681 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
3682 "dev": true,
3683 "requires": {
3684 "ansi-regex": "^4.1.0"
3685 }
3686 }
3687 }
3688 },
3689 "text-table": {
3690 "version": "0.2.0",
3691 "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
3692 "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
3693 "dev": true
3694 },
3695 "through": {
3696 "version": "2.3.8",
3697 "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
3698 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
3699 "dev": true
3700 },
3701 "tmp": {
3702 "version": "0.0.33",
3703 "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
3704 "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
3705 "dev": true,
3706 "requires": {
3707 "os-tmpdir": "~1.0.2"
3708 }
3709 },
3710 "to-object-path": {
3711 "version": "0.3.0",
3712 "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
3713 "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
3714 "requires": {
3715 "kind-of": "^3.0.2"
3716 },
3717 "dependencies": {
3718 "kind-of": {
3719 "version": "3.2.2",
3720 "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3721 "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3722 "requires": {
3723 "is-buffer": "^1.1.5"
3724 }
3725 }
3726 }
3727 },
3728 "to-regex": {
3729 "version": "3.0.2",
3730 "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
3731 "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
3732 "requires": {
3733 "define-property": "^2.0.2",
3734 "extend-shallow": "^3.0.2",
3735 "regex-not": "^1.0.2",
3736 "safe-regex": "^1.1.0"
3737 }
3738 },
3739 "to-regex-range": {
3740 "version": "2.1.1",
3741 "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
3742 "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
3743 "requires": {
3744 "is-number": "^3.0.0",
3745 "repeat-string": "^1.6.1"
3746 }
3747 },
3748 "toposort": {
3749 "version": "2.0.2",
3750 "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz",
3751 "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=",
3752 "dev": true
3753 },
3754 "tslib": {
3755 "version": "1.9.3",
3756 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
3757 "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
3758 "dev": true
3759 },
3760 "type-check": {
3761 "version": "0.3.2",
3762 "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
3763 "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
3764 "dev": true,
3765 "requires": {
3766 "prelude-ls": "~1.1.2"
3767 }
3768 },
3769 "typescript": {
3770 "version": "3.4.1",
3771 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
3772 "integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
3773 "dev": true
3774 },
3775 "unicode-canonical-property-names-ecmascript": {
3776 "version": "1.0.4",
3777 "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
3778 "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
3779 "dev": true
3780 },
3781 "unicode-match-property-ecmascript": {
3782 "version": "1.0.4",
3783 "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
3784 "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
3785 "dev": true,
3786 "requires": {
3787 "unicode-canonical-property-names-ecmascript": "^1.0.4",
3788 "unicode-property-aliases-ecmascript": "^1.0.4"
3789 }
3790 },
3791 "unicode-match-property-value-ecmascript": {
3792 "version": "1.0.2",
3793 "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz",
3794 "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==",
3795 "dev": true
3796 },
3797 "unicode-property-aliases-ecmascript": {
3798 "version": "1.0.4",
3799 "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz",
3800 "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==",
3801 "dev": true
3802 },
3803 "union-value": {
3804 "version": "1.0.0",
3805 "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
3806 "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
3807 "requires": {
3808 "arr-union": "^3.1.0",
3809 "get-value": "^2.0.6",
3810 "is-extendable": "^0.1.1",
3811 "set-value": "^0.4.3"
3812 },
3813 "dependencies": {
3814 "extend-shallow": {
3815 "version": "2.0.1",
3816 "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
3817 "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
3818 "requires": {
3819 "is-extendable": "^0.1.0"
3820 }
3821 },
3822 "set-value": {
3823 "version": "0.4.3",
3824 "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
3825 "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
3826 "requires": {
3827 "extend-shallow": "^2.0.1",
3828 "is-extendable": "^0.1.1",
3829 "is-plain-object": "^2.0.1",
3830 "to-object-path": "^0.3.0"
3831 }
3832 }
3833 }
3834 },
3835 "unset-value": {
3836 "version": "1.0.0",
3837 "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
3838 "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
3839 "requires": {
3840 "has-value": "^0.3.1",
3841 "isobject": "^3.0.0"
3842 },
3843 "dependencies": {
3844 "has-value": {
3845 "version": "0.3.1",
3846 "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
3847 "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
3848 "requires": {
3849 "get-value": "^2.0.3",
3850 "has-values": "^0.1.4",
3851 "isobject": "^2.0.0"
3852 },
3853 "dependencies": {
3854 "isobject": {
3855 "version": "2.1.0",
3856 "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
3857 "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
3858 "requires": {
3859 "isarray": "1.0.0"
3860 }
3861 }
3862 }
3863 },
3864 "has-values": {
3865 "version": "0.1.4",
3866 "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
3867 "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
3868 }
3869 }
3870 },
3871 "uri-js": {
3872 "version": "4.2.2",
3873 "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
3874 "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
3875 "dev": true,
3876 "requires": {
3877 "punycode": "^2.1.0"
3878 }
3879 },
3880 "urix": {
3881 "version": "0.1.0",
3882 "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
3883 "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
3884 },
3885 "use": {
3886 "version": "3.1.1",
3887 "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
3888 "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
3889 },
3890 "validate-npm-package-license": {
3891 "version": "3.0.4",
3892 "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
3893 "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
3894 "dev": true,
3895 "requires": {
3896 "spdx-correct": "^3.0.0",
3897 "spdx-expression-parse": "^3.0.0"
3898 }
3899 },
3900 "vlq": {
3901 "version": "1.0.0",
3902 "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.0.tgz",
3903 "integrity": "sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==",
3904 "dev": true
3905 },
3906 "which": {
3907 "version": "1.3.1",
3908 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
3909 "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
3910 "dev": true,
3911 "requires": {
3912 "isexe": "^2.0.0"
3913 }
3914 },
3915 "which-module": {
3916 "version": "2.0.0",
3917 "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
3918 "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
3919 "dev": true
3920 },
3921 "wide-align": {
3922 "version": "1.1.3",
3923 "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
3924 "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
3925 "dev": true,
3926 "requires": {
3927 "string-width": "^1.0.2 || 2"
3928 }
3929 },
3930 "wordwrap": {
3931 "version": "1.0.0",
3932 "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
3933 "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
3934 "dev": true
3935 },
3936 "wrap-ansi": {
3937 "version": "3.0.1",
3938 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz",
3939 "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=",
3940 "dev": true,
3941 "requires": {
3942 "string-width": "^2.1.1",
3943 "strip-ansi": "^4.0.0"
3944 }
3945 },
3946 "wrappy": {
3947 "version": "1.0.2",
3948 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
3949 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
3950 "dev": true
3951 },
3952 "write": {
3953 "version": "1.0.3",
3954 "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
3955 "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
3956 "dev": true,
3957 "requires": {
3958 "mkdirp": "^0.5.1"
3959 }
3960 },
3961 "y18n": {
3962 "version": "4.0.0",
3963 "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
3964 "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
3965 "dev": true
3966 },
3967 "yargs": {
3968 "version": "12.0.5",
3969 "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
3970 "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
3971 "dev": true,
3972 "requires": {
3973 "cliui": "^4.0.0",
3974 "decamelize": "^1.2.0",
3975 "find-up": "^3.0.0",
3976 "get-caller-file": "^1.0.1",
3977 "os-locale": "^3.0.0",
3978 "require-directory": "^2.1.1",
3979 "require-main-filename": "^1.0.1",
3980 "set-blocking": "^2.0.0",
3981 "string-width": "^2.0.0",
3982 "which-module": "^2.0.0",
3983 "y18n": "^3.2.1 || ^4.0.0",
3984 "yargs-parser": "^11.1.1"
3985 },
3986 "dependencies": {
3987 "find-up": {
3988 "version": "3.0.0",
3989 "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
3990 "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
3991 "dev": true,
3992 "requires": {
3993 "locate-path": "^3.0.0"
3994 }
3995 },
3996 "locate-path": {
3997 "version": "3.0.0",
3998 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
3999 "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
4000 "dev": true,
4001 "requires": {
4002 "p-locate": "^3.0.0",
4003 "path-exists": "^3.0.0"
4004 }
4005 },
4006 "p-limit": {
4007 "version": "2.2.0",
4008 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
4009 "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
4010 "dev": true,
4011 "requires": {
4012 "p-try": "^2.0.0"
4013 }
4014 },
4015 "p-locate": {
4016 "version": "3.0.0",
4017 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
4018 "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
4019 "dev": true,
4020 "requires": {
4021 "p-limit": "^2.0.0"
4022 }
4023 },
4024 "p-try": {
4025 "version": "2.1.0",
4026 "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
4027 "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==",
4028 "dev": true
4029 }
4030 }
4031 },
4032 "yargs-parser": {
4033 "version": "11.1.1",
4034 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
4035 "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
4036 "dev": true,
4037 "requires": {
4038 "camelcase": "^5.0.0",
4039 "decamelize": "^1.2.0"
4040 }
4041 },
4042 "yargs-unparser": {
4043 "version": "1.5.0",
4044 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz",
4045 "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==",
4046 "dev": true,
4047 "requires": {
4048 "flat": "^4.1.0",
4049 "lodash": "^4.17.11",
4050 "yargs": "^12.0.5"
4051 }
4052 },
4053 "yup": {
4054 "version": "0.26.10",
4055 "resolved": "https://registry.npmjs.org/yup/-/yup-0.26.10.tgz",
4056 "integrity": "sha512-keuNEbNSnsOTOuGCt3UJW69jDE3O4P+UHAakO7vSeFMnjaitcmlbij/a3oNb9g1Y1KvSKH/7O1R2PQ4m4TRylw==",
4057 "dev": true,
4058 "requires": {
4059 "@babel/runtime": "7.0.0",
4060 "fn-name": "~2.0.1",
4061 "lodash": "^4.17.10",
4062 "property-expr": "^1.5.0",
4063 "synchronous-promise": "^2.0.5",
4064 "toposort": "^2.0.2"
4065 }
4066 }
4067 }
4068 }
+0
-58
legacy/package.json less more
0 {
1 "name": "rollup-plugin-commonjs",
2 "version": "9.3.4",
3 "description": "Convert CommonJS modules to ES2015",
4 "main": "dist/rollup-plugin-commonjs.cjs.js",
5 "module": "dist/rollup-plugin-commonjs.es.js",
6 "jsnext:main": "dist/rollup-plugin-commonjs.es.js",
7 "scripts": {
8 "test": "npm run test:only",
9 "test:only": "mocha && tsc",
10 "pretest": "npm run build",
11 "build": "shx rm -rf dist/* && rollup -c",
12 "dev": "rollup -c -w",
13 "lint": "prettier --write src/**/*.js test/test.js test/**/_config.js && eslint --fix src/**/*.js test/test.js test/**/_config.js",
14 "prepublishOnly": "npm run lint && npm run test:only",
15 "prepare": "npm run build"
16 },
17 "files": [
18 "src",
19 "dist",
20 "index.d.ts",
21 "README.md"
22 ],
23 "peerDependencies": {
24 "rollup": ">=0.56.0"
25 },
26 "dependencies": {
27 "estree-walker": "^0.6.0",
28 "magic-string": "^0.25.2",
29 "resolve": "^1.10.0",
30 "rollup-pluginutils": "^2.6.0"
31 },
32 "devDependencies": {
33 "acorn": "^6.1.1",
34 "eslint": "^5.16.0",
35 "eslint-plugin-import": "^2.16.0",
36 "husky": "^1.3.1",
37 "lint-staged": "^8.1.5",
38 "locate-character": "^2.0.5",
39 "mocha": "^6.0.2",
40 "prettier": "^1.16.4",
41 "require-relative": "^0.8.7",
42 "rollup": "^1.8.0",
43 "rollup-plugin-buble": "^0.19.6",
44 "rollup-plugin-node-resolve": "^4.0.1",
45 "shx": "^0.3.2",
46 "source-map": "^0.7.3",
47 "source-map-support": "^0.5.11",
48 "typescript": "^3.4.1"
49 },
50 "repository": "rollup/rollup-plugin-commonjs",
51 "author": "Rich Harris",
52 "license": "MIT",
53 "bugs": {
54 "url": "https://github.com/rollup/rollup-plugin-commonjs/issues"
55 },
56 "homepage": "https://github.com/rollup/rollup-plugin-commonjs"
57 }
+0
-24
legacy/rollup.config.js less more
0 import buble from 'rollup-plugin-buble';
1 import pkg from './package.json';
2
3 export default {
4 input: 'src/index.js',
5 plugins: [
6 buble({
7 transforms: { dangerousForOf: true }
8 })
9 ],
10 external: Object.keys( pkg.dependencies ).concat([ 'fs', 'path' ]),
11 output: [
12 {
13 format: 'es',
14 file: pkg.module,
15 sourcemap: true
16 },
17 {
18 format: 'cjs',
19 file: pkg.main,
20 sourcemap: true
21 }
22 ]
23 };
+0
-71
legacy/src/ast-utils.js less more
0 export function isReference(node, parent) {
1 if (parent.type === 'MemberExpression') return parent.computed || node === parent.object;
2
3 // disregard the `bar` in { bar: foo }
4 if (parent.type === 'Property' && node !== parent.value) return false;
5
6 // disregard the `bar` in `class Foo { bar () {...} }`
7 if (parent.type === 'MethodDefinition') return false;
8
9 // disregard the `bar` in `export { foo as bar }`
10 if (parent.type === 'ExportSpecifier' && node !== parent.local) return false;
11
12 return true;
13 }
14
15 export function flatten(node) {
16 const parts = [];
17
18 while (node.type === 'MemberExpression') {
19 if (node.computed) return null;
20
21 parts.unshift(node.property.name);
22 node = node.object;
23 }
24
25 if (node.type !== 'Identifier') return null;
26
27 const name = node.name;
28 parts.unshift(name);
29
30 return { name, keypath: parts.join('.') };
31 }
32
33 export function isTruthy(node) {
34 if (node.type === 'Literal') return !!node.value;
35 if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
36 if (node.operator in operators) return operators[node.operator](node);
37 }
38
39 export function isFalsy(node) {
40 return not(isTruthy(node));
41 }
42
43 function not(value) {
44 return value === undefined ? value : !value;
45 }
46
47 function equals(a, b, strict) {
48 if (a.type !== b.type) return undefined;
49 if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
50 }
51
52 const operators = {
53 '==': x => {
54 return equals(x.left, x.right, false);
55 },
56
57 '!=': x => not(operators['=='](x)),
58
59 '===': x => {
60 return equals(x.left, x.right, true);
61 },
62
63 '!==': x => not(operators['==='](x)),
64
65 '!': x => isFalsy(x.argument),
66
67 '&&': x => isTruthy(x.left) && isTruthy(x.right),
68
69 '||': x => isTruthy(x.left) || isTruthy(x.right)
70 };
+0
-39
legacy/src/default-resolver.js less more
0 import * as fs from 'fs';
1 import { dirname, resolve } from 'path';
2
3 function isFile(file) {
4 try {
5 const stats = fs.statSync(file);
6 return stats.isFile();
7 } catch (err) {
8 return false;
9 }
10 }
11
12 function addJsExtensionIfNecessary(file) {
13 if (isFile(file)) return file;
14
15 file += '.js';
16 if (isFile(file)) return file;
17
18 return null;
19 }
20
21 const absolutePath = /^(?:\/|(?:[A-Za-z]:)?[\\|/])/;
22
23 function isAbsolute(path) {
24 return absolutePath.test(path);
25 }
26
27 export default function defaultResolver(importee, importer) {
28 // absolute paths are left untouched
29 if (isAbsolute(importee)) return addJsExtensionIfNecessary(resolve(importee));
30
31 // if this is the entry point, resolve against cwd
32 if (importer === undefined) return addJsExtensionIfNecessary(resolve(process.cwd(), importee));
33
34 // external modules are skipped at this stage
35 if (importee[0] !== '.') return null;
36
37 return addJsExtensionIfNecessary(resolve(dirname(importer), importee));
38 }
+0
-24
legacy/src/helpers.js less more
0 export const PROXY_PREFIX = '\0commonjs-proxy-';
1 export const EXTERNAL_PREFIX = '\0commonjs-external-';
2 export const HELPERS_ID = '\0commonjsHelpers.js';
3
4 // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
5 // Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
6 export const HELPERS = `
7 export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
9 export function commonjsRequire () {
10 throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
11 }
12
13 export function unwrapExports (x) {
14 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
15 }
16
17 export function createCommonjsModule(fn, module) {
18 return module = { exports: {} }, fn(module, module.exports), module.exports;
19 }
20
21 export function getCjsExportFromNamespace (n) {
22 return n && n['default'] || n;
23 }`;
+0
-144
legacy/src/index.js less more
0 import { extname, resolve } from 'path';
1 import { sync as nodeResolveSync } from 'resolve';
2 import { createFilter } from 'rollup-pluginutils';
3 import { EXTERNAL_PREFIX, HELPERS, HELPERS_ID, PROXY_PREFIX } from './helpers.js';
4 import { getIsCjsPromise, setIsCjsPromise } from './is-cjs';
5 import { getResolveId } from './resolve-id';
6 import { checkEsModule, hasCjsKeywords, transformCommonjs } from './transform.js';
7 import { getName } from './utils.js';
8
9 export default function commonjs(options = {}) {
10 const extensions = options.extensions || ['.js'];
11 const filter = createFilter(options.include, options.exclude);
12 const ignoreGlobal = options.ignoreGlobal;
13
14 const customNamedExports = {};
15 if (options.namedExports) {
16 Object.keys(options.namedExports).forEach(id => {
17 let resolvedId;
18
19 try {
20 resolvedId = nodeResolveSync(id, { basedir: process.cwd() });
21 } catch (err) {
22 resolvedId = resolve(id);
23 }
24
25 customNamedExports[resolvedId] = options.namedExports[id];
26 });
27 }
28
29 const esModulesWithoutDefaultExport = Object.create(null);
30 const esModulesWithDefaultExport = Object.create(null);
31 const allowDynamicRequire = !!options.ignore; // TODO maybe this should be configurable?
32
33 const ignoreRequire =
34 typeof options.ignore === 'function'
35 ? options.ignore
36 : Array.isArray(options.ignore)
37 ? id => options.ignore.includes(id)
38 : () => false;
39
40 let entryModuleIdsPromise = null;
41
42 const resolveId = getResolveId(extensions);
43
44 const sourceMap = options.sourceMap !== false;
45
46 return {
47 name: 'commonjs',
48
49 options(options) {
50 resolveId.setRollupOptions(options);
51 const input = options.input || options.entry;
52 const entryModules = Array.isArray(input)
53 ? input
54 : typeof input === 'object' && input !== null
55 ? Object.values(input)
56 : [input];
57 entryModuleIdsPromise = Promise.all(entryModules.map(entry => resolveId(entry)));
58 },
59
60 resolveId,
61
62 load(id) {
63 if (id === HELPERS_ID) return HELPERS;
64
65 // generate proxy modules
66 if (id.startsWith(EXTERNAL_PREFIX)) {
67 const actualId = id.slice(EXTERNAL_PREFIX.length);
68 const name = getName(actualId);
69
70 return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
71 }
72
73 if (id.startsWith(PROXY_PREFIX)) {
74 const actualId = id.slice(PROXY_PREFIX.length);
75 const name = getName(actualId);
76
77 return getIsCjsPromise(actualId).then(isCjs => {
78 if (isCjs)
79 return `import { __moduleExports } from ${JSON.stringify(
80 actualId
81 )}; export default __moduleExports;`;
82 else if (esModulesWithoutDefaultExport[actualId])
83 return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
84 else if (esModulesWithDefaultExport[actualId]) {
85 return `export {default} from ${JSON.stringify(actualId)};`;
86 } else
87 return `import * as ${name} from ${JSON.stringify(
88 actualId
89 )}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`;
90 });
91 }
92 },
93
94 transform(code, id) {
95 if (!filter(id) || extensions.indexOf(extname(id)) === -1) {
96 setIsCjsPromise(id, Promise.resolve(null));
97 return null;
98 }
99
100 const transformPromise = entryModuleIdsPromise
101 .then(entryModuleIds => {
102 const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);
103 if (isEsModule) {
104 (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport)[
105 id
106 ] = true;
107 return null;
108 }
109
110 // it is not an ES module but it does not have CJS-specific elements.
111 if (!hasCjsKeywords(code, ignoreGlobal)) {
112 esModulesWithoutDefaultExport[id] = true;
113 return null;
114 }
115
116 const transformed = transformCommonjs(
117 this.parse,
118 code,
119 id,
120 entryModuleIds.indexOf(id) !== -1,
121 ignoreGlobal,
122 ignoreRequire,
123 customNamedExports[id],
124 sourceMap,
125 allowDynamicRequire,
126 ast
127 );
128 if (!transformed) {
129 esModulesWithoutDefaultExport[id] = true;
130 return null;
131 }
132
133 return transformed;
134 })
135 .catch(err => {
136 this.error(err, err.loc);
137 });
138
139 setIsCjsPromise(id, transformPromise.then(Boolean, () => false));
140 return transformPromise;
141 }
142 };
143 }
+0
-28
legacy/src/is-cjs.js less more
0 const isCjsPromises = Object.create(null);
1
2 export function getIsCjsPromise(id) {
3 let isCjsPromise = isCjsPromises[id];
4 if (isCjsPromise) return isCjsPromise.promise;
5
6 const promise = new Promise(resolve => {
7 isCjsPromises[id] = isCjsPromise = {
8 resolve,
9 promise: undefined
10 };
11 });
12 isCjsPromise.promise = promise;
13
14 return promise;
15 }
16
17 export function setIsCjsPromise(id, promise) {
18 const isCjsPromise = isCjsPromises[id];
19 if (isCjsPromise) {
20 if (isCjsPromise.resolve) {
21 isCjsPromise.resolve(promise);
22 isCjsPromise.resolve = undefined;
23 }
24 } else {
25 isCjsPromises[id] = { promise, resolve: undefined };
26 }
27 }
+0
-86
legacy/src/resolve-id.js less more
0 import { statSync } from 'fs';
1 import { dirname, resolve, sep } from 'path';
2 import defaultResolver from './default-resolver';
3 import { EXTERNAL_PREFIX, PROXY_PREFIX } from './helpers';
4 import { first } from './utils';
5
6 function getCandidatesForExtension(resolved, extension) {
7 return [resolved + extension, resolved + `${sep}index${extension}`];
8 }
9
10 function getCandidates(resolved, extensions) {
11 return extensions.reduce(
12 (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),
13 [resolved]
14 );
15 }
16
17 export function getResolveId(extensions) {
18 let resolveUsingOtherResolvers;
19
20 function resolveId(importee, importer) {
21 const isProxyModule = importee.startsWith(PROXY_PREFIX);
22 if (isProxyModule) {
23 importee = importee.slice(PROXY_PREFIX.length);
24 } else if (importee.startsWith('\0')) {
25 return importee;
26 }
27
28 if (importer && importer.startsWith(PROXY_PREFIX)) {
29 importer = importer.slice(PROXY_PREFIX.length);
30 }
31
32 return resolveUsingOtherResolvers.call(this, importee, importer).then(resolved => {
33 if (resolved) return isProxyModule ? PROXY_PREFIX + resolved : resolved;
34
35 resolved = defaultResolver(importee, importer);
36
37 if (isProxyModule) {
38 if (resolved) return PROXY_PREFIX + resolved;
39 return EXTERNAL_PREFIX + importee; // external
40 }
41
42 return resolved;
43 });
44 }
45
46 resolveId.setRollupOptions = function(options) {
47 const resolvers = (options.plugins || [])
48 .map(plugin => {
49 if (plugin.resolveId === resolveId) {
50 // substitute CommonJS resolution logic
51 return (importee, importer) => {
52 if (importee[0] !== '.' || !importer) return; // not our problem
53
54 const resolved = resolve(dirname(importer), importee);
55 const candidates = getCandidates(resolved, extensions);
56
57 for (let i = 0; i < candidates.length; i += 1) {
58 try {
59 const stats = statSync(candidates[i]);
60 if (stats.isFile()) return candidates[i];
61 } catch (err) {
62 /* noop */
63 }
64 }
65 };
66 }
67
68 return plugin.resolveId;
69 })
70 .filter(Boolean);
71
72 const isExternal = id =>
73 options.external
74 ? Array.isArray(options.external)
75 ? options.external.includes(id)
76 : options.external(id)
77 : false;
78
79 resolvers.unshift(id => (isExternal(id) ? false : null));
80
81 resolveUsingOtherResolvers = first(resolvers);
82 };
83
84 return resolveId;
85 }
+0
-497
legacy/src/transform.js less more
0 import { walk } from 'estree-walker';
1 import MagicString from 'magic-string';
2 import { attachScopes, extractAssignedNames, makeLegalIdentifier } from 'rollup-pluginutils';
3 import { flatten, isFalsy, isReference, isTruthy } from './ast-utils.js';
4 import { HELPERS_ID, PROXY_PREFIX } from './helpers.js';
5 import { getName } from './utils.js';
6
7 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(
8 ' '
9 );
10 const blacklist = { __esModule: true };
11 reserved.forEach(word => (blacklist[word] = true));
12
13 const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
14
15 const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
16 const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
17 const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
18 const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
19
20 function deconflict(scope, globals, identifier) {
21 let i = 1;
22 let deconflicted = identifier;
23
24 while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist)
25 deconflicted = `${identifier}_${i++}`;
26 scope.declarations[deconflicted] = true;
27
28 return deconflicted;
29 }
30
31 function tryParse(parse, code, id) {
32 try {
33 return parse(code, { allowReturnOutsideFunction: true });
34 } catch (err) {
35 err.message += ` in ${id}`;
36 throw err;
37 }
38 }
39
40 export function hasCjsKeywords(code, ignoreGlobal) {
41 const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
42 return firstpass.test(code);
43 }
44
45 export function checkEsModule(parse, code, id) {
46 const ast = tryParse(parse, code, id);
47
48 let isEsModule = false;
49 for (const node of ast.body) {
50 if (node.type === 'ExportDefaultDeclaration')
51 return { isEsModule: true, hasDefaultExport: true, ast };
52 if (node.type === 'ExportNamedDeclaration') {
53 isEsModule = true;
54 for (const specifier of node.specifiers) {
55 if (specifier.exported.name === 'default') {
56 return { isEsModule: true, hasDefaultExport: true, ast };
57 }
58 }
59 } else if (importExportDeclaration.test(node.type)) isEsModule = true;
60 }
61
62 return { isEsModule, hasDefaultExport: false, ast };
63 }
64
65 export function transformCommonjs(
66 parse,
67 code,
68 id,
69 isEntry,
70 ignoreGlobal,
71 ignoreRequire,
72 customNamedExports,
73 sourceMap,
74 allowDynamicRequire,
75 astCache
76 ) {
77 const ast = astCache || tryParse(parse, code, id);
78
79 const magicString = new MagicString(code);
80
81 const required = {};
82 // Because objects have no guaranteed ordering, yet we need it,
83 // we need to keep track of the order in a array
84 const sources = [];
85
86 let uid = 0;
87
88 let scope = attachScopes(ast, 'scope');
89 const uses = { module: false, exports: false, global: false, require: false };
90
91 let lexicalDepth = 0;
92 let programDepth = 0;
93
94 const globals = new Set();
95
96 const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers'); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
97
98 const namedExports = {};
99
100 // TODO handle transpiled modules
101 let shouldWrap = /__esModule/.test(code);
102
103 function isRequireStatement(node) {
104 if (!node) return;
105 if (node.type !== 'CallExpression') return;
106 if (node.callee.name !== 'require' || scope.contains('require')) return;
107 if (node.arguments.length === 0) return; // Weird case of require() without arguments
108 return true;
109 }
110
111 function hasDynamicArguments(node) {
112 return (
113 node.arguments.length > 1 ||
114 (node.arguments[0].type !== 'Literal' &&
115 (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))
116 );
117 }
118
119 function isStaticRequireStatement(node) {
120 if (!isRequireStatement(node)) return;
121 if (hasDynamicArguments(node)) return;
122 if (ignoreRequire(node.arguments[0].value)) return;
123 return true;
124 }
125
126 function getRequireStringArg(node) {
127 return node.arguments[0].type === 'Literal'
128 ? node.arguments[0].value
129 : node.arguments[0].quasis[0].value.cooked;
130 }
131
132 function getRequired(node, name) {
133 const sourceId = getRequireStringArg(node);
134 const existing = required[sourceId];
135 if (existing === undefined) {
136 if (!name) {
137 do name = `require$$${uid++}`;
138 while (scope.contains(name));
139 }
140
141 sources.push(sourceId);
142 required[sourceId] = { source: sourceId, name, importsDefault: false };
143 }
144
145 return required[sourceId];
146 }
147
148 // do a first pass, see which names are assigned to. This is necessary to prevent
149 // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
150 // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
151 const assignedTo = new Set();
152 walk(ast, {
153 enter(node) {
154 if (node.type !== 'AssignmentExpression') return;
155 if (node.left.type === 'MemberExpression') return;
156
157 extractAssignedNames(node.left).forEach(name => {
158 assignedTo.add(name);
159 });
160 }
161 });
162
163 walk(ast, {
164 enter(node, parent) {
165 if (sourceMap) {
166 magicString.addSourcemapLocation(node.start);
167 magicString.addSourcemapLocation(node.end);
168 }
169
170 // skip dead branches
171 if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
172 if (node === parent.consequent && isFalsy(parent.test)) return this.skip();
173 if (node === parent.alternate && isTruthy(parent.test)) return this.skip();
174 }
175
176 if (node._skip) return this.skip();
177
178 programDepth += 1;
179
180 if (node.scope) scope = node.scope;
181 if (functionType.test(node.type)) lexicalDepth += 1;
182
183 // if toplevel return, we need to wrap it
184 if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
185 shouldWrap = true;
186 }
187
188 // rewrite `this` as `commonjsHelpers.commonjsGlobal`
189 if (node.type === 'ThisExpression' && lexicalDepth === 0) {
190 uses.global = true;
191 if (!ignoreGlobal)
192 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
193 storeName: true
194 });
195 return;
196 }
197
198 // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
199 if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
200 const flattened = flatten(node.argument);
201 if (!flattened) return;
202
203 if (scope.contains(flattened.name)) return;
204
205 if (
206 flattened.keypath === 'module.exports' ||
207 flattened.keypath === 'module' ||
208 flattened.keypath === 'exports'
209 ) {
210 magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });
211 }
212 }
213
214 // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
215 // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
216 if (node.type === 'Identifier') {
217 if (isReference(node, parent) && !scope.contains(node.name)) {
218 if (node.name in uses) {
219 if (node.name === 'require') {
220 if (allowDynamicRequire) return;
221 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
222 storeName: true
223 });
224 }
225
226 uses[node.name] = true;
227 if (node.name === 'global' && !ignoreGlobal) {
228 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
229 storeName: true
230 });
231 }
232
233 // if module or exports are used outside the context of an assignment
234 // expression, we need to wrap the module
235 if (node.name === 'module' || node.name === 'exports') {
236 shouldWrap = true;
237 }
238 }
239
240 if (node.name === 'define') {
241 magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });
242 }
243
244 globals.add(node.name);
245 }
246
247 return;
248 }
249
250 // Is this an assignment to exports or module.exports?
251 if (node.type === 'AssignmentExpression') {
252 if (node.left.type !== 'MemberExpression') return;
253
254 const flattened = flatten(node.left);
255 if (!flattened) return;
256
257 if (scope.contains(flattened.name)) return;
258
259 const match = exportsPattern.exec(flattened.keypath);
260 if (!match || flattened.keypath === 'exports') return;
261
262 uses[flattened.name] = true;
263
264 // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
265 // if this isn't top-level, we'll need to wrap the module
266 if (programDepth > 3) shouldWrap = true;
267
268 node.left._skip = true;
269
270 if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
271 return node.right.properties.forEach(prop => {
272 if (prop.computed || prop.key.type !== 'Identifier') return;
273 const name = prop.key.name;
274 if (name === makeLegalIdentifier(name)) namedExports[name] = true;
275 });
276 }
277
278 if (match[1]) namedExports[match[1]] = true;
279 return;
280 }
281
282 // if this is `var x = require('x')`, we can do `import x from 'x'`
283 if (
284 node.type === 'VariableDeclarator' &&
285 node.id.type === 'Identifier' &&
286 isStaticRequireStatement(node.init)
287 ) {
288 // for now, only do this for top-level requires. maybe fix this in future
289 if (scope.parent) return;
290
291 // edge case — CJS allows you to assign to imports. ES doesn't
292 if (assignedTo.has(node.id.name)) return;
293
294 const required = getRequired(node.init, node.id.name);
295 required.importsDefault = true;
296
297 if (required.name === node.id.name) {
298 node._shouldRemove = true;
299 }
300 }
301
302 if (!isStaticRequireStatement(node)) return;
303
304 const required = getRequired(node);
305
306 if (parent.type === 'ExpressionStatement') {
307 // is a bare import, e.g. `require('foo');`
308 magicString.remove(parent.start, parent.end);
309 } else {
310 required.importsDefault = true;
311 magicString.overwrite(node.start, node.end, required.name);
312 }
313
314 node.callee._skip = true;
315 },
316
317 leave(node) {
318 programDepth -= 1;
319 if (node.scope) scope = scope.parent;
320 if (functionType.test(node.type)) lexicalDepth -= 1;
321
322 if (node.type === 'VariableDeclaration') {
323 let keepDeclaration = false;
324 let c = node.declarations[0].start;
325
326 for (let i = 0; i < node.declarations.length; i += 1) {
327 const declarator = node.declarations[i];
328
329 if (declarator._shouldRemove) {
330 magicString.remove(c, declarator.end);
331 } else {
332 if (!keepDeclaration) {
333 magicString.remove(c, declarator.start);
334 keepDeclaration = true;
335 }
336
337 c = declarator.end;
338 }
339 }
340
341 if (!keepDeclaration) {
342 magicString.remove(node.start, node.end);
343 }
344 }
345 }
346 });
347
348 if (
349 !sources.length &&
350 !uses.module &&
351 !uses.exports &&
352 !uses.require &&
353 (ignoreGlobal || !uses.global)
354 ) {
355 if (Object.keys(namedExports).length) {
356 throw new Error(
357 `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`
358 );
359 }
360 return null; // not a CommonJS module
361 }
362
363 const includeHelpers = shouldWrap || uses.global || uses.require;
364 const importBlock =
365 (includeHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : [])
366 .concat(
367 sources.map(source => {
368 // import the actual module before the proxy, so that we know
369 // what kind of proxy to build
370 return `import '${source}';`;
371 }),
372 sources.map(source => {
373 const { name, importsDefault } = required[source];
374 return `import ${importsDefault ? `${name} from ` : ``}'${PROXY_PREFIX}${source}';`;
375 })
376 )
377 .join('\n') + '\n\n';
378
379 const namedExportDeclarations = [];
380 let wrapperStart = '';
381 let wrapperEnd = '';
382
383 const moduleName = deconflict(scope, globals, getName(id));
384 if (!isEntry) {
385 const exportModuleExports = {
386 str: `export { ${moduleName} as __moduleExports };`,
387 name: '__moduleExports'
388 };
389
390 namedExportDeclarations.push(exportModuleExports);
391 }
392
393 const name = getName(id);
394
395 function addExport(x) {
396 const deconflicted = deconflict(scope, globals, name);
397
398 const declaration =
399 deconflicted === name
400 ? `export var ${x} = ${moduleName}.${x};`
401 : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`;
402
403 namedExportDeclarations.push({
404 str: declaration,
405 name: x
406 });
407 }
408
409 if (customNamedExports) customNamedExports.forEach(addExport);
410
411 const defaultExportPropertyAssignments = [];
412 let hasDefaultExport = false;
413
414 if (shouldWrap) {
415 const args = `module${uses.exports ? ', exports' : ''}`;
416
417 wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
418 wrapperEnd = `\n});`;
419 } else {
420 const names = [];
421
422 ast.body.forEach(node => {
423 if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
424 const left = node.expression.left;
425 const flattened = flatten(left);
426
427 if (!flattened) return;
428
429 const match = exportsPattern.exec(flattened.keypath);
430 if (!match) return;
431
432 if (flattened.keypath === 'module.exports') {
433 hasDefaultExport = true;
434 magicString.overwrite(left.start, left.end, `var ${moduleName}`);
435 } else {
436 const name = match[1];
437 const deconflicted = deconflict(scope, globals, name);
438
439 names.push({ name, deconflicted });
440
441 magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
442
443 const declaration =
444 name === deconflicted
445 ? `export { ${name} };`
446 : `export { ${deconflicted} as ${name} };`;
447
448 if (name !== 'default') {
449 namedExportDeclarations.push({
450 str: declaration,
451 name
452 });
453 delete namedExports[name];
454 }
455
456 defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
457 }
458 }
459 });
460
461 if (!hasDefaultExport) {
462 wrapperEnd = `\n\nvar ${moduleName} = {\n${names
463 .map(({ name, deconflicted }) => `\t${name}: ${deconflicted}`)
464 .join(',\n')}\n};`;
465 }
466 }
467 Object.keys(namedExports)
468 .filter(key => !blacklist[key])
469 .forEach(addExport);
470
471 const defaultExport = /__esModule/.test(code)
472 ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});`
473 : `export default ${moduleName};`;
474
475 const named = namedExportDeclarations
476 .filter(x => x.name !== 'default' || !hasDefaultExport)
477 .map(x => x.str);
478
479 const exportBlock =
480 '\n\n' +
481 [defaultExport]
482 .concat(named)
483 .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])
484 .join('\n');
485
486 magicString
487 .trim()
488 .prepend(importBlock + wrapperStart)
489 .trim()
490 .append(wrapperEnd + exportBlock);
491
492 code = magicString.toString();
493 const map = sourceMap ? magicString.generateMap() : null;
494
495 return { code, map };
496 }
+0
-24
legacy/src/utils.js less more
0 import { basename, dirname, extname, sep } from 'path';
1 import { makeLegalIdentifier } from 'rollup-pluginutils';
2
3 export function getName(id) {
4 const name = makeLegalIdentifier(basename(id, extname(id)));
5 if (name !== 'index') {
6 return name;
7 } else {
8 const segments = dirname(id).split(sep);
9 return makeLegalIdentifier(segments[segments.length - 1]);
10 }
11 }
12
13 // Return the first non-falsy result from an array of
14 // maybe-sync, maybe-promise-returning functions
15 export function first(candidates) {
16 return function(...args) {
17 return candidates.reduce((promise, candidate) => {
18 return promise.then(result =>
19 result != null ? result : Promise.resolve(candidate.call(this, ...args))
20 );
21 }, Promise.resolve());
22 };
23 }
+0
-3
legacy/test/form/async-function/input.js less more
0 module.exports = async function () {
1 // TODO
2 };
+0
-6
legacy/test/form/async-function/output.js less more
0 var input = async function () {
1 // TODO
2 };
3
4 export default input;
5 export { input as __moduleExports };
+0
-2
legacy/test/form/constant-template-literal/input.js less more
0 var foo = require(`tape`);
1 console.log(foo);
+0
-11
legacy/test/form/constant-template-literal/output.js less more
0 import 'tape';
1 import foo from 'commonjs-proxy-tape';
2
3 console.log(foo);
4
5 var input = {
6
7 };
8
9 export default input;
10 export { input as __moduleExports };
+0
-3
legacy/test/form/dynamic-template-literal/input.js less more
0 var pe = 'pe';
1 var foo = require(`ta${pe}`);
2 console.log(foo);
+0
-12
legacy/test/form/dynamic-template-literal/output.js less more
0 import * as commonjsHelpers from 'commonjsHelpers.js';
1
2 var pe = 'pe';
3 var foo = commonjsHelpers.commonjsRequire(`ta${pe}`);
4 console.log(foo);
5
6 var input = {
7
8 };
9
10 export default input;
11 export { input as __moduleExports };
+0
-5
legacy/test/form/ignore-ids/_config.js less more
0 module.exports = {
1 options: {
2 ignore: ['foo']
3 }
4 };
+0
-2
legacy/test/form/ignore-ids/input.js less more
0 var foo = require( 'foo' );
1 var bar = require( 'bar' );
+0
-11
legacy/test/form/ignore-ids/output.js less more
0 import 'bar';
1 import bar from 'commonjs-proxy-bar';
2
3 var foo = require( 'foo' );
4
5 var input = {
6
7 };
8
9 export default input;
10 export { input as __moduleExports };
+0
-5
legacy/test/form/ignore-ids-function/_config.js less more
0 module.exports = {
1 options: {
2 ignore: id => id === 'foo'
3 }
4 };
+0
-2
legacy/test/form/ignore-ids-function/input.js less more
0 var foo = require( 'foo' );
1 var bar = require( 'bar' );
+0
-11
legacy/test/form/ignore-ids-function/output.js less more
0 import 'bar';
1 import bar from 'commonjs-proxy-bar';
2
3 var foo = require( 'foo' );
4
5 var input = {
6
7 };
8
9 export default input;
10 export { input as __moduleExports };
+0
-4
legacy/test/form/multiple-var-declarations/input.js less more
0 var a = require('./a')()
1 , b = require('./b');
2
3 console.log( a, b );
+0
-15
legacy/test/form/multiple-var-declarations/output.js less more
0 import './a';
1 import './b';
2 import require$$0 from 'commonjs-proxy-./a';
3 import b from 'commonjs-proxy-./b';
4
5 var a = require$$0();
6
7 console.log( a, b );
8
9 var input = {
10
11 };
12
13 export default input;
14 export { input as __moduleExports };
+0
-4
legacy/test/form/multiple-var-declarations-b/input.js less more
0 var a = require('./a')
1 , b = 42;
2
3 console.log( a, b );
+0
-13
legacy/test/form/multiple-var-declarations-b/output.js less more
0 import './a';
1 import a from 'commonjs-proxy-./a';
2
3 var b = 42;
4
5 console.log( a, b );
6
7 var input = {
8
9 };
10
11 export default input;
12 export { input as __moduleExports };
+0
-5
legacy/test/form/multiple-var-declarations-c/input.js less more
0 var a = 'a'
1 , b = require( './b' )
2 , c = 'c';
3
4 console.log( a, b, c );
+0
-14
legacy/test/form/multiple-var-declarations-c/output.js less more
0 import './b';
1 import b from 'commonjs-proxy-./b';
2
3 var a = 'a'
4 , c = 'c';
5
6 console.log( a, b, c );
7
8 var input = {
9
10 };
11
12 export default input;
13 export { input as __moduleExports };
+0
-13
legacy/test/form/no-toplevel-return/input.js less more
0 var foo = function () {
1 return;
2 };
3
4 var bar = () => {
5 return;
6 };
7
8 function baz () {
9 return;
10 }
11
12 module.exports = 42;
+0
-16
legacy/test/form/no-toplevel-return/output.js less more
0 var foo = function () {
1 return;
2 };
3
4 var bar = () => {
5 return;
6 };
7
8 function baz () {
9 return;
10 }
11
12 var input = 42;
13
14 export default input;
15 export { input as __moduleExports };
+0
-1
legacy/test/form/optimised-default-export/input.js less more
0 module.exports = 42;
+0
-4
legacy/test/form/optimised-default-export/output.js less more
0 var input = 42;
1
2 export default input;
3 export { input as __moduleExports };
+0
-1
legacy/test/form/optimised-default-export-function/input.js less more
0 module.exports = function foo () {};
+0
-4
legacy/test/form/optimised-default-export-function/output.js less more
0 var input = function foo () {};
1
2 export default input;
3 export { input as __moduleExports };
+0
-2
legacy/test/form/optimised-default-export-function-double-assign/input.js less more
0 var bar;
1 module.exports = bar = function foo () {};
+0
-5
legacy/test/form/optimised-default-export-function-double-assign/output.js less more
0 var bar;
1 var input = bar = function foo () {};
2
3 export default input;
4 export { input as __moduleExports };
+0
-3
legacy/test/form/optimised-default-export-iife/input.js less more
0 module.exports = (function foo () {
1 return function fooChild() {};
2 }());
+0
-6
legacy/test/form/optimised-default-export-iife/output.js less more
0 var input = (function foo () {
1 return function fooChild() {};
2 }());
3
4 export default input;
5 export { input as __moduleExports };
+0
-2
legacy/test/form/optimised-named-export/input.js less more
0 exports.foo = 'a';
1 module.exports.bar = 'b';
+0
-12
legacy/test/form/optimised-named-export/output.js less more
0 var foo = 'a';
1 var bar = 'b';
2
3 var input = {
4 foo: foo,
5 bar: bar
6 };
7
8 export default input;
9 export { input as __moduleExports };
10 export { foo };
11 export { bar };
+0
-5
legacy/test/form/optimised-named-export-conflicts/input.js less more
0 var foo = 1;
1 var bar = 2;
2
3 exports.foo = 'a';
4 module.exports.bar = 'b';
+0
-15
legacy/test/form/optimised-named-export-conflicts/output.js less more
0 var foo = 1;
1 var bar = 2;
2
3 var foo_1 = 'a';
4 var bar_1 = 'b';
5
6 var input = {
7 foo: foo_1,
8 bar: bar_1
9 };
10
11 export default input;
12 export { input as __moduleExports };
13 export { foo_1 as foo };
14 export { bar_1 as bar };
+0
-5
legacy/test/form/require-collision/input.js less more
0 (function() {
1 var foo = require("foo");
2 var require$$0 = "FAIL";
3 console.log(foo);
4 })();
+0
-15
legacy/test/form/require-collision/output.js less more
0 import 'foo';
1 import require$$1 from 'commonjs-proxy-foo';
2
3 (function() {
4 var foo = require$$1;
5 var require$$0 = "FAIL";
6 console.log(foo);
7 })();
8
9 var input = {
10
11 };
12
13 export default input;
14 export { input as __moduleExports };
+0
-9
legacy/test/form/typeof-module-exports/input.js less more
0 var foo = 42;
1
2 if ( typeof exports === 'object' && typeof module === 'object' ) {
3 module.exports = foo;
4 } else if ( typeof define === 'function' && define.amd ) {
5 define([], function () { return foo; });
6 } else {
7 window.foo = foo;
8 }
+0
-16
legacy/test/form/typeof-module-exports/output.js less more
0 import * as commonjsHelpers from 'commonjsHelpers.js';
1
2 var input = commonjsHelpers.createCommonjsModule(function (module, exports) {
3 var foo = 42;
4
5 if ( 'object' === 'object' && 'object' === 'object' ) {
6 module.exports = foo;
7 } else if ( typeof undefined === 'function' && undefined.amd ) {
8 undefined([], function () { return foo; });
9 } else {
10 window.foo = foo;
11 }
12 });
13
14 export default input;
15 export { input as __moduleExports };
+0
-3
legacy/test/form/unambiguous-with-default-export/input.js less more
0 require( './foo.js' );
1
2 export default {};
+0
-3
legacy/test/form/unambiguous-with-default-export/output.js less more
0 require( './foo.js' );
1
2 export default {};
+0
-3
legacy/test/form/unambiguous-with-import/input.js less more
0 require( './foo.js' );
1
2 import './bar.js';
+0
-3
legacy/test/form/unambiguous-with-import/output.js less more
0 require( './foo.js' );
1
2 import './bar.js';
+0
-3
legacy/test/form/unambiguous-with-named-export/input.js less more
0 require( './foo.js' );
1
2 export {};
+0
-3
legacy/test/form/unambiguous-with-named-export/output.js less more
0 require( './foo.js' );
1
2 export {};
+0
-2
legacy/test/function/__esModule/answer.js less more
0 exports.__esModule = true;
1 exports.answer = 42;
+0
-5
legacy/test/function/__esModule/main.js less more
0 import * as x from './answer';
1
2 assert.ok( 'answer' in x );
3 assert.ok( 'default' in x ); // TODO is this right?
4 assert.ok( !( '__esModule' in x ) );
+0
-5
legacy/test/function/assign-properties-to-default-export/foo.js less more
0 var foo = {};
1
2 module.exports = foo;
3 module.exports.bar = 1;
4 exports.baz = 2;
+0
-4
legacy/test/function/assign-properties-to-default-export/main.js less more
0 import foo from './foo.js';
1
2 assert.equal( foo.bar, 1 );
3 assert.equal( foo.baz, 2 );
+0
-5
legacy/test/function/assumed-globals/_config.js less more
0 module.exports = {
1 context: {
2 document: { real: true }
3 }
4 };
+0
-5
legacy/test/function/assumed-globals/document.js less more
0 if ( typeof document !== 'undefined' ) {
1 module.exports = document;
2 } else {
3 module.exports = { fake: true };
4 }
+0
-3
legacy/test/function/assumed-globals/main.js less more
0 import document from './document.js';
1
2 assert.deepEqual( document, { real: true });
+0
-1
legacy/test/function/bare-import/_config.js less more
0 module.exports = {};
+0
-1
legacy/test/function/bare-import/bar.js less more
0 Math.bar = 42;
+0
-1
legacy/test/function/bare-import/foo.js less more
0 require( './bar.js' );
+0
-3
legacy/test/function/bare-import/main.js less more
0 import './foo.js';
1
2 assert.equal( Math.bar, 42 );
+0
-2
legacy/test/function/bare-import-comment/bar.js less more
0 // Great module
1 Math.bar = 42;
+0
-1
legacy/test/function/bare-import-comment/foo.js less more
0 require( './bar.js' );
+0
-3
legacy/test/function/bare-import-comment/main.js less more
0 import './foo.js';
1
2 assert.equal( Math.bar, 42 );
+0
-7
legacy/test/function/basic/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports: exports => {
4 assert.equal(exports, 42);
5 }
6 };
+0
-1
legacy/test/function/basic/foo.js less more
0 module.exports = 21;
+0
-2
legacy/test/function/basic/main.js less more
0 var foo = require( './foo' );
1 module.exports = foo * 2;
+0
-3
legacy/test/function/deconflict-export-and-local/index.js less more
0 var someValueModule = require('./someValue');
1
2 exports.someValue = someValueModule.someValue;
+0
-3
legacy/test/function/deconflict-export-and-local/main.js less more
0 import { someValue } from './index.js';
1
2 assert.equal( someValue, 10 );
+0
-1
legacy/test/function/deconflict-export-and-local/someValue.js less more
0 exports.someValue = 10;
+0
-1
legacy/test/function/dot/foo.bar.js less more
0 module.exports = 'fubar';
+0
-3
legacy/test/function/dot/main.js less more
0 var status = require( './foo.bar' );
1
2 assert.equal( status, 'fubar' );
+0
-3
legacy/test/function/duplicate-default-exports/main.js less more
0 import x from './x';
1
2 assert.strictEqual( x.default, x );
+0
-4
legacy/test/function/duplicate-default-exports/x.js less more
0 var x = {};
1
2 module.exports = x;
3 module.exports.default = x;
+0
-3
legacy/test/function/duplicate-default-exports-b/main.js less more
0 import x from './x';
1
2 assert.deepEqual( x, { default: 42 });
+0
-4
legacy/test/function/duplicate-default-exports-b/x.js less more
0 var x = {};
1
2 module.exports = x;
3 module.exports.default = 42;
+0
-6
legacy/test/function/duplicate-default-exports-c/exports.js less more
0 exports.Foo = 1;
1 exports.var = 'VAR';
2 exports.default = {
3 Foo: 2,
4 default: 3
5 };
+0
-11
legacy/test/function/duplicate-default-exports-c/main.js less more
0 import E from './exports.js';
1 import { Foo } from './exports.js';
2 import { var as Var } from './exports.js';
3
4 assert.strictEqual( E.Foo, 1 );
5 assert.strictEqual( E.var, 'VAR' );
6 assert.deepEqual( E.default, { Foo: 2, default: 3 });
7 assert.strictEqual( E.default.Foo, 2 );
8 assert.strictEqual( E.default.default, 3 );
9 assert.strictEqual( Foo, 1 );
10 assert.strictEqual( Var, 'VAR' );
+0
-1
legacy/test/function/export-default-from/_config.js less more
0 module.exports = {};
+0
-1
legacy/test/function/export-default-from/imported.js less more
0 export default 'default export';
+0
-1
legacy/test/function/export-default-from/main.js less more
0 assert.equal(require('./reexporter'), 'default export');
+0
-1
legacy/test/function/export-default-from/reexporter.js less more
0 export {default} from './imported';
+0
-7
legacy/test/function/exports/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports: exports => {
4 assert.equal(exports, 'BARBAZ');
5 }
6 };
+0
-2
legacy/test/function/exports/foo.js less more
0 exports.bar = 'BAR';
1 exports.baz = 'BAZ';
+0
-4
legacy/test/function/exports/main.js less more
0 var bar = require( './foo' ).bar;
1 var baz = require( './foo' ).baz;
2
3 module.exports = bar + baz;
+0
-10
legacy/test/function/external-imports/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 options: {
4 external: ['foo']
5 },
6 exports: exports => {
7 assert.equal(exports, 'foo');
8 }
9 };
+0
-3
legacy/test/function/external-imports/main.js less more
0 var foo = require( 'foo' );
1
2 module.exports = foo;
+0
-3
legacy/test/function/fallback-no-default/foo.js less more
0 export var one = 1;
1
2 export var two = 2;
+0
-4
legacy/test/function/fallback-no-default/main.js less more
0 var foo = require('./foo.js');
1
2 assert.equal( foo.one, 1 );
3 assert.equal( foo.two, 2 );
+0
-7
legacy/test/function/global-not-overwritten/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports(exports) {
4 assert.equal(exports.encoded, encodeURIComponent('test string'));
5 }
6 };
+0
-5
legacy/test/function/global-not-overwritten/encode.js less more
0 exports.encodeURIComponent = function () {
1 return encodeURIComponent( this.str );
2 };
3
4 global.foo = exports; // to ensure module is wrapped
+0
-8
legacy/test/function/global-not-overwritten/main.js less more
0 import { encodeURIComponent } from './encode.js';
1
2 var foo = {
3 str: 'test string',
4 encodeURIComponent
5 };
6
7 export var encoded = foo.encodeURIComponent();
+0
-11
legacy/test/function/global-var/main.js less more
0 function foo () {
1 var a = 1, global = {};
2 global.modified = true;
3 return global;
4 }
5
6 var notGlobal = foo();
7 assert.ok( notGlobal.modified );
8 assert.ok( !global.modified );
9
10 module.exports = {};
+0
-1
legacy/test/function/index/foo/index.js less more
0 module.exports = 42;
+0
-3
legacy/test/function/index/main.js less more
0 var foo = require( './foo' );
1
2 assert.equal( foo, 42 );
+0
-7
legacy/test/function/inline/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports: exports => {
4 assert.equal(exports(), 2);
5 }
6 };
+0
-1
legacy/test/function/inline/foo.js less more
0 module.exports = 1;
+0
-3
legacy/test/function/inline/main.js less more
0 module.exports = function () {
1 return require( './multiply' )( 2, require( './foo' ) );
2 };
+0
-3
legacy/test/function/inline/multiply.js less more
0 module.exports = function ( a, b ) {
1 return a * b;
2 };
+0
-2
legacy/test/function/named-exports/foo.js less more
0 exports.a = 1;
1 module.exports.b = 2;
+0
-4
legacy/test/function/named-exports/main.js less more
0 import { a, b } from './foo.js';
1
2 assert.equal( a, 1 );
3 assert.equal( b, 2 );
+0
-3
legacy/test/function/ordering/bar.js less more
0 var shared = require('./shared');
1
2 module.exports = shared.fooLoaded
+0
-4
legacy/test/function/ordering/foo.js less more
0 var shared = require('./shared');
1
2 // Mutate the shared module
3 shared.fooLoaded = true;
+0
-5
legacy/test/function/ordering/main.js less more
0 require('./foo');
1
2 var fooLoaded = require('./bar');
3
4 assert.ok( fooLoaded );
+0
-3
legacy/test/function/ordering/shared.js less more
0 module.exports = {
1 fooLoaded: false
2 };
+0
-6
legacy/test/function/react-apollo/commonjs-bar.js less more
0 function Bar () {
1 this.x = 42;
2 }
3
4 exports.__esModule = true;
5 exports.default = Bar;
+0
-4
legacy/test/function/react-apollo/commonjs-foo.js less more
0 var Bar = require( './commonjs-bar' );
1
2 exports.__esModule = true;
3 exports.Bar = Bar.default;
+0
-3
legacy/test/function/react-apollo/main.js less more
0 import { Bar } from './commonjs-foo.js';
1
2 assert.equal( new Bar().x, 42 );
+0
-4
legacy/test/function/reassignment/foo.js less more
0 function foo () {}
1 foo.something = false;
2
3 module.exports = foo;
+0
-8
legacy/test/function/reassignment/main.js less more
0 var foo = require( './foo.js' );
1
2 if ( !foo.something ) {
3 foo = function somethingElse () {}
4 foo.something = true;
5 }
6
7 assert.ok( foo.something );
+0
-9
legacy/test/function/reexports/_config.js less more
0 const path = require('path');
1
2 module.exports = {
3 pluginOptions: {
4 namedExports: {
5 [path.resolve(__dirname, 'foo.js')]: ['named']
6 }
7 }
8 };
+0
-1
legacy/test/function/reexports/bar.js less more
0 exports.named = 42;
+0
-1
legacy/test/function/reexports/foo.js less more
0 module.exports = require( './bar.js' );
+0
-3
legacy/test/function/reexports/main.js less more
0 import { named } from './foo.js';
1
2 assert.equal( named, 42 );
+0
-15
legacy/test/function/resolve-is-cjs-extension/_config.js less more
0 module.exports = {
1 description: 'always resolve cjs detection even if an imported file has an unknown extension',
2 options: {
3 plugins: [
4 {
5 resolveId(importee) {
6 if (importee === 'second') {
7 return `${__dirname}/second.x`;
8 }
9 }
10 }
11 ]
12 },
13 pluginOptions: {}
14 };
+0
-1
legacy/test/function/resolve-is-cjs-extension/main.js less more
0 assert.equal(require('second').result, 'second' );
+0
-1
legacy/test/function/resolve-is-cjs-extension/second.x less more
0 export const result = 'second';
+0
-17
legacy/test/function/resolve-is-cjs-filtered/_config.js less more
0 module.exports = {
1 description: 'always resolve cjs detection even if an imported file is filtered',
2 options: {
3 plugins: [
4 {
5 resolveId(importee) {
6 if (importee === 'second') {
7 return `${__dirname}/second.js`;
8 }
9 }
10 }
11 ]
12 },
13 pluginOptions: {
14 include: ['function/resolve-is-cjs-filtered/main.js']
15 }
16 };
+0
-1
legacy/test/function/resolve-is-cjs-filtered/main.js less more
0 assert.equal(require('second').result, 'second' );
+0
-1
legacy/test/function/resolve-is-cjs-filtered/second.js less more
0 export const result = 'second';
+0
-11
legacy/test/function/shadowing/main.js less more
0 function foo ( require ) {
1 require( 'not-an-actual-require-statement' );
2 }
3
4 var result;
5
6 foo( function ( msg ) {
7 result = msg;
8 });
9
10 assert.equal( result, 'not-an-actual-require-statement' );
+0
-9
legacy/test/function/skips-dead-branches/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 global: global => {
4 assert.equal(global.a, undefined);
5 assert.equal(global.b, 2);
6 assert.equal(global.c, undefined);
7 }
8 };
+0
-1
legacy/test/function/skips-dead-branches/a.js less more
0 global.a = 1;
+0
-2
legacy/test/function/skips-dead-branches/b.js less more
0 global.b = 2;
1 module.exports = 'b';
+0
-2
legacy/test/function/skips-dead-branches/c.js less more
0 global.c = 3;
1 module.exports = 'c';
+0
-7
legacy/test/function/skips-dead-branches/main.js less more
0 if ( 'development' === 'production' ) {
1 require( './a.js' );
2 }
3
4 module.exports = true ?
5 require( './b.js' ) :
6 require( './c.js' );
+0
-5
legacy/test/function/this/foo.js less more
0 module.exports = function augmentThis () {
1 this.x = 'x';
2 };
3
4 this.y = 'y';
+0
-7
legacy/test/function/this/main.js less more
0 var foo = require( './foo' );
1
2 var obj = {};
3 foo.call( obj );
4
5 assert.equal( obj.x, 'x' );
6 assert.equal( this.y, 'y' );
+0
-7
legacy/test/function/toplevel-return/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports: exports => {
4 assert.equal(exports, 'foo');
5 }
6 };
+0
-2
legacy/test/function/toplevel-return/foo.js less more
0 module.exports = 'foo';
1 return;
+0
-3
legacy/test/function/toplevel-return/main.js less more
0 var foo = require('./foo');
1
2 module.exports = 'foo';
+0
-7
legacy/test/function/toplevel-return-complex/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 exports: exports => {
4 assert.equal(exports, 'bar');
5 }
6 };
+0
-3
legacy/test/function/toplevel-return-complex/bar.js less more
0 module.exports = function () {
1 return true;
2 };
+0
-6
legacy/test/function/toplevel-return-complex/foo.js less more
0 var bar = require('./bar');
1 module.exports = 'bar';
2 if (bar()) {
3 return;
4 }
5 module.exports = 'foo';
+0
-3
legacy/test/function/toplevel-return-complex/main.js less more
0 var foo = require('./foo');
1
2 module.exports = foo;
+0
-1
legacy/test/function/trailing-slash/foo/index.js less more
0 module.exports = 42;
+0
-3
legacy/test/function/trailing-slash/main.js less more
0 var foo = require( './foo/' );
1
2 assert.equal( foo, 42 );
+0
-5
legacy/test/function/typeof-require/foo.js less more
0 if ( typeof require === 'function' && require ) {
1 module.exports = 1;
2 } else {
3 module.exports = 2;
4 }
+0
-3
legacy/test/function/typeof-require/main.js less more
0 import foo from './foo.js';
1
2 assert.equal( foo, 1 );
+0
-4
legacy/test/node_modules/bar/index.js less more
0 const baz = require('baz');
1 module.exports = function () {
2 return baz;
3 };
+0
-1
legacy/test/node_modules/baz/index.js less more
0 module.exports = 'hello';
+0
-1
legacy/test/node_modules/events/index.js less more
0 exports.message = 'this is not builtin';
+0
-2
legacy/test/node_modules/external/index.js less more
0 var externalLib = exports;
1 externalLib.message = 'it works';
+0
-1
legacy/test/node_modules/foo/index.js less more
0 module.exports = 'foo';
+0
-9
legacy/test/samples/array-destructuring-assignment/main.js less more
0
1 function shuffleArray(array) {
2 for (let i = array.length - 1; i > 0; i--) {
3 const j = Math.floor(Math.random() * (i + 1));
4 [array[i], array[j]] = [array[j], array[i]];
5 }
6 }
7
8 exports.shuffleArray = shuffleArray;
+0
-1
legacy/test/samples/corejs/literal-with-default.js less more
0 module.exports = { default: 'foobar', __esModule: true };
+0
-5
legacy/test/samples/custom-named-exports/main.js less more
0 import { named } from './secret-named-exporter.js';
1 import { message } from 'external';
2
3 assert.equal( named, 42 );
4 assert.equal( message, 'it works' );
+0
-2
legacy/test/samples/custom-named-exports/secret-named-exporter.js less more
0 var myLib = exports;
1 myLib.named = 42;
+0
-2
legacy/test/samples/custom-named-exports-false-positive/main.js less more
0 import { thing } from './other.js';
1 assert.equal( thing, 'yes' );
+0
-2
legacy/test/samples/custom-named-exports-false-positive/other.js less more
0 /* require (https://github.com/rollup/rollup-plugin-commonjs/issues/36) */
1 export var thing = 'yes';
+0
-3
legacy/test/samples/custom-named-exports-warn-builtins/main.js less more
0 import events from 'events';
1
2 assert.equal( events, 'x' );
+0
-2
legacy/test/samples/deconflict-helpers/main.js less more
0 var commonjsHelpers = { commonjsGlobal: 'nope' };
1 module.exports = global;
+0
-9
legacy/test/samples/define-is-undefined/foo.js less more
0 (function (global, factory) {
1 typeof define === 'function' && define.amd ? define(factory) :
2 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 (global.foo = factory());
4 }(this, (function () { 'use strict';
5
6 return 42;
7
8 })));
+0
-3
legacy/test/samples/define-is-undefined/main.js less more
0 import foo from './foo.js';
1
2 export default 42;
+0
-3
legacy/test/samples/es-modules-without-default-export/main.js less more
0 const { a } = require('./other.js');
1
2 assert.equal( a, 1 );
+0
-1
legacy/test/samples/es-modules-without-default-export/other.js less more
0 export const a = 1;
+0
-1
legacy/test/samples/extension/foo.coffee less more
0 module.exports = 21;
+0
-2
legacy/test/samples/extension/main.coffee less more
0 var foo = require( './foo' );
1 module.exports = foo * 2;
+0
-3
legacy/test/samples/external/main.js less more
0 import bar from 'bar';
1
2 export default bar().toUpperCase();
+0
-1
legacy/test/samples/global/main.js less more
0 global.foo = 'bar';
+0
-5
legacy/test/samples/global-in-if-block/main.js less more
0 if (!global.count) {
1 global.count = 0;
2 }
3
4 global.count += 1;
+0
-2
legacy/test/samples/ignore-global/firstpass.js less more
0 export var immediate = typeof global.setImmediate === 'function' ?
1 global.setImmediate : global.setTimeout;
+0
-4
legacy/test/samples/ignore-global/identifier.js less more
0 // require (firstpass)
1
2 export var immediate = typeof global.setImmediate === 'function' ?
3 global.setImmediate : global.setTimeout;
+0
-3
legacy/test/samples/ignore-global/main.js less more
0 export { immediate as immediate1 } from './firstpass';
1 export { immediate as immediate2 } from './identifier';
2 export { immediate as immediate3 } from './this';
+0
-6
legacy/test/samples/ignore-global/this.js less more
0 // require (firstpass)
1
2 // "this" will be rewritten with "undefined" by rollup
3 export var immediate = typeof this === 'undefined' ?
4 null : typeof this.setImmediate === 'function' ?
5 this.setImmediate : this.setTimeout;
+0
-1
legacy/test/samples/ignore-virtual-modules/main.js less more
0 module.exports = require('\0virtual');
+0
-1
legacy/test/samples/invalid-syntax/main.js less more
0 export const foo = 2,
+0
-4
legacy/test/samples/multiple-entry-points/2.js less more
0 function second () {
1 console.log('second');
2 }
3 exports.second = second;
+0
-5
legacy/test/samples/multiple-entry-points/3.js less more
0 function third () {
1 console.log('third');
2 }
3
4 exports.third = third;
+0
-3
legacy/test/samples/multiple-entry-points/4.js less more
0 export function fourth () {
1 console.log('fourth');
2 }
+0
-5
legacy/test/samples/multiple-entry-points/b.js less more
0 import { second } from './2';
1 import { third } from './3';
2
3 second();
4 third();
+0
-7
legacy/test/samples/multiple-entry-points/c.js less more
0 import { second } from './2';
1 import { third } from './3';
2 import { fourth } from './4';
3
4 second();
5 third();
6 fourth();
+0
-1
legacy/test/samples/named-exports-from-object-literal/a.js less more
0 module.exports = 1;
+0
-5
legacy/test/samples/named-exports-from-object-literal/main.js less more
0 import { a, b, c } from './other.js';
1
2 assert.equal( a, 1 );
3 assert.equal( b, 2 );
4 assert.equal( c, 3 );
+0
-9
legacy/test/samples/named-exports-from-object-literal/other.js less more
0 var a = require( './a.js' );
1 var b = 2;
2
3 module.exports = {
4 a: a,
5 b: b,
6 c: a + b,
7 2: 1 + 1
8 };
+0
-1
legacy/test/samples/other-transforms/bar.js less more
0 module.exports = 40;
+0
-3
legacy/test/samples/other-transforms/foo.js less more
0 var bar = require( './bar.js' );
1
2 module.exports = bar + 1;
+0
-3
legacy/test/samples/other-transforms/main.js less more
0 import foo from './foo.js';
1
2 assert.equal( foo, 42 );
+0
-1
legacy/test/samples/paren-expression/index.js less more
0 module.exports = (42);
+0
-1
legacy/test/samples/reexport/export.js less more
0 exports.named = 2;
+0
-3
legacy/test/samples/reexport/main.js less more
0 import { named } from './reexport.js';
1
2 assert.equal(named, 2);
+0
-1
legacy/test/samples/reexport/reexport.js less more
0 module.exports = require('./export.js');
+0
-1
legacy/test/samples/rename-index/invalid-var/index.js less more
0 module.exports = 'invalid';
+0
-5
legacy/test/samples/rename-index/main.js less more
0 import invalid from './invalid-var';
1 import valid from './validVar';
2 import other from './other/nonIndex';
3
4 console.log(invalid, valid, other);
+0
-1
legacy/test/samples/rename-index/other/nonIndex.js less more
0 module.exports = 'not an index file';
+0
-1
legacy/test/samples/rename-index/validVar/index.js less more
0 module.exports = 'valid';
+0
-1
legacy/test/samples/reserved-as-property/main.js less more
0 module.exports.delete = 'foo';
+0
-1
legacy/test/samples/sourcemap/foo.js less more
0 export default 42;
+0
-2
legacy/test/samples/sourcemap/main.js less more
0 var foo = require( './foo' );
1 console.log( foo );
+0
-5
legacy/test/samples/umd/correct-scoping.js less more
0 if ( typeof require === 'function' ) {
1 module.exports = function ( require ) {
2 return typeof require;
3 }( {} );
4 }
+0
-11
legacy/test/samples/umd/protobuf.js less more
0 // From https://github.com/rollup/rollup-plugin-commonjs/issues/38
1 (function(global, factory) {
2 /* AMD */ if (typeof define === 'function' && define["amd"])
3 define(["foo"], factory);
4 /* CommonJS */ else if (typeof require === "function" && typeof module === "object" && module && module["exports"])
5 module["exports"] = factory(require("foo"), true);
6 /* Global */ else
7 (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]);
8 })(this, function(ByteBuffer, isCommonJS) {
9 return isCommonJS;
10 })
+0
-40
legacy/test/samples/umd/sinon.js less more
0 // From https://github.com/rollup/rollup-plugin-commonjs/issues/38
1 var sinon = (function () { // eslint-disable-line no-unused-vars
2 "use strict";
3
4 var sinonModule;
5 var isNode = typeof module !== "undefined" && module.exports && typeof require === "function";
6 var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
7
8 function loadDependencies(require, exports, module) {
9 sinonModule = module.exports = require("./sinon/util/core");
10 require("./sinon/extend");
11 require("./sinon/walk");
12 require("./sinon/typeOf");
13 require("./sinon/times_in_words");
14 require("./sinon/spy");
15 require("./sinon/call");
16 require("./sinon/behavior");
17 require("./sinon/stub");
18 require("./sinon/mock");
19 require("./sinon/collection");
20 require("./sinon/assert");
21 require("./sinon/sandbox");
22 require("./sinon/test");
23 require("./sinon/test_case");
24 require("./sinon/match");
25 require("./sinon/format");
26 require("./sinon/log_error");
27 }
28
29 if (isAMD) {
30 define(loadDependencies);
31 } else if (isNode) {
32 loadDependencies(require, module.exports, module);
33 sinonModule = module.exports;
34 } else {
35 sinonModule = {};
36 }
37
38 return sinonModule;
39 }());
+0
-2
legacy/test/samples/use-own-output/from-rollup.js less more
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.x = 10
+0
-2
legacy/test/samples/use-own-output/main.js less more
0 import * as b from "./from-rollup";
1 window.b = b;
+0
-766
legacy/test/test.js less more
0 /* eslint-env mocha */
1 /* eslint-disable no-console */
2
3 const acorn = require('acorn');
4 const path = require('path');
5 const fs = require('fs');
6 const assert = require('assert');
7 const relative = require('require-relative');
8 const { SourceMapConsumer } = require('source-map');
9 const { getLocator } = require('locate-character');
10 const { rollup } = require('rollup');
11 const resolve = require('rollup-plugin-node-resolve');
12
13 function commonjs(options) {
14 delete require.cache[require.resolve('..')];
15 return require('..')(options);
16 }
17
18 require('source-map-support').install();
19
20 process.chdir(__dirname);
21
22 function execute(code, context = {}) {
23 let fn;
24 const contextKeys = Object.keys(context);
25 const argNames = contextKeys.concat('module', 'exports', 'require', 'global', 'assert', code);
26
27 try {
28 fn = new Function(...argNames);
29 } catch (err) {
30 // syntax error
31 console.log(code);
32 throw err;
33 }
34
35 const module = { exports: {} };
36 const global = {};
37
38 const argValues = contextKeys
39 .map(key => context[key])
40 .concat(module, module.exports, name => relative(name, 'test/x.js'), global, assert);
41
42 fn(...argValues);
43
44 return {
45 code,
46 exports: module.exports,
47 global
48 };
49 }
50
51 const getOutputFromGenerated = generated => (generated.output ? generated.output[0] : generated);
52
53 async function getCodeFromBundle(bundle, customOptions = {}) {
54 const options = Object.assign({ format: 'cjs' }, customOptions);
55 return getOutputFromGenerated(await bundle.generate(options)).code;
56 }
57
58 async function executeBundle(bundle, { context, exports } = {}) {
59 const code = await getCodeFromBundle(bundle, exports ? { exports } : {});
60 return execute(code, context);
61 }
62
63 const transformContext = {
64 parse: (input, options) =>
65 acorn.parse(
66 input,
67 Object.assign(
68 {
69 ecmaVersion: 9,
70 sourceType: 'module'
71 },
72 options
73 )
74 )
75 };
76
77 describe('rollup-plugin-commonjs', () => {
78 describe('form', () => {
79 fs.readdirSync('form').forEach(dir => {
80 let config;
81
82 try {
83 config = require(`./form/${dir}/_config.js`);
84 } catch (err) {
85 config = {};
86 }
87
88 (config.solo ? it.only : it)(dir, () => {
89 const { transform, options } = commonjs(config.options);
90 options({ input: 'main.js' });
91
92 const input = fs.readFileSync(`form/${dir}/input.js`, 'utf-8');
93
94 let outputFile = `form/${dir}/output`;
95 if (fs.existsSync(`${outputFile}.${process.platform}.js`)) {
96 outputFile += `.${process.platform}.js`;
97 } else {
98 outputFile += '.js';
99 }
100
101 const expected = fs.readFileSync(outputFile, 'utf-8').trim();
102
103 return transform.call(transformContext, input, 'input.js').then(transformed => {
104 const actual = (transformed ? transformed.code : input).trim().replace(/\0/g, '');
105 assert.equal(actual, expected);
106 });
107 });
108 });
109 });
110
111 describe('function', () => {
112 fs.readdirSync('function').forEach(dir => {
113 let config;
114
115 try {
116 config = require(`./function/${dir}/_config.js`);
117 } catch (err) {
118 config = {};
119 }
120
121 (config.solo ? it.only : it)(dir, async () => {
122 const options = Object.assign(
123 {
124 input: `function/${dir}/main.js`
125 },
126 config.options || {},
127 {
128 plugins: [
129 ...((config.options && config.options.plugins) || []),
130 commonjs(config.pluginOptions)
131 ]
132 }
133 );
134
135 const bundle = await rollup(options);
136 const code = await getCodeFromBundle(bundle);
137 if (config.show || config.solo) {
138 console.error(code);
139 }
140
141 const { exports, global } = execute(code, config.context);
142
143 if (config.exports) config.exports(exports);
144 if (config.global) config.global(global);
145 });
146 });
147 });
148
149 describe('misc tests', () => {
150 // most of these should be moved over to function...
151 it('generates a sourcemap', async () => {
152 const bundle = await rollup({
153 input: 'samples/sourcemap/main.js',
154 plugins: [commonjs({ sourceMap: true })]
155 });
156
157 const { code, map } = getOutputFromGenerated(
158 await bundle.generate({
159 format: 'cjs',
160 sourcemap: true,
161 sourcemapFile: path.resolve('bundle.js')
162 })
163 );
164
165 await SourceMapConsumer.with(map, null, async smc => {
166 const locator = getLocator(code, { offsetLine: 1 });
167
168 let generatedLoc = locator('42');
169 let loc = smc.originalPositionFor(generatedLoc); // 42
170 assert.equal(loc.source, 'samples/sourcemap/foo.js');
171 assert.equal(loc.line, 1);
172 assert.equal(loc.column, 15);
173
174 generatedLoc = locator('log');
175 loc = smc.originalPositionFor(generatedLoc); // log
176 assert.equal(loc.source, 'samples/sourcemap/main.js');
177 assert.equal(loc.line, 2);
178 assert.equal(loc.column, 8);
179 });
180 });
181
182 it('supports an array of multiple entry points', async () => {
183 const bundle = await rollup({
184 input: ['samples/multiple-entry-points/b.js', 'samples/multiple-entry-points/c.js'],
185 plugins: [commonjs()]
186 });
187
188 const { output } = await bundle.generate({
189 format: 'cjs',
190 chunkFileNames: '[name].js'
191 });
192 if (Array.isArray(output)) {
193 assert.equal(output.length, 3);
194 assert.ok(output.find(({ fileName }) => fileName === 'b.js'));
195 assert.ok(output.find(({ fileName }) => fileName === 'c.js'));
196 } else {
197 assert.equal(Object.keys(output).length, 3);
198 assert.equal('b.js' in output, true);
199 assert.equal('c.js' in output, true);
200 }
201 });
202
203 it('supports an object of multiple entry points', async () => {
204 const bundle = await rollup({
205 input: {
206 b: require.resolve('./samples/multiple-entry-points/b.js'),
207 c: require.resolve('./samples/multiple-entry-points/c.js')
208 },
209 plugins: [resolve(), commonjs()]
210 });
211
212 const { output } = await bundle.generate({
213 format: 'cjs',
214 chunkFileNames: '[name].js'
215 });
216
217 if (Array.isArray(output)) {
218 assert.equal(output.length, 3);
219 assert.ok(output.find(({ fileName }) => fileName === 'b.js'));
220 assert.ok(output.find(({ fileName }) => fileName === 'c.js'));
221 } else {
222 assert.equal(Object.keys(output).length, 3);
223 assert.equal('b.js' in output, true);
224 assert.equal('c.js' in output, true);
225 }
226 });
227
228 it('handles references to `global`', async () => {
229 const bundle = await rollup({
230 input: 'samples/global/main.js',
231 plugins: [commonjs()]
232 });
233
234 const code = await getCodeFromBundle(bundle);
235
236 const mockWindow = {};
237 const mockGlobal = {};
238 const mockSelf = {};
239
240 const fn = new Function('module', 'window', 'global', 'self', code);
241
242 fn({}, mockWindow, mockGlobal, mockSelf);
243 assert.equal(mockWindow.foo, 'bar', code);
244 assert.equal(mockGlobal.foo, undefined, code);
245 assert.equal(mockSelf.foo, undefined, code);
246
247 fn({}, undefined, mockGlobal, mockSelf);
248 assert.equal(mockGlobal.foo, 'bar', code);
249 assert.equal(mockSelf.foo, undefined, code);
250
251 fn({}, undefined, undefined, mockSelf);
252 assert.equal(mockSelf.foo, 'bar', code);
253 });
254
255 it('handles multiple references to `global`', async () => {
256 const bundle = await rollup({
257 input: 'samples/global-in-if-block/main.js',
258 plugins: [commonjs()]
259 });
260
261 const code = await getCodeFromBundle(bundle);
262 const fn = new Function('module', 'exports', 'window', code);
263 const module = { exports: {} };
264 const window = {};
265
266 fn(module, module.exports, window);
267 assert.equal(window.count, 1);
268
269 fn(module, module.exports, window);
270 assert.equal(window.count, 2);
271 });
272
273 it('handles transpiled CommonJS modules', async () => {
274 const bundle = await rollup({
275 input: 'samples/corejs/literal-with-default.js',
276 plugins: [commonjs()]
277 });
278
279 const code = await getCodeFromBundle(bundle);
280 const module = { exports: {} };
281
282 const fn = new Function('module', 'exports', code);
283 fn(module, module.exports);
284
285 assert.equal(module.exports, 'foobar', code);
286 });
287
288 it('handles successive builds', async () => {
289 const plugin = commonjs();
290 let bundle = await rollup({
291 input: 'samples/corejs/literal-with-default.js',
292 plugins: [plugin]
293 });
294 await bundle.generate({
295 format: 'cjs'
296 });
297
298 bundle = await rollup({
299 input: 'samples/corejs/literal-with-default.js',
300 plugins: [plugin]
301 });
302 const code = await getCodeFromBundle(bundle);
303
304 const module = { exports: {} };
305
306 const fn = new Function('module', 'exports', code);
307 fn(module, module.exports);
308
309 assert.equal(module.exports, 'foobar', code);
310 });
311
312 it('allows named exports to be added explicitly via config', async () => {
313 const bundle = await rollup({
314 input: 'samples/custom-named-exports/main.js',
315 plugins: [
316 resolve({ main: true }),
317 commonjs({
318 namedExports: {
319 'samples/custom-named-exports/secret-named-exporter.js': ['named'],
320 external: ['message']
321 }
322 })
323 ]
324 });
325
326 await executeBundle(bundle);
327 });
328
329 it('handles warnings without error when resolving named exports', () => {
330 return rollup({
331 input: 'samples/custom-named-exports-warn-builtins/main.js',
332 plugins: [
333 resolve(),
334 commonjs({
335 namedExports: {
336 events: ['message']
337 }
338 })
339 ]
340 });
341 });
342
343 it('ignores false positives with namedExports (#36)', async () => {
344 const bundle = await rollup({
345 input: 'samples/custom-named-exports-false-positive/main.js',
346 plugins: [
347 resolve({ main: true }),
348 commonjs({
349 namedExports: {
350 irrelevant: ['lol']
351 }
352 })
353 ]
354 });
355
356 await executeBundle(bundle);
357 });
358
359 it('converts a CommonJS module with custom file extension', async () => {
360 const bundle = await rollup({
361 input: 'samples/extension/main.coffee',
362 plugins: [commonjs({ extensions: ['.coffee'] })]
363 });
364
365 assert.equal((await executeBundle(bundle)).exports, 42);
366 });
367
368 it('identifies named exports from object literals', async () => {
369 const bundle = await rollup({
370 input: 'samples/named-exports-from-object-literal/main.js',
371 plugins: [commonjs()]
372 });
373
374 const { code } = await bundle.generate({
375 format: 'cjs'
376 });
377
378 const fn = new Function('module', 'assert', code);
379 fn({}, assert);
380 });
381
382 it('can ignore references to `global`', async () => {
383 const bundle = await rollup({
384 input: 'samples/ignore-global/main.js',
385 plugins: [commonjs({ ignoreGlobal: true })],
386 onwarn: warning => {
387 if (warning.code === 'THIS_IS_UNDEFINED') return;
388 console.warn(warning.message);
389 }
390 });
391
392 const code = await getCodeFromBundle(bundle);
393 const { exports, global } = await executeBundle(bundle);
394
395 assert.equal(exports.immediate1, global.setImmediate, code);
396 assert.equal(exports.immediate2, global.setImmediate, code);
397 assert.equal(exports.immediate3, null, code);
398 });
399
400 it('can handle parens around right have node while producing default export', async () => {
401 const bundle = await rollup({
402 input: 'samples/paren-expression/index.js',
403 plugins: [commonjs()]
404 });
405
406 assert.equal((await executeBundle(bundle)).exports, 42);
407 });
408
409 describe('typeof transforms', () => {
410 it('correct-scoping', async () => {
411 const bundle = await rollup({
412 input: 'samples/umd/correct-scoping.js',
413 plugins: [commonjs()]
414 });
415
416 assert.equal((await executeBundle(bundle)).exports, 'object');
417 });
418
419 it('protobuf', async () => {
420 const bundle = await rollup({
421 input: 'samples/umd/protobuf.js',
422 external: ['bytebuffer'],
423 plugins: [commonjs()]
424 });
425
426 assert.equal((await executeBundle(bundle)).exports, true);
427 });
428
429 it('sinon', async () => {
430 const bundle = await rollup({
431 input: 'samples/umd/sinon.js',
432 plugins: [commonjs()]
433 });
434
435 const { code } = getOutputFromGenerated(await bundle.generate({ format: 'es' }));
436
437 assert.equal(code.indexOf('typeof require'), -1, code);
438 // assert.notEqual( code.indexOf( 'typeof module' ), -1, code ); // #151 breaks this test
439 // assert.notEqual( code.indexOf( 'typeof define' ), -1, code ); // #144 breaks this test
440 });
441 });
442
443 it('deconflicts helper name', async () => {
444 const bundle = await rollup({
445 input: 'samples/deconflict-helpers/main.js',
446 plugins: [commonjs()]
447 });
448
449 const { exports } = await executeBundle(bundle);
450 assert.notEqual(exports, 'nope');
451 });
452
453 it('deconflicts reserved keywords', async () => {
454 const bundle = await rollup({
455 input: 'samples/reserved-as-property/main.js',
456 plugins: [commonjs()]
457 });
458
459 const reservedProp = (await executeBundle(bundle, { exports: 'named' })).exports.delete;
460 assert.equal(reservedProp, 'foo');
461 });
462
463 it('does not process the entry file when it has a leading "." (issue #63)', async () => {
464 const bundle = await rollup({
465 input: './function/basic/main.js',
466 plugins: [commonjs()]
467 });
468
469 await executeBundle(bundle);
470 });
471
472 it('does not reexport named contents', async () => {
473 try {
474 await rollup({
475 input: 'samples/reexport/main.js',
476 plugins: [commonjs()]
477 });
478 } catch (error) {
479 assert.equal(
480 error.message,
481 `'named' is not exported by samples${path.sep}reexport${path.sep}reexport.js`
482 );
483 }
484 });
485
486 it('respects other plugins', async () => {
487 const bundle = await rollup({
488 input: 'samples/other-transforms/main.js',
489 plugins: [
490 {
491 transform(code, id) {
492 if (id[0] === '\0') return null;
493 return code.replace('40', '41');
494 }
495 },
496 commonjs()
497 ]
498 });
499
500 await executeBundle(bundle);
501 });
502
503 it('rewrites top-level defines', async () => {
504 const bundle = await rollup({
505 input: 'samples/define-is-undefined/main.js',
506 plugins: [commonjs()]
507 });
508
509 function define() {
510 throw new Error('nope');
511 }
512
513 define.amd = true;
514
515 const { exports } = await executeBundle(bundle, { context: { define } });
516 assert.equal(exports, 42);
517 });
518
519 it('respects options.external', async () => {
520 const bundle = await rollup({
521 input: 'samples/external/main.js',
522 plugins: [resolve(), commonjs()],
523 external: ['baz']
524 });
525
526 const code = await getCodeFromBundle(bundle);
527 assert.equal(code.indexOf('hello'), -1);
528
529 const { exports } = await executeBundle(bundle);
530 assert.equal(exports, 'HELLO');
531 });
532
533 it('prefers to set name using directory for index files', async () => {
534 const bundle = await rollup({
535 input: 'samples/rename-index/main.js',
536 plugins: [commonjs()]
537 });
538
539 const code = await getCodeFromBundle(bundle);
540 assert.equal(code.indexOf('var index'), -1);
541 assert.notEqual(code.indexOf('var invalidVar'), -1);
542 assert.notEqual(code.indexOf('var validVar'), -1);
543 assert.notEqual(code.indexOf('var nonIndex'), -1);
544 });
545
546 it('does not misassign default when consuming rollup output', async () => {
547 // Issue #224
548 const bundle = await rollup({
549 input: 'samples/use-own-output/main.js',
550 plugins: [commonjs()]
551 });
552
553 const window = {};
554 await executeBundle(bundle, { context: { window } });
555 assert.notEqual(window.b.default, undefined);
556 });
557
558 it('does not warn even if the ES module not export "default"', async () => {
559 const warns = [];
560 await rollup({
561 input: 'samples/es-modules-without-default-export/main.js',
562 plugins: [commonjs()],
563 onwarn: warn => warns.push(warn)
564 });
565 assert.equal(warns.length, 0);
566
567 await rollup({
568 input: 'function/bare-import/bar.js',
569 plugins: [commonjs()],
570 onwarn: warn => warns.push(warn)
571 });
572 assert.equal(warns.length, 0);
573
574 await rollup({
575 input: 'function/bare-import-comment/main.js',
576 plugins: [commonjs()],
577 onwarn: warn => warns.push(warn)
578 });
579 assert.equal(warns.length, 0);
580 });
581
582 it('compiles with cache', async () => {
583 // specific commonjs require() to ensure same instance is used
584 const commonjs = require('..');
585
586 const bundle = await rollup({
587 input: 'function/index/main.js',
588 plugins: [commonjs()]
589 });
590
591 await rollup({
592 input: 'function/index/main.js',
593 plugins: [commonjs()],
594 cache: bundle
595 });
596 });
597
598 it('creates an error with a code frame when parsing fails', async () => {
599 try {
600 await rollup({
601 input: 'samples/invalid-syntax/main.js',
602 plugins: [commonjs()]
603 });
604 } catch (error) {
605 assert.equal(error.frame, '1: export const foo = 2,\n ^');
606 }
607 });
608
609 it('ignores virtual modules', async () => {
610 const bundle = await rollup({
611 input: 'samples/ignore-virtual-modules/main.js',
612 plugins: [
613 commonjs(),
614 {
615 load(id) {
616 if (id === '\0virtual') {
617 return 'export default "Virtual export"';
618 }
619 }
620 }
621 ]
622 });
623 assert.equal((await executeBundle(bundle)).exports, 'Virtual export');
624 });
625
626 it('does not produce warnings when importing .mjs without default export', async () => {
627 const bundle = await rollup({
628 input: 'main.mjs',
629 onwarn(warning) {
630 // The interop should not trigger a "default is not exported" warning
631 throw new Error(`Unexpected warning: ${warning.message}`);
632 },
633 plugins: [
634 commonjs(),
635 {
636 load(id) {
637 if (id === 'main.mjs') {
638 return 'import cjs from "cjs.js"; export default cjs;';
639 }
640 if (id === 'cjs.js') {
641 // CJS libraries expect to receive a CJS file here
642 return 'module.exports = require("fromNodeModules");';
643 }
644 if (id === 'fromNodeModules.mjs') {
645 return 'export const result = "from esm";';
646 }
647 },
648 resolveId(id) {
649 // rollup-plugin-node-resolve usually prefers ESM versions
650 if (id === 'fromNodeModules') {
651 return 'fromNodeModules.mjs';
652 }
653 return id;
654 }
655 }
656 ]
657 });
658 assert.deepEqual((await executeBundle(bundle)).exports, { result: 'from esm' });
659 });
660
661 it('produces optimized code when importing esm with a known default export', async () => {
662 const bundle = await rollup({
663 input: 'main.js',
664 plugins: [
665 commonjs(),
666 {
667 load(id) {
668 if (id === 'main.js') {
669 return 'module.exports = require("esm.js")';
670 }
671 if (id === 'esm.js') {
672 return 'export const ignored = "ignored"; export default "default"';
673 }
674 },
675 resolveId(id) {
676 return id;
677 }
678 }
679 ]
680 });
681 const code = await getCodeFromBundle(bundle);
682 assert.equal(
683 code,
684 `'use strict';
685
686 var require$$0 = "default";
687
688 var main = require$$0;
689
690 module.exports = main;
691 `
692 );
693 });
694
695 it('produces optimized code when importing esm without a default export', async () => {
696 const bundle = await rollup({
697 input: 'main.js',
698 plugins: [
699 commonjs(),
700 {
701 load(id) {
702 if (id === 'main.js') {
703 return 'module.exports = require("esm.js")';
704 }
705 if (id === 'esm.js') {
706 return 'export const value = "value";';
707 }
708 },
709 resolveId(id) {
710 return id;
711 }
712 }
713 ]
714 });
715 const code = await getCodeFromBundle(bundle);
716 assert.equal(
717 code,
718 `'use strict';
719
720 const value = "value";
721
722 var esm = /*#__PURE__*/Object.freeze({
723 value: value
724 });
725
726 var main = esm;
727
728 module.exports = main;
729 `
730 );
731 });
732
733 it('handles array destructuring assignment', async () => {
734 const bundle = await rollup({
735 input: 'samples/array-destructuring-assignment/main.js',
736 plugins: [commonjs({ sourceMap: true })]
737 });
738
739 const code = await getCodeFromBundle(bundle);
740 assert.equal(
741 code,
742 `'use strict';
743
744 Object.defineProperty(exports, '__esModule', { value: true });
745
746 function shuffleArray(array) {
747 for (let i = array.length - 1; i > 0; i--) {
748 const j = Math.floor(Math.random() * (i + 1));
749 [array[i], array[j]] = [array[j], array[i]];
750 }
751 }
752
753 var shuffleArray_1 = shuffleArray;
754
755 var main = {
756 shuffleArray: shuffleArray_1
757 };
758
759 exports.default = main;
760 exports.shuffleArray = shuffleArray_1;
761 `
762 );
763 });
764 });
765 });
+0
-16
legacy/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "lib": [
3 "es6"
4 ],
5 "noImplicitAny": true,
6 "noImplicitThis": true,
7 "strict": true,
8 "noEmit": true,
9 "allowJs": true
10 },
11 "files": [
12 "index.d.ts",
13 "typings-test.js"
14 ]
15 }
+0
-24
legacy/typings-test.js less more
0 // @ts-check
1 import commonjs from '.';
2
3 /** @type {import("rollup").RollupOptions} */
4 const config = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife'
9 },
10 plugins: [
11 commonjs({
12 include: 'node_modules/**',
13 exclude: [ 'node_modules/foo/**', 'node_modules/bar/**', /node_modules/ ],
14 extensions: [ '.js', '.coffee' ],
15 ignoreGlobal: false,
16 sourceMap: false,
17 namedExports: { './module.js': ['foo', 'bar' ] },
18 ignore: [ 'conditional-runtime-dependency' ]
19 })
20 ]
21 };
22
23 export default config;
+0
-81
package.json less more
0 {
1 "name": "@rollup/plugins",
2 "private": true,
3 "scripts": {
4 "ci:coverage": "node scripts/run-changed.js ci:coverage",
5 "ci:coverage:submit": "node scripts/codecov",
6 "ci:lint": "node scripts/run-changed.js ci:lint",
7 "ci:test": "node scripts/run-changed.js ci:test",
8 "lint": "pnpm run lint:docs && npm run lint:json && pnpm run lint:package && node scripts/run-changed.js lint",
9 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
10 "lint:js": "eslint scripts util",
11 "lint:json": "prettier --write tsconfig.*.json codecov.yml pnpm-workspace.yaml",
12 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
13 "preinstall": "node scripts/disallow-npm.js",
14 "pub": "node scripts/pub.js",
15 "publish": "node scripts/publish.js",
16 "security": "pnpm audit",
17 "test": "node scripts/run-changed.js test"
18 },
19 "dependencies": {
20 "conventional-commits-parser": "^3.1.0",
21 "semver": "^7.3.2",
22 "write-pkg": "^4.0.0"
23 },
24 "devDependencies": {
25 "@ava/babel": "^1.0.1",
26 "@typescript-eslint/eslint-plugin": "^3.7.1",
27 "@typescript-eslint/parser": "^3.7.1",
28 "ava": "^3.11.0",
29 "chalk": "^4.1.0",
30 "codecov-lite": "^1.0.3",
31 "del-cli": "^3.0.1",
32 "eslint-config-rollup": "^0.1.0",
33 "execa": "^4.0.3",
34 "globby": "^11.0.1",
35 "husky": "^4.2.5",
36 "lint-staged": "^10.2.11",
37 "nyc": "^15.1.0",
38 "pnpm": "^5.4.6",
39 "prettier": "^2.0.5",
40 "prettier-plugin-package": "^1.0.0",
41 "ts-node": "^8.10.2",
42 "tsconfig-paths": "^3.9.0",
43 "tslib": "^2.0.0",
44 "typescript": "^3.9.7",
45 "yaml": "^1.10.0"
46 },
47 "ava": {
48 "files": [
49 "!**/fixtures/**",
50 "!**/helpers/**",
51 "!**/recipes/**",
52 "!**/types.ts"
53 ]
54 },
55 "husky": {
56 "hooks": {
57 "pre-commit": "lint-staged"
58 }
59 },
60 "lint-staged": {
61 "*.{ts,js}": [
62 "eslint --fix"
63 ],
64 "*.md": [
65 "prettier --single-quote --write"
66 ],
67 "*package.json": [
68 "prettier --write --plugin=prettier-plugin-package"
69 ]
70 },
71 "nyc": {
72 "include": [
73 "lib/**/*.js"
74 ],
75 "exclude": [
76 "lib/client*.js",
77 "test/"
78 ]
79 }
80 }
+0
-1
packages/.eslintignore less more
0 **/output/**
+0
-5
packages/.eslintrc less more
0 {
1 "rules": {
2 "import/no-extraneous-dependencies": "off"
3 }
4 }
+0
-81
packages/alias/CHANGELOG.md less more
0 # @rollup/plugin-alias ChangeLog
1
2 ## v3.1.1
3
4 _2020-06-05_
5
6 ### Bugfixes
7
8 - fix: properly initialize custom resolvers (#426)
9
10 ## v3.1.0
11
12 _2020-04-12_
13
14 ### Features
15
16 - feat: Move to Typescript (#228)
17
18 ## v3.0.1
19
20 _2020-02-01_
21
22 ### Updates
23
24 - docs: Fix reference to plugin-node-resolve (#175)
25 - chore: update dependencies (bcb53d8)
26 - chore: update dependencies (e36540f)
27 - chore: fix minor linting issue (a695579)
28
29 ## 3.0.0
30
31 ### Breaking Changes
32
33 - feat(alias): built-in resolving algorithm is replaced in favor of Rollup's `this.resolve()` (#34)
34
35 ## 2.2.0
36
37 _2019-10-21_
38
39 - Support resolving `index.js` files in directories ([#64](https://github.com/rollup/rollup-plugin-alias/pull/64) by @jerriclynsjohn)
40
41 ## 2.1.0
42
43 _2019-10-18_
44
45 - Add support for object syntax ([#61](https://github.com/rollup/rollup-plugin-alias/pull/61) by @Andarist)
46
47 ## 2.0.1
48
49 _2019-09-27_
50
51 - Update dependencies ([#59](https://github.com/rollup/rollup-plugin-alias/pull/59) by @lukastaegert)
52 - Make volume letter regexp case independent ([#57](https://github.com/rollup/rollup-plugin-alias/pull/57) by @MarekLacoAXA)
53
54 ## 2.0.0
55
56 _2019-08-22_
57
58 - Add RegExp support and strict order of entries ([#53](https://github.com/rollup/rollup-plugin-alias/pull/53) by @thiscantbeserious)
59
60 ### Breaking Changes
61
62 Aliases always need to be provided as an array, see #53
63
64 ## 1.5.2
65
66 - Update dependencies
67
68 ## 1.5.1
69
70 - Update tests for Rollup@1.0 compatibility and tests ([#48](https://github.com/rollup/rollup-plugin-alias/pull/48))
71
72 ## 1.4.0
73
74 - Various Windows fixes ([#22](https://github.com/rollup/rollup-plugin-alias/pull/22))
75 - Don't try to alias entry file ([#29](https://github.com/rollup/rollup-plugin-alias/pull/29))
76
77 ## 1.3.0
78
79 - Start maintaining a changelog
80 - Fix `isFilePath` on Windows ([#3](https://github.com/rollup/rollup-plugin-alias/issues/3))
+0
-174
packages/alias/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-alias
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-alias
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-alias
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-alias
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-alias
10
11 🍣 A Rollup plugin for defining aliases when bundling packages.
12
13 ## Alias 101
14
15 Suppose we have the following `import` defined in a hypothetical file:
16
17 ```javascript
18 import batman from '../../../batman';
19 ```
20
21 This probably doesn't look too bad on its own. But consider that may not be the only instance in your codebase, and that after a refactor this might be incorrect. With this plugin in place, you can alias `../../../batman` with `batman` for readability and maintainability. In the case of a refactor, only the alias would need to be changed, rather than navigating through the codebase and changing all imports.
22
23 ```javascript
24 import batman from 'batman';
25 ```
26
27 If this seems familiar to Webpack users, it should. This is plugin mimics the `resolve.extensions` and `resolve.alias` functionality in Webpack.
28
29 ## Requirements
30
31 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
32
33 ## Install
34
35 Using npm:
36
37 ```console
38 npm install @rollup/plugin-alias --save-dev
39 # or
40 yarn add -D @rollup/plugin-alias
41 ```
42
43 ## Usage
44
45 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
46
47 ```js
48 import alias from '@rollup/plugin-alias';
49
50 module.exports = {
51 input: 'src/index.js',
52 output: {
53 dir: 'output',
54 format: 'cjs'
55 },
56 plugins: [
57 alias({
58 entries: [
59 { find: 'utils', replacement: '../../../utils' },
60 { find: 'batman-1.0.0', replacement: './joker-1.5.0' }
61 ]
62 })
63 ]
64 };
65 ```
66
67 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). If the build produces any errors, the plugin will write a 'alias' character to stderr, which should be audible on most systems.
68
69 ## Options
70
71 ### `customResolver`
72
73 Type: `Function | Object`<br>
74 Default: `null`
75
76 Instructs the plugin to use an alternative resolving algorithm, rather than the Rollup's resolver. Please refer to the [Rollup documentation](https://rollupjs.org/guide/en/#hooks) for more information about the `resolveId` hook. For a detailed example, see: [Custom Resolvers](#custom-resolvers).
77
78 ### `entries`
79
80 Type: `Object | Array[...Object]`<br>
81 Default: `null`
82
83 Specifies an `Object`, or an `Array` of `Object`, which defines aliases used to replace values in `import` or `require` statements. With either format, the order of the entries is important, in that the first defined rules are applied first. This option also supports [Regular Expression Alias](#regular-expression-aliases) matching.
84
85 #### `Object` Format
86
87 The `Object` format allows specifying aliases as a key, and the corresponding value as the actual `import` value. For example:
88
89 ```js
90 alias({
91 entries: {
92 utils: '../../../utils',
93 'batman-1.0.0': './joker-1.5.0'
94 }
95 });
96 ```
97
98 #### `Array[...Object]` Format
99
100 The `Array[...Object]` format allows specifying aliases as objects, which can be useful for complex key/value pairs.
101
102 ```js
103 entries: [
104 { find: 'utils', replacement: '../../../utils' },
105 { find: 'batman-1.0.0', replacement: './joker-1.5.0' }
106 ];
107 ```
108
109 ## Regular Expression Aliases
110
111 Regular Expressions can be used to search in a more distinct and complex manner. e.g. To perform partial replacements via sub-pattern matching.
112
113 To remove something in front of an import and append an extension, use a pattern such as:
114
115 ```js
116 { find:/^i18n\!(.*)/, replacement: '$1.js' }
117 ```
118
119 This would be useful for loaders, and files that were previously transpiled via the AMD module, to properly handle them in rollup as internals.
120
121 To replace extensions with another, a pattern like the following might be used:
122
123 ```js
124 { find:/^(.*)\.js$/, replacement: '$1.alias' }
125 ```
126
127 This would replace the file extension for all imports ending with `.js` to `.alias`.
128
129 ## Resolving algorithm
130
131 This plugin uses resolver plugins specified for Rollup and eventually Rollup default algorithm. If you rely on Node specific features, you probably want [@rollup/plugin-node-resolve](https://www.npmjs.com/package/@rollup/plugin-node-resolve) in your setup.
132
133 ## Custom Resolvers
134
135 The `customResolver` option can be leveraged to provide separate module resolution for an individual alias.
136
137 Example:
138
139 ```javascript
140 // rollup.config.js
141 import alias from '@rollup/plugin-alias';
142 import resolve from '@rollup/plugin-node-resolve';
143
144 const customResolver = resolve({
145 extensions: ['.mjs', '.js', '.jsx', '.json', '.sass', '.scss']
146 });
147 const projectRootDir = path.resolve(__dirname);
148
149 export default {
150 // ...
151 plugins: [
152 alias({
153 entries: [
154 {
155 find: 'src',
156 replacement: path.resolve(projectRootDir, 'src')
157 // OR place `customResolver` here. See explanation below.
158 }
159 ],
160 customResolver
161 }),
162 resolve()
163 ]
164 };
165 ```
166
167 In the example above the alias `src` is used, which uses the `node-resolve` algorithm for files _aliased_ with `src`, by passing the `customResolver` option. The `resolve()` plugin is kept separate in the plugins list for other files which are not _aliased_ with `src`. The `customResolver` option can be passed inside each `entries` item for granular control over resolving allowing each alias a preferred resolver.
168
169 ## Meta
170
171 [CONTRIBUTING](/.github/CONTRIBUTING.md)
172
173 [LICENSE (MIT)](/LICENSE)
+0
-77
packages/alias/package.json less more
0 {
1 "name": "@rollup/plugin-alias",
2 "version": "3.1.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Define and resolve aliases for bundle dependencies",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Johannes Stein",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/alias#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint && pnpm run test",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "types",
36 "README.md",
37 "LICENSE"
38 ],
39 "keywords": [
40 "rollup",
41 "plugin",
42 "resolve",
43 "alias"
44 ],
45 "peerDependencies": {
46 "rollup": "^1.20.0||^2.0.0"
47 },
48 "dependencies": {
49 "slash": "^3.0.0"
50 },
51 "devDependencies": {
52 "@rollup/plugin-node-resolve": "^8.4.0",
53 "@rollup/plugin-typescript": "^5.0.2",
54 "del-cli": "^3.0.1",
55 "rollup": "^2.23.0"
56 },
57 "types": "types/index.d.ts",
58 "ava": {
59 "babel": {
60 "compileEnhancements": false
61 },
62 "extensions": [
63 "ts"
64 ],
65 "require": [
66 "ts-node/register"
67 ],
68 "files": [
69 "!**/fixtures/**",
70 "!**/output/**",
71 "!**/helpers/**",
72 "!**/recipes/**",
73 "!**/types.ts"
74 ]
75 }
76 }
+0
-13
packages/alias/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.ts',
6 external: [...Object.keys(pkg.dependencies), 'os'],
7 output: [
8 { file: pkg.main, format: 'cjs', exports: 'auto' },
9 { file: pkg.module, format: 'es' }
10 ],
11 plugins: [typescript({ sourceMap: false })]
12 };
+0
-124
packages/alias/src/index.ts less more
0 import { platform } from 'os';
1
2 import { PartialResolvedId, Plugin } from 'rollup';
3 import slash from 'slash';
4
5 import { Alias, ResolverFunction, RollupAliasOptions } from '../types';
6
7 const VOLUME = /^([A-Z]:)/i;
8 const IS_WINDOWS = platform() === 'win32';
9
10 const noop = () => null;
11
12 function matches(pattern: string | RegExp, importee: string) {
13 if (pattern instanceof RegExp) {
14 return pattern.test(importee);
15 }
16 if (importee.length < pattern.length) {
17 return false;
18 }
19 if (importee === pattern) {
20 return true;
21 }
22 const importeeStartsWithKey = importee.indexOf(pattern) === 0;
23 const importeeHasSlashAfterKey = importee.substring(pattern.length)[0] === '/';
24 return importeeStartsWithKey && importeeHasSlashAfterKey;
25 }
26
27 function normalizeId(id: string): string;
28 function normalizeId(id: string | undefined): string | undefined;
29 function normalizeId(id: string | undefined) {
30 if (typeof id === 'string' && (IS_WINDOWS || VOLUME.test(id))) {
31 return slash(id.replace(VOLUME, ''));
32 }
33 return id;
34 }
35
36 function getEntries({ entries }: RollupAliasOptions): Alias[] {
37 if (!entries) {
38 return [];
39 }
40
41 if (Array.isArray(entries)) {
42 return entries;
43 }
44
45 return Object.entries(entries).map(([key, value]) => {
46 return { find: key, replacement: value };
47 });
48 }
49
50 function getCustomResolver(
51 { customResolver }: Alias,
52 options: RollupAliasOptions
53 ): ResolverFunction | null {
54 if (typeof customResolver === 'function') {
55 return customResolver;
56 }
57 if (customResolver && typeof customResolver.resolveId === 'function') {
58 return customResolver.resolveId;
59 }
60 if (typeof options.customResolver === 'function') {
61 return options.customResolver;
62 }
63 if (options.customResolver && typeof options.customResolver.resolveId === 'function') {
64 return options.customResolver.resolveId;
65 }
66 return null;
67 }
68
69 export default function alias(options: RollupAliasOptions = {}): Plugin {
70 const entries = getEntries(options);
71
72 if (entries.length === 0) {
73 return {
74 name: 'alias',
75 resolveId: noop
76 };
77 }
78
79 return {
80 name: 'alias',
81 buildStart(inputOptions) {
82 return Promise.all(
83 [...entries, options].map(
84 ({ customResolver }) =>
85 customResolver &&
86 typeof customResolver === 'object' &&
87 typeof customResolver.buildStart === 'function' &&
88 customResolver.buildStart.call(this, inputOptions)
89 )
90 ).then(() => {
91 // enforce void return value
92 });
93 },
94 resolveId(importee, importer) {
95 const importeeId = normalizeId(importee);
96 const importerId = normalizeId(importer);
97
98 // First match is supposed to be the correct one
99 const matchedEntry = entries.find((entry) => matches(entry.find, importeeId));
100 if (!matchedEntry || !importerId) {
101 return null;
102 }
103
104 const updatedId = normalizeId(
105 importeeId.replace(matchedEntry.find, matchedEntry.replacement)
106 );
107
108 const customResolver = getCustomResolver(matchedEntry, options);
109 if (customResolver) {
110 return customResolver.call(this, updatedId, importerId);
111 }
112
113 return this.resolve(updatedId, importer, { skipSelf: true }).then((resolved) => {
114 let finalResult: PartialResolvedId | null = resolved;
115 if (!finalResult) {
116 finalResult = { id: updatedId };
117 }
118
119 return finalResult;
120 });
121 }
122 };
123 }
+0
-0
packages/alias/test/fixtures/Svelte/index.svelte less more
(Empty file)
+0
-1
packages/alias/test/fixtures/aliasMe.js less more
0 export default 42;
+0
-1
packages/alias/test/fixtures/folder/anotherNumber.js less more
0 export default 33;
+0
-1
packages/alias/test/fixtures/folder/deep/deep2/index.js less more
0 export default 1;
+0
-0
packages/alias/test/fixtures/folder/hipster.jsx less more
(Empty file)
+0
-2
packages/alias/test/fixtures/folder/index.js less more
0 // eslint-disable-next-line import/no-unresolved, import/extensions
1 export { default } from 'superdeep';
+0
-11
packages/alias/test/fixtures/index.js less more
0 /* eslint-disable import/no-unresolved, import/extensions */
1
2 import fancyNumber from 'fancyNumber';
3
4 import moreNumbers from 'numberFolder/anotherNumber';
5
6 import nonAliased from './nonAliased';
7 import anotherFancyNumber from './anotherFancyNumber';
8 import anotherNumber from './numberFolder/anotherNumber';
9
10 export default fancyNumber + anotherFancyNumber + nonAliased + anotherNumber + moreNumbers;
+0
-1
packages/alias/test/fixtures/localAliasMe.js less more
0 export default 42;
+0
-1
packages/alias/test/fixtures/nonAliased.js less more
0 export default 24;
+0
-440
packages/alias/test/test.js less more
0 import path, { posix } from 'path';
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4 import slash from 'slash';
5
6 // eslint-disable-next-line import/no-unresolved, import/extensions
7 import nodeResolvePlugin from '@rollup/plugin-node-resolve';
8
9 import alias from '../dist';
10
11 const normalizePath = (pathToNormalize) => slash(pathToNormalize.replace(/^([A-Z]:)/, ''));
12 const DIRNAME = normalizePath(__dirname);
13
14 /**
15 * Helper function to test configuration with Rollup
16 * @param plugins is an array of plugins for Rollup, they should include "alias"
17 * @param tests is an array of pairs [source, importer]
18 * @returns {Promise<unknown>}
19 */
20 function resolveWithRollup(plugins, tests) {
21 if (!plugins.find((p) => p.name === 'alias')) {
22 throw new Error('`plugins` should include the alias plugin.');
23 }
24 return new Promise((resolve, reject) => {
25 rollup({
26 input: 'dummy-input',
27 plugins: [
28 {
29 name: 'test-plugin',
30 buildStart() {
31 resolve(
32 // The buildStart hook is the first to have access to this.resolve
33 // We map the tests to an array of resulting ids
34 Promise.all(
35 tests.map(({ source, importer }) =>
36 this.resolve(source, importer).then((result) => (result ? result.id : null))
37 )
38 )
39 );
40 },
41 resolveId(id) {
42 if (id === 'dummy-input') return id;
43 return null;
44 },
45 load(id) {
46 if (id === 'dummy-input') return 'console.log("test");';
47 return null;
48 }
49 },
50 ...plugins
51 ]
52 // if Rollup throws an error, this should reject the test
53 }).catch(reject);
54 });
55 }
56
57 /**
58 * Helper function to test configuration with Rollup and injected alias plugin
59 * @param aliasOptions is a configuration for alias plugin
60 * @param tests is an array of pairs [source, importer]
61 * @returns {Promise<unknown>}
62 */
63 function resolveAliasWithRollup(aliasOptions, tests) {
64 return resolveWithRollup([alias(aliasOptions)], tests);
65 }
66
67 test('type', (t) => {
68 t.is(typeof alias, 'function');
69 });
70
71 test('instance', (t) => {
72 const result = alias();
73 t.is(typeof result, 'object');
74 t.is(typeof result.resolveId, 'function');
75 });
76
77 test('defaults', (t) => {
78 const result = alias({});
79 t.is(typeof result, 'object');
80 t.is(typeof result.resolveId, 'function');
81 });
82
83 test('Simple aliasing (array)', (t) =>
84 resolveAliasWithRollup(
85 {
86 entries: [
87 { find: 'foo', replacement: 'bar' },
88 { find: 'pony', replacement: 'paradise' },
89 { find: './local', replacement: 'global' }
90 ]
91 },
92 [
93 { source: 'foo', importer: '/src/importer.js' },
94 { source: 'pony', importer: '/src/importer.js' },
95 { source: './local', importer: '/src/importer.js' }
96 ]
97 ).then((result) => t.deepEqual(result, ['bar', 'paradise', 'global'])));
98
99 test('Simple aliasing (object)', (t) =>
100 resolveAliasWithRollup(
101 {
102 entries: {
103 foo: 'bar',
104 pony: 'paradise',
105 './local': 'global'
106 }
107 },
108 [
109 { source: 'foo', importer: '/src/importer.js' },
110 { source: 'pony', importer: '/src/importer.js' },
111 { source: './local', importer: '/src/importer.js' }
112 ]
113 ).then((result) => t.deepEqual(result, ['bar', 'paradise', 'global'])));
114
115 test('RegExp aliasing', (t) =>
116 resolveAliasWithRollup(
117 {
118 entries: [
119 { find: /f(o+)bar/, replacement: 'f$1bar2019' },
120 {
121 find: new RegExp('.*pony.*'),
122 replacement: 'i/am/a/barbie/girl'
123 },
124 { find: /^test\/$/, replacement: 'this/is/strict' }
125 ]
126 },
127 [
128 {
129 source: 'fooooooooobar',
130 importer: '/src/importer.js'
131 },
132 {
133 source: 'im/a/little/pony/yes',
134 importer: '/src/importer.js'
135 },
136 { source: './test', importer: '/src/importer.js' },
137 { source: 'test', importer: '/src/importer.js' },
138 { source: 'test/', importer: '/src/importer.js' }
139 ]
140 ).then((result) =>
141 t.deepEqual(result, ['fooooooooobar2019', 'i/am/a/barbie/girl', null, null, 'this/is/strict'])
142 ));
143
144 test('Will not confuse modules with similar names', (t) =>
145 resolveAliasWithRollup(
146 {
147 entries: [
148 { find: 'foo', replacement: 'bar' },
149 { find: './foo', replacement: 'bar' }
150 ]
151 },
152 [
153 { source: 'foo2', importer: '/src/importer.js' },
154 {
155 source: './fooze/bar',
156 importer: '/src/importer.js'
157 },
158 {
159 source: './someFile.foo',
160 importer: '/src/importer.js'
161 }
162 ]
163 ).then((result) => t.deepEqual(result, [null, null, null])));
164
165 test('Leaves entry file untouched if matches alias', (t) =>
166 resolveAliasWithRollup(
167 {
168 entries: [{ find: 'abacaxi', replacement: './abacaxi' }]
169 },
170 // eslint-disable-next-line no-undefined
171 [{ source: 'abacaxi/entry.js' }]
172 ).then((result) => t.deepEqual(result, [null])));
173
174 test('i/am/a/file', (t) =>
175 resolveAliasWithRollup(
176 {
177 entries: [{ find: 'resolve', replacement: 'i/am/a/file' }]
178 },
179 [{ source: 'resolve', importer: '/src/import.js' }]
180 ).then((result) => t.deepEqual(result, ['i/am/a/file'])));
181
182 test('Windows absolute path aliasing', (t) =>
183 resolveAliasWithRollup(
184 {
185 entries: [
186 {
187 find: 'resolve',
188 replacement: 'E:\\react\\node_modules\\fbjs\\lib\\warning'
189 }
190 ]
191 },
192 [
193 {
194 source: 'resolve',
195 importer: posix.resolve(DIRNAME, './fixtures/index.js')
196 }
197 ]
198 ).then((result) =>
199 t.deepEqual(result, [normalizePath('E:\\react\\node_modules\\fbjs\\lib\\warning')])
200 ));
201
202 /**
203 * Helper function to get moduleIDs from final Rollup bundle
204 * @param bundle Rollup bundle
205 * @returns {PromiseLike<T>|Promise<unknown>}
206 */
207 const getModuleIdsFromBundle = (bundle) => {
208 if (bundle.modules) {
209 return Promise.resolve(bundle.modules.map((module) => module.id));
210 }
211 return bundle
212 .generate({ format: 'esm' })
213 .then((generated) => {
214 if (generated.output) {
215 return generated.output.length
216 ? generated.output
217 : Object.keys(generated.output).map((chunkName) => generated.output[chunkName]);
218 }
219 return [generated];
220 })
221 .then((chunks) =>
222 chunks.reduce((moduleIds, chunk) => moduleIds.concat(Object.keys(chunk.modules)), [])
223 );
224 };
225
226 test('Works in rollup with non fake input', (t) =>
227 rollup({
228 input: './test/fixtures/index.js',
229 plugins: [
230 alias({
231 entries: [
232 { find: 'fancyNumber', replacement: './aliasMe' },
233 {
234 find: './anotherFancyNumber',
235 replacement: './localAliasMe'
236 },
237 { find: 'numberFolder', replacement: './folder' },
238 {
239 find: './numberFolder',
240 replacement: './folder'
241 }
242 ]
243 })
244 ]
245 })
246 .then(getModuleIdsFromBundle)
247 .then((moduleIds) => {
248 const normalizedIds = moduleIds.map((id) => path.resolve(id)).sort();
249 t.is(normalizedIds.length, 5);
250 [
251 '/fixtures/aliasMe.js',
252 '/fixtures/folder/anotherNumber.js',
253 '/fixtures/index.js',
254 '/fixtures/localAliasMe.js',
255 '/fixtures/nonAliased.js'
256 ]
257 .map((id) => path.normalize(id))
258 .forEach((expectedId, index) =>
259 t.is(
260 normalizedIds[index].endsWith(expectedId),
261 true,
262 `expected ${normalizedIds[index]} to end with ${expectedId}`
263 )
264 );
265 }));
266
267 test('Global customResolver function', (t) => {
268 const customResult = 'customResult';
269
270 return resolveAliasWithRollup(
271 {
272 entries: [
273 {
274 find: 'test',
275 replacement: path.resolve('./test/files/folder/hipster.jsx')
276 }
277 ],
278 customResolver: () => customResult
279 },
280 [
281 {
282 source: 'test',
283 importer: posix.resolve(DIRNAME, './files/index.js')
284 }
285 ]
286 ).then((result) => t.deepEqual(result, [customResult]));
287 });
288
289 test('Local customResolver function', (t) => {
290 const customResult = 'customResult';
291 const localCustomResult = 'localCustomResult';
292
293 return resolveAliasWithRollup(
294 {
295 entries: [
296 {
297 find: 'test',
298 replacement: path.resolve('./test/files/folder/hipster.jsx'),
299 customResolver: () => localCustomResult
300 }
301 ],
302 customResolver: () => customResult
303 },
304 [
305 {
306 source: 'test',
307 importer: posix.resolve(DIRNAME, './files/index.js')
308 }
309 ]
310 ).then((result) => t.deepEqual(result, [localCustomResult]));
311 });
312
313 test('Global customResolver plugin-like object', (t) => {
314 const customResult = 'customResult';
315
316 return resolveAliasWithRollup(
317 {
318 entries: [
319 {
320 find: 'test',
321 replacement: path.resolve('./test/files/folder/hipster.jsx')
322 }
323 ],
324 customResolver: { resolveId: () => customResult }
325 },
326 [
327 {
328 source: 'test',
329 importer: posix.resolve(DIRNAME, './files/index.js')
330 }
331 ]
332 ).then((result) => t.deepEqual(result, [customResult]));
333 });
334
335 test('Local customResolver plugin-like object', (t) => {
336 const customResult = 'customResult';
337 const localCustomResult = 'localCustomResult';
338
339 return resolveAliasWithRollup(
340 {
341 entries: [
342 {
343 find: 'test',
344 replacement: path.resolve('./test/files/folder/hipster.jsx'),
345 customResolver: {
346 resolveId: () => localCustomResult
347 }
348 }
349 ],
350 customResolver: { resolveId: () => customResult }
351 },
352 [
353 {
354 source: 'test',
355 importer: posix.resolve(DIRNAME, './files/index.js')
356 }
357 ]
358 ).then((result) => t.deepEqual(result, [localCustomResult]));
359 });
360
361 test('supports node-resolve as a custom resolver', (t) =>
362 resolveAliasWithRollup(
363 {
364 entries: [
365 {
366 find: 'local-resolver',
367 replacement: path.resolve(DIRNAME, 'fixtures'),
368 customResolver: nodeResolvePlugin()
369 },
370 {
371 find: 'global-resolver',
372 replacement: path.resolve(DIRNAME, 'fixtures', 'folder')
373 }
374 ],
375 customResolver: nodeResolvePlugin()
376 },
377 [
378 {
379 source: 'local-resolver',
380 importer: posix.resolve(DIRNAME, './files/index.js')
381 },
382 {
383 source: 'global-resolver',
384 importer: posix.resolve(DIRNAME, './files/index.js')
385 }
386 ]
387 ).then((result) =>
388 t.deepEqual(result, [
389 path.resolve(DIRNAME, 'fixtures', 'index.js'),
390 path.resolve(DIRNAME, 'fixtures', 'folder', 'index.js')
391 ])
392 ));
393
394 test('Alias + rollup-plugin-node-resolve', (t) =>
395 rollup({
396 input: './test/fixtures/index.js',
397 plugins: [
398 alias({
399 entries: [
400 { find: 'fancyNumber', replacement: './aliasMe' },
401 {
402 find: './anotherFancyNumber',
403 replacement: './localAliasMe'
404 },
405 {
406 find: 'numberFolder/anotherNumber',
407 replacement: './folder'
408 },
409 {
410 find: './numberFolder',
411 replacement: './folder'
412 },
413 { find: 'superdeep', replacement: './deep/deep2' }
414 ]
415 }),
416 nodeResolvePlugin()
417 ]
418 })
419 .then(getModuleIdsFromBundle)
420 .then((moduleIds) => {
421 const normalizedIds = moduleIds.map((id) => path.resolve(id)).sort();
422 t.is(normalizedIds.length, 6);
423 [
424 '/fixtures/aliasMe.js',
425 '/fixtures/folder/anotherNumber.js',
426 '/fixtures/folder/deep/deep2/index.js',
427 '/fixtures/index.js',
428 '/fixtures/localAliasMe.js',
429 '/fixtures/nonAliased.js'
430 ]
431 .map((id) => path.normalize(id))
432 .forEach((expectedId, index) =>
433 t.is(
434 normalizedIds[index].endsWith(expectedId),
435 true,
436 `expected ${normalizedIds[index]} to end with ${expectedId}`
437 )
438 );
439 }));
+0
-7
packages/alias/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": [
3 "src/**/*",
4 "types/**/*"
5 ]
6 }
+0
-36
packages/alias/types/index.d.ts less more
0 import { Plugin, PluginHooks } from 'rollup';
1
2 export interface Alias {
3 find: string | RegExp;
4 replacement: string;
5 customResolver?: ResolverFunction | ResolverObject | null;
6 }
7
8 export type ResolverFunction = PluginHooks['resolveId'];
9
10 export interface ResolverObject {
11 buildStart?: PluginHooks['buildStart'];
12 resolveId: ResolverFunction;
13 }
14
15 export interface RollupAliasOptions {
16 /**
17 * Instructs the plugin to use an alternative resolving algorithm,
18 * rather than the Rollup's resolver.
19 * @default null
20 */
21 customResolver?: ResolverFunction | ResolverObject | null;
22
23 /**
24 * Specifies an `Object`, or an `Array` of `Object`,
25 * which defines aliases used to replace values in `import` or `require` statements.
26 * With either format, the order of the entries is important,
27 * in that the first defined rules are applied first.
28 */
29 entries?: readonly Alias[] | { [find: string]: string };
30 }
31
32 /**
33 * 🍣 A Rollup plugin for defining aliases when bundling packages.
34 */
35 export default function alias(options?: RollupAliasOptions): Plugin;
+0
-32
packages/auto-install/CHANGELOG.md less more
0 # @rollup/plugin-auto-install ChangeLog
1
2 ## v2.1.0
3
4 _2020-04-12_
5
6 ### Features
7
8 - feat: Move to Typescript (#229)
9
10 ### Updates
11
12 - chore: correct devDeps (dde1a83)
13 - test: fix yarn tests (#147)
14
15 ## 2.0.0
16
17 - Move to monorepo
18 - Refactor
19 - rollup@^1.20.0 is now a peerDependency
20
21 ## 1.0.2
22
23 - Ignore virtual modules
24
25 ## 1.0.1
26
27 - Prevent duplicate installs
28
29 ## 1.0.0
30
31 - First release
+0
-72
packages/auto-install/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-auto-install
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-auto-install
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-auto-install
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-auto-install
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-auto-install
10
11 🍣 A Rollup plugin which automatically installs dependencies that are imported by a bundle, even if not yet in `package.json`.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-auto-install --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import auto from '@rollup/plugin-auto-install';
31 import resolve from '@rollup/plugin-node-resolve';
32
33 export default {
34 input: 'src/index.js',
35 output: {
36 dir: 'output',
37 format: 'cjs'
38 },
39 plugins: [auto(), resolve()]
40 };
41 ```
42
43 _Note: ensure that this plugin is added to the `plugins` array *before* [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve)._
44
45 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).
46
47 ## Options
48
49 ### `pkgFile`
50
51 Type: `String`<br>
52 Default: `'{cwd}/package.json'`
53
54 Specifies the location on disk of the target `package.json` file. If the file doesn't exist, it will be created by the plugin, as package managers need to populate the `dependencies` property.
55
56 ### `manager`
57
58 Type: `String`<br>
59 Default: `see below`
60
61 Specifies the package manager to use; `npm` or `yarn`. If not specified, the plugin will default to `yarn` if `yarn.lock` exists, or `npm` otherwise.
62
63 ## Credits
64
65 Thanks to [Guillermo Rauch](https://twitter.com/rauchg) for the idea.
66
67 ## Meta
68
69 [CONTRIBUTING](/.github/CONTRIBUTING.md)
70
71 [LICENSE (MIT)](/LICENSE)
+0
-72
packages/auto-install/package.json less more
0 {
1 "name": "@rollup/plugin-auto-install",
2 "version": "2.1.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Automatically install dependencies that are imported by a bundle",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/auto-install/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "prebuild": "del-cli dist",
25 "prepare": "pnpm run build",
26 "prepublishOnly": "pnpm run lint",
27 "pretest": "pnpm run build",
28 "test": "ava"
29 },
30 "files": [
31 "dist",
32 "types",
33 "README.md",
34 "LICENSE"
35 ],
36 "keywords": [
37 "rollup",
38 "plugin",
39 "auto",
40 "install",
41 "npm",
42 "modules"
43 ],
44 "peerDependencies": {
45 "rollup": "^1.20.0||^2.0.0"
46 },
47 "devDependencies": {
48 "@rollup/plugin-node-resolve": "^8.4.0",
49 "@rollup/plugin-typescript": "^5.0.2",
50 "del": "^5.1.0",
51 "node-noop": "^1.0.0",
52 "rollup": "^2.23.0"
53 },
54 "types": "types/index.d.ts",
55 "ava": {
56 "babel": true,
57 "extensions": [
58 "ts"
59 ],
60 "require": [
61 "ts-node/register"
62 ],
63 "files": [
64 "!**/fixtures/**",
65 "!**/output/**",
66 "!**/helpers/**",
67 "!**/recipes/**",
68 "!**/types.ts"
69 ]
70 }
71 }
+0
-13
packages/auto-install/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.ts',
6 plugins: [typescript({ sourceMap: false })],
7 external: ['path', 'fs', 'child_process', 'module', 'util'],
8 output: [
9 { format: 'cjs', file: pkg.main, exports: 'auto' },
10 { format: 'esm', file: pkg.module }
11 ]
12 };
+0
-74
packages/auto-install/src/index.ts less more
0 import * as fs from 'fs';
1 import * as path from 'path';
2 import mod from 'module';
3 import { exec } from 'child_process';
4 import { promisify } from 'util';
5
6 import { Plugin } from 'rollup';
7
8 import { RollupAutoInstallOptions } from '../types';
9
10 const execAsync = promisify(exec);
11
12 export default function autoInstall(opts: RollupAutoInstallOptions = {}): Plugin {
13 const defaults = {
14 // intentionally undocumented options. used for tests
15 commands: {
16 npm: 'npm install',
17 yarn: 'yarn add'
18 },
19 manager: fs.existsSync('yarn.lock') ? 'yarn' : 'npm',
20 pkgFile: path.resolve(opts.pkgFile || 'package.json')
21 };
22
23 const options = Object.assign({}, defaults, opts);
24 const { manager, pkgFile } = options;
25 const validManagers = ['npm', 'yarn'];
26
27 if (!validManagers.includes(manager)) {
28 throw new RangeError(
29 `'${manager}' is not a valid package manager. ` +
30 `Valid managers include: '${validManagers.join("', '")}'.`
31 );
32 }
33
34 let pkg: any;
35 if (fs.existsSync(pkgFile)) {
36 pkg = JSON.parse(fs.readFileSync(pkgFile, 'utf-8'));
37 } else {
38 fs.writeFileSync(pkgFile, '{}');
39 pkg = {};
40 }
41
42 const installed = new Set(Object.keys(pkg.dependencies || {}).concat(mod.builtinModules));
43 const cmd = options.commands[manager];
44
45 return {
46 name: 'auto-install',
47
48 async resolveId(importee, importer) {
49 // entry module
50 if (!importer) return null;
51
52 // this function doesn't actually resolve anything, but it provides us with a hook to discover uninstalled deps
53
54 const isExternalPackage =
55 importee[0] !== '.' && importee[0] !== '\0' && !path.isAbsolute(importee);
56
57 if (isExternalPackage) {
58 // we have a bare import — check it's installed
59 const parts = importee.split('/');
60 let name = parts.shift()!;
61 if (name[0] === '@') name += `/${parts.shift()}`;
62
63 if (!installed.has(name)) {
64 // eslint-disable-next-line no-console
65 console.log(`installing ${name}...`);
66 await execAsync(`${cmd} ${name}`);
67 }
68 }
69
70 return null;
71 }
72 };
73 }
+0
-1
packages/auto-install/test/fixtures/input.js less more
0 import 'node-noop'; // eslint-disable-line
+0
-1
packages/auto-install/test/fixtures/npm/package.json less more
0 {}
+0
-0
packages/auto-install/test/fixtures/yarn/yarn.lock less more
(Empty file)
+0
-33
packages/auto-install/test/npm-bare.js less more
0 const { readFileSync } = require('fs');
1 const { join } = require('path');
2
3 const test = require('ava');
4 const del = require('del');
5 const { nodeResolve } = require('@rollup/plugin-node-resolve');
6 const { rollup } = require('rollup');
7
8 const autoInstall = require('..');
9
10 const cwd = join(__dirname, 'fixtures/npm-bare');
11 const file = join(cwd, 'output/bundle.js');
12 const input = join(cwd, '../input.js');
13
14 process.chdir(cwd);
15
16 test('npm, bare', async (t) => {
17 t.timeout(50000);
18 await rollup({
19 input,
20 output: {
21 file,
22 format: 'cjs'
23 },
24 plugins: [autoInstall(), nodeResolve()]
25 });
26 t.snapshot(readFileSync('package.json', 'utf-8'));
27 t.snapshot(readFileSync('package-lock.json', 'utf-8'));
28 });
29
30 test.after(async () => {
31 await del(['node_modules', 'package.json', 'package-lock.json']);
32 });
+0
-54
packages/auto-install/test/npm.js less more
0 const { readFileSync, writeFileSync } = require('fs');
1 const { join } = require('path');
2
3 const test = require('ava');
4 const del = require('del');
5 const { nodeResolve } = require('@rollup/plugin-node-resolve');
6 const { rollup } = require('rollup');
7
8 const autoInstall = require('..');
9
10 const cwd = join(__dirname, 'fixtures/npm');
11 const file = join(cwd, 'output/bundle.js');
12 const input = join(cwd, '../input.js');
13 const manager = 'npm';
14 const pkgFile = join(cwd, 'package.json');
15
16 process.chdir(cwd);
17
18 test('invalid manager', (t) => {
19 t.timeout(50000);
20 const error = t.throws(
21 () =>
22 rollup({
23 input,
24 output: {
25 file,
26 format: 'cjs'
27 },
28 plugins: [autoInstall({ pkgFile, manager: 'foo' }), nodeResolve()]
29 }),
30 {
31 instanceOf: RangeError
32 }
33 );
34 t.snapshot(error.message);
35 });
36
37 test('npm', async (t) => {
38 t.timeout(50000);
39 await rollup({
40 input,
41 output: {
42 file,
43 format: 'cjs'
44 },
45 plugins: [autoInstall({ pkgFile, manager }), nodeResolve()]
46 });
47 t.snapshot(readFileSync('package-lock.json', 'utf-8'));
48 });
49
50 test.after(async () => {
51 await del(['node_modules', 'package-lock.json']);
52 writeFileSync(pkgFile, '{}');
53 });
+0
-31
packages/auto-install/test/snapshots/npm-bare.js.md less more
0 # Snapshot report for `test/npm-bare.js`
1
2 The actual snapshot is saved in `npm-bare.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## npm, bare
7
8 > Snapshot 1
9
10 `{␊
11 "dependencies": {␊
12 "node-noop": "^1.0.0"␊
13 }␊
14 }␊
15 `
16
17 > Snapshot 2
18
19 `{␊
20 "requires": true,␊
21 "lockfileVersion": 1,␊
22 "dependencies": {␊
23 "node-noop": {␊
24 "version": "1.0.0",␊
25 "resolved": "https://registry.npmjs.org/node-noop/-/node-noop-1.0.0.tgz",␊
26 "integrity": "sha1-R6Pn2Az/qmRYNkvSLthcqzMHvnk="␊
27 }␊
28 }␊
29 }␊
30 `
packages/auto-install/test/snapshots/npm-bare.js.snap less more
Binary diff not shown
+0
-28
packages/auto-install/test/snapshots/npm.js.md less more
0 # Snapshot report for `test/npm.js`
1
2 The actual snapshot is saved in `npm.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## invalid manager
7
8 > Snapshot 1
9
10 '\'foo\' is not a valid package manager. Valid managers include: \'npm\', \'yarn\'.'
11
12 ## npm
13
14 > Snapshot 1
15
16 `{␊
17 "requires": true,␊
18 "lockfileVersion": 1,␊
19 "dependencies": {␊
20 "node-noop": {␊
21 "version": "1.0.0",␊
22 "resolved": "https://registry.npmjs.org/node-noop/-/node-noop-1.0.0.tgz",␊
23 "integrity": "sha1-R6Pn2Az/qmRYNkvSLthcqzMHvnk="␊
24 }␊
25 }␊
26 }␊
27 `
packages/auto-install/test/snapshots/npm.js.snap less more
Binary diff not shown
+0
-38
packages/auto-install/test/yarn-bare.js less more
0 const { readFileSync } = require('fs');
1 const { join } = require('path');
2
3 const test = require('ava');
4 const del = require('del');
5 const { nodeResolve } = require('@rollup/plugin-node-resolve');
6 const { rollup } = require('rollup');
7
8 const autoInstall = require('..');
9
10 const cwd = join(__dirname, 'fixtures/yarn-bare');
11 const file = join(cwd, 'output/bundle.js');
12 const input = join(cwd, '../input.js');
13
14 process.chdir(cwd);
15
16 test('yarn, bare', async (t) => {
17 t.timeout(50000);
18 await rollup({
19 input,
20 output: {
21 file,
22 format: 'cjs'
23 },
24 plugins: [
25 // mock the call to yarn here. yarn has had consistent issues in this test env
26 autoInstall({ manager: 'yarn', commands: { yarn: 'echo yarn.bare > yarn.lock' } }),
27 nodeResolve()
28 ]
29 });
30 const lockFile = readFileSync('yarn.lock', 'utf-8');
31 // snapshots for this are a nightmare cross-platform
32 t.truthy(/yarn\.bare\s+node-noop/.test(lockFile));
33 });
34
35 test.after(async () => {
36 await del(['node_modules', 'package.json', 'yarn.lock']);
37 });
+0
-36
packages/auto-install/test/yarn.js less more
0 const { readFileSync, writeFileSync } = require('fs');
1 const { join } = require('path');
2
3 const test = require('ava');
4 const del = require('del');
5 const { nodeResolve } = require('@rollup/plugin-node-resolve');
6 const { rollup } = require('rollup');
7
8 const autoInstall = require('..');
9
10 const cwd = join(__dirname, 'fixtures/yarn');
11 const file = join(cwd, 'output/bundle.js');
12 const input = join(cwd, '../input.js');
13
14 process.chdir(cwd);
15
16 test('yarn', async (t) => {
17 t.timeout(50000);
18 await rollup({
19 input,
20 output: {
21 file,
22 format: 'cjs'
23 },
24 // mock the call to yarn here. yarn has had consistent issues in this test env
25 plugins: [autoInstall({ commands: { yarn: 'echo yarn > yarn.lock' } }), nodeResolve()]
26 });
27 const lockFile = readFileSync('yarn.lock', 'utf-8');
28 // snapshots for this are a nightmare cross-platform
29 t.truthy(/yarn\s+node-noop/.test(lockFile));
30 });
31
32 test.after(async () => {
33 await del(['node_modules', 'package.json']);
34 writeFileSync('yarn.lock', '');
35 });
+0
-7
packages/auto-install/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": [
3 "src/**/*",
4 "types/**/*"
5 ]
6 }
+0
-22
packages/auto-install/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 export interface RollupAutoInstallOptions {
3 /**
4 * Specifies the location on disk of the target `package.json` file.
5 * If the file doesn't exist, it will be created by the plugin,
6 * as package managers need to populate the `dependencies` property.
7 * @default '{cwd}/package.json'
8 */
9 pkgFile?: string;
10
11 /**
12 * Specifies the package manager to use; `npm` or `yarn`.
13 * If not specified, the plugin will default to `yarn` if `yarn.lock` exists, or `npm` otherwise.
14 */
15 manager?: 'npm' | 'yarn';
16 }
17
18 /**
19 * 🍣 A Rollup plugin which automatically installs dependencies that are imported by a bundle, even if not yet in `package.json`.
20 */
21 export default function auto(options?: RollupAutoInstallOptions): Plugin;
+0
-252
packages/babel/CHANGELOG.md less more
0 # @rollup/plugin-babel ChangeLog
1
2 ## v5.2.1
3
4 _2020-09-09_
5
6 ### Updates
7
8 - chore: add deprecation/migration warnings for the runtime (#534)
9
10 ## v5.2.0
11
12 _2020-08-13_
13
14 ### Features
15
16 - feat: `export * as ns` support (#511)
17
18 ### Updates
19
20 - chore: update dependencies (13526d6)
21
22 ## v5.1.0
23
24 _2020-07-12_
25
26 ### Features
27
28 - feat: add typings (#462)
29
30 ### Updates
31
32 - docs: add note about excluding @babel/runtime helpers via regex (#483)
33
34 ## v5.0.4
35
36 _2020-06-22_
37
38 ### Updates
39
40 - docs: remove unused import in "Usage" example (#460)
41 - docs: update node requirement in readme (#443)
42 - docs: fix typo in readme (#447)
43
44 ## v5.0.3
45
46 _2020-06-05_
47
48 ### Updates
49
50 - docs: update `babelHelpers` description (#397)
51
52 ## v5.0.2
53
54 _2020-05-20_
55
56 ### Bugfixes
57
58 - fix: use loadPartialConfigAsync when it is available (#359)
59
60 ### Updates
61
62 - docs: Cleanup misleading leftovers in the README (#377)
63 - docs: correct breaking change note in v5 CHANGELOG (#368)
64
65 ## v5.0.1
66
67 _2020-05-20_
68
69 ### Bugfixes
70
71 - fix: use loadPartialConfigAsync when it is available (#359)
72
73 ### Updates
74
75 - docs: Cleanup misleading leftovers in the README (#377)
76 - docs: correct breaking change note in v5 CHANGELOG (#368)
77
78 # @rollup/plugin-babel changelog
79
80 ## 5.0.0
81
82 _2020-04-27_
83
84 ### Features
85
86 - Added `getBabelOutputPlugin` and `createBabelOutputPluginFactory` exports which can be used to transform generated code
87 - Added `skipPreflightCheck` option. The plugin performs some extra checks to see if the passed configuration is correct and matching its expectations. This comes with some runtime overhead and can slow down builds. If you know what you are doing and you are confident that you have configured things correctly you can disable those checks with this option.
88 - Published as `@rollup/plugin-babel`
89
90 ### Updates
91
92 - Default export exported as `getBabelInputPlugin` for symmetry with `getBabelOutputPlugin`
93
94 ### Breaking Changes
95
96 - Minimum compatible Rollup version is 1.2.0
97 - Minimum supported Node version is 10.0.0
98 - `.custom` factory is now available as separate `createBabelInputPluginFactory` export
99 - Removed `externalHelpers` & `runtimeHelpers` options. There is now a single `babelHelpers` option which can take one of `'bundled'`, `'inline'`, `'runtime'` and `'external'` as a value. The default is `'bundled'` which matches 4.x behavior, but it is recommended to configure this option explicitly.
100
101 ## 4.3.2
102
103 - Fixed usage with `externalHelpers: true` option
104
105 ## 4.3.1
106
107 - Add `.js` extension to the virtual babel helpers file (only matters when using `preserveModules` option in rollup)
108
109 ## 4.3.0
110
111 - Added `.custom` builder.
112 - Fail build when a plugin tries to add non existent babel helper
113
114 ## 4.2.0
115
116 Allow `rollup@1` as peer dependency.
117
118 ## 4.1.0
119
120 - Fixed "preflight check" for ignored files.
121 - Return `null` when no transformation has been done (fixing source maps for this case)
122
123 ## 4.0.3
124
125 Fixed fallback class transform in "preflight check".
126
127 ## 4.0.2
128
129 Fixed `rollup` peer dependency.
130
131 ## 4.0.0
132
133 Babel 7 compatible! (dropped Babel 6 compatibility though).
134
135 Additionally:
136
137 - Internal preflight checks are created now per plugin instance, so using 2 instances of rollup-plugin-babel (i.e. targeting 2 different set of files with include/exclude options) shouldn't conflict with each other
138 - Transpiling by default only what Babel transpiles - files with those extensions: .js, .jsx, .es6, .es, .mjs. You can customize this with new `extensions` option. This also fixes long standing issue with rollup-plugin-babel trying to transform JSON files.
139
140 ## 3.0.3
141
142 - Drop babel7 support. Use 4.0.0-beta if you use babel 7
143 - Use "module" in addition to "jsnext:main" ([#150](https://github.com/rollup/rollup-plugin-babel/issues/150))
144 - Remove unused babel helpers namespace declaration & expression ([#164](https://github.com/rollup/rollup-plugin-babel/issues/164))
145
146 ## 3.0.2
147
148 - Fix regression with Babel 6 ([#158](https://github.com/rollup/rollup-plugin-babel/issues/158))
149
150 ## 3.0.1
151
152 - Wasn't working, fix bug with transform (not using es2015-classes for preflight check)
153
154 ## 3.0.0
155
156 - Drop Node 0.10/0.12 (Use native `Object.assign`)
157 - Change `babel-core` to be a peerDependency
158 - Support `babel-core` v7 as well as a peerDep (no changes necessary)
159
160 ## 2.7.1
161
162 - Prevent erroneous warnings about duplicated runtime helpers ([#105](https://github.com/rollup/rollup-plugin-babel/issues/105))
163 - Ignore `ignore` option in preflight check ([#102](https://github.com/rollup/rollup-plugin-babel/issues/102))
164 - Allow custom `moduleName` with `runtime-helpers` ([#95](https://github.com/rollup/rollup-plugin-babel/issues/95))
165
166 ## 2.7.0
167
168 - Add `externalHelpersWhitelist` option ([#92](https://github.com/rollup/rollup-plugin-babel/pull/92))
169 - Ignore `only` option during preflight checks ([#98](https://github.com/rollup/rollup-plugin-babel/issues/98))
170 - Use `options.onwarn` if available ([#84](https://github.com/rollup/rollup-plugin-babel/issues/84))
171 - Update documentation and dependencies
172
173 ## 2.6.1
174
175 - Return a `name`
176
177 ## 2.6.0
178
179 - Use `\0` convention for helper module ID ([#64](https://github.com/rollup/rollup-plugin-babel/issues/64))
180
181 ## 2.5.1
182
183 - Don't mutate `options.plugins` ([#47](https://github.com/rollup/rollup-plugin-babel/issues/47))
184
185 ## 2.5.0
186
187 - Import `babelHelpers` rather than injecting them – allows `transform` function to be pure ([#rollup/658](https://github.com/rollup/rollup/pull/658#issuecomment-223876824))
188
189 ## 2.4.0
190
191 - Add `externalHelpers` option ([#41](https://github.com/rollup/rollup-plugin-babel/pull/41))
192
193 ## 2.3.9
194
195 - Do not rename Babel helpers ([#34](https://github.com/rollup/rollup-plugin-babel/pull/34))
196
197 ## 2.3.8
198
199 - Create new version to (hopefully) solve bizarre CI issue
200
201 ## 2.3.7
202
203 - Be less clever about renaming Babel helpers ([#19](https://github.com/rollup/rollup-plugin-babel/issues/19))
204
205 ## 2.3.6
206
207 - Fix cache misses in preflight check ([#29](https://github.com/rollup/rollup-plugin-babel/pull/29))
208
209 ## 2.3.5
210
211 - Use class transformer local to plugin, not project being built
212
213 ## 2.3.4
214
215 - Ensure class transformer is present for preflight check, and only run check once per directory ([#23](https://github.com/rollup/rollup-plugin-babel/issues/23))
216
217 ## 2.3.3
218
219 - Fix helper renaming ([#22](https://github.com/rollup/rollup-plugin-babel/issues/22))
220
221 ## 2.3.1-2
222
223 - Include correct files in npm package
224
225 ## 2.3.0
226
227 - Allow `transform-runtime` Babel plugin, if combined with `runtimeHelpers: true` option ([#17](https://github.com/rollup/rollup-plugin-babel/issues/17))
228 - More permissive handling of helpers – only warn if inline helpers are duplicated
229 - Handle plugins that change export patterns ([#18](https://github.com/rollup/rollup-plugin-babel/issues/18))
230
231 ## 2.2.0
232
233 - Preflight checks are run per-file, to avoid configuration snafus ([#16](https://github.com/rollup/rollup-plugin-babel/issues/16))
234
235 ## 2.1.0
236
237 - Generate sourcemaps by default
238
239 ## 2.0.1
240
241 - Use object-assign ponyfill
242 - Add travis support
243 - Fix test
244
245 ## 2.0.0
246
247 - Babel 6 compatible
248
249 ## 1.0.0
250
251 - First release
+0
-21
packages/babel/LICENSE less more
0 The MIT License (MIT)
1
2 Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
+0
-351
packages/babel/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-babel
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-babel
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-babel
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-babel
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-babel
10
11 🍣 A Rollup plugin for seamless integration between Rollup and Babel.
12
13 ## Why?
14
15 If you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options:
16
17 - run the code through Babel first, being careful to exclude the module transformer, or
18 - run the code through Rollup first, and _then_ pass it to Babel.
19
20 Both approaches have disadvantages – in the first case, on top of the additional configuration complexity, you may end up with Babel's helpers (like `classCallCheck`) repeated throughout your code (once for each module where the helpers are used). In the second case, transpiling is likely to be slower, because transpiling a large bundle is much more work for Babel than transpiling a set of small files.
21
22 Either way, you have to worry about a place to put the intermediate files, and getting sourcemaps to behave becomes a royal pain.
23
24 Using Rollup with `@rollup/plugin-babel` makes the process far easier.
25
26 ## Requirements
27
28 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Rollup v1.20.0+.
29
30 ## Install
31
32 ```bash
33 npm install @rollup/plugin-babel --save-dev
34 ```
35
36 ## Usage
37
38 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
39
40 ```js
41 import babel from '@rollup/plugin-babel';
42
43 const config = {
44 input: 'src/index.js',
45 output: {
46 dir: 'output',
47 format: 'esm'
48 },
49 plugins: [babel({ babelHelpers: 'bundled' })]
50 };
51
52 export default config;
53 ```
54
55 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).
56
57 ## Options
58
59 This plugin respects Babel [configuration files](https://babeljs.io/docs/en/configuration) by default and they are generally the best place to put your configuration.
60
61 You can also run Babel on the generated chunks instead of the input files. Even though this is slower, it is the only way to transpile Rollup's auto-generated wrapper code to lower compatibility targets than ES5, see [Running Babel on the generated code](#running-babel-on-the-generated-code) for details.
62
63 All options are as per the [Babel documentation](https://babeljs.io/docs/en/options), plus the following:
64
65 ### `exclude`
66
67 Type: `String | RegExp | Array[...String|RegExp]`<br>
68
69 A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. When relaying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself.
70
71 ### `include`
72
73 Type: `String | RegExp | Array[...String|RegExp]`<br>
74
75 A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there.
76
77 ### `extensions`
78
79 Type: `Array[...String]`<br>
80 Default: `['.js', '.jsx', '.es6', '.es', '.mjs']`
81
82 An array of file extensions that Babel should transpile. If you want to transpile TypeScript files with this plugin it's essential to include `.ts` and `.tsx` in this option.
83
84 ### `babelHelpers`
85
86 Type: `'bundled' | 'runtime' | 'inline' | 'external'`<br>
87 Default: `'bundled'`
88
89 It is recommended to configure this option explicitly (even if with its default value) so an informed decision is taken on how those babel helpers are inserted into the code.
90
91 We recommend to follow these guidelines to determine the most appropriate value for your project:
92
93 - `'runtime'` - you should use this especially when building libraries with Rollup. It has to be used in combination with `@babel/plugin-transform-runtime` and you should also specify `@babel/runtime` as dependency of your package. Don't forget to tell Rollup to treat the helpers imported from within the `@babel/runtime` module as external dependencies when bundling for `cjs` & `es` formats. This can be accomplished via regex (`external: [/@babel\/runtime/]`) or a function (`external: id => id.includes('@babel/runtime')`). It's important to not only specify `external: ['@babel/runtime']` since the helpers are imported from nested paths (e.g `@babel/runtime/helpers/get`) and [Rollup will only exclude modules that match strings exactly](https://rollupjs.org/guide/en/#peer-dependencies).
94 - `'bundled'` - you should use this if you want your resulting bundle to contain those helpers (at most one copy of each). Useful especially if you bundle an application code.
95 - `'external'` - use this only if you know what you are doing. It will reference helpers on **global** `babelHelpers` object. Used in combination with `@babel/plugin-external-helpers`.
96 - `'inline'` - this is not recommended. Helpers will be inserted in each file using this option. This can cause serious code duplication. This is the default Babel behavior as Babel operates on isolated files - however, as Rollup is a bundler and is project-aware (and therefore likely operating across multiple input files), the default of this plugin is `"bundled"`.
97
98 ### `skipPreflightCheck`
99
100 Type: `Boolean`<br>
101 Default: `false`
102
103 Before transpiling your input files this plugin also transpile a short piece of code **for each** input file. This is used to validate some misconfiguration errors, but for sufficiently big projects it can slow your build times so if you are confident about your configuration then you might disable those checks with this option.
104
105 ### External dependencies
106
107 Ideally, you should only be transforming your source code, rather than running all of your external dependencies through Babel (to ignore external dependencies from being handled by this plugin you might use `exclude: 'node_modules/**'` option). If you have a dependency that exposes untranspiled ES6 source code that doesn't run in your target environment, then you may need to break this rule, but it often causes problems with unusual `.babelrc` files or mismatched versions of Babel.
108
109 We encourage library authors not to distribute code that uses untranspiled ES6 features (other than modules) for this reason. Consumers of your library should _not_ have to transpile your ES6 code, any more than they should have to transpile your CoffeeScript, ClojureScript or TypeScript.
110
111 Use `babelrc: false` to prevent Babel from using local (i.e. to your external dependencies) `.babelrc` files, relying instead on the configuration you pass in.
112
113 ### Helpers
114
115 In some cases Babel uses _helpers_ to avoid repeating chunks of code – for example, if you use the `class` keyword, it will use a `classCallCheck` function to ensure that the class is instantiated correctly.
116
117 By default, those helpers will be inserted at the top of the file being transformed, which can lead to duplication. This rollup plugin automatically deduplicates those helpers, keeping only one copy of each one used in the output bundle. Rollup will combine the helpers in a single block at the top of your bundle.
118
119 You can customize how those helpers are being inserted into the transformed file with [`babelHelpers`](#babelhelpers) option.
120
121 ### Modules
122
123 This is not needed since Babel 7 - it knows automatically that Rollup understands ES modules & that it shouldn't use any module transform with it. Unless you forcefully include a module transform in your Babel configuration.
124
125 If you have been pointed to this section by an error thrown by this plugin, please check your Babel configuration files and disable any module transforms when running Rollup builds.
126
127 ## Running Babel on the generated code
128
129 You can run `@rollup/plugin-babel` on the output files instead of the input files by using `getBabelOutputPlugin(...)`. This can be used to perform code transformations on the resulting chunks and is the only way to transform Rollup's auto-generated code. By default, the plugin will be applied to all outputs:
130
131 ```js
132 // rollup.config.js
133 import { getBabelOutputPlugin } from '@rollup/plugin-babel';
134
135 export default {
136 input: 'main.js',
137 plugins: [
138 getBabelOutputPlugin({
139 presets: ['@babel/preset-env']
140 })
141 ],
142 output: [
143 { file: 'bundle.cjs.js', format: 'cjs' },
144 { file: 'bundle.esm.js', format: 'esm' }
145 ]
146 };
147 ```
148
149 If you only want to apply it to specific outputs, you can use it as an output plugin (requires at least Rollup v1.27.0):
150
151 ```js
152 // rollup.config.js
153 import { getBabelOutputPlugin } from '@rollup/plugin-babel';
154
155 export default {
156 input: 'main.js',
157 output: [
158 { file: 'bundle.js', format: 'esm' },
159 {
160 file: 'bundle.es5.js',
161 format: 'esm',
162 plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })]
163 }
164 ]
165 };
166 ```
167
168 The `include`, `exclude` and `extensions` options are ignored when the when using `getBabelOutputPlugin` and `createBabelOutputPluginFactory` will produce warnings, and there are a few more points to note that users should be aware of.
169
170 You can also run the plugin twice on the code, once when processing the input files to transpile special syntax to JavaScript and once on the output to transpile to a lower compatibility target:
171
172 ```js
173 // rollup.config.js
174 import babel, { getBabelOutputPlugin } from '@rollup/plugin-babel';
175
176 export default {
177 input: 'main.js',
178 plugins: [babel({ presets: ['@babel/preset-react'] })],
179 output: [
180 {
181 file: 'bundle.js',
182 format: 'esm',
183 plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })]
184 }
185 ]
186 };
187 ```
188
189 ### Babel configuration files
190
191 Unlike the regular `babel` plugin, `getBabelOutputPlugin(...)` will **not** automatically search for [Babel configuration files](https://babeljs.io/docs/en/config-files). Besides passing in Babel options directly, however, you can specify a configuration file manually via Babel's [`configFile`](https://babeljs.io/docs/en/options#configfile) option:
192
193 ```js
194 getBabelOutputPlugin({
195 configFile: path.resolve(__dirname, 'babel.config.js')
196 });
197 ```
198
199 ### Using formats other than ES modules or CommonJS
200
201 As `getBabelOutputPlugin(...)` will run _after_ Rollup has done all its transformations, it needs to make sure it preserves the semantics of Rollup's output format. This is especially important for Babel plugins that add, modify or remove imports or exports, but also for other transformations that add new variables as they can accidentally become global variables depending on the format. Therefore it is recommended that for formats other than `esm` or `cjs`, you set Rollup to use the `esm` output format and let Babel handle the transformation to another format, e.g. via
202
203 ```
204 presets: [['@babel/preset-env', { modules: 'umd' }], ...]
205 ```
206
207 to create a UMD/IIFE compatible output. If you want to use `getBabelOutputPlugin(...)` with other formats, you need to specify `allowAllFormats: true` as plugin option:
208
209 ```js
210 rollup.rollup({...})
211 .then(bundle => bundle.generate({
212 format: 'iife',
213 plugins: [getBabelOutputPlugin({
214 allowAllFormats: true,
215 // ...
216 })]
217 }))
218 ```
219
220 ### Injected helpers
221
222 By default, helpers e.g. when transpiling classes will be inserted at the top of each chunk. In contrast to when applying this plugin on the input files, helpers will not be deduplicated across chunks.
223
224 Alternatively, you can use imported runtime helpers by adding the `@babel/transform-runtime` plugin. This will make `@babel/runtime` an external dependency of your project, see [@babel/plugin-transform-runtime](https://babeljs.io/docs/en/babel-plugin-transform-runtime) for details.
225
226 Note that this will only work for `esm` and `cjs` formats, and you need to make sure to set the `useESModules` option of `@babel/plugin-transform-runtime` to `true` if you create ESM output:
227
228 ```js
229 rollup.rollup({...})
230 .then(bundle => bundle.generate({
231 format: 'esm',
232 plugins: [getBabelOutputPlugin({
233 presets: ['@babel/preset-env'],
234 plugins: [['@babel/plugin-transform-runtime', { useESModules: true }]]
235 })]
236 }))
237 ```
238
239 ```js
240 // input
241 export default class Foo {}
242
243 // output
244 import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
245
246 var Foo = function Foo() {
247 _classCallCheck(this, Foo);
248 };
249
250 export default Foo;
251 ```
252
253 And for CommonJS:
254
255 ```js
256 rollup.rollup({...})
257 .then(bundle => bundle.generate({
258 format: 'cjs',
259 plugins: [getBabelOutputPlugin({
260 presets: ['@babel/preset-env'],
261 plugins: [['@babel/plugin-transform-runtime', { useESModules: false }]]
262 })]
263 }))
264 ```
265
266 ```js
267 // input
268 export default class Foo {}
269
270 // output
271 ('use strict');
272
273 var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
274
275 var Foo = function Foo() {
276 _classCallCheck(this, Foo);
277 };
278
279 module.exports = Foo;
280 ```
281
282 Another option is to use `@babel/plugin-external-helpers`, which will reference the global `babelHelpers` object. It is your responsibility to make sure this global variable exists.
283
284 ## Custom plugin builder
285
286 `@rollup/plugin-babel` exposes a plugin-builder utility that allows users to add custom handling of Babel's configuration for each file that it processes.
287
288 `createBabelInputPluginFactory` accepts a callback that will be called with the loader's instance of `babel` so that tooling can ensure that it using exactly the same `@babel/core` instance as the loader itself.
289
290 It's main purpose is to allow other tools for configuration of transpilation without forcing people to add extra configuration but still allow for using their own babelrc / babel config files.
291
292 ### Example
293
294 ```js
295 import { createBabelInputPluginFactory } from '@rollup/plugin-babel';
296
297 export default createBabelInputPluginFactory(babelCore => {
298 function myPlugin() {
299 return {
300 visitor: {}
301 };
302 }
303
304 return {
305 // Passed the plugin options.
306 options({ opt1, opt2, ...pluginOptions }) {
307 return {
308 // Pull out any custom options that the plugin might have.
309 customOptions: { opt1, opt2 },
310
311 // Pass the options back with the two custom options removed.
312 pluginOptions
313 };
314 },
315
316 config(
317 cfg /* Passed Babel's 'PartialConfig' object. */,
318 { code, customOptions }
319 ) {
320 if (cfg.hasFilesystemConfig()) {
321 // Use the normal config
322 return cfg.options;
323 }
324
325 return {
326 ...cfg.options,
327 plugins: [
328 ...(cfg.options.plugins || []),
329
330 // Include a custom plugin in the options.
331 myPlugin
332 ]
333 };
334 },
335
336 result(result, { code, customOptions, config, transformOptions }) {
337 return {
338 ...result,
339 code: result.code + '\n// Generated by some custom plugin'
340 };
341 }
342 };
343 });
344 ```
345
346 ## Meta
347
348 [CONTRIBUTING](/.github/CONTRIBUTING.md)
349
350 [LICENSE (MIT)](/LICENSE)
+0
-90
packages/babel/package.json less more
0 {
1 "name": "@rollup/plugin-babel",
2 "version": "5.2.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Seamless integration between Rollup and Babel.",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/babel#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">= 10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run build && pnpm run test:ts",
29 "pretest": "pnpm run build",
30 "test": "ava",
31 "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
32 },
33 "files": [
34 "dist",
35 "types",
36 "README.md",
37 "LICENSE"
38 ],
39 "keywords": [
40 "rollup",
41 "plugin",
42 "rollup-plugin",
43 "babel",
44 "es2015",
45 "es6"
46 ],
47 "peerDependencies": {
48 "@babel/core": "^7.0.0",
49 "@types/babel__core": "^7.1.9",
50 "rollup": "^1.20.0||^2.0.0"
51 },
52 "dependencies": {
53 "@babel/helper-module-imports": "^7.10.4",
54 "@rollup/pluginutils": "^3.1.0"
55 },
56 "devDependencies": {
57 "@babel/core": "^7.10.5",
58 "@babel/plugin-external-helpers": "^7.10.4",
59 "@babel/plugin-proposal-decorators": "^7.10.5",
60 "@babel/plugin-syntax-dynamic-import": "^7.8.3",
61 "@babel/plugin-transform-runtime": "^7.10.5",
62 "@babel/preset-env": "^7.10.4",
63 "@rollup/plugin-json": "^4.1.0",
64 "@types/babel__core": "^7.1.9",
65 "rollup": "^2.23.0",
66 "source-map": "^0.7.3"
67 },
68 "types": "types/index.d.ts",
69 "ava": {
70 "babel": {
71 "compileEnhancements": false
72 },
73 "files": [
74 "!**/fixtures/**",
75 "!**/helpers/**",
76 "!**/recipes/**",
77 "!**/types.ts"
78 ]
79 },
80 "contributors": [
81 "Bogdan Chadkin <trysound@yandex.ru>",
82 "Mateusz Burzyński <mateuszburzynski@gmail.com> (https://github.com/Andarist)"
83 ],
84 "peerDependenciesMeta": {
85 "@types/babel__core": {
86 "optional": true
87 }
88 }
89 }
+0
-20
packages/babel/rollup.config.js less more
0 import pkg from './package.json';
1 import { babel } from './src/index';
2
3 const externalDeps = Object.keys(Object.assign({}, pkg.dependencies, pkg.peerDependencies));
4 const nodeDeps = ['path'];
5
6 export default {
7 input: './src/index.js',
8 external: externalDeps.concat(nodeDeps),
9 plugins: [
10 babel({
11 presets: [['@babel/preset-env', { targets: { node: 8 } }]],
12 babelHelpers: 'bundled'
13 })
14 ],
15 output: [
16 { file: pkg.main, format: 'cjs', exports: 'named' },
17 { file: pkg.module, format: 'esm' }
18 ]
19 };
+0
-22
packages/babel/src/bundledHelpersPlugin.js less more
0 import { addNamed } from '@babel/helper-module-imports';
1
2 import { HELPERS } from './constants';
3
4 export default function importHelperPlugin() {
5 return {
6 pre(file) {
7 const cachedHelpers = {};
8 file.set('helperGenerator', (name) => {
9 if (!file.availableHelper(name)) {
10 return null;
11 }
12
13 if (cachedHelpers[name]) {
14 return cachedHelpers[name];
15 }
16
17 return (cachedHelpers[name] = addNamed(file.path, name, HELPERS));
18 });
19 }
20 };
21 }
+0
-8
packages/babel/src/constants.js less more
0 export const BUNDLED = 'bundled';
1 export const INLINE = 'inline';
2 export const RUNTIME = 'runtime';
3 export const EXTERNAL = 'external';
4
5 // NOTE: DO NOT REMOVE the null character `\0` as it may be used by other plugins
6 // e.g. https://github.com/rollup/rollup-plugin-node-resolve/blob/313a3e32f432f9eb18cc4c231cc7aac6df317a51/src/index.js#L74
7 export const HELPERS = '\0rollupPluginBabelHelpers.js';
+0
-247
packages/babel/src/index.js less more
0 import * as babel from '@babel/core';
1 import { createFilter } from '@rollup/pluginutils';
2
3 import { BUNDLED, HELPERS } from './constants';
4 import bundledHelpersPlugin from './bundledHelpersPlugin';
5 import preflightCheck from './preflightCheck';
6 import transformCode from './transformCode';
7 import { addBabelPlugin, escapeRegExpCharacters, warnOnce } from './utils';
8
9 const unpackOptions = ({
10 extensions = babel.DEFAULT_EXTENSIONS,
11 // rollup uses sourcemap, babel uses sourceMaps
12 // just normalize them here so people don't have to worry about it
13 sourcemap = true,
14 sourcemaps = true,
15 sourceMap = true,
16 sourceMaps = true,
17 ...rest
18 } = {}) => {
19 return {
20 extensions,
21 plugins: [],
22 sourceMaps: sourcemap && sourcemaps && sourceMap && sourceMaps,
23 ...rest,
24 caller: {
25 name: '@rollup/plugin-babel',
26 ...rest.caller
27 }
28 };
29 };
30
31 const warnAboutDeprecatedHelpersOption = ({ deprecatedOption, suggestion }) => {
32 // eslint-disable-next-line no-console
33 console.warn(
34 `\`${deprecatedOption}\` has been removed in favor a \`babelHelpers\` option. Try changing your configuration to \`${suggestion}\`. ` +
35 `Refer to the documentation to learn more: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers`
36 );
37 }
38
39 const unpackInputPluginOptions = ({ skipPreflightCheck = false, ...rest }, rollupVersion) => {
40 if ('runtimeHelpers' in rest) {
41 warnAboutDeprecatedHelpersOption({
42 deprecatedOption: 'runtimeHelpers',
43 suggestion: `babelHelpers: 'runtime'`
44 });
45 } else if ('externalHelpers' in rest) {
46 warnAboutDeprecatedHelpersOption({
47 deprecatedOption: 'externalHelpers',
48 suggestion: `babelHelpers: 'external'`
49 });
50 } else if (!rest.babelHelpers) {
51 // eslint-disable-next-line no-console
52 console.warn(
53 "babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: " +
54 'https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers'
55 );
56 }
57 return unpackOptions({
58 ...rest,
59 skipPreflightCheck,
60 babelHelpers: rest.babelHelpers || BUNDLED,
61 caller: {
62 supportsStaticESM: true,
63 supportsDynamicImport: true,
64 supportsTopLevelAwait: true,
65 // todo: remove version checks for 1.20 - 1.25 when we bump peer deps
66 supportsExportNamespaceFrom: !rollupVersion.match(/^1\.2[0-5]\./),
67 ...rest.caller
68 }
69 });
70 };
71
72 const unpackOutputPluginOptions = (options, { format }) =>
73 unpackOptions({
74 configFile: false,
75 sourceType: format === 'es' ? 'module' : 'script',
76 ...options,
77 caller: {
78 supportsStaticESM: format === 'es',
79 ...options.caller
80 }
81 });
82
83 function getOptionsWithOverrides(pluginOptions = {}, overrides = {}) {
84 if (!overrides.options) return { customOptions: null, pluginOptionsWithOverrides: pluginOptions };
85 const overridden = overrides.options(pluginOptions);
86
87 if (typeof overridden.then === 'function') {
88 throw new Error(
89 ".options hook can't be asynchronous. It should return `{ customOptions, pluginsOptions }` synchronously."
90 );
91 }
92
93 return {
94 customOptions: overridden.customOptions || null,
95 pluginOptionsWithOverrides: overridden.pluginOptions || pluginOptions
96 };
97 }
98
99 const returnObject = () => {
100 return {};
101 };
102
103 function createBabelInputPluginFactory(customCallback = returnObject) {
104 const overrides = customCallback(babel);
105
106 return (pluginOptions) => {
107 const { customOptions, pluginOptionsWithOverrides } = getOptionsWithOverrides(
108 pluginOptions,
109 overrides
110 );
111
112 let babelHelpers, babelOptions, filter, skipPreflightCheck;
113 return {
114 name: 'babel',
115
116 options() {
117 //todo: remove options hook and hoist declarations when version checks are removed
118 let exclude, include, extensions;
119
120 ({
121 exclude,
122 extensions,
123 babelHelpers,
124 include,
125 skipPreflightCheck,
126 ...babelOptions
127 } = unpackInputPluginOptions(pluginOptionsWithOverrides, this.meta.rollupVersion));
128
129 const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`);
130 const includeExcludeFilter = createFilter(include, exclude);
131 filter = (id) => extensionRegExp.test(id) && includeExcludeFilter(id);
132
133 return null;
134 },
135
136 resolveId(id) {
137 if (id !== HELPERS) {
138 return null;
139 }
140 return id;
141 },
142
143 load(id) {
144 if (id !== HELPERS) {
145 return null;
146 }
147 return babel.buildExternalHelpers(null, 'module');
148 },
149
150 transform(code, filename) {
151 if (!filter(filename)) return null;
152 if (filename === HELPERS) return null;
153
154 return transformCode(
155 code,
156 { ...babelOptions, filename },
157 overrides,
158 customOptions,
159 this,
160 async (transformOptions) => {
161 if (!skipPreflightCheck) {
162 await preflightCheck(this, babelHelpers, transformOptions);
163 }
164
165 return babelHelpers === BUNDLED
166 ? addBabelPlugin(transformOptions, bundledHelpersPlugin)
167 : transformOptions;
168 }
169 );
170 }
171 };
172 };
173 }
174
175 function getRecommendedFormat(rollupFormat) {
176 switch (rollupFormat) {
177 case 'amd':
178 return 'amd';
179 case 'iife':
180 case 'umd':
181 return 'umd';
182 case 'system':
183 return 'systemjs';
184 default:
185 return '<module format>';
186 }
187 }
188
189 function createBabelOutputPluginFactory(customCallback = returnObject) {
190 const overrides = customCallback(babel);
191
192 return (pluginOptions) => {
193 const { customOptions, pluginOptionsWithOverrides } = getOptionsWithOverrides(
194 pluginOptions,
195 overrides
196 );
197
198 return {
199 name: 'babel',
200
201 renderStart(outputOptions) {
202 const { extensions, include, exclude, allowAllFormats } = pluginOptionsWithOverrides;
203
204 if (extensions || include || exclude) {
205 warnOnce(
206 this,
207 'The "include", "exclude" and "extensions" options are ignored when transforming the output.'
208 );
209 }
210 if (!allowAllFormats && outputOptions.format !== 'es' && outputOptions.format !== 'cjs') {
211 this.error(
212 `Using Babel on the generated chunks is strongly discouraged for formats other than "esm" or "cjs" as it can easily break wrapper code and lead to accidentally created global variables. Instead, you should set "output.format" to "esm" and use Babel to transform to another format, e.g. by adding "presets: [['@babel/env', { modules: '${getRecommendedFormat(
213 outputOptions.format
214 )}' }]]" to your Babel options. If you still want to proceed, add "allowAllFormats: true" to your plugin options.`
215 );
216 }
217 },
218
219 renderChunk(code, chunk, outputOptions) {
220 /* eslint-disable no-unused-vars */
221 const {
222 allowAllFormats,
223 exclude,
224 extensions,
225 externalHelpers,
226 externalHelpersWhitelist,
227 include,
228 runtimeHelpers,
229 ...babelOptions
230 } = unpackOutputPluginOptions(pluginOptionsWithOverrides, outputOptions);
231 /* eslint-enable no-unused-vars */
232
233 return transformCode(code, babelOptions, overrides, customOptions, this);
234 }
235 };
236 };
237 }
238
239 // export this for symmetry with output-related exports
240 export const getBabelInputPlugin = createBabelInputPluginFactory();
241 export const getBabelOutputPlugin = createBabelOutputPluginFactory();
242 export { createBabelInputPluginFactory, createBabelOutputPluginFactory };
243
244 export default getBabelInputPlugin;
245 // support `rollup -c —plugin babel`
246 export { getBabelInputPlugin as babel };
+0
-76
packages/babel/src/preflightCheck.js less more
0 import * as babel from '@babel/core';
1
2 import { INLINE, RUNTIME, EXTERNAL, BUNDLED } from './constants';
3 import { addBabelPlugin } from './utils';
4
5 const MODULE_ERROR =
6 'Rollup requires that your Babel configuration keeps ES6 module syntax intact. ' +
7 'Unfortunately it looks like your configuration specifies a module transformer ' +
8 'to replace ES6 modules with another module format. To continue you have to disable it.' +
9 '\n\n' +
10 "Most commonly it's a CommonJS transform added by @babel/preset-env - " +
11 'in such case you should disable it by adding `modules: false` option to that preset ' +
12 '(described in more detail here - https://github.com/rollup/plugins/tree/master/packages/babel#modules ).';
13
14 const UNEXPECTED_ERROR =
15 'An unexpected situation arose. Please raise an issue at ' +
16 'https://github.com/rollup/plugins/issues. Thanks!';
17
18 const PREFLIGHT_TEST_STRING = '__ROLLUP__PREFLIGHT_CHECK_DO_NOT_TOUCH__';
19 const PREFLIGHT_INPUT = `export default "${PREFLIGHT_TEST_STRING}";`;
20
21 function helpersTestTransform() {
22 return {
23 visitor: {
24 StringLiteral(path, state) {
25 if (path.node.value === PREFLIGHT_TEST_STRING) {
26 path.replaceWith(state.file.addHelper('inherits'));
27 }
28 }
29 }
30 };
31 }
32
33 const mismatchError = (actual, expected, filename) =>
34 `You have declared using "${expected}" babelHelpers, but transforming ${filename} resulted in "${actual}". Please check your configuration.`;
35
36 const inheritsHelperRe = /\/helpers\/(esm\/)?inherits/;
37
38 export default async function preflightCheck(ctx, babelHelpers, transformOptions) {
39 const finalOptions = addBabelPlugin(transformOptions, helpersTestTransform);
40 const check = (await babel.transformAsync(PREFLIGHT_INPUT, finalOptions)).code;
41
42 // Babel sometimes splits ExportDefaultDeclaration into 2 statements, so we also check for ExportNamedDeclaration
43 if (!/export (d|{)/.test(check)) {
44 ctx.error(MODULE_ERROR);
45 }
46
47 if (inheritsHelperRe.test(check)) {
48 if (babelHelpers === RUNTIME) {
49 return;
50 }
51 ctx.error(mismatchError(RUNTIME, babelHelpers, transformOptions.filename));
52 }
53
54 if (check.includes('babelHelpers.inherits')) {
55 if (babelHelpers === EXTERNAL) {
56 return;
57 }
58 ctx.error(mismatchError(EXTERNAL, babelHelpers, transformOptions.filename));
59 }
60
61 // test unminifiable string content
62 if (check.includes('Super expression must either be null or a function')) {
63 if (babelHelpers === INLINE || babelHelpers === BUNDLED) {
64 return;
65 }
66 if (babelHelpers === RUNTIME && !transformOptions.plugins.length) {
67 ctx.error(
68 `You must use the \`@babel/plugin-transform-runtime\` plugin when \`babelHelpers\` is "${RUNTIME}".\n`
69 );
70 }
71 ctx.error(mismatchError(INLINE, babelHelpers, transformOptions.filename));
72 }
73
74 ctx.error(UNEXPECTED_ERROR);
75 }
+0
-49
packages/babel/src/transformCode.js less more
0 import * as babel from '@babel/core';
1
2 export default async function transformCode(
3 inputCode,
4 babelOptions,
5 overrides,
6 customOptions,
7 ctx,
8 finalizeOptions
9 ) {
10 // loadPartialConfigAsync has become available in @babel/core@7.8.0
11 const config = await (babel.loadPartialConfigAsync || babel.loadPartialConfig)(babelOptions);
12
13 // file is ignored by babel
14 if (!config) {
15 return null;
16 }
17
18 let transformOptions = !overrides.config
19 ? config.options
20 : await overrides.config.call(this, config, {
21 code: inputCode,
22 customOptions
23 });
24
25 if (finalizeOptions) {
26 transformOptions = await finalizeOptions(transformOptions);
27 }
28
29 if (!overrides.result) {
30 const { code, map } = await babel.transformAsync(inputCode, transformOptions);
31 return {
32 code,
33 map
34 };
35 }
36
37 const result = await babel.transformAsync(inputCode, transformOptions);
38 const { code, map } = await overrides.result.call(ctx, result, {
39 code: inputCode,
40 customOptions,
41 config,
42 transformOptions
43 });
44 return {
45 code,
46 map
47 };
48 }
1313
1414 const regExpCharactersRegExp = /[\\^$.*+?()[\]{}|]/g;
1515 export const escapeRegExpCharacters = (str) => str.replace(regExpCharactersRegExp, '\\$&');
16
17 export function stripQuery(id) {
18 // strip query params from import
19 const [bareId, query] = id.split('?');
20 const suffix = `${query ? `?${query}` : ''}`;
21 return {
22 bareId,
23 query,
24 suffix
25 };
26 }
+0
-431
packages/babel/test/as-input-plugin.js less more
0 import * as nodePath from 'path';
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4 import { SourceMapConsumer } from 'source-map';
5 import jsonPlugin from '@rollup/plugin-json';
6
7 import { getCode } from '../../../util/test';
8
9 import babelPlugin, { getBabelOutputPlugin, createBabelInputPluginFactory } from '..';
10
11 process.chdir(__dirname);
12
13 function getLocation(source, charIndex) {
14 const lines = source.split('\n');
15 const len = lines.length;
16
17 let lineStart = 0;
18
19 for (let i = 0; i < len; i += 1) {
20 const line = lines[i];
21 // +1 for newline
22 const lineEnd = lineStart + line.length + 1;
23
24 if (lineEnd > charIndex) {
25 return { line: i + 1, column: charIndex - lineStart };
26 }
27
28 lineStart = lineEnd;
29 }
30
31 throw new Error('Could not determine location of character');
32 }
33
34 function replaceConsoleLogProperty({ types: t }) {
35 return {
36 name: 'replace-console-log-property',
37 visitor: {
38 MemberExpression(path, state) {
39 const { opts } = state;
40 if (path.node.property.name === 'log') {
41 path.get('property').replaceWith(t.identifier(opts.replace));
42 }
43 }
44 }
45 };
46 }
47
48 async function generate(input, babelOptions = {}, generateOptions = {}, rollupOptions = {}) {
49 const bundle = await rollup({
50 input,
51 plugins: [babelPlugin({ babelHelpers: 'bundled', ...babelOptions })],
52 ...rollupOptions
53 });
54
55 return getCode(bundle, {
56 format: 'cjs',
57 exports: 'auto',
58 ...generateOptions
59 });
60 }
61
62 test('runs code through babel', async (t) => {
63 const code = await generate('fixtures/basic/main.js');
64 t.false(code.includes('const'));
65 t.is(
66 code,
67 `'use strict';
68
69 var answer = 42;
70 console.log("the answer is ".concat(answer));
71 `
72 );
73 });
74
75 test('adds helpers', async (t) => {
76 const code = await generate('fixtures/class/main.js');
77 t.true(code.includes('function _classCallCheck'));
78 });
79
80 test('adds helpers in loose mode', async (t) => {
81 const code = await generate('fixtures/class-loose/main.js');
82 t.true(code.includes('function _inherits'));
83 });
84
85 test('does not babelify excluded code', async (t) => {
86 const code = await generate('fixtures/exclusions/main.js', { exclude: '**/foo.js' });
87 // eslint-disable-next-line no-template-curly-in-string
88 t.false(code.includes('${foo()}'));
89 t.true(code.includes('=> 42'));
90 t.is(
91 code,
92 `'use strict';
93
94 const foo = () => 42;
95
96 console.log("the answer is ".concat(foo()));
97 `
98 );
99 });
100
101 test('generates sourcemap by default', async (t) => {
102 const bundle = await rollup({
103 input: 'fixtures/class/main.js',
104 plugins: [babelPlugin({ babelHelpers: 'bundled' })]
105 });
106
107 const {
108 output: [{ code, map }]
109 } = await bundle.generate({ format: 'cjs', exports: 'auto', sourcemap: true });
110
111 const target = 'log';
112 const smc = await new SourceMapConsumer(map);
113 const loc = getLocation(code, code.indexOf(target));
114 const original = smc.originalPositionFor(loc);
115
116 t.deepEqual(original, {
117 source: 'fixtures/class/main.js'.split(nodePath.sep).join('/'),
118 line: 3,
119 column: 12,
120 name: target
121 });
122 });
123
124 test('works with proposal-decorators (rollup/rollup-plugin-babel#18)', async (t) => {
125 await t.notThrowsAsync(() =>
126 rollup({
127 input: 'fixtures/proposal-decorators/main.js',
128 plugins: [babelPlugin({ babelHelpers: 'bundled' })]
129 })
130 );
131 });
132
133 test('checks config per-file', async (t) => {
134 const code = await generate('fixtures/checks/main.js', {}, { format: 'esm' });
135 t.true(code.includes('class Foo'));
136 t.true(code.includes('var Bar'));
137 t.false(code.includes('class Bar'));
138 });
139
140 test('allows transform-runtime to be used instead of bundled helpers', async (t) => {
141 const warnings = [];
142 const code = await generate(
143 'fixtures/runtime-helpers/main.js',
144 { babelHelpers: 'runtime' },
145 {},
146 {
147 onwarn(warning) {
148 warnings.push(warning.message);
149 }
150 }
151 );
152 t.deepEqual(warnings, [
153 `'@babel/runtime/helpers/classCallCheck' is imported by fixtures${nodePath.sep}runtime-helpers${nodePath.sep}main.js, but could not be resolved – treating it as an external dependency`
154 ]);
155 t.is(
156 code,
157 `'use strict';
158
159 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
160
161 var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
162
163 var Foo = function Foo() {
164 _classCallCheck(this, Foo);
165 };
166
167 module.exports = Foo;
168 `
169 );
170 });
171
172 test('allows transform-runtime to inject esm version of helpers', async (t) => {
173 const warnings = [];
174 const code = await generate(
175 'fixtures/runtime-helpers-esm/main.js',
176 { babelHelpers: 'runtime' },
177 {
178 format: 'esm'
179 },
180 {
181 onwarn(warning) {
182 warnings.push(warning.message);
183 }
184 }
185 );
186 t.deepEqual(warnings, [
187 `'@babel/runtime/helpers/esm/classCallCheck' is imported by fixtures${nodePath.sep}runtime-helpers-esm${nodePath.sep}main.js, but could not be resolved – treating it as an external dependency`
188 ]);
189 t.is(
190 code,
191 `import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
192
193 var Foo = function Foo() {
194 _classCallCheck(this, Foo);
195 };
196
197 export default Foo;
198 `
199 );
200 });
201
202 test('allows transform-runtime to be used instead of bundled helpers, but throws when CommonJS is used', async (t) => {
203 await t.throwsAsync(
204 () => generate('fixtures/runtime-helpers-commonjs/main.js', { babelHelpers: 'runtime' }),
205 {
206 message: /Rollup requires that your Babel configuration keeps ES6 module syntax intact/
207 }
208 );
209 });
210
211 test('allows using external-helpers plugin in combination with @babel/plugin-external-helpers', async (t) => {
212 const code = await generate('fixtures/external-helpers/main.js', {
213 babelHelpers: 'external'
214 });
215 t.false(code.includes('function _classCallCheck'));
216 t.true(code.includes('babelHelpers.classCallCheck'));
217 t.is(
218 code,
219 `'use strict';
220
221 var Foo = function Foo() {
222 babelHelpers.classCallCheck(this, Foo);
223 };
224
225 var Bar = function Bar() {
226 babelHelpers.classCallCheck(this, Bar);
227 };
228
229 var main = [new Foo(), new Bar()];
230
231 module.exports = main;
232 `
233 );
234 });
235
236 test('correctly renames helpers (rollup/rollup-plugin-babel#22)', async (t) => {
237 const code = await generate('fixtures/named-function-helper/main.js');
238 t.false(code.includes('babelHelpers_get get'), 'helper was incorrectly renamed');
239 });
240
241 test('runs preflight check correctly in absence of class transformer (rollup/rollup-plugin-babel#23)', async (t) => {
242 await t.notThrowsAsync(() =>
243 rollup({
244 input: 'fixtures/no-class-transformer/main.js',
245 plugins: [babelPlugin({ babelHelpers: 'bundled' })]
246 })
247 );
248 });
249
250 test('produces valid code with typeof helper', async (t) => {
251 const code = await generate('fixtures/typeof/main.js');
252 t.false(code.includes('var typeof'));
253 });
254
255 test('handles babelrc with ignore option used', async (t) => {
256 const code = await generate('fixtures/ignored-file/main.js');
257 t.true(code.includes('class Ignored'));
258 });
259
260 test('transpiles only files with default extensions', async (t) => {
261 const code = await generate(
262 'fixtures/extensions-default/main.js',
263 {},
264 {},
265 {
266 plugins: [babelPlugin({ babelHelpers: 'bundled' }), jsonPlugin()]
267 }
268 );
269 t.false(code.includes('class Es '), 'should transpile .es');
270 t.false(code.includes('class Es6 '), 'should transpile .es6');
271 t.false(code.includes('class Js '), 'should transpile .js');
272 t.false(code.includes('class Jsx '), 'should transpile .jsx');
273 t.false(code.includes('class Mjs '), 'should transpile .mjs');
274 t.true(code.includes('class Other '), 'should not transpile .other');
275 });
276
277 test('transpiles only files with whitelisted extensions', async (t) => {
278 const code = await generate('fixtures/extensions-custom/main.js', {
279 extensions: ['.js', '.other']
280 });
281 t.true(code.includes('class Es '), 'should not transpile .es');
282 t.true(code.includes('class Es6 '), 'should not transpile .es6');
283 t.false(code.includes('class Js '), 'should transpile .js');
284 t.true(code.includes('class Jsx '), 'should not transpile .jsx');
285 t.true(code.includes('class Mjs '), 'should not transpile .mjs');
286 t.false(code.includes('class Other '), 'should transpile .other');
287 });
288
289 test('throws when trying to add babel helper unavailable in used @babel/core version', async (t) => {
290 await t.throwsAsync(
291 () =>
292 generate('fixtures/basic/main.js', {
293 plugins: [
294 function testPlugin() {
295 return {
296 visitor: {
297 Program(path, state) {
298 state.file.addHelper('__nonexistentHelper');
299 }
300 }
301 };
302 }
303 ]
304 }),
305 {
306 message: `${nodePath.resolve(
307 __dirname,
308 'fixtures',
309 'basic',
310 'main.js'
311 )}: Unknown helper __nonexistentHelper`
312 }
313 );
314 });
315
316 test('works with minified bundled helpers', async (t) => {
317 const BASE_CHAR_CODE = 'a'.charCodeAt(0);
318 let counter = 0;
319
320 await t.notThrowsAsync(() =>
321 generate('fixtures/class/main.js', {
322 plugins: [
323 function testPlugin({ types }) {
324 return {
325 visitor: {
326 FunctionDeclaration(path) {
327 // super simple mangling
328 path
329 .get('id')
330 .replaceWith(types.identifier(String.fromCharCode(BASE_CHAR_CODE + counter)));
331
332 counter += 1;
333 }
334 }
335 };
336 }
337 ]
338 })
339 );
340 });
341
342 test('supports customizing the loader', async (t) => {
343 const customBabelPlugin = createBabelInputPluginFactory(() => {
344 return {
345 config(cfg) {
346 return {
347 ...cfg.options,
348 plugins: [
349 ...(cfg.options.plugins || []),
350 // Include a custom plugin in the options.
351 [replaceConsoleLogProperty, { replace: 'foobaz' }]
352 ]
353 };
354 },
355 result(result) {
356 return {
357 ...result,
358 code: `${result.code}\n// Generated by some custom loader`
359 };
360 }
361 };
362 });
363 const bundle = await rollup({
364 input: 'fixtures/basic/main.js',
365 plugins: [customBabelPlugin({ babelHelpers: 'bundled' })]
366 });
367 const code = await getCode(bundle);
368
369 t.true(code.includes('// Generated by some custom loader'), 'adds the custom comment');
370 t.true(code.includes('console.foobaz'), 'runs the plugin');
371 });
372
373 test('supports overriding the plugin options in custom loader', async (t) => {
374 const customBabelPlugin = createBabelInputPluginFactory(() => {
375 return {
376 options(options) {
377 // Ignore the js extension to test overriding the options
378 return { pluginOptions: { ...options, extensions: ['.x'] } };
379 },
380 config(cfg) {
381 return {
382 ...cfg.options,
383 plugins: [
384 ...(cfg.options.plugins || []),
385 // Include a custom plugin in the options.
386 [replaceConsoleLogProperty, { replace: 'foobaz' }]
387 ]
388 };
389 },
390 result(result) {
391 return {
392 ...result,
393 code: `${result.code}\n// Generated by some custom loader`
394 };
395 }
396 };
397 });
398 const bundle = await rollup({
399 input: 'fixtures/basic/main.js',
400 plugins: [customBabelPlugin({ babelHelpers: 'bundled' })]
401 });
402 const code = await getCode(bundle);
403
404 t.false(
405 code.includes('// Generated by some custom loader'),
406 'does not add the comment to ignored file'
407 );
408 t.false(code.includes('console.foobaz'), 'does not run the plugin on ignored file');
409 });
410
411 test('uses babel plugins passed in to the rollup plugin', async (t) => {
412 const code = await generate('fixtures/basic/main.js', {
413 plugins: [[replaceConsoleLogProperty, { replace: 'foobaz' }]]
414 });
415 t.true(code.includes('console.foobaz'));
416 });
417
418 test('can be used as an input plugin while transforming the output', async (t) => {
419 const bundle = await rollup({
420 input: 'fixtures/basic/main.js',
421 plugins: [
422 getBabelOutputPlugin({
423 presets: ['@babel/env']
424 })
425 ]
426 });
427 const code = await getCode(bundle);
428
429 t.false(code.includes('const'));
430 });
+0
-361
packages/babel/test/as-output-plugin.js less more
0 import * as nodePath from 'path';
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4 import { SourceMapConsumer } from 'source-map';
5
6 import { getCode } from '../../../util/test';
7
8 import { getBabelOutputPlugin, createBabelOutputPluginFactory } from '..';
9
10 process.chdir(__dirname);
11
12 function getLocation(source, charIndex) {
13 const lines = source.split('\n');
14 const len = lines.length;
15
16 let lineStart = 0;
17
18 for (let i = 0; i < len; i += 1) {
19 const line = lines[i];
20 // +1 for newline
21 const lineEnd = lineStart + line.length + 1;
22
23 if (lineEnd > charIndex) {
24 return { line: i + 1, column: charIndex - lineStart };
25 }
26
27 lineStart = lineEnd;
28 }
29
30 throw new Error('Could not determine location of character');
31 }
32
33 function replaceConsoleLogProperty({ types: t }) {
34 return {
35 name: 'replace-console-log-property',
36 visitor: {
37 MemberExpression(path, state) {
38 const { opts } = state;
39 if (path.node.property.name === 'log') {
40 path.get('property').replaceWith(t.identifier(opts.replace));
41 }
42 }
43 }
44 };
45 }
46
47 async function generate(input, babelOptions = {}, generateOptions = {}, rollupOptions = {}) {
48 const bundle = await rollup({
49 input,
50 ...rollupOptions
51 });
52
53 return getCode(bundle, {
54 format: 'cjs',
55 exports: 'auto',
56 plugins: [getBabelOutputPlugin(babelOptions)],
57 ...generateOptions
58 });
59 }
60
61 test('allows running the plugin on the output via output options', async (t) => {
62 const code = await generate('fixtures/basic/main.js', {
63 presets: ['@babel/env']
64 });
65 t.false(code.includes('const'));
66 });
67
68 test('ignores .babelrc when transforming the output by default', async (t) => {
69 const code = await generate('fixtures/basic/main.js');
70 t.true(code.includes('const'));
71 });
72
73 test("allows transform-runtime to be used with `useESModules: false` (the default) and `format: 'cjs'`", async (t) => {
74 const code = await generate(
75 'fixtures/runtime-helpers/main.js',
76 {
77 presets: ['@babel/env'],
78 plugins: [['@babel/transform-runtime', { useESModules: false }]]
79 },
80 { format: 'cjs' }
81 );
82 t.is(
83 code,
84 `'use strict';
85
86 var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
87
88 var Foo = function Foo() {
89 _classCallCheck(this, Foo);
90 };
91
92 module.exports = Foo;
93 `
94 );
95 });
96
97 test("allows transform-runtime to be used with `useESModules: true` and `format: 'esm'`", async (t) => {
98 const code = await generate(
99 'fixtures/runtime-helpers/main.js',
100 {
101 presets: ['@babel/env'],
102 plugins: [['@babel/transform-runtime', { useESModules: true }]]
103 },
104 { format: 'esm' }
105 );
106 t.is(
107 code,
108 `import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
109
110 var Foo = function Foo() {
111 _classCallCheck(this, Foo);
112 };
113
114 export default Foo;
115 `
116 );
117 });
118
119 test('generates sourcemap by default', async (t) => {
120 const bundle = await rollup({ input: 'fixtures/class/main.js' });
121
122 const {
123 output: [{ code, map }]
124 } = await bundle.generate({
125 format: 'cjs',
126 exports: 'auto',
127 plugins: [getBabelOutputPlugin()],
128 sourcemap: true
129 });
130
131 const target = 'log';
132 const smc = await new SourceMapConsumer(map);
133 const loc = getLocation(code, code.indexOf(target));
134 const original = smc.originalPositionFor(loc);
135
136 t.deepEqual(original, {
137 source: 'fixtures/class/main.js'.split(nodePath.sep).join('/'),
138 line: 3,
139 column: 12,
140 name: target
141 });
142 });
143
144 test('allows using external-helpers plugin even if the externalHelpers flag is not passed', async (t) => {
145 const warnings = [];
146 const code = await generate(
147 'fixtures/external-helpers/main.js',
148 {
149 presets: ['@babel/env'],
150 plugins: ['@babel/external-helpers']
151 },
152 {},
153 {
154 onwarn(warning) {
155 warnings.push(warning.message);
156 }
157 }
158 );
159 t.deepEqual(warnings, []);
160 t.false(code.includes('function _classCallCheck'));
161 t.true(code.includes('babelHelpers.classCallCheck'));
162 t.is(
163 code,
164 `'use strict';
165
166 var Foo = function Foo() {
167 babelHelpers.classCallCheck(this, Foo);
168 };
169
170 var Bar = function Bar() {
171 babelHelpers.classCallCheck(this, Bar);
172 };
173
174 var main = [new Foo(), new Bar()];
175 module.exports = main;
176 `
177 );
178 });
179
180 test('warns when using the "include" option', async (t) => {
181 const warnings = [];
182 await generate(
183 'fixtures/basic/main.js',
184 {
185 include: ['*.js']
186 },
187 {},
188 {
189 onwarn(warning) {
190 warnings.push(warning.message);
191 }
192 }
193 );
194 t.deepEqual(warnings, [
195 'The "include", "exclude" and "extensions" options are ignored when transforming the output.'
196 ]);
197 });
198
199 test('transforms all chunks in a code-splitting setup', async (t) => {
200 const bundle = await rollup({ input: 'fixtures/chunks/main.js' });
201 const output = await getCode(
202 bundle,
203 {
204 format: 'esm',
205 plugins: [
206 getBabelOutputPlugin({
207 plugins: ['@babel/syntax-dynamic-import'],
208 presets: ['@babel/env']
209 })
210 ]
211 },
212 true
213 );
214
215 t.deepEqual(
216 output.map(({ code }) => code),
217 [
218 `import('./dep-525a96b3.js').then(function (result) {
219 return console.log(result);
220 });
221 `,
222 `var dep = function dep() {
223 return 42;
224 };
225
226 export default dep;
227 `
228 ]
229 );
230 });
231
232 test('transforms all chunks when preserving modules', async (t) => {
233 const bundle = await rollup({
234 input: 'fixtures/preserve-modules/main.js',
235 preserveModules: true
236 });
237 const output = await getCode(
238 bundle,
239 {
240 format: 'esm',
241 plugins: [
242 getBabelOutputPlugin({
243 presets: ['@babel/env']
244 })
245 ]
246 },
247 true
248 );
249
250 t.deepEqual(
251 output.map(({ code }) => code),
252 [
253 `import getResult from './dep.js';
254 var value = 42;
255 console.log(getResult(value));
256 `,
257 `var getResult = function getResult(value) {
258 return value + 1;
259 };
260
261 export default getResult;
262 `
263 ]
264 );
265 });
266
267 test('supports customizing the loader', async (t) => {
268 const customBabelPlugin = createBabelOutputPluginFactory(() => {
269 return {
270 config(cfg) {
271 return Object.assign({}, cfg.options, {
272 plugins: [
273 ...(cfg.options.plugins || []),
274
275 // Include a custom plugin in the options.
276 [replaceConsoleLogProperty, { replace: 'foobaz' }]
277 ]
278 });
279 },
280 result(result) {
281 return Object.assign({}, result, {
282 code: `${result.code}\n// Generated by some custom loader`
283 });
284 }
285 };
286 });
287 const bundle = await rollup({ input: 'fixtures/basic/main.js' });
288 const code = await getCode(bundle, { format: 'cjs', plugins: [customBabelPlugin()] });
289
290 t.true(code.includes('// Generated by some custom loader'), 'adds the custom comment');
291 t.true(code.includes('console.foobaz'), 'runs the plugin');
292 });
293
294 test('throws when using a Rollup output format other than esm or cjs', async (t) => {
295 await t.throwsAsync(() => generate('fixtures/basic/main.js', {}, { format: 'iife' }), {
296 message: `Using Babel on the generated chunks is strongly discouraged for formats other than "esm" or "cjs" as it can easily break wrapper code and lead to accidentally created global variables. Instead, you should set "output.format" to "esm" and use Babel to transform to another format, e.g. by adding "presets: [['@babel/env', { modules: 'umd' }]]" to your Babel options. If you still want to proceed, add "allowAllFormats: true" to your plugin options.`
297 });
298 });
299
300 test('allows using a Rollup output format other than esm or cjs with allowAllFormats', async (t) => {
301 const code = await generate(
302 'fixtures/basic/main.js',
303 { presets: ['@babel/env'], allowAllFormats: true },
304 { format: 'iife' }
305 );
306 t.is(
307 code,
308 `(function () {
309 'use strict';
310
311 var answer = 42;
312 console.log("the answer is ".concat(answer));
313 })();
314 `
315 );
316 });
317
318 test('allows using Babel to transform to other formats', async (t) => {
319 const code = await generate(
320 'fixtures/basic/main.js',
321 { presets: [['@babel/env', { modules: 'umd' }]] },
322 { format: 'esm' }
323 );
324 t.is(
325 code,
326 `(function (global, factory) {
327 if (typeof define === "function" && define.amd) {
328 define([], factory);
329 } else if (typeof exports !== "undefined") {
330 factory();
331 } else {
332 var mod = {
333 exports: {}
334 };
335 factory();
336 global.unknown = mod.exports;
337 }
338 })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function () {
339 "use strict";
340
341 var answer = 42;
342 console.log("the answer is ".concat(answer));
343 });
344 `
345 );
346 });
347
348 test('loads configuration files when configFile is passed', async (t) => {
349 const code = await generate('fixtures/config-file/main.js', {
350 configFile: nodePath.resolve(__dirname, 'fixtures/config-file/config.json')
351 });
352 t.is(
353 code,
354 `'use strict';
355
356 const answer = Math.pow(42, 2);
357 console.log(\`the answer is \${answer}\`);
358 `
359 );
360 });
+0
-3
packages/babel/test/fixtures/.babelrc less more
0 {
1 "presets": [ "@babel/env" ]
2 }
+0
-10
packages/babel/test/fixtures/.eslintrc less more
0 {
1 "rules": {
2 "class-methods-use-this": "off",
3 "no-alert": "off",
4 "no-console": "off",
5 "no-param-reassign": "off",
6 "no-undef": "off",
7 "import/prefer-default-export": "off"
8 }
9 }
+0
-2
packages/babel/test/fixtures/basic/main.js less more
0 const answer = 42;
1 console.log(`the answer is ${answer}`);
+0
-3
packages/babel/test/fixtures/checks/foo/.babelrc less more
0 {
1 "presets": [ ["@babel/env", { "exclude": ["transform-classes"] }] ]
2 }
+0
-1
packages/babel/test/fixtures/checks/foo/index.js less more
0 export default class Foo {}
+0
-5
packages/babel/test/fixtures/checks/main.js less more
0 import Foo from './foo/index';
1
2 class Bar {}
3
4 console.log({ Foo, Bar });
+0
-1
packages/babel/test/fixtures/chunks/dep.js less more
0 export default () => 42;
+0
-1
packages/babel/test/fixtures/chunks/main.js less more
0 import('./dep.js').then((result) => console.log(result));
+0
-5
packages/babel/test/fixtures/class/main.js less more
0 export default class Foo {
1 bar() {
2 console.log('baz');
3 }
4 }
+0
-3
packages/babel/test/fixtures/class-loose/.babelrc less more
0 {
1 "presets": [ ["@babel/env", { "loose": true } ] ]
2 }
+0
-5
packages/babel/test/fixtures/class-loose/main.js less more
0 export default class Foo extends Bar {
1 baz() {
2 console.log('xyz');
3 }
4 }
+0
-3
packages/babel/test/fixtures/config-file/config.json less more
0 {
1 "presets": [["@babel/env", { "targets": { "node": "6" } }]]
2 }
+0
-2
packages/babel/test/fixtures/config-file/main.js less more
0 const answer = 42 ** 2;
1 console.log(`the answer is ${answer}`);
+0
-1
packages/babel/test/fixtures/exclusions/foo.js less more
0 export const foo = () => 42;
+0
-3
packages/babel/test/fixtures/exclusions/main.js less more
0 import { foo } from './foo';
1
2 console.log(`the answer is ${foo()}`);
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.es less more
0 export default class Es {}
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.es6 less more
0 export default class Es6 {}
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.js less more
0 export default class Js {}
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.jsx less more
0 export default class Jsx {}
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.mjs less more
0 export default class Mjs {}
+0
-1
packages/babel/test/fixtures/extensions-custom/ext.other less more
0 export default class Other {}
+0
-7
packages/babel/test/fixtures/extensions-custom/main.js less more
0 // eslint-disable-next-line import/extensions
1 export { default as Js } from './ext.js';
2 export { default as Jsx } from './ext.jsx';
3 export { default as Es6 } from './ext.es6';
4 export { default as Es } from './ext.es';
5 export { default as Mjs } from './ext.mjs';
6 export { default as Other } from './ext.other';
+0
-1
packages/babel/test/fixtures/extensions-default/ext.es less more
0 export default class Es {}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.es6 less more
0 export default class Es6 {}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.js less more
0 export default class Js {}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.json less more
0 {"json": true}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.jsx less more
0 export default class Jsx {}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.mjs less more
0 export default class Mjs {}
+0
-1
packages/babel/test/fixtures/extensions-default/ext.other less more
0 export default class Other {}
+0
-8
packages/babel/test/fixtures/extensions-default/main.js less more
0 // eslint-disable-next-line import/extensions
1 export { default as Js } from './ext.js';
2 export { default as Jsx } from './ext.jsx';
3 export { default as Es6 } from './ext.es6';
4 export { default as Es } from './ext.es';
5 export { default as Mjs } from './ext.mjs';
6 export { default as Json } from './ext.json';
7 export { default as Other } from './ext.other';
+0
-4
packages/babel/test/fixtures/external-helpers/.babelrc less more
0 {
1 "presets": [ "@babel/env" ],
2 "plugins": [ "@babel/external-helpers" ]
3 }
+0
-1
packages/babel/test/fixtures/external-helpers/bar.js less more
0 export default class Bar {}
+0
-1
packages/babel/test/fixtures/external-helpers/foo.js less more
0 export default class Foo {}
+0
-4
packages/babel/test/fixtures/external-helpers/main.js less more
0 import Foo from './foo';
1 import Bar from './bar';
2
3 export default [new Foo(), new Bar()];
+0
-4
packages/babel/test/fixtures/ignored-file/.babelrc less more
0 {
1 "presets": [ ["@babel/env", { "loose": true } ] ],
2 "ignore": ["ignored.js"]
3 }
+0
-1
packages/babel/test/fixtures/ignored-file/ignored.js less more
0 export default class Ignored {}
+0
-1
packages/babel/test/fixtures/ignored-file/main.js less more
0 export { default } from './ignored';
+0
-3
packages/babel/test/fixtures/named-function-helper/_config.js less more
0 module.exports = {
1 description: 'correctly renames helpers'
2 };
+0
-11
packages/babel/test/fixtures/named-function-helper/main.js less more
0 class Bar {
1 baz() {
2 alert('baz');
3 }
4 }
5
6 export class Foo extends Bar {
7 baz() {
8 super.baz();
9 }
10 }
+0
-1
packages/babel/test/fixtures/no-class-transformer/.babelrc less more
0 {}
+0
-1
packages/babel/test/fixtures/no-class-transformer/main.js less more
0 assert.equal(1 + 1, 2);
+0
-1
packages/babel/test/fixtures/preserve-modules/dep.js less more
0 export default (value) => value + 1;
+0
-4
packages/babel/test/fixtures/preserve-modules/main.js less more
0 import getResult from './dep';
1
2 const value = 42;
3 console.log(getResult(value));
+0
-6
packages/babel/test/fixtures/proposal-decorators/.babelrc less more
0 {
1 "presets": [ "@babel/env" ],
2 "plugins": [
3 ["@babel/proposal-decorators", { "legacy": true }]
4 ]
5 }
+0
-6
packages/babel/test/fixtures/proposal-decorators/main.js less more
0 @annotation
1 export default class MyClass {}
2
3 function annotation(target) {
4 target.annotated = true;
5 }
+0
-4
packages/babel/test/fixtures/runtime-helpers/.babelrc less more
0 {
1 "presets": [ "@babel/env" ],
2 "plugins": [ "@babel/external-helpers", "@babel/transform-runtime" ]
3 }
+0
-1
packages/babel/test/fixtures/runtime-helpers/main.js less more
0 export default class Foo {}
+0
-6
packages/babel/test/fixtures/runtime-helpers-builtins/.babelrc less more
0 {
1 "presets": [ "@babel/env" ],
2 "plugins": [
3 [ "@babel/transform-runtime" ]
4 ]
5 }
+0
-1
packages/babel/test/fixtures/runtime-helpers-builtins/main.js less more
0 export default class Foo {}
+0
-4
packages/babel/test/fixtures/runtime-helpers-commonjs/.babelrc less more
0 {
1 "presets": [ ["@babel/env", { "modules": "cjs" }] ],
2 "plugins": [ "@babel/transform-runtime" ]
3 }
+0
-1
packages/babel/test/fixtures/runtime-helpers-commonjs/main.js less more
0 export default class Foo {}
+0
-6
packages/babel/test/fixtures/runtime-helpers-esm/.babelrc less more
0 {
1 "presets": [ "@babel/env" ],
2 "plugins": [
3 [ "@babel/transform-runtime", { "useESModules": true } ]
4 ]
5 }
+0
-1
packages/babel/test/fixtures/runtime-helpers-esm/main.js less more
0 export default class Foo {}
+0
-3
packages/babel/test/fixtures/typeof/bar.js less more
0 export default function bar(a) {
1 return typeof a;
2 }
+0
-3
packages/babel/test/fixtures/typeof/foo.js less more
0 export default function foo(a) {
1 return typeof a;
2 }
+0
-4
packages/babel/test/fixtures/typeof/main.js less more
0 import foo from './foo';
1 import bar from './bar';
2
3 console.log(typeof foo, typeof bar, foo(1), bar(2));
+0
-149
packages/babel/test/types.ts less more
0 /** eslint-disable @typescript-eslint/no-unused-vars */
1
2 import babelPlugin, {
3 babel,
4 getBabelInputPlugin,
5 getBabelOutputPlugin,
6 createBabelInputPluginFactory,
7 createBabelOutputPluginFactory
8 } from '../types';
9
10 const rollupConfig: import('rollup').RollupOptions = {
11 input: 'main.js',
12 output: {
13 file: 'bundle.js',
14 format: 'iife'
15 },
16 plugins: [
17 babelPlugin({
18 include: 'node_modules/**',
19 exclude: ['node_modules/foo/**', 'node_modules/bar/**', /node_modules/],
20 extensions: ['.js', '.coffee'],
21 babelHelpers: 'runtime',
22 skipPreflightCheck: true,
23 babelrc: false,
24 plugins: []
25 }),
26 babel({
27 include: 'node_modules/**',
28 exclude: ['node_modules/foo/**', 'node_modules/bar/**', /node_modules/],
29 extensions: ['.js', '.coffee'],
30 babelHelpers: 'runtime',
31 skipPreflightCheck: true,
32 babelrc: false,
33 plugins: []
34 }),
35 getBabelInputPlugin({
36 include: 'node_modules/**',
37 exclude: ['node_modules/foo/**', 'node_modules/bar/**', /node_modules/],
38 extensions: ['.js', '.coffee'],
39 babelHelpers: 'runtime',
40 skipPreflightCheck: true,
41 babelrc: false,
42 plugins: []
43 }),
44 getBabelOutputPlugin({
45 allowAllFormats: true,
46 babelrc: false,
47 plugins: []
48 })
49 ]
50 };
51
52 export default rollupConfig;
53
54 createBabelInputPluginFactory((babelCore) => {
55 function myPlugin() {
56 return {
57 name: `input-${babelCore.version}`,
58 visitor: {}
59 };
60 }
61
62 return {
63 // Passed the plugin options.
64 options({ opt1, opt2, ...pluginOptions }) {
65 return {
66 // Pull out any custom options that the plugin might have.
67 customOptions: { opt1, opt2 },
68
69 // Pass the options back with the two custom options removed.
70 pluginOptions
71 };
72 },
73
74 // eslint-disable-next-line @typescript-eslint/no-unused-vars
75 config(cfg, { code, customOptions }) {
76 if (cfg.hasFilesystemConfig()) {
77 // Use the normal config
78 return cfg.options;
79 }
80
81 return {
82 ...cfg.options,
83 plugins: [
84 ...(cfg.options.plugins || []),
85
86 // Include a custom plugin in the options.
87 myPlugin
88 ]
89 };
90 },
91
92 // eslint-disable-next-line @typescript-eslint/no-unused-vars
93 result(result, { code, customOptions, config, transformOptions }) {
94 return {
95 ...result,
96 code: `${result.code}\n// Generated by some custom plugin`
97 };
98 }
99 };
100 });
101
102 createBabelOutputPluginFactory((babelCore) => {
103 function myPlugin() {
104 return {
105 name: `output-${babelCore.version}`,
106 visitor: {}
107 };
108 }
109
110 return {
111 // Passed the plugin options.
112 options({ opt1, opt2, ...pluginOptions }) {
113 return {
114 // Pull out any custom options that the plugin might have.
115 customOptions: { opt1, opt2 },
116
117 // Pass the options back with the two custom options removed.
118 pluginOptions
119 };
120 },
121
122 // eslint-disable-next-line @typescript-eslint/no-unused-vars
123 config(cfg, { code, customOptions }) {
124 if (cfg.hasFilesystemConfig()) {
125 // Use the normal config
126 return cfg.options;
127 }
128
129 return {
130 ...cfg.options,
131 plugins: [
132 ...(cfg.options.plugins || []),
133
134 // Include a custom plugin in the options.
135 myPlugin
136 ]
137 };
138 },
139
140 // eslint-disable-next-line @typescript-eslint/no-unused-vars
141 result(result, { code, customOptions, config, transformOptions }) {
142 return {
143 ...result,
144 code: `${result.code}\n// Generated by some custom plugin`
145 };
146 }
147 };
148 });
+0
-106
packages/babel/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1 import { FilterPattern } from '@rollup/pluginutils';
2 import * as babelCore from '@babel/core';
3
4 export interface RollupBabelInputPluginOptions
5 extends Omit<babelCore.TransformOptions, 'include' | 'exclude'> {
6 /**
7 * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there.
8 * @default undefined;
9 */
10 include?: FilterPattern;
11 /**
12 * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. When relaying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself.
13 * @default undefined;
14 */
15 exclude?: FilterPattern;
16 /**
17 * An array of file extensions that Babel should transpile. If you want to transpile TypeScript files with this plugin it's essential to include .ts and .tsx in this option.
18 * @default ['.js', '.jsx', '.es6', '.es', '.mjs']
19 */
20 extensions?: string[];
21 /**
22 * It is recommended to configure this option explicitly (even if with its default value) so an informed decision is taken on how those babel helpers are inserted into the code.
23 * @default 'bundled'
24 */
25 babelHelpers?: 'bundled' | 'runtime' | 'inline' | 'external';
26 /**
27 * Before transpiling your input files this plugin also transpile a short piece of code for each input file. This is used to validate some misconfiguration errors, but for sufficiently big projects it can slow your build times so if you are confident about your configuration then you might disable those checks with this option.
28 * @default false
29 */
30 skipPreflightCheck?: boolean;
31 }
32
33 export interface RollupBabelOutputPluginOptions
34 extends Omit<babelCore.TransformOptions, 'include' | 'exclude'> {
35 /**
36 * Use with other formats than UMD/IIFE.
37 * @default false
38 */
39 allowAllFormats?: boolean;
40 }
41
42 export type RollupBabelCustomInputPluginOptions = (
43 options: RollupBabelInputPluginOptions & Record<string, any>
44 ) => {
45 customOptions: Record<string, any>;
46 pluginOptions: RollupBabelInputPluginOptions;
47 };
48 export type RollupBabelCustomOutputPluginOptions = (
49 options: RollupBabelOutputPluginOptions & Record<string, any>
50 ) => {
51 customOptions: Record<string, any>;
52 pluginOptions: RollupBabelOutputPluginOptions;
53 };
54 export type RollupBabelCustomPluginConfig = (
55 cfg: babelCore.PartialConfig,
56 options: { code: string; customOptions: Record<string, any> }
57 ) => babelCore.TransformOptions;
58 export type RollupBabelCustomPluginResult = (
59 result: babelCore.BabelFileResult,
60 options: {
61 code: string;
62 customOptions: Record<string, any>;
63 config: babelCore.PartialConfig;
64 transformOptions: babelCore.TransformOptions;
65 }
66 ) => babelCore.BabelFileResult;
67 export interface RollupBabelCustomInputPlugin {
68 options?: RollupBabelCustomInputPluginOptions;
69 config?: RollupBabelCustomPluginConfig;
70 result?: RollupBabelCustomPluginResult;
71 }
72 export interface RollupBabelCustomOutputPlugin {
73 options?: RollupBabelCustomOutputPluginOptions;
74 config?: RollupBabelCustomPluginConfig;
75 result?: RollupBabelCustomPluginResult;
76 }
77 export type RollupBabelCustomInputPluginBuilder = (
78 babel: typeof babelCore
79 ) => RollupBabelCustomInputPlugin;
80 export type RollupBabelCustomOutputPluginBuilder = (
81 babel: typeof babelCore
82 ) => RollupBabelCustomOutputPlugin;
83
84 /**
85 * A Rollup plugin for seamless integration between Rollup and Babel.
86 * @param options - Plugin options.
87 * @returns Plugin instance.
88 */
89 export function getBabelInputPlugin(options?: RollupBabelInputPluginOptions): Plugin;
90 export function getBabelOutputPlugin(options?: RollupBabelOutputPluginOptions): Plugin;
91
92 export function createBabelInputPluginFactory(
93 customCallback?: RollupBabelCustomInputPluginBuilder
94 ): typeof getBabelInputPlugin;
95 export function createBabelOutputPluginFactory(
96 customCallback?: RollupBabelCustomOutputPluginBuilder
97 ): typeof getBabelOutputPlugin;
98
99 /**
100 * A Rollup plugin for seamless integration between Rollup and Babel.
101 * @param options - Plugin options.
102 * @returns Plugin instance.
103 */
104 export function babel(options?: RollupBabelInputPluginOptions): Plugin;
105 export default babel;
+0
-13
packages/beep/CHANGELOG.md less more
0 # @rollup/plugin-beep ChangeLog
1
2 ## v0.2.0
3
4 _2020-04-12_
5
6 ### Features
7
8 - feat: Add types (#230)
9
10 ## 0.1.0
11
12 - First Release
+0
-53
packages/beep/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-beep
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-beep
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-beep
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-beep
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-beep
10
11 🍣 A Rollup plugin that beeps when a build ends with errors.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-beep --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 const beep = require('@rollup/plugin-beep');
31
32 module.exports = {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [beep()]
39 };
40 ```
41
42 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). If the build produces any errors, the plugin will write a "beep" character to stderr, which should be audible on most systems.
43
44 ## Options
45
46 This plugin currently has no available options.
47
48 ## Meta
49
50 [CONTRIBUTING](/.github/CONTRIBUTING.md)
51
52 [LICENSE (MIT)](/LICENSE)
+0
-17
packages/beep/lib/index.js less more
0 const defaults = {
1 errors: true,
2 warnings: false
3 };
4 const beep = (opts) => {
5 const options = Object.assign({}, defaults, opts);
6 return {
7 name: 'beep',
8 buildEnd(err) {
9 if (err && options.errors) {
10 process.stderr.write('\x07');
11 }
12 }
13 };
14 };
15
16 module.exports = beep;
+0
-56
packages/beep/package.json less more
0 {
1 "name": "@rollup/plugin-beep",
2 "version": "0.2.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "A Rollup plugin which beeps on errors and warnings",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "shellscape",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/beep",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "lib/index.js",
13 "engines": {
14 "node": ">= 8.0.0"
15 },
16 "scripts": {
17 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
18 "ci:lint": "pnpm run lint",
19 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
20 "ci:test": "ava --verbose",
21 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
22 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
23 "lint:js": "eslint --fix --cache lib test types --ext .js,.ts",
24 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
25 "test": "ava"
26 },
27 "files": [
28 "lib/",
29 "README.md",
30 "LICENSE"
31 ],
32 "keywords": [
33 "beep",
34 "plugin",
35 "rollup"
36 ],
37 "peerDependencies": {
38 "rollup": "^1.20.0||^2.0.0"
39 },
40 "devDependencies": {
41 "rollup": "^2.23.0",
42 "strip-ansi": "^6.0.0"
43 },
44 "ava": {
45 "babel": {
46 "compileEnhancements": false
47 },
48 "files": [
49 "!**/fixtures/**",
50 "!**/helpers/**",
51 "!**/output/**",
52 "!**/recipes/**"
53 ]
54 }
55 }
+0
-11
packages/beep/test/fixtures/error.config.js less more
0 const beep = require('../../lib/index');
1
2 module.exports = {
3 input: 'fixtures/error.js',
4 output: {
5 file: 'output/bundle.js',
6 format: 'cjs',
7 exports: 'auto'
8 },
9 plugins: [beep()]
10 };
+0
-1
packages/beep/test/fixtures/error.js less more
0 export * from './joker'; // eslint-disable-line
+0
-11
packages/beep/test/fixtures/pass.config.js less more
0 const beep = require('../../lib/index');
1
2 module.exports = {
3 input: 'fixtures/pass.js',
4 output: {
5 file: 'output/bundle.js',
6 format: 'cjs',
7 exports: 'auto'
8 },
9 plugins: [beep()]
10 };
+0
-2
packages/beep/test/fixtures/pass.js less more
0 const batman = () => null;
1 export default batman;
+0
-13
packages/beep/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## pass
7
8 > Snapshot 1
9
10 `␊
11 fixtures/pass.js → output/bundle.js...␊
12 created output/bundle.js in <time>ms`
packages/beep/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-20
packages/beep/test/test.js less more
0 const test = require('ava');
1 const execa = require('execa');
2 const strip = require('strip-ansi');
3
4 const options = { cwd: __dirname };
5
6 test('pass', async (t) => {
7 const args = '--config fixtures/pass.config.js'.split(' ');
8 const { stderr } = await execa('rollup', args, options);
9
10 t.snapshot(strip(stderr.replace(/\d+ms/, '<time>ms')));
11 });
12
13 test('error', async (t) => {
14 const args = '--config fixtures/error.config.js'.split(' ');
15 const throws = async () => execa('rollup', args, options);
16
17 const { stderr } = await t.throwsAsync(throws);
18 t.truthy(stderr.indexOf('\x07'));
19 });
+0
-6
packages/beep/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 /**
3 * 🍣 A Rollup plugin that beeps when a build ends with errors.
4 */
5 export default function beep(): Plugin;
+0
-147
packages/buble/CHANGELOG.md less more
0 # @rollup/plugin-buble ChangeLog
1
2 ## v0.21.3
3
4 _2020-04-12_
5
6 ### Updates
7
8 - chore: upgrade buble, resolves babel/babel#11216 (#288)
9
10 ## v0.21.2
11
12 _2020-04-12_
13
14 ### Updates
15
16 - chore: Move to Typescript (#231)
17
18 ## v0.21.1
19
20 _2020-02-01_
21
22 ### Updates
23
24 - chore: update dependencies (579c612)
25 - chore: add missing entry to changelog (cbfbe98)
26
27 ## 0.21.0
28
29 _2019-12-21_
30
31 - feat(buble): use types from @types/buble (#54)
32 - feat: export Rollup\*Options interfaces (#53)
33
34 ## 0.20.0
35
36 - Republish under `@rollup` scope
37
38 ## 0.19.8
39
40 - Update `buble`
41
42 ## 0.19.6
43
44 - Update dependencies
45 - Add test
46 - Enable direct Github installation
47
48 ## 0.19.4
49
50 - Update `buble`
51 - Add usage documentation
52 - Bump dev dependencies
53 - Update repository link
54
55 ## 0.19.2
56
57 - Update `buble`
58
59 ## 0.19.1
60
61 - Update `buble`
62
63 ## 0.19.0
64
65 - Update `buble`
66 - Better support for errors thrown by `buble`
67
68 ## 0.18.0
69
70 - Update `buble`
71
72 ## 0.17.0
73
74 - Update `buble`
75
76 ## 0.16.0
77
78 - Update `buble`
79
80 ## 0.15.0
81
82 - Update `buble`
83
84 ## 0.14.0
85
86 - Update `buble`
87
88 ## 0.13.0
89
90 - Update `buble` and other deps
91
92 ## 0.12.1
93
94 - Return a `name`
95
96 ## 0.12.0
97
98 - Update `buble`
99
100 ## 0.11.0
101
102 - Update `buble`
103
104 ## 0.10.0
105
106 - Update `buble`
107
108 ## 0.9.0
109
110 - Update `buble`
111
112 ## 0.8.0
113
114 - Update `buble`
115
116 ## 0.7.0
117
118 - Update `buble`
119
120 ## 0.6.0
121
122 - Update `buble`
123
124 ## 0.5.0
125
126 - Update `buble`
127
128 ## 0.4.0
129
130 - Update `buble`
131
132 ## 0.3.4
133
134 - Update `buble`
135
136 ## 0.2.3
137
138 - Make plugin 0.12-friendly
139
140 ## 0.2.2
141
142 - Update `buble`
143
144 ## 0.1.0
145
146 - First release
+0
-72
packages/buble/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-buble
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-buble
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-buble
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-buble
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-buble
10
11 🍣 A Rollup plugin which converts ES2015+ code with the Bublé compiler.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-buble --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import buble from '@rollup/plugin-buble';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [buble()]
39 };
40 ```
41
42 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).
43
44 ## Options
45
46 ### `transforms`
47
48 Type: `Object`<br>
49 Default: `{ modules: false }`
50
51 Specifies additional [transform options](https://buble.surge.sh/guide/) for the Bublé compiler.
52
53 ### `exclude`
54
55 Type: `String` | `Array[...String]`<br>
56 Default: `null`
57
58 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 no files are ignored.
59
60 ### `include`
61
62 Type: `String` | `Array[...String]`<br>
63 Default: `null`
64
65 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 all files are targeted.
66
67 ## Meta
68
69 [CONTRIBUTING](/.github/CONTRIBUTING.md)
70
71 [LICENSE (MIT)](/LICENSE)
+0
-83
packages/buble/package.json less more
0 {
1 "name": "@rollup/plugin-buble",
2 "version": "0.21.3",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Compile ES2015 with buble",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris <richard.a.harris@gmail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/buble/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/rollup-plugin-buble.cjs.js",
13 "module": "dist/rollup-plugin-buble.es.js",
14 "engines": {
15 "node": ">= 8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint && pnpm run test",
30 "pretest": "pnpm run build",
31 "test": "ava",
32 "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
33 },
34 "files": [
35 "dist",
36 "types",
37 "README.md",
38 "LICENSE"
39 ],
40 "keywords": [
41 "rollup",
42 "plugin",
43 "buble",
44 "es2015",
45 "npm",
46 "modules"
47 ],
48 "peerDependencies": {
49 "rollup": "^1.20.0||^2.0.0"
50 },
51 "dependencies": {
52 "@rollup/pluginutils": "^3.1.0",
53 "@types/buble": "^0.19.2",
54 "buble": "^0.20.0"
55 },
56 "devDependencies": {
57 "@rollup/plugin-typescript": "^5.0.2",
58 "del-cli": "^3.0.1",
59 "rollup": "^2.23.0",
60 "source-map": "^0.7.3",
61 "typescript": "^3.9.7"
62 },
63 "types": "types/index.d.ts",
64 "ava": {
65 "babel": {
66 "compileEnhancements": false
67 },
68 "extensions": [
69 "ts"
70 ],
71 "require": [
72 "ts-node/register"
73 ],
74 "files": [
75 "!**/fixtures/**",
76 "!**/output/**",
77 "!**/helpers/**",
78 "!**/recipes/**",
79 "!**/types.ts"
80 ]
81 }
82 }
+0
-13
packages/buble/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.ts',
6 output: [
7 { format: 'es', file: pkg.module },
8 { format: 'cjs', file: pkg.main, exports: 'auto' }
9 ],
10 external: Object.keys(pkg.dependencies),
11 plugins: [typescript({ sourceMap: false })]
12 };
+0
-28
packages/buble/src/index.ts less more
0 import { transform } from 'buble';
1 import { Plugin } from 'rollup';
2 import { createFilter } from '@rollup/pluginutils';
3
4 import { RollupBubleOptions } from '../types';
5
6 export default function buble(options: RollupBubleOptions = {}): Plugin {
7 const filter = createFilter(options.include, options.exclude);
8 const transformOptions = { ...options, transforms: { ...options.transforms, modules: false } };
9
10 return {
11 name: 'buble',
12
13 transform(code, id) {
14 if (!filter(id)) return null;
15
16 try {
17 return transform(code, transformOptions);
18 } catch (e) {
19 e.plugin = 'buble';
20 if (!e.loc) e.loc = {};
21 e.loc.file = id;
22 e.frame = e.snippet;
23 throw e;
24 }
25 }
26 };
27 }
+0
-1
packages/buble/test/fixtures/basic/main.js less more
0 export default () => 42;
+0
-35
packages/buble/test/test.js less more
0 const test = require('ava');
1 const rollup = require('rollup');
2
3 const buble = require('..');
4
5 process.chdir(__dirname);
6
7 const getChunksFromGenerated = (generated) => {
8 if (generated.output) {
9 return generated.output.length
10 ? generated.output
11 : Object.keys(generated.output).map((chunkName) => generated.output[chunkName]);
12 }
13 return [generated];
14 };
15
16 function getChunksFromBundle(bundle) {
17 return bundle
18 .generate({
19 format: 'esm'
20 })
21 .then(getChunksFromGenerated);
22 }
23
24 test('transforms files', async (t) =>
25 rollup
26 .rollup({
27 input: 'fixtures/basic/main.js',
28 plugins: [buble()]
29 })
30 .then(getChunksFromBundle)
31 .then((generated) => {
32 t.is(generated.length, 1);
33 t.is(generated[0].code, 'function main () { return 42; }\n\nexport default main;\n');
34 }));
+0
-21
packages/buble/test/types.ts less more
0 import { RollupOptions } from 'rollup';
1
2 import buble from '..';
3
4 const config: RollupOptions = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife'
9 },
10 plugins: [
11 buble({
12 exclude: 'node_modules/**',
13 include: 'config.js',
14 transforms: { modules: true },
15 objectAssign: true
16 })
17 ]
18 };
19
20 export default config;
+0
-7
packages/buble/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": [
3 "src/**/*",
4 "types/**/*"
5 ]
6 }
+0
-20
packages/buble/types/index.d.ts less more
0 import { FilterPattern } from '@rollup/pluginutils';
1 import { TransformOptions } from 'buble';
2 import { Plugin } from 'rollup';
3
4 export interface RollupBubleOptions extends TransformOptions {
5 /**
6 * A minimatch pattern, or array of patterns, of files that should be
7 * processed by this plugin (if omitted, all files are included by default)
8 */
9 include?: FilterPattern;
10 /**
11 * Files that should be excluded, if `include` is otherwise too permissive.
12 */
13 exclude?: FilterPattern;
14 }
15
16 /**
17 * Convert ES2015 with buble.
18 */
19 export default function buble(options?: RollupBubleOptions): Plugin;
00 # @rollup/plugin-commonjs ChangeLog
1
2 ## v17.0.0
3
4 _2020-11-30_
5
6 ### Breaking Changes
7
8 - feat!: reconstruct real es module from \_\_esModule marker (#537)
9
10 ## v16.0.0
11
12 _2020-10-27_
13
14 ### Breaking Changes
15
16 - feat!: Expose cjs detection and support offline caching (#604)
17
18 ### Bugfixes
19
20 - fix: avoid wrapping `commonjsRegister` call in `createCommonjsModule(...)` (#602)
21 - fix: register dynamic modules when a different loader (i.e typescript) loads the entry file (#599)
22 - fix: fixed access to node_modules dynamic module with subfolder (i.e 'logform/json') (#601)
23
24 ### Features
25
26 - feat: pass type of import to node-resolve (#611)
127
228 ## v15.1.0
329
3333 input: 'src/index.js',
3434 output: {
3535 dir: 'output',
36 format: 'cjs',
36 format: 'cjs'
3737 },
38 plugins: [commonjs()],
38 plugins: [commonjs()]
3939 };
4040 ```
4141
6565 '!node_modules/logform/index.js',
6666 '!node_modules/logform/format.js',
6767 '!node_modules/logform/levels.js',
68 '!node_modules/logform/browser.js',
69 ],
68 '!node_modules/logform/browser.js'
69 ]
7070 });
7171 ```
7272
142142
143143 ### `requireReturnsDefault`
144144
145 Type: `boolean | "auto" | "preferred" | ((id: string) => boolean | "auto" | "preferred")`<br>
145 Type: `boolean | "namespace" | "auto" | "preferred" | ((id: string) => boolean | "auto" | "preferred")`<br>
146146 Default: `false`
147147
148148 Controls what is returned when requiring an ES module from a CommonJS file. When using the `esmExternals` option, this will also apply to external modules. By default, this plugin will render those imports as namespace imports, i.e.
173173
174174 var dep$1 = /*#__PURE__*/ Object.freeze({
175175 __proto__: null,
176 default: dep,
176 default: dep
177177 });
178178
179179 console.log(dep$1.default);
204204 enumerable: true,
205205 get: function () {
206206 return n[k];
207 },
207 }
208208 }
209209 );
210210 });
286286 output: {
287287 file: 'bundle.js',
288288 format: 'iife',
289 name: 'MyModule',
289 name: 'MyModule'
290290 },
291 plugins: [resolve(), commonjs()],
291 plugins: [resolve(), commonjs()]
292292 };
293293 ```
294294
298298
299299 ```js
300300 commonjs({
301 include: /node_modules/,
301 include: /node_modules/
302302 });
303303 ```
304304
310310
311311 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.
312312
313 ## Inter-plugin-communication
314
315 This plugin exposes the result of its CommonJS file type detection for other plugins to use. You can access it via `this.getModuleInfo` or the `moduleParsed` hook:
316
317 ```js
318 function cjsDetectionPlugin() {
319 return {
320 name: 'cjs-detection',
321 moduleParsed({
322 id,
323 meta: {
324 commonjs: { isCommonJS }
325 }
326 }) {
327 console.log(`File ${id} is CommonJS: ${isCommonJS}`);
328 }
329 };
330 }
331 ```
332
313333 ## Meta
314334
315335 [CONTRIBUTING](/.github/CONTRIBUTING.md)
00 {
11 "name": "@rollup/plugin-commonjs",
2 "version": "15.1.0",
2 "version": "17.0.0",
33 "publishConfig": {
44 "access": "public"
55 },
4646 "require"
4747 ],
4848 "peerDependencies": {
49 "rollup": "^2.22.0"
49 "rollup": "^2.30.0"
5050 },
5151 "dependencies": {
5252 "@rollup/pluginutils": "^3.1.0",
6262 "@rollup/plugin-node-resolve": "^8.4.0",
6363 "locate-character": "^2.0.5",
6464 "require-relative": "^0.8.7",
65 "rollup": "^2.23.0",
65 "rollup": "^2.30.0",
6666 "shx": "^0.3.2",
6767 "source-map": "^0.7.3",
6868 "source-map-support": "^0.5.19",
0 /* eslint-disable no-underscore-dangle */
1
2 import { tryParse } from './parse';
3
4 export default function analyzeTopLevelStatements(parse, code, id) {
5 const ast = tryParse(parse, code, id);
6
7 let isEsModule = false;
8 let hasDefaultExport = false;
9 let hasNamedExports = false;
10
11 for (const node of ast.body) {
12 switch (node.type) {
13 case 'ExportDefaultDeclaration':
14 isEsModule = true;
15 hasDefaultExport = true;
16 break;
17 case 'ExportNamedDeclaration':
18 isEsModule = true;
19 if (node.declaration) {
20 hasNamedExports = true;
21 } else {
22 for (const specifier of node.specifiers) {
23 if (specifier.exported.name === 'default') {
24 hasDefaultExport = true;
25 } else {
26 hasNamedExports = true;
27 }
28 }
29 }
30 break;
31 case 'ExportAllDeclaration':
32 isEsModule = true;
33 if (node.exported && node.exported.name === 'default') {
34 hasDefaultExport = true;
35 } else {
36 hasNamedExports = true;
37 }
38 break;
39 case 'ImportDeclaration':
40 isEsModule = true;
41 break;
42 default:
43 }
44 }
45
46 return { isEsModule, hasDefaultExport, hasNamedExports, ast };
47 }
0 /* eslint-disable no-undefined */
10 export { default as isReference } from 'is-reference';
21
32 const operators = {
1615 '||': (x) => isTruthy(x.left) || isTruthy(x.right)
1716 };
1817
19 const extractors = {
20 Identifier(names, node) {
21 names.push(node.name);
22 },
18 function not(value) {
19 return value === null ? value : !value;
20 }
2321
24 ObjectPattern(names, node) {
25 node.properties.forEach((prop) => {
26 getExtractor(prop.value.type)(names, prop.value);
27 });
28 },
22 function equals(a, b, strict) {
23 if (a.type !== b.type) return null;
24 // eslint-disable-next-line eqeqeq
25 if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
26 return null;
27 }
2928
30 ArrayPattern(names, node) {
31 node.elements.forEach((element) => {
32 if (!element) return;
33 getExtractor(element.type)(names, element);
34 });
35 },
29 export function isTruthy(node) {
30 if (!node) return false;
31 if (node.type === 'Literal') return !!node.value;
32 if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
33 if (node.operator in operators) return operators[node.operator](node);
34 return null;
35 }
3636
37 RestElement(names, node) {
38 getExtractor(node.argument.type)(names, node.argument);
39 },
37 export function isFalsy(node) {
38 return not(isTruthy(node));
39 }
4040
41 AssignmentPattern(names, node) {
42 getExtractor(node.left.type)(names, node.left);
43 }
44 };
45
46 export function flatten(node) {
41 export function getKeypath(node) {
4742 const parts = [];
4843
4944 while (node.type === 'MemberExpression') {
6257 return { name, keypath: parts.join('.') };
6358 }
6459
65 export function extractNames(node) {
66 const names = [];
67 extractors[node.type](names, node);
68 return names;
60 export const KEY_COMPILED_ESM = '__esModule';
61
62 export function isDefineCompiledEsm(node) {
63 const definedProperty =
64 getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');
65 if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {
66 return isTruthy(definedProperty.value);
67 }
68 return false;
6969 }
7070
71 function getExtractor(type) {
72 const extractor = extractors[type];
73 if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);
74 return extractor;
71 function getDefinePropertyCallName(node, targetName) {
72 const targetNames = targetName.split('.');
73
74 const {
75 callee: { object, property }
76 } = node;
77 if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
78 if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
79 if (node.arguments.length !== 3) return;
80
81 const [target, key, value] = node.arguments;
82 if (targetNames.length === 1) {
83 if (target.type !== 'Identifier' || target.name !== targetNames[0]) {
84 return;
85 }
86 }
87
88 if (targetNames.length === 2) {
89 if (
90 target.type !== 'MemberExpression' ||
91 target.object.name !== targetNames[0] ||
92 target.property.name !== targetNames[1]
93 ) {
94 return;
95 }
96 }
97
98 if (value.type !== 'ObjectExpression' || !value.properties) return;
99
100 const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value');
101 if (!valueProperty || !valueProperty.value) return;
102
103 // eslint-disable-next-line consistent-return
104 return { key: key.value, value: valueProperty.value };
75105 }
76106
77 export function isTruthy(node) {
78 if (node.type === 'Literal') return !!node.value;
79 if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
80 if (node.operator in operators) return operators[node.operator](node);
81 return undefined;
107 export function isLocallyShadowed(name, scope) {
108 while (scope.parent) {
109 if (scope.declarations[name]) {
110 return true;
111 }
112 // eslint-disable-next-line no-param-reassign
113 scope = scope.parent;
114 }
115 return false;
82116 }
83
84 export function isFalsy(node) {
85 return not(isTruthy(node));
86 }
87
88 function not(value) {
89 return value === undefined ? value : !value;
90 }
91
92 function equals(a, b, strict) {
93 if (a.type !== b.type) return undefined;
94 // eslint-disable-next-line eqeqeq
95 if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
96 return undefined;
97 }
00 import { existsSync, readFileSync } from 'fs';
11 import { join } from 'path';
22
3 import {
4 DYNAMIC_PACKAGES_ID,
5 DYNAMIC_REGISTER_PREFIX,
6 getVirtualPathForDynamicRequirePath,
7 HELPERS_ID
8 } from './helpers';
9 import { normalizePathSlashes } from './transform';
3 import { DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_PREFIX, HELPERS_ID } from './helpers';
4 import { getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';
105
116 export function getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir) {
127 let code = `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');`;
3328 }
3429
3530 export function getDynamicPackagesEntryIntro(
36 id,
3731 dynamicRequireModuleDirPaths,
3832 dynamicRequireModuleSet
3933 ) {
40 try {
41 const code = readFileSync(id, { encoding: 'utf8' });
42 let dynamicImports = Array.from(
43 dynamicRequireModuleSet,
44 (dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`
45 ).join('\n');
34 let dynamicImports = Array.from(
35 dynamicRequireModuleSet,
36 (dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`
37 ).join('\n');
4638
47 if (dynamicRequireModuleDirPaths.length) {
48 dynamicImports += `require(${JSON.stringify(
49 DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID
50 )});`;
51 }
39 if (dynamicRequireModuleDirPaths.length) {
40 dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`;
41 }
5242
53 return `${dynamicImports}\n${code}`;
54 } catch (ex) {
55 this.warn(`Failed to read file ${id}, dynamic modules might not work correctly`);
56 return null;
57 }
43 return dynamicImports;
5844 }
45
46 export function isModuleRegistrationProxy(id, dynamicRequireModuleSet) {
47 const normalizedPath = normalizePathSlashes(id);
48 return dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json');
49 }
33
44 import glob from 'glob';
55
6 import { normalizePathSlashes } from './transform';
6 import { normalizePathSlashes } from './utils';
77
88 export default function getDynamicRequirePaths(patterns) {
99 const dynamicRequireModuleSet = new Set();
0 export function wrapCode(magicString, uses, moduleName, HELPERS_NAME, virtualDynamicRequirePath) {
1 const args = `module${uses.exports ? ', exports' : ''}`;
2
3 magicString
4 .trim()
5 .prepend(`var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`)
6 .append(
7 `\n}${virtualDynamicRequirePath ? `, ${JSON.stringify(virtualDynamicRequirePath)}` : ''});`
8 );
9 }
10
11 export function rewriteExportsAndGetExportsBlock(
12 magicString,
13 moduleName,
14 wrapped,
15 topLevelModuleExportsAssignments,
16 topLevelExportsAssignmentsByName,
17 defineCompiledEsmExpressions,
18 deconflict,
19 isRestorableCompiledEsm,
20 code,
21 uses,
22 HELPERS_NAME
23 ) {
24 const namedExportDeclarations = [`export { ${moduleName} as __moduleExports };`];
25 const moduleExportsPropertyAssignments = [];
26 let deconflictedDefaultExportName;
27
28 if (!wrapped) {
29 let hasModuleExportsAssignment = false;
30 const namedExportProperties = [];
31
32 // Collect and rewrite module.exports assignments
33 for (const { left } of topLevelModuleExportsAssignments) {
34 hasModuleExportsAssignment = true;
35 magicString.overwrite(left.start, left.end, `var ${moduleName}`);
36 }
37
38 // Collect and rewrite named exports
39 for (const [exportName, node] of topLevelExportsAssignmentsByName) {
40 const deconflicted = deconflict(exportName);
41 magicString.overwrite(node.start, node.left.end, `var ${deconflicted}`);
42
43 if (exportName === 'default') {
44 deconflictedDefaultExportName = deconflicted;
45 } else {
46 namedExportDeclarations.push(
47 exportName === deconflicted
48 ? `export { ${exportName} };`
49 : `export { ${deconflicted} as ${exportName} };`
50 );
51 }
52
53 if (hasModuleExportsAssignment) {
54 moduleExportsPropertyAssignments.push(`${moduleName}.${exportName} = ${deconflicted};`);
55 } else {
56 namedExportProperties.push(`\t${exportName}: ${deconflicted}`);
57 }
58 }
59
60 // Regenerate CommonJS namespace
61 if (!hasModuleExportsAssignment) {
62 const moduleExports = `{\n${namedExportProperties.join(',\n')}\n}`;
63 magicString
64 .trim()
65 .append(
66 `\n\nvar ${moduleName} = ${
67 isRestorableCompiledEsm
68 ? `/*#__PURE__*/Object.defineProperty(${moduleExports}, '__esModule', {value: true})`
69 : moduleExports
70 };`
71 );
72 }
73 }
74
75 // Generate default export
76 const defaultExport = [];
77 if (isRestorableCompiledEsm) {
78 defaultExport.push(`export default ${deconflictedDefaultExportName || moduleName};`);
79 } else if (
80 (wrapped || deconflictedDefaultExportName) &&
81 (defineCompiledEsmExpressions.length > 0 || code.indexOf('__esModule') >= 0)
82 ) {
83 // eslint-disable-next-line no-param-reassign
84 uses.commonjsHelpers = true;
85 defaultExport.push(
86 `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${moduleName});`
87 );
88 } else {
89 defaultExport.push(`export default ${moduleName};`);
90 }
91
92 return `\n\n${defaultExport
93 .concat(namedExportDeclarations)
94 .concat(moduleExportsPropertyAssignments)
95 .join('\n')}`;
96 }
0 import { dirname, resolve } from 'path';
1
2 import { sync as nodeResolveSync } from 'resolve';
3
4 import { isLocallyShadowed } from './ast-utils';
5 import { HELPERS_ID, PROXY_SUFFIX, REQUIRE_SUFFIX, wrapId } from './helpers';
6 import { normalizePathSlashes } from './utils';
7
8 export function isRequireStatement(node, scope) {
9 if (!node) return false;
10 if (node.type !== 'CallExpression') return false;
11
12 // Weird case of `require()` or `module.require()` without arguments
13 if (node.arguments.length === 0) return false;
14
15 return isRequire(node.callee, scope);
16 }
17
18 function isRequire(node, scope) {
19 return (
20 (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) ||
21 (node.type === 'MemberExpression' && isModuleRequire(node, scope))
22 );
23 }
24
25 export function isModuleRequire({ object, property }, scope) {
26 return (
27 object.type === 'Identifier' &&
28 object.name === 'module' &&
29 property.type === 'Identifier' &&
30 property.name === 'require' &&
31 !scope.contains('module')
32 );
33 }
34
35 export function isStaticRequireStatement(node, scope) {
36 if (!isRequireStatement(node, scope)) return false;
37 return !hasDynamicArguments(node);
38 }
39
40 function hasDynamicArguments(node) {
41 return (
42 node.arguments.length > 1 ||
43 (node.arguments[0].type !== 'Literal' &&
44 (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))
45 );
46 }
47
48 const reservedMethod = { resolve: true, cache: true, main: true };
49
50 export function isNodeRequirePropertyAccess(parent) {
51 return parent && parent.property && reservedMethod[parent.property.name];
52 }
53
54 export function isIgnoredRequireStatement(requiredNode, ignoreRequire) {
55 return ignoreRequire(requiredNode.arguments[0].value);
56 }
57
58 export function getRequireStringArg(node) {
59 return node.arguments[0].type === 'Literal'
60 ? node.arguments[0].value
61 : node.arguments[0].quasis[0].value.cooked;
62 }
63
64 export function hasDynamicModuleForPath(source, id, dynamicRequireModuleSet) {
65 if (!/^(?:\.{0,2}[/\\]|[A-Za-z]:[/\\])/.test(source)) {
66 try {
67 const resolvedPath = normalizePathSlashes(nodeResolveSync(source, { basedir: dirname(id) }));
68 if (dynamicRequireModuleSet.has(resolvedPath)) {
69 return true;
70 }
71 } catch (ex) {
72 // Probably a node.js internal module
73 return false;
74 }
75
76 return false;
77 }
78
79 for (const attemptExt of ['', '.js', '.json']) {
80 const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));
81 if (dynamicRequireModuleSet.has(resolvedPath)) {
82 return true;
83 }
84 }
85
86 return false;
87 }
88
89 export function getRequireHandlers() {
90 const requiredSources = [];
91 const requiredBySource = Object.create(null);
92 const requiredByNode = new Map();
93 const requireExpressionsWithUsedReturnValue = [];
94
95 function addRequireStatement(sourceId, node, scope, usesReturnValue) {
96 const required = getRequired(sourceId);
97 requiredByNode.set(node, { scope, required });
98 if (usesReturnValue) {
99 required.nodesUsingRequired.push(node);
100 requireExpressionsWithUsedReturnValue.push(node);
101 }
102 }
103
104 function getRequired(sourceId) {
105 if (!requiredBySource[sourceId]) {
106 requiredSources.push(sourceId);
107
108 requiredBySource[sourceId] = {
109 source: sourceId,
110 name: null,
111 nodesUsingRequired: []
112 };
113 }
114
115 return requiredBySource[sourceId];
116 }
117
118 function rewriteRequireExpressionsAndGetImportBlock(
119 magicString,
120 topLevelDeclarations,
121 topLevelRequireDeclarators,
122 reassignedNames,
123 helpersNameIfUsed,
124 dynamicRegisterSources
125 ) {
126 const removedDeclarators = getDeclaratorsReplacedByImportsAndSetImportNames(
127 topLevelRequireDeclarators,
128 requiredByNode,
129 reassignedNames
130 );
131 setRemainingImportNamesAndRewriteRequires(
132 requireExpressionsWithUsedReturnValue,
133 requiredByNode,
134 magicString
135 );
136 removeDeclaratorsFromDeclarations(topLevelDeclarations, removedDeclarators, magicString);
137 const importBlock = `${(helpersNameIfUsed
138 ? [`import * as ${helpersNameIfUsed} from '${HELPERS_ID}';`]
139 : []
140 )
141 .concat(
142 // dynamic registers first, as the may be required in the other modules
143 [...dynamicRegisterSources].map((source) => `import '${wrapId(source, REQUIRE_SUFFIX)}';`),
144
145 // now the actual modules so that they are analyzed before creating the proxies;
146 // no need to do this for virtual modules as we never proxy them
147 requiredSources
148 .filter((source) => !source.startsWith('\0'))
149 .map((source) => `import '${wrapId(source, REQUIRE_SUFFIX)}';`),
150
151 // now the proxy modules
152 requiredSources.map((source) => {
153 const { name, nodesUsingRequired } = requiredBySource[source];
154 return `import ${nodesUsingRequired.length ? `${name} from ` : ``}'${
155 source.startsWith('\0') ? source : wrapId(source, PROXY_SUFFIX)
156 }';`;
157 })
158 )
159 .join('\n')}`;
160 return importBlock ? `${importBlock}\n\n` : '';
161 }
162
163 return {
164 addRequireStatement,
165 requiredSources,
166 rewriteRequireExpressionsAndGetImportBlock
167 };
168 }
169
170 function getDeclaratorsReplacedByImportsAndSetImportNames(
171 topLevelRequireDeclarators,
172 requiredByNode,
173 reassignedNames
174 ) {
175 const removedDeclarators = new Set();
176 for (const declarator of topLevelRequireDeclarators) {
177 const { required } = requiredByNode.get(declarator.init);
178 if (!required.name) {
179 const potentialName = declarator.id.name;
180 if (
181 !reassignedNames.has(potentialName) &&
182 !required.nodesUsingRequired.some((node) =>
183 isLocallyShadowed(potentialName, requiredByNode.get(node).scope)
184 )
185 ) {
186 required.name = potentialName;
187 removedDeclarators.add(declarator);
188 }
189 }
190 }
191 return removedDeclarators;
192 }
193
194 function setRemainingImportNamesAndRewriteRequires(
195 requireExpressionsWithUsedReturnValue,
196 requiredByNode,
197 magicString
198 ) {
199 let uid = 0;
200 for (const requireExpression of requireExpressionsWithUsedReturnValue) {
201 const { required } = requiredByNode.get(requireExpression);
202 if (!required.name) {
203 let potentialName;
204 const isUsedName = (node) => requiredByNode.get(node).scope.contains(potentialName);
205 do {
206 potentialName = `require$$${uid}`;
207 uid += 1;
208 } while (required.nodesUsingRequired.some(isUsedName));
209 required.name = potentialName;
210 }
211 magicString.overwrite(requireExpression.start, requireExpression.end, required.name);
212 }
213 }
214
215 function removeDeclaratorsFromDeclarations(topLevelDeclarations, removedDeclarators, magicString) {
216 for (const declaration of topLevelDeclarations) {
217 let keepDeclaration = false;
218 let [{ start }] = declaration.declarations;
219 for (const declarator of declaration.declarations) {
220 if (removedDeclarators.has(declarator)) {
221 magicString.remove(start, declarator.end);
222 } else if (!keepDeclaration) {
223 magicString.remove(start, declarator.start);
224 keepDeclaration = true;
225 }
226 start = declarator.end;
227 }
228 if (!keepDeclaration) {
229 magicString.remove(declaration.start, declaration.end);
230 }
231 }
232 }
0 export const isWrappedId = (id, suffix) => id.endsWith(suffix);
1 export const wrapId = (id, suffix) => `\0${id}${suffix}`;
2 export const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length);
3
04 export const PROXY_SUFFIX = '?commonjs-proxy';
1 export const getProxyId = (id) => `\0${id}${PROXY_SUFFIX}`;
2 export const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);
3
5 export const REQUIRE_SUFFIX = '?commonjs-require';
46 export const EXTERNAL_SUFFIX = '?commonjs-external';
5 export const getExternalProxyId = (id) => `\0${id}${EXTERNAL_SUFFIX}`;
6 export const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);
7
8 export const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
9 export const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
10 if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);
11 return path;
12 };
137
148 export const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:';
159 export const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
2216 // This will no longer be necessary once Rollup switches to ES6 output, likely
2317 // in Rollup 3
2418
25 // The "hasOwnProperty" call in "getDefaultExportFromCjs" is technically not
26 // needed, but for consumers that use Rollup's old interop pattern, it will fix
27 // rollup/rollup-plugin-commonjs#224
28 // We should remove it once Rollup core and this plugin are updated to not use
29 // this pattern any more
3019 const HELPERS = `
3120 export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3221
3322 export function getDefaultExportFromCjs (x) {
3423 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
35 }
36
37 export function createCommonjsModule(fn, basedir, module) {
38 return module = {
39 path: basedir,
40 exports: {},
41 require: function (path, base) {
42 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
43 }
44 }, fn(module, module.exports), module.exports;
4524 }
4625
4726 export function getDefaultExportFromNamespaceIfPresent (n) {
6948 `;
7049
7150 const HELPER_NON_DYNAMIC = `
72 export function commonjsRequire () {
73 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
51 export function createCommonjsModule(fn) {
52 var module = { exports: {} }
53 return fn(module, module.exports), module.exports;
54 }
55
56 export function commonjsRequire (target) {
57 throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');
7458 }
7559 `;
7660
7761 const HELPERS_DYNAMIC = `
62 export function createCommonjsModule(fn, basedir, module) {
63 return module = {
64 path: basedir,
65 exports: {},
66 require: function (path, base) {
67 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
68 }
69 }, fn(module, module.exports), module.exports;
70 }
71
7872 export function commonjsRegister (path, loader) {
7973 DYNAMIC_REQUIRE_LOADERS[path] = loader;
8074 }
44
55 import { peerDependencies } from '../package.json';
66
7 import { getDynamicPackagesEntryIntro, getDynamicPackagesModule } from './dynamic-packages-manager';
7 import analyzeTopLevelStatements from './analyze-top-level-statements';
8
9 import {
10 getDynamicPackagesEntryIntro,
11 getDynamicPackagesModule,
12 isModuleRegistrationProxy
13 } from './dynamic-packages-manager';
814 import getDynamicRequirePaths from './dynamic-require-paths';
915 import {
1016 DYNAMIC_JSON_PREFIX,
1117 DYNAMIC_PACKAGES_ID,
1218 EXTERNAL_SUFFIX,
1319 getHelpersModule,
14 getIdFromExternalProxyId,
15 getIdFromProxyId,
1620 HELPERS_ID,
17 PROXY_SUFFIX
21 isWrappedId,
22 PROXY_SUFFIX,
23 unwrapId
1824 } from './helpers';
1925 import { setIsCjsPromise } from './is-cjs';
26 import { hasCjsKeywords } from './parse';
2027 import {
2128 getDynamicJsonProxy,
2229 getDynamicRequireProxy,
2532 getUnknownRequireProxy
2633 } from './proxies';
2734 import getResolveId from './resolve-id';
28 import {
29 checkEsModule,
30 hasCjsKeywords,
31 normalizePathSlashes,
32 transformCommonjs
33 } from './transform';
35 import validateRollupVersion from './rollup-version';
36 import transformCommonjs from './transform-commonjs';
37 import { normalizePathSlashes } from './utils';
3438
3539 export default function commonjs(options = {}) {
3640 const extensions = options.extensions || ['.js'];
7579 const sourceMap = options.sourceMap !== false;
7680
7781 function transformAndCheckExports(code, id) {
78 const { isEsModule, hasDefaultExport, hasNamedExports, ast } = checkEsModule(
82 if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
83 code =
84 getDynamicPackagesEntryIntro(dynamicRequireModuleDirPaths, dynamicRequireModuleSet) + code;
85 }
86
87 const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(
7988 this.parse,
8089 code,
8190 id
91100 !dynamicRequireModuleSet.has(normalizePathSlashes(id)) &&
92101 (!hasCjsKeywords(code, ignoreGlobal) || (isEsModule && !options.transformMixedEsModules))
93102 ) {
94 setIsCjsPromise(id, false);
95 return null;
96 }
97
98 const transformed = transformCommonjs(
103 return { meta: { commonjs: { isCommonJS: false } } };
104 }
105
106 // avoid wrapping in createCommonjsModule, as this is a commonjsRegister call
107 const disableWrap = isModuleRegistrationProxy(id, dynamicRequireModuleSet);
108
109 return transformCommonjs(
99110 this.parse,
100111 code,
101112 id,
105116 sourceMap,
106117 isDynamicRequireModulesEnabled,
107118 dynamicRequireModuleSet,
119 disableWrap,
108120 commonDir,
109121 ast
110122 );
111
112 setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));
113 return transformed;
114123 }
115124
116125 return {
117126 name: 'commonjs',
118127
119128 buildStart() {
129 validateRollupVersion(this.meta.rollupVersion, peerDependencies.rollup);
120130 if (options.namedExports != null) {
121131 this.warn(
122132 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'
123133 );
124134 }
125
126 const [major, minor] = this.meta.rollupVersion.split('.').map(Number);
127 const minVersion = peerDependencies.rollup.slice(2);
128 const [minMajor, minMinor] = minVersion.split('.').map(Number);
129 if (major < minMajor || (major === minMajor && minor < minMinor)) {
130 this.error(
131 `Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`
132 );
133 }
134135 },
135136
136137 resolveId,
144145 return getSpecificHelperProxy(id);
145146 }
146147
147 if (id.endsWith(EXTERNAL_SUFFIX)) {
148 const actualId = getIdFromExternalProxyId(id);
148 if (isWrappedId(id, EXTERNAL_SUFFIX)) {
149 const actualId = unwrapId(id, EXTERNAL_SUFFIX);
149150 return getUnknownRequireProxy(
150151 actualId,
151152 isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true
160161 return getDynamicJsonProxy(id, commonDir);
161162 }
162163
163 const normalizedPath = normalizePathSlashes(id);
164 if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {
165 return getDynamicRequireProxy(normalizedPath, commonDir);
166 }
167
168 if (id.endsWith(PROXY_SUFFIX)) {
169 const actualId = getIdFromProxyId(id);
164 if (isModuleRegistrationProxy(id, dynamicRequireModuleSet)) {
165 return getDynamicRequireProxy(normalizePathSlashes(id), commonDir);
166 }
167
168 if (isWrappedId(id, PROXY_SUFFIX)) {
169 const actualId = unwrapId(id, PROXY_SUFFIX);
170170 return getStaticRequireProxy(
171171 actualId,
172172 getRequireReturnsDefault(actualId),
173173 esModulesWithDefaultExport,
174174 esModulesWithNamedExports
175 );
176 }
177
178 if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
179 return getDynamicPackagesEntryIntro(
180 id,
181 dynamicRequireModuleDirPaths,
182 dynamicRequireModuleSet
183175 );
184176 }
185177
194186 !id.startsWith(DYNAMIC_JSON_PREFIX) &&
195187 (!filter(id) || !extensions.includes(extName))
196188 ) {
197 setIsCjsPromise(id, null);
198189 return null;
199190 }
200191
201 let transformed;
202192 try {
203 transformed = transformAndCheckExports.call(this, code, id);
193 return transformAndCheckExports.call(this, code, id);
204194 } catch (err) {
205 transformed = null;
206 setIsCjsPromise(id, false);
207 this.error(err, err.loc);
208 }
209
210 return transformed;
195 return this.error(err, err.loc);
196 }
197 },
198
199 moduleParsed({ id, meta: { commonjs } }) {
200 if (commonjs) {
201 const isCjs = commonjs.isCommonJS;
202 if (isCjs != null) {
203 setIsCjsPromise(id, isCjs);
204 return;
205 }
206 }
207 setIsCjsPromise(id, null);
211208 }
212209 };
213210 }
0 /* eslint-disable no-undefined */
10 const isCjsPromises = new Map();
21
32 export function getIsCjsPromise(id) {
76 const promise = new Promise((resolve) => {
87 isCjsPromise = {
98 resolve,
10 promise: undefined
9 promise: null
1110 };
1211 isCjsPromises.set(id, isCjsPromise);
1312 });
2120 if (isCjsPromise) {
2221 if (isCjsPromise.resolve) {
2322 isCjsPromise.resolve(resolution);
24 isCjsPromise.resolve = undefined;
23 isCjsPromise.resolve = null;
2524 }
2625 } else {
27 isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });
26 isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: null });
2827 }
2928 }
0 export function tryParse(parse, code, id) {
1 try {
2 return parse(code, { allowReturnOutsideFunction: true });
3 } catch (err) {
4 err.message += ` in ${id}`;
5 throw err;
6 }
7 }
8
9 const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
10
11 const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
12
13 export function hasCjsKeywords(code, ignoreGlobal) {
14 const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
15 return firstpass.test(code);
16 }
00 import { readFileSync } from 'fs';
11
2 import { DYNAMIC_JSON_PREFIX, getVirtualPathForDynamicRequirePath, HELPERS_ID } from './helpers';
2 import { DYNAMIC_JSON_PREFIX, HELPERS_ID } from './helpers';
33 import { getIsCjsPromise } from './is-cjs';
4 import { normalizePathSlashes } from './transform';
5 import { getName } from './utils';
4 import { getName, getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';
65
76 // e.g. id === "commonjsHelpers?commonjsRegister"
87 export function getSpecificHelperProxy(id) {
55 import {
66 DYNAMIC_JSON_PREFIX,
77 DYNAMIC_PACKAGES_ID,
8 getExternalProxyId,
9 getIdFromProxyId,
10 getProxyId,
8 EXTERNAL_SUFFIX,
119 HELPERS_ID,
12 PROXY_SUFFIX
10 isWrappedId,
11 PROXY_SUFFIX,
12 REQUIRE_SUFFIX,
13 unwrapId,
14 wrapId
1315 } from './helpers';
1416
1517 function getCandidatesForExtension(resolved, extension) {
4345 return undefined;
4446 }
4547
46 function resolveId(importee, importer) {
47 const isProxyModule = importee.endsWith(PROXY_SUFFIX);
48 return function resolveId(importee, importer) {
49 // Proxies are only importing resolved ids, no need to resolve again
50 if (importer && isWrappedId(importer, PROXY_SUFFIX)) {
51 return importee;
52 }
53
54 const isProxyModule = isWrappedId(importee, PROXY_SUFFIX);
55 const isRequiredModule = isWrappedId(importee, REQUIRE_SUFFIX);
4856 if (isProxyModule) {
49 importee = getIdFromProxyId(importee);
57 importee = unwrapId(importee, PROXY_SUFFIX);
58 } else if (isRequiredModule) {
59 importee = unwrapId(importee, REQUIRE_SUFFIX);
5060 }
5161 if (importee.startsWith('\0')) {
5262 if (
5666 ) {
5767 return importee;
5868 }
59 if (!isProxyModule) {
60 return null;
61 }
69 return null;
6270 }
6371
64 if (importer && importer.endsWith(PROXY_SUFFIX)) {
65 importer = getIdFromProxyId(importer);
66 }
67
68 return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {
72 return this.resolve(importee, importer, {
73 skipSelf: true,
74 custom: { 'node-resolve': { isRequire: isProxyModule || isRequiredModule } }
75 }).then((resolved) => {
6976 if (!resolved) {
7077 resolved = resolveExtensions(importee, importer);
7178 }
72 if (isProxyModule) {
73 if (!resolved) {
74 return { id: getExternalProxyId(importee), external: false };
75 }
76 resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);
79 if (resolved && isProxyModule) {
80 resolved.id = wrapId(resolved.id, resolved.external ? EXTERNAL_SUFFIX : PROXY_SUFFIX);
7781 resolved.external = false;
78 return resolved;
82 } else if (!resolved && (isProxyModule || isRequiredModule)) {
83 return { id: wrapId(importee, EXTERNAL_SUFFIX), external: false };
7984 }
8085 return resolved;
8186 });
82 }
83
84 return resolveId;
87 };
8588 }
0 export default function validateRollupVersion(rollupVersion, peerDependencyVersion) {
1 const [major, minor] = rollupVersion.split('.').map(Number);
2 const versionRegexp = /\^(\d+\.\d+)\.\d+/g;
3 let minMajor = Infinity;
4 let minMinor = Infinity;
5 let foundVersion;
6 // eslint-disable-next-line no-cond-assign
7 while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) {
8 const [foundMajor, foundMinor] = foundVersion[1].split('.').map(Number);
9 if (foundMajor < minMajor) {
10 minMajor = foundMajor;
11 minMinor = foundMinor;
12 }
13 }
14 if (major < minMajor || (major === minMajor && minor < minMinor)) {
15 throw new Error(
16 `Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minMajor}.${minMinor} but found rollup@${rollupVersion}.`
17 );
18 }
19 }
0 /* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */
1
2 import { dirname } from 'path';
3
4 import { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';
5 import { walk } from 'estree-walker';
6 import MagicString from 'magic-string';
7
8 import {
9 getKeypath,
10 isDefineCompiledEsm,
11 isFalsy,
12 isReference,
13 isTruthy,
14 KEY_COMPILED_ESM
15 } from './ast-utils';
16 import { rewriteExportsAndGetExportsBlock, wrapCode } from './generate-exports';
17 import {
18 getRequireHandlers,
19 getRequireStringArg,
20 hasDynamicModuleForPath,
21 isIgnoredRequireStatement,
22 isModuleRequire,
23 isNodeRequirePropertyAccess,
24 isRequireStatement,
25 isStaticRequireStatement
26 } from './generate-imports';
27 import { DYNAMIC_JSON_PREFIX, DYNAMIC_REGISTER_PREFIX } from './helpers';
28 import { tryParse } from './parse';
29 import { deconflict, getName, getVirtualPathForDynamicRequirePath } from './utils';
30
31 const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
32
33 const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
34
35 export default function transformCommonjs(
36 parse,
37 code,
38 id,
39 isEsModule,
40 ignoreGlobal,
41 ignoreRequire,
42 sourceMap,
43 isDynamicRequireModulesEnabled,
44 dynamicRequireModuleSet,
45 disableWrap,
46 commonDir,
47 astCache
48 ) {
49 const ast = astCache || tryParse(parse, code, id);
50 const magicString = new MagicString(code);
51 const uses = {
52 module: false,
53 exports: false,
54 global: false,
55 require: false,
56 commonjsHelpers: false
57 };
58 const virtualDynamicRequirePath =
59 isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname(id), commonDir);
60 let scope = attachScopes(ast, 'scope');
61 let lexicalDepth = 0;
62 let programDepth = 0;
63 let shouldWrap = false;
64 const defineCompiledEsmExpressions = [];
65
66 const globals = new Set();
67
68 // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
69 const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
70 const namedExports = {};
71 const dynamicRegisterSources = new Set();
72
73 const {
74 addRequireStatement,
75 requiredSources,
76 rewriteRequireExpressionsAndGetImportBlock
77 } = getRequireHandlers();
78
79 // See which names are assigned to. This is necessary to prevent
80 // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
81 // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
82 const reassignedNames = new Set();
83 const topLevelDeclarations = [];
84 const topLevelRequireDeclarators = new Set();
85 const skippedNodes = new Set();
86 const topLevelModuleExportsAssignments = [];
87 const topLevelExportsAssignmentsByName = new Map();
88
89 walk(ast, {
90 enter(node, parent) {
91 if (skippedNodes.has(node)) {
92 this.skip();
93 return;
94 }
95
96 programDepth += 1;
97 if (node.scope) ({ scope } = node);
98 if (functionType.test(node.type)) lexicalDepth += 1;
99 if (sourceMap) {
100 magicString.addSourcemapLocation(node.start);
101 magicString.addSourcemapLocation(node.end);
102 }
103
104 // eslint-disable-next-line default-case
105 switch (node.type) {
106 case 'AssignmentExpression':
107 if (node.left.type === 'MemberExpression') {
108 const flattened = getKeypath(node.left);
109 if (!flattened || scope.contains(flattened.name)) return;
110
111 const exportsPatternMatch = exportsPattern.exec(flattened.keypath);
112 if (!exportsPatternMatch || flattened.keypath === 'exports') return;
113
114 const [, exportName] = exportsPatternMatch;
115 uses[flattened.name] = true;
116
117 // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
118 if (programDepth > 3) {
119 shouldWrap = true;
120 } else if (exportName === KEY_COMPILED_ESM) {
121 defineCompiledEsmExpressions.push(parent);
122 } else if (flattened.keypath === 'module.exports') {
123 topLevelModuleExportsAssignments.push(node);
124 } else if (!topLevelExportsAssignmentsByName.has(exportName)) {
125 topLevelExportsAssignmentsByName.set(exportName, node);
126 } else {
127 shouldWrap = true;
128 }
129
130 skippedNodes.add(node.left);
131
132 if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
133 node.right.properties.forEach((prop) => {
134 if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
135 const { name } = prop.key;
136 if (name === makeLegalIdentifier(name)) namedExports[name] = true;
137 });
138 return;
139 }
140
141 if (exportsPatternMatch[1]) namedExports[exportsPatternMatch[1]] = true;
142 } else {
143 for (const name of extractAssignedNames(node.left)) {
144 reassignedNames.add(name);
145 }
146 }
147 return;
148 case 'CallExpression': {
149 if (isDefineCompiledEsm(node)) {
150 if (programDepth === 3 && parent.type === 'ExpressionStatement') {
151 // skip special handling for [module.]exports until we know we render this
152 skippedNodes.add(node.arguments[0]);
153 defineCompiledEsmExpressions.push(parent);
154 } else {
155 shouldWrap = true;
156 }
157 return;
158 }
159 if (!isStaticRequireStatement(node, scope)) return;
160 if (!isDynamicRequireModulesEnabled) {
161 skippedNodes.add(node.callee);
162 }
163 if (!isIgnoredRequireStatement(node, ignoreRequire)) {
164 skippedNodes.add(node.callee);
165 const usesReturnValue = parent.type !== 'ExpressionStatement';
166
167 let sourceId = getRequireStringArg(node);
168 const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
169 if (isDynamicRegister) {
170 sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
171 if (sourceId.endsWith('.json')) {
172 sourceId = DYNAMIC_JSON_PREFIX + sourceId;
173 }
174 dynamicRegisterSources.add(sourceId);
175 } else {
176 if (
177 !sourceId.endsWith('.json') &&
178 hasDynamicModuleForPath(sourceId, id, dynamicRequireModuleSet)
179 ) {
180 magicString.overwrite(
181 node.start,
182 node.end,
183 `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(
184 getVirtualPathForDynamicRequirePath(sourceId, commonDir)
185 )}, ${JSON.stringify(
186 dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
187 )})`
188 );
189 uses.commonjsHelpers = true;
190 return;
191 }
192 addRequireStatement(sourceId, node, scope, usesReturnValue);
193 }
194
195 if (usesReturnValue) {
196 if (
197 parent.type === 'VariableDeclarator' &&
198 !scope.parent &&
199 parent.id.type === 'Identifier'
200 ) {
201 // This will allow us to reuse this variable name as the imported variable if it is not reassigned
202 // and does not conflict with variables in other places where this is imported
203 topLevelRequireDeclarators.add(parent);
204 }
205 } else {
206 // This is a bare import, e.g. `require('foo');`
207 magicString.remove(parent.start, parent.end);
208 }
209 }
210 return;
211 }
212 case 'ConditionalExpression':
213 case 'IfStatement':
214 // skip dead branches
215 if (isFalsy(node.test)) {
216 skippedNodes.add(node.consequent);
217 } else if (node.alternate && isTruthy(node.test)) {
218 skippedNodes.add(node.alternate);
219 }
220 return;
221 case 'Identifier': {
222 const { name } = node;
223 if (!(isReference(node, parent) && !scope.contains(name))) return;
224 switch (name) {
225 case 'require':
226 if (isNodeRequirePropertyAccess(parent)) return;
227
228 if (isDynamicRequireModulesEnabled && isRequireStatement(parent, scope)) {
229 magicString.appendLeft(
230 parent.end - 1,
231 `,${JSON.stringify(
232 dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
233 )}`
234 );
235 }
236
237 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
238 storeName: true
239 });
240 uses.commonjsHelpers = true;
241 return;
242 case 'module':
243 case 'exports':
244 shouldWrap = true;
245 uses[name] = true;
246 return;
247 case 'global':
248 uses.global = true;
249 if (!ignoreGlobal) {
250 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
251 storeName: true
252 });
253 uses.commonjsHelpers = true;
254 }
255 return;
256 case 'define':
257 magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });
258 return;
259 default:
260 globals.add(name);
261 return;
262 }
263 }
264 case 'MemberExpression':
265 if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) {
266 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
267 storeName: true
268 });
269 uses.commonjsHelpers = true;
270 skippedNodes.add(node.object);
271 skippedNodes.add(node.property);
272 }
273 return;
274 case 'ReturnStatement':
275 // if top-level return, we need to wrap it
276 if (lexicalDepth === 0) {
277 shouldWrap = true;
278 }
279 return;
280 case 'ThisExpression':
281 // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal`
282 if (lexicalDepth === 0) {
283 uses.global = true;
284 if (!ignoreGlobal) {
285 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
286 storeName: true
287 });
288 uses.commonjsHelpers = true;
289 }
290 }
291 return;
292 case 'UnaryExpression':
293 // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
294 if (node.operator === 'typeof') {
295 const flattened = getKeypath(node.argument);
296 if (!flattened) return;
297
298 if (scope.contains(flattened.name)) return;
299
300 if (
301 flattened.keypath === 'module.exports' ||
302 flattened.keypath === 'module' ||
303 flattened.keypath === 'exports'
304 ) {
305 magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });
306 }
307 }
308 return;
309 case 'VariableDeclaration':
310 if (!scope.parent) {
311 topLevelDeclarations.push(node);
312 }
313 }
314 },
315
316 leave(node) {
317 programDepth -= 1;
318 if (node.scope) scope = scope.parent;
319 if (functionType.test(node.type)) lexicalDepth -= 1;
320 }
321 });
322
323 let isRestorableCompiledEsm = false;
324 if (defineCompiledEsmExpressions.length > 0) {
325 if (!shouldWrap && defineCompiledEsmExpressions.length === 1) {
326 isRestorableCompiledEsm = true;
327 magicString.remove(
328 defineCompiledEsmExpressions[0].start,
329 defineCompiledEsmExpressions[0].end
330 );
331 } else {
332 shouldWrap = true;
333 uses.exports = true;
334 }
335 }
336
337 // We cannot wrap ES/mixed modules
338 shouldWrap = shouldWrap && !disableWrap && !isEsModule;
339 uses.commonjsHelpers = uses.commonjsHelpers || shouldWrap;
340
341 if (
342 !(
343 requiredSources.length ||
344 dynamicRegisterSources.size ||
345 uses.module ||
346 uses.exports ||
347 uses.require ||
348 uses.commonjsHelpers
349 ) &&
350 (ignoreGlobal || !uses.global)
351 ) {
352 return { meta: { commonjs: { isCommonJS: false } } };
353 }
354
355 const moduleName = deconflict(scope, globals, getName(id));
356
357 let leadingComment = '';
358 if (code.startsWith('/*')) {
359 const commentEnd = code.indexOf('*/', 2) + 2;
360 leadingComment = `${code.slice(0, commentEnd)}\n`;
361 magicString.remove(0, commentEnd).trim();
362 }
363
364 const exportBlock = isEsModule
365 ? ''
366 : rewriteExportsAndGetExportsBlock(
367 magicString,
368 moduleName,
369 shouldWrap,
370 topLevelModuleExportsAssignments,
371 topLevelExportsAssignmentsByName,
372 defineCompiledEsmExpressions,
373 (name) => deconflict(scope, globals, name),
374 isRestorableCompiledEsm,
375 code,
376 uses,
377 HELPERS_NAME
378 );
379
380 const importBlock = rewriteRequireExpressionsAndGetImportBlock(
381 magicString,
382 topLevelDeclarations,
383 topLevelRequireDeclarators,
384 reassignedNames,
385 uses.commonjsHelpers && HELPERS_NAME,
386 dynamicRegisterSources
387 );
388
389 if (shouldWrap) {
390 wrapCode(magicString, uses, moduleName, HELPERS_NAME, virtualDynamicRequirePath);
391 }
392
393 magicString
394 .trim()
395 .prepend(leadingComment + importBlock)
396 .append(exportBlock);
397
398 return {
399 code: magicString.toString(),
400 map: sourceMap ? magicString.generateMap() : null,
401 syntheticNamedExports: isEsModule ? false : '__moduleExports',
402 meta: { commonjs: { isCommonJS: !isEsModule } }
403 };
404 }
+0
-695
packages/commonjs/src/transform.js less more
0 /* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */
1
2 import { dirname, resolve } from 'path';
3
4 import { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';
5 import { walk } from 'estree-walker';
6 import MagicString from 'magic-string';
7 import { sync as nodeResolveSync } from 'resolve';
8
9 import { flatten, isFalsy, isReference, isTruthy } from './ast-utils';
10 import {
11 DYNAMIC_JSON_PREFIX,
12 DYNAMIC_REGISTER_PREFIX,
13 getProxyId,
14 getVirtualPathForDynamicRequirePath,
15 HELPERS_ID
16 } from './helpers';
17 import { getName } from './utils';
18
19 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(
20 ' '
21 );
22 const blacklist = { __esModule: true };
23 reserved.forEach((word) => (blacklist[word] = true));
24
25 const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
26
27 const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
28 const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
29 const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
30
31 function deconflict(scope, globals, identifier) {
32 let i = 1;
33 let deconflicted = makeLegalIdentifier(identifier);
34
35 while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {
36 deconflicted = `${identifier}_${i}`;
37 i += 1;
38 }
39 scope.declarations[deconflicted] = true;
40
41 return deconflicted;
42 }
43
44 function tryParse(parse, code, id) {
45 try {
46 return parse(code, { allowReturnOutsideFunction: true });
47 } catch (err) {
48 err.message += ` in ${id}`;
49 throw err;
50 }
51 }
52
53 export function normalizePathSlashes(path) {
54 return path.replace(/\\/g, '/');
55 }
56
57 export function hasCjsKeywords(code, ignoreGlobal) {
58 const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
59 return firstpass.test(code);
60 }
61
62 export function checkEsModule(parse, code, id) {
63 const ast = tryParse(parse, code, id);
64
65 let isEsModule = false;
66 let hasDefaultExport = false;
67 let hasNamedExports = false;
68 for (const node of ast.body) {
69 if (node.type === 'ExportDefaultDeclaration') {
70 isEsModule = true;
71 hasDefaultExport = true;
72 } else if (node.type === 'ExportNamedDeclaration') {
73 isEsModule = true;
74 if (node.declaration) {
75 hasNamedExports = true;
76 } else {
77 for (const specifier of node.specifiers) {
78 if (specifier.exported.name === 'default') {
79 hasDefaultExport = true;
80 } else {
81 hasNamedExports = true;
82 }
83 }
84 }
85 } else if (node.type === 'ExportAllDeclaration') {
86 isEsModule = true;
87 if (node.exported && node.exported.name === 'default') {
88 hasDefaultExport = true;
89 } else {
90 hasNamedExports = true;
91 }
92 } else if (node.type === 'ImportDeclaration') {
93 isEsModule = true;
94 }
95 }
96
97 return { isEsModule, hasDefaultExport, hasNamedExports, ast };
98 }
99
100 function getDefinePropertyCallName(node, targetName) {
101 if (node.type !== 'CallExpression') return;
102
103 const {
104 callee: { object, property }
105 } = node;
106
107 if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
108
109 if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
110
111 if (node.arguments.length !== 3) return;
112
113 const [target, val] = node.arguments;
114 if (target.type !== 'Identifier' || target.name !== targetName) return;
115 // eslint-disable-next-line consistent-return
116 return val.value;
117 }
118
119 export function transformCommonjs(
120 parse,
121 code,
122 id,
123 isEsModule,
124 ignoreGlobal,
125 ignoreRequire,
126 sourceMap,
127 isDynamicRequireModulesEnabled,
128 dynamicRequireModuleSet,
129 commonDir,
130 astCache
131 ) {
132 const ast = astCache || tryParse(parse, code, id);
133
134 const magicString = new MagicString(code);
135
136 const required = {};
137 // Because objects have no guaranteed ordering, yet we need it,
138 // we need to keep track of the order in a array
139 const sources = [];
140
141 let uid = 0;
142
143 let scope = attachScopes(ast, 'scope');
144 const uses = { module: false, exports: false, global: false, require: false };
145
146 let lexicalDepth = 0;
147 let programDepth = 0;
148
149 const globals = new Set();
150
151 // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
152 const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
153
154 const namedExports = {};
155
156 // TODO handle transpiled modules
157 let shouldWrap = /__esModule/.test(code);
158 let usesCommonjsHelpers = false;
159
160 function isRequireStatement(node) {
161 if (!node) return false;
162 if (node.type !== 'CallExpression') return false;
163
164 // Weird case of `require()` or `module.require()` without arguments
165 if (node.arguments.length === 0) return false;
166
167 return isRequireIdentifier(node.callee);
168 }
169
170 function isRequireIdentifier(node) {
171 if (!node) return false;
172
173 if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {
174 // `require` is hidden by a variable in local scope
175 if (scope.contains('require')) return false;
176
177 return true;
178 } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {
179 // `module.[something]`
180 if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;
181
182 // `module` is hidden by a variable in local scope
183 if (scope.contains('module')) return false;
184
185 // `module.require(...)`
186 if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;
187
188 return true;
189 }
190
191 return false;
192 }
193
194 function hasDynamicArguments(node) {
195 return (
196 node.arguments.length > 1 ||
197 (node.arguments[0].type !== 'Literal' &&
198 (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))
199 );
200 }
201
202 function isStaticRequireStatement(node) {
203 if (!isRequireStatement(node)) return false;
204 return !hasDynamicArguments(node);
205 }
206
207 function isNodeRequireStatement(parent) {
208 const reservedMethod = ['resolve', 'cache', 'main'];
209 return !!(parent && parent.property && reservedMethod.indexOf(parent.property.name) > -1);
210 }
211
212 function isIgnoredRequireStatement(requiredNode) {
213 return ignoreRequire(requiredNode.arguments[0].value);
214 }
215
216 function getRequireStringArg(node) {
217 return node.arguments[0].type === 'Literal'
218 ? node.arguments[0].value
219 : node.arguments[0].quasis[0].value.cooked;
220 }
221
222 function getRequired(node, name) {
223 let sourceId = getRequireStringArg(node);
224 const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
225 if (isDynamicRegister) {
226 sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
227 }
228
229 const existing = required[sourceId];
230 // eslint-disable-next-line no-undefined
231 if (existing === undefined) {
232 const isDynamic = hasDynamicModuleForPath(sourceId);
233
234 if (!name) {
235 do {
236 name = `require$$${uid}`;
237 uid += 1;
238 } while (scope.contains(name));
239 }
240
241 if (isDynamicRegister && sourceId.endsWith('.json')) {
242 sourceId = DYNAMIC_JSON_PREFIX + sourceId;
243 }
244
245 if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {
246 sources.push([sourceId, !isDynamicRegister]);
247 }
248
249 required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };
250 }
251
252 return required[sourceId];
253 }
254
255 function hasDynamicModuleForPath(source) {
256 if (!/[/\\]/.test(source)) {
257 try {
258 const resolvedPath = normalizePathSlashes(
259 nodeResolveSync(source, { basedir: dirname(id) })
260 );
261 if (dynamicRequireModuleSet.has(resolvedPath)) {
262 return true;
263 }
264 } catch (ex) {
265 // Probably a node.js internal module
266 return false;
267 }
268
269 return false;
270 }
271
272 for (const attemptExt of ['', '.js', '.json']) {
273 const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));
274 if (dynamicRequireModuleSet.has(resolvedPath)) {
275 return true;
276 }
277 }
278
279 return false;
280 }
281
282 function shouldUseSimulatedRequire(required) {
283 return (
284 hasDynamicModuleForPath(required.source) &&
285 // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.
286 (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))
287 );
288 }
289
290 // do a first pass, see which names are assigned to. This is necessary to prevent
291 // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
292 // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
293 const assignedTo = new Set();
294 walk(ast, {
295 enter(node) {
296 if (node.type !== 'AssignmentExpression') return;
297 if (node.left.type === 'MemberExpression') return;
298
299 extractAssignedNames(node.left).forEach((name) => {
300 assignedTo.add(name);
301 });
302 }
303 });
304
305 walk(ast, {
306 enter(node, parent) {
307 if (sourceMap) {
308 magicString.addSourcemapLocation(node.start);
309 magicString.addSourcemapLocation(node.end);
310 }
311
312 // skip dead branches
313 if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
314 if (node === parent.consequent && isFalsy(parent.test)) {
315 this.skip();
316 return;
317 }
318 if (node === parent.alternate && isTruthy(parent.test)) {
319 this.skip();
320 return;
321 }
322 }
323
324 if (node._skip) {
325 this.skip();
326 return;
327 }
328
329 programDepth += 1;
330
331 if (node.scope) ({ scope } = node);
332 if (functionType.test(node.type)) lexicalDepth += 1;
333
334 // if toplevel return, we need to wrap it
335 if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
336 shouldWrap = true;
337 }
338
339 // rewrite `this` as `commonjsHelpers.commonjsGlobal`
340 if (node.type === 'ThisExpression' && lexicalDepth === 0) {
341 uses.global = true;
342 if (!ignoreGlobal) {
343 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
344 storeName: true
345 });
346 usesCommonjsHelpers = true;
347 }
348 return;
349 }
350
351 // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
352 if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
353 const flattened = flatten(node.argument);
354 if (!flattened) return;
355
356 if (scope.contains(flattened.name)) return;
357
358 if (
359 flattened.keypath === 'module.exports' ||
360 flattened.keypath === 'module' ||
361 flattened.keypath === 'exports'
362 ) {
363 magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });
364 }
365 }
366
367 // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
368 // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
369 if (node.type === 'Identifier') {
370 if (isReference(node, parent) && !scope.contains(node.name)) {
371 if (node.name in uses) {
372 if (isRequireIdentifier(node)) {
373 if (isNodeRequireStatement(parent)) {
374 return;
375 }
376
377 if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {
378 return;
379 }
380
381 if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {
382 magicString.appendLeft(
383 parent.end - 1,
384 `,${JSON.stringify(
385 dirname(id) === '.'
386 ? null /* default behavior */
387 : getVirtualPathForDynamicRequirePath(
388 normalizePathSlashes(dirname(id)),
389 commonDir
390 )
391 )}`
392 );
393 }
394
395 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
396 storeName: true
397 });
398 usesCommonjsHelpers = true;
399 }
400
401 uses[node.name] = true;
402 if (node.name === 'global' && !ignoreGlobal) {
403 magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
404 storeName: true
405 });
406 usesCommonjsHelpers = true;
407 }
408
409 // if module or exports are used outside the context of an assignment
410 // expression, we need to wrap the module
411 if (node.name === 'module' || node.name === 'exports') {
412 shouldWrap = true;
413 }
414 }
415
416 if (node.name === 'define') {
417 magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });
418 }
419
420 globals.add(node.name);
421 }
422
423 return;
424 }
425
426 // Is this an assignment to exports or module.exports?
427 if (node.type === 'AssignmentExpression') {
428 if (node.left.type !== 'MemberExpression') return;
429
430 const flattened = flatten(node.left);
431 if (!flattened) return;
432
433 if (scope.contains(flattened.name)) return;
434
435 const match = exportsPattern.exec(flattened.keypath);
436 if (!match || flattened.keypath === 'exports') return;
437
438 uses[flattened.name] = true;
439
440 // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
441 // if this isn't top-level, we'll need to wrap the module
442 if (programDepth > 3) shouldWrap = true;
443
444 node.left._skip = true;
445
446 if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
447 node.right.properties.forEach((prop) => {
448 if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
449 const { name } = prop.key;
450 if (name === makeLegalIdentifier(name)) namedExports[name] = true;
451 });
452 return;
453 }
454
455 if (match[1]) namedExports[match[1]] = true;
456 return;
457 }
458
459 const name = getDefinePropertyCallName(node, 'exports');
460 if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;
461
462 // if this is `var x = require('x')`, we can do `import x from 'x'`
463 if (
464 node.type === 'VariableDeclarator' &&
465 node.id.type === 'Identifier' &&
466 isStaticRequireStatement(node.init) &&
467 !isIgnoredRequireStatement(node.init)
468 ) {
469 // for now, only do this for top-level requires. maybe fix this in future
470 if (scope.parent) return;
471
472 // edge case — CJS allows you to assign to imports. ES doesn't
473 if (assignedTo.has(node.id.name)) return;
474
475 const required = getRequired(node.init, node.id.name);
476 required.importsDefault = true;
477
478 if (required.name === node.id.name && !required.isDynamic) {
479 node._shouldRemove = true;
480 }
481 }
482
483 if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {
484 return;
485 }
486
487 const required = getRequired(node);
488
489 if (parent.type === 'ExpressionStatement') {
490 // is a bare import, e.g. `require('foo');`
491 magicString.remove(parent.start, parent.end);
492 } else {
493 required.importsDefault = true;
494
495 if (shouldUseSimulatedRequire(required)) {
496 magicString.overwrite(
497 node.start,
498 node.end,
499 `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(
500 getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)
501 )}, ${JSON.stringify(
502 dirname(id) === '.'
503 ? null /* default behavior */
504 : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)
505 )})`
506 );
507 usesCommonjsHelpers = true;
508 } else {
509 magicString.overwrite(node.start, node.end, required.name);
510 }
511 }
512
513 node.callee._skip = true;
514 },
515
516 leave(node) {
517 programDepth -= 1;
518 if (node.scope) scope = scope.parent;
519 if (functionType.test(node.type)) lexicalDepth -= 1;
520
521 if (node.type === 'VariableDeclaration') {
522 let keepDeclaration = false;
523 let c = node.declarations[0].start;
524
525 for (let i = 0; i < node.declarations.length; i += 1) {
526 const declarator = node.declarations[i];
527
528 if (declarator._shouldRemove) {
529 magicString.remove(c, declarator.end);
530 } else {
531 if (!keepDeclaration) {
532 magicString.remove(c, declarator.start);
533 keepDeclaration = true;
534 }
535
536 c = declarator.end;
537 }
538 }
539
540 if (!keepDeclaration) {
541 magicString.remove(node.start, node.end);
542 }
543 }
544 }
545 });
546
547 if (
548 !sources.length &&
549 !uses.module &&
550 !uses.exports &&
551 !uses.require &&
552 (ignoreGlobal || !uses.global)
553 ) {
554 // not a CommonJS module
555 return null;
556 }
557
558 // If `isEsModule` is on, it means it has ES6 import/export statements,
559 // which just can't be wrapped in a function.
560 if (isEsModule) shouldWrap = false;
561
562 usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;
563
564 const importBlock = `${(usesCommonjsHelpers
565 ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]
566 : []
567 )
568 .concat(
569 sources.map(
570 ([source]) =>
571 // import the actual module before the proxy, so that we know
572 // what kind of proxy to build
573 `import '${source}';`
574 ),
575 sources
576 .filter(([, importProxy]) => importProxy)
577 .map(([source]) => {
578 const { name, importsDefault } = required[source];
579 return `import ${importsDefault ? `${name} from ` : ``}'${
580 source.startsWith('\0') ? source : getProxyId(source)
581 }';`;
582 })
583 )
584 .join('\n')}\n\n`;
585
586 const namedExportDeclarations = [];
587 let wrapperStart = '';
588 let wrapperEnd = '';
589
590 const moduleName = deconflict(scope, globals, getName(id));
591 if (!isEsModule) {
592 const exportModuleExports = {
593 str: `export { ${moduleName} as __moduleExports };`,
594 name: '__moduleExports'
595 };
596
597 namedExportDeclarations.push(exportModuleExports);
598 }
599
600 const defaultExportPropertyAssignments = [];
601 let hasDefaultExport = false;
602
603 if (shouldWrap) {
604 const args = `module${uses.exports ? ', exports' : ''}`;
605
606 wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
607
608 wrapperEnd = `\n}`;
609 if (isDynamicRequireModulesEnabled) {
610 wrapperEnd += `, ${JSON.stringify(
611 getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)
612 )}`;
613 }
614
615 wrapperEnd += `);`;
616 } else {
617 const names = [];
618
619 for (const node of ast.body) {
620 if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
621 const { left } = node.expression;
622 const flattened = flatten(left);
623
624 if (!flattened) {
625 continue;
626 }
627
628 const match = exportsPattern.exec(flattened.keypath);
629 if (!match) {
630 continue;
631 }
632
633 if (flattened.keypath === 'module.exports') {
634 hasDefaultExport = true;
635 magicString.overwrite(left.start, left.end, `var ${moduleName}`);
636 } else {
637 const [, name] = match;
638 const deconflicted = deconflict(scope, globals, name);
639
640 names.push({ name, deconflicted });
641
642 magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
643
644 const declaration =
645 name === deconflicted
646 ? `export { ${name} };`
647 : `export { ${deconflicted} as ${name} };`;
648
649 if (name !== 'default') {
650 namedExportDeclarations.push({
651 str: declaration,
652 name
653 });
654 }
655
656 defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
657 }
658 }
659 }
660
661 if (!(isEsModule || hasDefaultExport)) {
662 wrapperEnd = `\n\nvar ${moduleName} = {\n${names
663 .map(({ name, deconflicted }) => `\t${name}: ${deconflicted}`)
664 .join(',\n')}\n};`;
665 }
666 }
667
668 magicString
669 .trim()
670 .prepend(importBlock + wrapperStart)
671 .trim()
672 .append(wrapperEnd);
673
674 const defaultExport =
675 code.indexOf('__esModule') >= 0
676 ? `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${moduleName});`
677 : `export default ${moduleName};`;
678
679 const named = namedExportDeclarations
680 .filter((x) => x.name !== 'default' || !hasDefaultExport)
681 .map((x) => x.str);
682
683 magicString.append(
684 `\n\n${(isEsModule ? [] : [defaultExport])
685 .concat(named)
686 .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])
687 .join('\n')}`
688 );
689
690 code = magicString.toString();
691 const map = sourceMap ? magicString.generateMap() : null;
692
693 return { code, map, syntheticNamedExports: isEsModule ? false : '__moduleExports' };
694 }
00 /* eslint-disable import/prefer-default-export */
1
12 import { basename, dirname, extname, sep } from 'path';
23
34 import { makeLegalIdentifier } from '@rollup/pluginutils';
5
6 export function deconflict(scope, globals, identifier) {
7 let i = 1;
8 let deconflicted = makeLegalIdentifier(identifier);
9
10 while (scope.contains(deconflicted) || globals.has(deconflicted)) {
11 deconflicted = makeLegalIdentifier(`${identifier}_${i}`);
12 i += 1;
13 }
14 // eslint-disable-next-line no-param-reassign
15 scope.declarations[deconflicted] = true;
16
17 return deconflicted;
18 }
419
520 export function getName(id) {
621 const name = makeLegalIdentifier(basename(id, extname(id)));
1025 const segments = dirname(id).split(sep);
1126 return makeLegalIdentifier(segments[segments.length - 1]);
1227 }
28
29 export function normalizePathSlashes(path) {
30 return path.replace(/\\/g, '/');
31 }
32
33 const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
34 export const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
35 const normalizedPath = normalizePathSlashes(path);
36 return normalizedPath.startsWith(commonDir)
37 ? VIRTUAL_PATH_BASE + normalizedPath.slice(commonDir.length)
38 : normalizedPath;
39 };
99 "import/prefer-default-export": "off",
1010 "import/extensions": "off",
1111 "import/no-unresolved": "off",
12 "@typescript-eslint/no-unused-vars": "off"
12 "@typescript-eslint/no-unused-vars": "off",
13 "camelcase": "off",
14 "no-underscore-dangle": "off"
1315 }
1416 }
0 exports.__esModule = true;
1 exports.default = 'x';
2 exports.foo = 'foo';
0 var _default = 'x';
1 var foo = 'foo';
2
3 var input = /*#__PURE__*/Object.defineProperty({
4 default: _default,
5 foo: foo
6 }, '__esModule', {value: true});
7
8 export default _default;
9 export { input as __moduleExports };
10 export { foo };
0 module.exports.__esModule = true;
1 module.exports.default = 'x';
2 module.exports.foo = 'foo';
0 var _default = 'x';
1 var foo = 'foo';
2
3 var input = /*#__PURE__*/Object.defineProperty({
4 default: _default,
5 foo: foo
6 }, '__esModule', {value: true});
7
8 export default _default;
9 export { input as __moduleExports };
10 export { foo };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.foo = 'bar';
2
3 const foo = 'also bar';
0 var foo_1 = 'bar';
1
2 const foo = 'also bar';
3
4 var input = /*#__PURE__*/Object.defineProperty({
5 foo: foo_1
6 }, '__esModule', {value: true});
7
8 export default input;
9 export { input as __moduleExports };
10 export { foo_1 as foo };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.default = 'x';
2 exports.foo = 'foo';
0 var _default = 'x';
1 var foo = 'foo';
2
3 var input = /*#__PURE__*/Object.defineProperty({
4 default: _default,
5 foo: foo
6 }, '__esModule', {value: true});
7
8 export default _default;
9 export { input as __moduleExports };
10 export { foo };
0 Object.defineProperty(module.exports, '__esModule', { value: true });
1 exports.default = 'x';
2 exports.foo = 'foo';
0 var _default = 'x';
1 var foo = 'foo';
2
3 var input = /*#__PURE__*/Object.defineProperty({
4 default: _default,
5 foo: foo
6 }, '__esModule', {value: true});
7
8 export default _default;
9 export { input as __moduleExports };
10 export { foo };
0 Object.defineProperty(exports, '__esModule', { value: !0 });
1 exports.foo = 'foo';
0 var foo = 'foo';
1
2 var input = /*#__PURE__*/Object.defineProperty({
3 foo: foo
4 }, '__esModule', {value: true});
5
6 export default input;
7 export { input as __moduleExports };
8 export { foo };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.foo = 'bar';
2 exports.bar = 'foo';
0 var foo = 'bar';
1 var bar = 'foo';
2
3 var input = /*#__PURE__*/Object.defineProperty({
4 foo: foo,
5 bar: bar
6 }, '__esModule', {value: true});
7
8 export default input;
9 export { input as __moduleExports };
10 export { foo };
11 export { bar };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 module.exports = { foo: 'bar' };
0 var input = { foo: 'bar' };
1
2 export default input;
3 export { input as __moduleExports };
0 import 'tape';
0 import '_tape?commonjs-require';
11 import foo from '_tape?commonjs-proxy';
22
33 console.log(foo);
0 import 'bar';
0 import '_bar?commonjs-require';
11 import bar from '_bar?commonjs-proxy';
22
33 var foo = require( 'foo' );
4
45
56 var input = {
67
0 import 'bar';
0 import '_bar?commonjs-require';
11 import bar from '_bar?commonjs-proxy';
22
33 var foo = require( 'foo' );
4
45
56 var input = {
67
0 import './input2.js';
0 import '_./input2.js?commonjs-require';
11 import t2 from '_./input2.js?commonjs-proxy';
22
33 console.log(t2);
0 import './a';
1 import './b';
0 import '_./a?commonjs-require';
1 import '_./b?commonjs-require';
22 import require$$0 from '_./a?commonjs-proxy';
33 import b from '_./b?commonjs-proxy';
44
0 import './a';
0 import '_./a?commonjs-require';
11 import a from '_./a?commonjs-proxy';
22
33 var b = 42;
0 import './b';
0 import '_./b?commonjs-require';
11 import b from '_./b?commonjs-proxy';
22
33 var a = 'a'
+0
-3
packages/commonjs/test/fixtures/form/ndoe-require-methods/input.js less more
0 module.exports.getFilePath = function getFilePath(someFile) {
1 return require.resolve(someFile);
2 };
+0
-11
packages/commonjs/test/fixtures/form/ndoe-require-methods/output.js less more
0 var getFilePath = function getFilePath(someFile) {
1 return require.resolve(someFile);
2 };
3
4 var input = {
5 getFilePath: getFilePath
6 };
7
8 export default input;
9 export { input as __moduleExports };
10 export { getFilePath };
0 import './dummy';
0 import '_./dummy?commonjs-require';
11 import dummy from '_./dummy?commonjs-proxy';
22
33 var foo = function () {
0 module.exports.getFilePath = function getFilePath(someFile) {
1 return require.resolve(someFile);
2 };
0 var getFilePath = function getFilePath(someFile) {
1 return require.resolve(someFile);
2 };
3
4 var input = {
5 getFilePath: getFilePath
6 };
7
8 export default input;
9 export { input as __moduleExports };
10 export { getFilePath };
0 import 'foo';
0 import '_foo?commonjs-require';
11 import require$$1 from '_foo?commonjs-proxy';
22
33 (function() {
0 import './foo.js';
0 import '_./foo.js?commonjs-require';
11 import '_./foo.js?commonjs-proxy';
22
33 export default {};
0 import './foo.js';
0 import '_./foo.js?commonjs-require';
11 import '_./foo.js?commonjs-proxy';
22
33 import './bar.js';
0 import './foo.js';
0 import '_./foo.js?commonjs-require';
11 import '_./foo.js?commonjs-proxy';
22
33 export {};
0 module.exports = {
1 description: 'handles double assignments to exports'
2 };
0 exports.foo = 'first';
1 exports.foo = 'second';
0 import dep from './dep';
1
2 t.is(dep.foo, 'second');
0 module.exports = {
1 description: 'handles double assignments to module.exports'
2 };
0 module.exports = 'first';
1 module.exports = 'second';
11 description: 'resolves both windows and posix absolute paths',
22 pluginOptions: {
33 dynamicRequireTargets: ['fixtures/function/dynamic-require-absolute-paths/submodule.js']
4 },
5 options: {
6 external: ['path']
47 }
58 };
0 module.exorts = { name: 'package', value: null };
0 module.exports = { name: 'package', value: null };
0 const { nodeResolve } = require('@rollup/plugin-node-resolve');
1
2 module.exports = {
3 // TODO This test is broken because for dynamic require targets with dependencies, the dependencies are hoisted
4 // above the dynamic register calls at the moment
5 skip: true,
6 description: 'resolves imports of node_modules module with halfway / subfolder access',
7 options: {
8 plugins: [nodeResolve()]
9 },
10 pluginOptions: {
11 dynamicRequireTargets: [
12 'fixtures/function/dynamic-require-slash-access',
13 'fixtures/function/dynamic-require-slash-access/sub',
14 'fixtures/function/dynamic-require-slash-access/node_modules/custom-module',
15 'fixtures/function/dynamic-require-slash-access/node_modules/custom-module2/*.js'
16 ]
17 }
18 };
0 /* eslint-disable import/no-dynamic-require, global-require */
1
2 function takeModule(name) {
3 return require(name);
4 }
5
6 t.is(takeModule('.'), 'same-directory');
7 t.is(takeModule('./'), 'same-directory');
8 t.is(takeModule('.//'), 'same-directory');
9
10 t.is(takeModule('./sub'), 'sub');
11
12 t.is(takeModule('custom-module'), 'custom-module + sub');
13 t.deepEqual(require('./sub/sub'), {
14 parent: 'same-directory',
15 customModule: 'custom-module + sub'
16 });
0 module.exports = 'custom-module' + ' + ' + require('custom-module2/sub');
0 /* eslint-disable import/no-dynamic-require, global-require */
1
2 function takeModule(name) {
3 return require(name);
4 }
5
6 module.exports = {
7 parent: takeModule('..'),
8 customModule: takeModule('custom-module')
9 };
0 const path = require('path');
1
2 const ID_MAIN = path.join(__dirname, 'main.js');
3 const ID_OTHER = path.join(__dirname, 'other.js');
4
5 module.exports = {
6 description: 'exposes cjs file type detection to other plugins',
7 options: {
8 input: [ID_MAIN, ID_OTHER],
9 plugins: [
10 {
11 moduleParsed({
12 id,
13 meta: {
14 commonjs: { isCommonJS }
15 }
16 }) {
17 if (id === ID_MAIN) {
18 if (isCommonJS !== false) {
19 throw new Error(
20 `Main file wrongly detected: isCommonJS === ${JSON.stringify(isCommonJS)}`
21 );
22 }
23 } else if (isCommonJS !== true) {
24 throw new Error(
25 `Other file wrongly detected: isCommonJS === ${JSON.stringify(isCommonJS)}`
26 );
27 }
28 }
29 }
30 ]
31 }
32 };
0 import foo from './other.js';
1
2 t.is(foo, 'foo');
0 module.exports = {
1 description: 'uses interop for wrapped code if it potentially contains an __esModule marker'
2 };
0 import foo from './other';
1
2 t.deepEqual(foo, 42);
0 exports.default = 42;
1
2 addCompiledMarker(module.exports);
3
4 function addCompiledMarker(exports) {
5 // eslint-disable-next-line no-param-reassign
6 exports.__esModule = true;
7 }
0 module.exports = {
1 description: 'does not use interop for wrapped code there are no __esModule markers'
2 };
0 import foo from './other';
1
2 t.deepEqual(foo, { default: 42 });
0 addDefaultExport(module.exports);
1
2 function addDefaultExport(exports) {
3 // eslint-disable-next-line no-param-reassign
4 exports.default = 42;
5 }
0 module.exports = {
1 description:
2 'does not use interop for the default export if there is no default property assignment'
3 };
0 import foo from './other';
1
2 t.deepEqual(foo, { foo: '__esModule' });
0 const fs = require('fs');
1
02 const path = require('path');
1 const fs = require('fs');
23
34 const ID_MAIN = path.join(__dirname, 'main.js');
45 const ID_OTHER = path.join(__dirname, 'other.js');
0 module.exports = {
1 description: 'retains leading comments'
2 };
0 /*
1 * This comment could be really important and should not be removed
2 */
3
4 /* This comment does not matter */
5 const noSideEffect = null;
6
7 module.exports = 'bar';
0 module.exports = {
1 description: 'retains leading comments when there are imports',
2 options: {
3 external: ['external-cjs-exports']
4 }
5 };
0 /*
1 * This comment could be really important and should not be removed
2 */
3
4 /* This comment does not matter */
5 const noSideEffect = null;
6
7 const externalExports = require('external-cjs-exports');
8
9 t.is(externalExports.foo, 'foo');
0 module.exports = {
1 description: 'retains leading comments when the module is wrapped'
2 };
0 /*
1 * This comment could be really important and should not be removed
2 */
3
4 /* This comment does not matter */
5 const noSideEffect = null;
6
7 modifyExports(exports);
8
9 function modifyExports(exported) {
10 // eslint-disable-next-line no-param-reassign
11 exported.foo = 'bar';
12 }
0 module.exports = {
1 description: 'handles code with multiple esm marker expressions'
2 };
0 Object.defineProperty(exports, '__esModule', { value: true });
1
2 Object.defineProperty(exports, '__esModule', { value: true });
3
4 exports.default = 'foo';
0 import foo from './foo';
1
2 t.deepEqual(foo, 'foo');
0 module.exports = {
1 description: 'ignores unused nested es module handlers'
2 };
0 const useIt = false;
1
2 if (useIt) {
3 Object.defineProperty(exports, '__esModule', { value: true });
4 }
5
6 exports.default = 'foo';
0 import foo from './foo';
1
2 t.deepEqual(foo, { default: 'foo' });
0 module.exports = {
1 description: 'respects used nested es module handlers'
2 };
0 const useIt = true;
1 Object.defineProperty(exports, '__esModule', { value: true });
2
3 if (useIt) {
4 Object.defineProperty(exports, '__esModule', { value: true });
5 }
6
7 exports.default = 'foo';
0 const assert = require('assert');
1
2 module.exports = {
3 description: 'notifies the node-resolve plugin if an id is imported via "require"',
4 options: {
5 plugins: [
6 {
7 name: 'node-resolve-mock',
8 resolveId(source, importer, { custom }) {
9 const { isRequire } = (custom && custom['node-resolve']) || {};
10 if (source === './foo') {
11 return this.resolve(isRequire ? './foo-required' : './foo-imported', importer);
12 }
13 if (source === './bar') {
14 return this.resolve(isRequire ? './bar-required' : './bar-imported', importer);
15 }
16 return null;
17 }
18 }
19 ]
20 },
21 async exports(exports) {
22 assert.deepStrictEqual(await exports, [{ default: 'imported' }, { default: 'imported' }]);
23 }
24 };
0 import foo from './foo';
1 import required from './requiring';
2
3 t.is(foo, 'imported');
4 t.is(required.foo, 'required');
5
6 export default Promise.all([import('./bar'), required.barPromise]);
0 exports.foo = require('./foo');
1
2 exports.barPromise = import('./bar');
0 module.exports = {
1 description: 'makes sure imported variables are not shadowed when used in multiple places'
2 };
0 const foo = require('./foo');
1
2 t.is(foo, 'foo');
3
4 {
5 // eslint-disable-next-line no-shadow
6 const foo = 'wrong';
7 // eslint-disable-next-line global-require
8 const bar = require('./foo');
9 t.is(foo, 'wrong');
10 t.is(bar, 'foo');
11 }
33 description:
44 'Creates correct exports if an ES module that was transpiled to CJS is used as entry point',
55 options: {
6 onwarn(warning) {
7 if (warning.code !== 'MIXED_EXPORTS') {
8 throw new Error(warning.message);
9 }
10 },
611 input: [path.join(__dirname, 'main.js'), path.join(__dirname, 'entry.js')]
712 }
813 };
33 description:
44 'Creates correct exports if an ES module that was transpiled to CJS is used as entry point',
55 options: {
6 onwarn(warning) {
7 if (warning.code !== 'MIXED_EXPORTS') {
8 throw new Error(warning.message);
9 }
10 },
611 input: [path.join(__dirname, 'main.js'), path.join(__dirname, 'entry.js')]
712 }
813 };
00 import * as entry from './entry.js';
11
22 t.deepEqual(entry, {
3 // Technically, this should ideally not exist, or if we cannot avoid it due
4 // to runtime default export detection, it should probably be undefined. We
5 // return the namespace instead as this will fix
6 // rollup/rollup-plugin-commonjs#224 until the remaining Rollup interop has
7 // been updated
8 default: { named: 'named' },
3 default: {
4 named: 'named'
5 },
96 named: 'named'
107 });
22 import * as dep from './dep';
33
44 t.deepEqual(dep, {
5 named: 'named',
6 // Technically, this should ideally not exist, or if we cannot avoid it due
7 // to runtime default export detection, it should probably be undefined. We
8 // return the namespace instead as this will fix
9 // rollup/rollup-plugin-commonjs#224 until the remaining Rollup interop has
10 // been updated
11 default: { named: 'named' }
5 default: {
6 named: 'named'
7 },
8 named: 'named'
129 });
1310
1411 t.deepEqual(external, {
0 module.exports = {
1 description: 'wraps a module if there is a nested assignment to `module.exports`',
2 context: {
3 globalValue: true
4 }
5 };
0 Object.defineProperty(exports, '__esModule', { value: true });
1
2 if (globalValue) {
3 module.exports = 'first';
4 } else {
5 module.exports = 'second';
6 }
0 module.exports = {
1 description: 'Provides the fake module.exports namespace when requiring a transpiled module'
2 };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.named = 'named';
2 exports.default = 'default';
0 const dep = require('./dep');
1
2 t.deepEqual(dep, {
3 default: 'default',
4 named: 'named'
5 });
6
7 // eslint-disable-next-line no-prototype-builtins
8 t.is(dep.hasOwnProperty('named'), true);
0 module.exports = {
1 description: 'handles a transpiled module that imports the default from a transpiled module'
2 };
0 Object.defineProperty(exports, '__esModule', { value: true });
1 exports.default = 'default';
0 const dep = require('./dep.js');
1
2 function _interopDefault(e) {
3 return e && e.__esModule ? e : { default: e };
4 }
5
6 t.is(dep.__esModule, true);
7 const dep__default = /* #__PURE__*/ _interopDefault(dep);
8 t.is(dep__default.default, 'default');
0 module.exports = {
1 description: 'returns the correct type for module.require'
2 };
0 const assert = require('assert');
1
2 const warnings = [];
3
4 module.exports = {
5 description: 'handles unresolved dependencies with the proper warning',
6 options: {
7 onwarn(warning) {
8 warnings.push(warning);
9 },
10 plugins: [
11 {
12 buildEnd() {
13 assert.strictEqual(warnings.length, 1);
14 assert.strictEqual(warnings[0].code, 'UNRESOLVED_IMPORT');
15 assert.strictEqual(warnings[0].source, 'path');
16 }
17 }
18 ]
19 }
20 };
0 const path = require('path');
1
2 t.is(typeof path.resolve, 'function');
0 module.exports = {
1 description: 'throws for unsupported dynamic require calls'
2 };
0 t.throws(() => require(getRequireTarget()), {
1 message:
2 'Could not dynamically require "foo-bar". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.'
3 });
4
5 function getRequireTarget() {
6 return 'foo-bar';
7 }
0 const dep = require('./dep');
1
2 console.log(dep);
0 const { workerData, parentPort } = require('worker_threads');
1
2 const { rollup } = require('rollup');
3
4 const commonjs = require('../../../../dist/index');
5 const { getCodeFromBundle } = require('../../../helpers/util');
6
7 generateCode(workerData);
8
9 async function generateCode(cache) {
10 const code = await getCodeFromBundle(
11 await rollup({
12 input: 'fixtures/samples/caching/main.js',
13 cache,
14 plugins: [commonjs()]
15 })
16 );
17
18 parentPort.postMessage(code);
19 }
0 module.exports = { default: 'foobar', __esModule: true };
0 module.exports.__esModule = true;
1 module.exports.default = 'foobar';
0 const fn = require('./submodule2');
1
2 export default fn;
0 module.exports = function() {
1 return 'Hello there';
2 };
0 Object.defineProperty(exports, '__esModule', { value: true });
1
2 module.exports = 'submodule';
0 // eslint-disable-next-line global-require
1 export default require('./submodule.js');
0 /* eslint-disable import/no-dynamic-require, global-require */
1
2 import result from './importer.js';
3
4 t.is(result, 'submodule');
1717 config = {};
1818 }
1919
20 if (config.skip) {
21 console.error(`Skipped test "${dir}"`);
22 return;
23 }
2024 (config.solo ? test.only : test)(dir, async (t) => {
2125 const options = Object.assign(
2226 {
4347 console.groupEnd();
4448 }
4549 }
46 const { exports, global } = runCodeSplitTest(codeMap, t, config.context);
50 const { exports, global, error } = runCodeSplitTest(codeMap, t, config.context);
4751
4852 if (config.exports) config.exports(exports, t);
4953 if (config.global) config.global(global, t);
54 if (error) {
55 throw error;
56 }
5057 t.snapshot(codeMap);
5158 });
5259 });
3030 {
3131 'main.js': `'use strict';␊
3232
33 function createCommonjsModule(fn, basedir, module) {␊
34 return module = {␊
35 path: basedir,␊
36 exports: {},␊
37 require: function (path, base) {␊
38 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
39 }␊
40 }, fn(module, module.exports), module.exports;␊
41 }␊
42
43 function commonjsRequire () {␊
44 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
45 }␊
33 function createCommonjsModule(fn) {␊
34 var module = { exports: {} };␊
35 return fn(module, module.exports), module.exports;␊
36 }␊
37
38 /* eslint-disable */␊
4639
4740 var document_1 = createCommonjsModule(function (module) {␊
48 /* eslint-disable */␊
4941 if (typeof document !== 'undefined') {␊
5042 module.exports = document;␊
5143 } else {␊
147139 };␊
148140
149141 module.exports = main;␊
142 `,
143 }
144
145 ## double-exports-assignment
146
147 > Snapshot 1
148
149 {
150 'main.js': `'use strict';␊
151
152 function createCommonjsModule(fn) {␊
153 var module = { exports: {} };␊
154 return fn(module, module.exports), module.exports;␊
155 }␊
156
157 var dep = createCommonjsModule(function (module, exports) {␊
158 exports.foo = 'first';␊
159 exports.foo = 'second';␊
160 });␊
161
162 t.is(dep.foo, 'second');␊
163 `,
164 }
165
166 ## double-module-exports-assignment
167
168 > Snapshot 1
169
170 {
171 'main.js': `'use strict';␊
172
173 var dep = 'first';␊
174 var dep = 'second';␊
175
176 var dep$1 = dep;␊
177
178 t.is(dep$1, 'second');␊
150179 `,
151180 }
152181
777806 {
778807 'main.js': `'use strict';␊
779808
780 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
781
782 var Path = _interopDefault(require('path'));␊
809 var Path = require('path');␊
810
811 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
812
813 var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);␊
783814
784815 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};␊
785816
930961
931962 const basePath = `${process.cwd()}/fixtures/function/dynamic-require-absolute-paths`;␊
932963
933 t.is(commonjsRequire(Path.resolve(`${basePath}/submodule.js`),"/$$rollup_base$$/fixtures/function/dynamic-require-absolute-paths"), 'submodule');␊
964 t.is(commonjsRequire(Path__default['default'].resolve(`${basePath}/submodule.js`),"/$$rollup_base$$/fixtures/function/dynamic-require-absolute-paths"), 'submodule');␊
934965
935966 var main = {␊
936967
18081839 });␊
18091840
18101841 commonjsRegister("/$$rollup_base$$/fixtures/function/dynamic-require-instances/package/main.js", function (module, exports) {␊
1811 module.exorts = { name: 'package', value: null };␊
1842 module.exports = { name: 'package', value: null };␊
18121843
18131844 });␊
18141845
27852816 {
27862817 'main.js': `'use strict';␊
27872818
2788 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
2789
2790 var externalExports = _interopDefault(require('external-cjs-exports'));␊
2791 var externalModuleExports = _interopDefault(require('external-cjs-module-exports'));␊
2792 var externalNamed = _interopDefault(require('external-esm-named'));␊
2793 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
2794 var externalDefault = _interopDefault(require('external-esm-default'));␊
2795
2796 t.deepEqual(externalExports, { foo: 'foo' }, 'external exports');␊
2797 t.deepEqual(externalModuleExports, 'bar', 'external module exports');␊
2798 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
2799 t.deepEqual(externalMixed, 'bar', 'external mixed');␊
2800 t.deepEqual(externalDefault, 'bar', 'external default');␊
2819 var externalExports = require('external-cjs-exports');␊
2820 var externalModuleExports = require('external-cjs-module-exports');␊
2821 var externalNamed = require('external-esm-named');␊
2822 var externalMixed = require('external-esm-mixed');␊
2823 var externalDefault = require('external-esm-default');␊
2824
2825 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
2826
2827 var externalExports__default = /*#__PURE__*/_interopDefaultLegacy(externalExports);␊
2828 var externalModuleExports__default = /*#__PURE__*/_interopDefaultLegacy(externalModuleExports);␊
2829 var externalNamed__default = /*#__PURE__*/_interopDefaultLegacy(externalNamed);␊
2830 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
2831 var externalDefault__default = /*#__PURE__*/_interopDefaultLegacy(externalDefault);␊
2832
2833 t.deepEqual(externalExports__default['default'], { foo: 'foo' }, 'external exports');␊
2834 t.deepEqual(externalModuleExports__default['default'], 'bar', 'external module exports');␊
2835 t.deepEqual(externalNamed__default['default'], { foo: 'foo' }, 'external named');␊
2836 t.deepEqual(externalMixed__default['default'], 'bar', 'external mixed');␊
2837 t.deepEqual(externalDefault__default['default'], 'bar', 'external default');␊
28012838
28022839 var main = {␊
28032840
28142851 {
28152852 'main.js': `'use strict';␊
28162853
2817 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
2818
2819 var externalExports = _interopDefault(require('external-cjs-exports'));␊
2820 var externalModuleExports = _interopDefault(require('external-cjs-module-exports'));␊
2821 var externalNamed = _interopDefault(require('external-esm-named'));␊
2822 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
2854 var externalExports = require('external-cjs-exports');␊
2855 var externalModuleExports = require('external-cjs-module-exports');␊
2856 var externalNamed = require('external-esm-named');␊
2857 var externalMixed = require('external-esm-mixed');␊
28232858 var externalEsmDefault = require('external-esm-default');␊
2859
2860 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
2861
2862 function _interopNamespace(e) {␊
2863 if (e && e.__esModule) return e;␊
2864 var n = Object.create(null);␊
2865 if (e) {␊
2866 Object.keys(e).forEach(function (k) {␊
2867 if (k !== 'default') {␊
2868 var d = Object.getOwnPropertyDescriptor(e, k);␊
2869 Object.defineProperty(n, k, d.get ? d : {␊
2870 enumerable: true,␊
2871 get: function () {␊
2872 return e[k];␊
2873 }␊
2874 });␊
2875 }␊
2876 });␊
2877 }␊
2878 n['default'] = e;␊
2879 return Object.freeze(n);␊
2880 }␊
2881
2882 var externalExports__default = /*#__PURE__*/_interopDefaultLegacy(externalExports);␊
2883 var externalModuleExports__default = /*#__PURE__*/_interopDefaultLegacy(externalModuleExports);␊
2884 var externalNamed__default = /*#__PURE__*/_interopDefaultLegacy(externalNamed);␊
2885 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
2886 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
28242887
28252888 function getAugmentedNamespace(n) {␊
28262889 if (n.__esModule) return n;␊
28372900 return a;␊
28382901 }␊
28392902
2840 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
2841
2842 t.deepEqual(externalExports, { foo: 'foo' }, 'external exports');␊
2843 t.deepEqual(externalModuleExports, 'bar', 'external module exports');␊
2844 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
2845 t.deepEqual(externalMixed, 'bar', 'external mixed');␊
2903 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
2904
2905 t.deepEqual(externalExports__default['default'], { foo: 'foo' }, 'external exports');␊
2906 t.deepEqual(externalModuleExports__default['default'], 'bar', 'external module exports');␊
2907 t.deepEqual(externalNamed__default['default'], { foo: 'foo' }, 'external named');␊
2908 t.deepEqual(externalMixed__default['default'], 'bar', 'external mixed');␊
28462909 t.deepEqual(externalDefault, { default: 'bar' }, 'external default');␊
28472910
28482911 var main = {␊
28602923 {
28612924 'main.js': `'use strict';␊
28622925
2863 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
2864
2865 var externalExports = _interopDefault(require('external-cjs-exports'));␊
2866 var externalModuleExports = _interopDefault(require('external-cjs-module-exports'));␊
2867 var externalNamed = _interopDefault(require('external-esm-named'));␊
2868 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
2926 var externalExports = require('external-cjs-exports');␊
2927 var externalModuleExports = require('external-cjs-module-exports');␊
2928 var externalNamed = require('external-esm-named');␊
2929 var externalMixed = require('external-esm-mixed');␊
28692930 var externalEsmDefault = require('external-esm-default');␊
2931
2932 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
2933
2934 function _interopNamespace(e) {␊
2935 if (e && e.__esModule) return e;␊
2936 var n = Object.create(null);␊
2937 if (e) {␊
2938 Object.keys(e).forEach(function (k) {␊
2939 if (k !== 'default') {␊
2940 var d = Object.getOwnPropertyDescriptor(e, k);␊
2941 Object.defineProperty(n, k, d.get ? d : {␊
2942 enumerable: true,␊
2943 get: function () {␊
2944 return e[k];␊
2945 }␊
2946 });␊
2947 }␊
2948 });␊
2949 }␊
2950 n['default'] = e;␊
2951 return Object.freeze(n);␊
2952 }␊
2953
2954 var externalExports__default = /*#__PURE__*/_interopDefaultLegacy(externalExports);␊
2955 var externalModuleExports__default = /*#__PURE__*/_interopDefaultLegacy(externalModuleExports);␊
2956 var externalNamed__default = /*#__PURE__*/_interopDefaultLegacy(externalNamed);␊
2957 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
2958 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
28702959
28712960 function getAugmentedNamespace(n) {␊
28722961 if (n.__esModule) return n;␊
28832972 return a;␊
28842973 }␊
28852974
2886 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
2887
2888 t.deepEqual(externalExports, { foo: 'foo' }, 'external exports');␊
2889 t.deepEqual(externalModuleExports, 'bar', 'external module exports');␊
2890 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
2891 t.deepEqual(externalMixed, 'bar', 'external mixed');␊
2975 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
2976
2977 t.deepEqual(externalExports__default['default'], { foo: 'foo' }, 'external exports');␊
2978 t.deepEqual(externalModuleExports__default['default'], 'bar', 'external module exports');␊
2979 t.deepEqual(externalNamed__default['default'], { foo: 'foo' }, 'external named');␊
2980 t.deepEqual(externalMixed__default['default'], 'bar', 'external mixed');␊
28922981 t.deepEqual(externalDefault, { default: 'bar' }, 'external default');␊
28932982
28942983 var main = {␊
29092998 var externalEsmNamed = require('external-esm-named');␊
29102999 var externalEsmMixed = require('external-esm-mixed');␊
29113000 var externalEsmDefault = require('external-esm-default');␊
3001
3002 function _interopNamespace(e) {␊
3003 if (e && e.__esModule) return e;␊
3004 var n = Object.create(null);␊
3005 if (e) {␊
3006 Object.keys(e).forEach(function (k) {␊
3007 if (k !== 'default') {␊
3008 var d = Object.getOwnPropertyDescriptor(e, k);␊
3009 Object.defineProperty(n, k, d.get ? d : {␊
3010 enumerable: true,␊
3011 get: function () {␊
3012 return e[k];␊
3013 }␊
3014 });␊
3015 }␊
3016 });␊
3017 }␊
3018 n['default'] = e;␊
3019 return Object.freeze(n);␊
3020 }␊
3021
3022 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3023 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3024 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
29123025
29133026 function getAugmentedNamespace(n) {␊
29143027 if (n.__esModule) return n;␊
29253038 return a;␊
29263039 }␊
29273040
2928 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed);␊
2929
2930 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed);␊
2931
2932 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
3041 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed__namespace);␊
3042
3043 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed__namespace);␊
3044
3045 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
29333046
29343047 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
29353048 t.deepEqual(externalMixed, { default: 'bar', foo: 'foo' }, 'external mixed');␊
29503063 {
29513064 'main.js': `'use strict';␊
29523065
2953 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
2954
2955 var externalExports = _interopDefault(require('external-cjs-exports'));␊
2956 var externalModuleExports = _interopDefault(require('external-cjs-module-exports'));␊
2957 var externalNamed = _interopDefault(require('external-esm-named'));␊
2958 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
2959 var externalDefault = _interopDefault(require('external-esm-default'));␊
2960
2961 t.deepEqual(externalExports, { foo: 'foo' }, 'external exports');␊
2962 t.deepEqual(externalModuleExports, 'bar', 'external module exports');␊
2963 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
2964 t.deepEqual(externalMixed, 'bar', 'external mixed');␊
2965 t.deepEqual(externalDefault, 'bar', 'external default');␊
3066 var externalExports = require('external-cjs-exports');␊
3067 var externalModuleExports = require('external-cjs-module-exports');␊
3068 var externalNamed = require('external-esm-named');␊
3069 var externalMixed = require('external-esm-mixed');␊
3070 var externalDefault = require('external-esm-default');␊
3071
3072 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
3073
3074 var externalExports__default = /*#__PURE__*/_interopDefaultLegacy(externalExports);␊
3075 var externalModuleExports__default = /*#__PURE__*/_interopDefaultLegacy(externalModuleExports);␊
3076 var externalNamed__default = /*#__PURE__*/_interopDefaultLegacy(externalNamed);␊
3077 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
3078 var externalDefault__default = /*#__PURE__*/_interopDefaultLegacy(externalDefault);␊
3079
3080 t.deepEqual(externalExports__default['default'], { foo: 'foo' }, 'external exports');␊
3081 t.deepEqual(externalModuleExports__default['default'], 'bar', 'external module exports');␊
3082 t.deepEqual(externalNamed__default['default'], { foo: 'foo' }, 'external named');␊
3083 t.deepEqual(externalMixed__default['default'], 'bar', 'external mixed');␊
3084 t.deepEqual(externalDefault__default['default'], 'bar', 'external default');␊
29663085
29673086 var main = {␊
29683087
30153134 `,
30163135 }
30173136
3137 ## expose-file-type-detection
3138
3139 > Snapshot 1
3140
3141 {
3142 'main.js': `'use strict';␊
3143
3144 var other = require('./other.js');␊
3145
3146 t.is(other, 'foo');␊
3147 `,
3148 'other.js': `'use strict';␊
3149
3150 var other = 'foo';␊
3151
3152 module.exports = other;␊
3153 `,
3154 }
3155
30183156 ## external-imports
30193157
30203158 > Snapshot 1
30223160 {
30233161 'main.js': `'use strict';␊
30243162
3025 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
3026
3027 var foo = _interopDefault(require('foo'));␊
3028
3029 var main = foo;␊
3163 var foo = require('foo');␊
3164
3165 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
3166
3167 var foo__default = /*#__PURE__*/_interopDefaultLegacy(foo);␊
3168
3169 var main = foo__default['default'];␊
30303170
30313171 module.exports = main;␊
30323172 `,
30893229
30903230 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};␊
30913231
3092 function createCommonjsModule(fn, basedir, module) {␊
3093 return module = {␊
3094 path: basedir,␊
3095 exports: {},␊
3096 require: function (path, base) {␊
3097 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
3098 }␊
3099 }, fn(module, module.exports), module.exports;␊
3100 }␊
3101
3102 function commonjsRequire () {␊
3103 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
3232 function createCommonjsModule(fn) {␊
3233 var module = { exports: {} };␊
3234 return fn(module, module.exports), module.exports;␊
31043235 }␊
31053236
31063237 var encode = createCommonjsModule(function (module, exports) {␊
31353266 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};␊
31363267
31373268 /* eslint-disable */␊
3269
31383270 function foo() {␊
31393271 const global = {};␊
31403272 global.modified = true;␊
31623294 var externalEsmMixed = require('external-esm-mixed');␊
31633295 var externalEsmDefault = require('external-esm-default');␊
31643296
3297 function _interopNamespace(e) {␊
3298 if (e && e.__esModule) return e;␊
3299 var n = Object.create(null);␊
3300 if (e) {␊
3301 Object.keys(e).forEach(function (k) {␊
3302 if (k !== 'default') {␊
3303 var d = Object.getOwnPropertyDescriptor(e, k);␊
3304 Object.defineProperty(n, k, d.get ? d : {␊
3305 enumerable: true,␊
3306 get: function () {␊
3307 return e[k];␊
3308 }␊
3309 });␊
3310 }␊
3311 });␊
3312 }␊
3313 n['default'] = e;␊
3314 return Object.freeze(n);␊
3315 }␊
3316
3317 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3318 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3319 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
3320
31653321 const foo = 'foo';␊
31663322
31673323 var named = /*#__PURE__*/Object.freeze({␊
31883344 return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;␊
31893345 }␊
31903346
3191 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmNamed);␊
3192
3193 var externalMixed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmMixed);␊
3194
3195 var externalDefault = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmDefault);␊
3347 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmNamed__namespace);␊
3348
3349 var externalMixed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmMixed__namespace);␊
3350
3351 var externalDefault = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmDefault__namespace);␊
31963352
31973353 t.deepEqual(named, { foo: 'foo' }, 'named exports');␊
31983354 t.deepEqual(mixed$1, { foo: 'foo', default: 'bar' }, 'mixed exports');␊
32203376 var externalEsmNamed = require('external-esm-named');␊
32213377 var externalEsmMixed = require('external-esm-mixed');␊
32223378 var externalEsmDefault = require('external-esm-default');␊
3379
3380 function _interopNamespace(e) {␊
3381 if (e && e.__esModule) return e;␊
3382 var n = Object.create(null);␊
3383 if (e) {␊
3384 Object.keys(e).forEach(function (k) {␊
3385 if (k !== 'default') {␊
3386 var d = Object.getOwnPropertyDescriptor(e, k);␊
3387 Object.defineProperty(n, k, d.get ? d : {␊
3388 enumerable: true,␊
3389 get: function () {␊
3390 return e[k];␊
3391 }␊
3392 });␊
3393 }␊
3394 });␊
3395 }␊
3396 n['default'] = e;␊
3397 return Object.freeze(n);␊
3398 }␊
3399
3400 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3401 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3402 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
32233403
32243404 const foo = 'foo';␊
32253405
32633443 return a;␊
32643444 }␊
32653445
3266 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed);␊
3267
3268 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed);␊
3269
3270 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
3446 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed__namespace);␊
3447
3448 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed__namespace);␊
3449
3450 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
32713451
32723452 var namedExports = /*@__PURE__*/getAugmentedNamespace(named);␊
32733453
34323612 {
34333613 'main.js': `'use strict';␊
34343614
3435 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
3436
34373615 var externalEsmNamed = require('external-esm-named');␊
3438 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
3616 var externalMixed = require('external-esm-mixed');␊
34393617 var externalEsmDefault = require('external-esm-default');␊
3618
3619 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
3620
3621 function _interopNamespace(e) {␊
3622 if (e && e.__esModule) return e;␊
3623 var n = Object.create(null);␊
3624 if (e) {␊
3625 Object.keys(e).forEach(function (k) {␊
3626 if (k !== 'default') {␊
3627 var d = Object.getOwnPropertyDescriptor(e, k);␊
3628 Object.defineProperty(n, k, d.get ? d : {␊
3629 enumerable: true,␊
3630 get: function () {␊
3631 return e[k];␊
3632 }␊
3633 });␊
3634 }␊
3635 });␊
3636 }␊
3637 n['default'] = e;␊
3638 return Object.freeze(n);␊
3639 }␊
3640
3641 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3642 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
3643 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
34403644
34413645 function getDefaultExportFromNamespaceIfNotNamed (n) {␊
34423646 return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;␊
34573661 return a;␊
34583662 }␊
34593663
3460 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmNamed);␊
3461
3462 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
3664 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(externalEsmNamed__namespace);␊
3665
3666 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
34633667
34643668 t.deepEqual(externalNamed, { foo: 'foo' }, 'named');␊
3465 t.deepEqual(externalMixed, 'bar', 'mixed');␊
3669 t.deepEqual(externalMixed__default['default'], 'bar', 'mixed');␊
34663670 t.deepEqual(externalDefault, { default: 'bar' }, 'default');␊
34673671
34683672 var main = {␊
34833687 var externalEsmNamed = require('external-esm-named');␊
34843688 var externalEsmMixed = require('external-esm-mixed');␊
34853689 var externalEsmDefault = require('external-esm-default');␊
3690
3691 function _interopNamespace(e) {␊
3692 if (e && e.__esModule) return e;␊
3693 var n = Object.create(null);␊
3694 if (e) {␊
3695 Object.keys(e).forEach(function (k) {␊
3696 if (k !== 'default') {␊
3697 var d = Object.getOwnPropertyDescriptor(e, k);␊
3698 Object.defineProperty(n, k, d.get ? d : {␊
3699 enumerable: true,␊
3700 get: function () {␊
3701 return e[k];␊
3702 }␊
3703 });␊
3704 }␊
3705 });␊
3706 }␊
3707 n['default'] = e;␊
3708 return Object.freeze(n);␊
3709 }␊
3710
3711 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3712 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3713 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
34863714
34873715 const foo = 'foo';␊
34883716
35153743 t.deepEqual(mixed$1, { foo: 'foo', default: 'bar' }, 'mixed exports');␊
35163744 t.deepEqual(_default$1, { default: 'bar' }, 'default export');␊
35173745 t.deepEqual(none, {}, 'no exports');␊
3518 t.deepEqual(externalEsmNamed, { foo: 'foo' }, 'external named');␊
3519 t.deepEqual(externalEsmMixed, { foo: 'foo', default: 'bar' }, 'external mixed');␊
3520 t.deepEqual(externalEsmDefault, { default: 'bar' }, 'external default');␊
3746 t.deepEqual(externalEsmNamed__namespace, { foo: 'foo' }, 'external named');␊
3747 t.deepEqual(externalEsmMixed__namespace, { foo: 'foo', default: 'bar' }, 'external mixed');␊
3748 t.deepEqual(externalEsmDefault__namespace, { default: 'bar' }, 'external default');␊
35213749
35223750 var main = {␊
35233751
35383766 var externalEsmMixed = require('external-esm-mixed');␊
35393767 var externalEsmDefault = require('external-esm-default');␊
35403768
3769 function _interopNamespace(e) {␊
3770 if (e && e.__esModule) return e;␊
3771 var n = Object.create(null);␊
3772 if (e) {␊
3773 Object.keys(e).forEach(function (k) {␊
3774 if (k !== 'default') {␊
3775 var d = Object.getOwnPropertyDescriptor(e, k);␊
3776 Object.defineProperty(n, k, d.get ? d : {␊
3777 enumerable: true,␊
3778 get: function () {␊
3779 return e[k];␊
3780 }␊
3781 });␊
3782 }␊
3783 });␊
3784 }␊
3785 n['default'] = e;␊
3786 return Object.freeze(n);␊
3787 }␊
3788
3789 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3790 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3791 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
3792
35413793 const foo = 'foo';␊
35423794
35433795 var named = /*#__PURE__*/Object.freeze({␊
35573809 return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;␊
35583810 }␊
35593811
3560 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmNamed);␊
3561
3562 var externalMixed = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmMixed);␊
3563
3564 var externalDefault = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmDefault);␊
3812 var externalNamed = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmNamed__namespace);␊
3813
3814 var externalMixed = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmMixed__namespace);␊
3815
3816 var externalDefault = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(externalEsmDefault__namespace);␊
35653817
35663818 t.deepEqual(named, { foo: 'foo' }, 'named exports');␊
35673819 t.deepEqual(mixedExports, 'bar', 'mixed exports');␊
35863838 {
35873839 'main.js': `'use strict';␊
35883840
3589 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
3590
3591 var externalNamed = _interopDefault(require('external-esm-named'));␊
3592 var externalMixed = _interopDefault(require('external-esm-mixed'));␊
3593 var externalDefault = _interopDefault(require('external-esm-default'));␊
3841 var externalNamed = require('external-esm-named');␊
3842 var externalMixed = require('external-esm-mixed');␊
3843 var externalDefault = require('external-esm-default');␊
3844
3845 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
3846
3847 var externalNamed__default = /*#__PURE__*/_interopDefaultLegacy(externalNamed);␊
3848 var externalMixed__default = /*#__PURE__*/_interopDefaultLegacy(externalMixed);␊
3849 var externalDefault__default = /*#__PURE__*/_interopDefaultLegacy(externalDefault);␊
35943850
35953851 var mixedExports = 'bar';␊
35963852
35983854
35993855 t.deepEqual(mixedExports, 'bar', 'mixed exports');␊
36003856 t.deepEqual(defaultExport, 'bar', 'default export');␊
3601 t.deepEqual(externalNamed, { foo: 'foo' }, 'external named');␊
3602 t.deepEqual(externalMixed, 'bar', 'external mixed');␊
3603 t.deepEqual(externalDefault, 'bar', 'external default');␊
3857 t.deepEqual(externalNamed__default['default'], { foo: 'foo' }, 'external named');␊
3858 t.deepEqual(externalMixed__default['default'], 'bar', 'external mixed');␊
3859 t.deepEqual(externalDefault__default['default'], 'bar', 'external default');␊
36043860
36053861 var main = {␊
36063862
36203876 var externalEsmNamed = require('external-esm-named');␊
36213877 var externalEsmMixed = require('external-esm-mixed');␊
36223878 var externalEsmDefault = require('external-esm-default');␊
3879
3880 function _interopNamespace(e) {␊
3881 if (e && e.__esModule) return e;␊
3882 var n = Object.create(null);␊
3883 if (e) {␊
3884 Object.keys(e).forEach(function (k) {␊
3885 if (k !== 'default') {␊
3886 var d = Object.getOwnPropertyDescriptor(e, k);␊
3887 Object.defineProperty(n, k, d.get ? d : {␊
3888 enumerable: true,␊
3889 get: function () {␊
3890 return e[k];␊
3891 }␊
3892 });␊
3893 }␊
3894 });␊
3895 }␊
3896 n['default'] = e;␊
3897 return Object.freeze(n);␊
3898 }␊
3899
3900 var externalEsmNamed__namespace = /*#__PURE__*/_interopNamespace(externalEsmNamed);␊
3901 var externalEsmMixed__namespace = /*#__PURE__*/_interopNamespace(externalEsmMixed);␊
3902 var externalEsmDefault__namespace = /*#__PURE__*/_interopNamespace(externalEsmDefault);␊
36233903
36243904 const foo = 'foo';␊
36253905
36633943 return a;␊
36643944 }␊
36653945
3666 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed);␊
3667
3668 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed);␊
3669
3670 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault);␊
3946 var externalNamed = /*@__PURE__*/getAugmentedNamespace(externalEsmNamed__namespace);␊
3947
3948 var externalMixed = /*@__PURE__*/getAugmentedNamespace(externalEsmMixed__namespace);␊
3949
3950 var externalDefault = /*@__PURE__*/getAugmentedNamespace(externalEsmDefault__namespace);␊
36713951
36723952 var namedExports = /*@__PURE__*/getAugmentedNamespace(named);␊
36733953
37003980 {
37013981 'main.js': `'use strict';␊
37023982
3703 function getDefaultExportFromCjs (x) {␊
3704 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
3705 }␊
3706
3707 function createCommonjsModule(fn, basedir, module) {␊
3708 return module = {␊
3709 path: basedir,␊
3710 exports: {},␊
3711 require: function (path, base) {␊
3712 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
3713 }␊
3714 }, fn(module, module.exports), module.exports;␊
3715 }␊
3983 /* eslint-disable import/no-mutable-exports */␊
3984 let foo = 'foo';␊
3985 let bar = 'bar';␊
3986
3987 function update(newFoo, newBar) {␊
3988 foo = newFoo;␊
3989 bar = newBar;␊
3990 }␊
3991
3992 var lib = /*#__PURE__*/Object.freeze({␊
3993 __proto__: null,␊
3994 get default () { return foo; },␊
3995 get bar () { return bar; },␊
3996 update: update␊
3997 });␊
37163998
37173999 function getAugmentedNamespace(n) {␊
37184000 if (n.__esModule) return n;␊
37294011 return a;␊
37304012 }␊
37314013
3732 function commonjsRequire () {␊
3733 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
3734 }␊
3735
3736 /* eslint-disable import/no-mutable-exports */␊
3737 let foo = 'foo';␊
3738 let bar = 'bar';␊
3739
3740 function update(newFoo, newBar) {␊
3741 foo = newFoo;␊
3742 bar = newBar;␊
3743 }␊
3744
3745 var lib = /*#__PURE__*/Object.freeze({␊
3746 __proto__: null,␊
3747 get default () { return foo; },␊
3748 get bar () { return bar; },␊
3749 update: update␊
3750 });␊
3751
37524014 var lib$1 = /*@__PURE__*/getAugmentedNamespace(lib);␊
37534015
3754 var main = createCommonjsModule(function (module) {␊
37554016 /* eslint-disable */␊
37564017
3757
3758 function _interopDefault(e) {␊
4018 function _interopDefault$1(e) {␊
37594019 return e && e.__esModule ? e : { default: e };␊
37604020 }␊
37614021
3762 var lib__default = /*#__PURE__*/_interopDefault(lib$1);␊
4022 var lib__default = /*#__PURE__*/_interopDefault$1(lib$1);␊
37634023 t.is(lib__default['default'], 'foo');␊
37644024 t.is(lib$1.bar, 'bar');␊
37654025
37664026 lib$1.update('newFoo', 'newBar');␊
37674027 t.is(lib__default['default'], 'newFoo');␊
37684028 t.is(lib$1.bar, 'newBar');␊
3769 });␊
3770
3771 var main$1 = /*@__PURE__*/getDefaultExportFromCjs(main);␊
3772
3773 module.exports = main$1;␊
4029
4030 var main = {␊
4031
4032 };␊
4033
4034 module.exports = main;␊
37744035 `,
37754036 }
37764037
38074068 var foo = 1;␊
38084069
38094070 /* eslint-disable global-require */␊
4071
38104072 var main = function() {␊
38114073 return multiply(2, foo);␊
38124074 };␊
38154077 `,
38164078 }
38174079
4080 ## interop-esmodule-wrapped
4081
4082 > Snapshot 1
4083
4084 {
4085 'main.js': `'use strict';␊
4086
4087 function getDefaultExportFromCjs (x) {␊
4088 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4089 }␊
4090
4091 function createCommonjsModule(fn) {␊
4092 var module = { exports: {} };␊
4093 return fn(module, module.exports), module.exports;␊
4094 }␊
4095
4096 var other = createCommonjsModule(function (module, exports) {␊
4097 exports.default = 42;␊
4098
4099 addCompiledMarker(module.exports);␊
4100
4101 function addCompiledMarker(exports) {␊
4102 // eslint-disable-next-line no-param-reassign␊
4103 exports.__esModule = true;␊
4104 }␊
4105 });␊
4106
4107 var foo = /*@__PURE__*/getDefaultExportFromCjs(other);␊
4108
4109 t.deepEqual(foo, 42);␊
4110 `,
4111 }
4112
4113 ## interop-no-esmodule-wrapped
4114
4115 > Snapshot 1
4116
4117 {
4118 'main.js': `'use strict';␊
4119
4120 function createCommonjsModule(fn) {␊
4121 var module = { exports: {} };␊
4122 return fn(module, module.exports), module.exports;␊
4123 }␊
4124
4125 var other = createCommonjsModule(function (module) {␊
4126 addDefaultExport(module.exports);␊
4127
4128 function addDefaultExport(exports) {␊
4129 // eslint-disable-next-line no-param-reassign␊
4130 exports.default = 42;␊
4131 }␊
4132 });␊
4133
4134 t.deepEqual(other, { default: 42 });␊
4135 `,
4136 }
4137
4138 ## interop-without-default-unwrapped
4139
4140 > Snapshot 1
4141
4142 {
4143 'main.js': `'use strict';␊
4144
4145 var foo = '__esModule';␊
4146
4147 var other = {␊
4148 foo: foo␊
4149 };␊
4150
4151 t.deepEqual(other, { foo: '__esModule' });␊
4152 `,
4153 }
4154
38184155 ## late-entry-dependency
38194156
38204157 > Snapshot 1
38404177 `,
38414178 }
38424179
4180 ## leading-comment
4181
4182 > Snapshot 1
4183
4184 {
4185 'main.js': `'use strict';␊
4186
4187 /*␊
4188 * This comment could be really important and should not be removed␊
4189 */␊
4190
4191 var main = 'bar';␊
4192
4193 module.exports = main;␊
4194 `,
4195 }
4196
4197 ## leading-comment-imports
4198
4199 > Snapshot 1
4200
4201 {
4202 'main.js': `'use strict';␊
4203
4204 var externalExports = require('external-cjs-exports');␊
4205
4206 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
4207
4208 var externalExports__default = /*#__PURE__*/_interopDefaultLegacy(externalExports);␊
4209
4210 /*␊
4211 * This comment could be really important and should not be removed␊
4212 */␊
4213
4214
4215
4216 t.is(externalExports__default['default'].foo, 'foo');␊
4217
4218 var main = {␊
4219
4220 };␊
4221
4222 module.exports = main;␊
4223 `,
4224 }
4225
4226 ## leading-comment-wrapped
4227
4228 > Snapshot 1
4229
4230 {
4231 'main.js': `'use strict';␊
4232
4233 function createCommonjsModule(fn) {␊
4234 var module = { exports: {} };␊
4235 return fn(module, module.exports), module.exports;␊
4236 }␊
4237
4238 /*␊
4239 * This comment could be really important and should not be removed␊
4240 */␊
4241
4242 var main = createCommonjsModule(function (module, exports) {␊
4243
4244 modifyExports(exports);␊
4245
4246 function modifyExports(exported) {␊
4247 // eslint-disable-next-line no-param-reassign␊
4248 exported.foo = 'bar';␊
4249 }␊
4250 });␊
4251
4252 module.exports = main;␊
4253 `,
4254 }
4255
38434256 ## module_require
38444257
38454258 > Snapshot 1
38524265 var main = foo * 2;␊
38534266
38544267 module.exports = main;␊
4268 `,
4269 }
4270
4271 ## multiple-define-compiled-esm
4272
4273 > Snapshot 1
4274
4275 {
4276 'main.js': `'use strict';␊
4277
4278 function getDefaultExportFromCjs (x) {␊
4279 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4280 }␊
4281
4282 function createCommonjsModule(fn) {␊
4283 var module = { exports: {} };␊
4284 return fn(module, module.exports), module.exports;␊
4285 }␊
4286
4287 var foo = createCommonjsModule(function (module, exports) {␊
4288 Object.defineProperty(exports, '__esModule', { value: true });␊
4289
4290 Object.defineProperty(exports, '__esModule', { value: true });␊
4291
4292 exports.default = 'foo';␊
4293 });␊
4294
4295 var foo$1 = /*@__PURE__*/getDefaultExportFromCjs(foo);␊
4296
4297 t.deepEqual(foo$1, 'foo');␊
38554298 `,
38564299 }
38574300
38774320 {
38784321 'main.js': `'use strict';␊
38794322
3880 function createCommonjsModule(fn, basedir, module) {␊
3881 return module = {␊
3882 path: basedir,␊
3883 exports: {},␊
3884 require: function (path, base) {␊
3885 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
3886 }␊
3887 }, fn(module, module.exports), module.exports;␊
3888 }␊
3889
3890 function commonjsRequire () {␊
3891 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4323 function createCommonjsModule(fn) {␊
4324 var module = { exports: {} };␊
4325 return fn(module, module.exports), module.exports;␊
38924326 }␊
38934327
38944328 var x = createCommonjsModule(function (module) {␊
39104344 {
39114345 'main.js': `'use strict';␊
39124346
3913 function createCommonjsModule(fn, basedir, module) {␊
3914 return module = {␊
3915 path: basedir,␊
3916 exports: {},␊
3917 require: function (path, base) {␊
3918 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
3919 }␊
3920 }, fn(module, module.exports), module.exports;␊
3921 }␊
3922
3923 function commonjsRequire () {␊
3924 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4347 function createCommonjsModule(fn) {␊
4348 var module = { exports: {} };␊
4349 return fn(module, module.exports), module.exports;␊
39254350 }␊
39264351
39274352 var x = createCommonjsModule(function (module) {␊
39454370 {
39464371 'main.js': `'use strict';␊
39474372
3948 function createCommonjsModule(fn, basedir, module) {␊
3949 return module = {␊
3950 path: basedir,␊
3951 exports: {},␊
3952 require: function (path, base) {␊
3953 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
3954 }␊
3955 }, fn(module, module.exports), module.exports;␊
3956 }␊
3957
3958 function commonjsRequire () {␊
3959 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4373 function createCommonjsModule(fn) {␊
4374 var module = { exports: {} };␊
4375 return fn(module, module.exports), module.exports;␊
39604376 }␊
39614377
39624378 var x = createCommonjsModule(function (module) {␊
40274443 `,
40284444 }
40294445
4446 ## nested-define-compiled-esm-unused
4447
4448 > Snapshot 1
4449
4450 {
4451 'main.js': `'use strict';␊
4452
4453 function getDefaultExportFromCjs (x) {␊
4454 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4455 }␊
4456
4457 function createCommonjsModule(fn) {␊
4458 var module = { exports: {} };␊
4459 return fn(module, module.exports), module.exports;␊
4460 }␊
4461
4462 var foo = createCommonjsModule(function (module, exports) {␊
4463
4464 exports.default = 'foo';␊
4465 });␊
4466
4467 var foo$1 = /*@__PURE__*/getDefaultExportFromCjs(foo);␊
4468
4469 t.deepEqual(foo$1, { default: 'foo' });␊
4470 `,
4471 }
4472
4473 ## nested-define-compiled-esm-used
4474
4475 > Snapshot 1
4476
4477 {
4478 'main.js': `'use strict';␊
4479
4480 function getDefaultExportFromCjs (x) {␊
4481 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4482 }␊
4483
4484 function createCommonjsModule(fn) {␊
4485 var module = { exports: {} };␊
4486 return fn(module, module.exports), module.exports;␊
4487 }␊
4488
4489 var foo = createCommonjsModule(function (module, exports) {␊
4490 Object.defineProperty(exports, '__esModule', { value: true });␊
4491
4492 {␊
4493 Object.defineProperty(exports, '__esModule', { value: true });␊
4494 }␊
4495
4496 exports.default = 'foo';␊
4497 });␊
4498
4499 var foo$1 = /*@__PURE__*/getDefaultExportFromCjs(foo);␊
4500
4501 t.deepEqual(foo$1, 'foo');␊
4502 `,
4503 }
4504
40304505 ## no-exports-entry
40314506
40324507 > Snapshot 1
40724547 `,
40734548 }
40744549
4550 ## pass-require-to-node-resolve
4551
4552 > Snapshot 1
4553
4554 {
4555 'bar-imported-49e0dbcf.js': `'use strict';␊
4556
4557 var barImported = 'imported';␊
4558
4559 exports.default = barImported;␊
4560 `,
4561 'main.js': `'use strict';␊
4562
4563 var foo = 'imported';␊
4564
4565 var fooRequired = 'required';␊
4566
4567 var foo$1 = fooRequired;␊
4568
4569 var barPromise = Promise.resolve().then(function () { return require('./bar-imported-49e0dbcf.js'); });␊
4570
4571 var requiring = {␊
4572 foo: foo$1,␊
4573 barPromise: barPromise␊
4574 };␊
4575
4576 t.is(foo, 'imported');␊
4577 t.is(requiring.foo, 'required');␊
4578
4579 var main = Promise.all([Promise.resolve().then(function () { return require('./bar-imported-49e0dbcf.js'); }), requiring.barPromise]);␊
4580
4581 module.exports = main;␊
4582 `,
4583 }
4584
40754585 ## react-apollo
40764586
40774587 > Snapshot 1
40794589 {
40804590 'main.js': `'use strict';␊
40814591
4082 function createCommonjsModule(fn, basedir, module) {␊
4083 return module = {␊
4084 path: basedir,␊
4085 exports: {},␊
4086 require: function (path, base) {␊
4087 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4088 }␊
4089 }, fn(module, module.exports), module.exports;␊
4090 }␊
4091
4092 function commonjsRequire () {␊
4093 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4094 }␊
4095
4096 var commonjsBar = createCommonjsModule(function (module, exports) {␊
40974592 /* eslint-disable no-underscore-dangle */␊
40984593 function Bar() {␊
40994594 this.x = 42;␊
41004595 }␊
41014596
4102 exports.__esModule = true;␊
4103 exports.default = Bar;␊
4104 });␊
4105
4106 var commonjsFoo = createCommonjsModule(function (module, exports) {␊
4597
4598 var _default = Bar;␊
4599
4600 var commonjsBar = /*#__PURE__*/Object.defineProperty({␊
4601 default: _default␊
4602 }, '__esModule', {value: true});␊
4603
41074604 /* eslint-disable no-underscore-dangle */␊
41084605
4109
4110 exports.__esModule = true;␊
4111 exports.Bar = commonjsBar.default;␊
4112 });␊
4113
4114 t.is(new commonjsFoo.Bar().x, 42);␊
4606 var Bar_1 = commonjsBar.default;␊
4607
4608 t.is(new Bar_1().x, 42);␊
41154609 `,
41164610 }
41174611
43374831 `,
43384832 }
43394833
4834 ## shadowed-import
4835
4836 > Snapshot 1
4837
4838 {
4839 'main.js': `'use strict';␊
4840
4841 var foo = 'foo';␊
4842
4843 const foo$1 = foo;␊
4844
4845 t.is(foo$1, 'foo');␊
4846
4847 {␊
4848 // eslint-disable-next-line no-shadow␊
4849 const foo$1 = 'wrong';␊
4850 // eslint-disable-next-line global-require␊
4851 const bar = foo;␊
4852 t.is(foo$1, 'wrong');␊
4853 t.is(bar, 'foo');␊
4854 }␊
4855
4856 var main = {␊
4857
4858 };␊
4859
4860 module.exports = main;␊
4861 `,
4862 }
4863
43404864 ## shadowing
43414865
43424866 > Snapshot 1
43704894 commonjsGlobal.b = 2;␊
43714895 var b = 'b';␊
43724896
4897 /* eslint-disable */␊
4898
43734899 var main = b ;␊
43744900
43754901 module.exports = main;␊
44144940
44154941 /* eslint-disable */␊
44164942
4417
44184943 var main = 'foo';␊
44194944
44204945 module.exports = main;␊
44284953 {
44294954 'main.js': `'use strict';␊
44304955
4431 function createCommonjsModule(fn, basedir, module) {␊
4432 return module = {␊
4433 path: basedir,␊
4434 exports: {},␊
4435 require: function (path, base) {␊
4436 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4437 }␊
4438 }, fn(module, module.exports), module.exports;␊
4439 }␊
4440
4441 function commonjsRequire () {␊
4442 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4956 function createCommonjsModule(fn) {␊
4957 var module = { exports: {} };␊
4958 return fn(module, module.exports), module.exports;␊
44434959 }␊
44444960
44454961 var foo = createCommonjsModule(function (module) {␊
45175033 {
45185034 'main.js': `'use strict';␊
45195035
4520 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
4521
4522 var external = _interopDefault(require('external-esm-default'));␊
5036 var external = require('external-esm-default');␊
5037
5038 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
5039
5040 var external__default = /*#__PURE__*/_interopDefaultLegacy(external);␊
5041
5042 var _default = 'default';␊
5043
5044 t.is(_default, 'default');␊
5045 t.is(external__default['default'], 'bar');␊
5046 `,
5047 }
5048
5049 ## transpiled-esm-entry-default
5050
5051 > Snapshot 1
5052
5053 {
5054 'entry-c1d858d8.js': `'use strict';␊
5055
5056 var _default = 'default';␊
5057
5058 var entry = /*#__PURE__*/Object.defineProperty({␊
5059 default: _default␊
5060 }, '__esModule', {value: true});␊
5061
5062 var entry$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
5063 'default': _default␊
5064 }));␊
5065
5066 exports._default = _default;␊
5067 exports.entry = entry$1;␊
5068 `,
5069 'entry.js': `'use strict';␊
5070
5071 var entry = require('./entry-c1d858d8.js');␊
5072
5073
5074
5075 module.exports = entry._default;␊
5076 `,
5077 'main.js': `'use strict';␊
5078
5079 var entry = require('./entry-c1d858d8.js');␊
5080
5081 t.deepEqual(entry.entry, { default: 'default' });␊
5082 `,
5083 }
5084
5085 ## transpiled-esm-entry-mixed
5086
5087 > Snapshot 1
5088
5089 {
5090 'entry-15c3fb09.js': `'use strict';␊
5091
5092 var _default = 'default';␊
5093 var named = 'named';␊
5094
5095 var entry = /*#__PURE__*/Object.defineProperty({␊
5096 default: _default,␊
5097 named: named␊
5098 }, '__esModule', {value: true});␊
5099
5100 var entry$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
5101 'default': _default,␊
5102 named: named␊
5103 }));␊
5104
5105 exports._default = _default;␊
5106 exports.entry = entry$1;␊
5107 exports.named = named;␊
5108 `,
5109 'entry.js': `'use strict';␊
5110
5111 Object.defineProperty(exports, '__esModule', { value: true });␊
5112
5113 var entry = require('./entry-15c3fb09.js');␊
5114
5115
5116
5117 exports.default = entry._default;␊
5118 exports.named = entry.named;␊
5119 `,
5120 'main.js': `'use strict';␊
5121
5122 var entry = require('./entry-15c3fb09.js');␊
5123
5124 t.deepEqual(entry.entry, { default: 'default', named: 'named' });␊
5125 `,
5126 }
5127
5128 ## transpiled-esm-entry-named
5129
5130 > Snapshot 1
5131
5132 {
5133 'entry-2b675e07.js': `'use strict';␊
5134
5135 var named = 'named';␊
5136
5137 var entry = /*#__PURE__*/Object.defineProperty({␊
5138 named: named␊
5139 }, '__esModule', {value: true});␊
5140
5141 var entry$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
5142 'default': entry,␊
5143 named: named␊
5144 }));␊
5145
5146 exports.entry = entry$1;␊
5147 exports.entry$1 = entry;␊
5148 exports.named = named;␊
5149 `,
5150 'entry.js': `'use strict';␊
5151
5152 Object.defineProperty(exports, '__esModule', { value: true });␊
5153
5154 var entry = require('./entry-2b675e07.js');␊
5155
5156
5157
5158 exports.default = entry.entry$1;␊
5159 exports.named = entry.named;␊
5160 `,
5161 'main.js': `'use strict';␊
5162
5163 var entry = require('./entry-2b675e07.js');␊
5164
5165 t.deepEqual(entry.entry, {␊
5166 default: {␊
5167 named: 'named'␊
5168 },␊
5169 named: 'named'␊
5170 });␊
5171 `,
5172 }
5173
5174 ## transpiled-esm-mixed
5175
5176 > Snapshot 1
5177
5178 {
5179 'main.js': `'use strict';␊
5180
5181 var external = require('external-esm-mixed');␊
5182
5183 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
5184
5185 var external__default = /*#__PURE__*/_interopDefaultLegacy(external);␊
5186
5187 var named = 'named';␊
5188 var _default = 'default';␊
5189
5190 t.is(_default, 'default');␊
5191 t.is(named, 'named');␊
5192 t.is(external__default['default'], 'bar');␊
5193 t.is(external.foo, 'foo');␊
5194 `,
5195 }
5196
5197 ## transpiled-esm-named
5198
5199 > Snapshot 1
5200
5201 {
5202 'main.js': `'use strict';␊
5203
5204 var externalEsmNamed = require('external-esm-named');␊
5205
5206 var named = 'named';␊
5207
5208 t.is(named, 'named');␊
5209 t.is(externalEsmNamed.foo, 'foo');␊
5210 `,
5211 }
5212
5213 ## transpiled-esm-namespace-default
5214
5215 > Snapshot 1
5216
5217 {
5218 'main.js': `'use strict';␊
5219
5220 var external = require('external-esm-default');␊
5221
5222 function _interopNamespace(e) {␊
5223 if (e && e.__esModule) return e;␊
5224 var n = Object.create(null);␊
5225 if (e) {␊
5226 Object.keys(e).forEach(function (k) {␊
5227 if (k !== 'default') {␊
5228 var d = Object.getOwnPropertyDescriptor(e, k);␊
5229 Object.defineProperty(n, k, d.get ? d : {␊
5230 enumerable: true,␊
5231 get: function () {␊
5232 return e[k];␊
5233 }␊
5234 });␊
5235 }␊
5236 });␊
5237 }␊
5238 n['default'] = e;␊
5239 return Object.freeze(n);␊
5240 }␊
5241
5242 var external__namespace = /*#__PURE__*/_interopNamespace(external);␊
5243
5244 var _default = 'default';␊
5245
5246 var dep = /*#__PURE__*/Object.defineProperty({␊
5247 default: _default␊
5248 }, '__esModule', {value: true});␊
5249
5250 var dep$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
5251 'default': _default␊
5252 }));␊
5253
5254 t.deepEqual(dep$1, {␊
5255 default: 'default'␊
5256 });␊
5257
5258 t.deepEqual(external__namespace, {␊
5259 default: 'bar'␊
5260 });␊
5261 `,
5262 }
5263
5264 ## transpiled-esm-namespace-mixed
5265
5266 > Snapshot 1
5267
5268 {
5269 'main.js': `'use strict';␊
5270
5271 var external = require('external-esm-mixed');␊
5272
5273 function _interopNamespace(e) {␊
5274 if (e && e.__esModule) return e;␊
5275 var n = Object.create(null);␊
5276 if (e) {␊
5277 Object.keys(e).forEach(function (k) {␊
5278 if (k !== 'default') {␊
5279 var d = Object.getOwnPropertyDescriptor(e, k);␊
5280 Object.defineProperty(n, k, d.get ? d : {␊
5281 enumerable: true,␊
5282 get: function () {␊
5283 return e[k];␊
5284 }␊
5285 });␊
5286 }␊
5287 });␊
5288 }␊
5289 n['default'] = e;␊
5290 return Object.freeze(n);␊
5291 }␊
5292
5293 var external__namespace = /*#__PURE__*/_interopNamespace(external);␊
5294
5295 var named = 'named';␊
5296 var _default = 'default';␊
5297
5298 var dep = /*#__PURE__*/Object.defineProperty({␊
5299 named: named,␊
5300 default: _default␊
5301 }, '__esModule', {value: true});␊
5302
5303 var dep$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
5304 'default': _default,␊
5305 named: named␊
5306 }));␊
5307
5308 t.deepEqual(dep$1, {␊
5309 default: 'default',␊
5310 named: 'named'␊
5311 });␊
5312
5313 t.deepEqual(external__namespace, {␊
5314 default: 'bar',␊
5315 foo: 'foo'␊
5316 });␊
5317 `,
5318 }
5319
5320 ## transpiled-esm-namespace-named
5321
5322 > Snapshot 1
5323
5324 {
5325 'main.js': `'use strict';␊
5326
5327 var external = require('external-esm-named');␊
5328
5329 function _interopNamespace(e) {␊
5330 if (e && e.__esModule) return e;␊
5331 var n = Object.create(null);␊
5332 if (e) {␊
5333 Object.keys(e).forEach(function (k) {␊
5334 if (k !== 'default') {␊
5335 var d = Object.getOwnPropertyDescriptor(e, k);␊
5336 Object.defineProperty(n, k, d.get ? d : {␊
5337 enumerable: true,␊
5338 get: function () {␊
5339 return e[k];␊
5340 }␊
5341 });␊
5342 }␊
5343 });␊
5344 }␊
5345 n['default'] = e;␊
5346 return Object.freeze(n);␊
5347 }␊
5348
5349 var external__namespace = /*#__PURE__*/_interopNamespace(external);␊
5350
5351 var named = 'named';␊
5352
5353 var dep = /*#__PURE__*/Object.defineProperty({␊
5354 named: named␊
5355 }, '__esModule', {value: true});␊
5356
5357 var dep$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
5358 'default': dep,␊
5359 named: named␊
5360 }));␊
5361
5362 t.deepEqual(dep$1, {␊
5363 default: {␊
5364 named: 'named'␊
5365 },␊
5366 named: 'named'␊
5367 });␊
5368
5369 t.deepEqual(external__namespace, {␊
5370 foo: 'foo'␊
5371 });␊
5372 `,
5373 }
5374
5375 ## transpiled-esm-nested-module-exports
5376
5377 > Snapshot 1
5378
5379 {
5380 'main.js': `'use strict';␊
45235381
45245382 function getDefaultExportFromCjs (x) {␊
45255383 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
45265384 }␊
45275385
4528 function createCommonjsModule(fn, basedir, module) {␊
4529 return module = {␊
4530 path: basedir,␊
4531 exports: {},␊
4532 require: function (path, base) {␊
4533 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4534 }␊
4535 }, fn(module, module.exports), module.exports;␊
4536 }␊
4537
4538 function commonjsRequire () {␊
4539 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
5386 function createCommonjsModule(fn) {␊
5387 var module = { exports: {} };␊
5388 return fn(module, module.exports), module.exports;␊
45405389 }␊
45415390
45425391 var dep = createCommonjsModule(function (module, exports) {␊
45435392 Object.defineProperty(exports, '__esModule', { value: true });␊
4544 exports.default = 'default';␊
5393
5394 if (globalValue) {␊
5395 module.exports = 'first';␊
5396 } else {␊
5397 module.exports = 'second';␊
5398 }␊
45455399 });␊
45465400
45475401 var dep$1 = /*@__PURE__*/getDefaultExportFromCjs(dep);␊
45485402
4549 t.is(dep$1, 'default');␊
4550 t.is(external, 'bar');␊
4551 `,
4552 }
4553
4554 ## transpiled-esm-entry-default
4555
4556 > Snapshot 1
4557
4558 {
4559 'entry-a2520c87.js': `'use strict';␊
4560
4561 function getDefaultExportFromCjs (x) {␊
4562 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4563 }␊
4564
4565 function createCommonjsModule(fn, basedir, module) {␊
4566 return module = {␊
4567 path: basedir,␊
4568 exports: {},␊
4569 require: function (path, base) {␊
4570 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4571 }␊
4572 }, fn(module, module.exports), module.exports;␊
4573 }␊
4574
4575 function commonjsRequire () {␊
4576 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4577 }␊
4578
4579 var entry = createCommonjsModule(function (module, exports) {␊
4580 Object.defineProperty(exports, '__esModule', { value: true });␊
4581 exports.default = 'default';␊
4582 });␊
4583
4584 var entry$1 = /*@__PURE__*/getDefaultExportFromCjs(entry);␊
4585
4586 var entry$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
4587 'default': entry$1␊
4588 }));␊
4589
4590 exports.entry = entry$2;␊
4591 exports.entry$1 = entry$1;␊
4592 `,
4593 'entry.js': `'use strict';␊
4594
4595 var entry = require('./entry-a2520c87.js');␊
4596
4597
4598
4599 module.exports = entry.entry$1;␊
4600 `,
4601 'main.js': `'use strict';␊
4602
4603 var entry = require('./entry-a2520c87.js');␊
4604
4605 t.deepEqual(entry.entry, { default: 'default' });␊
4606 `,
4607 }
4608
4609 ## transpiled-esm-entry-mixed
4610
4611 > Snapshot 1
4612
4613 {
4614 'entry-44884401.js': `'use strict';␊
4615
4616 function getDefaultExportFromCjs (x) {␊
4617 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4618 }␊
4619
4620 function createCommonjsModule(fn, basedir, module) {␊
4621 return module = {␊
4622 path: basedir,␊
4623 exports: {},␊
4624 require: function (path, base) {␊
4625 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4626 }␊
4627 }, fn(module, module.exports), module.exports;␊
4628 }␊
4629
4630 function commonjsRequire () {␊
4631 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4632 }␊
4633
4634 var entry = createCommonjsModule(function (module, exports) {␊
4635 Object.defineProperty(exports, '__esModule', { value: true });␊
4636 exports.default = 'default';␊
4637 exports.named = 'named';␊
4638 });␊
4639
4640 var entry$1 = /*@__PURE__*/getDefaultExportFromCjs(entry);␊
4641
4642 var entry$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
4643 'default': entry$1␊
4644 }));␊
4645
4646 exports.entry = entry$2;␊
4647 exports.entry$1 = entry$1;␊
4648 `,
4649 'entry.js': `'use strict';␊
4650
4651 var entry = require('./entry-44884401.js');␊
4652
4653
4654
4655 module.exports = entry.entry$1;␊
4656 `,
4657 'main.js': `'use strict';␊
4658
4659 var entry = require('./entry-44884401.js');␊
4660
4661 t.deepEqual(entry.entry, { default: 'default', named: 'named' });␊
4662 `,
4663 }
4664
4665 ## transpiled-esm-entry-named
4666
4667 > Snapshot 1
4668
4669 {
4670 'entry-3a4176ef.js': `'use strict';␊
4671
4672 function getDefaultExportFromCjs (x) {␊
4673 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4674 }␊
4675
4676 function createCommonjsModule(fn, basedir, module) {␊
4677 return module = {␊
4678 path: basedir,␊
4679 exports: {},␊
4680 require: function (path, base) {␊
4681 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4682 }␊
4683 }, fn(module, module.exports), module.exports;␊
4684 }␊
4685
4686 function commonjsRequire () {␊
4687 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4688 }␊
4689
4690 var entry = createCommonjsModule(function (module, exports) {␊
4691 Object.defineProperty(exports, '__esModule', { value: true });␊
4692 exports.named = 'named';␊
4693 });␊
4694
4695 var entry$1 = /*@__PURE__*/getDefaultExportFromCjs(entry);␊
4696
4697 var entry$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), entry, {␊
4698 'default': entry$1␊
4699 }));␊
4700
4701 exports.entry = entry$2;␊
4702 exports.entry$1 = entry$1;␊
4703 `,
4704 'entry.js': `'use strict';␊
4705
4706 var entry = require('./entry-3a4176ef.js');␊
4707
4708
4709
4710 module.exports = entry.entry$1;␊
4711 `,
4712 'main.js': `'use strict';␊
4713
4714 var entry = require('./entry-3a4176ef.js');␊
4715
4716 t.deepEqual(entry.entry, {␊
4717 // Technically, this should ideally not exist, or if we cannot avoid it due␊
4718 // to runtime default export detection, it should probably be undefined. We␊
4719 // return the namespace instead as this will fix␊
4720 // rollup/rollup-plugin-commonjs#224 until the remaining Rollup interop has␊
4721 // been updated␊
4722 default: { named: 'named' },␊
4723 named: 'named'␊
4724 });␊
4725 `,
4726 }
4727
4728 ## transpiled-esm-mixed
4729
4730 > Snapshot 1
4731
4732 {
4733 'main.js': `'use strict';␊
4734
4735 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }␊
4736
4737 var external = require('external-esm-mixed');␊
4738 var external__default = _interopDefault(external);␊
4739
4740 function getDefaultExportFromCjs (x) {␊
4741 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4742 }␊
4743
4744 function createCommonjsModule(fn, basedir, module) {␊
4745 return module = {␊
4746 path: basedir,␊
4747 exports: {},␊
4748 require: function (path, base) {␊
4749 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4750 }␊
4751 }, fn(module, module.exports), module.exports;␊
4752 }␊
4753
4754 function commonjsRequire () {␊
4755 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4756 }␊
4757
4758 var dep = createCommonjsModule(function (module, exports) {␊
4759 Object.defineProperty(exports, '__esModule', { value: true });␊
4760 exports.named = 'named';␊
4761 exports.default = 'default';␊
4762 });␊
4763
4764 var dep$1 = /*@__PURE__*/getDefaultExportFromCjs(dep);␊
4765
4766 t.is(dep$1, 'default');␊
4767 t.is(dep.named, 'named');␊
4768 t.is(external__default, 'bar');␊
4769 t.is(external.foo, 'foo');␊
4770 `,
4771 }
4772
4773 ## transpiled-esm-named
4774
4775 > Snapshot 1
4776
4777 {
4778 'main.js': `'use strict';␊
4779
4780 var externalEsmNamed = require('external-esm-named');␊
4781
4782 function createCommonjsModule(fn, basedir, module) {␊
4783 return module = {␊
4784 path: basedir,␊
4785 exports: {},␊
4786 require: function (path, base) {␊
4787 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4788 }␊
4789 }, fn(module, module.exports), module.exports;␊
4790 }␊
4791
4792 function commonjsRequire () {␊
4793 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4794 }␊
4795
4796 var dep = createCommonjsModule(function (module, exports) {␊
4797 Object.defineProperty(exports, '__esModule', { value: true });␊
4798 exports.named = 'named';␊
4799 });␊
4800
4801 t.is(dep.named, 'named');␊
4802 t.is(externalEsmNamed.foo, 'foo');␊
4803 `,
4804 }
4805
4806 ## transpiled-esm-namespace-default
4807
4808 > Snapshot 1
4809
4810 {
4811 'main.js': `'use strict';␊
4812
4813 var external = require('external-esm-default');␊
4814
4815 function getDefaultExportFromCjs (x) {␊
4816 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4817 }␊
4818
4819 function createCommonjsModule(fn, basedir, module) {␊
4820 return module = {␊
4821 path: basedir,␊
4822 exports: {},␊
4823 require: function (path, base) {␊
4824 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4825 }␊
4826 }, fn(module, module.exports), module.exports;␊
4827 }␊
4828
4829 function commonjsRequire () {␊
4830 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4831 }␊
4832
4833 var dep = createCommonjsModule(function (module, exports) {␊
4834 Object.defineProperty(exports, '__esModule', { value: true });␊
4835 exports.default = 'default';␊
4836 });␊
4837
4838 var dep$1 = /*@__PURE__*/getDefaultExportFromCjs(dep);␊
4839
4840 var dep$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
4841 'default': dep$1␊
4842 }));␊
4843
4844 t.deepEqual(dep$2, {␊
4845 default: 'default'␊
4846 });␊
4847
4848 t.deepEqual(external, {␊
4849 default: 'bar'␊
4850 });␊
4851 `,
4852 }
4853
4854 ## transpiled-esm-namespace-mixed
4855
4856 > Snapshot 1
4857
4858 {
4859 'main.js': `'use strict';␊
4860
4861 var external = require('external-esm-mixed');␊
4862
4863 function getDefaultExportFromCjs (x) {␊
4864 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4865 }␊
4866
4867 function createCommonjsModule(fn, basedir, module) {␊
4868 return module = {␊
4869 path: basedir,␊
4870 exports: {},␊
4871 require: function (path, base) {␊
4872 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4873 }␊
4874 }, fn(module, module.exports), module.exports;␊
4875 }␊
4876
4877 function commonjsRequire () {␊
4878 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4879 }␊
4880
4881 var dep = createCommonjsModule(function (module, exports) {␊
4882 Object.defineProperty(exports, '__esModule', { value: true });␊
4883 exports.named = 'named';␊
4884 exports.default = 'default';␊
4885 });␊
4886
4887 var dep$1 = /*@__PURE__*/getDefaultExportFromCjs(dep);␊
4888
4889 var dep$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
4890 'default': dep$1␊
4891 }));␊
4892
4893 t.deepEqual(dep$2, {␊
5403 t.is(dep$1, 'first');␊
5404 `,
5405 }
5406
5407 ## transpiled-esm-required
5408
5409 > Snapshot 1
5410
5411 {
5412 'main.js': `'use strict';␊
5413
5414 var named = 'named';␊
5415 var _default = 'default';␊
5416
5417 var dep = /*#__PURE__*/Object.defineProperty({␊
5418 named: named,␊
5419 default: _default␊
5420 }, '__esModule', {value: true});␊
5421
5422 t.deepEqual(dep, {␊
48945423 default: 'default',␊
48955424 named: 'named'␊
48965425 });␊
48975426
4898 t.deepEqual(external, {␊
4899 default: 'bar',␊
4900 foo: 'foo'␊
4901 });␊
4902 `,
4903 }
4904
4905 ## transpiled-esm-namespace-named
4906
4907 > Snapshot 1
4908
4909 {
4910 'main.js': `'use strict';␊
4911
4912 var external = require('external-esm-named');␊
4913
4914 function getDefaultExportFromCjs (x) {␊
4915 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;␊
4916 }␊
4917
4918 function createCommonjsModule(fn, basedir, module) {␊
4919 return module = {␊
4920 path: basedir,␊
4921 exports: {},␊
4922 require: function (path, base) {␊
4923 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4924 }␊
4925 }, fn(module, module.exports), module.exports;␊
4926 }␊
4927
4928 function commonjsRequire () {␊
4929 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4930 }␊
4931
4932 var dep = createCommonjsModule(function (module, exports) {␊
4933 Object.defineProperty(exports, '__esModule', { value: true });␊
4934 exports.named = 'named';␊
4935 });␊
4936
4937 var dep$1 = /*@__PURE__*/getDefaultExportFromCjs(dep);␊
4938
4939 var dep$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), dep, {␊
4940 'default': dep$1␊
4941 }));␊
4942
4943 t.deepEqual(dep$2, {␊
4944 named: 'named',␊
4945 // Technically, this should ideally not exist, or if we cannot avoid it due␊
4946 // to runtime default export detection, it should probably be undefined. We␊
4947 // return the namespace instead as this will fix␊
4948 // rollup/rollup-plugin-commonjs#224 until the remaining Rollup interop has␊
4949 // been updated␊
4950 default: { named: 'named' }␊
4951 });␊
4952
4953 t.deepEqual(external, {␊
4954 foo: 'foo'␊
4955 });␊
5427 // eslint-disable-next-line no-prototype-builtins␊
5428 t.is(dep.hasOwnProperty('named'), true);␊
5429
5430 var main = {␊
5431
5432 };␊
5433
5434 module.exports = main;␊
5435 `,
5436 }
5437
5438 ## transpiled-esm-transpiled-importer
5439
5440 > Snapshot 1
5441
5442 {
5443 'main.js': `'use strict';␊
5444
5445 var _default = 'default';␊
5446
5447 var dep = /*#__PURE__*/Object.defineProperty({␊
5448 default: _default␊
5449 }, '__esModule', {value: true});␊
5450
5451 function _interopDefault$1(e) {␊
5452 return e && e.__esModule ? e : { default: e };␊
5453 }␊
5454
5455 t.is(dep.__esModule, true);␊
5456 const dep__default = /* #__PURE__*/ _interopDefault$1(dep);␊
5457 t.is(dep__default.default, 'default');␊
5458
5459 var main = {␊
5460
5461 };␊
5462
5463 module.exports = main;␊
49565464 `,
49575465 }
49585466
49635471 {
49645472 'main.js': `'use strict';␊
49655473
4966 function createCommonjsModule(fn, basedir, module) {␊
4967 return module = {␊
4968 path: basedir,␊
4969 exports: {},␊
4970 require: function (path, base) {␊
4971 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
4972 }␊
4973 }, fn(module, module.exports), module.exports;␊
4974 }␊
4975
4976 function commonjsRequire () {␊
4977 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
4978 }␊
4979
4980 var foo = createCommonjsModule(function (module) {␊
4981 if (typeof module.require === 'function' && module.require) {␊
4982 module.exports = 1;␊
4983 } else {␊
4984 module.exports = 2;␊
4985 }␊
4986 });␊
4987
4988 t.is(foo, 1);␊
4989 `,
4990 }
4991
4992 ## typeof-require
4993
4994 > Snapshot 1
4995
4996 {
4997 'main.js': `'use strict';␊
4998
4999 function createCommonjsModule(fn, basedir, module) {␊
5000 return module = {␊
5001 path: basedir,␊
5002 exports: {},␊
5003 require: function (path, base) {␊
5004 return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);␊
5005 }␊
5006 }, fn(module, module.exports), module.exports;␊
5007 }␊
5008
5009 function commonjsRequire () {␊
5010 throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');␊
5474 function createCommonjsModule(fn) {␊
5475 var module = { exports: {} };␊
5476 return fn(module, module.exports), module.exports;␊
5477 }␊
5478
5479 function commonjsRequire (target) {␊
5480 throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');␊
50115481 }␊
50125482
50135483 var foo = createCommonjsModule(function (module) {␊
50215491 t.is(foo, 1);␊
50225492 `,
50235493 }
5494
5495 ## typeof-require
5496
5497 > Snapshot 1
5498
5499 {
5500 'main.js': `'use strict';␊
5501
5502 function createCommonjsModule(fn) {␊
5503 var module = { exports: {} };␊
5504 return fn(module, module.exports), module.exports;␊
5505 }␊
5506
5507 function commonjsRequire (target) {␊
5508 throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');␊
5509 }␊
5510
5511 var foo = createCommonjsModule(function (module) {␊
5512 if (typeof commonjsRequire === 'function' && commonjsRequire) {␊
5513 module.exports = 1;␊
5514 } else {␊
5515 module.exports = 2;␊
5516 }␊
5517 });␊
5518
5519 t.is(foo, 1);␊
5520 `,
5521 }
5522
5523 ## unresolved-dependencies
5524
5525 > Snapshot 1
5526
5527 {
5528 'main.js': `'use strict';␊
5529
5530 var path = require('path');␊
5531
5532 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }␊
5533
5534 var path__default = /*#__PURE__*/_interopDefaultLegacy(path);␊
5535
5536 t.is(typeof path__default['default'].resolve, 'function');␊
5537
5538 var main = {␊
5539
5540 };␊
5541
5542 module.exports = main;␊
5543 `,
5544 }
5545
5546 ## unsupported-dynamic-require
5547
5548 > Snapshot 1
5549
5550 {
5551 'main.js': `'use strict';␊
5552
5553 function commonjsRequire (target) {␊
5554 throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');␊
5555 }␊
5556
5557 t.throws(() => commonjsRequire(getRequireTarget()), {␊
5558 message:␊
5559 'Could not dynamically require "foo-bar". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.'␊
5560 });␊
5561
5562 function getRequireTarget() {␊
5563 return 'foo-bar';␊
5564 }␊
5565
5566 var main = {␊
5567
5568 };␊
5569
5570 module.exports = main;␊
5571 `,
5572 }
00 /* eslint-disable line-comment-position, no-new-func, no-undefined */
11 import * as path from 'path';
22
3 import resolve from '@rollup/plugin-node-resolve';
4
35 import test from 'ava';
6 import { getLocator } from 'locate-character';
7 import { rollup } from 'rollup';
48 import { SourceMapConsumer } from 'source-map';
59 import { install } from 'source-map-support';
6 import { getLocator } from 'locate-character';
7 import { rollup } from 'rollup';
8 import resolve from '@rollup/plugin-node-resolve';
910
1011 import { testBundle } from '../../../util/test';
12 import { peerDependencies } from '../package.json';
1113
1214 import { commonjs, executeBundle, getCodeFromBundle } from './helpers/util';
1315
1416 install();
1517
1618 process.chdir(__dirname);
19
20 test('Rollup peer dependency has correct format', (t) => {
21 t.regex(peerDependencies.rollup, /^\^\d+\.\d+\.\d+(\|\|\^\d+\.\d+\.\d+)*$/);
22 });
1723
1824 // most of these should be moved over to function...
1925 test('generates a sourcemap', async (t) => {
276282 test('typeof transforms: protobuf', async (t) => {
277283 const bundle = await rollup({
278284 input: 'fixtures/samples/umd/protobuf.js',
279 external: ['bytebuffer'],
285 external: ['bytebuffer', 'foo'],
280286 plugins: [commonjs()]
281287 });
282288
314320 plugins: [commonjs()]
315321 });
316322
317 const reservedProp = (await executeBundle(bundle, t)).exports.delete;
323 const reservedProp = (await executeBundle(bundle, t, { exports: 'named' })).exports.delete;
318324 t.is(reservedProp, 'foo');
319325 });
320326
664670 const code = await getCodeFromBundle(bundle);
665671 t.snapshot(code);
666672 });
673
674 test('registers dynamic requires when entry is from a different loader', async (t) => {
675 const bundle = await rollup({
676 input: 'fixtures/samples/dynamic-require-different-loader/main.js',
677 plugins: [
678 {
679 load(id) {
680 if (id === path.resolve('fixtures/samples/dynamic-require-different-loader/main.js')) {
681 return 'import submodule1 from "./submodule1"; export default submodule1();';
682 }
683 return null;
684 }
685 },
686 commonjs({
687 dynamicRequireTargets: ['fixtures/samples/dynamic-require-different-loader/submodule2.js'],
688 transformMixedEsModules: true
689 })
690 ]
691 });
692
693 t.is((await executeBundle(bundle, t)).exports, 'Hello there');
694 });
695
696 test('transforms the es file with a `commonjsRequire` and no `require`s', async (t) => {
697 const bundle = await rollup({
698 input: 'fixtures/samples/dynamic-require-es-mixed-helpers/main.js',
699 plugins: [
700 commonjs({
701 dynamicRequireTargets: ['fixtures/samples/dynamic-require-es-mixed-helpers/submodule.js'],
702 transformMixedEsModules: true
703 })
704 ]
705 });
706
707 const code = await getCodeFromBundle(bundle);
708
709 t.is(/commonjsRequire\(["']\.\/submodule\.js/.test(code), true);
710 });
711
712 test('does not wrap commonjsRegister calls in createCommonjsModule', async (t) => {
713 const bundle = await rollup({
714 input: 'fixtures/samples/dynamic-require-double-wrap/main.js',
715 plugins: [
716 commonjs({
717 sourceMap: true,
718 dynamicRequireTargets: ['fixtures/samples/dynamic-require-double-wrap/submodule.js']
719 })
720 ]
721 });
722
723 const code = await getCodeFromBundle(bundle, { exports: 'named' });
724
725 t.not(/createCommonjsModule\(function/.test(code), true);
726 });
727
728 // This test uses worker threads to simulate an empty internal cache and needs at least Node 12
729 if (Number(/^v(\d+)/.exec(process.version)[1]) >= 12) {
730 test('can be cached across instances', async (t) => {
731 const bundle = await rollup({
732 input: 'fixtures/samples/caching/main.js',
733 plugins: [commonjs()]
734 });
735 const { cache } = bundle;
736 const code = await getCodeFromBundle(bundle);
737
738 // We do a second run in a worker so that all internal state is cleared
739 const { Worker } = await import('worker_threads');
740 const getRollupUpCodeWithCache = new Worker(
741 path.join(__dirname, 'fixtures/samples/caching/rollupWorker.js'),
742 {
743 workerData: cache
744 }
745 );
746
747 t.is(code, await new Promise((done) => getRollupUpCodeWithCache.on('message', done)));
748 });
749 }
+0
-13
packages/data-uri/CHANGELOG.md less more
0 # @rollup/plugin-data-uri ChangeLog
1
2 ## v0.1.1
3
4 _2020-04-12_
5
6 ### Updates
7
8 - chore: Use typechecking (e8a9063)
9
10 ## 0.1.0
11
12 - First Release
+0
-74
packages/data-uri/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-data-uri
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-data-uri
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-data-uri
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-data-uri
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-data-uri
10
11 🍣 A Rollup plugin which imports modules from Data URIs.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-data-uri --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import dataUri from '@rollup/plugin-data-uri';
31
32 module.exports = {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [dataUri()]
39 };
40 ```
41
42 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). If the build produces any errors, the plugin will write a "data-uri" character to stderr, which should be audible on most systems.
43
44 ## Options
45
46 This plugin currently has no available options.
47
48 ## Supported MIME Types
49
50 The following MIME types are supported by this plugin:
51
52 - `text/javascript`
53 - `application/json`
54
55 This mirrors support in the [latest version of Node.js](https://nodejs.org/api/esm.html#esm_data_imports), with the exception of WebAssembly support.
56
57 ## Base64 Encoding
58
59 Base64 encoding is supported for well-formed `data:` URIs. For example:
60
61 ```js
62 import batman from 'data:application/json;base64, eyAiYmF0bWFuIjogInRydWUiIH0=';
63 ```
64
65 ## Dynamic Imports
66
67 Dynamic imports, such as `import('data:application/json, { "batman": "true" }')`, aren't supported by this plugin. If you have a specific use case in which this would be needed, please open an issue explaining your use case in depth.
68
69 ## Meta
70
71 [CONTRIBUTING](/.github/CONTRIBUTING.md)
72
73 [LICENSE (MIT)](/LICENSE)
+0
-75
packages/data-uri/package.json less more
0 {
1 "name": "@rollup/plugin-data-uri",
2 "version": "0.1.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Import modules from Data URIs",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "shellscape",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/data-uri",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">= 8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepublishOnly": "pnpm run lint && pnpm run build",
29 "pretest": "pnpm run build -- --sourcemap",
30 "test": "ava"
31 },
32 "files": [
33 "dist",
34 "types",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "data",
40 "data-uri",
41 "data-url",
42 "plugin",
43 "rollup",
44 "uri",
45 "url"
46 ],
47 "peerDependencies": {
48 "rollup": "^1.20.0||^2.0.0"
49 },
50 "devDependencies": {
51 "@rollup/plugin-typescript": "^5.0.2",
52 "@rollup/pluginutils": "^3.0.1",
53 "rollup": "^2.23.0"
54 },
55 "types": "types/index.d.ts",
56 "ava": {
57 "babel": {
58 "compileEnhancements": false
59 },
60 "extensions": [
61 "ts"
62 ],
63 "require": [
64 "ts-node/register"
65 ],
66 "files": [
67 "!**/fixtures/**",
68 "!**/output/**",
69 "!**/helpers/**",
70 "!**/recipes/**",
71 "!**/types.ts"
72 ]
73 }
74 }
+0
-13
packages/data-uri/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.ts',
6 plugins: [typescript()],
7 external: [...Object.keys(pkg.devDependencies), 'url'],
8 output: [
9 { format: 'cjs', file: pkg.main, sourcemap: true, exports: 'auto' },
10 { format: 'esm', file: pkg.module, sourcemap: true }
11 ]
12 };
+0
-86
packages/data-uri/src/index.ts less more
0 import { URL } from 'url';
1
2 import { Plugin, RollupError } from 'rollup';
3
4 import { dataToEsm } from '@rollup/pluginutils';
5
6 const reDataUri = /^([^/]+\/[^;,]+)(;base64)?,([\s\S]*)$/;
7 const mimeTypes = {
8 js: 'text/javascript',
9 json: 'application/json'
10 };
11
12 export default function dataUri(): Plugin {
13 const resolved: { [key: string]: { mime: string | null; content: string | null } } = {};
14
15 return {
16 name: 'dataUri',
17
18 resolveId(id) {
19 if (resolved[id]) {
20 return id;
21 }
22
23 if (!reDataUri.test(id)) {
24 return null;
25 }
26
27 const uri = new URL(id);
28
29 if (uri.protocol !== 'data:') {
30 return null;
31 }
32
33 const empty = [null, null, null, null, null];
34 const [, mime, format, data] = reDataUri.exec(uri.pathname) || empty;
35
36 if (Object.values(mimeTypes).includes(mime as string) && data) {
37 const base64 = format && /base64/i.test(format.substring(1));
38 const content = base64 ? Buffer.from(data, 'base64').toString('utf-8') : data;
39
40 resolved[id] = { mime, content };
41
42 return id;
43 }
44
45 return null;
46 },
47
48 load(id) {
49 if (!resolved[id]) {
50 return null;
51 }
52
53 const { mime, content } = resolved[id];
54
55 if (!content) {
56 return null;
57 }
58
59 if (mime === 'text/javascript') {
60 return content;
61 } else if (mime === 'application/json') {
62 let json = '';
63 try {
64 json = JSON.parse(content);
65 } catch (e) {
66 const error: RollupError = {
67 message: e.toString(),
68 parserError: e,
69 plugin: '@rollup/plugin-data-uri',
70 pluginCode: 'DU$JSON'
71 };
72 this.error(error);
73 }
74
75 return dataToEsm(json, {
76 preferConst: true,
77 compact: false,
78 namedExports: true,
79 indent: ' '
80 });
81 }
82 return null;
83 }
84 };
85 }
+0
-9
packages/data-uri/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": true
3 },
4 "rules": {
5 "import/extensions": "off",
6 "import/no-unresolved": "off"
7 }
8 }
+0
-1
packages/data-uri/test/fixtures/bad-json.js less more
0 import 'data:application/json, { "batman": }';
+0
-4
packages/data-uri/test/fixtures/base64.js less more
0 import batman from 'data:application/json;base64, eyAiYmF0bWFuIjogInRydWUiIH0=';
1
2 t.truthy(batman.batman);
3 t.snapshot(batman);
+0
-4
packages/data-uri/test/fixtures/import.js less more
0 import 'data:text/javascript, t.truthy(true);';
1 import { batman } from 'data:text/javascript, export const batman = true;\nconst joker = false;\nexport default joker;';
2
3 t.snapshot(batman);
+0
-4
packages/data-uri/test/fixtures/json.js less more
0 import batman from 'data:application/json, { "batman": "true" }';
1
2 t.truthy(batman.batman);
3 t.snapshot(batman);
+0
-74
packages/data-uri/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## bad json
7
8 > Snapshot 1
9
10 {
11 code: 'PLUGIN_ERROR',
12 plugin: 'dataUri',
13 pluginCode: 'DU$JSON',
14 }
15
16 ## import
17
18 > Snapshot 1
19
20 true
21
22 > Snapshot 2
23
24 `'use strict';␊
25
26 t.truthy(true);␊
27
28 const batman = true;␊
29
30 t.snapshot(batman);␊
31 `
32
33 ## json
34
35 > Snapshot 1
36
37 {
38 batman: 'true',
39 }
40
41 > Snapshot 2
42
43 `'use strict';␊
44
45 const batman = "true";␊
46 var batman$1 = {␊
47 batman: batman␊
48 };␊
49
50 t.truthy(batman$1.batman);␊
51 t.snapshot(batman$1);␊
52 `
53
54 ## base64
55
56 > Snapshot 1
57
58 {
59 batman: 'true',
60 }
61
62 > Snapshot 2
63
64 `'use strict';␊
65
66 const batman = "true";␊
67 var batman$1 = {␊
68 batman: batman␊
69 };␊
70
71 t.truthy(batman$1.batman);␊
72 t.snapshot(batman$1);␊
73 `
packages/data-uri/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-53
packages/data-uri/test/snapshots/test.ts.md less more
0 # Snapshot report for `test/test.ts`
1
2 The actual snapshot is saved in `test.ts.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## bad json
7
8 > Snapshot 1
9
10 {
11 code: 'PLUGIN_ERROR',
12 plugin: 'dataUri',
13 pluginCode: 'DU$JSON',
14 }
15
16 ## import
17
18 > Snapshot 1
19
20 true
21
22 > Snapshot 2
23
24 `'use strict';␊
25
26 t.truthy(true);␊
27
28 const batman = true;␊
29
30 t.snapshot(batman);␊
31 `
32
33 ## json
34
35 > Snapshot 1
36
37 {
38 batman: 'true',
39 }
40
41 > Snapshot 2
42
43 `'use strict';␊
44
45 const batman = "true";␊
46 var batman$1 = {␊
47 batman: batman␊
48 };␊
49
50 t.truthy(batman$1.batman);␊
51 t.snapshot(batman$1);␊
52 `
packages/data-uri/test/snapshots/test.ts.snap less more
Binary diff not shown
+0
-51
packages/data-uri/test/test.js less more
0 import { join } from 'path';
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4
5 import { testBundle } from '../../../util/test';
6
7 // eslint-disable-next-line import/no-unresolved, import/extensions
8 import dataUri from '../';
9
10 process.chdir(join(__dirname, 'fixtures'));
11
12 test('json', async (t) => {
13 t.plan(3);
14 const bundle = await rollup({
15 input: 'json.js',
16 plugins: [dataUri()]
17 });
18 const { code } = await testBundle(t, bundle);
19 t.snapshot(code);
20 });
21
22 test('import', async (t) => {
23 t.plan(3);
24 const bundle = await rollup({
25 input: 'import.js',
26 plugins: [dataUri()]
27 });
28 const { code } = await testBundle(t, bundle);
29 t.snapshot(code);
30 });
31
32 test('bad json', async (t) => {
33 const fn = () =>
34 rollup({
35 input: 'bad-json.js',
36 plugins: [dataUri()]
37 });
38 const { code, plugin, pluginCode } = await t.throwsAsync(fn);
39 t.snapshot({ code, plugin, pluginCode });
40 });
41
42 test('base64', async (t) => {
43 t.plan(3);
44 const bundle = await rollup({
45 input: 'base64.js',
46 plugins: [dataUri()]
47 });
48 const { code } = await testBundle(t, bundle);
49 t.snapshot(code);
50 });
+0
-12
packages/data-uri/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "compilerOptions": {
3 "lib": ["es6", "dom"],
4 "esModuleInterop": true
5 },
6 "include": [
7 "src/**/*",
8 "types/**/*"
9 ],
10 "exclude": ["test/fixtures/*.*"]
11 }
+0
-6
packages/data-uri/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 /**
3 * A Rollup plugin which imports modules from Data URIs.
4 */
5 export default function dataUri(): Plugin;
+0
-33
packages/dsv/CHANGELOG.md less more
0 # @rollup/plugin-dsv ChangeLog
1
2 ## v2.0.1
3
4 _2020-02-01_
5
6 ### Updates
7
8 - chore: update dependencies (8d0eb41)
9
10 ## 1.2.0
11
12 - Pass `id` to `processRow`
13
14 ## 1.1.2
15
16 - Return a `name`
17
18 ## 1.1.1
19
20 - Add missing dependencies
21
22 ## 1.1.0
23
24 - Support `options.processRow`
25
26 ## 1.0.1
27
28 - Include correct files in package
29
30 ## 1.0.0
31
32 - First release
+0
-97
packages/dsv/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-dsv
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-dsv
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-dsv
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-dsv
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-dsv
10
11 🍣 A Rollup plugin which converts `.csv` and `.tsv` files into JavaScript modules with [d3-dsv](https://github.com/d3/d3-dsv).
12
13 WebAssembly Modules are imported asynchronous as base64 strings. Small modules [can be imported synchronously](#synchronous-modules).
14
15 ## Requirements
16
17 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
18
19 ## Install
20
21 Using npm:
22
23 ```console
24 npm install @rollup/plugin-dsv --save-dev
25 ```
26
27 ## Usage
28
29 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
30
31 ```js
32 import dsv from '@rollup/plugin-dsv';
33
34 export default {
35 input: 'src/index.js',
36 output: {
37 dir: 'output',
38 format: 'cjs'
39 },
40 plugins: [dsv()]
41 };
42 ```
43
44 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).
45
46 ## Practical Example
47
48 Suppose that you have a CSV (or TSV!) file which contains some information on delicious fruits:
49
50 ```csv
51 type,count
52 apples,7
53 pears,4
54 bananas,5
55 ```
56
57 And suppose you'd like to import that CSV as an `Array` within some part of your code. After adding the plugin (as shown above), you may `import` (or `require`) the CSV file directly. The import will provide an `Array` of `Objects` representing rows from the CSV file:
58
59 ```js
60 import fruit from './fruit.csv';
61
62 console.log(fruit);
63 // [
64 // { type: 'apples', count: '7' },
65 // { type: 'pears', count: '4' },
66 // { type: 'bananas', count: '5' }
67 // ]
68 ```
69
70 ## Options
71
72 ### `processRow`
73
74 Type: `Function`<br>
75 Default: `null`
76
77 Specifies a function which processes each row in the parsed array. The function can either manipulate the passed `row`, or return an entirely new row object.
78
79 This option could be used for converting numeric `string` values into `Number` values. – for example turning numeric values into numbers, e.g.
80
81 ```js
82 dsv({
83 processRow: (row, id) => {
84 Object.keys(row).forEach(key => {
85 var value = row[key];
86 row[key] = isNaN(+value) ? value : +value;
87 });
88 }
89 });
90 ```
91
92 ## Meta
93
94 [CONTRIBUTING](./.github/CONTRIBUTING.md)
95
96 [LICENSE (MIT)](./LICENSE)
+0
-56
packages/dsv/package.json less more
0 {
1 "name": "@rollup/plugin-dsv",
2 "version": "2.0.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Convert .csv and .tsv files into JavaScript modules with d3-dsv",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/dsv#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "prebuild": "del-cli dist",
25 "prepare": "pnpm run build",
26 "prepublishOnly": "pnpm run lint",
27 "pretest": "pnpm run build",
28 "test": "ava"
29 },
30 "files": [
31 "dist",
32 "README.md",
33 "LICENSE"
34 ],
35 "dependencies": {
36 "@rollup/pluginutils": "^3.1.0",
37 "d3-dsv": "1.2.0",
38 "tosource": "^1.0.0"
39 },
40 "devDependencies": {
41 "del-cli": "^3.0.1",
42 "rollup": "^2.23.0"
43 },
44 "ava": {
45 "babel": {
46 "compileEnhancements": false
47 },
48 "files": [
49 "!**/fixtures/**",
50 "!**/helpers/**",
51 "!**/recipes/**",
52 "!**/types.ts"
53 ]
54 }
55 }
+0
-10
packages/dsv/rollup.config.js less more
0 import pkg from './package.json';
1
2 export default {
3 input: 'src/index.js',
4 external: [...Object.keys(pkg.dependencies), 'path'],
5 output: [
6 { file: pkg.main, format: 'cjs', exports: 'auto' },
7 { file: pkg.module, format: 'es' }
8 ]
9 };
+0
-33
packages/dsv/src/index.js less more
0 import { extname } from 'path';
1
2 import { csvParse, tsvParse } from 'd3-dsv';
3 import toSource from 'tosource';
4 import { createFilter } from '@rollup/pluginutils';
5
6 const parsers = { '.csv': csvParse, '.tsv': tsvParse };
7
8 export default function dsv(options = {}) {
9 const filter = createFilter(options.include, options.exclude);
10
11 return {
12 name: 'dsv',
13
14 transform(code, id) {
15 if (!filter(id)) return null;
16
17 const ext = extname(id);
18 if (!(ext in parsers)) return null;
19
20 let rows = parsers[ext](code);
21
22 if (options.processRow) {
23 rows = rows.map((row) => options.processRow(row, id) || row);
24 }
25
26 return {
27 code: `export default ${toSource(rows)};`,
28 map: { mappings: '' }
29 };
30 }
31 };
32 }
+0
-5
packages/dsv/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly"
3 }
4 }
+0
-4
packages/dsv/test/fixtures/basic-csv/fruit.csv less more
0 type,count
1 apples,7
2 pears,4
3 bananas,5
+0
-7
packages/dsv/test/fixtures/basic-csv/main.js less more
0 import fruit from './fruit.csv';
1
2 t.deepEqual(fruit, [
3 { type: 'apples', count: '7' },
4 { type: 'pears', count: '4' },
5 { type: 'bananas', count: '5' }
6 ]);
+0
-4
packages/dsv/test/fixtures/basic-tsv/fruit.tsv less more
0 type count
1 apples 7
2 pears 4
3 bananas 5
+0
-7
packages/dsv/test/fixtures/basic-tsv/main.js less more
0 import fruit from './fruit.tsv';
1
2 t.deepEqual(fruit, [
3 { type: 'apples', count: '7' },
4 { type: 'pears', count: '4' },
5 { type: 'bananas', count: '5' }
6 ]);
+0
-4
packages/dsv/test/fixtures/process/fruit.csv less more
0 type,count
1 apples,7
2 pears,4
3 bananas,5
+0
-7
packages/dsv/test/fixtures/process/main.js less more
0 import fruit from './fruit.csv';
1
2 t.deepEqual(fruit, [
3 { type: 'apples', count: 7 },
4 { type: 'pears', count: 4 },
5 { type: 'bananas', count: 5 }
6 ]);
+0
-4
packages/dsv/test/fixtures/process-id/lower.csv less more
0 type,count
1 Apples,7
2 Pears,4
3 Bananas,5
+0
-14
packages/dsv/test/fixtures/process-id/main.js less more
0 import lower from './lower.csv';
1 import upper from './upper.csv';
2
3 t.deepEqual(lower, [
4 { type: 'apples', count: 7 },
5 { type: 'pears', count: 4 },
6 { type: 'bananas', count: 5 }
7 ]);
8
9 t.deepEqual(upper, [
10 { type: 'APPLES', count: 7 },
11 { type: 'PEARS', count: 4 },
12 { type: 'BANANAS', count: 5 }
13 ]);
+0
-4
packages/dsv/test/fixtures/process-id/upper.csv less more
0 type,count
1 Apples,7
2 Pears,4
3 Bananas,5
+0
-69
packages/dsv/test/test.js less more
0 const test = require('ava');
1 const { rollup } = require('rollup');
2
3 const dsv = require('..');
4
5 process.chdir(__dirname);
6
7 const testBundle = async (t, bundle) => {
8 const { output } = await bundle.generate({ format: 'cjs' });
9 const [{ code }] = output;
10 const func = new Function('t', code); // eslint-disable-line no-new-func
11
12 return func(t);
13 };
14
15 test('converts a csv file', async (t) => {
16 const bundle = await rollup({
17 input: 'fixtures/basic-csv/main.js',
18 plugins: [dsv()]
19 });
20 t.plan(1);
21 return testBundle(t, bundle);
22 });
23
24 test('converts a tsv file', async (t) => {
25 const bundle = await rollup({
26 input: 'fixtures/basic-tsv/main.js',
27 plugins: [dsv()]
28 });
29 t.plan(1);
30 return testBundle(t, bundle);
31 });
32
33 test('uses a custom processor', async (t) => {
34 const parse = (value) => (isNaN(+value) ? value : +value);
35
36 const bundle = await rollup({
37 input: 'fixtures/process/main.js',
38 plugins: [
39 dsv({
40 processRow(row) {
41 Object.keys(row).forEach((key) => {
42 row[key] = parse(row[key]); // eslint-disable-line no-param-reassign
43 });
44 }
45 })
46 ]
47 });
48 t.plan(1);
49 return testBundle(t, bundle);
50 });
51
52 test('uses a custom processor with id', async (t) => {
53 const bundle = await rollup({
54 input: 'fixtures/process-id/main.js',
55 plugins: [
56 dsv({
57 processRow(row, id) {
58 return {
59 type: row.type[/lower/.test(id) ? 'toLowerCase' : 'toUpperCase'](),
60 count: +row.count
61 };
62 }
63 })
64 ]
65 });
66 t.plan(2);
67 return testBundle(t, bundle);
68 });
+0
-19
packages/dynamic-import-vars/CHANGELOG.md less more
0 # @rollup/plugin-dynamic-import-vars ChangeLog
1
2 ## v1.1.0
3
4 _2020-08-13_
5
6 ### Features
7
8 - feat: add support for dynamic expressions with concat (#495)
9
10 ### Updates
11
12 - chore: update dependencies (26f9b6c)
13
14 ## v1.0.0
15
16 _2020-07-06_
17
18 - First release
+0
-207
packages/dynamic-import-vars/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-dynamic-import-vars
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-dynamic-import-vars
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-dynamic-import-vars
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-dynamic-import-vars
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-dynamic-import-vars
10
11 🍣 A rollup plugin to support variables in dynamic imports in Rollup.
12
13 ```js
14 function importLocale(locale) {
15 return import(`./locales/${locale}.js`);
16 }
17 ```
18
19 ## Requirements
20
21 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Rollup v1.20.0+.
22
23 ## Install
24
25 Using npm:
26
27 ```bash
28 npm install @rollup/plugin-dynamic-import-vars --save-dev
29 ```
30
31 ## Usage
32
33 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
34
35 ```js
36 import dynamicImportVars from 'rollup/plugin-dynamic-import-vars';
37
38 export default {
39 plugins: [
40 dynamicImportVars({
41 // options
42 })
43 ]
44 };
45 ```
46
47 ### Options
48
49 #### `include`
50
51 Type: `String` | `Array[...String]`<br>
52 Default: `[]`
53
54 Files to include in this plugin (default all).
55
56 #### `exclude`
57
58 Type: `String` | `Array[...String]`<br>
59 Default: `[]`
60
61 Files to exclude in this plugin (default none).
62
63 #### `warnOnError`
64
65 Type: `Boolean`<br>
66 Default: `false`
67
68 By default, the plugin quits the build process when it encounters an error. If you set this option to true, it will throw a warning instead and leave the code untouched.
69
70 ## How it works
71
72 When a dynamic import contains a concatenated string, the variables of the string are replaced with a glob pattern. This glob pattern is evaluated during the build, and any files found are added to the rollup bundle. At runtime, the correct import is returned for the full concatenated string.
73
74 Some example patterns and the glob they produce:
75
76 ```js
77 `./locales/${locale}.js` -> './locales/*.js'
78 ```
79
80 ```js
81 `./${folder}/${name}.js` -> './*/*.js'
82 ```
83
84 ```js
85 `./module-${name}.js` -> './module-*.js'
86 ```
87
88 ```js
89 `./modules-${name}/index.js` -> './modules-*/index.js'
90 ```
91
92 ```js
93 './locales/' + locale + '.js' -> './locales/*.js'
94 ```
95
96 ```js
97 './locales/' + locale + foo + bar '.js' -> './locales/*.js'
98 ```
99
100 ```js
101 './locales/' + `${locale}.js` -> './locales/*.js'
102 ```
103
104 ```js
105 './locales/' + `${foo + bar}.js` -> './locales/*.js'
106 ```
107
108 ```js
109 './locales/'.concat(locale, '.js') -> './locales/*.js'
110 ```
111
112 ```js
113 './'.concat(folder, '/').concat(name, '.js') -> './*/*.js'
114 ```
115
116 Code that looks like this:
117
118 ```js
119 function importLocale(locale) {
120 return import(`./locales/${locale}.js`);
121 }
122 ```
123
124 Is turned into:
125
126 ```js
127 function __variableDynamicImportRuntime__(path) {
128 switch (path) {
129 case './locales/en-GB.js':
130 return import('./locales/en-GB.js');
131 case './locales/en-US.js':
132 return import('./locales/en-US.js');
133 case './locales/nl-NL.js':
134 return import('./locales/nl-NL.js');
135 default:
136 throw new Error('Unknown variable dynamic import: ' + path);
137 }
138 }
139
140 function importLocale(locale) {
141 return __variableDynamicImportRuntime__(`./locales/${locale}.js`);
142 }
143 ```
144
145 ## Limitations
146
147 To know what to inject in the rollup bundle, we have to be able to do some static analysis on the code and make some assumptions about the possible imports. For example, if you use just a variable you could in theory import anything from your entire file system.
148
149 ```js
150 function importModule(path) {
151 // who knows what will be imported here?
152 return import(path);
153 }
154 ```
155
156 To help static analysis, and to avoid possible foot guns, we are limited to a couple of rules:
157
158 ### Imports must start with `./` or `../`.
159
160 All imports must start relative to the importing file. The import should not start with a variable, an absolute path or a bare import:
161
162 ```js
163 // Not allowed
164 import(bar);
165 import(`${bar}.js`);
166 import(`/foo/${bar}.js`);
167 import(`some-library/${bar}.js`);
168 ```
169
170 ### Imports must end with a file extension
171
172 A folder may contain files you don't intend to import. We, therefore, require imports to end with a file extension in the static parts of the import.
173
174 ```js
175 // Not allowed
176 import(`./foo/${bar}`);
177 // allowed
178 import(`./foo/${bar}.js`);
179 ```
180
181 ### Imports to your own directory must specify a filename pattern
182
183 If you import your own directory you likely end up with files you did not intend to import, including your own module. It is therefore required to give a more specific filename pattern:
184
185 ```js
186 // not allowed
187 import(`./${foo}.js`);
188 // allowed
189 import(`./module-${foo}.js`);
190 ```
191
192 ### Globs only go one level deep
193
194 When generating globs, each variable in the string is converted to a glob `*` with a maximum of one star per directory depth. This avoids unintentionally adding files from many directories to your import.
195
196 In the example below this generates `./foo/*/*.js` and not `./foo/**/*.js`.
197
198 ```js
199 import(`./foo/${x}${y}/${z}.js`);
200 ```
201
202 ## Meta
203
204 [CONTRIBUTING](/.github/CONTRIBUTING.md)
205
206 [LICENSE (MIT)](/LICENSE)
+0
-74
packages/dynamic-import-vars/package.json less more
0 {
1 "name": "@rollup/plugin-dynamic-import-vars",
2 "version": "1.1.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Resolving dynamic imports that contain variables.",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "LarsDenBakker",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">= 10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepublishOnly": "pnpm run lint && pnpm run build",
29 "pretest": "pnpm run build -- --sourcemap",
30 "test": "ava"
31 },
32 "files": [
33 "dist",
34 "types",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "dynamic import",
42 "variable",
43 "variables",
44 "glob",
45 "string",
46 "concatenation",
47 "interpolation"
48 ],
49 "peerDependencies": {
50 "rollup": "^1.20.0||^2.0.0"
51 },
52 "dependencies": {
53 "@rollup/pluginutils": "^3.1.0",
54 "estree-walker": "^2.0.1",
55 "globby": "^11.0.1",
56 "magic-string": "^0.25.7"
57 },
58 "devDependencies": {
59 "acorn": "^7.3.1",
60 "acorn-dynamic-import": "^4.0.0",
61 "prettier": "^2.0.5",
62 "rollup": "^2.23.0"
63 },
64 "ava": {
65 "babel": {
66 "compileEnhancements": false
67 },
68 "files": [
69 "!**/fixtures/**",
70 "!**/snapshots/**"
71 ]
72 }
73 }
+0
-10
packages/dynamic-import-vars/rollup.config.js less more
0 import pkg from './package.json';
1
2 export default {
3 input: 'src/index.js',
4 external: [...Object.keys(pkg.dependencies), 'path'],
5 output: [
6 { file: pkg.main, format: 'cjs', exports: 'named' },
7 { file: pkg.module, format: 'es' }
8 ]
9 };
+0
-103
packages/dynamic-import-vars/src/dynamic-import-to-glob.js less more
0 import path from 'path';
1
2 export class VariableDynamicImportError extends Error {}
3
4 /* eslint-disable-next-line no-template-curly-in-string */
5 const example = 'For example: import(`./foo/${bar}.js`).';
6
7 function sanitizeString(str) {
8 if (str.includes('*')) {
9 throw new VariableDynamicImportError('A dynamic import cannot contain * characters.');
10 }
11 return str;
12 }
13
14 function templateLiteralToGlob(node) {
15 let glob = '';
16
17 for (let i = 0; i < node.quasis.length; i += 1) {
18 glob += sanitizeString(node.quasis[i].value.raw);
19 if (node.expressions[i]) {
20 glob += expressionToGlob(node.expressions[i]);
21 }
22 }
23
24 return glob;
25 }
26
27 function callExpressionToGlob(node) {
28 const { callee } = node;
29 if (
30 callee.type === 'MemberExpression' &&
31 callee.property.type === 'Identifier' &&
32 callee.property.name === 'concat'
33 ) {
34 return `${expressionToGlob(callee.object)}${node.arguments.map(expressionToGlob).join('')}`;
35 }
36 return '*';
37 }
38
39 function binaryExpressionToGlob(node) {
40 if (node.operator !== '+') {
41 throw new VariableDynamicImportError(`${node.operator} operator is not supported.`);
42 }
43
44 return `${expressionToGlob(node.left)}${expressionToGlob(node.right)}`;
45 }
46
47 function expressionToGlob(node) {
48 switch (node.type) {
49 case 'TemplateLiteral':
50 return templateLiteralToGlob(node);
51 case 'CallExpression':
52 return callExpressionToGlob(node);
53 case 'BinaryExpression':
54 return binaryExpressionToGlob(node);
55 case 'Literal': {
56 return sanitizeString(node.value);
57 }
58 default:
59 return '*';
60 }
61 }
62
63 export function dynamicImportToGlob(node, sourceString) {
64 let glob = expressionToGlob(node);
65 if (!glob.includes('*')) {
66 return null;
67 }
68 glob = glob.replace(/\*\*/g, '*');
69
70 if (glob.startsWith('*')) {
71 throw new VariableDynamicImportError(
72 `invalid import "${sourceString}". It cannot be statically analyzed. Variable dynamic imports must start with ./ and be limited to a specific directory. ${example}`
73 );
74 }
75
76 if (glob.startsWith('/')) {
77 throw new VariableDynamicImportError(
78 `invalid import "${sourceString}". Variable absolute imports are not supported, imports must start with ./ in the static part of the import. ${example}`
79 );
80 }
81
82 if (!glob.startsWith('./') && !glob.startsWith('../')) {
83 throw new VariableDynamicImportError(
84 `invalid import "${sourceString}". Variable bare imports are not supported, imports must start with ./ in the static part of the import. ${example}`
85 );
86 }
87
88 if (glob.startsWith('./*.')) {
89 throw new VariableDynamicImportError(
90 `${`invalid import "${sourceString}". Variable imports cannot import their own directory, ` +
91 'place imports in a separate directory or make the import filename more specific. '}${example}`
92 );
93 }
94
95 if (path.extname(glob) === '') {
96 throw new VariableDynamicImportError(
97 `invalid import "${sourceString}". A file extension must be included in the static part of the import. ${example}`
98 );
99 }
100
101 return glob;
102 }
+0
-99
packages/dynamic-import-vars/src/index.js less more
0 import path from 'path';
1
2 import { walk } from 'estree-walker';
3 import MagicString from 'magic-string';
4 import globby from 'globby';
5
6 import { createFilter } from '@rollup/pluginutils';
7
8 import { dynamicImportToGlob, VariableDynamicImportError } from './dynamic-import-to-glob';
9
10 function dynamicImportVariables({ include, exclude, warnOnError } = {}) {
11 const filter = createFilter(include, exclude);
12
13 return {
14 name: 'rollup-plugin-dynamic-import-variables',
15
16 transform(code, id) {
17 if (!filter(id)) {
18 return null;
19 }
20
21 const parsed = this.parse(code);
22
23 let dynamicImportIndex = -1;
24 let ms;
25
26 walk(parsed, {
27 enter: (node) => {
28 if (node.type !== 'ImportExpression') {
29 return;
30 }
31 dynamicImportIndex += 1;
32
33 try {
34 // see if this is a variable dynamic import, and generate a glob expression
35 const glob = dynamicImportToGlob(node.source, code.substring(node.start, node.end));
36
37 if (!glob) {
38 // this was not a variable dynamic import
39 return;
40 }
41
42 // execute the glob
43 const result = globby.sync(glob, { cwd: path.dirname(id) });
44 const paths = result.map((r) =>
45 r.startsWith('./') || r.startsWith('../') ? r : `./${r}`
46 );
47
48 // create magic string if it wasn't created already
49 ms = ms || new MagicString(code);
50 // unpack variable dynamic import into a function with import statements per file, rollup
51 // will turn these into chunks automatically
52 ms.prepend(
53 `function __variableDynamicImportRuntime${dynamicImportIndex}__(path) {
54 switch (path) {
55 ${paths.map((p) => ` case '${p}': return import('${p}');`).join('\n ')}
56 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));
57 }
58 }\n\n`
59 );
60 // call the runtime function instead of doing a dynamic import, the import specifier will
61 // be evaluated at runtime and the correct import will be returned by the injected function
62 ms.overwrite(
63 node.start,
64 node.start + 6,
65 `__variableDynamicImportRuntime${dynamicImportIndex}__`
66 );
67 } catch (error) {
68 if (error instanceof VariableDynamicImportError) {
69 // TODO: line number
70 if (warnOnError) {
71 this.warn(error);
72 } else {
73 this.error(error);
74 }
75 } else {
76 this.error(error);
77 }
78 }
79 }
80 });
81
82 if (ms && dynamicImportIndex !== -1) {
83 return {
84 code: ms.toString(),
85 map: ms.generateMap({
86 file: id,
87 includeContent: true,
88 hires: true
89 })
90 };
91 }
92 return null;
93 }
94 };
95 }
96
97 export default dynamicImportVariables;
98 export { dynamicImportToGlob, VariableDynamicImportError };
+0
-11
packages/dynamic-import-vars/test/fixtures/.eslintrc less more
0 {
1 "rules": {
2 "class-methods-use-this": "off",
3 "import/extensions": "off",
4 "import/no-unresolved": "off",
5 "import/prefer-default-export": "off",
6 "line-comment-position": "off",
7 "no-undef": "off",
8 "no-useless-concat": "off"
9 }
10 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-complex-concat.js less more
0 export function importModule(dirName, name) {
1 return import(`${`./${`module-dir-${dirName}`}` + '/'}${name}.js`);
2 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-excluded.js less more
0 export function importModule(name) {
1 return import(`./module-dir-a/${name}.js`);
2 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-extensionless.js less more
0 export function importModule(name) {
1 return import(`./module-dir-a/${name}`);
2 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-multiple-dirs.js less more
0 export function importModule(dir, name) {
1 return import(`./${dir}/${name}.js`);
2 }
+0
-13
packages/dynamic-import-vars/test/fixtures/fixture-multiple-imports.js less more
0 export class Foo {
1 importModule(name) {
2 return import(`./module-dir-a/${name}.js`);
3 }
4 }
5
6 import(`./module-dir-a/${name}.js`).then((module) => {
7 console.log('imported', module);
8 });
9
10 export function importModuleFromDir(dir, name) {
11 return import(`./${dir}/${name}.js`);
12 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-own-dir.js less more
0 export function importModule(name) {
1 return import(`./root-module-${name}.js`);
2 }
+0
-3
packages/dynamic-import-vars/test/fixtures/fixture-single-dir.js less more
0 export function importModule(name) {
1 return import(`./module-dir-a/${name}.js`);
2 }
+0
-9
packages/dynamic-import-vars/test/fixtures/fixture-unchanged.js less more
0 import './module-dir-a/module-a-1';
1
2 export function importModuleA() {
3 return import(`./module-dir-a/module-a-2.js`);
4 }
5
6 export function importModuleB() {
7 return import('./' + 'module-dir-a' + '/' + 'module-a-2' + '.js');
8 }
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/README.md less more
0 <!-- should not be resolved -->
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/foo.css less more
0 /* should not be resolved */
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/module-a-1.js less more
0 console.log('a-1');
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/module-a-2.js less more
0 console.log('a-2');
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/module-a-3.mjs less more
0 console.log("a-2");
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/module-a-4.cjs less more
0 console.log("a-2");
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-a/module-a-5.json less more
0 {}
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-b/module-b-1.js less more
0 console.log('b-1');
+0
-1
packages/dynamic-import-vars/test/fixtures/module-dir-b/module-b-2.js less more
0 console.log('b-2');
+0
-1
packages/dynamic-import-vars/test/fixtures/root-module-a.js less more
0 console.log('root-module-a.js');
+0
-1
packages/dynamic-import-vars/test/fixtures/root-module-b.js less more
0 console.log('root-module-b.js');
+0
-3
packages/dynamic-import-vars/test/fixtures/sub-dir/fixture-upwards-path.js less more
0 export function importModule(name) {
1 return import(`../module-dir-a/${name}.js`);
2 }
+0
-187
packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js less more
0 /* eslint-disable import/no-unresolved */
1
2 const { join } = require('path');
3
4 const test = require('ava');
5 const { rollup } = require('rollup');
6
7 const dynamicImportVars = require('../dist/index').default;
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('single dir', async (t) => {
12 const bundle = await rollup({
13 input: 'fixture-single-dir.js',
14 plugins: [dynamicImportVars()]
15 });
16 const { output } = await bundle.generate({ format: 'es' });
17 const expectedFiles = [
18 require.resolve('./fixtures/fixture-single-dir.js'),
19 require.resolve('./fixtures/module-dir-a/module-a-1.js'),
20 require.resolve('./fixtures/module-dir-a/module-a-2.js')
21 ];
22
23 t.deepEqual(
24 expectedFiles,
25 output.map((o) => o.facadeModuleId)
26 );
27 t.snapshot(output[0].code);
28 });
29
30 test('multiple dirs', async (t) => {
31 const bundle = await rollup({
32 input: 'fixture-multiple-dirs.js',
33 plugins: [dynamicImportVars()]
34 });
35 const { output } = await bundle.generate({ format: 'es' });
36 const expectedFiles = [
37 require.resolve('./fixtures/fixture-multiple-dirs.js'),
38 require.resolve('./fixtures/module-dir-a/module-a-1.js'),
39 require.resolve('./fixtures/module-dir-a/module-a-2.js'),
40 require.resolve('./fixtures/module-dir-b/module-b-1.js'),
41 require.resolve('./fixtures/module-dir-b/module-b-2.js'),
42 require.resolve('./fixtures/sub-dir/fixture-upwards-path.js')
43 ];
44
45 t.deepEqual(
46 expectedFiles,
47 output.map((o) => o.facadeModuleId)
48 );
49 t.snapshot(output[0].code);
50 });
51
52 test('upwards dir path', async (t) => {
53 const bundle = await rollup({
54 input: 'sub-dir/fixture-upwards-path',
55 plugins: [dynamicImportVars()]
56 });
57 const { output } = await bundle.generate({ format: 'es' });
58 const expectedFiles = [
59 require.resolve('./fixtures/sub-dir/fixture-upwards-path.js'),
60 require.resolve('./fixtures/module-dir-a/module-a-1.js'),
61 require.resolve('./fixtures/module-dir-a/module-a-2.js')
62 ];
63
64 t.deepEqual(
65 expectedFiles,
66 output.map((o) => o.facadeModuleId)
67 );
68 t.snapshot(output[0].code);
69 });
70
71 test('complex concatenation', async (t) => {
72 const bundle = await rollup({
73 input: 'fixture-complex-concat.js',
74 plugins: [dynamicImportVars()]
75 });
76 const { output } = await bundle.generate({ format: 'es' });
77 const expectedFiles = [
78 require.resolve('./fixtures/fixture-complex-concat.js'),
79 require.resolve('./fixtures/module-dir-a/module-a-1.js'),
80 require.resolve('./fixtures/module-dir-a/module-a-2.js'),
81 require.resolve('./fixtures/module-dir-b/module-b-1.js'),
82 require.resolve('./fixtures/module-dir-b/module-b-2.js')
83 ];
84
85 t.deepEqual(
86 expectedFiles,
87 output.map((o) => o.facadeModuleId)
88 );
89 t.snapshot(output[0].code);
90 });
91
92 test('own directory', async (t) => {
93 const bundle = await rollup({
94 input: 'fixture-own-dir.js',
95 plugins: [dynamicImportVars()]
96 });
97 const { output } = await bundle.generate({ format: 'es' });
98 const expectedFiles = [
99 require.resolve('./fixtures/fixture-own-dir.js'),
100 require.resolve('./fixtures/root-module-a.js'),
101 require.resolve('./fixtures/root-module-b.js')
102 ];
103
104 t.deepEqual(
105 expectedFiles,
106 output.map((o) => o.facadeModuleId)
107 );
108 t.snapshot(output[0].code);
109 });
110
111 test('multiple dynamic imports', async (t) => {
112 const bundle = await rollup({
113 input: 'fixture-multiple-imports.js',
114 plugins: [dynamicImportVars()]
115 });
116 const { output } = await bundle.generate({ format: 'es' });
117 const expectedFiles = [
118 require.resolve('./fixtures/fixture-multiple-imports.js'),
119 require.resolve('./fixtures/module-dir-a/module-a-1.js'),
120 require.resolve('./fixtures/module-dir-a/module-a-2.js'),
121 require.resolve('./fixtures/module-dir-b/module-b-1.js'),
122 require.resolve('./fixtures/module-dir-b/module-b-2.js'),
123 require.resolve('./fixtures/sub-dir/fixture-upwards-path.js')
124 ];
125
126 t.deepEqual(
127 expectedFiles,
128 output.map((o) => o.facadeModuleId)
129 );
130 t.snapshot(output[0].code);
131 });
132
133 test("doesn't change imports that should not be changed", async (t) => {
134 const bundle = await rollup({
135 input: 'fixture-unchanged.js',
136 plugins: [dynamicImportVars()]
137 });
138 const { output } = await bundle.generate({ format: 'es' });
139 const expectedFiles = [
140 require.resolve('./fixtures/fixture-unchanged.js'),
141 require.resolve('./fixtures/module-dir-a/module-a-2.js')
142 ];
143
144 t.deepEqual(
145 expectedFiles,
146 output.map((o) => o.facadeModuleId)
147 );
148 t.snapshot(output[0].code);
149 });
150
151 test('can exclude files', async (t) => {
152 const bundle = await rollup({
153 input: 'fixture-excluded.js',
154 plugins: [
155 dynamicImportVars({
156 exclude: ['fixture-excluded.js']
157 })
158 ]
159 });
160 const { output } = await bundle.generate({ format: 'es' });
161
162 const expectedFiles = [require.resolve('./fixtures/fixture-excluded.js')];
163
164 t.deepEqual(
165 expectedFiles,
166 output.map((o) => o.facadeModuleId)
167 );
168 t.snapshot(output[0].code);
169 });
170
171 test('throws an error on failure', async (t) => {
172 let thrown;
173 try {
174 await rollup({
175 input: 'fixture-extensionless.js',
176 plugins: [
177 dynamicImportVars({
178 exclude: ['fixture-excluded.js']
179 })
180 ]
181 });
182 } catch (_) {
183 thrown = true;
184 }
185 t.is(thrown, true);
186 });
+0
-181
packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-variables.js.md less more
0 # Snapshot report for `test/rollup-plugin-dynamic-import-variables.js`
1
2 The actual snapshot is saved in `rollup-plugin-dynamic-import-variables.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## can exclude files
7
8 > Snapshot 1
9
10 `function importModule(name) {␊
11 return import(`./module-dir-a/${name}.js`);␊
12 }␊
13
14 export { importModule };␊
15 `
16
17 ## complex concatenation
18
19 > Snapshot 1
20
21 `function __variableDynamicImportRuntime0__(path) {␊
22 switch (path) {␊
23 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
24 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
25 case './module-dir-b/module-b-1.js': return import('./module-b-1-72e7a68a.js');␊
26 case './module-dir-b/module-b-2.js': return import('./module-b-2-4b67cae0.js');␊
27 default: throw new Error("Unknown variable dynamic import: " + path);␊
28 }␊
29 }␊
30
31 function importModule(dirName, name) {␊
32 return __variableDynamicImportRuntime0__(`./${`module-dir-${dirName}`}` + '/' + name + '.js');␊
33 }␊
34
35 export { importModule };␊
36 `
37
38 ## doesn't change imports that should not be changed
39
40 > Snapshot 1
41
42 `console.log("a-1");␊
43
44 function importModuleA() {␊
45 return import('./module-a-2-173cc5f5.js');␊
46 }␊
47
48 function importModuleB() {␊
49 return import('./' + 'module-dir-a' + '/' + 'module-a-2' + '.js');␊
50 }␊
51
52 export { importModuleA, importModuleB };␊
53 `
54
55 ## multiple dirs
56
57 > Snapshot 1
58
59 `function __variableDynamicImportRuntime0__(path) {␊
60 switch (path) {␊
61 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
62 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
63 case './module-dir-b/module-b-1.js': return import('./module-b-1-72e7a68a.js');␊
64 case './module-dir-b/module-b-2.js': return import('./module-b-2-4b67cae0.js');␊
65 case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-b912919e.js');␊
66 default: throw new Error("Unknown variable dynamic import: " + path);␊
67 }␊
68 }␊
69
70 function importModule(dir, name) {␊
71 return __variableDynamicImportRuntime0__(`./${dir}/${name}.js`);␊
72 }␊
73
74 export { importModule };␊
75 `
76
77 ## multiple dynamic imports
78
79 > Snapshot 1
80
81 `function __variableDynamicImportRuntime2__(path) {␊
82 switch (path) {␊
83 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
84 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
85 case './module-dir-b/module-b-1.js': return import('./module-b-1-72e7a68a.js');␊
86 case './module-dir-b/module-b-2.js': return import('./module-b-2-4b67cae0.js');␊
87 case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-b912919e.js');␊
88 default: throw new Error("Unknown variable dynamic import: " + path);␊
89 }␊
90 }␊
91
92 function __variableDynamicImportRuntime1__(path) {␊
93 switch (path) {␊
94 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
95 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
96 default: throw new Error("Unknown variable dynamic import: " + path);␊
97 }␊
98 }␊
99
100 function __variableDynamicImportRuntime0__(path) {␊
101 switch (path) {␊
102 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
103 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
104 default: throw new Error("Unknown variable dynamic import: " + path);␊
105 }␊
106 }␊
107
108 class Foo {␊
109 importModule(name) {␊
110 return __variableDynamicImportRuntime0__(`./module-dir-a/${name}.js`);␊
111 }␊
112 }␊
113
114 __variableDynamicImportRuntime1__(`./module-dir-a/${name}.js`).then((module) => {␊
115 console.log('imported', module);␊
116 });␊
117
118 function importModuleFromDir(dir, name) {␊
119 return __variableDynamicImportRuntime2__(`./${dir}/${name}.js`);␊
120 }␊
121
122 export { Foo, importModuleFromDir };␊
123 `
124
125 ## own directory
126
127 > Snapshot 1
128
129 `function __variableDynamicImportRuntime0__(path) {␊
130 switch (path) {␊
131 case './root-module-a.js': return import('./root-module-a-0cd41d7c.js');␊
132 case './root-module-b.js': return import('./root-module-b-decca893.js');␊
133 default: throw new Error("Unknown variable dynamic import: " + path);␊
134 }␊
135 }␊
136
137 function importModule(name) {␊
138 return __variableDynamicImportRuntime0__(`./root-module-${name}.js`);␊
139 }␊
140
141 export { importModule };␊
142 `
143
144 ## single dir
145
146 > Snapshot 1
147
148 `function __variableDynamicImportRuntime0__(path) {␊
149 switch (path) {␊
150 case './module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
151 case './module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
152 default: throw new Error("Unknown variable dynamic import: " + path);␊
153 }␊
154 }␊
155
156 function importModule(name) {␊
157 return __variableDynamicImportRuntime0__(`./module-dir-a/${name}.js`);␊
158 }␊
159
160 export { importModule };␊
161 `
162
163 ## upwards dir path
164
165 > Snapshot 1
166
167 `function __variableDynamicImportRuntime0__(path) {␊
168 switch (path) {␊
169 case '../module-dir-a/module-a-1.js': return import('./module-a-1-80325d58.js');␊
170 case '../module-dir-a/module-a-2.js': return import('./module-a-2-173cc5f5.js');␊
171 default: throw new Error("Unknown variable dynamic import: " + path);␊
172 }␊
173 }␊
174
175 function importModule(name) {␊
176 return __variableDynamicImportRuntime0__(`../module-dir-a/${name}.js`);␊
177 }␊
178
179 export { importModule };␊
180 `
packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-variables.js.snap less more
Binary diff not shown
+0
-181
packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.md less more
0 # Snapshot report for `test/rollup-plugin-dynamic-import-vars.test.js`
1
2 The actual snapshot is saved in `rollup-plugin-dynamic-import-vars.test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## can exclude files
7
8 > Snapshot 1
9
10 `function importModule(name) {␊
11 return import(`./module-dir-a/${name}.js`);␊
12 }␊
13
14 export { importModule };␊
15 `
16
17 ## complex concatenation
18
19 > Snapshot 1
20
21 `function __variableDynamicImportRuntime0__(path) {␊
22 switch (path) {␊
23 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
24 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
25 case './module-dir-b/module-b-1.js': return import('./module-b-1-a616b1e9.js');␊
26 case './module-dir-b/module-b-2.js': return import('./module-b-2-219276fa.js');␊
27 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
28 }␊
29 }␊
30
31 function importModule(dirName, name) {␊
32 return __variableDynamicImportRuntime0__(`${`./${`module-dir-${dirName}`}` + '/'}${name}.js`);␊
33 }␊
34
35 export { importModule };␊
36 `
37
38 ## doesn't change imports that should not be changed
39
40 > Snapshot 1
41
42 `console.log('a-1');␊
43
44 function importModuleA() {␊
45 return import('./module-a-2-28fb3b62.js');␊
46 }␊
47
48 function importModuleB() {␊
49 return import('./' + 'module-dir-a' + '/' + 'module-a-2' + '.js');␊
50 }␊
51
52 export { importModuleA, importModuleB };␊
53 `
54
55 ## multiple dirs
56
57 > Snapshot 1
58
59 `function __variableDynamicImportRuntime0__(path) {␊
60 switch (path) {␊
61 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
62 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
63 case './module-dir-b/module-b-1.js': return import('./module-b-1-a616b1e9.js');␊
64 case './module-dir-b/module-b-2.js': return import('./module-b-2-219276fa.js');␊
65 case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-39977978.js');␊
66 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
67 }␊
68 }␊
69
70 function importModule(dir, name) {␊
71 return __variableDynamicImportRuntime0__(`./${dir}/${name}.js`);␊
72 }␊
73
74 export { importModule };␊
75 `
76
77 ## multiple dynamic imports
78
79 > Snapshot 1
80
81 `function __variableDynamicImportRuntime2__(path) {␊
82 switch (path) {␊
83 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
84 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
85 case './module-dir-b/module-b-1.js': return import('./module-b-1-a616b1e9.js');␊
86 case './module-dir-b/module-b-2.js': return import('./module-b-2-219276fa.js');␊
87 case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-39977978.js');␊
88 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
89 }␊
90 }␊
91
92 function __variableDynamicImportRuntime1__(path) {␊
93 switch (path) {␊
94 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
95 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
96 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
97 }␊
98 }␊
99
100 function __variableDynamicImportRuntime0__(path) {␊
101 switch (path) {␊
102 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
103 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
104 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
105 }␊
106 }␊
107
108 class Foo {␊
109 importModule(name) {␊
110 return __variableDynamicImportRuntime0__(`./module-dir-a/${name}.js`);␊
111 }␊
112 }␊
113
114 __variableDynamicImportRuntime1__(`./module-dir-a/${name}.js`).then((module) => {␊
115 console.log('imported', module);␊
116 });␊
117
118 function importModuleFromDir(dir, name) {␊
119 return __variableDynamicImportRuntime2__(`./${dir}/${name}.js`);␊
120 }␊
121
122 export { Foo, importModuleFromDir };␊
123 `
124
125 ## own directory
126
127 > Snapshot 1
128
129 `function __variableDynamicImportRuntime0__(path) {␊
130 switch (path) {␊
131 case './root-module-a.js': return import('./root-module-a-53575bcc.js');␊
132 case './root-module-b.js': return import('./root-module-b-55333443.js');␊
133 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
134 }␊
135 }␊
136
137 function importModule(name) {␊
138 return __variableDynamicImportRuntime0__(`./root-module-${name}.js`);␊
139 }␊
140
141 export { importModule };␊
142 `
143
144 ## single dir
145
146 > Snapshot 1
147
148 `function __variableDynamicImportRuntime0__(path) {␊
149 switch (path) {␊
150 case './module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
151 case './module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
152 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
153 }␊
154 }␊
155
156 function importModule(name) {␊
157 return __variableDynamicImportRuntime0__(`./module-dir-a/${name}.js`);␊
158 }␊
159
160 export { importModule };␊
161 `
162
163 ## upwards dir path
164
165 > Snapshot 1
166
167 `function __variableDynamicImportRuntime0__(path) {␊
168 switch (path) {␊
169 case '../module-dir-a/module-a-1.js': return import('./module-a-1-a1a9dfd0.js');␊
170 case '../module-dir-a/module-a-2.js': return import('./module-a-2-28fb3b62.js');␊
171 default: return Promise.reject(new Error("Unknown variable dynamic import: " + path));␊
172 }␊
173 }␊
174
175 function importModule(name) {␊
176 return __variableDynamicImportRuntime0__(`../module-dir-a/${name}.js`);␊
177 }␊
178
179 export { importModule };␊
180 `
packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap less more
Binary diff not shown
+0
-237
packages/dynamic-import-vars/test/src/dynamic-import-to-glob.test.js less more
0 /* eslint-disable import/extensions, import/no-unresolved, no-template-curly-in-string */
1
2 import { Parser } from 'acorn';
3 import dynamicImport from 'acorn-dynamic-import';
4 import test from 'ava';
5
6 import { dynamicImportToGlob, VariableDynamicImportError } from '../../dist/index';
7
8 const CustomParser = Parser.extend(dynamicImport);
9
10 test('template literal with variable filename', (t) => {
11 const ast = CustomParser.parse('import(`./foo/${bar}.js`);', {
12 sourceType: 'module'
13 });
14
15 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
16 t.is(glob, './foo/*.js');
17 });
18
19 test('template literal with variable directory', (t) => {
20 const ast = CustomParser.parse('import(`./foo/${bar}/x.js`);', {
21 sourceType: 'module'
22 });
23
24 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
25 t.is(glob, './foo/*/x.js');
26 });
27
28 test('template literal with multiple variables', (t) => {
29 const ast = CustomParser.parse('import(`./${foo}/${bar}.js`);', {
30 sourceType: 'module'
31 });
32
33 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
34 t.is(glob, './*/*.js');
35 });
36
37 test('dynamic expression with variable filename', (t) => {
38 const ast = CustomParser.parse('import("./foo/".concat(bar,".js"));', {
39 sourceType: 'module'
40 });
41
42 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
43 t.is(glob, './foo/*.js');
44 });
45
46 test('dynamic expression with variable directory', (t) => {
47 const ast = CustomParser.parse('import("./foo/".concat(bar, "/x.js"));', {
48 sourceType: 'module'
49 });
50
51 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
52 t.is(glob, './foo/*/x.js');
53 });
54
55 test('dynamic expression with multiple variables', (t) => {
56 const ast = CustomParser.parse('import("./".concat(foo, "/").concat(bar,".js"));', {
57 sourceType: 'module'
58 });
59
60 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
61 t.is(glob, './*/*.js');
62 });
63
64 test('string concatenation', (t) => {
65 const ast = CustomParser.parse('import("./foo/" + bar + ".js");', {
66 sourceType: 'module'
67 });
68
69 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
70 t.is(glob, './foo/*.js');
71 });
72
73 test('string concatenation and template literals combined', (t) => {
74 const ast = CustomParser.parse('import("./" + `foo/${bar}` + ".js");', {
75 sourceType: 'module'
76 });
77
78 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
79 t.is(glob, './foo/*.js');
80 });
81
82 test('string literal in a template literal expression', (t) => {
83 const ast = CustomParser.parse('import(`${"./foo/"}${bar}.js`);', {
84 sourceType: 'module'
85 });
86
87 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
88 t.is(glob, './foo/*.js');
89 });
90
91 test('multiple variables are collapsed into a single *', (t) => {
92 const ast = CustomParser.parse('import(`./foo/${bar}${baz}/${x}${y}.js`);', {
93 sourceType: 'module'
94 });
95
96 const glob = dynamicImportToGlob(ast.body[0].expression.arguments[0]);
97 t.is(glob, './foo/*/*.js');
98 });
99
100 test('throws when dynamic import contains a *', (t) => {
101 const ast = CustomParser.parse('import(`./*${foo}.js`);', {
102 sourceType: 'module'
103 });
104
105 let error;
106 try {
107 dynamicImportToGlob(ast.body[0].expression.arguments[0]);
108 } catch (e) {
109 error = e;
110 }
111 t.is(error.message, 'A dynamic import cannot contain * characters.');
112 t.true(error instanceof VariableDynamicImportError);
113 });
114
115 test('throws when dynamic import contains a non + operator', (t) => {
116 const ast = CustomParser.parse('import("foo" - "bar.js");', {
117 sourceType: 'module'
118 });
119
120 let error;
121 try {
122 dynamicImportToGlob(ast.body[0].expression.arguments[0]);
123 } catch (e) {
124 error = e;
125 }
126 t.is(error.message, '- operator is not supported.');
127 t.true(error instanceof VariableDynamicImportError);
128 });
129
130 test('throws when dynamic import is a single variable', (t) => {
131 const ast = CustomParser.parse('import(foo);', {
132 sourceType: 'module'
133 });
134
135 let error;
136 try {
137 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
138 } catch (e) {
139 error = e;
140 }
141 t.is(
142 error.message,
143 'invalid import "${sourceString}". It cannot be statically analyzed. Variable dynamic imports must start with ./ and be limited to a specific directory. For example: import(`./foo/${bar}.js`).'
144 );
145 t.true(error instanceof VariableDynamicImportError);
146 });
147
148 test('throws when dynamic import starts with a variable', (t) => {
149 const ast = CustomParser.parse('import(`${folder}/foo.js`);', {
150 sourceType: 'module'
151 });
152
153 let error;
154 try {
155 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
156 } catch (e) {
157 error = e;
158 }
159 t.is(
160 error.message,
161 'invalid import "${sourceString}". It cannot be statically analyzed. Variable dynamic imports must start with ./ and be limited to a specific directory. For example: import(`./foo/${bar}.js`).'
162 );
163 t.true(error instanceof VariableDynamicImportError);
164 });
165
166 test('throws when dynamic import starts with a /', (t) => {
167 const ast = CustomParser.parse('import(`/foo/${bar}.js`);', {
168 sourceType: 'module'
169 });
170
171 let error;
172 try {
173 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
174 } catch (e) {
175 error = e;
176 }
177 t.is(
178 error.message,
179 'invalid import "${sourceString}". Variable absolute imports are not supported, imports must start with ./ in the static part of the import. For example: import(`./foo/${bar}.js`).'
180 );
181 t.true(error instanceof VariableDynamicImportError);
182 });
183
184 test('throws when dynamic import does not start with ./', (t) => {
185 const ast = CustomParser.parse('import(`foo/${bar}.js`);', {
186 sourceType: 'module'
187 });
188
189 let error;
190 try {
191 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
192 } catch (e) {
193 error = e;
194 }
195 t.is(
196 error.message,
197 'invalid import "${sourceString}". Variable bare imports are not supported, imports must start with ./ in the static part of the import. For example: import(`./foo/${bar}.js`).'
198 );
199 t.true(error instanceof VariableDynamicImportError);
200 });
201
202 test("throws when dynamic import imports it's own directory", (t) => {
203 const ast = CustomParser.parse('import(`./${foo}.js`);', {
204 sourceType: 'module'
205 });
206
207 let error;
208 try {
209 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
210 } catch (e) {
211 error = e;
212 }
213 t.is(
214 error.message,
215 'invalid import "${sourceString}". Variable imports cannot import their own directory, place imports in a separate directory or make the import filename more specific. For example: import(`./foo/${bar}.js`).'
216 );
217 t.true(error instanceof VariableDynamicImportError);
218 });
219
220 test('throws when dynamic import imports does not contain a file extension', (t) => {
221 const ast = CustomParser.parse('import(`./foo/${bar}`);', {
222 sourceType: 'module'
223 });
224
225 let error;
226 try {
227 dynamicImportToGlob(ast.body[0].expression.arguments[0], '${sourceString}');
228 } catch (e) {
229 error = e;
230 }
231 t.is(
232 error.message,
233 'invalid import "${sourceString}". A file extension must be included in the static part of the import. For example: import(`./foo/${bar}.js`).'
234 );
235 t.true(error instanceof VariableDynamicImportError);
236 });
+0
-28
packages/html/CHANGELOG.md less more
0 # @rollup/plugin-html ChangeLog
1
2 ## v0.2.0
3
4 _2020-05-02_
5
6 ### Features
7
8 - feat: support custom meta element creation (#308)
9
10 ### Updates
11
12 - test: update snapshots for rollup v2 (c09509f)
13
14 ## v0.1.1
15
16 _2020-01-04_
17
18 ### Updates
19
20 - docs: fix <br> tag (#89)
21 - test: change tests to serial to avoid weird snapshot conflicts (a492ce7)
22
23 ## 0.1.0
24
25 _2019-11-29_
26
27 - First Release
+0
-160
packages/html/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-html
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-html
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-html
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-html
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-html
10
11 🍣 A Rollup plugin which creates HTML files to serve Rollup bundles.
12
13 Please see [Supported Output Formats](#supported-output-formats) for information about using this plugin with output formats other than `esm` (`es`), `iife`, and `umd`.
14
15 ## Requirements
16
17 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
18
19 ## Install
20
21 Using npm:
22
23 ```console
24 npm install @rollup/plugin-html --save-dev
25 ```
26
27 ## Usage
28
29 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
30
31 ```js
32 const html = require('@rollup/plugin-html');
33
34 module.exports = {
35 input: 'src/index.js',
36 output: {
37 dir: 'output',
38 format: 'cjs'
39 },
40 plugins: [html()]
41 };
42 ```
43
44 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).
45
46 Once run successfully, an HTML file should be written to the bundle output destination.
47
48 ## Options
49
50 ### `attributes`
51
52 Type: `Object`<br>
53 Default: `{ html: { lang: 'en' }, link: null, script: null }`
54
55 Specifies additional attributes for `html`, `link`, and `script` elements. For each property, provide an object with key-value pairs that represent an HTML element attribute name and value. By default, the `html` element is rendered with an attribute of `lang="en"`.
56
57 _Note: If using the `es` / `esm` output format, `{ type: 'module'}` is automatically added to `attributes.script`._
58
59 ### `fileName`
60
61 Type: `String`<br>
62 Default: `'index.html'`
63
64 ### `meta`
65
66 Type: `Array[...object]`<br>
67 Default: `[{ charset: 'utf-8' }]`
68
69 Specifies attributes used to create `<meta>` elements. For each array item, provide an object with key-value pairs that represent `<meta>` element attribute names and values.
70
71 Specifies the name of the HTML to emit.
72
73 ### `publicPath`
74
75 Type: `String`<br>
76 Default: `''`
77
78 Specifies a path to prepend to all bundle assets (files) in the HTML output.
79
80 ### `template`
81
82 Type: `Function`<br>
83 Default: `internal function`
84 Returns: `String`
85
86 Specifies a function that provides the rendered source for the HTML output. The function should be in the form of:
87
88 ```js
89 const template = ({ attributes, bundle, files, publicPath, title }) => { ... }
90 ```
91
92 - `attributes`: Corresponds to the `attributes` option passed to the plugin
93 - `bundle`: An `Object` containing key-value pairs of [`AssetInfo` or `ChunkInfo`](https://rollupjs.org/guide/en/#generatebundle)
94 - `files`: An `Array` of `AssetInfo` or `ChunkInfo` containing any entry (`isEntry: true`) files, and any asset (`isAsset: true`) files in the bundle that will be emitted
95 - `publicPath`: Corresponds to the `publicPath` option passed to the plugin
96 - `title`: Corresponds to the `title` option passed to the plugin
97
98 By default this is handled internally and produces HTML in the following format:
99
100 ```html
101 <!DOCTYPE html>
102 <html ${attributes}>
103 <head>
104 ${metas}
105 <title>${title}</title>
106 ${links}
107 </head>
108 <body>
109 ${scripts}
110 </body>
111 </html>
112 ```
113
114 Where `${links}` represents all `<link ..` tags for CSS and `${scripts}` represents all `<script...` tags for JavaScript files.
115
116 ### `title`
117
118 Type: `String`<br>
119 Default: `'Rollup Bundle'`
120
121 Specifies the HTML document title.
122
123 ## Exports
124
125 ### `makeHtmlAttributes(attributes)`
126
127 Parameters: `attributes`, Type: `Object`<br>
128 Returns: `String`
129
130 Consumes an object with key-value pairs that represent an HTML element attribute name and value. The function returns all pairs as a space-separated string of valid HTML element attributes. e.g.
131
132 ```js
133 const { makeHtmlAttributes } = require('@rollup/plugin-html');
134
135 makeHtmlAttributes({ lang: 'en', 'data-batcave': 'secret' });
136 // -> 'lang="en" data-batcave="secret"'
137 ```
138
139 ## Supported Output Formats
140
141 By default, this plugin supports the `esm` (`es`), `iife`, and `umd` [output formats](https://rollupjs.org/guide/en/#outputformat), as those are most commonly used as browser bundles. Other formats can be used, but will require using the [`template`](#template) option to specify a custom template function which renders the unique requirements of other formats.
142
143 ### `amd`
144
145 Will likely require use of RequireJS semantics, which allows only for a single entry `<script>` tag. If more entry chunks are emitted, these need to be loaded via a proxy file. RequireJS would also need to be a dependency and added to the build: https://requirejs.org/docs/start.html.
146
147 ### `system`
148
149 Would require a separate `<script>` tag first that adds the `s.js` minimal loader. Loading modules might then resemble: `<script>System.import('./batman.js')</script>`.
150
151 ## Attribution
152
153 This plugin was inspired by and is based upon [mini-html-webpack-plugin](https://github.com/styleguidist/mini-html-webpack-plugin) by Juho Vepsäläinen and Artem Sapegin, with permission.
154
155 ## Meta
156
157 [CONTRIBUTING](/.github/CONTRIBUTING.md)
158
159 [LICENSE (MIT)](/LICENSE)
+0
-119
packages/html/lib/index.js less more
0 const { extname } = require('path');
1
2 const getFiles = (bundle) => {
3 const files = Object.values(bundle).filter(
4 (file) => file.isEntry || (typeof file.type === 'string' ? file.type === 'asset' : file.isAsset)
5 );
6 const result = {};
7 for (const file of files) {
8 const { fileName } = file;
9 const extension = extname(fileName).substring(1);
10 result[extension] = (result[extension] || []).concat(file);
11 }
12
13 return result;
14 };
15
16 const makeHtmlAttributes = (attributes) => {
17 if (!attributes) {
18 return '';
19 }
20
21 const keys = Object.keys(attributes);
22 // eslint-disable-next-line no-param-reassign
23 return keys.reduce((result, key) => (result += ` ${key}="${attributes[key]}"`), '');
24 };
25
26 const defaultTemplate = async ({ attributes, files, meta, publicPath, title }) => {
27 const scripts = (files.js || [])
28 .map(({ fileName }) => {
29 const attrs = makeHtmlAttributes(attributes.script);
30 return `<script src="${publicPath}${fileName}"${attrs}></script>`;
31 })
32 .join('\n');
33
34 const links = (files.css || [])
35 .map(({ fileName }) => {
36 const attrs = makeHtmlAttributes(attributes.link);
37 return `<link href="${publicPath}${fileName}" rel="stylesheet"${attrs}>`;
38 })
39 .join('\n');
40
41 const metas = meta
42 .map((input) => {
43 const attrs = makeHtmlAttributes(input);
44 return `<meta${attrs}>`;
45 })
46 .join('\n');
47
48 return `
49 <!doctype html>
50 <html${makeHtmlAttributes(attributes.html)}>
51 <head>
52 ${metas}
53 <title>${title}</title>
54 ${links}
55 </head>
56 <body>
57 ${scripts}
58 </body>
59 </html>`;
60 };
61
62 const supportedFormats = ['es', 'esm', 'iife', 'umd'];
63
64 const defaults = {
65 attributes: {
66 link: null,
67 html: { lang: 'en' },
68 script: null
69 },
70 fileName: 'index.html',
71 meta: [{ charset: 'utf-8' }],
72 publicPath: '',
73 template: defaultTemplate,
74 title: 'Rollup Bundle'
75 };
76
77 const html = (opts = {}) => {
78 const { attributes, fileName, meta, publicPath, template, title } = Object.assign(
79 {},
80 defaults,
81 opts
82 );
83
84 return {
85 name: 'html',
86
87 async generateBundle(output, bundle) {
88 if (!supportedFormats.includes(output.format) && !opts.template) {
89 this.warn(
90 `plugin-html: The output format '${
91 output.format
92 }' is not directly supported. A custom \`template\` is probably required. Supported formats include: ${supportedFormats.join(
93 ', '
94 )}`
95 );
96 }
97
98 if (output.format === 'esm' || output.format === 'es') {
99 attributes.script = Object.assign({}, attributes.script, { type: 'module' });
100 }
101
102 const files = getFiles(bundle);
103 const source = await template({ attributes, bundle, files, meta, publicPath, title });
104
105 const htmlFile = {
106 type: 'asset',
107 source,
108 name: 'Rollup HTML Asset',
109 fileName
110 };
111
112 this.emitFile(htmlFile);
113 }
114 };
115 };
116
117 module.exports = html;
118 module.exports.makeHtmlAttributes = makeHtmlAttributes;
+0
-58
packages/html/package.json less more
0 {
1 "name": "@rollup/plugin-html",
2 "version": "0.2.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Creates HTML files to serve Rollup bundles",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Andrew Powell <andrew@shellscape.org>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/html#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "lib/index.js",
13 "engines": {
14 "node": ">= 8.0.0"
15 },
16 "scripts": {
17 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
18 "ci:lint": "pnpm run lint",
19 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
20 "ci:test": "pnpm run test -- --verbose",
21 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
22 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write *.md",
23 "lint:js": "eslint --fix --cache lib test --ext .js,.ts",
24 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
25 "prepublishOnly": "pnpm run lint",
26 "test": "ava"
27 },
28 "files": [
29 "lib",
30 "README.md",
31 "LICENSE"
32 ],
33 "keywords": [
34 "rollup",
35 "plugin",
36 "html",
37 "template"
38 ],
39 "peerDependencies": {
40 "rollup": "^1.20.0||^2.0.0"
41 },
42 "devDependencies": {
43 "rollup": "^2.23.0",
44 "rollup-plugin-postcss": "^3.1.3"
45 },
46 "ava": {
47 "babel": {
48 "compileEnhancements": false
49 },
50 "files": [
51 "!**/fixtures/**",
52 "!**/helpers/**",
53 "!**/recipes/**",
54 "!**/types.ts"
55 ]
56 }
57 }
+0
-0
packages/html/test/fixtures/batman.js less more
(Empty file)
+0
-1
packages/html/test/fixtures/joker.css less more
0 * { width: 100%; }
+0
-2
packages/html/test/fixtures/joker.js less more
0 // eslint-disable-next-line
1 import style from './joker.css';
+0
-2
packages/html/test/fixtures/robin.js less more
0 // eslint-disable-next-line
1 import * as batman from './batman.js';
+0
-355
packages/html/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## attributes
7
8 > Snapshot 1
9
10 [
11 {
12 code: `(function (factory) {␊
13 typeof define === 'function' && define.amd ? define(factory) :␊
14 factory();␊
15 }((function () { 'use strict';␊
16
17
18
19 })));␊
20 `,
21 fileName: 'joker.js',
22 map: null,
23 source: undefined,
24 },
25 {
26 code: undefined,
27 fileName: 'joker.css',
28 map: undefined,
29 source: Buffer @Uint8Array [
30 2a207b20 77696474 683a2031 3030253b 207d0a
31 ],
32 },
33 {
34 code: undefined,
35 fileName: 'index.html',
36 map: undefined,
37 source: `␊
38 <!doctype html>␊
39 <html batsignal="on" lang="bat">␊
40 <head>␊
41 <meta charset="utf-8">␊
42 <title>Rollup Bundle</title>␊
43 <link href="joker.css" rel="stylesheet" data-vilian="joker">␊
44 </head>␊
45 <body>␊
46 <script src="joker.js" defer="true"></script>␊
47 </body>␊
48 </html>`,
49 },
50 ]
51
52 ## css
53
54 > Snapshot 1
55
56 [
57 {
58 code: `(function (factory) {␊
59 typeof define === 'function' && define.amd ? define(factory) :␊
60 factory();␊
61 }((function () { 'use strict';␊
62
63
64
65 })));␊
66 `,
67 fileName: 'joker.js',
68 map: null,
69 source: undefined,
70 },
71 {
72 code: undefined,
73 fileName: 'joker.css',
74 map: undefined,
75 source: Buffer @Uint8Array [
76 2a207b20 77696474 683a2031 3030253b 207d0a
77 ],
78 },
79 {
80 code: undefined,
81 fileName: 'index.html',
82 map: undefined,
83 source: `␊
84 <!doctype html>␊
85 <html lang="en">␊
86 <head>␊
87 <meta charset="utf-8">␊
88 <title>Rollup Bundle</title>␊
89 <link href="joker.css" rel="stylesheet">␊
90 </head>␊
91 <body>␊
92 <script src="joker.js" type="module"></script>␊
93 </body>␊
94 </html>`,
95 },
96 ]
97
98 ## default options
99
100 > Snapshot 1
101
102 [
103 {
104 code: `(function (factory) {␊
105 typeof define === 'function' && define.amd ? define(factory) :␊
106 factory();␊
107 }((function () { 'use strict';␊
108
109
110
111 })));␊
112 `,
113 fileName: 'batman.js',
114 map: null,
115 source: undefined,
116 },
117 {
118 code: undefined,
119 fileName: 'index.html',
120 map: undefined,
121 source: `␊
122 <!doctype html>␊
123 <html lang="en">␊
124 <head>␊
125 <meta charset="utf-8">␊
126 <title>Rollup Bundle</title>␊
127
128 </head>␊
129 <body>␊
130 <script src="batman.js"></script>␊
131 </body>␊
132 </html>`,
133 },
134 ]
135
136 ## esm
137
138 > Snapshot 1
139
140 [
141 {
142 code: `␊
143 `,
144 fileName: 'batman.js',
145 map: null,
146 source: undefined,
147 },
148 {
149 code: undefined,
150 fileName: 'index.html',
151 map: undefined,
152 source: `␊
153 <!doctype html>␊
154 <html lang="en">␊
155 <head>␊
156 <meta charset="utf-8">␊
157 <title>Rollup Bundle</title>␊
158
159 </head>␊
160 <body>␊
161 <script src="batman.js" type="module"></script>␊
162 </body>␊
163 </html>`,
164 },
165 ]
166
167 ## iife
168
169 > Snapshot 1
170
171 [
172 {
173 code: `(function () {␊
174 'use strict';␊
175
176
177
178 }());␊
179 `,
180 fileName: 'batman.js',
181 map: null,
182 source: undefined,
183 },
184 {
185 code: undefined,
186 fileName: 'index.html',
187 map: undefined,
188 source: `␊
189 <!doctype html>␊
190 <html lang="en">␊
191 <head>␊
192 <meta charset="utf-8">␊
193 <title>Rollup Bundle</title>␊
194
195 </head>␊
196 <body>␊
197 <script src="batman.js"></script>␊
198 </body>␊
199 </html>`,
200 },
201 ]
202
203 ## imports
204
205 > Snapshot 1
206
207 [
208 {
209 code: `(function (factory) {␊
210 typeof define === 'function' && define.amd ? define(factory) :␊
211 factory();␊
212 }((function () { 'use strict';␊
213
214
215
216 })));␊
217 `,
218 fileName: 'robin.js',
219 map: null,
220 source: undefined,
221 },
222 {
223 code: undefined,
224 fileName: 'index.html',
225 map: undefined,
226 source: `␊
227 <!doctype html>␊
228 <html lang="en">␊
229 <head>␊
230 <meta charset="utf-8">␊
231 <title>Rollup Bundle</title>␊
232
233 </head>␊
234 <body>␊
235 <script src="robin.js" type="module"></script>␊
236 </body>␊
237 </html>`,
238 },
239 ]
240
241 ## options
242
243 > Snapshot 1
244
245 [
246 {
247 code: `(function (factory) {␊
248 typeof define === 'function' && define.amd ? define(factory) :␊
249 factory();␊
250 }((function () { 'use strict';␊
251
252
253
254 })));␊
255 `,
256 fileName: 'batman.js',
257 map: null,
258 source: undefined,
259 },
260 {
261 code: undefined,
262 fileName: 'batman.html',
263 map: undefined,
264 source: `␊
265 <!doctype html>␊
266 <html lang="en">␊
267 <head>␊
268 <meta charset="utf-8">␊
269 <meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width">␊
270 <title>Batcave</title>␊
271
272 </head>␊
273 <body>␊
274 <script src="batcave/batman.js"></script>␊
275 </body>␊
276 </html>`,
277 },
278 ]
279
280 ## template
281
282 > Snapshot 1
283
284 [
285 {
286 code: `(function (factory) {␊
287 typeof define === 'function' && define.amd ? define(factory) :␊
288 factory();␊
289 }((function () { 'use strict';␊
290
291
292
293 })));␊
294 `,
295 fileName: 'batman.js',
296 map: null,
297 source: undefined,
298 },
299 {
300 code: undefined,
301 fileName: 'index.html',
302 map: undefined,
303 source: '<html><body><main></main></body></html>',
304 },
305 ]
306
307 ## unsupported output format
308
309 > Snapshot 1
310
311 [
312 {
313 code: `'use strict';␊
314
315 `,
316 fileName: 'batman.js',
317 map: null,
318 source: undefined,
319 },
320 {
321 code: undefined,
322 fileName: 'index.html',
323 map: undefined,
324 source: `␊
325 <!doctype html>␊
326 <html lang="en">␊
327 <head>␊
328 <meta charset="utf-8">␊
329 <title>Rollup Bundle</title>␊
330
331 </head>␊
332 <body>␊
333 <script src="batman.js" type="module"></script>␊
334 </body>␊
335 </html>`,
336 },
337 ]
338
339 > Snapshot 2
340
341 [
342 {
343 chunkName: 'batman',
344 code: 'EMPTY_BUNDLE',
345 message: 'Generated an empty chunk: "batman"',
346 toString: Function {},
347 },
348 {
349 code: 'PLUGIN_WARNING',
350 message: 'plugin-html: The output format \'cjs\' is not directly supported. A custom `template` is probably required. Supported formats include: es, esm, iife, umd',
351 plugin: 'html',
352 toString: Function {},
353 },
354 ]
packages/html/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-122
packages/html/test/test.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4 const css = require('rollup-plugin-postcss');
5
6 const { getCode } = require('../../../util/test');
7
8 const html = require('..');
9
10 // const read = (file = 'index.html') => readFileSync(join('output/', file), 'utf-8');
11
12 const output = { dir: 'output', format: 'umd' };
13
14 process.chdir(join(__dirname, 'fixtures'));
15
16 test.serial('default options', async (t) => {
17 const bundle = await rollup({
18 input: 'batman.js',
19 plugins: [html()]
20 });
21 const code = await getCode(bundle, output, true);
22 t.snapshot(code);
23 });
24
25 test.serial('options', async (t) => {
26 const bundle = await rollup({
27 input: 'batman.js',
28 plugins: [
29 html({
30 fileName: 'batman.html',
31 publicPath: 'batcave/',
32 title: 'Batcave',
33 meta: [
34 { charset: 'utf-8' },
35 { name: 'viewport', content: 'minimum-scale=1, initial-scale=1, width=device-width' }
36 ]
37 })
38 ]
39 });
40 const code = await getCode(bundle, output, true);
41 t.snapshot(code);
42 });
43
44 test.serial('iife', async (t) => {
45 const bundle = await rollup({
46 input: 'batman.js',
47 plugins: [html()]
48 });
49 const code = await getCode(bundle, { dir: 'output', format: 'iife' }, true);
50 t.snapshot(code);
51 });
52
53 test.serial('esm', async (t) => {
54 const bundle = await rollup({
55 input: 'batman.js',
56 plugins: [html()]
57 });
58 const code = await getCode(bundle, { dir: 'output', format: 'esm' }, true);
59 t.snapshot(code);
60 });
61
62 test.serial('unsupported output format', async (t) => {
63 const warnings = [];
64 const bundle = await rollup({
65 input: 'batman.js',
66 onwarn: (warning) => warnings.push(warning),
67 plugins: [html()]
68 });
69 const code = await getCode(bundle, { dir: 'output', format: 'cjs' }, true);
70 t.snapshot(code);
71 t.snapshot(warnings);
72 });
73
74 test.serial('css', async (t) => {
75 const bundle = await rollup({
76 input: 'joker.js',
77 plugins: [css({ extract: true }), html()]
78 });
79 const code = await getCode(bundle, output, true);
80 t.snapshot(code);
81 });
82
83 test.serial('attributes', async (t) => {
84 const bundle = await rollup({
85 input: 'joker.js',
86 plugins: [
87 css({ extract: true }),
88 html({
89 attributes: {
90 html: { batsignal: 'on', lang: 'bat' },
91 link: { 'data-vilian': 'joker' },
92 script: { defer: true }
93 }
94 })
95 ]
96 });
97 const code = await getCode(bundle, output, true);
98 t.snapshot(code);
99 });
100
101 test.serial('imports', async (t) => {
102 const bundle = await rollup({
103 input: 'robin.js',
104 plugins: [html()]
105 });
106 const code = await getCode(bundle, output, true);
107 t.snapshot(code);
108 });
109
110 test.serial('template', async (t) => {
111 const bundle = await rollup({
112 input: 'batman.js',
113 plugins: [
114 html({
115 template: () => '<html><body><main></main></body></html>'
116 })
117 ]
118 });
119 const code = await getCode(bundle, output, true);
120 t.snapshot(code);
121 });
+0
-63
packages/image/CHANGELOG.md less more
0 # @rollup/plugin-image ChangeLog
1
2 ## v2.0.5
3
4 _2020-05-11_
5
6 ### Updates
7
8 - chore: rollup v2 peerDep. (dupe for pub) (a3f3205)
9
10 ## v2.0.4
11
12 _2020-02-04_
13
14 ### Bugfixes
15
16 - fix: url-encode SVG source (#173)
17
18 ## v2.0.3
19
20 _2020-02-04_
21
22 ### Bugfixes
23
24 - fix: url-encode SVG source (#173)
25
26 ## v2.0.2
27
28 _2020-02-01_
29
30 ### Updates
31
32 - chore: update dependencies (1913e7f)
33
34 ## v2.0.1
35
36 _2020-01-07_
37
38 ### Bugfixes
39
40 - fix: don't encode svg as base64 (#136)
41
42 ## 2.0.0
43
44 - **Breaking:** Minimum compatible Rollup version is 1.20.0
45 - **Breaking:** Minimum supported Node version is 8.0.0
46 - **Breaking:** Plugin will generate a `const` variable for exporting the image by default. To obtain the old default functionality, use the `dom: true` option.
47 - Published under @rollup/plugins-image
48 - WebP added to recognized MIME types
49 - Added `dom` option
50
51 ## 1.0.2
52
53 - Return a `name`
54
55 ## 1.0.1
56
57 - Fix `pkg.files`
58 - Generate synthetic AST, for quicker parsing
59
60 ## 1.0.0
61
62 - First Release
+0
-91
packages/image/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-image
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-image
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-image
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-image
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-image
10
11 🍣 A Rollup plugin which imports JPG, PNG, GIF, SVG, and WebP files.
12
13 Images are encoded using base64, which means they will be 33% larger than the size on disk. You should therefore only use this for small images where the convenience of having them available on startup (e.g. rendering immediately to a canvas without co-ordinating asynchronous loading of several images) outweighs the cost.
14
15 ## Requirements
16
17 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
18
19 ## Install
20
21 Using npm:
22
23 ```console
24 npm install @rollup/plugin-image --save-dev
25 ```
26
27 ## Usage
28
29 Assuming a `src/index.js` exists and contains code like the following:
30
31 ```js
32 import logo from './rollup.png';
33
34 console.log(logo);
35 ```
36
37 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
38
39 ```js
40 import image from '@rollup/plugin-image';
41
42 export default {
43 input: 'src/index.js',
44 output: {
45 dir: 'output',
46 format: 'cjs'
47 },
48 plugins: [image()]
49 };
50 ```
51
52 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).
53
54 Once the bundle is executed, the `console.log` will display the Base64 encoded representation of the image.
55
56 ## Options
57
58 ### `dom`
59
60 Type: `Boolean`<br>
61 Default: `false`
62
63 If `true`, instructs the plugin to generate an ES Module which exports a DOM `Image` which can be used with a browser's DOM. Otherwise, the plugin generates an ES Module which exports a `default const` containing the Base64 representation of the image.
64
65 Using this option set to `true`, the export can be used as such:
66
67 ```js
68 import logo from './rollup.png';
69 document.body.appendChild(logo);
70 ```
71
72 ### `exclude`
73
74 Type: `String` | `Array[...String]`<br>
75 Default: `null`
76
77 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 no files are ignored.
78
79 ### `include`
80
81 Type: `String` | `Array[...String]`<br>
82 Default: `null`
83
84 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 all files are targeted.
85
86 ## Meta
87
88 [CONTRIBUTING](/.github/CONTRIBUTING.md)
89
90 [LICENSE (MIT)](/LICENSE)
+0
-67
packages/image/package.json less more
0 {
1 "name": "@rollup/plugin-image",
2 "version": "2.0.5",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Import JPG, PNG, GIF, SVG, and WebP files",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/image/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">= 8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write *.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "images",
42 "modules"
43 ],
44 "peerDependencies": {
45 "rollup": "^1.20.0 || ^2.0.0"
46 },
47 "dependencies": {
48 "@rollup/pluginutils": "^3.1.0",
49 "mini-svg-data-uri": "^1.2.3"
50 },
51 "devDependencies": {
52 "@rollup/plugin-buble": "^0.21.3",
53 "rollup": "^2.23.0"
54 },
55 "ava": {
56 "babel": {
57 "compileEnhancements": false
58 },
59 "files": [
60 "!**/fixtures/**",
61 "!**/helpers/**",
62 "!**/recipes/**",
63 "!**/types.ts"
64 ]
65 }
66 }
+0
-13
packages/image/rollup.config.js less more
0 import buble from '@rollup/plugin-buble';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.js',
6 external: [...Object.keys(pkg.dependencies), 'fs', 'path'],
7 output: [
8 { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'auto' },
9 { file: pkg.module, format: 'es', sourcemap: true }
10 ],
11 plugins: [buble()]
12 };
+0
-63
packages/image/src/index.js less more
0 import { readFileSync } from 'fs';
1 import { extname } from 'path';
2
3 import { createFilter } from '@rollup/pluginutils';
4 import svgToMiniDataURI from 'mini-svg-data-uri';
5
6 const defaults = {
7 dom: false,
8 exclude: null,
9 include: null
10 };
11
12 const mimeTypes = {
13 '.jpg': 'image/jpeg',
14 '.jpeg': 'image/jpeg',
15 '.png': 'image/png',
16 '.gif': 'image/gif',
17 '.svg': 'image/svg+xml',
18 '.webp': 'image/webp'
19 };
20
21 const domTemplate = ({ dataUri }) => `
22 const img = new Image();
23 img.src = "${dataUri}";
24 export default img;
25 `;
26
27 const constTemplate = ({ dataUri }) => `
28 const img = "${dataUri}";
29 export default img;
30 `;
31
32 const getDataUri = ({ format, isSvg, mime, source }) =>
33 isSvg ? svgToMiniDataURI(source) : `data:${mime};${format},${source}`;
34
35 export default function image(opts = {}) {
36 const options = Object.assign({}, defaults, opts);
37 const filter = createFilter(options.include, options.exclude);
38
39 return {
40 name: 'image',
41
42 load(id) {
43 if (!filter(id)) {
44 return null;
45 }
46
47 const mime = mimeTypes[extname(id)];
48 if (!mime) {
49 // not an image
50 return null;
51 }
52
53 const isSvg = mime === mimeTypes['.svg'];
54 const format = isSvg ? 'utf-8' : 'base64';
55 const source = readFileSync(id, format).replace(/[\r\n]+/gm, '');
56 const dataUri = getDataUri({ format, isSvg, mime, source });
57 const code = options.dom ? domTemplate({ dataUri }) : constTemplate({ dataUri });
58
59 return code.trim();
60 }
61 };
62 }
+0
-3
packages/image/test/fixtures/dom.js less more
0 /* eslint-disable */
1 import logo from './rollup.jpg';
2 document.body.appendChild( logo );
+0
-6
packages/image/test/fixtures/image.js less more
0 /* eslint-disable */
1 import logo from './rollup.jpg';
2
3 const state = 'valid';
4
5 console.log(state, logo);
+0
-6
packages/image/test/fixtures/invalid-image.js less more
0 /* eslint-disable */
1 import logo from './rollup.psd';
2
3 const state = 'invalid';
4
5 console.log(state, logo);
packages/image/test/fixtures/rollup.jpg less more
Binary diff not shown
+0
-0
packages/image/test/fixtures/rollup.psd less more
(Empty file)
+0
-46
packages/image/test/fixtures/rollup.svg less more
0 <?xml version="1.0" encoding="UTF-8"?>
1 <svg width="256px" height="335px" viewBox="0 0 256 335" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
2 <defs>
3 <linearGradient x1="26.8242921%" y1="48.2236445%" x2="67.5758137%" y2="55.339338%" id="linearGradient-1">
4 <stop stop-color="#FF6533" offset="0%"></stop>
5 <stop stop-color="#FF5633" offset="15.7%"></stop>
6 <stop stop-color="#FF4333" offset="43.4%"></stop>
7 <stop stop-color="#FF3733" offset="71.4%"></stop>
8 <stop stop-color="#FF3333" offset="100%"></stop>
9 </linearGradient>
10 <linearGradient x1="20.4503837%" y1="38.1333935%" x2="93.4858428%" y2="80.4322382%" id="linearGradient-2">
11 <stop stop-color="#BF3338" offset="0%"></stop>
12 <stop stop-color="#FF3333" offset="100%"></stop>
13 </linearGradient>
14 <linearGradient x1="32.2926113%" y1="39.496861%" x2="45.5563705%" y2="48.9139013%" id="linearGradient-3">
15 <stop stop-color="#FF6533" offset="0%"></stop>
16 <stop stop-color="#FF5633" offset="15.7%"></stop>
17 <stop stop-color="#FF4333" offset="43.4%"></stop>
18 <stop stop-color="#FF3733" offset="71.4%"></stop>
19 <stop stop-color="#FF3333" offset="100%"></stop>
20 </linearGradient>
21 <linearGradient x1="51.5641026%" y1="78.3444231%" x2="48.5176441%" y2="41.6628279%" id="linearGradient-4">
22 <stop stop-color="#FF6533" offset="0%"></stop>
23 <stop stop-color="#FF5633" offset="15.7%"></stop>
24 <stop stop-color="#FF4333" offset="43.4%"></stop>
25 <stop stop-color="#FF3733" offset="71.4%"></stop>
26 <stop stop-color="#FF3333" offset="100%"></stop>
27 </linearGradient>
28 <linearGradient x1="40.2012262%" y1="47.2148639%" x2="53.9750044%" y2="54.5349876%" id="linearGradient-5">
29 <stop stop-color="#FBB040" offset="0%"></stop>
30 <stop stop-color="#FB8840" offset="100%"></stop>
31 </linearGradient>
32 <linearGradient x1="55.2222794%" y1="5.88782542%" x2="40.9262994%" y2="128.016462%" id="linearGradient-6">
33 <stop stop-color="#FFFFFF" offset="0%"></stop>
34 <stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
35 </linearGradient>
36 </defs>
37 <g>
38 <path d="M256,110.132723 C256,90.4494279 250.844851,71.9963387 241.76476,56.0036613 C217.687872,31.2237986 165.316247,25.4828375 152.311213,55.8864989 C138.954691,87.0517162 174.747826,121.731808 190.389016,118.97849 C210.306636,115.463616 186.874142,69.7702517 186.874142,69.7702517 C217.336384,127.179863 210.306636,109.605492 155.240275,162.328604 C100.173913,215.051716 43.9359268,326.297483 35.7345538,330.983982 C35.3830664,331.218307 35.0315789,331.39405 34.6215103,331.569794 L250.610526,331.569794 C254.418307,331.569794 256.878719,327.527689 255.179863,324.129977 L198.707551,212.356979 C197.477346,209.955149 198.356064,206.967506 200.699314,205.620137 C233.73913,186.639817 256,151.022426 256,110.132723 Z" fill="url(#linearGradient-1)"></path>
39 <path d="M256,110.132723 C256,90.4494279 250.844851,71.9963387 241.76476,56.0036613 C217.687872,31.2237986 165.316247,25.4828375 152.311213,55.8864989 C138.954691,87.0517162 174.747826,121.731808 190.389016,118.97849 C210.306636,115.463616 186.874142,69.7702517 186.874142,69.7702517 C217.336384,127.179863 210.306636,109.605492 155.240275,162.328604 C100.173913,215.051716 43.9359268,326.297483 35.7345538,330.983982 C35.3830664,331.218307 35.0315789,331.39405 34.6215103,331.569794 L250.610526,331.569794 C254.418307,331.569794 256.878719,327.527689 255.179863,324.129977 L198.707551,212.356979 C197.477346,209.955149 198.356064,206.967506 200.699314,205.620137 C233.73913,186.639817 256,151.022426 256,110.132723 Z" fill="url(#linearGradient-2)"></path>
40 <path d="M35.7345538,330.983982 C43.9359268,326.297483 100.173913,214.993135 155.240275,162.270023 C210.306636,109.546911 217.336384,127.121281 186.874142,69.7116705 C186.874142,69.7116705 70.2974828,233.153318 28.1189931,313.995423" fill="url(#linearGradient-3)"></path>
41 <path d="M52.1372998,184.530892 C130.870481,39.776659 141.180778,25.1899314 182.187643,25.1899314 C203.745538,25.1899314 225.479176,34.9144165 239.538673,52.195881 C220.382609,21.3235698 186.464073,0.644393593 147.624714,0.0585812357 L13.8837529,0.0585812357 C11.0718535,0.0585812357 8.78718535,2.34324943 8.78718535,5.15514874 L8.78718535,274.745995 C16.7542334,254.183982 30.2864989,224.776201 52.1372998,184.530892 Z" fill="url(#linearGradient-4)"></path>
42 <path d="M155.240275,162.270023 C100.173913,214.993135 43.9359268,326.297483 35.7345538,330.983982 C27.5331808,335.670481 13.7665904,336.256293 6.44393593,328.05492 C-1.34736842,319.326316 -13.4736842,305.208238 52.1372998,184.530892 C130.870481,39.776659 141.180778,25.1899314 182.187643,25.1899314 C203.745538,25.1899314 225.479176,34.9144165 239.538673,52.195881 C240.300229,53.426087 241.061785,54.7148741 241.823341,56.0036613 C217.746453,31.2237986 165.374828,25.4828375 152.369794,55.8864989 C139.013272,87.0517162 174.806407,121.731808 190.447597,118.97849 C210.365217,115.463616 186.932723,69.7702517 186.932723,69.7702517 C217.336384,127.121281 210.306636,109.546911 155.240275,162.270023 Z" fill="url(#linearGradient-5)"></path>
43 <path d="M58.5812357,190.974828 C137.314416,46.220595 147.624714,31.6338673 188.631579,31.6338673 C206.381693,31.6338673 224.24897,38.2535469 237.839817,50.204119 C223.78032,34.1528604 202.9254,25.1899314 182.187643,25.1899314 C141.180778,25.1899314 130.870481,39.776659 52.1372998,184.530892 C-13.4736842,305.208238 -1.34736842,319.326316 6.44393593,328.05492 C7.55697941,329.285126 8.84576659,330.339588 10.193135,331.218307 C3.33913043,321.259497 0.292906178,298.119908 58.5812357,190.974828 Z" fill="url(#linearGradient-6)" opacity="0.3"></path>
44 </g>
45 </svg>
+0
-6
packages/image/test/fixtures/svg.js less more
0 /* eslint-disable */
1 import logo from './rollup.svg';
2
3 const state = 'valid';
4
5 console.log(state, logo);
+0
-67
packages/image/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## imports an image
7
8 > Snapshot 1
9
10 `'use strict';␊
11
12 const img = "data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAZABkAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APf6KKKACiiigAooooAKKKKACijpSZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmaWgAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOT8f6zdaPosf2OQxTTybPMXqoxk4968mbVNQdizX10zHqTM3P616P8U/+QTY/wDXc/8AoJry2vMxcn7S1z7rh+hT+pqTirtstf2lff8AP7c/9/W/xo/tK+/5/bn/AL+t/jVWiuXmfc9z2NP+VfcWv7Svv+f25/7+t/jR/aV9/wA/tz/39b/GqtFHM+4exp/yr7i1/aV9/wA/tz/39b/Gj+0r7/n9uf8Av63+NVaKOZ9w9jT/AJV9xa/tK+/5/bn/AL+t/jR/aV9/z+3P/f1v8aq0Ucz7h7Gn/KvuLX9pX3/P7c/9/W/xo/tK+/5/bn/v63+NVaKOZ9w9jT/lX3Fr+0r7/n9uf+/rf40f2lff8/tz/wB/W/xqrRRzPuHsaf8AKvuLX9pX3/P7c/8Af1v8aP7Svv8An9uf+/rf41Voo5n3D2NP+VfcWv7Svv8An9uf+/rf40f2lff8/tz/AN/W/wAaq0Ucz7h7Gn/KvuLX9pX3/P7c/wDf1v8AGganfg5F7cg/9dW/xqrRRzPuHsaf8q+40E17WI/uarer9Lhv8auQ+MfEMBGzVZz/AL+G/mDWHRTU5LZmcsJQn8UE/kjs7X4l61CAJ4ra4HqVKn9Dj9K6LTfifp85Cahay2p/vofMX9Bn9DXlVFaxxNSPU4K2SYKqvgs/LT/gH0Bp+t6bqg/0K8hmOMlVb5h+HWtDOa+cY5HikWSN2R15DKcEfjXU6R8QNZ007bhxfRf3Zjhh9G/xzXVDGJ/Ejw8Vw1Uj71CV/J6P/L8j2Wiue0PxjpWubY45fJuT/wAsJeG/Dsa6EHIzXXGSkrpnztajUoy5KiswoooqjIKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOB+Kf/IJsf+u5/wDQTXltepfFP/kE2P8A13P/AKCa8trysX/FPv8Ah/8A3GPq/wAwooormPbCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKuWulX96Aba1kdT/ABYwPzPFImU4wV5OyKdFdFB4N1KQAyNDEPQtk/pVtfA0pHz36g+giJ/qKXPHucksxwsftnJUV1//AAgp/wCgiP8Avz/9lUUvge6UHyruFz/tKV/xpc8e5KzLCv7X5nK9DkcEV2fhz4gXmmBLbUd11ajgPnMiD69x9fzrFuPC2rW+SLcSj1jYH9OtZU1vNbPsnieJvR1INa06rg7xY61PC46HJK0vzPoGw1K11S1W5sp1mib+Jex9D6GrdfP+ka1e6JeC5spSp/iQ/dcehFew+GvFFp4htQYyI7pRmWAnlfceor06OIVTR6M+MzPJ6uD9+PvQ79vU36KKK6TxgooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigDgfin/yCbH/ruf8A0E15bXqXxT/5BNj/ANdz/wCgmvLa8rF/xT7/AIf/ANxj6v8AMKKKK5j2wooooAKKKKACiiigAooooAKKKKACiiigAooooAKu6bpN3qsxS2j+VfvO3CrVnRNCm1ibOTHbIcPJ3+g969EtLSGxtkgt0CRqOAO/ufes5ztojysdmKoe5DWX5GTpXhay08B5VFzP/eccD6CtzhR6AVFNcLFwOW9Kz7i5wjSTSBY1GSScAVx1K9nbdnz8pVK8uabuX2uolOMk/Soze+ifma4rUPGUcbFLCHzMf8tJMgfgOp/Suduta1G8J827kC/3UO0fkK0hh689X7qN4YNvVnqT6kIwC5jQHpubFRf23bg4Nxb59PMFeSEljkkknuaSt1gpdZm6wMOp6+mqRyHCFHP+y+aWS4t502zRhlPZlBFeQVYhv7uA5iuZVx2DnFP6pNbSD6jHdM7698Mafe5ktH+zyHsvK/8AfPauelstU8O3sd2hKNG2UmjOR9D/AIGq9v4pvYgBKsc3uRtP6cfpW9ZeKrW5URT/ACluCsvQ/j/jQva09ZL7johPEUlyy96PZnoPhXxXb+IrUhgsV5GP3sOe394e38q6OvHTYNaXqanokhiuIzv8k9CO4HsfSvSvDuvQ69p32iNTHKp2TRHqjen0r18LiVVVnufNZlgY0n7Wj8D6fyvt6djYooorrPJCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA4H4p/8gmx/67n/ANBNeW16l8U/+QTY/wDXc/8AoJry2vKxf8U+/wCH/wDcY+r/ADCiiiuY9sKKKKACiiigAooooAKKKKACiiigAooooAK0tF0eXV7zy1ysKYMknoPQe9U7S1lvbqO2hGZHOB7e5r03S9Oi0uxS3iAJHLtjBZvWs5z5UebmONVCHLH4n+HmT2ttDZ2yQQJtjQYAptxc7con3u59KLifyxtU/Mf0qlXn1q1tEfNQi5PmkRzzx28LzTPtRAWZjXnmta3Nqs+BlLdT8keevufetfxjqLGSPT43woG+UDuew/r+VcnXbgcMlH2kt2enQpWXMwpaKK9E6kFKKQUtBVgpaKKGNBiloopFF2y1O6sWHluSndGPH4eldh4f8RRrqcd7D8txjbNET/rU/qR2P58VwdKrMjBlYqw5BB5FZuNnzR0ZlVoQqRafU+lreeO5t0mibdG4DKfUVLXm3w68WG4f+xrw/vTloX7N3I+vU/nXpI6V6tKpzxufEYvDSw1V05f0gooorQ5gooooAKKKKACiiigAooooAKKKKACiiigAooooA4H4p/8AIJsf+u5/9BNeW16l8U/+QTY/9dz/AOgmvLa8rF/xT7/h/wD3GPq/zCiiiuY9sKKKKACiiigAooooAKKKKACiiigAoorofCmk/bb37XMmYIDxnoz9vy6/lSbsrmOIrRo03Ul0N/wvoo0+0F1MuLmZeh/gX0rcmlESZ79hTiwVSTwBWfLIZZC3bsK4K1W3qfITnLEVHOY0ksSSck0h6UVHcOY7aVx1VCR+VcK1Zql0PMtUuPteq3U2chpDt+g4H6VVFJilr6eKtFI9WKsgoFFLTKCloAJIAHJ6U+WJ4ZDHIMMOopN9CkMpaKKCgpaSlpDQUCilpDJbW5ls7uG5gYrLE4dCOxBzX0Lomqxa1pFtfw8LKuSP7rdCPwOa+dRXpnwq1chrvSZG+XHnxA/kw/l+tdGHnaXL3PGzvC+0oe1W8fyPT6KKK7z5EKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOB+Kf/ACCbH/ruf/QTXltepfFP/kE2P/Xc/wDoJry2vKxf8U+/4f8A9xj6v8wooormPbCiiigAooooAKKKKACiiigAooooAnsrSW/vIraEfO5xn0HrXqFlZxWFnHbQj5EGM9ye5rD8JaT9ktTeyj99OPlH91P/AK/+FdBNL5cZPc9K5qtRfcfL5ninWq+zjsvzILqXJ8tTx3qtR3zRXlzlzO5yxjyqwU11DoysMgjBp1FSnYo8nljaGZ4m+8jFT9RTK1/EtobXW5zj5Zf3in1z1/XNZFfTU5qcFJdT1YO8UxaKKtWNqbmYBs+WvLH+lVKSirstIu6VaY/0iRf9wH+dP1WASRiZR8ydfp/+v+dXmYKoUcAdKiEgV/mG5Tww9QeorzvaSc+c25NDnqKnvLZrS6eI9AcqfVexqGvQTurohahRRS0igoopaCgrS8P6i2k69ZXobasco3+6nhv0JrNFLQnZ3FOCnFxlsz6YBB6UtYXg/UDqfhWwuGOX8vy3Puvyn+Wa3a9ZO6ufnVSDpzcHunYKKKKZAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwPxT/5BNj/13P8A6Ca8tr1L4p/8gmx/67n/ANBNeW15WL/in3/D/wDuMfV/mFFFFcx7YUUUUAFFFFABRRRQAUUUUAFavh/S/wC1NRCuMwR/NJ/QfjWWAWYKoJJOABXpWh6aNL01IiB5rfNKff0/DpWdSXKjzsxxXsKVo7s0uFHoBVGaTzJD/dHSp7mXC7B1PWqleZXnd8p81Tj1YUUUVzmwUUUE0Ac94r077XYC5jH7y3yT7r3/AMfzrhq9WbBBBHFee65pR028OwEwScofT2r1sBW09m/kduGnpyszY0aR1RRlicAV0EES20AjXr3PqaqafbeUnnOPnboPQVaZq1rT53yrY9GnDqDNULNQz1ETURR1RiWL+L7XpUdwOZLc7G91/wDrf41iV0mjurmeBwCrLnHt3/nWDdW7Wt1JC38DYHuO36VtRlq4djja5ZuJDilooFdBQtFFLSKCiiloKR678LLrzPD1xbk/NDcE49mAP8wa7uvLfhNLi71OH+8kbfkSP616lXp0Hemj4TNYcmMmvn96CiiitTzgooooAKKKKACiiigAooooAKKKKACiiigDgfin/wAgmx/67n/0E15bXqXxT/5BNj/13P8A6Ca8trysX/FPv+H/APcY+r/MKKKK5j2wooooAKKKKACiiigAooqS3ge5uI4Ihl5GCgUCbSV2b/hLSvtV2b2ZcxQH5Pd//rf4V3LMFUk9qr2FolhZRW0f3Y1xn1Pc0lzJuOwdB1rgrVep8hiq7xNZy6dPQgZi7Fj1NJRRXnt3EFFFFAwphNKTTGNNIBCaq3ltFewGGZAynnnsasE1Gxq46O6NY6anL3cMlrKUcfQ9iKqM1dXcwR3MRjkGR69xXNX1hLaNnG+PswH8676VRS0e57GGxEZ6S3KhamFqQmmk4rqSPQSNDRjjUB7qaTxHBtuYpgPvqVP1H/6/0qXQ4S1w82PlUY/E0/xKw8mBf4ixNZJ/v1Y86vJe3sjnKWilrtNAooooKQClopRSGd58Kmxr94vrbZ/Jl/xr1uvIvhWP+Kiuj2+ykf8Ajy167Xo4b+GfE52rYx+iCiiiug8gKKKKACiiigAooooAKKKKACiiigAooooA4H4p/wDIJsf+u5/9BNeW16l8U/8AkE2P/Xc/+gmvLa8rF/xT7/h//cY+r/MKKKMVzHthRRilxQAlFLijFACUUuKMUAJXYeD9LKK2oyjlwViB9O5/z71zWm2D6jfx2yA4Y5Y/3V7mvToo0ghSKNQqIAqgdhWNadlZHjZtieSHsY7vf0/4ISOI0J/KqJ5JJ71LO++THYVFXlVZ8zPEpxstQooorM0CkJ4paYTQAjGmE0pqMmrRaQE1GTSk0wmrSNEhpNMbpSk0w1okapFGfSbWZi20ox7ocfpVddBhDZaZyPQDFa1I7rGhZ2CqOpJxitVUmtEzojXqxVkyOOKK1g2qAkajJJ/ma5LU7z7betIOEX5VHt61Y1XVjeN5UOVgB5/2/f6Vl120KLj70tzWlTa96W4UtFFdJ0WCloopDCloopFHoPwojzq1/J2WFV/Nv/rV6tXnPwntStnqN3jh5EjB/wB0E/8Aswr0avTw6tTR8JnEubGT8rfkFFFFbnmBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAHBfFL/kE2P/Xc/wDoJry38K9S+KX/ACCbH/ruf/QTXl1eTi/4rPv+H/8AcY+r/MSjFLRXMe0JijFLRQAmKMUtFACYpcUVp6Fpp1PUVQ/6mP55D6j0/Gk3ZXZnVqRpwc5bI6bwppv2SwNzIuJZ+Rnsnb8+v5VuTSbE46npT+AMdhVOR97k9u1edWqvfqfIznKvVc5dRlFFFcZYUUUhOKAEJphNKTUZPFUkUkITTCacTUZq0jRIQmoyaVjTCa0SNEhCc0lFVL7UIbCLfIcsfuoOpq1Ft2Rok27ImuLiK1hMsrhVH61yuo6pLfvtGUhHRM9fc1Xu72a+m8yVuP4VHRRUFejRw6hq9zrp0uXV7hS0Ciug3SCgUUtBQUtFFSUFAoFS28D3NzFBGMvK4RfqTgUA2krs9m+HdobbwhbMww0zvKfxOB+gFdZUFnapZWcFrEMRwxrGv0AxU9exCPLFI/N8RV9tWlU7thRRRVGIUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwXxS/wCQVY/9dz/6Ca8ur1L4o/8AIKsf+u5/9BNeX15OL/is++4f/wBxj6sbRTsUYrlue1cbRTsUuKLhcbijFOo/Ci4XG4zwBzXoXh/TDpunASKBPJ80nqPQfh/jXM+GtN+23/nSL+5gIY+7dh/Wu6JABJ6CuetPoeDm2Ju/Yx+ZFO+F2jqarU52LsSabXmTlzO55sY2QUUUVJQdKYxpWNMJpoaQhNRk0pNMJq0jRIQmo2NOJqMmrSNEhCaZSnrWTqmrpZq0UR3Tkfgv1raEHJ2RrGLbsiXUdUisV2j55iPlX+prlJ55LmUySuWc9zTXd5HLuxZmOST3pK9OlRVNeZ206aiFFFLWpqgoopaCgoopaQwoopaRQV2Hw50kah4j+0uuYrNfMOe7nhf6n8K48V7Z4C0VtI8PI00ey5uT5sgI5A/hB/D+ZrfDw5p+h5ec4n2GFaW8tF+p1VFFFemfCBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwnxQ/5BVj/wBdz/6Ca8v4r1H4n/8AIKsf+u5/9BNeYYryMZ/FZ97kD/2KPqxKPwpaMfWuU9m4lGDTsUYouFxuDSqjO6ooyzHAA7mlxXQ+F9N864N5IvyRHCZ6Fv8A61TKVlcxxFdUabmzo9KsBp2npBwX+85HdjU07/wj8amZgqkmqZJZiT1NedWmfKpucnOQlFFFcxoFIaWmE0AITUZNOY1GTVpGiQhNMJpSajJrRI0SEJphNKTWLq+rC1BggIMxHJ/uf/XrWnTc3ZG0IuTsg1bVxahoIDmYjkj+D/69cwxLMWYkknJJ70MxZizElicknvSYr1aVJU1ZHdCCihaKKWtDQKKKBQUhRRRS0hhRRRSGLQKKkiiknmjhiQvJIwVFHViegoK21ZveDNCOua/EjqTawESzHHBA6L+J/TNe5gYArD8J+H4/D2ipbnDXD/PO4HVvT6DpW7XqUKfJHXc+BzXG/W694/CtF/n8wooorY80KKKKACiiigAooooAKKKKACiiigAooooAKKKKAOF+J3/ILsv+u5/9BNeZYNen/Ewf8Suy/wCux/8AQa8zxXjYx/vmfd5C/wDYl6sZzS4p2BS4rlPYuMwaNtPxRii4XCGB550hjGXdgor0OytI7G0jt4vuqOvqe5rA8MadlmvnHT5Yx/M/0/OuldtiE1zVZ9DwMyxHtKns47L8yGd8nb6daio6nJorz5O7uciVkFFFIaQxCaY1KTUZqkikhCaYTSk1G1WkaJCNTCaVjVDUtQSwty5wZD9xfWtYRcnZGsY30K+r6oLKPy48GdhwP7o9TXJuzSOXclmJySe9OmlkuJmllbc7HJNMr1qVJU1bqd9OHKgpaKK1NQpaKKCrBS0UUigFLRRSGFLRS9qCgr1D4feETAqa1fIRMwP2eJh90H+I+57Vk+BvBjajImqajHi0U5iiYf60+p/2f5160AAOK7MPQ+3I+YzrNFZ4ei/V/p/mLRRRXcfLBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAcR8S+dLsv+ux/lXmu2vS/iT/yDLL/AK7H+Veb4rxMb/GZ9xkb/wBjXqxmKMU/FGK5LnsXGYqa1tXu7qOBAcucfQdzTMV03huxCRG8cfM/yp7D1qZSsrnNiq/sabl16G5BDHbwJDEuEQYAqKZ9z4HQVNI+1Ce/aqtcFWXQ+dgrvmYUUUViagaYTSk1GxppDSEJphNKTTGNWkaJCE1GxpSeKjdwqlmIAAySe1aJGiRFdXMdrbvNKcKoz9fauKvbyS+uWmk4HRVz90VZ1jUjf3GxD+4jPy/7R9azq9XD0eRcz3O+lT5Vd7hSikFLXSbhS0UUikFKKBRQMKWiipKClpBVizs7m/uVt7SB5pm+6iDJNMG0ld7EGK77wd4De+aPUdWjKW33o4GGDL7n0X+f067nhT4fw6eY73VQs13jKw8FIz/U/p/Ou7AxXZRw32pnzGZ53e9LDP1f+X+YiRrGiqqhVUYAAwAKdRRXafMBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAHFfEcZ02z/wCux/lXnOK9I+Iozptn/wBdj/KvOtteFj3+/Z9tkj/2NerGYNGKk20ba4rnrcxJZ2jXl3HCv8R5PoO9dwiLGgRAAqjAA7Vj+H7IRQG5cfPJwvHRa15X2rx1PFY1JHh42t7WpyrZEMrbn9h0plFFcTd3cwWgUhNKaYxoGNY0wmlJphNWkWkIxqMmlJpjGrSNUhrGuc8QamMGyhbn/loR29q0tX1EWFqSvMz8IP61xpJYlmJJPJJrvwtG/vs66FO/vMKKKWvROxBSikpaQ0FFFLQUFKKSlpDQUUUtIo1vDeiN4g1qKwEnloQWd8Zwor23RtB0/Q7QQWVuqcfNIeXf3JrxPwzrP9g69b3zKWiB2ygdSh6/l1/CvfY3WWJZEIKMAQR3Fd2FUbX6nynEM6yqRjf3Gvx6jqKKK7D5sKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAON+IYzptn/ANdj/KvPdteh/EL/AJB1n/12P8q8+r5/MP47+R9nk3+6L1Y3bU9pam7uUhXjJ5PoO9RV0OhWgjgNww+aTgewrhbsjtxFb2VNvqayKERUUYVRgCq8jbm9hU0j7V9zVeuWpLoeNBdQoopCayLEY1GTTiajJqkikhCajJpxNRk1aRqkITVe4nS3geWU4RRkmpia5PXtR+0z/Zoz+7jb5j/eb/61dFCl7SVjanDmdjPvbt766ad+M/dXPQVXoor2EklZHopJaIWiiloKsFFFKKCkFFFLSGFFFApFC0opKWgpIK9g+HOu/wBoaL/Z8r5uLP5Rnq0f8J/Dp+AryCtXw3rLaDrkF9gmMfJKo7oev49/wrWjU5J3PPzTB/WsO4rdar1/4J7/AEUyKRZYkkRgyuoZSO4NPr1T8+CiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigDjviF/wAg6z/67H+VefV6D8Qv+QdZ/wDXY/yrz6vn8w/jv5H2WTf7ovVk1rbtdXKQr/EeT6DvXXogjRUUYCjAFZGg2wWJrlh8z/Kv0/8A1/yrXkbanuelebORGMqc9TlWyIZG3P7Cm0UVyN31MkughOKaTSsajJppDQhNMJpSajarSNEhDTCaUmq9zcJbQPNIcKoya0iruyNYoztb1L7Hb+VGf30gIH+yPWuSqW5uJLu4eaQ/Mx6entUVexRpKnG3U9CnDlVgpaKK1NRaKKKCrAKWigUihaKKKQwpaKWgpBS0lLSKQlLRRQVY9d+HGuC/0c6dNJm4tOFz3j7fl0/Ku3rwDw7rD6Hrdverkop2yqP4kPX/AB+oFe+QypPEksbBkcBlPqDXpYapzws90fCZ3g/q+I54r3Za/PqPooorpPGCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOO+IX/IOs/wDrsf5VwMMTTzJEgyzHArvviF/yDrP/AK7H+VctoVtuke4YcL8q/XvXz2Yu1d/I+tyyoqeA5vNm1EiwxLGv3VAApkjZb6VIx2rUNeRUfQxjrqwpCaCcUwmsixCaYTSsaYTWiNEhGNRk0pNMY1aRokITXJa9qBubn7Oh/dRHn3atnWtR+x2u1D+9k4X2Hc1x9ehhKX22dlCn9phS0UV3nWgpaKKRQUtAopDCloopFBS0CigaQtFFL2pFhSUUtBSCiilpDCvW/hvrgvdJOmTOTcWv3c94z0/I8flXktanh3V30TXLa9U/IrbZR6oev+P4VrRqck0zz80wX1rDOK+Jar1/4J79RTIpFliSRGDIwyrA5BFPr1z86CiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOO+IQJ0+zA5JmP8qzLOAW1pHF3A5+veui8VQectkxGVjlLfjjisMnAzXzeZv9+16Hv4SpfCxgu7I5Dk49KZQeSTSE147d2dSVhCajJpSeaYTTSLSEJqMmlY0xjWiRokIxqGaVIo2kc4VQSTT2Nc34ivtzCzjPA5k/oK3o0+eSRvThzOxkX1219dvM3APCj0FV6KWvYSUVZHopWVkFLSUtBSQUUCloKCloFFSUFKKSloGApaKBSKFopKWgpIKKKBSKAU6kpaBoKKKWgo9Y+G+uLd6W2lzP8Av7XlAe8Z/wADx+VdzXgOgaq+i63bXq/dRsSD1Q8EflXvcMiTRLLG4eNwGVl6EGvTwtTmhZ7o+Cz3BfV8Tzx+Gevz6j6KKK6TxAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKa7BELN0AyaGBzOv3Hm3iRA5ES8/U/5FY0h4xU00hmmeU9XYtVZzlia+NxVb2lSU+59FQpqEFHsNPSmE0pNMJrlSOlIQ1GTSk0xjVpGqQhNRsacTUZOMmtEjRIqalerY2jSE/OeEHqa4lmaRy7HLMck+pq/rF/9uuztP7qPhPf1P41Qr1sPS5I3e7PQow5VqFFFLW5sFFFKKCgoopaQwoopaRQUtIKWgpBS0UlIpIWiiikMKWiloKCiiloGFFFFIoUV6r8NtcW60xtKmf8Af22Wjz3jJ/oT+oryqtHQtVk0XWbe+TkRth1/vIeCPyrWhU9nNM87NMH9bw0oLdar1/4J7/RUcEsc8CSxOHjcBlYdCD3qSvYPzd6BRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAVna3N5WmSYPL4T8+v6Vo1g+JJTsgi7Elj+HH9a5cbPkoSa7G2HjzVYo54nAJquTUsh+WoCa+Plqz6OCEY0wmlJqMmhI1SEJphNKTUZNaI0SEJrF17UPIg+zxn95KOfZf/r1qXM6W8DyucKgya4i5uZLu5eeTqx6DsPSuzC0uaV3sjqoU7u5CKWilr0juCiigUFIUUUUtIYUUUUhgKUUUtBQUtApKRSQUtFFBQUopBS0hi0UUUFAKWiikygpaKKQwooooA9T+G2uC5099Jmb97b5aPP8SE9PwP8AMV3tfP8AomqSaNrFvfR8+W3zr/eU8EflXvdvPHc28c0Th45FDKw6EHoa9TC1OaFn0Pgs+wXsMR7SK92Wvz6ktFFFdR4QUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAVzPiRv8AS4h6Jn9a6auZ8TLi4gfsUI/I/wD168/M/wDd38jrwX8ZHPynmoiadIfmqImvlep9DFaCE0wmlJphNWkapCE1GTSk1n6rfCys2cH943yoPf1rWEXJ2RrGLbsjH8QXxlm+yRn5E5fHc+n4Vi0EkkkkknqTRXr04KEeVHowjyqyClooqzRIKWiikUApaKKQwpaKWgpIKKKWkUgopKWgpBRRS0hhS0UUFJBS0CikxoKUUgpaQwooooGFFFFABXqXw01n7Rp8ulykmS3+ePJ6oT0/A/zry2r+i6pLo2rW99ET+7Yb1H8S9x+Va0Kns5p9Dzs0wf1vDSprfdev9aH0DRUVvcR3VvHPC4eKRQysO4Pepa9k/N2rOzCiiigQUUUUAFFFFABRRRQAUUUUAFFFFABWZrlkbywPlrmWM7lHr6itOis6tNVIOEtmVCbhJSXQ80kOGqImut1nw+bhzcWYAk6tH03H1FcrcW09s+yeJ429GGK+UxGEqUJWktO59LhsRTrRXK9exCTUZNKT71JBZ3N4223gklP+yuQKyjFydkjsuoq7ZWdwiFmICgZJNcXqN6b67aTkIOEB7Cu31bwl4kvIxBb2SiM8sxmQE+3Wsj/hXPib/nyj/wC/6f416uGws4rmktTSjisNHVzX3nKUtdV/wrnxL/z5R/8Af5P8aP8AhXXiX/nyT/v8n+NdXs59joWPw3/PxfejlaWup/4V14l/58o/+/yf40v/AArrxL/z5J/3+T/Gj2c+xX1/C/8APxfejlaWup/4V34l/wCfJP8Av8n+NH/Cu/Ev/Pkn/f5P8aXsp9hrH4X/AJ+L70ctRXVf8K78S/8APkn/AH+T/Gj/AIV54l/58k/7/J/jR7KfYpY/C/8APxfecsKWuo/4V54l/wCfJP8Av8n+NL/wrzxJ/wA+Sf8Af5P8aXsqnYf9oYX/AJ+L7zl6K6j/AIV54k/58k/7/J/jR/wrzxJ/z5J/3+X/ABo9lU7FLMMJ/wA/F95y9FdR/wAK98Sf8+Sf9/l/xo/4V74k/wCfJP8Av8n+NHsqnYf9oYT/AJ+L7zmKWun/AOFe+JP+fJP+/wAn+NL/AMK98Sf8+Sf9/k/xpeyqdhrMcJ/z8X3nL0Cuo/4V94k/58k/7/J/jR/wr7xJ/wA+Sf8Af5P8aPZVP5Sv7Rwn/PxfejmKK6f/AIV94k/58k/7/J/jS/8ACvvEf/Pkn/f5P8aXsan8o/7Swn/PxfejmKK6f/hX3iP/AJ8k/wC/yf40f8K+8R/8+Sf9/k/xpexqdg/tLCf8/F96OYorp/8AhX3iP/nyT/v8n+NH/CvvEf8Az5J/3+T/ABo9jU7B/aWE/wCfi+9HMUV0/wDwr7xH/wA+Sf8Af5P8aP8AhX3iP/nyT/v8n+NHsanYP7Swn/PxfejmKK6f/hX3iP8A58k/7/J/jR/wr7xH/wA+af8Af5f8aPY1Owf2lhP+fi+9HV/DPVzcafNpchO62O+Mk/wE9PwP8676uP8ABPhKbw+k9xeOjXMwC7U5CKOevcn+ldhXq0FJU0pHweaTozxc5UXdP8+v4hRRRWp54UUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUx40kBV1DA9iM0+ii1wK39n2e7d9lhz6+WKnVFUAKAAOwp1FSopbIbk3uwoooqhBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z";␊
13
14 /* eslint-disable */␊
15
16 const state = 'valid';␊
17
18 console.log(state, img);␊
19 `
20
21 ## imports an image for the dom
22
23 > Snapshot 1
24
25 `'use strict';␊
26
27 const img = new Image();␊
28 img.src = "data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAZABkAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APf6KKKACiiigAooooAKKKKACijpSZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmRRkUALRSZFGRQAtFJkUZFAC0UmaWgAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOT8f6zdaPosf2OQxTTybPMXqoxk4968mbVNQdizX10zHqTM3P616P8U/+QTY/wDXc/8AoJry2vMxcn7S1z7rh+hT+pqTirtstf2lff8AP7c/9/W/xo/tK+/5/bn/AL+t/jVWiuXmfc9z2NP+VfcWv7Svv+f25/7+t/jR/aV9/wA/tz/39b/GqtFHM+4exp/yr7i1/aV9/wA/tz/39b/Gj+0r7/n9uf8Av63+NVaKOZ9w9jT/AJV9xa/tK+/5/bn/AL+t/jR/aV9/z+3P/f1v8aq0Ucz7h7Gn/KvuLX9pX3/P7c/9/W/xo/tK+/5/bn/v63+NVaKOZ9w9jT/lX3Fr+0r7/n9uf+/rf40f2lff8/tz/wB/W/xqrRRzPuHsaf8AKvuLX9pX3/P7c/8Af1v8aP7Svv8An9uf+/rf41Voo5n3D2NP+VfcWv7Svv8An9uf+/rf40f2lff8/tz/AN/W/wAaq0Ucz7h7Gn/KvuLX9pX3/P7c/wDf1v8AGganfg5F7cg/9dW/xqrRRzPuHsaf8q+40E17WI/uarer9Lhv8auQ+MfEMBGzVZz/AL+G/mDWHRTU5LZmcsJQn8UE/kjs7X4l61CAJ4ra4HqVKn9Dj9K6LTfifp85Cahay2p/vofMX9Bn9DXlVFaxxNSPU4K2SYKqvgs/LT/gH0Bp+t6bqg/0K8hmOMlVb5h+HWtDOa+cY5HikWSN2R15DKcEfjXU6R8QNZ007bhxfRf3Zjhh9G/xzXVDGJ/Ejw8Vw1Uj71CV/J6P/L8j2Wiue0PxjpWubY45fJuT/wAsJeG/Dsa6EHIzXXGSkrpnztajUoy5KiswoooqjIKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOB+Kf/IJsf+u5/wDQTXltepfFP/kE2P8A13P/AKCa8trysX/FPv8Ah/8A3GPq/wAwooormPbCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKuWulX96Aba1kdT/ABYwPzPFImU4wV5OyKdFdFB4N1KQAyNDEPQtk/pVtfA0pHz36g+giJ/qKXPHucksxwsftnJUV1//AAgp/wCgiP8Avz/9lUUvge6UHyruFz/tKV/xpc8e5KzLCv7X5nK9DkcEV2fhz4gXmmBLbUd11ajgPnMiD69x9fzrFuPC2rW+SLcSj1jYH9OtZU1vNbPsnieJvR1INa06rg7xY61PC46HJK0vzPoGw1K11S1W5sp1mib+Jex9D6GrdfP+ka1e6JeC5spSp/iQ/dcehFew+GvFFp4htQYyI7pRmWAnlfceor06OIVTR6M+MzPJ6uD9+PvQ79vU36KKK6TxgooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigDgfin/yCbH/ruf8A0E15bXqXxT/5BNj/ANdz/wCgmvLa8rF/xT7/AIf/ANxj6v8AMKKKK5j2wooooAKKKKACiiigAooooAKKKKACiiigAooooAKu6bpN3qsxS2j+VfvO3CrVnRNCm1ibOTHbIcPJ3+g969EtLSGxtkgt0CRqOAO/ufes5ztojysdmKoe5DWX5GTpXhay08B5VFzP/eccD6CtzhR6AVFNcLFwOW9Kz7i5wjSTSBY1GSScAVx1K9nbdnz8pVK8uabuX2uolOMk/Soze+ifma4rUPGUcbFLCHzMf8tJMgfgOp/Suduta1G8J827kC/3UO0fkK0hh689X7qN4YNvVnqT6kIwC5jQHpubFRf23bg4Nxb59PMFeSEljkkknuaSt1gpdZm6wMOp6+mqRyHCFHP+y+aWS4t502zRhlPZlBFeQVYhv7uA5iuZVx2DnFP6pNbSD6jHdM7698Mafe5ktH+zyHsvK/8AfPauelstU8O3sd2hKNG2UmjOR9D/AIGq9v4pvYgBKsc3uRtP6cfpW9ZeKrW5URT/ACluCsvQ/j/jQva09ZL7johPEUlyy96PZnoPhXxXb+IrUhgsV5GP3sOe394e38q6OvHTYNaXqanokhiuIzv8k9CO4HsfSvSvDuvQ69p32iNTHKp2TRHqjen0r18LiVVVnufNZlgY0n7Wj8D6fyvt6djYooorrPJCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA4H4p/8gmx/67n/ANBNeW16l8U/+QTY/wDXc/8AoJry2vKxf8U+/wCH/wDcY+r/ADCiiiuY9sKKKKACiiigAooooAKKKKACiiigAooooAK0tF0eXV7zy1ysKYMknoPQe9U7S1lvbqO2hGZHOB7e5r03S9Oi0uxS3iAJHLtjBZvWs5z5UebmONVCHLH4n+HmT2ttDZ2yQQJtjQYAptxc7con3u59KLifyxtU/Mf0qlXn1q1tEfNQi5PmkRzzx28LzTPtRAWZjXnmta3Nqs+BlLdT8keevufetfxjqLGSPT43woG+UDuew/r+VcnXbgcMlH2kt2enQpWXMwpaKK9E6kFKKQUtBVgpaKKGNBiloopFF2y1O6sWHluSndGPH4eldh4f8RRrqcd7D8txjbNET/rU/qR2P58VwdKrMjBlYqw5BB5FZuNnzR0ZlVoQqRafU+lreeO5t0mibdG4DKfUVLXm3w68WG4f+xrw/vTloX7N3I+vU/nXpI6V6tKpzxufEYvDSw1V05f0gooorQ5gooooAKKKKACiiigAooooAKKKKACiiigAooooA4H4p/8AIJsf+u5/9BNeW16l8U/+QTY/9dz/AOgmvLa8rF/xT7/h/wD3GPq/zCiiiuY9sKKKKACiiigAooooAKKKKACiiigAoorofCmk/bb37XMmYIDxnoz9vy6/lSbsrmOIrRo03Ul0N/wvoo0+0F1MuLmZeh/gX0rcmlESZ79hTiwVSTwBWfLIZZC3bsK4K1W3qfITnLEVHOY0ksSSck0h6UVHcOY7aVx1VCR+VcK1Zql0PMtUuPteq3U2chpDt+g4H6VVFJilr6eKtFI9WKsgoFFLTKCloAJIAHJ6U+WJ4ZDHIMMOopN9CkMpaKKCgpaSlpDQUCilpDJbW5ls7uG5gYrLE4dCOxBzX0Lomqxa1pFtfw8LKuSP7rdCPwOa+dRXpnwq1chrvSZG+XHnxA/kw/l+tdGHnaXL3PGzvC+0oe1W8fyPT6KKK7z5EKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOB+Kf/ACCbH/ruf/QTXltepfFP/kE2P/Xc/wDoJry2vKxf8U+/4f8A9xj6v8wooormPbCiiigAooooAKKKKACiiigAooooAnsrSW/vIraEfO5xn0HrXqFlZxWFnHbQj5EGM9ye5rD8JaT9ktTeyj99OPlH91P/AK/+FdBNL5cZPc9K5qtRfcfL5ninWq+zjsvzILqXJ8tTx3qtR3zRXlzlzO5yxjyqwU11DoysMgjBp1FSnYo8nljaGZ4m+8jFT9RTK1/EtobXW5zj5Zf3in1z1/XNZFfTU5qcFJdT1YO8UxaKKtWNqbmYBs+WvLH+lVKSirstIu6VaY/0iRf9wH+dP1WASRiZR8ydfp/+v+dXmYKoUcAdKiEgV/mG5Tww9QeorzvaSc+c25NDnqKnvLZrS6eI9AcqfVexqGvQTurohahRRS0igoopaCgrS8P6i2k69ZXobasco3+6nhv0JrNFLQnZ3FOCnFxlsz6YBB6UtYXg/UDqfhWwuGOX8vy3Puvyn+Wa3a9ZO6ufnVSDpzcHunYKKKKZAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwPxT/5BNj/13P8A6Ca8tr1L4p/8gmx/67n/ANBNeW15WL/in3/D/wDuMfV/mFFFFcx7YUUUUAFFFFABRRRQAUUUUAFavh/S/wC1NRCuMwR/NJ/QfjWWAWYKoJJOABXpWh6aNL01IiB5rfNKff0/DpWdSXKjzsxxXsKVo7s0uFHoBVGaTzJD/dHSp7mXC7B1PWqleZXnd8p81Tj1YUUUVzmwUUUE0Ac94r077XYC5jH7y3yT7r3/AMfzrhq9WbBBBHFee65pR028OwEwScofT2r1sBW09m/kduGnpyszY0aR1RRlicAV0EES20AjXr3PqaqafbeUnnOPnboPQVaZq1rT53yrY9GnDqDNULNQz1ETURR1RiWL+L7XpUdwOZLc7G91/wDrf41iV0mjurmeBwCrLnHt3/nWDdW7Wt1JC38DYHuO36VtRlq4djja5ZuJDilooFdBQtFFLSKCiiloKR678LLrzPD1xbk/NDcE49mAP8wa7uvLfhNLi71OH+8kbfkSP616lXp0Hemj4TNYcmMmvn96CiiitTzgooooAKKKKACiiigAooooAKKKKACiiigDgfin/wAgmx/67n/0E15bXqXxT/5BNj/13P8A6Ca8trysX/FPv+H/APcY+r/MKKKK5j2wooooAKKKKACiiigAooqS3ge5uI4Ihl5GCgUCbSV2b/hLSvtV2b2ZcxQH5Pd//rf4V3LMFUk9qr2FolhZRW0f3Y1xn1Pc0lzJuOwdB1rgrVep8hiq7xNZy6dPQgZi7Fj1NJRRXnt3EFFFFAwphNKTTGNNIBCaq3ltFewGGZAynnnsasE1Gxq46O6NY6anL3cMlrKUcfQ9iKqM1dXcwR3MRjkGR69xXNX1hLaNnG+PswH8676VRS0e57GGxEZ6S3KhamFqQmmk4rqSPQSNDRjjUB7qaTxHBtuYpgPvqVP1H/6/0qXQ4S1w82PlUY/E0/xKw8mBf4ixNZJ/v1Y86vJe3sjnKWilrtNAooooKQClopRSGd58Kmxr94vrbZ/Jl/xr1uvIvhWP+Kiuj2+ykf8Ajy167Xo4b+GfE52rYx+iCiiiug8gKKKKACiiigAooooAKKKKACiiigAooooA4H4p/wDIJsf+u5/9BNeW16l8U/8AkE2P/Xc/+gmvLa8rF/xT7/h//cY+r/MKKKMVzHthRRilxQAlFLijFACUUuKMUAJXYeD9LKK2oyjlwViB9O5/z71zWm2D6jfx2yA4Y5Y/3V7mvToo0ghSKNQqIAqgdhWNadlZHjZtieSHsY7vf0/4ISOI0J/KqJ5JJ71LO++THYVFXlVZ8zPEpxstQooorM0CkJ4paYTQAjGmE0pqMmrRaQE1GTSk0wmrSNEhpNMbpSk0w1okapFGfSbWZi20ox7ocfpVddBhDZaZyPQDFa1I7rGhZ2CqOpJxitVUmtEzojXqxVkyOOKK1g2qAkajJJ/ma5LU7z7betIOEX5VHt61Y1XVjeN5UOVgB5/2/f6Vl120KLj70tzWlTa96W4UtFFdJ0WCloopDCloopFHoPwojzq1/J2WFV/Nv/rV6tXnPwntStnqN3jh5EjB/wB0E/8Aswr0avTw6tTR8JnEubGT8rfkFFFFbnmBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAHBfFL/kE2P/Xc/wDoJry38K9S+KX/ACCbH/ruf/QTXl1eTi/4rPv+H/8AcY+r/MSjFLRXMe0JijFLRQAmKMUtFACYpcUVp6Fpp1PUVQ/6mP55D6j0/Gk3ZXZnVqRpwc5bI6bwppv2SwNzIuJZ+Rnsnb8+v5VuTSbE46npT+AMdhVOR97k9u1edWqvfqfIznKvVc5dRlFFFcZYUUUhOKAEJphNKTUZPFUkUkITTCacTUZq0jRIQmoyaVjTCa0SNEhCc0lFVL7UIbCLfIcsfuoOpq1Ft2Rok27ImuLiK1hMsrhVH61yuo6pLfvtGUhHRM9fc1Xu72a+m8yVuP4VHRRUFejRw6hq9zrp0uXV7hS0Ciug3SCgUUtBQUtFFSUFAoFS28D3NzFBGMvK4RfqTgUA2krs9m+HdobbwhbMww0zvKfxOB+gFdZUFnapZWcFrEMRwxrGv0AxU9exCPLFI/N8RV9tWlU7thRRRVGIUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwXxS/wCQVY/9dz/6Ca8ur1L4o/8AIKsf+u5/9BNeX15OL/is++4f/wBxj6sbRTsUYrlue1cbRTsUuKLhcbijFOo/Ci4XG4zwBzXoXh/TDpunASKBPJ80nqPQfh/jXM+GtN+23/nSL+5gIY+7dh/Wu6JABJ6CuetPoeDm2Ju/Yx+ZFO+F2jqarU52LsSabXmTlzO55sY2QUUUVJQdKYxpWNMJpoaQhNRk0pNMJq0jRIQmo2NOJqMmrSNEhCaZSnrWTqmrpZq0UR3Tkfgv1raEHJ2RrGLbsiXUdUisV2j55iPlX+prlJ55LmUySuWc9zTXd5HLuxZmOST3pK9OlRVNeZ206aiFFFLWpqgoopaCgoopaQwoopaRQV2Hw50kah4j+0uuYrNfMOe7nhf6n8K48V7Z4C0VtI8PI00ey5uT5sgI5A/hB/D+ZrfDw5p+h5ec4n2GFaW8tF+p1VFFFemfCBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBwnxQ/5BVj/wBdz/6Ca8v4r1H4n/8AIKsf+u5/9BNeYYryMZ/FZ97kD/2KPqxKPwpaMfWuU9m4lGDTsUYouFxuDSqjO6ooyzHAA7mlxXQ+F9N864N5IvyRHCZ6Fv8A61TKVlcxxFdUabmzo9KsBp2npBwX+85HdjU07/wj8amZgqkmqZJZiT1NedWmfKpucnOQlFFFcxoFIaWmE0AITUZNOY1GTVpGiQhNMJpSajJrRI0SEJphNKTWLq+rC1BggIMxHJ/uf/XrWnTc3ZG0IuTsg1bVxahoIDmYjkj+D/69cwxLMWYkknJJ70MxZizElicknvSYr1aVJU1ZHdCCihaKKWtDQKKKBQUhRRRS0hhRRRSGLQKKkiiknmjhiQvJIwVFHViegoK21ZveDNCOua/EjqTawESzHHBA6L+J/TNe5gYArD8J+H4/D2ipbnDXD/PO4HVvT6DpW7XqUKfJHXc+BzXG/W694/CtF/n8wooorY80KKKKACiiigAooooAKKKKACiiigAooooAKKKKAOF+J3/ILsv+u5/9BNeZYNen/Ewf8Suy/wCux/8AQa8zxXjYx/vmfd5C/wDYl6sZzS4p2BS4rlPYuMwaNtPxRii4XCGB550hjGXdgor0OytI7G0jt4vuqOvqe5rA8MadlmvnHT5Yx/M/0/OuldtiE1zVZ9DwMyxHtKns47L8yGd8nb6daio6nJorz5O7uciVkFFFIaQxCaY1KTUZqkikhCaYTSk1G1WkaJCNTCaVjVDUtQSwty5wZD9xfWtYRcnZGsY30K+r6oLKPy48GdhwP7o9TXJuzSOXclmJySe9OmlkuJmllbc7HJNMr1qVJU1bqd9OHKgpaKK1NQpaKKCrBS0UUigFLRRSGFLRS9qCgr1D4feETAqa1fIRMwP2eJh90H+I+57Vk+BvBjajImqajHi0U5iiYf60+p/2f5160AAOK7MPQ+3I+YzrNFZ4ei/V/p/mLRRRXcfLBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAcR8S+dLsv+ux/lXmu2vS/iT/yDLL/AK7H+Veb4rxMb/GZ9xkb/wBjXqxmKMU/FGK5LnsXGYqa1tXu7qOBAcucfQdzTMV03huxCRG8cfM/yp7D1qZSsrnNiq/sabl16G5BDHbwJDEuEQYAqKZ9z4HQVNI+1Ce/aqtcFWXQ+dgrvmYUUUViagaYTSk1GxppDSEJphNKTTGNWkaJCE1GxpSeKjdwqlmIAAySe1aJGiRFdXMdrbvNKcKoz9fauKvbyS+uWmk4HRVz90VZ1jUjf3GxD+4jPy/7R9azq9XD0eRcz3O+lT5Vd7hSikFLXSbhS0UUikFKKBRQMKWiipKClpBVizs7m/uVt7SB5pm+6iDJNMG0ld7EGK77wd4De+aPUdWjKW33o4GGDL7n0X+f067nhT4fw6eY73VQs13jKw8FIz/U/p/Ou7AxXZRw32pnzGZ53e9LDP1f+X+YiRrGiqqhVUYAAwAKdRRXafMBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAHFfEcZ02z/wCux/lXnOK9I+Iozptn/wBdj/KvOtteFj3+/Z9tkj/2NerGYNGKk20ba4rnrcxJZ2jXl3HCv8R5PoO9dwiLGgRAAqjAA7Vj+H7IRQG5cfPJwvHRa15X2rx1PFY1JHh42t7WpyrZEMrbn9h0plFFcTd3cwWgUhNKaYxoGNY0wmlJphNWkWkIxqMmlJpjGrSNUhrGuc8QamMGyhbn/loR29q0tX1EWFqSvMz8IP61xpJYlmJJPJJrvwtG/vs66FO/vMKKKWvROxBSikpaQ0FFFLQUFKKSlpDQUUUtIo1vDeiN4g1qKwEnloQWd8Zwor23RtB0/Q7QQWVuqcfNIeXf3JrxPwzrP9g69b3zKWiB2ygdSh6/l1/CvfY3WWJZEIKMAQR3Fd2FUbX6nynEM6yqRjf3Gvx6jqKKK7D5sKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAON+IYzptn/ANdj/KvPdteh/EL/AJB1n/12P8q8+r5/MP47+R9nk3+6L1Y3bU9pam7uUhXjJ5PoO9RV0OhWgjgNww+aTgewrhbsjtxFb2VNvqayKERUUYVRgCq8jbm9hU0j7V9zVeuWpLoeNBdQoopCayLEY1GTTiajJqkikhCajJpxNRk1aRqkITVe4nS3geWU4RRkmpia5PXtR+0z/Zoz+7jb5j/eb/61dFCl7SVjanDmdjPvbt766ad+M/dXPQVXoor2EklZHopJaIWiiloKsFFFKKCkFFFLSGFFFApFC0opKWgpIK9g+HOu/wBoaL/Z8r5uLP5Rnq0f8J/Dp+AryCtXw3rLaDrkF9gmMfJKo7oev49/wrWjU5J3PPzTB/WsO4rdar1/4J7/AEUyKRZYkkRgyuoZSO4NPr1T8+CiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigDjviF/wAg6z/67H+VefV6D8Qv+QdZ/wDXY/yrz6vn8w/jv5H2WTf7ovVk1rbtdXKQr/EeT6DvXXogjRUUYCjAFZGg2wWJrlh8z/Kv0/8A1/yrXkbanuelebORGMqc9TlWyIZG3P7Cm0UVyN31MkughOKaTSsajJppDQhNMJpSajarSNEhDTCaUmq9zcJbQPNIcKoya0iruyNYoztb1L7Hb+VGf30gIH+yPWuSqW5uJLu4eaQ/Mx6entUVexRpKnG3U9CnDlVgpaKK1NRaKKKCrAKWigUihaKKKQwpaKWgpBS0lLSKQlLRRQVY9d+HGuC/0c6dNJm4tOFz3j7fl0/Ku3rwDw7rD6Hrdverkop2yqP4kPX/AB+oFe+QypPEksbBkcBlPqDXpYapzws90fCZ3g/q+I54r3Za/PqPooorpPGCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOO+IX/IOs/wDrsf5VwMMTTzJEgyzHArvviF/yDrP/AK7H+VctoVtuke4YcL8q/XvXz2Yu1d/I+tyyoqeA5vNm1EiwxLGv3VAApkjZb6VIx2rUNeRUfQxjrqwpCaCcUwmsixCaYTSsaYTWiNEhGNRk0pNMY1aRokITXJa9qBubn7Oh/dRHn3atnWtR+x2u1D+9k4X2Hc1x9ehhKX22dlCn9phS0UV3nWgpaKKRQUtAopDCloopFBS0CigaQtFFL2pFhSUUtBSCiilpDCvW/hvrgvdJOmTOTcWv3c94z0/I8flXktanh3V30TXLa9U/IrbZR6oev+P4VrRqck0zz80wX1rDOK+Jar1/4J79RTIpFliSRGDIwyrA5BFPr1z86CiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAOO+IQJ0+zA5JmP8qzLOAW1pHF3A5+veui8VQectkxGVjlLfjjisMnAzXzeZv9+16Hv4SpfCxgu7I5Dk49KZQeSTSE147d2dSVhCajJpSeaYTTSLSEJqMmlY0xjWiRokIxqGaVIo2kc4VQSTT2Nc34ivtzCzjPA5k/oK3o0+eSRvThzOxkX1219dvM3APCj0FV6KWvYSUVZHopWVkFLSUtBSQUUCloKCloFFSUFKKSloGApaKBSKFopKWgpIKKKBSKAU6kpaBoKKKWgo9Y+G+uLd6W2lzP8Av7XlAe8Z/wADx+VdzXgOgaq+i63bXq/dRsSD1Q8EflXvcMiTRLLG4eNwGVl6EGvTwtTmhZ7o+Cz3BfV8Tzx+Gevz6j6KKK6TxAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKa7BELN0AyaGBzOv3Hm3iRA5ES8/U/5FY0h4xU00hmmeU9XYtVZzlia+NxVb2lSU+59FQpqEFHsNPSmE0pNMJrlSOlIQ1GTSk0xjVpGqQhNRsacTUZOMmtEjRIqalerY2jSE/OeEHqa4lmaRy7HLMck+pq/rF/9uuztP7qPhPf1P41Qr1sPS5I3e7PQow5VqFFFLW5sFFFKKCgoopaQwoopaRQUtIKWgpBS0UlIpIWiiikMKWiloKCiiloGFFFFIoUV6r8NtcW60xtKmf8Af22Wjz3jJ/oT+oryqtHQtVk0XWbe+TkRth1/vIeCPyrWhU9nNM87NMH9bw0oLdar1/4J7/RUcEsc8CSxOHjcBlYdCD3qSvYPzd6BRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAVna3N5WmSYPL4T8+v6Vo1g+JJTsgi7Elj+HH9a5cbPkoSa7G2HjzVYo54nAJquTUsh+WoCa+Plqz6OCEY0wmlJqMmhI1SEJphNKTUZNaI0SEJrF17UPIg+zxn95KOfZf/r1qXM6W8DyucKgya4i5uZLu5eeTqx6DsPSuzC0uaV3sjqoU7u5CKWilr0juCiigUFIUUUUtIYUUUUhgKUUUtBQUtApKRSQUtFFBQUopBS0hi0UUUFAKWiikygpaKKQwooooA9T+G2uC5099Jmb97b5aPP8SE9PwP8AMV3tfP8AomqSaNrFvfR8+W3zr/eU8EflXvdvPHc28c0Th45FDKw6EHoa9TC1OaFn0Pgs+wXsMR7SK92Wvz6ktFFFdR4QUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAVzPiRv8AS4h6Jn9a6auZ8TLi4gfsUI/I/wD168/M/wDd38jrwX8ZHPynmoiadIfmqImvlep9DFaCE0wmlJphNWkapCE1GTSk1n6rfCys2cH943yoPf1rWEXJ2RrGLbsjH8QXxlm+yRn5E5fHc+n4Vi0EkkkkknqTRXr04KEeVHowjyqyClooqzRIKWiikUApaKKQwpaKWgpIKKKWkUgopKWgpBRRS0hhS0UUFJBS0CikxoKUUgpaQwooooGFFFFABXqXw01n7Rp8ulykmS3+ePJ6oT0/A/zry2r+i6pLo2rW99ET+7Yb1H8S9x+Va0Kns5p9Dzs0wf1vDSprfdev9aH0DRUVvcR3VvHPC4eKRQysO4Pepa9k/N2rOzCiiigQUUUUAFFFFABRRRQAUUUUAFFFFABWZrlkbywPlrmWM7lHr6itOis6tNVIOEtmVCbhJSXQ80kOGqImut1nw+bhzcWYAk6tH03H1FcrcW09s+yeJ429GGK+UxGEqUJWktO59LhsRTrRXK9exCTUZNKT71JBZ3N4223gklP+yuQKyjFydkjsuoq7ZWdwiFmICgZJNcXqN6b67aTkIOEB7Cu31bwl4kvIxBb2SiM8sxmQE+3Wsj/hXPib/nyj/wC/6f416uGws4rmktTSjisNHVzX3nKUtdV/wrnxL/z5R/8Af5P8aP8AhXXiX/nyT/v8n+NdXs59joWPw3/PxfejlaWup/4V14l/58o/+/yf40v/AArrxL/z5J/3+T/Gj2c+xX1/C/8APxfejlaWup/4V34l/wCfJP8Av8n+NH/Cu/Ev/Pkn/f5P8aXsp9hrH4X/AJ+L70ctRXVf8K78S/8APkn/AH+T/Gj/AIV54l/58k/7/J/jR7KfYpY/C/8APxfecsKWuo/4V54l/wCfJP8Av8n+NL/wrzxJ/wA+Sf8Af5P8aXsqnYf9oYX/AJ+L7zl6K6j/AIV54k/58k/7/J/jR/wrzxJ/z5J/3+X/ABo9lU7FLMMJ/wA/F95y9FdR/wAK98Sf8+Sf9/l/xo/4V74k/wCfJP8Av8n+NHsqnYf9oYT/AJ+L7zmKWun/AOFe+JP+fJP+/wAn+NL/AMK98Sf8+Sf9/k/xpeyqdhrMcJ/z8X3nL0Cuo/4V94k/58k/7/J/jR/wr7xJ/wA+Sf8Af5P8aPZVP5Sv7Rwn/PxfejmKK6f/AIV94k/58k/7/J/jS/8ACvvEf/Pkn/f5P8aXsan8o/7Swn/PxfejmKK6f/hX3iP/AJ8k/wC/yf40f8K+8R/8+Sf9/k/xpexqdg/tLCf8/F96OYorp/8AhX3iP/nyT/v8n+NH/CvvEf8Az5J/3+T/ABo9jU7B/aWE/wCfi+9HMUV0/wDwr7xH/wA+Sf8Af5P8aP8AhX3iP/nyT/v8n+NHsanYP7Swn/PxfejmKK6f/hX3iP8A58k/7/J/jR/wr7xH/wA+af8Af5f8aPY1Owf2lhP+fi+9HV/DPVzcafNpchO62O+Mk/wE9PwP8676uP8ABPhKbw+k9xeOjXMwC7U5CKOevcn+ldhXq0FJU0pHweaTozxc5UXdP8+v4hRRRWp54UUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUx40kBV1DA9iM0+ii1wK39n2e7d9lhz6+WKnVFUAKAAOwp1FSopbIbk3uwoooqhBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z";␊
29
30 /* eslint-disable */␊
31
32 const state = 'valid';␊
33
34 console.log(state, img);␊
35 `
36
37 ## imports an svg for dom, encodes for url
38
39 > Snapshot 1
40
41 `'use strict';␊
42
43 const img = new Image();␊
44 img.src = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='256px' height='335px' viewBox='0 0 256 335' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' preserveAspectRatio='xMidYMid'%3e %3cdefs%3e %3clinearGradient x1='26.8242921%25' y1='48.2236445%25' x2='67.5758137%25' y2='55.339338%25' id='linearGradient-1'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='20.4503837%25' y1='38.1333935%25' x2='93.4858428%25' y2='80.4322382%25' id='linearGradient-2'%3e %3cstop stop-color='%23BF3338' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='32.2926113%25' y1='39.496861%25' x2='45.5563705%25' y2='48.9139013%25' id='linearGradient-3'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='51.5641026%25' y1='78.3444231%25' x2='48.5176441%25' y2='41.6628279%25' id='linearGradient-4'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='40.2012262%25' y1='47.2148639%25' x2='53.9750044%25' y2='54.5349876%25' id='linearGradient-5'%3e %3cstop stop-color='%23FBB040' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FB8840' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='55.2222794%25' y1='5.88782542%25' x2='40.9262994%25' y2='128.016462%25' id='linearGradient-6'%3e %3cstop stop-color='white' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='white' stop-opacity='0' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath d='M256%2c110.132723 C256%2c90.4494279 250.844851%2c71.9963387 241.76476%2c56.0036613 C217.687872%2c31.2237986 165.316247%2c25.4828375 152.311213%2c55.8864989 C138.954691%2c87.0517162 174.747826%2c121.731808 190.389016%2c118.97849 C210.306636%2c115.463616 186.874142%2c69.7702517 186.874142%2c69.7702517 C217.336384%2c127.179863 210.306636%2c109.605492 155.240275%2c162.328604 C100.173913%2c215.051716 43.9359268%2c326.297483 35.7345538%2c330.983982 C35.3830664%2c331.218307 35.0315789%2c331.39405 34.6215103%2c331.569794 L250.610526%2c331.569794 C254.418307%2c331.569794 256.878719%2c327.527689 255.179863%2c324.129977 L198.707551%2c212.356979 C197.477346%2c209.955149 198.356064%2c206.967506 200.699314%2c205.620137 C233.73913%2c186.639817 256%2c151.022426 256%2c110.132723 Z' fill='url(%23linearGradient-1)'%3e%3c/path%3e %3cpath d='M256%2c110.132723 C256%2c90.4494279 250.844851%2c71.9963387 241.76476%2c56.0036613 C217.687872%2c31.2237986 165.316247%2c25.4828375 152.311213%2c55.8864989 C138.954691%2c87.0517162 174.747826%2c121.731808 190.389016%2c118.97849 C210.306636%2c115.463616 186.874142%2c69.7702517 186.874142%2c69.7702517 C217.336384%2c127.179863 210.306636%2c109.605492 155.240275%2c162.328604 C100.173913%2c215.051716 43.9359268%2c326.297483 35.7345538%2c330.983982 C35.3830664%2c331.218307 35.0315789%2c331.39405 34.6215103%2c331.569794 L250.610526%2c331.569794 C254.418307%2c331.569794 256.878719%2c327.527689 255.179863%2c324.129977 L198.707551%2c212.356979 C197.477346%2c209.955149 198.356064%2c206.967506 200.699314%2c205.620137 C233.73913%2c186.639817 256%2c151.022426 256%2c110.132723 Z' fill='url(%23linearGradient-2)'%3e%3c/path%3e %3cpath d='M35.7345538%2c330.983982 C43.9359268%2c326.297483 100.173913%2c214.993135 155.240275%2c162.270023 C210.306636%2c109.546911 217.336384%2c127.121281 186.874142%2c69.7116705 C186.874142%2c69.7116705 70.2974828%2c233.153318 28.1189931%2c313.995423' fill='url(%23linearGradient-3)'%3e%3c/path%3e %3cpath d='M52.1372998%2c184.530892 C130.870481%2c39.776659 141.180778%2c25.1899314 182.187643%2c25.1899314 C203.745538%2c25.1899314 225.479176%2c34.9144165 239.538673%2c52.195881 C220.382609%2c21.3235698 186.464073%2c0.644393593 147.624714%2c0.0585812357 L13.8837529%2c0.0585812357 C11.0718535%2c0.0585812357 8.78718535%2c2.34324943 8.78718535%2c5.15514874 L8.78718535%2c274.745995 C16.7542334%2c254.183982 30.2864989%2c224.776201 52.1372998%2c184.530892 Z' fill='url(%23linearGradient-4)'%3e%3c/path%3e %3cpath d='M155.240275%2c162.270023 C100.173913%2c214.993135 43.9359268%2c326.297483 35.7345538%2c330.983982 C27.5331808%2c335.670481 13.7665904%2c336.256293 6.44393593%2c328.05492 C-1.34736842%2c319.326316 -13.4736842%2c305.208238 52.1372998%2c184.530892 C130.870481%2c39.776659 141.180778%2c25.1899314 182.187643%2c25.1899314 C203.745538%2c25.1899314 225.479176%2c34.9144165 239.538673%2c52.195881 C240.300229%2c53.426087 241.061785%2c54.7148741 241.823341%2c56.0036613 C217.746453%2c31.2237986 165.374828%2c25.4828375 152.369794%2c55.8864989 C139.013272%2c87.0517162 174.806407%2c121.731808 190.447597%2c118.97849 C210.365217%2c115.463616 186.932723%2c69.7702517 186.932723%2c69.7702517 C217.336384%2c127.121281 210.306636%2c109.546911 155.240275%2c162.270023 Z' fill='url(%23linearGradient-5)'%3e%3c/path%3e %3cpath d='M58.5812357%2c190.974828 C137.314416%2c46.220595 147.624714%2c31.6338673 188.631579%2c31.6338673 C206.381693%2c31.6338673 224.24897%2c38.2535469 237.839817%2c50.204119 C223.78032%2c34.1528604 202.9254%2c25.1899314 182.187643%2c25.1899314 C141.180778%2c25.1899314 130.870481%2c39.776659 52.1372998%2c184.530892 C-13.4736842%2c305.208238 -1.34736842%2c319.326316 6.44393593%2c328.05492 C7.55697941%2c329.285126 8.84576659%2c330.339588 10.193135%2c331.218307 C3.33913043%2c321.259497 0.292906178%2c298.119908 58.5812357%2c190.974828 Z' fill='url(%23linearGradient-6)' opacity='0.3'%3e%3c/path%3e %3c/g%3e%3c/svg%3e";␊
45
46 /* eslint-disable */␊
47
48 const state = 'valid';␊
49
50 console.log(state, img);␊
51 `
52
53 ## imports an svg, encodes for url
54
55 > Snapshot 1
56
57 `'use strict';␊
58
59 const img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='256px' height='335px' viewBox='0 0 256 335' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' preserveAspectRatio='xMidYMid'%3e %3cdefs%3e %3clinearGradient x1='26.8242921%25' y1='48.2236445%25' x2='67.5758137%25' y2='55.339338%25' id='linearGradient-1'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='20.4503837%25' y1='38.1333935%25' x2='93.4858428%25' y2='80.4322382%25' id='linearGradient-2'%3e %3cstop stop-color='%23BF3338' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='32.2926113%25' y1='39.496861%25' x2='45.5563705%25' y2='48.9139013%25' id='linearGradient-3'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='51.5641026%25' y1='78.3444231%25' x2='48.5176441%25' y2='41.6628279%25' id='linearGradient-4'%3e %3cstop stop-color='%23FF6533' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FF5633' offset='15.7%25'%3e%3c/stop%3e %3cstop stop-color='%23FF4333' offset='43.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3733' offset='71.4%25'%3e%3c/stop%3e %3cstop stop-color='%23FF3333' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='40.2012262%25' y1='47.2148639%25' x2='53.9750044%25' y2='54.5349876%25' id='linearGradient-5'%3e %3cstop stop-color='%23FBB040' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='%23FB8840' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3clinearGradient x1='55.2222794%25' y1='5.88782542%25' x2='40.9262994%25' y2='128.016462%25' id='linearGradient-6'%3e %3cstop stop-color='white' offset='0%25'%3e%3c/stop%3e %3cstop stop-color='white' stop-opacity='0' offset='100%25'%3e%3c/stop%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath d='M256%2c110.132723 C256%2c90.4494279 250.844851%2c71.9963387 241.76476%2c56.0036613 C217.687872%2c31.2237986 165.316247%2c25.4828375 152.311213%2c55.8864989 C138.954691%2c87.0517162 174.747826%2c121.731808 190.389016%2c118.97849 C210.306636%2c115.463616 186.874142%2c69.7702517 186.874142%2c69.7702517 C217.336384%2c127.179863 210.306636%2c109.605492 155.240275%2c162.328604 C100.173913%2c215.051716 43.9359268%2c326.297483 35.7345538%2c330.983982 C35.3830664%2c331.218307 35.0315789%2c331.39405 34.6215103%2c331.569794 L250.610526%2c331.569794 C254.418307%2c331.569794 256.878719%2c327.527689 255.179863%2c324.129977 L198.707551%2c212.356979 C197.477346%2c209.955149 198.356064%2c206.967506 200.699314%2c205.620137 C233.73913%2c186.639817 256%2c151.022426 256%2c110.132723 Z' fill='url(%23linearGradient-1)'%3e%3c/path%3e %3cpath d='M256%2c110.132723 C256%2c90.4494279 250.844851%2c71.9963387 241.76476%2c56.0036613 C217.687872%2c31.2237986 165.316247%2c25.4828375 152.311213%2c55.8864989 C138.954691%2c87.0517162 174.747826%2c121.731808 190.389016%2c118.97849 C210.306636%2c115.463616 186.874142%2c69.7702517 186.874142%2c69.7702517 C217.336384%2c127.179863 210.306636%2c109.605492 155.240275%2c162.328604 C100.173913%2c215.051716 43.9359268%2c326.297483 35.7345538%2c330.983982 C35.3830664%2c331.218307 35.0315789%2c331.39405 34.6215103%2c331.569794 L250.610526%2c331.569794 C254.418307%2c331.569794 256.878719%2c327.527689 255.179863%2c324.129977 L198.707551%2c212.356979 C197.477346%2c209.955149 198.356064%2c206.967506 200.699314%2c205.620137 C233.73913%2c186.639817 256%2c151.022426 256%2c110.132723 Z' fill='url(%23linearGradient-2)'%3e%3c/path%3e %3cpath d='M35.7345538%2c330.983982 C43.9359268%2c326.297483 100.173913%2c214.993135 155.240275%2c162.270023 C210.306636%2c109.546911 217.336384%2c127.121281 186.874142%2c69.7116705 C186.874142%2c69.7116705 70.2974828%2c233.153318 28.1189931%2c313.995423' fill='url(%23linearGradient-3)'%3e%3c/path%3e %3cpath d='M52.1372998%2c184.530892 C130.870481%2c39.776659 141.180778%2c25.1899314 182.187643%2c25.1899314 C203.745538%2c25.1899314 225.479176%2c34.9144165 239.538673%2c52.195881 C220.382609%2c21.3235698 186.464073%2c0.644393593 147.624714%2c0.0585812357 L13.8837529%2c0.0585812357 C11.0718535%2c0.0585812357 8.78718535%2c2.34324943 8.78718535%2c5.15514874 L8.78718535%2c274.745995 C16.7542334%2c254.183982 30.2864989%2c224.776201 52.1372998%2c184.530892 Z' fill='url(%23linearGradient-4)'%3e%3c/path%3e %3cpath d='M155.240275%2c162.270023 C100.173913%2c214.993135 43.9359268%2c326.297483 35.7345538%2c330.983982 C27.5331808%2c335.670481 13.7665904%2c336.256293 6.44393593%2c328.05492 C-1.34736842%2c319.326316 -13.4736842%2c305.208238 52.1372998%2c184.530892 C130.870481%2c39.776659 141.180778%2c25.1899314 182.187643%2c25.1899314 C203.745538%2c25.1899314 225.479176%2c34.9144165 239.538673%2c52.195881 C240.300229%2c53.426087 241.061785%2c54.7148741 241.823341%2c56.0036613 C217.746453%2c31.2237986 165.374828%2c25.4828375 152.369794%2c55.8864989 C139.013272%2c87.0517162 174.806407%2c121.731808 190.447597%2c118.97849 C210.365217%2c115.463616 186.932723%2c69.7702517 186.932723%2c69.7702517 C217.336384%2c127.121281 210.306636%2c109.546911 155.240275%2c162.270023 Z' fill='url(%23linearGradient-5)'%3e%3c/path%3e %3cpath d='M58.5812357%2c190.974828 C137.314416%2c46.220595 147.624714%2c31.6338673 188.631579%2c31.6338673 C206.381693%2c31.6338673 224.24897%2c38.2535469 237.839817%2c50.204119 C223.78032%2c34.1528604 202.9254%2c25.1899314 182.187643%2c25.1899314 C141.180778%2c25.1899314 130.870481%2c39.776659 52.1372998%2c184.530892 C-13.4736842%2c305.208238 -1.34736842%2c319.326316 6.44393593%2c328.05492 C7.55697941%2c329.285126 8.84576659%2c330.339588 10.193135%2c331.218307 C3.33913043%2c321.259497 0.292906178%2c298.119908 58.5812357%2c190.974828 Z' fill='url(%23linearGradient-6)' opacity='0.3'%3e%3c/path%3e %3c/g%3e%3c/svg%3e";␊
60
61 /* eslint-disable */␊
62
63 const state = 'valid';␊
64
65 console.log(state, img);␊
66 `
packages/image/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-52
packages/image/test/test.js less more
0 const test = require('ava');
1 const rollup = require('rollup');
2
3 const { getCode } = require('../../../util/test');
4
5 const image = require('..');
6
7 process.chdir(__dirname);
8
9 test('imports an image', async (t) => {
10 const bundle = await rollup.rollup({
11 input: 'fixtures/image.js',
12 plugins: [image()]
13 });
14
15 t.snapshot(await getCode(bundle));
16 });
17
18 test('imports an image for the dom', async (t) => {
19 const bundle = await rollup.rollup({
20 input: 'fixtures/image.js',
21 plugins: [image({ dom: true })]
22 });
23
24 t.snapshot(await getCode(bundle));
25 });
26
27 test('ignores invalid image', async (t) =>
28 t.throwsAsync(async () =>
29 rollup.rollup({
30 input: 'fixtures/invalid-image.js',
31 plugins: [image()]
32 })
33 ));
34
35 test('imports an svg, encodes for url', async (t) => {
36 const bundle = await rollup.rollup({
37 input: 'fixtures/svg.js',
38 plugins: [image()]
39 });
40
41 t.snapshot(await getCode(bundle));
42 });
43
44 test('imports an svg for dom, encodes for url', async (t) => {
45 const bundle = await rollup.rollup({
46 input: 'fixtures/svg.js',
47 plugins: [image({ dom: true })]
48 });
49
50 t.snapshot(await getCode(bundle));
51 });
+0
-70
packages/inject/CHANGELOG.md less more
0 # @rollup/plugin-inject ChangeLog
1
2 ## v4.0.2
3
4 _2020-05-11_
5
6 ### Updates
7
8 - chore: rollup v2 peerDep. (dupe for pub) (f0d8440)
9
10 ## v4.0.1
11
12 _2020-02-01_
13
14 ### Updates
15
16 - chore: update dependencies (73d8ae7)
17
18 ## 3.0.2
19
20 - Fix bug with sourcemap usage
21
22 ## 3.0.1
23
24 - Generate sourcemap when sourcemap enabled
25
26 ## 3.0.0
27
28 - Remove node v6 from support
29 - Use modern js
30
31 ## 2.1.0
32
33 - Update all dependencies ([#15](https://github.com/rollup/rollup-plugin-inject/pull/15))
34
35 ## 2.0.0
36
37 - Work with all file extensions, not just `.js` (unless otherwise specified via `options.include` and `options.exclude`) ([#6](https://github.com/rollup/rollup-plugin-inject/pull/6))
38 - Allow `*` imports ([#9](https://github.com/rollup/rollup-plugin-inject/pull/9))
39 - Ignore replacements that are superseded (e.g. if `Buffer.isBuffer` is replaced, ignore `Buffer` replacement) ([#10](https://github.com/rollup/rollup-plugin-inject/pull/10))
40
41 ## 1.4.1
42
43 - Return a `name`
44
45 ## 1.4.0
46
47 - Use `string.search` instead of `regex.test` to avoid state-related mishaps ([#5](https://github.com/rollup/rollup-plugin-inject/issues/5))
48 - Prevent self-importing module bug
49
50 ## 1.3.0
51
52 - Windows support ([#2](https://github.com/rollup/rollup-plugin-inject/issues/2))
53 - Node 0.12 support
54
55 ## 1.2.0
56
57 - Generate sourcemaps by default
58
59 ## 1.1.1
60
61 - Use `modules` option
62
63 ## 1.1.0
64
65 - Handle shorthand properties
66
67 ## 1.0.0
68
69 - First release
+0
-96
packages/inject/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-inject
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-inject
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-inject
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-inject
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-inject
10
11 🍣 A Rollup plugin which scans modules for global variables and injects `import` statements where necessary.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-inject --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import inject from '@rollup/plugin-inject';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [
39 inject({
40 Promise: ['es6-promise', 'Promise']
41 })
42 ]
43 };
44 ```
45
46 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).
47
48 This configuration above will scan all your files for global Promise usage and plugin will add import to desired module (`import { Promise } from 'es6-promise'` in this case).
49
50 Examples:
51
52 ```js
53 {
54 // import { Promise } from 'es6-promise'
55 Promise: [ 'es6-promise', 'Promise' ],
56
57 // import { Promise as P } from 'es6-promise'
58 P: [ 'es6-promise', 'Promise' ],
59
60 // import $ from 'jquery'
61 $: 'jquery',
62
63 // import * as fs from 'fs'
64 fs: [ 'fs', '*' ],
65
66 // use a local module instead of a third-party one
67 'Object.assign': path.resolve( 'src/helpers/object-assign.js' ),
68 }
69 ```
70
71 Typically, `@rollup/plugin-inject` should be placed in `plugins` _before_ other plugins so that they may apply optimizations, such as dead code removal.
72
73 ## Options
74
75 In addition to the properties and values specified for injecting, users may also specify the options below.
76
77 ### `exclude`
78
79 Type: `String` | `Array[...String]`<br>
80 Default: `null`
81
82 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 no files are ignored.
83
84 ### `include`
85
86 Type: `String` | `Array[...String]`<br>
87 Default: `null`
88
89 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 all files are targeted.
90
91 ## Meta
92
93 [CONTRIBUTING](/.github/CONTRIBUTING.md)
94
95 [LICENSE (MIT)](/LICENSE)
+0
-32
packages/inject/index.d.ts less more
0 import { Plugin } from "rollup";
1
2 type Injectment = string | [string, string];
3
4 export interface RollupInjectOptions {
5 /**
6 * A minimatch pattern, or array of patterns, of files that should be
7 * processed by this plugin (if omitted, all files are included by default)
8 */
9 include?: string | RegExp | ReadonlyArray<string | RegExp> | null;
10
11 /**
12 * Files that should be excluded, if `include` is otherwise too permissive.
13 */
14 exclude?: string | RegExp | ReadonlyArray<string | RegExp> | null;
15
16 /**
17 * You can separate values to inject from other options.
18 */
19 modules?: { [str: string]: Injectment };
20
21 /**
22 * All other options are treated as `string: injectment` injectrs,
23 * or `string: (id) => injectment` functions.
24 */
25 [str: string]: Injectment | RollupInjectOptions["include"] | RollupInjectOptions["modules"];
26 }
27
28 /**
29 * inject strings in files while bundling them.
30 */
31 export default function inject(options?: RollupInjectOptions): Plugin;
+0
-73
packages/inject/package.json less more
0 {
1 "name": "@rollup/plugin-inject",
2 "version": "4.0.2",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Scan modules for global variables and injects `import` statements where necessary",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris <richard.a.harris@gmail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/inject#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "prebuild": "del-cli dist",
25 "prepare": "pnpm run build",
26 "prepublishOnly": "pnpm run lint && pnpm run test",
27 "pretest": "pnpm run build",
28 "test": "ava",
29 "test:ts": "tsc index.d.ts test/types.ts --noEmit"
30 },
31 "files": [
32 "dist",
33 "index.d.ts",
34 "README.md",
35 "LICENSE"
36 ],
37 "keywords": [
38 "rollup",
39 "plugin",
40 "inject",
41 "es2015",
42 "npm",
43 "modules"
44 ],
45 "peerDependencies": {
46 "rollup": "^1.20.0 || ^2.0.0"
47 },
48 "dependencies": {
49 "@rollup/pluginutils": "^3.1.0",
50 "estree-walker": "^2.0.1",
51 "magic-string": "^0.25.7"
52 },
53 "devDependencies": {
54 "@rollup/plugin-buble": "^0.21.3",
55 "del-cli": "^3.0.1",
56 "locate-character": "^2.0.5",
57 "rollup": "^2.23.0",
58 "source-map": "^0.7.3",
59 "typescript": "^3.9.7"
60 },
61 "ava": {
62 "babel": {
63 "compileEnhancements": false
64 },
65 "files": [
66 "!**/fixtures/**",
67 "!**/helpers/**",
68 "!**/recipes/**",
69 "!**/types.ts"
70 ]
71 }
72 }
+0
-15
packages/inject/rollup.config.js less more
0 import buble from '@rollup/plugin-buble';
1
2 import pkg from './package.json';
3
4 const external = Object.keys(pkg.dependencies).concat('path');
5
6 export default {
7 input: 'src/index.js',
8 plugins: [buble()],
9 external,
10 output: [
11 { file: pkg.main, format: 'cjs', exports: 'auto' },
12 { file: pkg.module, format: 'es' }
13 ]
14 };
+0
-207
packages/inject/src/index.js less more
0 import { sep } from 'path';
1
2 import { attachScopes, createFilter, makeLegalIdentifier } from '@rollup/pluginutils';
3 import { walk } from 'estree-walker';
4
5 import MagicString from 'magic-string';
6
7 const escape = (str) => str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
8
9 const isReference = (node, parent) => {
10 if (node.type === 'MemberExpression') {
11 return !node.computed && isReference(node.object, node);
12 }
13
14 if (node.type === 'Identifier') {
15 // TODO is this right?
16 if (parent.type === 'MemberExpression') return parent.computed || node === parent.object;
17
18 // disregard the `bar` in { bar: foo }
19 if (parent.type === 'Property' && node !== parent.value) return false;
20
21 // disregard the `bar` in `class Foo { bar () {...} }`
22 if (parent.type === 'MethodDefinition') return false;
23
24 // disregard the `bar` in `export { foo as bar }`
25 if (parent.type === 'ExportSpecifier' && node !== parent.local) return false;
26
27 return true;
28 }
29
30 return false;
31 };
32
33 const flatten = (startNode) => {
34 const parts = [];
35 let node = startNode;
36
37 while (node.type === 'MemberExpression') {
38 parts.unshift(node.property.name);
39 node = node.object;
40 }
41
42 const { name } = node;
43 parts.unshift(name);
44
45 return { name, keypath: parts.join('.') };
46 };
47
48 export default function inject(options) {
49 if (!options) throw new Error('Missing options');
50
51 const filter = createFilter(options.include, options.exclude);
52
53 let { modules } = options;
54
55 if (!modules) {
56 modules = Object.assign({}, options);
57 delete modules.include;
58 delete modules.exclude;
59 delete modules.sourceMap;
60 delete modules.sourcemap;
61 }
62
63 const modulesMap = new Map(Object.entries(modules));
64
65 // Fix paths on Windows
66 if (sep !== '/') {
67 modulesMap.forEach((mod, key) => {
68 modulesMap.set(
69 key,
70 Array.isArray(mod) ? [mod[0].split(sep).join('/'), mod[1]] : mod.split(sep).join('/')
71 );
72 });
73 }
74
75 const firstpass = new RegExp(
76 `(?:${Array.from(modulesMap.keys())
77 .map(escape)
78 .join('|')})`,
79 'g'
80 );
81 const sourceMap = options.sourceMap !== false && options.sourcemap !== false;
82
83 return {
84 name: 'inject',
85
86 transform(code, id) {
87 if (!filter(id)) return null;
88 if (code.search(firstpass) === -1) return null;
89
90 if (sep !== '/') id = id.split(sep).join('/'); // eslint-disable-line no-param-reassign
91
92 let ast = null;
93 try {
94 ast = this.parse(code);
95 } catch (err) {
96 this.warn({
97 code: 'PARSE_ERROR',
98 message: `rollup-plugin-inject: failed to parse ${id}. Consider restricting the plugin to particular files via options.include`
99 });
100 }
101 if (!ast) {
102 return null;
103 }
104
105 const imports = new Set();
106 ast.body.forEach((node) => {
107 if (node.type === 'ImportDeclaration') {
108 node.specifiers.forEach((specifier) => {
109 imports.add(specifier.local.name);
110 });
111 }
112 });
113
114 // analyse scopes
115 let scope = attachScopes(ast, 'scope');
116
117 const magicString = new MagicString(code);
118
119 const newImports = new Map();
120
121 function handleReference(node, name, keypath) {
122 let mod = modulesMap.get(keypath);
123 if (mod && !imports.has(name) && !scope.contains(name)) {
124 if (typeof mod === 'string') mod = [mod, 'default'];
125
126 // prevent module from importing itself
127 if (mod[0] === id) return false;
128
129 const hash = `${keypath}:${mod[0]}:${mod[1]}`;
130
131 const importLocalName =
132 name === keypath ? name : makeLegalIdentifier(`$inject_${keypath}`);
133
134 if (!newImports.has(hash)) {
135 if (mod[1] === '*') {
136 newImports.set(hash, `import * as ${importLocalName} from '${mod[0]}';`);
137 } else {
138 newImports.set(hash, `import { ${mod[1]} as ${importLocalName} } from '${mod[0]}';`);
139 }
140 }
141
142 if (name !== keypath) {
143 magicString.overwrite(node.start, node.end, importLocalName, {
144 storeName: true
145 });
146 }
147
148 return true;
149 }
150
151 return false;
152 }
153
154 walk(ast, {
155 enter(node, parent) {
156 if (sourceMap) {
157 magicString.addSourcemapLocation(node.start);
158 magicString.addSourcemapLocation(node.end);
159 }
160
161 if (node.scope) {
162 scope = node.scope; // eslint-disable-line prefer-destructuring
163 }
164
165 // special case – shorthand properties. because node.key === node.value,
166 // we can't differentiate once we've descended into the node
167 if (node.type === 'Property' && node.shorthand) {
168 const { name } = node.key;
169 handleReference(node, name, name);
170 this.skip();
171 return;
172 }
173
174 if (isReference(node, parent)) {
175 const { name, keypath } = flatten(node);
176 const handled = handleReference(node, name, keypath);
177 if (handled) {
178 this.skip();
179 }
180 }
181 },
182 leave(node) {
183 if (node.scope) {
184 scope = scope.parent;
185 }
186 }
187 });
188
189 if (newImports.size === 0) {
190 return {
191 code,
192 ast,
193 map: sourceMap ? magicString.generateMap({ hires: true }) : null
194 };
195 }
196 const importBlock = Array.from(newImports.values()).join('\n\n');
197
198 magicString.prepend(`${importBlock}\n\n`);
199
200 return {
201 code: magicString.toString(),
202 map: sourceMap ? magicString.generateMap({ hires: true }) : null
203 };
204 }
205 };
206 }
+0
-10
packages/inject/test/fixtures/.eslintrc less more
0 {
1 "rules": {
2 "no-undef": "off",
3 "no-console": "off",
4 "import/no-unresolved": "off",
5 "import/extensions": "off",
6 "func-names": "off",
7 "no-param-reassign": "off"
8 }
9 }
+0
-3
packages/inject/test/fixtures/basic/input.js less more
0 $(() => {
1 console.log('ready');
2 });
+0
-5
packages/inject/test/fixtures/existing/input.js less more
0 import $ from 'jquery';
1
2 $(() => {
3 console.log('ready');
4 });
+0
-2
packages/inject/test/fixtures/import-namespace/input.js less more
0 console.log(foo.bar);
1 console.log(foo.baz);
+0
-4
packages/inject/test/fixtures/keypaths/input.js less more
0 const original = { foo: 'bar' };
1 const clone = Object.assign({}, original);
2
3 export default clone;
+0
-8
packages/inject/test/fixtures/keypaths/polyfills/object-assign.js less more
0 export default Object.assign ||
1 function(target, ...sources) {
2 sources.forEach((source) => {
3 Object.keys(source).forEach((key) => (target[key] = source[key]));
4 });
5
6 return target;
7 };
+0
-1
packages/inject/test/fixtures/named/input.js less more
0 Promise.all([thisThing, thatThing]).then(() => someOtherThing);
+0
-1
packages/inject/test/fixtures/non-js/foo.es6 less more
0 export default relative( 'foo/bar', 'foo/baz' );
+0
-4
packages/inject/test/fixtures/non-js/input.js less more
0 import './styles.css';
1 import foo from './foo.es6';
2
3 assert.equal(foo, path.join('..', 'baz'));
+0
-4
packages/inject/test/fixtures/non-js/styles.css less more
0 body {
1 position: relative;
2 font-family: 'Comic Sans MS';
3 }
+0
-1
packages/inject/test/fixtures/redundant-keys/input.js less more
0 Buffer.isBuffer('foo');
+0
-7
packages/inject/test/fixtures/shadowing/input.js less more
0 function launch($) {
1 $(() => {
2 console.log('ready');
3 });
4 }
5
6 launch((fn) => fn());
+0
-2
packages/inject/test/fixtures/shorthand/input.js less more
0 const polyfills = { Promise };
1 polyfills.Promise.resolve().then(() => 'it works');
+0
-111
packages/inject/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## generates * imports
7
8 > Snapshot 1
9
10 `import * as foo from 'foo';␊
11
12 console.log(foo.bar);␊
13 console.log(foo.baz);␊
14 `
15
16 ## handles redundant keys
17
18 > Snapshot 1
19
20 `import { default as $inject_Buffer_isBuffer } from 'is-buffer';␊
21
22 $inject_Buffer_isBuffer('foo');␊
23 `
24
25 ## handles shadowed variables
26
27 > Snapshot 1
28
29 `function launch($) {␊
30 $(() => {␊
31 console.log('ready');␊
32 });␊
33 }␊
34
35 launch((fn) => fn());␊
36 `
37
38 ## handles shorthand properties
39
40 > Snapshot 1
41
42 `import { Promise as Promise } from 'es6-promise';␊
43
44 const polyfills = { Promise };␊
45 polyfills.Promise.resolve().then(() => 'it works');␊
46 `
47
48 ## ignores existing imports
49
50 > Snapshot 1
51
52 `import $ from 'jquery';␊
53
54 $(() => {␊
55 console.log('ready');␊
56 });␊
57 `
58
59 ## inserts a default import statement
60
61 > Snapshot 1
62
63 `import { default as $ } from 'jquery';␊
64
65 $(() => {␊
66 console.log('ready');␊
67 });␊
68 `
69
70 ## inserts a named import statement
71
72 > Snapshot 1
73
74 `import { Promise as Promise } from 'es6-promise';␊
75
76 Promise.all([thisThing, thatThing]).then(() => someOtherThing);␊
77 `
78
79 ## overwrites keypaths
80
81 > Snapshot 1
82
83 `import { default as $inject_Object_assign } from 'fixtures/keypaths/polyfills/object-assign.js';␊
84
85 const original = { foo: 'bar' };␊
86 const clone = $inject_Object_assign({}, original);␊
87
88 export default clone;␊
89 `
90
91 ## transpiles non-JS files but handles failures to parse
92
93 > Snapshot 1
94
95 `import './styles.css';␊
96 import foo from './foo.es6';␊
97
98 assert.equal(foo, path.join('..', 'baz'));␊
99 `
100
101 ## uses the modules property
102
103 > Snapshot 1
104
105 `import { default as $ } from 'jquery';␊
106
107 $(() => {␊
108 console.log('ready');␊
109 });␊
110 `
packages/inject/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-72
packages/inject/test/test.js less more
0 const fs = require('fs');
1 const path = require('path');
2
3 const acorn = require('acorn');
4 const test = require('ava');
5
6 const inject = require('..');
7
8 const compare = (t, fixture, options) => {
9 const filename = path.resolve(`test/fixtures/${fixture}/input.js`);
10 const input = fs.readFileSync(filename, 'utf-8');
11 const output = inject(options).transform.call(
12 {
13 parse: (code) =>
14 acorn.parse(code, {
15 sourceType: 'module',
16 ecmaVersion: 9
17 })
18 },
19 input,
20 filename
21 );
22
23 t.snapshot(output ? output.code : input);
24 };
25
26 test('inserts a default import statement', (t) => {
27 compare(t, 'basic', { $: 'jquery' });
28 });
29
30 test('uses the modules property', (t) => {
31 compare(t, 'basic', {
32 modules: { $: 'jquery' }
33 });
34 });
35
36 test('inserts a named import statement', (t) => {
37 compare(t, 'named', { Promise: ['es6-promise', 'Promise'] });
38 });
39
40 test('overwrites keypaths', (t) => {
41 compare(t, 'keypaths', {
42 'Object.assign': 'fixtures/keypaths/polyfills/object-assign.js'
43 });
44 });
45
46 test('ignores existing imports', (t) => {
47 compare(t, 'existing', { $: 'jquery' });
48 });
49
50 test('handles shadowed variables', (t) => {
51 compare(t, 'shadowing', { $: 'jquery' });
52 });
53
54 test('handles shorthand properties', (t) => {
55 compare(t, 'shorthand', { Promise: ['es6-promise', 'Promise'] });
56 });
57
58 test('handles redundant keys', (t) => {
59 compare(t, 'redundant-keys', {
60 Buffer: 'Buffer',
61 'Buffer.isBuffer': 'is-buffer'
62 });
63 });
64
65 test('generates * imports', (t) => {
66 compare(t, 'import-namespace', { foo: ['foo', '*'] });
67 });
68
69 test('transpiles non-JS files but handles failures to parse', (t) => {
70 compare(t, 'non-js', { relative: ['path', 'relative'] });
71 });
+0
-25
packages/inject/test/types.ts less more
0 import { RollupOptions } from 'rollup';
1
2 import inject from '..';
3
4 const config: RollupOptions = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife'
9 },
10 plugins: [
11 inject({
12 include: 'config.js',
13 exclude: 'node_modules/**',
14 Promise: ['es6-promise', 'Promise'],
15 $: 'jquery',
16 modules: {
17 Promise: ['es6-promise', 'Promise'],
18 $: 'jquery'
19 }
20 })
21 ]
22 };
23
24 export default config;
+0
-117
packages/json/CHANGELOG.md less more
0 # @rollup/plugin-json ChangeLog
1
2 ## v4.1.0
3
4 _2020-06-05_
5
6 ### Features
7
8 - feat: log the filename when JSON.parse fails (#417)
9
10 ## v4.0.3
11
12 _2020-04-19_
13
14 ### Updates
15
16 - chore: add rollup 2 to peer range (06d9d29)
17
18 ## v4.0.2
19
20 _2020-02-01_
21
22 ### Bugfixes
23
24 - fix: correct type definitions (#161)
25
26 ### Updates
27
28 - chore: update dependencies (e1d317b)
29
30 ## 4.0.1
31
32 _2019-12-21_
33
34 - fix(json): cannot be imported by rollup (#81)
35
36 ## 4.0.0
37
38 _2019-03-18_
39
40 - Pass all JSON data through dataToEsm to consistently support "compact" formatting, support empty keys, abandon Node 4 support, add prettier, update dependencies ([#53](https://github.com/rollup/rollup-plugin-json/issues/53))
41
42 ## 3.1.0
43
44 _2018-09-13_
45
46 - Expose "compact" and "namedExports" options ([#45](https://github.com/rollup/rollup-plugin-json/issues/45))
47 - Update rollup-pluginutils to support null values in JSON ([#44](https://github.com/rollup/rollup-plugin-json/issues/44))
48 - Update dependencies and ensure rollup@1.0 compatibility ([#46](https://github.com/rollup/rollup-plugin-json/issues/46))
49
50 ## 3.0.0
51
52 _2018-05-11_
53
54 - No longer create a fake AST to support tree-shaking with upcoming versions of rollup ([#41](https://github.com/rollup/rollup-plugin-json/issues/41))
55
56 ## 2.3.1
57
58 _2018-05-11_
59
60 - Update example in readme ([#38](https://github.com/rollup/rollup-plugin-json/issues/38))
61 - Warn when using this version with upcoming rollup versions
62
63 ## 2.3.0
64
65 _2017-06-03_
66
67 - Always parse JSON, so malformed JSON is identified at bundle time ([#27](https://github.com/rollup/rollup-plugin-json/issues/27))
68
69 ## 2.2.0
70
71 _2017-06-03_
72
73 - Add `indent` option ([#24](https://github.com/rollup/rollup-plugin-json/issues/24))
74
75 ## 2.1.1
76
77 _2017-04-09_
78
79 - Add license to package.json ([#25](https://github.com/rollup/rollup-plugin-json/pull/25))
80
81 ## 2.1.0
82
83 _2016-12-15_
84
85 - Add support for `preferConst` option ([#16](https://github.com/rollup/rollup-plugin-json/pull/16))
86 - Handle JSON files with no valid identifier keys ([#19](https://github.com/rollup/rollup-plugin-json/issues/19))
87
88 ## 2.0.2
89
90 _2016-09-07_
91
92 - Generate correct fake AST
93
94 ## 2.0.1
95
96 _2016-06-23_
97
98 - Return a `name`
99
100 ## 2.0.0
101
102 _2015-11-05_
103
104 - Generate fake AST to avoid unnecessary traversals within Rollup
105
106 ## 1.1.0
107
108 _unpublished_
109
110 - Generate named exports alongside default exports
111
112 ## 1.0.0
113
114 _2015-10-25_
115
116 - First release
+0
-101
packages/json/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-json
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-json
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-json
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-json
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-json
10
11 🍣 A Rollup plugin which Converts .json files to ES6 modules.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-json --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import json from '@rollup/plugin-json';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [json()]
39 };
40 ```
41
42 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).
43
44 With an accompanying file `src/index.js`, the local `package.json` file would now be importable as seen below:
45
46 ```js
47 // src/index.js
48 import pkg from './package.json';
49 console.log(`running version ${pkg.version}`);
50 ```
51
52 ## Options
53
54 ### `compact`
55
56 Type: `Boolean`<br>
57 Default: `false`
58
59 If `true`, instructs the plugin to ignore `indent` and generates the smallest code.
60
61 ### `exclude`
62
63 Type: `String` | `Array[...String]`<br>
64 Default: `null`
65
66 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 no files are ignored.
67
68 ### `include`
69
70 Type: `String` | `Array[...String]`<br>
71 Default: `null`
72
73 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 all files are targeted.
74
75 ### `indent`
76
77 Type: `String`<br>
78 Default: `'\t'`
79
80 Specifies the indentation for the generated default export.
81
82 ### `namedExports`
83
84 Type: `Boolean`<br>
85 Default: `true`
86
87 If `true`, instructs the plugin to generate a named export for every property of the JSON object.
88
89 ### `preferConst`
90
91 Type: `Boolean`<br>
92 Default: `false`
93
94 If `true`, instructs the plugin to declare properties as variables, using either `var` or `const`. This pertains to tree-shaking.
95
96 ## Meta
97
98 [CONTRIBUTING](/.github/CONTRIBUTING.md)
99
100 [LICENSE (MIT)](/LICENSE)
+0
-71
packages/json/package.json less more
0 {
1 "name": "@rollup/plugin-json",
2 "version": "4.1.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Convert .json files to ES6 modules",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "rollup",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/json#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
23 "lint:json": "prettier --write \"test/fixtures/!(garbage)/*.json\"",
24 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
25 "prebuild": "del-cli dist",
26 "prepare": "pnpm run build",
27 "prepublishOnly": "pnpm run lint && pnpm run test",
28 "pretest": "pnpm run build",
29 "test": "ava",
30 "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
31 },
32 "files": [
33 "dist",
34 "types",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "json",
42 "es2015",
43 "npm",
44 "modules"
45 ],
46 "peerDependencies": {
47 "rollup": "^1.20.0 || ^2.0.0"
48 },
49 "dependencies": {
50 "@rollup/pluginutils": "^3.0.8"
51 },
52 "devDependencies": {
53 "@rollup/plugin-buble": "^0.21.0",
54 "@rollup/plugin-node-resolve": "^8.4.0",
55 "rollup": "^2.23.0",
56 "source-map-support": "^0.5.19"
57 },
58 "types": "types/index.d.ts",
59 "ava": {
60 "babel": {
61 "compileEnhancements": false
62 },
63 "files": [
64 "!**/fixtures/**",
65 "!**/helpers/**",
66 "!**/recipes/**",
67 "!**/types.ts"
68 ]
69 }
70 }
+0
-15
packages/json/rollup.config.js less more
0 import buble from '@rollup/plugin-buble';
1
2 const pkg = require('./package.json');
3
4 const external = Object.keys(pkg.dependencies);
5
6 export default {
7 input: 'src/index.js',
8 output: [
9 { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'auto' },
10 { file: pkg.module, format: 'es', sourcemap: true }
11 ],
12 plugins: [buble()],
13 external
14 };
+0
-33
packages/json/src/index.js less more
0 import { createFilter, dataToEsm } from '@rollup/pluginutils';
1
2 export default function json(options = {}) {
3 const filter = createFilter(options.include, options.exclude);
4 const indent = 'indent' in options ? options.indent : '\t';
5
6 return {
7 name: 'json',
8
9 // eslint-disable-next-line no-shadow
10 transform(json, id) {
11 if (id.slice(-5) !== '.json' || !filter(id)) return null;
12
13 try {
14 const parsed = JSON.parse(json);
15 return {
16 code: dataToEsm(parsed, {
17 preferConst: options.preferConst,
18 compact: options.compact,
19 namedExports: options.namedExports,
20 indent
21 }),
22 map: { mappings: '' }
23 };
24 } catch (err) {
25 const message = 'Could not parse JSON file';
26 const position = parseInt(/[\d]/.exec(err.message)[0], 10);
27 this.warn({ message, id, position });
28 return null;
29 }
30 }
31 };
32 }
+0
-1
packages/json/test/fixtures/.eslintignore less more
0 form/**
+0
-11
packages/json/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly"
3 },
4 "rules": {
5 "import/extensions": "off",
6 "import/no-unresolved": "off",
7 "import/prefer-default-export": "off",
8 "no-console": "off"
9 }
10 }
+0
-1
packages/json/test/fixtures/array/config.json less more
0 [1, 2, 3]
+0
-3
packages/json/test/fixtures/array/main.js less more
0 import config from './config.json';
1
2 t.deepEqual(config, [1, 2, 3]);
+0
-3
packages/json/test/fixtures/basic/config.json less more
0 {
1 "answer": 42
2 }
+0
-3
packages/json/test/fixtures/basic/main.js less more
0 import config from './config.json';
1
2 t.is(config.answer, 42);
+0
-3
packages/json/test/fixtures/extensionless/config.json less more
0 {
1 "answer": 42
2 }
+0
-3
packages/json/test/fixtures/extensionless/dir/index.json less more
0 {
1 "Are extensionless imports and /index resolutions a good idea?": "No."
2 }
+0
-5
packages/json/test/fixtures/extensionless/main.js less more
0 import config from './config';
1 import questions from './dir';
2
3 t.is(config.answer, 42);
4 t.is(questions['Are extensionless imports and /index resolutions a good idea?'], 'No.');
+0
-2
packages/json/test/fixtures/form/compact.js less more
0 /* eslint-disable */
1 export var validKey=true;export var nested={subKey:"ok"};export var array=[1,"2"];export default{validKey:validKey,"invalid-key":1,nested:nested,array:array,"function":"not used","null":null};
+0
-17
packages/json/test/fixtures/form/customIndent.js less more
0 /* eslint-disable */
1 export var validKey = true;
2 export var nested = {
3 subKey: "ok"
4 };
5 export var array = [
6 1,
7 "2"
8 ];
9 export default {
10 validKey: validKey,
11 "invalid-key": 1,
12 nested: nested,
13 array: array,
14 "function": "not used",
15 "null": null
16 };
+0
-17
packages/json/test/fixtures/form/default.js less more
0 /* eslint-disable */
1 export var validKey = true;
2 export var nested = {
3 subKey: "ok"
4 };
5 export var array = [
6 1,
7 "2"
8 ];
9 export default {
10 validKey: validKey,
11 "invalid-key": 1,
12 nested: nested,
13 array: array,
14 "function": "not used",
15 "null": null
16 };
+0
-10
packages/json/test/fixtures/form/input.json less more
0 {
1 "validKey": true,
2 "invalid-key": 1,
3 "nested": {
4 "subKey": "ok"
5 },
6 "array": [1, "2"],
7 "function": "not used",
8 "null": null
9 }
+0
-14
packages/json/test/fixtures/form/namedExports.js less more
0 /* eslint-disable */
1 export default {
2 validKey: true,
3 "invalid-key": 1,
4 nested: {
5 subKey: "ok"
6 },
7 array: [
8 1,
9 "2"
10 ],
11 "function": "not used",
12 "null": null
13 };
+0
-17
packages/json/test/fixtures/form/preferConst.js less more
0 /* eslint-disable */
1 export const validKey = true;
2 export const nested = {
3 subKey: "ok"
4 };
5 export const array = [
6 1,
7 "2"
8 ];
9 export default {
10 validKey: validKey,
11 "invalid-key": 1,
12 nested: nested,
13 array: array,
14 "function": "not used",
15 "null": null
16 };
+0
-1
packages/json/test/fixtures/garbage/bad.json less more
0 not json
+0
-3
packages/json/test/fixtures/garbage/main.js less more
0 import bad from './bad.json';
1
2 console.log(bad);
+0
-1
packages/json/test/fixtures/literal/config.json less more
0 true
+0
-3
packages/json/test/fixtures/literal/main.js less more
0 import config from './config.json';
1
2 t.is(config, true);
+0
-3
packages/json/test/fixtures/named/main.js less more
0 export { version } from './package.json';
1
2 result = exports; // eslint-disable-line no-undef
+0
-4
packages/json/test/fixtures/named/package.json less more
0 {
1 "name": "this-should-be-excluded",
2 "version": "1.33.7"
3 }
+0
-5
packages/json/test/fixtures/no-valid-keys/main.js less more
0 import mimeDb from './mime-db.json';
1
2 t.deepEqual(mimeDb['application/1d-interleaved-parityfec'], {
3 source: 'iana'
4 });
+0
-11
packages/json/test/fixtures/no-valid-keys/mime-db.json less more
0 {
1 "application/1d-interleaved-parityfec": {
2 "source": "iana"
3 },
4 "application/3gpdash-qoe-report+xml": {
5 "source": "iana"
6 },
7 "application/3gpp-ims+xml": {
8 "source": "iana"
9 }
10 }
+0
-95
packages/json/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## generates correct code with compact=true
7
8 > Snapshot 1
9
10 'export var validKey=true;export var nested={subKey:"ok"};export var array=[1,"2"];export default{validKey:validKey,"invalid-key":1,nested:nested,array:array,"function":"not used","null":null};'
11
12 ## generates correct code with namedExports=false
13
14 > Snapshot 1
15
16 `export default {␊
17 validKey: true,␊
18 "invalid-key": 1,␊
19 nested: {␊
20 subKey: "ok"␊
21 },␊
22 array: [␊
23 1,␊
24 "2"␊
25 ],␊
26 "function": "not used",␊
27 "null": null␊
28 };`
29
30 ## generates correct code with preferConst
31
32 > Snapshot 1
33
34 `export const validKey = true;␊
35 export const nested = {␊
36 subKey: "ok"␊
37 };␊
38 export const array = [␊
39 1,␊
40 "2"␊
41 ];␊
42 export default {␊
43 validKey: validKey,␊
44 "invalid-key": 1,␊
45 nested: nested,␊
46 array: array,␊
47 "function": "not used",␊
48 "null": null␊
49 };␊
50 `
51
52 ## generates properly formatted code
53
54 > Snapshot 1
55
56 `export var validKey = true;␊
57 export var nested = {␊
58 subKey: "ok"␊
59 };␊
60 export var array = [␊
61 1,␊
62 "2"␊
63 ];␊
64 export default {␊
65 validKey: validKey,␊
66 "invalid-key": 1,␊
67 nested: nested,␊
68 array: array,␊
69 "function": "not used",␊
70 "null": null␊
71 };␊
72 `
73
74 ## uses custom indent string
75
76 > Snapshot 1
77
78 `export var validKey = true;␊
79 export var nested = {␊
80 subKey: "ok"␊
81 };␊
82 export var array = [␊
83 1,␊
84 "2"␊
85 ];␊
86 export default {␊
87 validKey: validKey,␊
88 "invalid-key": 1,␊
89 nested: nested,␊
90 array: array,␊
91 "function": "not used",␊
92 "null": null␊
93 };␊
94 `
packages/json/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-158
packages/json/test/test.js less more
0 const { readFileSync } = require('fs');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { nodeResolve } = require('@rollup/plugin-node-resolve');
6
7 const { testBundle } = require('../../../util/test');
8
9 const json = require('..'); // eslint-disable-line import/no-unresolved
10
11 const read = (file) => readFileSync(file, 'utf-8');
12
13 require('source-map-support').install();
14
15 process.chdir(__dirname);
16
17 test('converts json', async (t) => {
18 const bundle = await rollup({
19 input: 'fixtures/basic/main.js',
20 plugins: [json()]
21 });
22 t.plan(1);
23 return testBundle(t, bundle);
24 });
25
26 test('handles arrays', async (t) => {
27 const bundle = await rollup({
28 input: 'fixtures/array/main.js',
29 plugins: [json()]
30 });
31 t.plan(1);
32 return testBundle(t, bundle);
33 });
34
35 test('handles literals', async (t) => {
36 const bundle = await rollup({
37 input: 'fixtures/literal/main.js',
38 plugins: [json()]
39 });
40 t.plan(1);
41 return testBundle(t, bundle);
42 });
43
44 test('generates named exports', async (t) => {
45 const bundle = await rollup({
46 input: 'fixtures/named/main.js',
47 plugins: [json()]
48 });
49
50 const { code, result } = await testBundle(t, bundle, { exports: {} });
51
52 t.is(result.version, '1.33.7');
53 t.is(code.indexOf('this-should-be-excluded'), -1, 'should exclude unused properties');
54 });
55
56 test('resolves extensionless imports in conjunction with the node-resolve plugin', async (t) => {
57 const bundle = await rollup({
58 input: 'fixtures/extensionless/main.js',
59 plugins: [nodeResolve({ extensions: ['.js', '.json'] }), json()]
60 });
61 t.plan(2);
62 return testBundle(t, bundle);
63 });
64
65 test('handles JSON objects with no valid keys (#19)', async (t) => {
66 const bundle = await rollup({
67 input: 'fixtures/no-valid-keys/main.js',
68 plugins: [json()]
69 });
70 t.plan(1);
71 return testBundle(t, bundle);
72 });
73
74 test('handles garbage', async (t) => {
75 const warns = [];
76
77 await rollup({
78 input: 'fixtures/garbage/main.js',
79 plugins: [json()],
80 onwarn: (warning) => warns.push(warning)
81 }).catch(() => {});
82
83 const [{ message, id, position, plugin }] = warns;
84
85 t.is(warns.length, 1);
86 t.is(plugin, 'json');
87 t.is(position, 1);
88 t.is(message, 'Could not parse JSON file');
89 t.regex(id, /(.*)bad.json$/);
90 });
91
92 test('does not generate an AST', async (t) => {
93 // eslint-disable-next-line no-undefined
94 t.is(json().transform(read('fixtures/form/input.json'), 'input.json').ast, undefined);
95 });
96
97 test('does not generate source maps', async (t) => {
98 t.deepEqual(json().transform(read('fixtures/form/input.json'), 'input.json').map, {
99 mappings: ''
100 });
101 });
102
103 test('generates properly formatted code', async (t) => {
104 const { code } = json().transform(read('fixtures/form/input.json'), 'input.json');
105 t.snapshot(code);
106 });
107
108 test('generates correct code with preferConst', async (t) => {
109 const { code } = json({ preferConst: true }).transform(
110 read('fixtures/form/input.json'),
111 'input.json'
112 );
113 t.snapshot(code);
114 });
115
116 test('uses custom indent string', async (t) => {
117 const { code } = json({ indent: ' ' }).transform(read('fixtures/form/input.json'), 'input.json');
118 t.snapshot(code);
119 });
120
121 test('generates correct code with compact=true', async (t) => {
122 const { code } = json({ compact: true }).transform(
123 read('fixtures/form/input.json'),
124 'input.json'
125 );
126 t.snapshot(code);
127 });
128
129 test('generates correct code with namedExports=false', async (t) => {
130 const { code } = json({ namedExports: false }).transform(
131 read('fixtures/form/input.json'),
132 'input.json'
133 );
134 t.snapshot(code);
135 });
136
137 test('correctly formats arrays with compact=true', async (t) => {
138 t.deepEqual(
139 json({ compact: true }).transform(
140 `[
141 1,
142 {
143 "x": 1
144 }
145 ]`,
146 'input.json'
147 ).code,
148 'export default[1,{x:1}];'
149 );
150 });
151
152 test('handles empty keys', async (t) => {
153 t.deepEqual(
154 json().transform(`{"":"a", "b": "c"}`, 'input.json').code,
155 'export var b = "c";\nexport default {\n\t"": "a",\n\tb: b\n};\n'
156 );
157 });
+0
-23
packages/json/test/types.ts less more
0 import { RollupOptions } from 'rollup';
1
2 import json from '..';
3
4 const config: RollupOptions = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife'
9 },
10 plugins: [
11 json({
12 include: 'node_modules/**',
13 exclude: ['node_modules/foo/**', 'node_modules/bar/**'],
14 preferConst: true,
15 indent: ' ',
16 compact: true,
17 namedExports: true
18 })
19 ]
20 };
21
22 export default config;
+0
-41
packages/json/types/index.d.ts less more
0 import { FilterPattern } from '@rollup/pluginutils';
1 import { Plugin } from 'rollup';
2
3 export interface RollupJsonOptions {
4 /**
5 * All JSON files will be parsed by default,
6 * but you can also specifically include files
7 */
8 include?: FilterPattern;
9 /**
10 * All JSON files will be parsed by default,
11 * but you can also specifically exclude files
12 */
13 exclude?: FilterPattern;
14 /**
15 * For tree-shaking, properties will be declared as variables, using
16 * either `var` or `const`.
17 * @default false
18 */
19 preferConst?: boolean;
20 /**
21 * Specify indentation for the generated default export
22 * @default '\t'
23 */
24 indent?: string;
25 /**
26 * Ignores indent and generates the smallest code
27 * @default false
28 */
29 compact?: boolean;
30 /**
31 * Generate a named export for every property of the JSON object
32 * @default true
33 */
34 namedExports?: boolean;
35 }
36
37 /**
38 * Convert .json files to ES6 modules
39 */
40 export default function json(options?: RollupJsonOptions): Plugin;
+0
-15
packages/legacy/CHANGELOG.md less more
0 # @rollup/plugin-legacy ChangeLog
1
2 ## 2.0.0
3
4 _2019-11-24_
5
6 - **Breaking:** Minimum compatible Rollup version is 1.20.0
7 - **Breaking:** Minimum supported Node version is 8.0.0
8 - Published under @rollup/plugins-legacy
9
10 ## 1.0.0
11
12 _2016-12-28_
13
14 - First Release
+0
-120
packages/legacy/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-legacy
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-legacy
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-legacy
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-legacy
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-legacy
10
11 🍣 A Rollup plugin which adds `export` declarations to legacy non-module scripts.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-legacy --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import legacy from '@rollup/plugin-legacy';
31
32 export default {
33 entry: 'src/main.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [legacy({ 'vendor/some-library.js': 'someLibrary' })]
39 };
40 ```
41
42 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).
43
44 ## Options
45
46 Type: `Object`<br>
47 Default: `null`
48
49 Specifies an `Object` which defines exports used when importing corresponding scripts. The `Object` allows specifying script paths as a key, and the corresponding value as the `export`s for that script. For example:
50
51 #### `Object` Format
52
53 The `Object` format allows specifying aliases as a key, and the corresponding value as the actual `import` value. For example:
54
55 ```js
56 legacy({
57 'vendor/some-library.js': 'someLibrary',
58
59 'vendor/another-library.js': {
60 foo: 'anotherLib.foo',
61 bar: 'anotherLib.bar',
62 baz: 'anotherLib.baz'
63 }
64 });
65 ```
66
67 The configuration above will create a default export when importing `'vendor/some-library.js'` that corresponds with the `someLibrary` variable that it creates. It will also create named exports when importing `'vendor/another-library.js'`.
68
69 ## Motivation
70
71 Occasionally you'll find a useful snippet of code from the Old Days, before newfangled technology like npm. These scripts will typically expose themselves as `var someLibrary = ...` or `window.someLibrary = ...`, the expectation being that other scripts will grab a reference to the library from the global namespace.
72
73 It's usually easy enough to convert these to modules. But why bother? You can just add the `legacy` plugin, configure it accordingly, and it will be turned into a module automatically. With the example config below, the following code...
74
75 ```js
76 // vendor/some-library.js
77 var someLibrary = {
78 square: function (n) {
79 return n * n;
80 },
81 cube: function (n) {
82 return n * n * n;
83 }
84 };
85 ```
86
87 ...will have a default export appended to it, allowing other modules to access it:
88
89 ```js
90 export default someLibrary;
91 ```
92
93 It can also handle named exports. Using the same config, this...
94
95 ```js
96 // vendor/another-library.js
97 var anotherLibrary = {
98 foo: ...,
99 bar: ...,
100 baz: ...
101 };
102 ```
103
104 ...will get the following appended:
105
106 ```js
107 var __export0 = anotherLibrary.foo;
108 export { __export0 as foo };
109 var __export0 = anotherLibrary.bar;
110 export { __export0 as bar };
111 var __export0 = anotherLibrary.baz;
112 export { __export0 as baz };
113 ```
114
115 ## Meta
116
117 [CONTRIBUTING](/.github/CONTRIBUTING.md)
118
119 [LICENSE (MIT)](/LICENSE)
+0
-59
packages/legacy/package.json less more
0 {
1 "name": "@rollup/plugin-legacy",
2 "version": "2.0.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Add export statements to plain scripts",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/legacy/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "prebuild": "del-cli dist",
25 "prepare": "pnpm run build",
26 "prepublishOnly": "pnpm run lint",
27 "pretest": "pnpm run build",
28 "test": "ava"
29 },
30 "files": [
31 "dist",
32 "README.md",
33 "LICENSE"
34 ],
35 "keywords": [
36 "rollup",
37 "plugin"
38 ],
39 "peerDependencies": {
40 "rollup": "^1.20.0||^2.0.0"
41 },
42 "devDependencies": {
43 "@rollup/plugin-buble": "^0.21.3",
44 "del-cli": "^3.0.1",
45 "rollup": "^2.23.0"
46 },
47 "ava": {
48 "babel": {
49 "compileEnhancements": false
50 },
51 "files": [
52 "!**/fixtures/**",
53 "!**/helpers/**",
54 "!**/recipes/**",
55 "!**/types.ts"
56 ]
57 }
58 }
+0
-13
packages/legacy/rollup.config.js less more
0 import buble from '@rollup/plugin-buble';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.js',
6 plugins: [buble()],
7 external: ['path'],
8 output: [
9 { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'auto' },
10 { file: pkg.module, format: 'es', sourcemap: true }
11 ]
12 };
+0
-49
packages/legacy/src/index.js less more
0 import { resolve } from 'path';
1
2 const validName = /^[a-zA-Z_$][a-zA-Z$_0-9]*$/;
3
4 export default function legacy(options) {
5 const exports = {};
6 Object.keys(options).forEach((file) => {
7 exports[resolve(file)] = options[file];
8 });
9
10 return {
11 name: 'legacy',
12
13 transform(content, id) {
14 if (id in exports) {
15 let code = content;
16 const value = exports[id];
17
18 if (typeof value === 'string') {
19 // default export
20 code += `\nexport default ${value};`;
21 } else {
22 const statements = [];
23 let i = 1;
24
25 Object.entries(value).forEach(([key, name]) => {
26 if (name === key) {
27 statements.push(`export { ${key} };`);
28 } else if (validName.test(name)) {
29 statements.push(`export { ${name} as ${key} };`);
30 } else {
31 statements.push(`var __export${i} = ${name};\nexport { __export${i} as ${key} };`);
32 i += 1;
33 }
34 });
35
36 code += `\n${statements.join('\n')}`;
37 }
38
39 // TODO need a way to say 'sourcemap hasn't changed
40 return {
41 code,
42 map: { mappings: '' }
43 };
44 }
45 return null;
46 }
47 };
48 }
+0
-5
packages/legacy/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly"
3 }
4 }
+0
-3
packages/legacy/test/fixtures/default-export/answer.js less more
0 /* eslint-disable */
1
2 var answer = 42;
+0
-3
packages/legacy/test/fixtures/default-export/main.js less more
0 import answer from './answer';
1
2 t.is(answer, 42);
+0
-3
packages/legacy/test/fixtures/named-exports-changed/answer.js less more
0 /* eslint-disable */
1
2 var answerToLifeTheUniverseAndEverything = 42;
+0
-3
packages/legacy/test/fixtures/named-exports-changed/main.js less more
0 import { answer } from './answer';
1
2 t.is(answer, 42);
+0
-5
packages/legacy/test/fixtures/named-exports-nested/answer.js less more
0 /* eslint-disable */
1
2 var obj = {
3 answer: 42
4 };
+0
-3
packages/legacy/test/fixtures/named-exports-nested/main.js less more
0 import { answer } from './answer';
1
2 t.is(answer, 42);
+0
-3
packages/legacy/test/fixtures/named-exports-unchanged/answer.js less more
0 /* eslint-disable */
1
2 var answer = 42;
+0
-3
packages/legacy/test/fixtures/named-exports-unchanged/main.js less more
0 import { answer } from './answer';
1
2 t.is(answer, 42);
+0
-66
packages/legacy/test/test.js less more
0 const test = require('ava');
1 const { rollup } = require('rollup');
2
3 const { testBundle } = require('../../../util/test');
4
5 const legacy = require('..');
6
7 process.chdir(__dirname);
8
9 test('adds a default export', async (t) => {
10 const bundle = await rollup({
11 input: 'fixtures/default-export/main.js',
12 plugins: [
13 legacy({
14 './fixtures/default-export/answer.js': 'answer'
15 })
16 ]
17 });
18 t.plan(1);
19 await testBundle(t, bundle);
20 });
21
22 test('adds a changed named export', async (t) => {
23 const bundle = await rollup({
24 input: 'fixtures/named-exports-changed/main.js',
25 plugins: [
26 legacy({
27 './fixtures/named-exports-changed/answer.js': {
28 answer: 'answerToLifeTheUniverseAndEverything'
29 }
30 })
31 ]
32 });
33 t.plan(1);
34 await testBundle(t, bundle);
35 });
36
37 test('adds a nested named export', async (t) => {
38 const bundle = await rollup({
39 input: 'fixtures/named-exports-nested/main.js',
40 plugins: [
41 legacy({
42 './fixtures/named-exports-nested/answer.js': {
43 answer: 'obj.answer'
44 }
45 })
46 ]
47 });
48 t.plan(1);
49 await testBundle(t, bundle);
50 });
51
52 test('adds a unchanged named export', async (t) => {
53 const bundle = await rollup({
54 input: 'fixtures/named-exports-unchanged/main.js',
55 plugins: [
56 legacy({
57 './fixtures/named-exports-unchanged/answer.js': {
58 answer: 'answer'
59 }
60 })
61 ]
62 });
63 t.plan(1);
64 await testBundle(t, bundle);
65 });
+0
-24
packages/multi-entry/CHANGELOG.md less more
0 # @rollup/plugin-multi-entry ChangeLog
1
2 ## v4.0.0
3
4 _2020-08-13_
5
6 ### Breaking Changes
7
8 - refactor!: virtualised & entryFileName (#520)
9 - chore: update dependencies (afd93a3)
10
11 ## v3.0.1
12
13 _2020-05-11_
14
15 ### Updates
16
17 - chore: rollup v2 peerDep. (dupe for pub) (6ed176b)
18
19 ## 3.0.0
20
21 _2019-12-15_
22
23 - First publish of scoped package. For details on prior versions, please see https://github.com/rollup/rollup-plugin-multi-entry/releases
+0
-132
packages/multi-entry/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-multi-entry
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-multi-entry
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-multi-entry
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-multi-entry
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-multi-entry
10
11 🍣 A Rollup plugin which allows use of multiple entry points for a bundle.
12
13 As an added bonus, the _named exports_ from all entry points will be combined. This is particularly useful for tests, but can also be used to package a library.
14
15 _Note: `default` exports cannot be combined and exported by this plugin. Only named exports will be exported._
16
17 ## Requirements
18
19 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.3.0+) and Rollup v1.20.0+.
20
21 ## Install
22
23 Using npm:
24
25 ```console
26 npm install @rollup/plugin-multi-entry --save-dev
27 ```
28
29 ## Usage
30
31 Suppose that we have three separate source files, each with their own export(s):
32
33 ```js
34 // batman.js
35 export const belt = 'utility';
36 ```
37
38 ```js
39 // robin.js
40 export const tights = 'tight';
41 ```
42
43 ```js
44 // joker.js
45 export const color = 'purple';
46 ```
47
48 Then, create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
49
50 ```js
51 import multi from '@rollup/plugin-multi-entry';
52
53 export default {
54 input: ['batman.js', 'robin.js', 'joker.js'],
55 output: {
56 dir: 'output'
57 },
58 plugins: [multi()]
59 };
60 ```
61
62 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).
63
64 Using all three files above as entry points will yield a bundle with exports for `belt`, `tights`, and `color`.
65
66 ## Options
67
68 ### `exports`
69
70 Type: `Boolean`<br>
71 Default: `true`
72
73 If `true`, instructs the plugin to export named exports to the bundle from all entries. If `false`, the plugin will not export any entry exports to the bundle. This can be useful when wanting to combine code from multiple entry files, but not necessarily to export each entry file's exports.
74
75 ### `entryFileName`
76
77 Type: `String`<br>
78 Default: `'multi-entry.js'`
79
80 `entryFileName` changes the name of the generated entry file. By default, it will override `outputOptions.entryFileNames` to be `'multi-entry.js'`.
81
82 ## Supported Input Types
83
84 This plugin extends Rollup's `input` option to support multiple new value types, in addition to a `String` specifying a path to a file.
85
86 ### Glob
87
88 When using `plugin-multi-entry`, input values passed as a normal `String` are [glob aware](<https://en.wikipedia.org/wiki/Glob_(programming)>). Meaning you can utilize glob wildcards and other glob patterns to specify files as being input files.
89
90 ```js
91 export default {
92 input: 'batcave/friends/**/*.js',
93 plugins: [multi()]
94 // ...
95 };
96 ```
97
98 ### Array
99
100 An `Array` of `String` can be passed as the input. Values are glob-aware and can specify paths or globbed paths.
101
102 ```js
103 export default {
104 input: ['party/supplies.js', 'batcave/friends/**/*.js'],
105 plugins: [multi()]
106 // ...
107 };
108 ```
109
110 ### `include` and `exclude`
111
112 For fine-grain control, an `Object` may be passed containing `include` and `exclude` properties. These properties specify and `Array` of `String` representing paths (which are also glob-aware) which should be included as entry files, as well as files that should be excluded from any entries that may have been found with `include`, respectively.
113
114 ```js
115 export default {
116 input: {
117 // invite everyone!
118 include: ['food.js', 'drinks.js', 'batcave/friends/**/*.js'],
119 // except for the joker
120 exclude: ['**/joker.js']
121 },
122 plugins: [multi()]
123 // ...
124 };
125 ```
126
127 ## Meta
128
129 [CONTRIBUTING](/.github/CONTRIBUTING.md)
130
131 [LICENSE (MIT)](/LICENSE)
+0
-68
packages/multi-entry/package.json less more
0 {
1 "name": "@rollup/plugin-multi-entry",
2 "version": "4.0.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Use multiple entry points for a bundle",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "rollup",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/multi-entry/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "multi",
42 "multiple",
43 "entry",
44 "entries"
45 ],
46 "peerDependencies": {
47 "rollup": "^1.20.0 || ^2.0.0"
48 },
49 "dependencies": {
50 "@rollup/plugin-virtual": "^2.0.3",
51 "matched": "^5.0.0"
52 },
53 "devDependencies": {
54 "rollup": "^2.23.0"
55 },
56 "ava": {
57 "babel": {
58 "compileEnhancements": false
59 },
60 "files": [
61 "!**/fixtures/**",
62 "!**/helpers/**",
63 "!**/recipes/**",
64 "!**/types.ts"
65 ]
66 }
67 }
+0
-10
packages/multi-entry/rollup.config.js less more
0 const pkg = require('./package.json');
1
2 export default {
3 input: 'src/index.js',
4 external: Object.keys(pkg.dependencies),
5 output: [
6 { format: 'cjs', file: pkg.main, exports: 'auto' },
7 { format: 'es', file: pkg.module }
8 ]
9 };
+0
-77
packages/multi-entry/src/index.js less more
0 /* eslint-disable no-param-reassign */
1
2 import virtual from '@rollup/plugin-virtual';
3 import { promise as matched } from 'matched';
4
5 const DEFAULT_OUTPUT = 'multi-entry.js';
6 const AS_IMPORT = 'import';
7 const AS_EXPORT = 'export * from';
8
9 export default function multiEntry(conf = {}) {
10 const config = {
11 include: [],
12 exclude: [],
13 entryFileName: DEFAULT_OUTPUT,
14 exports: true,
15 ...conf
16 };
17
18 let prefix = config.exports === false ? AS_IMPORT : AS_EXPORT;
19 const exporter = (path) => `${prefix} ${JSON.stringify(path)}`;
20
21 const configure = (input) => {
22 if (typeof input === 'string') {
23 config.include = [input];
24 } else if (Array.isArray(input)) {
25 config.include = input;
26 } else {
27 const { include = [], exclude = [], entryFileName = DEFAULT_OUTPUT, exports } = input;
28 config.include = include;
29 config.exclude = exclude;
30 config.entryFileName = entryFileName;
31 if (exports === false) {
32 prefix = AS_IMPORT;
33 }
34 }
35 };
36
37 let virtualisedEntry;
38
39 return {
40 name: 'multi-entry',
41
42 options(options) {
43 if (options.input !== config.entryFileName) {
44 configure(options.input);
45 }
46 return {
47 ...options,
48 input: config.entryFileName
49 };
50 },
51
52 outputOptions(options) {
53 return {
54 ...options,
55 entryFileNames: config.entryFileName
56 };
57 },
58
59 buildStart(options) {
60 const patterns = config.include.concat(config.exclude.map((pattern) => `!${pattern}`));
61 const entries = patterns.length
62 ? matched(patterns, { realpath: true }).then((paths) => paths.map(exporter).join('\n'))
63 : Promise.resolve('');
64
65 virtualisedEntry = virtual({ [options.input]: entries });
66 },
67
68 resolveId(id, importer) {
69 return virtualisedEntry && virtualisedEntry.resolveId(id, importer);
70 },
71
72 load(id) {
73 return virtualisedEntry && virtualisedEntry.load(id);
74 }
75 };
76 }
+0
-6
packages/multi-entry/test/fixtures/.eslintrc less more
0 {
1 "rules": {
2 "import/prefer-default-export": "off",
3 "no-console": "off"
4 }
5 }
+0
-1
packages/multi-entry/test/fixtures/0.js less more
0 export const zero = 0;
+0
-1
packages/multi-entry/test/fixtures/1.js less more
0 export const one = 1;
+0
-1
packages/multi-entry/test/fixtures/2.js less more
0 console.log('Hello, 2');
+0
-83
packages/multi-entry/test/test.js less more
0 /* eslint-disable no-bitwise */
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4
5 import { getCode } from '../../../util/test';
6
7 import multiEntry from '../';
8
9 test('takes a single file as input', async (t) => {
10 const bundle = await rollup({ input: 'test/fixtures/0.js', plugins: [multiEntry()] });
11 const code = await getCode(bundle);
12 t.truthy(code.includes('exports.zero = zero;'));
13 });
14
15 test('takes an array of files as input', async (t) => {
16 const bundle = await rollup({
17 input: ['test/fixtures/0.js', 'test/fixtures/1.js'],
18 plugins: [multiEntry()]
19 });
20 const code = await getCode(bundle);
21 t.truthy(code.includes('exports.zero = zero;'));
22 t.truthy(code.includes('exports.one = one;'));
23 });
24
25 test('allows an empty array as input', async (t) => {
26 const bundle = await rollup({ input: [], plugins: [multiEntry()] });
27 const code = await getCode(bundle);
28 t.falsy(code.includes('exports'));
29 });
30
31 test('takes a glob as input', async (t) => {
32 const bundle = await rollup({ input: 'test/fixtures/{0,1}.js', plugins: [multiEntry()] });
33 const code = await getCode(bundle);
34 t.truthy(code.includes('exports.zero = zero;'));
35 t.truthy(code.includes('exports.one = one;'));
36 });
37
38 test('takes an array of globs as input', async (t) => {
39 const bundle = await rollup({
40 input: ['test/fixtures/{0,}.js', 'test/fixtures/{1,}.js'],
41 plugins: [multiEntry()]
42 });
43 const code = await getCode(bundle);
44 t.truthy(code.includes('exports.zero = zero;'));
45 t.truthy(code.includes('exports.one = one;'));
46 });
47
48 test('takes an {include,exclude} object as input', async (t) => {
49 const bundle = await rollup({
50 input: {
51 include: ['test/fixtures/*.js'],
52 exclude: ['test/fixtures/1.js']
53 },
54 plugins: [multiEntry()]
55 });
56 const code = await getCode(bundle);
57 t.truthy(code.includes('exports.zero = zero;'));
58 t.falsy(code.includes('exports.one = one;'));
59 });
60
61 test('allows to prevent exporting', async (t) => {
62 const bundle = await rollup({
63 input: {
64 include: ['test/fixtures/*.js'],
65 exports: false
66 },
67 plugins: [multiEntry()]
68 });
69 const code = await getCode(bundle);
70 t.truthy(code.includes(`console.log('Hello, 2');`));
71 t.falsy(code.includes('zero'));
72 t.falsy(code.includes('one'));
73 });
74
75 test('makes a bundle with entryFileName as the filename', async (t) => {
76 const bundle = await rollup({
77 input: 'test/fixtures/{0,1}.js',
78 plugins: [multiEntry({ entryFileName: 'testing.js' })]
79 });
80 const [result] = await getCode(bundle, { format: 'cjs' }, true);
81 t.is(result.fileName, 'testing.js');
82 });
+0
-1
packages/node-resolve/.eslintignore less more
0 test/fixtures/**/node_modules
+0
-330
packages/node-resolve/CHANGELOG.md less more
0 # @rollup/plugin-node-resolve ChangeLog
1
2 ## v9.0.0
3
4 _2020-08-13_
5
6 ### Breaking Changes
7
8 - chore: update dependencies (e632469)
9
10 ### Updates
11
12 - refactor: remove deep-freeze from dependencies (#529)
13 - chore: clean up changelog (84dfddb)
14
15 ## v8.4.0
16
17 _2020-07-12_
18
19 ### Features
20
21 - feat: preserve search params and hashes (#487)
22 - feat: support .js imports in TypeScript (#480)
23
24 ### Updates
25
26 - docs: fix named export use in readme (#456)
27 - docs: correct mainFields valid values (#469)
28
29 ## v8.1.0
30
31 _2020-06-22_
32
33 ### Features
34
35 - feat: add native node es modules support (#413)
36
37 ## v8.0.1
38
39 _2020-06-05_
40
41 ### Bugfixes
42
43 - fix: handle nested entry modules with the resolveOnly option (#430)
44
45 ## v8.0.0
46
47 _2020-05-20_
48
49 ### Breaking Changes
50
51 - feat: Add default export (#361)
52 - feat: export defaults (#301)
53
54 ### Bugfixes
55
56 - fix: resolve local files if `resolveOption` is set (#337)
57
58 ### Updates
59
60 - docs: correct misspelling (#343)
61
62 ## v7.1.3
63
64 _2020-04-12_
65
66 ### Bugfixes
67
68 - fix: resolve symlinked entry point properly (#291)
69
70 ## v7.1.2
71
72 _2020-04-12_
73
74 ### Updates
75
76 - docs: fix url (#289)
77
78 ## v7.1.1
79
80 _2020-02-03_
81
82 ### Bugfixes
83
84 - fix: main fields regression (#196)
85
86 ## v7.1.0
87
88 _2020-02-01_
89
90 ### Updates
91
92 - refactor: clean codebase and fix external warnings (#155)
93
94 ## v7.0.0
95
96 _2020-01-07_
97
98 ### Breaking Changes
99
100 - feat: dedupe by package name (#99)
101
102 ## v6.1.0
103
104 _2020-01-04_
105
106 ### Bugfixes
107
108 - fix: allow deduplicating custom module dirs (#101)
109
110 ### Features
111
112 - feat: add rootDir option (#98)
113
114 ### Updates
115
116 - docs: improve doc related to mainFields (#138)
117
118 ## 6.0.0
119
120 _2019-11-25_
121
122 - **Breaking:** Minimum compatible Rollup version is 1.20.0
123 - **Breaking:** Minimum supported Node version is 8.0.0
124 - Published as @rollup/plugin-node-resolve
125
126 ## 5.2.1 (unreleased)
127
128 - add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO)
129 - Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov)
130 - Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU)
131
132 ## 5.2.0 (2019-06-29)
133
134 - dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat)
135
136 ## 5.1.1 (2019-06-29)
137
138 - Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert)
139
140 ## 5.1.0 (2019-06-22)
141
142 - Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson)
143
144 ## 5.0.4 (2019-06-22)
145
146 - Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder)
147
148 ## 5.0.3 (2019-06-16)
149
150 - Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat)
151
152 ## 5.0.2 (2019-06-13)
153
154 - Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson)
155
156 ## 5.0.1 (2019-05-31)
157
158 - Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus)
159
160 ## 5.0.0 (2019-05-15)
161
162 - Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc)
163 - Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert)
164
165 ### Breaking Changes
166
167 - Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected)
168 - If used with rollup-plugin-commonjs, it should be at least v10.0.0
169
170 ## 4.2.4 (2019-05-11)
171
172 - Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus)
173 - Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc)
174 - Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus)
175
176 ## 4.2.3 (2019-04-11)
177
178 - Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert)
179
180 ## 4.2.2 (2019-04-10)
181
182 - Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal)
183 - Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry)
184
185 ## 4.2.1 (2019-04-06)
186
187 - Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward)
188
189 ## 4.2.0 (2019-04-06)
190
191 - Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus)
192 - Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy)
193
194 ## 4.1.0 (2019-04-05)
195
196 - Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods)
197 - Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert)
198
199 ## 4.0.1 (2019-02-22)
200
201 - Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus)
202 - Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex)
203
204 ## 4.0.0 (2018-12-09)
205
206 This release will support rollup@1.0
207
208 ### Features
209
210 - Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
211 - Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
212
213 ## 3.4.0 (2018-09-04)
214
215 This release now supports `.mjs` files by default
216
217 ### Features
218
219 - feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
220
221 ## 3.3.0 (2018-03-17)
222
223 This release adds the `only` option
224
225 ### New Features
226
227 - feat: add `only` option (#83; @arantes555)
228
229 ### Docs
230
231 - docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
232
233 ## 3.2.0 (2018-03-07)
234
235 This release caches reading/statting of files, to improve speed.
236
237 ### Performance Improvements
238
239 - perf: cache file stats/reads (#126; @keithamus)
240
241 ## 3.0.4 (unreleased)
242
243 - Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137)
244 - Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138)
245 - Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142)
246
247 ## 3.0.3
248
249 - Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131)
250
251 ## 3.0.2
252
253 - Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129))
254
255 ## 3.0.1
256
257 - Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127))
258
259 ## 3.0.0
260
261 - [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90))
262 - Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96))
263
264 ## 2.1.1
265
266 - Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93))
267
268 ## 2.1.0
269
270 - Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53))
271 - Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79))
272 - Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82))
273
274 ## 2.0.0
275
276 - Add support `module` field in package.json as an official alternative to jsnext
277
278 ## 1.7.3
279
280 - Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50))
281
282 ## 1.7.2
283
284 - Allow entry point paths beginning with ./
285
286 ## 1.7.1
287
288 - Return a `name`
289
290 ## 1.7.0
291
292 - Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32))
293
294 ## 1.6.0
295
296 - Skip IDs containing null character
297
298 ## 1.5.0
299
300 - Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28))
301
302 ## 1.4.0
303
304 - Pass `options.extensions` through to `node-resolve`
305
306 ## 1.3.0
307
308 - `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16))
309
310 ## 1.2.1
311
312 - Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15))
313
314 ## 1.2.0
315
316 - Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8))
317 - Get tests to pass on Windows
318
319 ## 1.1.0
320
321 - Use node-resolve to handle various corner cases
322
323 ## 1.0.0
324
325 - Add ES6 build, use Rollup 0.20.0
326
327 ## 0.1.0
328
329 - First release
+0
-21
packages/node-resolve/LICENSE less more
0 The MIT License (MIT)
1
2 Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
+0
-194
packages/node-resolve/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-node-resolve
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-node-resolve
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-node-resolve
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-node-resolve
10
11 🍣 A Rollup plugin which locates modules using the [Node resolution algorithm](https://nodejs.org/api/modules.html#modules_all_together), for using third party modules in `node_modules`
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-node-resolve --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import { nodeResolve } from '@rollup/plugin-node-resolve';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [nodeResolve()]
39 };
40 ```
41
42 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).
43
44 ## Options
45
46 ### `browser`
47
48 Type: `Boolean`<br>
49 Default: `false`
50
51 If `true`, instructs the plugin to use the `"browser"` property in `package.json` files to specify alternative files to load for bundling. This is useful when bundling for a browser environment. Alternatively, a value of `'browser'` can be added to the `mainFields` option. If `false`, any `"browser"` properties in package files will be ignored. This option takes precedence over `mainFields`.
52
53 ### `customResolveOptions`
54
55 Type: `Object`<br>
56 Default: `null`
57
58 An `Object` that specifies additional options that should be passed through to [`resolve`](https://www.npmjs.com/package/resolve).
59
60 ```
61 customResolveOptions: {
62 moduleDirectory: 'js_modules'
63 }
64 ```
65
66 ### `dedupe`
67
68 Type: `Array[...String]`<br>
69 Default: `[]`
70
71 An `Array` of modules names, which instructs the plugin to force resolving for the specified modules to the root `node_modules`. Helps to prevent bundling the same package multiple times if package is imported from dependencies.
72
73 ```js
74 dedupe: ['my-package', '@namespace/my-package'];
75 ```
76
77 This will deduplicate bare imports such as:
78
79 ```js
80 import 'my-package';
81 import '@namespace/my-package';
82 ```
83
84 And it will deduplicate deep imports such as:
85
86 ```js
87 import 'my-package/foo.js';
88 import '@namespace/my-package/bar.js';
89 ```
90
91 ### `extensions`
92
93 Type: `Array[...String]`<br>
94 Default: `['.mjs', '.js', '.json', '.node']`
95
96 Specifies the extensions of files that the plugin will operate on.
97
98 ### `jail`
99
100 Type: `String`<br>
101 Default: `'/'`
102
103 Locks the module search within specified path (e.g. chroot). Modules defined outside this path will be marked as external.
104
105 ### `mainFields`
106
107 Type: `Array[...String]`<br>
108 Default: `['module', 'main']`<br>
109 Valid values: `['browser', 'jsnext:main', 'module', 'main']`
110
111 Specifies the properties to scan within a `package.json`, used to determine the bundle entry point. The order of property names is significant, as the first-found property is used as the resolved entry point. If the array contains `'browser'`, key/values specified in the `package.json` `browser` property will be used.
112
113 ### `only`
114
115 DEPRECATED: use "resolveOnly" instead
116
117 ### `preferBuiltins`
118
119 Type: `Boolean`<br>
120 Default: `true`
121
122 If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, the plugin will look for locally installed modules of the same name.
123
124 ### `modulesOnly`
125
126 Type: `Boolean`<br>
127 Default: `false`
128
129 If `true`, inspect resolved files to assert that they are ES2015 modules.
130
131 ### `resolveOnly`
132
133 Type: `Array[...String|RegExp]`<br>
134 Default: `null`
135
136 An `Array` which instructs the plugin to limit module resolution to those whose names match patterns in the array. _Note: Modules not matching any patterns will be marked as external._
137
138 Example: `resolveOnly: ['batman', /^@batcave\/.*$/]`
139
140 ### `rootDir`
141
142 Type: `String`<br>
143 Default: `process.cwd()`
144
145 Specifies the root directory from which to resolve modules. Typically used when resolving entry-point imports, and when resolving deduplicated modules. Useful when executing rollup in a package of a mono-repository.
146
147 ```
148 // Set the root directory to be the parent folder
149 rootDir: path.join(process.cwd(), '..')
150 ```
151
152 ## Using with @rollup/plugin-commonjs
153
154 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/tree/master/packages/commonjs):
155
156 ```js
157 // rollup.config.js
158 import resolve from '@rollup/plugin-node-resolve';
159 import commonjs from '@rollup/plugin-commonjs';
160
161 export default {
162 input: 'main.js',
163 output: {
164 file: 'bundle.js',
165 format: 'iife',
166 name: 'MyModule'
167 },
168 plugins: [resolve(), commonjs()]
169 };
170 ```
171
172 ## Resolving Built-Ins (like `fs`)
173
174 This plugin won't resolve any builtins (e.g. `fs`). If you need to resolve builtins you can install local modules and set `preferBuiltins` to `false`, or install a plugin like [rollup-plugin-node-polyfills](https://github.com/ionic-team/rollup-plugin-node-polyfills) which provides stubbed versions of these methods.
175
176 If you want to silence warnings about builtins, you can add the list of builtins to the `externals` option; like so:
177
178 ```js
179 import resolve from '@rollup/plugin-node-resolve';
180 import builtins from 'builtin-modules'
181 export default ({
182 input: ...,
183 plugins: [resolve()],
184 external: builtins,
185 output: ...
186 })
187 ```
188
189 ## Meta
190
191 [CONTRIBUTING](/.github/CONTRIBUTING.md)
192
193 [LICENSE (MIT)](/LICENSE)
+0
-87
packages/node-resolve/package.json less more
0 {
1 "name": "@rollup/plugin-node-resolve",
2 "version": "9.0.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Locate and bundle third-party dependencies in node_modules",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris <richard.a.harris@gmail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/node-resolve/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "./dist/cjs/index.js",
13 "module": "./dist/es/index.js",
14 "engines": {
15 "node": ">= 10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run test:ts",
30 "pretest": "pnpm run build",
31 "test": "ava",
32 "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
33 },
34 "files": [
35 "dist",
36 "types",
37 "README.md",
38 "LICENSE"
39 ],
40 "keywords": [
41 "rollup",
42 "plugin",
43 "es2015",
44 "npm",
45 "modules"
46 ],
47 "peerDependencies": {
48 "rollup": "^1.20.0||^2.0.0"
49 },
50 "dependencies": {
51 "@rollup/pluginutils": "^3.1.0",
52 "@types/resolve": "1.17.1",
53 "builtin-modules": "^3.1.0",
54 "deepmerge": "^4.2.2",
55 "is-module": "^1.0.0",
56 "resolve": "^1.17.0"
57 },
58 "devDependencies": {
59 "@babel/core": "^7.10.5",
60 "@babel/plugin-transform-typescript": "^7.10.5",
61 "@rollup/plugin-babel": "^5.1.0",
62 "@rollup/plugin-commonjs": "^14.0.0",
63 "@rollup/plugin-json": "^4.1.0",
64 "es5-ext": "^0.10.53",
65 "rollup": "^2.23.0",
66 "source-map": "^0.7.3",
67 "string-capitalize": "^1.0.1"
68 },
69 "types": "types/index.d.ts",
70 "ava": {
71 "babel": {
72 "compileEnhancements": false
73 },
74 "files": [
75 "!**/fixtures/**",
76 "!**/helpers/**",
77 "!**/recipes/**",
78 "!**/types.ts"
79 ]
80 },
81 "exports": {
82 "require": "./dist/cjs/index.js",
83 "import": "./dist/es/index.js"
84 },
85 "type": "commonjs"
86 }
+0
-15
packages/node-resolve/rollup.config.js less more
0 import json from '@rollup/plugin-json';
1
2 import { emitModulePackageFile } from '../../shared/rollup.config';
3
4 import pkg from './package.json';
5
6 export default {
7 input: 'src/index.js',
8 plugins: [json()],
9 external: Object.keys(pkg.dependencies).concat(['fs', 'path', 'os', 'util']),
10 output: [
11 { file: pkg.main, format: 'cjs', exports: 'named' },
12 { file: pkg.module, format: 'es', plugins: [emitModulePackageFile()] }
13 ]
14 };
+0
-55
packages/node-resolve/src/cache.js less more
0 import { readFile, stat } from './fs';
1
2 const onError = (error) => {
3 if (error.code === 'ENOENT') {
4 return false;
5 }
6 throw error;
7 };
8
9 const makeCache = (fn) => {
10 const cache = new Map();
11 const wrapped = async (param, done) => {
12 if (cache.has(param) === false) {
13 cache.set(
14 param,
15 fn(param).catch((err) => {
16 cache.delete(param);
17 throw err;
18 })
19 );
20 }
21
22 try {
23 const result = cache.get(param);
24 const value = await result;
25 return done(null, value);
26 } catch (error) {
27 return done(error);
28 }
29 };
30
31 wrapped.clear = () => cache.clear();
32
33 return wrapped;
34 };
35
36 export const isDirCached = makeCache(async (file) => {
37 try {
38 const stats = await stat(file);
39 return stats.isDirectory();
40 } catch (error) {
41 return onError(error);
42 }
43 });
44
45 export const isFileCached = makeCache(async (file) => {
46 try {
47 const stats = await stat(file);
48 return stats.isFile();
49 } catch (error) {
50 return onError(error);
51 }
52 });
53
54 export const readCachedFile = makeCache(readFile);
+0
-9
packages/node-resolve/src/fs.js less more
0 import fs from 'fs';
1
2 import { promisify } from 'util';
3
4 export const exists = promisify(fs.exists);
5 export const readFile = promisify(fs.readFile);
6 export const realpath = promisify(fs.realpath);
7 export { realpathSync } from 'fs';
8 export const stat = promisify(fs.stat);
+0
-293
packages/node-resolve/src/index.js less more
0 /* eslint-disable no-param-reassign, no-shadow, no-undefined */
1 import { dirname, normalize, resolve, sep } from 'path';
2
3 import builtinList from 'builtin-modules';
4 import deepMerge from 'deepmerge';
5 import isModule from 'is-module';
6
7 import { isDirCached, isFileCached, readCachedFile } from './cache';
8 import { exists, readFile, realpath } from './fs';
9 import {
10 getMainFields,
11 getPackageInfo,
12 getPackageName,
13 normalizeInput,
14 resolveImportSpecifiers
15 } from './util';
16
17 const builtins = new Set(builtinList);
18 const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
19 const nullFn = () => null;
20 const deepFreeze = object => {
21 Object.freeze(object);
22
23 for (const value of Object.values(object)) {
24 if (typeof value === 'object' && !Object.isFrozen(value)) {
25 deepFreeze(value);
26 }
27 }
28
29 return object;
30 };
31 const defaults = {
32 customResolveOptions: {},
33 dedupe: [],
34 // It's important that .mjs is listed before .js so that Rollup will interpret npm modules
35 // which deploy both ESM .mjs and CommonJS .js files as ESM.
36 extensions: ['.mjs', '.js', '.json', '.node'],
37 resolveOnly: []
38 };
39 export const DEFAULTS = deepFreeze(deepMerge({}, defaults));
40
41 export function nodeResolve(opts = {}) {
42 const options = Object.assign({}, defaults, opts);
43 const { customResolveOptions, extensions, jail } = options;
44 const warnings = [];
45 const packageInfoCache = new Map();
46 const idToPackageInfo = new Map();
47 const mainFields = getMainFields(options);
48 const useBrowserOverrides = mainFields.indexOf('browser') !== -1;
49 const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false;
50 const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true;
51 const rootDir = options.rootDir || process.cwd();
52 let { dedupe } = options;
53 let rollupOptions;
54
55 if (options.only) {
56 warnings.push('node-resolve: The `only` options is deprecated, please use `resolveOnly`');
57 options.resolveOnly = options.only;
58 }
59
60 if (typeof dedupe !== 'function') {
61 dedupe = (importee) =>
62 options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
63 }
64
65 const resolveOnly = options.resolveOnly.map((pattern) => {
66 if (pattern instanceof RegExp) {
67 return pattern;
68 }
69 const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
70 return new RegExp(`^${normalized}$`);
71 });
72
73 const browserMapCache = new Map();
74 let preserveSymlinks;
75
76 return {
77 name: 'node-resolve',
78
79 buildStart(options) {
80 rollupOptions = options;
81
82 for (const warning of warnings) {
83 this.warn(warning);
84 }
85
86 ({ preserveSymlinks } = options);
87 },
88
89 generateBundle() {
90 readCachedFile.clear();
91 isFileCached.clear();
92 isDirCached.clear();
93 },
94
95 async resolveId(importee, importer) {
96 if (importee === ES6_BROWSER_EMPTY) {
97 return importee;
98 }
99 // ignore IDs with null character, these belong to other plugins
100 if (/\0/.test(importee)) return null;
101
102 // strip hash and query params from import
103 const [withoutHash, hash] = importee.split('#');
104 const [importPath, params] = withoutHash.split('?');
105 const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`;
106 importee = importPath;
107
108 const basedir = !importer || dedupe(importee) ? rootDir : dirname(importer);
109
110 // https://github.com/defunctzombie/package-browser-field-spec
111 const browser = browserMapCache.get(importer);
112 if (useBrowserOverrides && browser) {
113 const resolvedImportee = resolve(basedir, importee);
114 if (browser[importee] === false || browser[resolvedImportee] === false) {
115 return ES6_BROWSER_EMPTY;
116 }
117 const browserImportee =
118 browser[importee] ||
119 browser[resolvedImportee] ||
120 browser[`${resolvedImportee}.js`] ||
121 browser[`${resolvedImportee}.json`];
122 if (browserImportee) {
123 importee = browserImportee;
124 }
125 }
126
127 const parts = importee.split(/[/\\]/);
128 let id = parts.shift();
129 let isRelativeImport = false;
130
131 if (id[0] === '@' && parts.length > 0) {
132 // scoped packages
133 id += `/${parts.shift()}`;
134 } else if (id[0] === '.') {
135 // an import relative to the parent dir of the importer
136 id = resolve(basedir, importee);
137 isRelativeImport = true;
138 }
139
140 if (
141 !isRelativeImport &&
142 resolveOnly.length &&
143 !resolveOnly.some((pattern) => pattern.test(id))
144 ) {
145 if (normalizeInput(rollupOptions.input).includes(importee)) {
146 return null;
147 }
148 return false;
149 }
150
151 let hasModuleSideEffects = nullFn;
152 let hasPackageEntry = true;
153 let packageBrowserField = false;
154 let packageInfo;
155
156 const filter = (pkg, pkgPath) => {
157 const info = getPackageInfo({
158 cache: packageInfoCache,
159 extensions,
160 pkg,
161 pkgPath,
162 mainFields,
163 preserveSymlinks,
164 useBrowserOverrides
165 });
166
167 ({ packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = info);
168
169 return info.cachedPkg;
170 };
171
172 let resolveOptions = {
173 basedir,
174 packageFilter: filter,
175 readFile: readCachedFile,
176 isFile: isFileCached,
177 isDirectory: isDirCached,
178 extensions
179 };
180
181 if (preserveSymlinks !== undefined) {
182 resolveOptions.preserveSymlinks = preserveSymlinks;
183 }
184
185 const importSpecifierList = [];
186
187 if (importer === undefined && !importee[0].match(/^\.?\.?\//)) {
188 // For module graph roots (i.e. when importer is undefined), we
189 // need to handle 'path fragments` like `foo/bar` that are commonly
190 // found in rollup config files. If importee doesn't look like a
191 // relative or absolute path, we make it relative and attempt to
192 // resolve it. If we don't find anything, we try resolving it as we
193 // got it.
194 importSpecifierList.push(`./${importee}`);
195 }
196
197 const importeeIsBuiltin = builtins.has(importee);
198
199 if (importeeIsBuiltin && (!preferBuiltins || !isPreferBuiltinsSet)) {
200 // The `resolve` library will not resolve packages with the same
201 // name as a node built-in module. If we're resolving something
202 // that's a builtin, and we don't prefer to find built-ins, we
203 // first try to look up a local module with that name. If we don't
204 // find anything, we resolve the builtin which just returns back
205 // the built-in's name.
206 importSpecifierList.push(`${importee}/`);
207 }
208
209 // TypeScript files may import '.js' to refer to either '.ts' or '.tsx'
210 if (importer && importee.endsWith('.js')) {
211 for (const ext of ['.ts', '.tsx']) {
212 if (importer.endsWith(ext) && extensions.includes(ext)) {
213 importSpecifierList.push(importee.replace(/.js$/, ext));
214 }
215 }
216 }
217
218 importSpecifierList.push(importee);
219 resolveOptions = Object.assign(resolveOptions, customResolveOptions);
220
221 try {
222 let resolved = await resolveImportSpecifiers(importSpecifierList, resolveOptions);
223
224 if (resolved && packageBrowserField) {
225 if (Object.prototype.hasOwnProperty.call(packageBrowserField, resolved)) {
226 if (!packageBrowserField[resolved]) {
227 browserMapCache.set(resolved, packageBrowserField);
228 return ES6_BROWSER_EMPTY;
229 }
230 resolved = packageBrowserField[resolved];
231 }
232 browserMapCache.set(resolved, packageBrowserField);
233 }
234
235 if (hasPackageEntry && !preserveSymlinks && resolved) {
236 const fileExists = await exists(resolved);
237 if (fileExists) {
238 resolved = await realpath(resolved);
239 }
240 }
241
242 idToPackageInfo.set(resolved, packageInfo);
243
244 if (hasPackageEntry) {
245 if (builtins.has(resolved) && preferBuiltins && isPreferBuiltinsSet) {
246 return null;
247 } else if (importeeIsBuiltin && preferBuiltins) {
248 if (!isPreferBuiltinsSet) {
249 this.warn(
250 `preferring built-in module '${importee}' over local alternative at '${resolved}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`
251 );
252 }
253 return null;
254 } else if (jail && resolved.indexOf(normalize(jail.trim(sep))) !== 0) {
255 return null;
256 }
257 }
258
259 if (resolved && options.modulesOnly) {
260 const code = await readFile(resolved, 'utf-8');
261 if (isModule(code)) {
262 return {
263 id: `${resolved}${importSuffix}`,
264 moduleSideEffects: hasModuleSideEffects(resolved)
265 };
266 }
267 return null;
268 }
269 const result = {
270 id: `${resolved}${importSuffix}`,
271 moduleSideEffects: hasModuleSideEffects(resolved)
272 };
273 return result;
274 } catch (error) {
275 return null;
276 }
277 },
278
279 load(importee) {
280 if (importee === ES6_BROWSER_EMPTY) {
281 return 'export default {};';
282 }
283 return null;
284 },
285
286 getPackageInfoForId(id) {
287 return idToPackageInfo.get(id);
288 }
289 };
290 }
291
292 export default nodeResolve;
00 import { dirname, extname, resolve } from 'path';
1 import { promisify } from 'util';
21
32 import { createFilter } from '@rollup/pluginutils';
43
5 import resolveModule from 'resolve';
6
74 import { realpathSync } from './fs';
8
9 const resolveId = promisify(resolveModule);
105
116 // returns the imported package name for bare module imports
127 export function getPackageName(id) {
6055
6156 const packageInfo = {
6257 // copy as we are about to munge the `main` field of `pkg`.
63 packageJson: Object.assign({}, pkg),
58 packageJson: { ...pkg },
6459
6560 // path to package.json file
6661 packageJsonPath: pkgPath,
157152 // otherwise it's a string
158153 return [input];
159154 }
160
161 // Resolve module specifiers in order. Promise resolves to the first module that resolves
162 // successfully, or the error that resulted from the last attempted module resolution.
163 export function resolveImportSpecifiers(importSpecifierList, resolveOptions) {
164 let promise = Promise.resolve();
165
166 for (let i = 0; i < importSpecifierList.length; i++) {
167 promise = promise.then((value) => {
168 // if we've already resolved to something, just return it.
169 if (value) {
170 return value;
171 }
172
173 return resolveId(importSpecifierList[i], resolveOptions).then((result) => {
174 if (!resolveOptions.preserveSymlinks) {
175 result = realpathSync(result);
176 }
177 return result;
178 });
179 });
180
181 if (i < importSpecifierList.length - 1) {
182 // swallow MODULE_NOT_FOUND errors from all but the last resolution
183 promise = promise.catch((error) => {
184 if (error.code !== 'MODULE_NOT_FOUND') {
185 throw error;
186 }
187 });
188 }
189 }
190
191 return promise;
192 }
+0
-201
packages/node-resolve/test/browser.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4 const commonjs = require('@rollup/plugin-commonjs');
5
6 const { testBundle } = require('../../../util/test');
7
8 const { nodeResolve } = require('..');
9
10 process.chdir(join(__dirname, 'fixtures'));
11
12 test('disregards top-level browser field', async (t) => {
13 const bundle = await rollup({
14 input: 'browser.js',
15 onwarn: () => t.fail('No warnings were expected'),
16 plugins: [nodeResolve()]
17 });
18 const { module } = await testBundle(t, bundle);
19
20 t.is(module.exports, 'node');
21 });
22
23 test('allows use of the top-level browser field', async (t) => {
24 const bundle = await rollup({
25 input: 'browser.js',
26 onwarn: () => t.fail('No warnings were expected'),
27 plugins: [
28 nodeResolve({
29 mainFields: ['browser', 'main']
30 })
31 ]
32 });
33 const { module } = await testBundle(t, bundle);
34
35 t.is(module.exports, 'browser');
36 });
37
38 test('disregards object browser field', async (t) => {
39 const bundle = await rollup({
40 input: 'browser-object.js',
41 onwarn: () => t.fail('No warnings were expected'),
42 plugins: [nodeResolve()]
43 });
44 const { module } = await testBundle(t, bundle);
45
46 t.is(module.exports.env, 'node');
47 t.is(module.exports.dep, 'node-dep');
48 t.is(module.exports.test, 42);
49 });
50
51 test('allows use of the object browser field', async (t) => {
52 const bundle = await rollup({
53 input: 'browser-object.js',
54 onwarn: () => t.fail('No warnings were expected'),
55 plugins: [
56 nodeResolve({
57 mainFields: ['browser', 'main']
58 })
59 ]
60 });
61 const { module } = await testBundle(t, bundle);
62
63 t.is(module.exports.env, 'browser');
64 t.is(module.exports.dep, 'browser-dep');
65 t.is(module.exports.test, 43);
66 });
67
68 test('allows use of object browser field, resolving `main`', async (t) => {
69 const bundle = await rollup({
70 input: 'browser-object-main.js',
71 onwarn: () => t.fail('No warnings were expected'),
72 plugins: [
73 nodeResolve({
74 mainFields: ['browser', 'main']
75 })
76 ]
77 });
78 const { module } = await testBundle(t, bundle);
79
80 t.is(module.exports.env, 'browser');
81 t.is(module.exports.dep, 'browser-dep');
82 t.is(module.exports.test, 43);
83 });
84
85 test('options.browser = true still works', async (t) => {
86 const bundle = await rollup({
87 input: 'browser-object-main.js',
88 plugins: [
89 nodeResolve({
90 browser: true
91 })
92 ]
93 });
94 const { module } = await testBundle(t, bundle);
95
96 t.is(module.exports.env, 'browser');
97 t.is(module.exports.dep, 'browser-dep');
98 t.is(module.exports.test, 43);
99 });
100
101 test('allows use of object browser field, resolving implicit `main`', async (t) => {
102 const bundle = await rollup({
103 input: 'browser-object-implicit.js',
104 onwarn: () => t.fail('No warnings were expected'),
105 plugins: [
106 nodeResolve({
107 mainFields: ['browser', 'main']
108 })
109 ]
110 });
111 const { module } = await testBundle(t, bundle);
112
113 t.is(module.exports.env, 'browser');
114 });
115
116 test('allows use of object browser field, resolving replaced builtins', async (t) => {
117 const bundle = await rollup({
118 input: 'browser-object-builtin.js',
119 onwarn: () => t.fail('No warnings were expected'),
120 plugins: [
121 nodeResolve({
122 mainFields: ['browser', 'main']
123 })
124 ]
125 });
126 const { module } = await testBundle(t, bundle);
127
128 t.is(module.exports, 'browser-fs');
129 });
130
131 test('allows use of object browser field, resolving nested directories', async (t) => {
132 const bundle = await rollup({
133 input: 'browser-object-nested.js',
134 onwarn: () => t.fail('No warnings were expected'),
135 plugins: [
136 nodeResolve({
137 mainFields: ['browser', 'main']
138 })
139 ]
140 });
141 const { module } = await testBundle(t, bundle);
142
143 t.is(module.exports.env, 'browser');
144 t.is(module.exports.dep, 'browser-dep');
145 t.is(module.exports.test, 43);
146 });
147
148 test('respects local browser field', async (t) => {
149 const bundle = await rollup({
150 input: 'browser-local.js',
151 onwarn: () => t.fail('No warnings were expected'),
152 plugins: [
153 nodeResolve({
154 mainFields: ['browser', 'main']
155 })
156 ]
157 });
158 const { module } = await testBundle(t, bundle);
159
160 t.is(module.exports, 'component-type');
161 });
162
163 test('allows use of object browser field, resolving to nested node_modules', async (t) => {
164 const bundle = await rollup({
165 input: 'browser-entry-points-to-node-module.js',
166 onwarn: () => t.fail('No warnings were expected'),
167 plugins: [
168 nodeResolve({
169 main: true,
170 browser: true
171 })
172 ]
173 });
174 const { module } = await testBundle(t, bundle);
175
176 t.is(module.exports, 'component-type');
177 });
178
179 test('supports `false` in browser field', async (t) => {
180 const bundle = await rollup({
181 input: 'browser-false.js',
182 onwarn: () => t.fail('No warnings were expected'),
183 plugins: [
184 nodeResolve({
185 mainFields: ['browser', 'main']
186 })
187 ]
188 });
189 await testBundle(t, bundle);
190 });
191
192 test('pkg.browser with mapping to prevent bundle by specifying a value of false', async (t) => {
193 const bundle = await rollup({
194 input: 'browser-object-with-false.js',
195 plugins: [nodeResolve({ browser: true }), commonjs()]
196 });
197 const { module } = await testBundle(t, bundle);
198
199 t.is(module.exports, 'ok');
200 });
+0
-27
packages/node-resolve/test/dedupe-custom.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { testBundle } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures', 'custom-resolve-options'));
10
11 test('can deduplicate custom module directory', async (t) => {
12 const bundle = await rollup({
13 input: 'dedupe.js',
14 plugins: [
15 nodeResolve({
16 dedupe: ['package-b'],
17 customResolveOptions: {
18 moduleDirectory: 'js_modules'
19 }
20 })
21 ]
22 });
23 const { module } = await testBundle(t, bundle);
24
25 t.snapshot(module.exports);
26 });
+0
-76
packages/node-resolve/test/dedupe.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { testBundle } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('single module version is bundled if dedupe is set', async (t) => {
12 const bundle = await rollup({
13 input: 'react-app.js',
14 plugins: [
15 nodeResolve({
16 dedupe: ['react']
17 })
18 ]
19 });
20 const { module } = await testBundle(t, bundle);
21
22 t.snapshot(module.exports);
23 });
24
25 test('dedupes deep imports by package name if dedupe is set', async (t) => {
26 const bundle = await rollup({
27 input: 'react-app-deep-import.js',
28 plugins: [
29 nodeResolve({
30 dedupe: ['react']
31 })
32 ]
33 });
34 const { module } = await testBundle(t, bundle);
35
36 t.snapshot(module.exports);
37 });
38
39 test('dedupes scoped deep imports by package name if dedupe is set', async (t) => {
40 const bundle = await rollup({
41 input: 'scoped-deep-import.js',
42 plugins: [
43 nodeResolve({
44 dedupe: ['@scoped/deduped']
45 })
46 ]
47 });
48 const { module } = await testBundle(t, bundle);
49
50 t.snapshot(module.exports);
51 });
52
53 test('single module version is bundled if dedupe is set as a function', async (t) => {
54 const bundle = await rollup({
55 input: 'react-app.js',
56 plugins: [
57 nodeResolve({
58 dedupe: (dep) => dep === 'react'
59 })
60 ]
61 });
62 const { module } = await testBundle(t, bundle);
63
64 t.snapshot(module.exports);
65 });
66
67 test('multiple module versions are bundled if dedupe is not set', async (t) => {
68 const bundle = await rollup({
69 input: 'react-app.js',
70 plugins: [nodeResolve()]
71 });
72 const { module } = await testBundle(t, bundle);
73
74 t.snapshot(module.exports);
75 });
+0
-12
packages/node-resolve/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": true
3 },
4 "rules": {
5 "import/extensions": "off",
6 "import/no-unresolved": "off",
7 "import/prefer-default-export": "off",
8 "line-comment-position": "off",
9 "no-console": "off"
10 }
11 }
+0
-3
packages/node-resolve/test/fixtures/browser-entry-points-to-node-module.js less more
0 import sample from 'browser-entry-points-to-node-module';
1
2 export default sample;
+0
-3
packages/node-resolve/test/fixtures/browser-false.js less more
0 import thing from 'uses-buffer';
1
2 t.deepEqual(thing, {});
+0
-4
packages/node-resolve/test/fixtures/browser-local.js less more
0 // test browser mapped imports from the main entrypoint
1 import s from 'dummy-module';
2
3 export default s;
+0
-3
packages/node-resolve/test/fixtures/browser-object-builtin.js less more
0 import main from 'builtins-browser';
1
2 export default main;
+0
-3
packages/node-resolve/test/fixtures/browser-object-implicit.js less more
0 import { env } from 'isomorphic-object-main-implicit';
1
2 export { env };
+0
-3
packages/node-resolve/test/fixtures/browser-object-main.js less more
0 import { env, dep, test } from 'isomorphic-object-main';
1
2 export { env, dep, test };
+0
-3
packages/node-resolve/test/fixtures/browser-object-nested.js less more
0 import { env, dep, test } from 'isomorphic-nested';
1
2 export { env, dep, test };
+0
-18
packages/node-resolve/test/fixtures/browser-object-with-false.js less more
0 import Client from 'isomorphic-object-with-false';
1 import HTTPTracker from 'isomorphic-object-with-false/lib/client/http-tracker';
2
3 import HTTPTrackerWithSubPath from 'isomorphic-object-with-false/lib/subpath/foo';
4
5 import ES6_BROWSER_EMPTY from '\0node-resolve:empty.js';
6
7 // do some assert
8 const clientWs = new Client('ws:');
9 const clientHttp = new Client('http:');
10
11 t.is(clientWs.name, 'websocket-tracker');
12 t.is(clientHttp.name, 'NULL');
13 t.is(HTTPTracker, ES6_BROWSER_EMPTY);
14 t.is(HTTPTrackerWithSubPath, ES6_BROWSER_EMPTY);
15
16 // expose
17 export default 'ok';
+0
-3
packages/node-resolve/test/fixtures/browser-object.js less more
0 import { env, dep, test } from 'isomorphic-object';
1
2 export { env, dep, test };
+0
-3
packages/node-resolve/test/fixtures/browser.js less more
0 import env from 'isomorphic';
1
2 export default env;
+0
-3
packages/node-resolve/test/fixtures/builtins.js less more
0 import { sep } from 'path';
1
2 export default sep;
+0
-3
packages/node-resolve/test/fixtures/commonjs.js less more
0 import capitalize from 'string-capitalize';
1
2 export default capitalize('it works!');
+0
-4
packages/node-resolve/test/fixtures/custom-resolve-options/dedupe.js less more
0 import PackageA from 'package-a';
1 import PackageB from 'package-b';
2
3 export { PackageA, PackageB };
+0
-1
packages/node-resolve/test/fixtures/custom-resolve-options/js_modules/foo.js less more
0 export default 42;
+0
-3
packages/node-resolve/test/fixtures/custom-resolve-options/js_modules/package-a/index.js less more
0 import PackageB from 'package-b';
1
2 export default `package-a:${PackageB}`;
+0
-1
packages/node-resolve/test/fixtures/custom-resolve-options/js_modules/package-a/js_modules/package-b/index.js less more
0 export default 'package-b:nested';
+0
-1
packages/node-resolve/test/fixtures/custom-resolve-options/js_modules/package-b/index.js less more
0 export default 'package-b:root';
+0
-3
packages/node-resolve/test/fixtures/custom-resolve-options/main.js less more
0 import foo from 'foo';
1
2 t.is(foo, 42);
+0
-3
packages/node-resolve/test/fixtures/deep-import-non-module.js less more
0 import deep from 'foo/deep';
1
2 console.log(deep);
+0
-3
packages/node-resolve/test/fixtures/dual-cjs-mjs.js less more
0 import module from 'dual-cjs-mjs';
1
2 export default module; // MODULE
+0
-1
packages/node-resolve/test/fixtures/dynamic.js less more
0 export default import('test');
+0
-1
packages/node-resolve/test/fixtures/extensions/lol.wut less more
0 export var answer = 42;
+0
-3
packages/node-resolve/test/fixtures/extensions/main.js less more
0 import { answer } from './lol';
1
2 t.is(answer, 42);
+0
-3
packages/node-resolve/test/fixtures/granular.js less more
0 import uppercase from 'string/uppercase.js';
1
2 export default uppercase('foo');
+0
-3
packages/node-resolve/test/fixtures/hash.js less more
0 import test from 'test#foo';
1
2 export default test;
+0
-3
packages/node-resolve/test/fixtures/jail.js less more
0 import uppercase from 'string/uppercase.js';
1
2 export default uppercase('foo');
+0
-3
packages/node-resolve/test/fixtures/jsnext.js less more
0 import value from 'jsnext';
1
2 export default value;
+0
-1
packages/node-resolve/test/fixtures/local-index/forty-two/index.js less more
0 export default 42;
+0
-3
packages/node-resolve/test/fixtures/local-index/main.js less more
0 import fortyTwo from './forty-two';
1
2 export default fortyTwo;
+0
-1
packages/node-resolve/test/fixtures/main.js less more
0 // placeholder for ../package.json
+0
-3
packages/node-resolve/test/fixtures/manualchunks.js less more
0 import simple from 'simple';
1
2 console.log(simple);
+0
-3
packages/node-resolve/test/fixtures/module-mjs.js less more
0 import module from 'module-mjs';
1
2 export default module; // MODULE
+0
-3
packages/node-resolve/test/fixtures/module.js less more
0 import module from 'module';
1
2 export default module; // MODULE
+0
-1
packages/node-resolve/test/fixtures/monorepo-dedupe/node_modules/react/index.js less more
0 export default 'react imported from root';
+0
-5
packages/node-resolve/test/fixtures/monorepo-dedupe/packages/package-a/index.js less more
0 import React from 'react';
1
2 import packageB from '../package-b/index.js';
3
4 export default `Package A React: ${React} | ${packageB}`;
+0
-1
packages/node-resolve/test/fixtures/monorepo-dedupe/packages/package-a/node_modules/react/index.js less more
0 export default 'react imported from package a';
+0
-3
packages/node-resolve/test/fixtures/monorepo-dedupe/packages/package-b/index.js less more
0 import React from 'react';
1
2 export default `package B react: ${React}`;
+0
-1
packages/node-resolve/test/fixtures/monorepo-dedupe/packages/package-b/node_modules/react/index.js less more
0 export default 'react imported from package b';
+0
-10
packages/node-resolve/test/fixtures/nested/only.js less more
0 import foo from '@scoped/foo';
1 import bar from '@scoped/bar';
2 import test from 'test';
3
4 import local from '../only-local';
5
6 console.log(foo);
7 console.log(bar);
8 console.log(test);
9 console.log(local);
+0
-1
packages/node-resolve/test/fixtures/node_modules/@scoped/bar/index.js less more
0 export default 'BAR';
+0
-1
packages/node-resolve/test/fixtures/node_modules/@scoped/deduped/deep.js less more
0 export default 'scoped-deduped:root';
+0
-1
packages/node-resolve/test/fixtures/node_modules/@scoped/foo/index.js less more
0 export default 'FOO';
+0
-2
packages/node-resolve/test/fixtures/node_modules/browser-entry-points-to-node-module/index.js less more
0 import dep from 'type';
1 export default dep;
+0
-6
packages/node-resolve/test/fixtures/node_modules/browser-entry-points-to-node-module/package.json less more
0 {
1 "main": "index.js",
2 "browser": {
3 "type": "component-type"
4 }
5 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/builtins-browser/fs.js less more
0 export default 'browser-fs';
+0
-2
packages/node-resolve/test/fixtures/node_modules/builtins-browser/index.js less more
0 import fs from 'fs';
1 export default fs;
+0
-6
packages/node-resolve/test/fixtures/node_modules/builtins-browser/package.json less more
0 {
1 "main": "./index.js",
2 "browser": {
3 "fs": "./fs.js"
4 }
5 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/component-type/index.js less more
0 export default 'component-type';
+0
-3
packages/node-resolve/test/fixtures/node_modules/component-type/package.json less more
0 {
1 "main": "index.js"
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/dual-cjs-mjs/entry.js less more
0 module.exports = 'DUAL-CJS';
+0
-1
packages/node-resolve/test/fixtures/node_modules/dual-cjs-mjs/entry.mjs less more
0 export default 'DUAL-MJS';
+0
-3
packages/node-resolve/test/fixtures/node_modules/dual-cjs-mjs/package.json less more
0 {
1 "main": "entry"
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/entries/jsnext-entry.js less more
0 export default 'JSNEXT-ENTRY';
+0
-1
packages/node-resolve/test/fixtures/node_modules/entries/main-entry.js less more
0 export default 'MAIN-ENTRY';
+0
-1
packages/node-resolve/test/fixtures/node_modules/entries/module-entry.js less more
0 export default 'MODULE-ENTRY';
+0
-5
packages/node-resolve/test/fixtures/node_modules/entries/package.json less more
0 {
1 "main": "main-entry.js",
2 "module": "module-entry.js",
3 "jsnext:main": "jsnext-entry.js"
4 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/events/index.js less more
0 export default 'not the built-in events module';
+0
-3
packages/node-resolve/test/fixtures/node_modules/events/package.json less more
0 {
1 "main": "./index.js"
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic/browser.js less more
0 export default 'browser';
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic/node.js less more
0 export default 'node';
+0
-4
packages/node-resolve/test/fixtures/node_modules/isomorphic/package.json less more
0 {
1 "main": "./node.js",
2 "browser": "./browser.js"
3 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/lib/browser-dep.js less more
0 export default 'browser-dep';
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/lib/browser-test.js less more
0 export default 43;
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/lib/browser.js less more
0 import dep from './dep.js';
1 import test from './test';
2
3 const env = 'browser';
4 export { env, dep, test };
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/lib/dep.js less more
0 export default 'node-dep';
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/lib/index.js less more
0 import dep from './dep.js';
1 import test from 'test';
2
3 const env = 'node';
4 export { env, dep, test };
+0
-8
packages/node-resolve/test/fixtures/node_modules/isomorphic-nested/package.json less more
0 {
1 "main": "./lib/index.js",
2 "browser": {
3 "./lib/index.js": "./lib/browser.js",
4 "./lib/dep.js": "./lib/browser-dep.js",
5 "./lib/test": "./lib/browser-test.js"
6 }
7 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/browser-dep.js less more
0 export default 'browser-dep';
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/browser-test.js less more
0 export default 43;
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/browser.js less more
0 import dep from './dep.js';
1 import test from 'test';
2
3 const env = 'browser';
4 export { env, dep, test };
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/dep.js less more
0 export default 'node-dep';
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/index.js less more
0 import dep from './dep.js';
1 import test from 'test';
2
3 const env = 'node';
4 export { env, dep, test };
+0
-8
packages/node-resolve/test/fixtures/node_modules/isomorphic-object/package.json less more
0 {
1 "main": "./index.js",
2 "browser": {
3 "./index.js": "./browser.js",
4 "./dep.js": "./browser-dep.js",
5 "test": "./browser-test.js"
6 }
7 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/browser-dep.js less more
0 export default 'browser-dep';
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/browser-test.js less more
0 export default 43;
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/browser.js less more
0 import dep from './dep.js';
1 import test from 'test';
2
3 const env = 'browser';
4 export { env, dep, test };
+0
-1
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/dep.js less more
0 export default 'node-dep';
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/index.js less more
0 import dep from './dep.js';
1 import test from 'test';
2
3 const env = 'node';
4 export { env, dep, test };
+0
-8
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main/package.json less more
0 {
1 "main": "index.js",
2 "browser": {
3 "./index.js": "./browser.js",
4 "./dep.js": "./browser-dep.js",
5 "test": "./browser-test.js"
6 }
7 }
+0
-2
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main-implicit/browser.js less more
0 const env = 'browser';
1 export { env };
+0
-2
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main-implicit/index.js less more
0 const env = 'node';
1 export { env };
+0
-5
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-main-implicit/package.json less more
0 {
1 "browser": {
2 "./index.js": "./browser.js"
3 }
4 }
+0
-4
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/lib/client/http-tracker.js less more
0
1 module.exports = function(client, announceUrl) {
2 this.name = 'http-tracker'
3 }
+0
-4
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/lib/client/udp-tracker.js less more
0
1 module.exports = function(client, announceUrl) {
2 this.name = 'udp-tracker'
3 }
+0
-4
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/lib/client/websocket-tracker.js less more
0
1 module.exports = function(client, announceUrl) {
2 this.name = 'websocket-tracker'
3 }
+0
-20
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/lib/index.js less more
0 // sample code inspired by npm: bittorrent-tracker-client
1
2 var HTTPTracker = require('./client/http-tracker') // empty object in browser
3 var UDPTracker = require('./client/udp-tracker') // empty object in browser
4 var WebSocketTracker = require('./client/websocket-tracker')
5
6 function Client(protocol, announceUrl) {
7 var self = this;
8 if ((protocol === 'http:' || protocol === 'https:') &&
9 typeof HTTPTracker === 'function') {
10 return new HTTPTracker(self, announceUrl)
11 } else if (protocol === 'udp:' && typeof UDPTracker === 'function') {
12 return new UDPTracker(self, announceUrl)
13 } else if ((protocol === 'ws:' || protocol === 'wss:')) {
14 return new WebSocketTracker(self, announceUrl)
15 }
16 this.name = 'NULL';
17 }
18
19 module.exports = Client
+0
-2
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/lib/subpath/foo/index.js less more
0 var HTTPTracker = require('../../client/http-tracker') // empty object in browser
1 module.exports = HTTPTracker
+0
-8
packages/node-resolve/test/fixtures/node_modules/isomorphic-object-with-false/package.json less more
0 {
1 "main": "./lib/index.js",
2 "browser": {
3 "./lib/common.js": "./lib/common-browser.js",
4 "./lib/client/http-tracker.js": false,
5 "./lib/client/udp-tracker.js": false
6 }
7 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/jsnext/entry-main.js less more
0 export default 'MAIN';
+0
-1
packages/node-resolve/test/fixtures/node_modules/jsnext/entry.js less more
0 export default 'JSNEXT';
+0
-4
packages/node-resolve/test/fixtures/node_modules/jsnext/package.json less more
0 {
1 "jsnext:main": "entry.js",
2 "main": "entry-main.js"
3 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/legacy/entry.js less more
0 export default 'LEGACY';
+0
-3
packages/node-resolve/test/fixtures/node_modules/legacy/package.json less more
0 {
1 "main": "entry.js"
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/module/entry-main.js less more
0 export default 'MAIN';
+0
-1
packages/node-resolve/test/fixtures/node_modules/module/entry.js less more
0 export default 'MODULE';
+0
-4
packages/node-resolve/test/fixtures/node_modules/module/package.json less more
0 {
1 "main": "entry-main.js",
2 "module": "entry.js"
3 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/module-mjs/entry.mjs less more
0 export default 'MODULE-MJS';
+0
-3
packages/node-resolve/test/fixtures/node_modules/module-mjs/package.json less more
0 {
1 "main": "entry"
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/react/deep.js less more
0 export default 'react/deep.js:root'
+0
-1
packages/node-resolve/test/fixtures/node_modules/react/index.js less more
0 export default 'react:root'
+0
-3
packages/node-resolve/test/fixtures/node_modules/react-consumer/deep.js less more
0 import React from 'react/deep.js'
1
2 export default 'react-consumer:' + React;
+0
-3
packages/node-resolve/test/fixtures/node_modules/react-consumer/index.js less more
0 import React from 'react'
1
2 export default 'react-consumer:' + React
+0
-1
packages/node-resolve/test/fixtures/node_modules/react-consumer/node_modules/react/deep.js less more
0 export default 'react/deep.js:child';
+0
-1
packages/node-resolve/test/fixtures/node_modules/react-consumer/node_modules/react/index.js less more
0 export default 'react:child'
+0
-3
packages/node-resolve/test/fixtures/node_modules/scoped-deduped-consumer/index.js less more
0 import scopedDeduped from '@scoped/deduped/deep.js';
1
2 export default 'scoped-deduped-consumer:' + scopedDeduped;
+0
-1
packages/node-resolve/test/fixtures/node_modules/scoped-deduped-consumer/node_modules/@scoped/deduped/deep.js less more
0 export default 'scoped-deduped:child';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-array/dep1.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-dep1');
2
3 export const value = 'dep1';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-array/dep2.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-dep2');
2
3 export const value = 'dep2';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-array/dep3-effect.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-dep3');
2
3 export const value = 'dep3';
+0
-8
packages/node-resolve/test/fixtures/node_modules/side-effects-array/index.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-index');
2
3 export {value as value1} from './dep1.js';
4 export {value as value2} from './dep2.js';
5 export {value as value3} from './dep3-effect.js';
6 export {value as value4} from './nested/dep4';
7 export {value as value5} from './nested/dep5-effect';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-array/nested/dep4.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-dep4');
2
3 export const value = 'dep3';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-array/nested/dep5-effect.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('array-dep5');
2
3 export const value = 'dep3';
+0
-8
packages/node-resolve/test/fixtures/node_modules/side-effects-array/package.json less more
0 {
1 "main": "./index.js",
2 "sideEffects": [
3 "./index.js",
4 "./dep1.js",
5 "**/*-effect.js"
6 ]
7 }
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-false/dep1.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('false-dep1');
2
3 export const value = 'dep1';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-false/dep2.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('false-dep2');
2
3 export const value = 'dep2';
+0
-5
packages/node-resolve/test/fixtures/node_modules/side-effects-false/index.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('false-index');
2
3 export {value as value1} from './dep1.js';
4 export {value as value2} from './dep2.js';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-false/package.json less more
0 {
1 "main": "./index.js",
2 "sideEffects": false
3 }
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-true/dep1.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('true-dep1');
2
3 export const value = 'dep1';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-true/dep2.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('true-dep2');
2
3 export const value = 'dep2';
+0
-5
packages/node-resolve/test/fixtures/node_modules/side-effects-true/index.js less more
0 global.sideEffects = global.sideEffects || [];
1 global.sideEffects.push('true-index');
2
3 export {value as value1} from './dep1.js';
4 export {value as value2} from './dep2.js';
+0
-4
packages/node-resolve/test/fixtures/node_modules/side-effects-true/package.json less more
0 {
1 "main": "./index.js",
2 "sideEffects": true
3 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/simple/index.js less more
0 export default 42;
+0
-3
packages/node-resolve/test/fixtures/node_modules/string/uppercase.js less more
0 export default function uppercase ( str ) {
1 return str.toUpperCase();
2 }
+0
-1
packages/node-resolve/test/fixtures/node_modules/test/index.js less more
0 export default 42;
+0
-2
packages/node-resolve/test/fixtures/node_modules/uses-buffer/index.js less more
0 import Buffer from 'buffer';
1 export default Buffer;
+0
-5
packages/node-resolve/test/fixtures/node_modules/uses-buffer/package.json less more
0 {
1 "browser": {
2 "buffer": false
3 }
4 }
+0
-1
packages/node-resolve/test/fixtures/only-local.js less more
0 export default 'Resolved local var';
+0
-10
packages/node-resolve/test/fixtures/only.js less more
0 import foo from '@scoped/foo';
1 import bar from '@scoped/bar';
2 import test from 'test';
3
4 import local from './only-local';
5
6 console.log(foo);
7 console.log(bar);
8 console.log(test);
9 console.log(local);
+0
-1
packages/node-resolve/test/fixtures/package-index.js less more
0 import 'es5-ext/object/set-prototype-of';
+0
-13
packages/node-resolve/test/fixtures/package.json less more
0 {
1 "name": "test",
2 "version": "1.0.0",
3 "description": "",
4 "license": "ISC",
5 "author": "",
6 "main": "main.js",
7 "scripts": {},
8 "keywords": [],
9 "browser": {
10 "dummy-module": "component-type"
11 }
12 }
+0
-1
packages/node-resolve/test/fixtures/prefer-builtin.js less more
0 import 'events';
+0
-3
packages/node-resolve/test/fixtures/prefer-jsnext.js less more
0 import entry from 'entries';
1
2 export default entry;
+0
-3
packages/node-resolve/test/fixtures/prefer-main.js less more
0 import entry from 'entries';
1
2 export default entry;
+0
-3
packages/node-resolve/test/fixtures/prefer-module.js less more
0 import entry from 'entries';
1
2 export default entry;
+0
-4
packages/node-resolve/test/fixtures/react-app-deep-import.js less more
0 import React from 'react/deep.js';
1 import ReactConsumer from 'react-consumer/deep.js';
2
3 export { React, ReactConsumer };
+0
-4
packages/node-resolve/test/fixtures/react-app.js less more
0 import React from 'react';
1 import ReactConsumer from 'react-consumer';
2
3 export { React, ReactConsumer };
+0
-4
packages/node-resolve/test/fixtures/scoped-deep-import.js less more
0 import ScopedDeduped from '@scoped/deduped/deep.js';
1 import ScopedDedupedConsumer from 'scoped-deduped-consumer';
2
3 export { ScopedDeduped, ScopedDedupedConsumer };
+0
-3
packages/node-resolve/test/fixtures/search-params-and-hash.js less more
0 import test from 'test?foo=bar&lorem=ipsum#foo';
1
2 export default test;
+0
-3
packages/node-resolve/test/fixtures/search-params.js less more
0 import test from 'test?foo=bar&lorem=ipsum';
1
2 export default test;
+0
-4
packages/node-resolve/test/fixtures/side-effects.js less more
0 import 'side-effects-array';
1
2 export { value1 as falseValue } from 'side-effects-false';
3 export { value1 as trueValue } from 'side-effects-true';
+0
-2
packages/node-resolve/test/fixtures/symlinked/first/index.js less more
0 export { default as number1 } from 'second';
1 export { default as number2 } from 'third';
+0
-1
packages/node-resolve/test/fixtures/symlinked/second/index.browser.js less more
0 export default 'not random string';
+0
-3
packages/node-resolve/test/fixtures/symlinked/second/index.js less more
0 import randomNumber from 'third';
1
2 export default randomNumber;
+0
-7
packages/node-resolve/test/fixtures/symlinked/second/package.json less more
0 {
1 "name": "second",
2 "main": "./index.js",
3 "browser": {
4 "./index.js": "./index.browser.js"
5 }
6 }
+0
-3
packages/node-resolve/test/fixtures/symlinked/third/index.js less more
0 const randomNumber = Math.random();
1
2 export default randomNumber;
+0
-3
packages/node-resolve/test/fixtures/trailing-slash.js less more
0 import capitalize from 'string-capitalize/';
1
2 export default capitalize('it works!');
+0
-4
packages/node-resolve/test/fixtures/ts-import-js-extension/import-ts-with-js-extension.ts less more
0 import { main } from './main.js';
1 // This resolves as main.ts and _not_ main.js, despite the extension
2 const mainResult = main();
3 export default mainResult;
+0
-11
packages/node-resolve/test/fixtures/ts-import-js-extension/main.ts less more
0 // To make this very clearly TypeScript and not just JS with a TS extension
1 type TestType = string | string[];
2 interface Main {
3 (): string;
4 propertyCall(input?: TestType): TestType;
5 }
6
7 const main: Main = () => 'It works!';
8 main.propertyCall = () => '';
9
10 export { main };
+0
-1
packages/node-resolve/test/fixtures/unresolved-global.js less more
0 import 'foo';
+0
-1
packages/node-resolve/test/fixtures/unresolved-local.js less more
0 import './foo';
+0
-115
packages/node-resolve/test/get-package-info.js less more
0 /* eslint-disable consistent-return, import/no-dynamic-require, global-require */
1
2 const path = require('path');
3
4 const test = require('ava');
5 const { rollup } = require('rollup');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(path.join(__dirname, 'fixtures'));
10
11 test('populates info for main', async (t) => {
12 const resolve = nodeResolve({
13 mainFields: ['main']
14 });
15
16 let entriesInfo;
17
18 await rollup({
19 input: 'prefer-main.js',
20 plugins: [
21 resolve,
22 {
23 transform(code, id) {
24 if (!id.match(/main-entry.js$/)) return;
25 entriesInfo = resolve.getPackageInfoForId(id);
26 return code;
27 }
28 }
29 ]
30 });
31
32 const entriesPkgJsonPath = path.resolve('node_modules/entries/package.json');
33 const root = path.dirname(entriesPkgJsonPath);
34
35 t.deepEqual(entriesInfo, {
36 browserMappedMain: false,
37 resolvedMainField: 'main',
38 packageJson: require(entriesPkgJsonPath),
39 packageJsonPath: entriesPkgJsonPath,
40 root,
41 resolvedEntryPoint: path.resolve(root, './main-entry.js')
42 });
43 });
44
45 test('populates info for module', async (t) => {
46 const resolve = nodeResolve({
47 mainFields: ['module']
48 });
49
50 let entriesInfo;
51
52 await rollup({
53 input: 'prefer-main.js',
54 plugins: [
55 resolve,
56 {
57 transform(code, id) {
58 if (!id.match(/module-entry.js$/)) return;
59 entriesInfo = resolve.getPackageInfoForId(id);
60 return code;
61 }
62 }
63 ]
64 });
65
66 const entriesPkgJsonPath = path.resolve('node_modules/entries/package.json');
67 const root = path.dirname(entriesPkgJsonPath);
68
69 t.deepEqual(entriesInfo, {
70 browserMappedMain: false,
71 resolvedMainField: 'module',
72 packageJson: require(entriesPkgJsonPath),
73 packageJsonPath: entriesPkgJsonPath,
74 root,
75 resolvedEntryPoint: path.resolve(root, './module-entry.js')
76 });
77 });
78
79 test('populates info for browser', async (t) => {
80 const resolve = nodeResolve({
81 mainFields: ['browser']
82 });
83
84 const entriesInfoMap = new Map();
85
86 await rollup({
87 input: 'browser-object.js',
88 plugins: [
89 resolve,
90 {
91 transform(code, id) {
92 if (!id.match(/isomorphic-object/)) return;
93 entriesInfoMap.set(id, resolve.getPackageInfoForId(id));
94 return code;
95 }
96 }
97 ]
98 });
99
100 const entriesPkgJsonPath = path.resolve('node_modules/isomorphic-object/package.json');
101 const root = path.dirname(entriesPkgJsonPath);
102 const expectedPkgJson = require(entriesPkgJsonPath);
103
104 for (const entriesInfo of entriesInfoMap.values()) {
105 t.deepEqual(entriesInfo, {
106 browserMappedMain: true,
107 resolvedMainField: 'main',
108 packageJson: expectedPkgJson,
109 packageJsonPath: entriesPkgJsonPath,
110 root,
111 resolvedEntryPoint: path.resolve(root, './browser.js')
112 });
113 }
114 });
+0
-44
packages/node-resolve/test/jail.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { getImports } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('mark module outside the jail as external', async (t) => {
12 const warnings = [];
13 const bundle = await rollup({
14 input: 'jail.js',
15 onwarn: (warning) => warnings.push(warning),
16 plugins: [
17 nodeResolve({
18 // changed to /fixtures above
19 jail: join(__dirname, 'snapshots')
20 })
21 ]
22 });
23 const imports = await getImports(bundle);
24
25 t.snapshot(warnings);
26 t.is(warnings.length, 1);
27 t.deepEqual(imports, ['string/uppercase.js']);
28 });
29
30 test('bundle module defined inside the jail', async (t) => {
31 const bundle = await rollup({
32 input: 'jail.js',
33 onwarn: () => t.fail('No warnings were expected'),
34 plugins: [
35 nodeResolve({
36 jail: `${__dirname}/`
37 })
38 ]
39 });
40 const imports = await getImports(bundle);
41
42 t.deepEqual(imports, []);
43 });
+0
-110
packages/node-resolve/test/only.js less more
0 const { join, resolve } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { getImports, getResolvedModules } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('specify the only packages to resolve', async (t) => {
12 const warnings = [];
13 const bundle = await rollup({
14 input: ['only.js'],
15 onwarn: (warning) => warnings.push(warning),
16 plugins: [
17 nodeResolve({
18 resolveOnly: ['test']
19 })
20 ]
21 });
22 const imports = await getImports(bundle);
23 const modules = await getResolvedModules(bundle);
24
25 t.is(warnings.length, 0);
26 t.snapshot(warnings);
27 t.deepEqual(imports, ['@scoped/foo', '@scoped/bar']);
28 t.assert(Object.keys(modules).includes(resolve('only-local.js')));
29 });
30
31 test('handles nested entry modules', async (t) => {
32 const warnings = [];
33 const bundle = await rollup({
34 input: ['nested/only.js'],
35 onwarn: (warning) => warnings.push(warning),
36 plugins: [
37 nodeResolve({
38 resolveOnly: ['test']
39 })
40 ]
41 });
42 const imports = await getImports(bundle);
43 const modules = await getResolvedModules(bundle);
44
45 t.is(warnings.length, 0);
46 t.snapshot(warnings);
47 t.deepEqual(imports, ['@scoped/foo', '@scoped/bar']);
48 t.assert(Object.keys(modules).includes(resolve('only-local.js')));
49 });
50
51 test('regex', async (t) => {
52 const warnings = [];
53 const bundle = await rollup({
54 input: 'only.js',
55 onwarn: (warning) => warnings.push(warning),
56 plugins: [
57 nodeResolve({
58 resolveOnly: [/^@scoped\/.*$/]
59 })
60 ]
61 });
62 const imports = await getImports(bundle);
63 const modules = await getResolvedModules(bundle);
64
65 t.is(warnings.length, 0);
66 t.snapshot(warnings);
67 t.deepEqual(imports, ['test']);
68 t.assert(Object.keys(modules).includes(resolve('only-local.js')));
69 });
70
71 test('deprecated: specify the only packages to resolve', async (t) => {
72 const warnings = [];
73 const bundle = await rollup({
74 input: 'only.js',
75 onwarn: (warning) => warnings.push(warning),
76 plugins: [
77 nodeResolve({
78 only: ['test']
79 })
80 ]
81 });
82 const imports = await getImports(bundle);
83 const modules = await getResolvedModules(bundle);
84
85 t.is(warnings.length, 1);
86 t.snapshot(warnings);
87 t.deepEqual(imports, ['@scoped/foo', '@scoped/bar']);
88 t.assert(Object.keys(modules).includes(resolve('only-local.js')));
89 });
90
91 test('deprecated: regex', async (t) => {
92 const warnings = [];
93 const bundle = await rollup({
94 input: 'only.js',
95 onwarn: (warning) => warnings.push(warning),
96 plugins: [
97 nodeResolve({
98 only: [/^@scoped\/.*$/]
99 })
100 ]
101 });
102 const imports = await getImports(bundle);
103 const modules = await getResolvedModules(bundle);
104
105 t.is(warnings.length, 1);
106 t.snapshot(warnings);
107 t.deepEqual(imports, ['test']);
108 t.assert(Object.keys(modules).includes(resolve('only-local.js')));
109 });
+0
-50
packages/node-resolve/test/order.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { testBundle } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('respects order if given module,jsnext:main,main', async (t) => {
12 const bundle = await rollup({
13 input: 'prefer-module.js',
14 onwarn: () => t.fail('No warnings were expected'),
15 plugins: [nodeResolve({ mainFields: ['module', 'jsnext:main', 'main'], preferBuiltins: false })]
16 });
17 const { module } = await testBundle(t, bundle);
18 t.is(module.exports, 'MODULE-ENTRY');
19 });
20
21 test('prefer module field by default', async (t) => {
22 const bundle = await rollup({
23 input: 'prefer-module.js',
24 onwarn: () => t.fail('No warnings were expected'),
25 plugins: [nodeResolve({ preferBuiltins: false })]
26 });
27 const { module } = await testBundle(t, bundle);
28 t.is(module.exports, 'MODULE-ENTRY');
29 });
30
31 test('finds and uses a dual-distributed .js & .mjs module', async (t) => {
32 const bundle = await rollup({
33 input: 'dual-cjs-mjs.js',
34 onwarn: () => t.fail('No warnings were expected'),
35 plugins: [nodeResolve({ preferBuiltins: false })]
36 });
37 const { module } = await testBundle(t, bundle);
38 t.is(module.exports, 'DUAL-MJS');
39 });
40
41 test('respects order if given jsnext:main, main', async (t) => {
42 const bundle = await rollup({
43 input: 'prefer-jsnext.js',
44 onwarn: () => t.fail('No warnings were expected'),
45 plugins: [nodeResolve({ mainFields: ['jsnext:main', 'main'], preferBuiltins: false })]
46 });
47 const { module } = await testBundle(t, bundle);
48 t.is(module.exports, 'JSNEXT-ENTRY');
49 });
+0
-91
packages/node-resolve/test/prefer-builtins.js less more
0 const { join, resolve } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { getImports, testBundle } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures'));
10
11 test('warns when importing builtins', async (t) => {
12 const warnings = [];
13 const bundle = await rollup({
14 input: 'builtins.js',
15 onwarn: (warning) => warnings.push(warning),
16 plugins: [
17 nodeResolve({
18 mainFields: ['browser', 'main'],
19 preferBuiltins: true
20 })
21 ]
22 });
23
24 const { module } = await testBundle(t, bundle);
25
26 t.is(warnings.length, 1);
27 t.snapshot(warnings);
28 // eslint-disable-next-line global-require
29 t.is(module.exports, require('path').sep);
30 });
31
32 test('warning when preferring a builtin module, no explicit configuration', async (t) => {
33 let warning = null;
34 await rollup({
35 input: 'prefer-builtin.js',
36 onwarn({ message }) {
37 // eslint-disable-next-line no-bitwise
38 if (~message.indexOf('preferring')) {
39 warning = message;
40 }
41 },
42 plugins: [nodeResolve()]
43 });
44
45 const localPath = resolve('node_modules/events/index.js');
46 t.is(
47 warning,
48 `preferring built-in module 'events' over local alternative ` +
49 `at '${localPath}', pass 'preferBuiltins: false' to disable this behavior ` +
50 `or 'preferBuiltins: true' to disable this warning`
51 );
52 });
53
54 test('true allows preferring a builtin to a local module of the same name', async (t) => {
55 const warnings = [];
56 const bundle = await rollup({
57 input: 'prefer-builtin.js',
58 onwarn: (warning) => warnings.push(warning),
59 plugins: [
60 nodeResolve({
61 preferBuiltins: true
62 })
63 ]
64 });
65
66 const imports = await getImports(bundle);
67
68 t.is(warnings.length, 1);
69 t.snapshot(warnings);
70 t.deepEqual(imports, ['events']);
71 });
72
73 test('false allows resolving a local module with the same name as a builtin module', async (t) => {
74 const warnings = [];
75 const bundle = await rollup({
76 input: 'prefer-builtin.js',
77 onwarn: (warning) => warnings.push(warning),
78 plugins: [
79 nodeResolve({
80 preferBuiltins: false
81 })
82 ]
83 });
84
85 const imports = await getImports(bundle);
86
87 t.is(warnings.length, 1);
88 t.snapshot(warnings);
89 t.deepEqual(imports, []);
90 });
+0
-25
packages/node-resolve/test/root-dir.js less more
0 const { join } = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const { testBundle } = require('../../../util/test');
6
7 const { nodeResolve } = require('..');
8
9 process.chdir(join(__dirname, 'fixtures', 'monorepo-dedupe', 'packages', 'package-a'));
10
11 test('deduplicates modules from the given root directory', async (t) => {
12 const bundle = await rollup({
13 input: 'index.js',
14 plugins: [
15 nodeResolve({
16 dedupe: ['react'],
17 rootDir: join(__dirname, 'fixtures', 'monorepo-dedupe')
18 })
19 ]
20 });
21 const { module } = await testBundle(t, bundle);
22
23 t.snapshot(module.exports);
24 });
+0
-14
packages/node-resolve/test/snapshots/dedupe-custom.js.md less more
0 # Snapshot report for `test/dedupe-custom.js`
1
2 The actual snapshot is saved in `dedupe-custom.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## can deduplicate custom module directory
7
8 > Snapshot 1
9
10 {
11 PackageA: 'package-a:package-b:root',
12 PackageB: 'package-b:root',
13 }
packages/node-resolve/test/snapshots/dedupe-custom.js.snap less more
Binary diff not shown
+0
-50
packages/node-resolve/test/snapshots/dedupe.js.md less more
0 # Snapshot report for `test/dedupe.js`
1
2 The actual snapshot is saved in `dedupe.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## dedupes deep imports by package name if dedupe is set
7
8 > Snapshot 1
9
10 {
11 React: 'react/deep.js:root',
12 ReactConsumer: 'react-consumer:react/deep.js:root',
13 }
14
15 ## dedupes scoped deep imports by package name if dedupe is set
16
17 > Snapshot 1
18
19 {
20 ScopedDeduped: 'scoped-deduped:root',
21 ScopedDedupedConsumer: 'scoped-deduped-consumer:scoped-deduped:root',
22 }
23
24 ## multiple module versions are bundled if dedupe is not set
25
26 > Snapshot 1
27
28 {
29 React: 'react:root',
30 ReactConsumer: 'react-consumer:react:child',
31 }
32
33 ## single module version is bundled if dedupe is set
34
35 > Snapshot 1
36
37 {
38 React: 'react:root',
39 ReactConsumer: 'react-consumer:react:root',
40 }
41
42 ## single module version is bundled if dedupe is set as a function
43
44 > Snapshot 1
45
46 {
47 React: 'react:root',
48 ReactConsumer: 'react-consumer:react:root',
49 }
packages/node-resolve/test/snapshots/dedupe.js.snap less more
Binary diff not shown
+0
-20
packages/node-resolve/test/snapshots/jail.js.md less more
0 # Snapshot report for `test/jail.js`
1
2 The actual snapshot is saved in `jail.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## mark module outside the jail as external
7
8 > Snapshot 1
9
10 [
11 {
12 code: 'UNRESOLVED_IMPORT',
13 importer: 'jail.js',
14 message: '\'string/uppercase.js\' is imported by jail.js, but could not be resolved – treating it as an external dependency',
15 source: 'string/uppercase.js',
16 toString: Function {},
17 url: 'https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency',
18 },
19 ]
packages/node-resolve/test/snapshots/jail.js.snap less more
Binary diff not shown
+0
-49
packages/node-resolve/test/snapshots/only.js.md less more
0 # Snapshot report for `test/only.js`
1
2 The actual snapshot is saved in `only.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## deprecated: regex
7
8 > Snapshot 1
9
10 [
11 {
12 code: 'PLUGIN_WARNING',
13 message: 'node-resolve: The `only` options is deprecated, please use `resolveOnly`',
14 plugin: 'node-resolve',
15 toString: Function {},
16 },
17 ]
18
19 ## deprecated: specify the only packages to resolve
20
21 > Snapshot 1
22
23 [
24 {
25 code: 'PLUGIN_WARNING',
26 message: 'node-resolve: The `only` options is deprecated, please use `resolveOnly`',
27 plugin: 'node-resolve',
28 toString: Function {},
29 },
30 ]
31
32 ## regex
33
34 > Snapshot 1
35
36 []
37
38 ## specify the only packages to resolve
39
40 > Snapshot 1
41
42 []
43
44 ## handles nested entry modules
45
46 > Snapshot 1
47
48 []
packages/node-resolve/test/snapshots/only.js.snap less more
Binary diff not shown
+0
-48
packages/node-resolve/test/snapshots/prefer-builtins.js.md less more
0 # Snapshot report for `test/prefer-builtins.js`
1
2 The actual snapshot is saved in `prefer-builtins.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## false allows resolving a local module with the same name as a builtin module
7
8 > Snapshot 1
9
10 [
11 {
12 chunkName: 'prefer-builtin',
13 code: 'EMPTY_BUNDLE',
14 message: 'Generated an empty chunk: "prefer-builtin"',
15 toString: Function {},
16 },
17 ]
18
19 ## true allows preferring a builtin to a local module of the same name
20
21 > Snapshot 1
22
23 [
24 {
25 code: 'UNRESOLVED_IMPORT',
26 importer: 'prefer-builtin.js',
27 message: '\'events\' is imported by prefer-builtin.js, but could not be resolved – treating it as an external dependency',
28 source: 'events',
29 toString: Function {},
30 url: 'https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency',
31 },
32 ]
33
34 ## warns when importing builtins
35
36 > Snapshot 1
37
38 [
39 {
40 code: 'UNRESOLVED_IMPORT',
41 importer: 'builtins.js',
42 message: '\'path\' is imported by builtins.js, but could not be resolved – treating it as an external dependency',
43 source: 'path',
44 toString: Function {},
45 url: 'https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency',
46 },
47 ]
packages/node-resolve/test/snapshots/prefer-builtins.js.snap less more
Binary diff not shown
+0
-17
packages/node-resolve/test/snapshots/root-dir.js.md less more
0 # Snapshot report for `test/root-dir.js`
1
2 The actual snapshot is saved in `root-dir.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## deduplicated from the given root directory
7
8 > Snapshot 1
9
10 'Package A React: react imported from root | package B react: react imported from root'
11
12 ## deduplicates modules from the given root directory
13
14 > Snapshot 1
15
16 'Package A React: react imported from root | package B react: react imported from root'
packages/node-resolve/test/snapshots/root-dir.js.snap less more
Binary diff not shown
+0
-41
packages/node-resolve/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## handles package side-effects
7
8 > Snapshot 1
9
10 [
11 'array-dep1',
12 'array-dep3',
13 'array-dep5',
14 'array-index',
15 'false-dep1',
16 'true-dep1',
17 'true-dep2',
18 'true-index',
19 ]
20
21 ## ignores deep-import non-modules
22
23 > Snapshot 1
24
25 [
26 {
27 code: 'UNRESOLVED_IMPORT',
28 importer: 'deep-import-non-module.js',
29 message: '\'foo/deep\' is imported by deep-import-non-module.js, but could not be resolved – treating it as an external dependency',
30 source: 'foo/deep',
31 toString: Function {},
32 url: 'https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency',
33 },
34 ]
35
36 ## throws error if local id is not resolved
37
38 > Snapshot 1
39
40 'Could not resolve \'./foo\' from unresolved-local.js'
packages/node-resolve/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-75
packages/node-resolve/test/symlinks.js less more
0 const fs = require('fs');
1 const { join } = require('path');
2
3 const test = require('ava');
4 const { rollup } = require('rollup');
5
6 const { testBundle } = require('../../../util/test');
7
8 const { nodeResolve } = require('..');
9
10 process.chdir(join(__dirname, 'fixtures'));
11
12 function createMissingDirectories() {
13 createDirectory('symlinked/first/node_modules');
14 createDirectory('symlinked/second/node_modules');
15 createDirectory('symlinked/third/node_modules');
16 }
17
18 function createDirectory(pathToDir) {
19 if (!fs.existsSync(pathToDir)) {
20 fs.mkdirSync(pathToDir);
21 }
22 }
23
24 function linkDirectories() {
25 fs.symlinkSync('../../second', 'symlinked/first/node_modules/second', 'dir');
26 fs.symlinkSync('../../third', 'symlinked/first/node_modules/third', 'dir');
27 fs.symlinkSync('../../third', 'symlinked/second/node_modules/third', 'dir');
28 }
29
30 function unlinkDirectories() {
31 fs.unlinkSync('symlinked/first/node_modules/second');
32 fs.unlinkSync('symlinked/first/node_modules/third');
33 fs.unlinkSync('symlinked/second/node_modules/third');
34 }
35
36 test.beforeEach(() => {
37 createMissingDirectories();
38 linkDirectories();
39 });
40
41 test.afterEach.always(() => {
42 unlinkDirectories();
43 });
44
45 test.serial('resolves symlinked packages', async (t) => {
46 const bundle = await rollup({
47 input: 'symlinked/first/index.js',
48 onwarn: () => t.fail('No warnings were expected'),
49 plugins: [nodeResolve()]
50 });
51 const { module } = await testBundle(t, bundle);
52 t.is(module.exports.number1, module.exports.number2);
53 });
54
55 test.serial('resolves symlinked packages with browser object', async (t) => {
56 const bundle = await rollup({
57 input: 'symlinked/first/index.js',
58 onwarn: () => t.fail('No warnings were expected'),
59 plugins: [nodeResolve({ browser: true })]
60 });
61 const { module } = await testBundle(t, bundle);
62 t.is(module.exports.number1, 'not random string');
63 });
64
65 test.serial('preserves symlinks if `preserveSymlinks` is true', async (t) => {
66 const bundle = await rollup({
67 input: 'symlinked/first/index.js',
68 onwarn: () => t.fail('No warnings were expected'),
69 plugins: [nodeResolve()],
70 preserveSymlinks: true
71 });
72 const { module } = await testBundle(t, bundle);
73 t.not(module.exports.number1, module.exports.number2);
74 });
+0
-316
packages/node-resolve/test/test.js less more
0 import { join, resolve } from 'path';
1
2 import test from 'ava';
3 import { rollup } from 'rollup';
4 import babel from '@rollup/plugin-babel';
5 import commonjs from '@rollup/plugin-commonjs';
6
7 import { getCode, getImports, testBundle } from '../../../util/test';
8
9 import { nodeResolve } from '..';
10
11 process.chdir(join(__dirname, 'fixtures'));
12
13 test('finds a module with jsnext:main', async (t) => {
14 const bundle = await rollup({
15 input: 'jsnext.js',
16 onwarn: () => t.fail('No warnings were expected'),
17 plugins: [nodeResolve({ mainFields: ['jsnext:main', 'module', 'main'] })]
18 });
19 const { module } = await testBundle(t, bundle);
20
21 t.is(module.exports, 'JSNEXT');
22 });
23
24 test('finds and converts a basic CommonJS module', async (t) => {
25 const bundle = await rollup({
26 input: 'commonjs.js',
27 onwarn: () => t.fail('No warnings were expected'),
28 plugins: [nodeResolve({ mainFields: ['main'] }), commonjs()]
29 });
30 const { module } = await testBundle(t, bundle);
31
32 t.is(module.exports, 'It works!');
33 });
34
35 test('handles a trailing slash', async (t) => {
36 const bundle = await rollup({
37 input: 'trailing-slash.js',
38 onwarn: () => t.fail('No warnings were expected'),
39 plugins: [nodeResolve({ mainFields: ['main'] }), commonjs()]
40 });
41 const { module } = await testBundle(t, bundle);
42
43 t.is(module.exports, 'It works!');
44 });
45
46 test('finds a file inside a package directory', async (t) => {
47 const bundle = await rollup({
48 input: 'granular.js',
49 onwarn: () => t.fail('No warnings were expected'),
50 plugins: [
51 nodeResolve(),
52 babel({
53 babelHelpers: 'bundled',
54 presets: [
55 [
56 '@babel/preset-env',
57 {
58 targets: {
59 node: 6
60 }
61 }
62 ]
63 ]
64 })
65 ]
66 });
67 const { module } = await testBundle(t, bundle);
68
69 t.is(module.exports, 'FOO');
70 });
71
72 test('loads local directories by finding index.js within them', async (t) => {
73 const bundle = await rollup({
74 input: 'local-index/main.js',
75 onwarn: () => t.fail('No warnings were expected'),
76 plugins: [nodeResolve()]
77 });
78 const { module } = await testBundle(t, bundle);
79
80 t.is(module.exports, 42);
81 });
82
83 test('loads package directories by finding index.js within them', async (t) => {
84 const bundle = await rollup({
85 input: 'package-index.js',
86 onwarn: () => t.fail('No warnings were expected'),
87 plugins: [nodeResolve()]
88 });
89 const code = await getCode(bundle);
90
91 t.truthy(code.indexOf('setPrototypeOf'));
92 });
93
94 test('supports non-standard extensions', async (t) => {
95 const bundle = await rollup({
96 input: 'extensions/main.js',
97 onwarn: () => t.fail('No warnings were expected'),
98 plugins: [
99 nodeResolve({
100 extensions: ['.js', '.wut']
101 })
102 ]
103 });
104 await testBundle(t, bundle);
105 });
106
107 test('supports JS extensions in TS when referring to TS imports', async (t) => {
108 const bundle = await rollup({
109 input: 'ts-import-js-extension/import-ts-with-js-extension.ts',
110 onwarn: () => t.fail('No warnings were expected'),
111 plugins: [
112 nodeResolve({
113 extensions: ['.js', '.ts']
114 }),
115 babel({
116 babelHelpers: 'bundled',
117 plugins: ['@babel/plugin-transform-typescript'],
118 extensions: ['.js', '.ts']
119 })
120 ]
121 });
122 const { module } = await testBundle(t, bundle);
123 t.is(module.exports, 'It works!');
124 });
125
126 test('ignores IDs with null character', async (t) => {
127 const result = await nodeResolve().resolveId('\0someid', 'test.js');
128 t.is(result, null);
129 });
130
131 test('finds and uses an .mjs module', async (t) => {
132 const bundle = await rollup({
133 input: 'module-mjs.js',
134 onwarn: () => t.fail('No warnings were expected'),
135 plugins: [nodeResolve({ preferBuiltins: false })]
136 });
137 const { module } = await testBundle(t, bundle);
138
139 t.is(module.exports, 'MODULE-MJS');
140 });
141
142 test('supports ./ in entry filename', async (t) => {
143 const bundle = await rollup({
144 input: './jsnext.js',
145 onwarn: () => t.fail('No warnings were expected'),
146 plugins: [nodeResolve({})]
147 });
148 const { module } = await testBundle(t, bundle);
149
150 t.is(module.exports, 'MAIN');
151 });
152
153 test('throws error if local id is not resolved', async (t) => {
154 t.plan(1);
155 try {
156 await rollup({
157 input: 'unresolved-local.js',
158 onwarn: () => t.fail('No warnings were expected'),
159 plugins: [nodeResolve()]
160 });
161 } catch (e) {
162 t.snapshot(e.message);
163 }
164 });
165
166 test('allows custom options', async (t) => {
167 const bundle = await rollup({
168 input: 'custom-resolve-options/main.js',
169 onwarn: () => t.fail('No warnings were expected'),
170 plugins: [
171 nodeResolve({
172 customResolveOptions: {
173 moduleDirectory: 'js_modules'
174 }
175 })
176 ]
177 });
178
179 t.is(bundle.cache.modules[0].id, resolve('custom-resolve-options/js_modules/foo.js'));
180 });
181
182 test('ignores deep-import non-modules', async (t) => {
183 const warnings = [];
184 const bundle = await rollup({
185 input: 'deep-import-non-module.js',
186 onwarn: (warning) => warnings.push(warning),
187 plugins: [
188 nodeResolve({
189 modulesOnly: true
190 })
191 ]
192 });
193 const imports = await getImports(bundle);
194
195 t.is(warnings.length, 1);
196 t.snapshot(warnings);
197 t.deepEqual(imports, ['foo/deep']);
198 });
199
200 test('generates manual chunks', async (t) => {
201 const chunkName = 'mychunk';
202 const bundle = await rollup({
203 input: 'manualchunks.js',
204 onwarn: () => t.fail('No warnings were expected'),
205 manualChunks: {
206 [chunkName]: ['simple']
207 },
208 plugins: [nodeResolve()]
209 });
210
211 const { output } = await bundle.generate({
212 format: 'esm',
213 chunkFileNames: '[name]'
214 });
215
216 t.truthy(output.find(({ fileName }) => fileName === chunkName));
217 });
218
219 test('resolves dynamic imports', async (t) => {
220 const bundle = await rollup({
221 input: 'dynamic.js',
222 onwarn: () => t.fail('No warnings were expected'),
223 inlineDynamicImports: true,
224 plugins: [nodeResolve()]
225 });
226 const { module } = await testBundle(t, bundle);
227 const result = await module.exports;
228 t.is(result.default, 42);
229 });
230
231 test('handles package side-effects', async (t) => {
232 const bundle = await rollup({
233 input: 'side-effects.js',
234 plugins: [nodeResolve()]
235 });
236 await testBundle(t, bundle);
237 t.snapshot(global.sideEffects);
238
239 delete global.sideEffects;
240 });
241
242 test('can resolve imports with hashes', async (t) => {
243 const bundle = await rollup({
244 input: 'hash.js',
245 onwarn: () => t.fail('No warnings were expected'),
246 plugins: [
247 nodeResolve(),
248 {
249 load(id) {
250 if (id === resolve(__dirname, 'fixtures', 'node_modules', 'test', 'index.js#foo')) {
251 return 'export default "resolved with hash"';
252 }
253 return null;
254 }
255 }
256 ]
257 });
258 const { module } = await testBundle(t, bundle);
259
260 t.is(module.exports, 'resolved with hash');
261 });
262
263 test('can resolve imports with search params', async (t) => {
264 const bundle = await rollup({
265 input: 'search-params.js',
266 onwarn: () => t.fail('No warnings were expected'),
267 plugins: [
268 nodeResolve(),
269 {
270 load(id) {
271 if (
272 id ===
273 resolve(__dirname, 'fixtures', 'node_modules', 'test', 'index.js?foo=bar&lorem=ipsum')
274 ) {
275 return 'export default "resolved with search params"';
276 }
277 return null;
278 }
279 }
280 ]
281 });
282 const { module } = await testBundle(t, bundle);
283
284 t.is(module.exports, 'resolved with search params');
285 });
286
287 test('can resolve imports with search params and hash', async (t) => {
288 const bundle = await rollup({
289 input: 'search-params-and-hash.js',
290 onwarn: () => t.fail('No warnings were expected'),
291 plugins: [
292 nodeResolve(),
293 {
294 load(id) {
295 if (
296 id ===
297 resolve(
298 __dirname,
299 'fixtures',
300 'node_modules',
301 'test',
302 'index.js?foo=bar&lorem=ipsum#foo'
303 )
304 ) {
305 return 'export default "resolved with search params and hash"';
306 }
307 return null;
308 }
309 }
310 ]
311 });
312 const { module } = await testBundle(t, bundle);
313
314 t.is(module.exports, 'resolved with search params and hash');
315 });
+0
-30
packages/node-resolve/test/types.ts less more
0 // @ts-check
1 import { nodeResolve } from '..';
2
3 /** @type {import("rollup").RollupOptions} */
4 const config = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife',
9 name: 'MyModule'
10 },
11 plugins: [
12 nodeResolve({
13 browser: true,
14 customResolveOptions: {
15 moduleDirectory: 'js_modules'
16 },
17 dedupe: ['lodash'],
18 extensions: ['.mjs', '.js', '.jsx', '.json'],
19 jail: '/my/jail/path',
20 only: ['some_module', /^@some_scope\/.*$/],
21 preferBuiltins: false,
22 mainFields: ['untranspiled', 'module', 'main'],
23 modulesOnly: true,
24 resolveOnly: ['some_module', /^@some_scope\/.*$/]
25 })
26 ]
27 };
28
29 export default config;
+0
-92
packages/node-resolve/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1 import { AsyncOpts } from 'resolve';
2
3 export const DEFAULTS: {
4 customResolveOptions: {};
5 dedupe: [];
6 extensions: ['.mjs', '.js', '.json', '.node'];
7 resolveOnly: [];
8 };
9
10 export interface RollupNodeResolveOptions {
11 /**
12 * If `true`, instructs the plugin to use the `"browser"` property in `package.json`
13 * files to specify alternative files to load for bundling. This is useful when
14 * bundling for a browser environment. Alternatively, a value of `'browser'` can be
15 * added to the `mainFields` option. If `false`, any `"browser"` properties in
16 * package files will be ignored. This option takes precedence over `mainFields`.
17 * @default false
18 */
19 browser?: boolean;
20
21 /**
22 * An `Object` that specifies additional options that should be passed through to `node-resolve`.
23 */
24 customResolveOptions?: AsyncOpts;
25
26 /**
27 * An `Array` of modules names, which instructs the plugin to force resolving for the
28 * specified modules to the root `node_modules`. Helps to prevent bundling the same
29 * package multiple times if package is imported from dependencies.
30 */
31 dedupe?: string[] | ((importee: string) => boolean);
32
33 /**
34 * Specifies the extensions of files that the plugin will operate on.
35 * @default [ '.mjs', '.js', '.json', '.node' ]
36 */
37 extensions?: readonly string[];
38
39 /**
40 * Locks the module search within specified path (e.g. chroot). Modules defined
41 * outside this path will be marked as external.
42 * @default '/'
43 */
44 jail?: string;
45
46 /**
47 * Specifies the properties to scan within a `package.json`, used to determine the
48 * bundle entry point.
49 * @default ['module', 'main']
50 */
51 mainFields?: readonly string[];
52
53 /**
54 * If `true`, inspect resolved files to assert that they are ES2015 modules.
55 * @default false
56 */
57 modulesOnly?: boolean;
58
59 /**
60 * @deprecated use "resolveOnly" instead
61 * @default null
62 */
63 only?: ReadonlyArray<string | RegExp> | null;
64
65 /**
66 * If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`,
67 * the plugin will look for locally installed modules of the same name.
68 * @default true
69 */
70 preferBuiltins?: boolean;
71
72 /**
73 * An `Array` which instructs the plugin to limit module resolution to those whose
74 * names match patterns in the array.
75 * @default []
76 */
77 resolveOnly?: ReadonlyArray<string | RegExp> | null;
78
79 /**
80 * Specifies the root directory from which to resolve modules. Typically used when
81 * resolving entry-point imports, and when resolving deduplicated modules.
82 * @default process.cwd()
83 */
84 rootDir?: string;
85 }
86
87 /**
88 * Locate modules using the Node resolution algorithm, for using third party modules in node_modules
89 */
90 export function nodeResolve(options?: RollupNodeResolveOptions): Plugin;
91 export default nodeResolve;
00 # @rollup/pluginutils ChangeLog
1
2 ## v4.1.0
3
4 _2020-10-27_
5
6 ### Bugfixes
7
8 - fix: attach scope object to for-loop (#616)
9
10 ### Features
11
12 - feat: normalizePath (#550)
13
14 ### Updates
15
16 - refactor: improve readability of attachScopes test (#551)
117
218 ## v4.0.0
319
00 {
11 "name": "@rollup/pluginutils",
2 "version": "4.0.0",
2 "version": "4.1.0",
33 "publishConfig": {
44 "access": "public"
55 },
1313 },
1414 "main": "./dist/cjs/index.js",
1515 "module": "./dist/es/index.js",
16 "type": "commonjs",
17 "exports": {
18 "require": "./dist/cjs/index.js",
19 "import": "./dist/es/index.js"
20 },
1621 "engines": {
1722 "node": ">= 8.0.0"
1823 },
4752 "rollup": "^1.20.0||^2.0.0"
4853 },
4954 "dependencies": {
50 "@types/estree": "0.0.45",
5155 "estree-walker": "^2.0.1",
5256 "picomatch": "^2.2.2"
5357 },
5559 "@rollup/plugin-commonjs": "^14.0.0",
5660 "@rollup/plugin-node-resolve": "^8.4.0",
5761 "@rollup/plugin-typescript": "^5.0.2",
62 "@types/estree": "0.0.45",
5863 "@types/node": "^14.0.26",
5964 "@types/picomatch": "^2.2.1",
65 "acorn": "^8.0.4",
6066 "rollup": "^2.23.0"
6167 },
6268 "types": "types/index.d.ts",
7783 "!**/types.ts"
7884 ]
7985 },
80 "exports": {
81 "require": "./dist/cjs/index.js",
82 "import": "./dist/es/index.js"
83 },
8486 "nyc": {
8587 "extension": [
8688 ".js",
8789 ".ts"
8890 ]
89 },
90 "type": "commonjs"
91 }
9192 }
0 // eslint-disable-next-line import/no-unresolved
1 import * as estree from 'estree';
2
03 import { walk } from 'estree-walker';
14
25 import { AttachedScope, AttachScopes } from '../types';
1518 interface ScopeOptions {
1619 parent?: AttachedScope;
1720 block?: boolean;
18 params?: import('estree').Node[];
21 params?: estree.Node[];
1922 }
2023
2124 class Scope implements AttachedScope {
3841 }
3942 }
4043
41 addDeclaration(node: import('estree').Node, isBlockDeclaration: boolean, isVar: boolean): void {
44 addDeclaration(node: estree.Node, isBlockDeclaration: boolean, isVar: boolean): void {
4245 if (!isBlockDeclaration && this.isBlockScope) {
4346 // it's a `var` or function node, and this
4447 // is a block scope, so we need to go up
6063
6164 walk(ast, {
6265 enter(n, parent) {
63 const node = n as import('estree').Node;
66 const node = n as estree.Node;
6467 // function foo () {...}
6568 // class Foo {...}
6669 if (/(Function|Class)Declaration/.test(node.type)) {
7174 if (node.type === 'VariableDeclaration') {
7275 const { kind } = node;
7376 const isBlockDeclaration = blockDeclarations[kind];
74 // don't add const/let declarations in the body of a for loop #113
75 const parentType = parent ? parent.type : '';
76 if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
77 node.declarations.forEach((declaration) => {
78 scope.addDeclaration(declaration, isBlockDeclaration, true);
79 });
80 }
77 node.declarations.forEach((declaration) => {
78 scope.addDeclaration(declaration, isBlockDeclaration, true);
79 });
8180 }
8281
8382 let newScope: AttachedScope | undefined;
8483
8584 // create new function scope
8685 if (/Function/.test(node.type)) {
87 const func = node as import('estree').Function;
86 const func = node as estree.Function;
8887 newScope = new Scope({
8988 parent: scope,
9089 block: false,
9695 if (func.type === 'FunctionExpression' && func.id) {
9796 newScope.addDeclaration(func, false, false);
9897 }
98 }
99
100 // create new for scope
101 if (/For(In|Of)?Statement/.test(node.type)) {
102 newScope = new Scope({
103 parent: scope,
104 block: true
105 });
99106 }
100107
101108 // create new block scope
125132 }
126133 },
127134 leave(n) {
128 const node = n as import('estree').Node & Record<string, any>;
135 const node = n as estree.Node & Record<string, any>;
129136 if (node[propertyName]) scope = scope.parent!;
130137 }
131138 });
0 // eslint-disable-next-line import/no-unresolved
1 import * as estree from 'estree';
2
03 import test from 'ava';
4 import { parse } from 'acorn';
15
2 import { attachScopes } from '../';
6 import { attachScopes, AttachedScope } from '../';
37
48 test('attaches a scope to the top level', (t) => {
5 const ast = {
6 type: 'Program',
7 start: 0,
8 end: 8,
9 body: [
10 {
11 type: 'VariableDeclaration',
12 start: 0,
13 end: 8,
14 declarations: [
15 {
16 type: 'VariableDeclarator',
17 start: 4,
18 end: 7,
19 id: {
20 type: 'Identifier',
21 start: 4,
22 end: 7,
23 name: 'foo'
24 },
25 init: null
26 }
27 ],
28 kind: 'var'
29 }
30 ],
31 sourceType: 'module'
32 };
9 const ast = parse('var foo;', { ecmaVersion: 2020, sourceType: 'module' });
3310
3411 const scope = attachScopes(ast, 'scope');
3512 t.truthy(scope.contains('foo'));
3714 });
3815
3916 test('adds multiple declarators from a single var declaration', (t) => {
40 const ast = {
41 type: 'Program',
42 start: 0,
43 end: 13,
44 body: [
45 {
46 type: 'VariableDeclaration',
47 start: 0,
48 end: 13,
49 declarations: [
50 {
51 type: 'VariableDeclarator',
52 start: 4,
53 end: 7,
54 id: {
55 type: 'Identifier',
56 start: 4,
57 end: 7,
58 name: 'foo'
59 },
60 init: null
61 },
62
63 {
64 type: 'VariableDeclarator',
65 start: 9,
66 end: 12,
67 id: {
68 type: 'Identifier',
69 start: 9,
70 end: 12,
71 name: 'bar'
72 },
73 init: null
74 }
75 ],
76 kind: 'var'
77 }
78 ],
79 sourceType: 'module'
80 };
17 const ast = parse('var foo, bar;', { ecmaVersion: 2020, sourceType: 'module' });
8118
8219 const scope = attachScopes(ast, 'scope');
8320 t.truthy(scope.contains('foo'));
8522 });
8623
8724 test('adds named declarators from a deconstructed declaration', (t) => {
88 const ast = {
89 type: 'Program',
90 start: 0,
91 end: 13,
92 body: [
93 {
94 type: 'VariableDeclaration',
95 start: 0,
96 end: 42,
97 declarations: [
98 {
99 type: 'VariableDeclarator',
100 start: 4,
101 end: 41,
102 id: {
103 type: 'ObjectPattern',
104 start: 4,
105 end: 15,
106 properties: [
107 {
108 type: 'Property',
109 start: 6,
110 end: 10,
111 method: false,
112 shorthand: false,
113 computed: false,
114 key: {
115 type: 'Literal',
116 start: 6,
117 end: 7,
118 value: 1,
119 raw: '1'
120 },
121 value: {
122 type: 'Identifier',
123 start: 9,
124 end: 10,
125 name: 'a'
126 },
127 kind: 'init'
128 },
129 {
130 type: 'Property',
131 start: 12,
132 end: 13,
133 method: false,
134 shorthand: true,
135 computed: false,
136 key: {
137 type: 'Identifier',
138 start: 12,
139 end: 13,
140 name: 'b'
141 },
142 kind: 'init',
143 value: {
144 type: 'Identifier',
145 start: 12,
146 end: 13,
147 name: 'b'
148 }
149 }
150 ]
151 },
152 init: {
153 type: 'ObjectExpression',
154 start: 18,
155 end: 41,
156 properties: [
157 {
158 type: 'Property',
159 start: 22,
160 end: 28,
161 method: false,
162 shorthand: false,
163 computed: false,
164 key: {
165 type: 'Literal',
166 start: 22,
167 end: 23,
168 value: 1,
169 raw: '1'
170 },
171 value: {
172 type: 'Literal',
173 start: 25,
174 end: 28,
175 value: 'a',
176 raw: "'a'"
177 },
178 kind: 'init'
179 },
180 {
181 type: 'Property',
182 start: 32,
183 end: 38,
184 method: false,
185 shorthand: false,
186 computed: false,
187 key: {
188 type: 'Identifier',
189 start: 32,
190 end: 33,
191 name: 'b'
192 },
193 value: {
194 type: 'Literal',
195 start: 35,
196 end: 38,
197 value: 'b',
198 raw: "'b'"
199 },
200 kind: 'init'
201 }
202 ]
203 }
204 }
205 ],
206 kind: 'var'
207 }
208 ],
25 const ast = parse("var {1: a, b} = {1: 'a', b: 'b'};", {
26 ecmaVersion: 2020,
20927 sourceType: 'module'
210 };
28 });
21129
21230 const scope = attachScopes(ast, 'scope');
21331 t.truthy(scope.contains('a'));
21533 });
21634
21735 test('adds rest elements from a deconstructed object declaration', (t) => {
218 const ast = {
219 type: 'Program',
220 start: 0,
221 end: 66,
222 body: [
223 {
224 type: 'VariableDeclaration',
225 start: 0,
226 end: 66,
227 declarations: [
228 {
229 type: 'VariableDeclarator',
230 start: 6,
231 end: 66,
232 id: {
233 type: 'ObjectPattern',
234 start: 6,
235 end: 26,
236 properties: [
237 {
238 type: 'Property',
239 start: 8,
240 end: 9,
241 method: false,
242 shorthand: true,
243 computed: false,
244 key: {
245 type: 'Identifier',
246 start: 8,
247 end: 9,
248 name: 'x'
249 },
250 kind: 'init',
251 value: {
252 type: 'Identifier',
253 start: 8,
254 end: 9,
255 name: 'x'
256 }
257 },
258 {
259 type: 'Property',
260 start: 11,
261 end: 15,
262 method: false,
263 shorthand: false,
264 computed: false,
265 key: {
266 type: 'Identifier',
267 start: 11,
268 end: 12,
269 name: 'y'
270 },
271 value: {
272 type: 'Identifier',
273 start: 14,
274 end: 15,
275 name: 'z'
276 },
277 kind: 'init'
278 },
279 {
280 type: 'RestElement',
281 start: 17,
282 end: 24,
283 argument: {
284 type: 'Identifier',
285 start: 20,
286 end: 24,
287 name: 'rest'
288 }
289 }
290 ]
291 },
292 init: {
293 type: 'ObjectExpression',
294 start: 29,
295 end: 66,
296 properties: [
297 {
298 type: 'Property',
299 start: 31,
300 end: 36,
301 method: false,
302 shorthand: false,
303 computed: false,
304 key: {
305 type: 'Identifier',
306 start: 31,
307 end: 32,
308 name: 'x'
309 },
310 value: {
311 type: 'Literal',
312 start: 34,
313 end: 36,
314 value: 10,
315 raw: '10'
316 },
317 kind: 'init'
318 },
319 {
320 type: 'Property',
321 start: 38,
322 end: 43,
323 method: false,
324 shorthand: false,
325 computed: false,
326 key: {
327 type: 'Identifier',
328 start: 38,
329 end: 39,
330 name: 'y'
331 },
332 value: {
333 type: 'Literal',
334 start: 41,
335 end: 43,
336 value: 20,
337 raw: '20'
338 },
339 kind: 'init'
340 },
341 {
342 type: 'Property',
343 start: 45,
344 end: 50,
345 method: false,
346 shorthand: false,
347 computed: false,
348 key: {
349 type: 'Identifier',
350 start: 45,
351 end: 46,
352 name: 'z'
353 },
354 value: {
355 type: 'Literal',
356 start: 48,
357 end: 50,
358 value: 30,
359 raw: '30'
360 },
361 kind: 'init'
362 },
363 {
364 type: 'Property',
365 start: 52,
366 end: 57,
367 method: false,
368 shorthand: false,
369 computed: false,
370 key: {
371 type: 'Identifier',
372 start: 52,
373 end: 53,
374 name: 'w'
375 },
376 value: {
377 type: 'Literal',
378 start: 55,
379 end: 57,
380 value: 40,
381 raw: '40'
382 },
383 kind: 'init'
384 },
385 {
386 type: 'Property',
387 start: 59,
388 end: 64,
389 method: false,
390 shorthand: false,
391 computed: false,
392 key: {
393 type: 'Identifier',
394 start: 59,
395 end: 60,
396 name: 'k'
397 },
398 value: {
399 type: 'Literal',
400 start: 62,
401 end: 64,
402 value: 50,
403 raw: '50'
404 },
405 kind: 'init'
406 }
407 ]
408 }
409 }
410 ],
411 kind: 'const'
412 }
413 ],
36 const ast = parse('const {x, y: z, ...rest} = {x: 10, y: 20, z: 30, w: 40, k: 50};', {
37 ecmaVersion: 2020,
41438 sourceType: 'module'
415 };
39 });
41640
41741 const scope = attachScopes(ast, 'scope');
41842 t.truthy(scope.contains('x'));
42246 });
42347
42448 test('adds nested declarators from a deconstructed declaration', (t) => {
425 const ast = {
426 type: 'Program',
427 start: 0,
428 end: 40,
429 body: [
430 {
431 type: 'VariableDeclaration',
432 start: 0,
433 end: 40,
434 declarations: [
435 {
436 type: 'VariableDeclarator',
437 start: 4,
438 end: 39,
439 id: {
440 type: 'ObjectPattern',
441 start: 4,
442 end: 19,
443 properties: [
444 {
445 type: 'Property',
446 start: 6,
447 end: 17,
448 method: false,
449 shorthand: false,
450 computed: false,
451 key: {
452 type: 'Identifier',
453 start: 6,
454 end: 7,
455 name: 'a'
456 },
457 value: {
458 type: 'ObjectPattern',
459 start: 9,
460 end: 17,
461 properties: [
462 {
463 type: 'Property',
464 start: 11,
465 end: 15,
466 method: false,
467 shorthand: false,
468 computed: false,
469 key: {
470 type: 'Identifier',
471 start: 11,
472 end: 12,
473 name: 'b'
474 },
475 value: {
476 type: 'Identifier',
477 start: 14,
478 end: 15,
479 name: 'c'
480 },
481 kind: 'init'
482 }
483 ]
484 },
485 kind: 'init'
486 }
487 ]
488 },
489 init: {
490 type: 'ObjectExpression',
491 start: 22,
492 end: 39,
493 properties: [
494 {
495 type: 'Property',
496 start: 24,
497 end: 37,
498 method: false,
499 shorthand: false,
500 computed: false,
501 key: {
502 type: 'Identifier',
503 start: 24,
504 end: 25,
505 name: 'a'
506 },
507 value: {
508 type: 'ObjectExpression',
509 start: 27,
510 end: 37,
511 properties: [
512 {
513 type: 'Property',
514 start: 29,
515 end: 35,
516 method: false,
517 shorthand: false,
518 computed: false,
519 key: {
520 type: 'Identifier',
521 start: 29,
522 end: 30,
523 name: 'b'
524 },
525 value: {
526 type: 'Literal',
527 start: 32,
528 end: 35,
529 value: 'b',
530 raw: "'b'"
531 },
532 kind: 'init'
533 }
534 ]
535 },
536 kind: 'init'
537 }
538 ]
539 }
540 }
541 ],
542 kind: 'let'
543 }
544 ],
49 const ast = parse("let {a: {b: c}} = {a: {b: 'b'}};", {
50 ecmaVersion: 2020,
54551 sourceType: 'module'
546 };
52 });
54753
54854 const scope = attachScopes(ast, 'scope');
54955 t.falsy(scope.contains('a'));
55258 });
55359
55460 test('supports FunctionDeclarations without id', (t) => {
555 const ast = {
556 type: 'Program',
557 start: 0,
558 end: 33,
559 body: [
560 {
561 type: 'ExportDefaultDeclaration',
562 start: 0,
563 end: 32,
564 declaration: {
565 type: 'FunctionDeclaration',
566 start: 15,
567 end: 32,
568 id: null,
569 generator: false,
570 expression: false,
571 async: false,
572 params: [],
573 body: {
574 type: 'BlockStatement',
575 start: 26,
576 end: 32,
577 body: []
578 }
579 }
580 }
581 ],
582 sourceType: 'module'
583 };
61 const ast = parse('export default function () {}', { ecmaVersion: 2020, sourceType: 'module' });
58462
58563 t.notThrows(() => {
58664 attachScopes(ast, 'scope');
58866 });
58967
59068 test('supports catch without a parameter', (t) => {
591 const ast = {
592 type: 'Program',
593 start: 0,
594 end: 23,
595 body: [
596 {
597 type: 'TryStatement',
598 start: 0,
599 end: 23,
600 block: {
601 type: 'BlockStatement',
602 start: 4,
603 end: 10,
604 body: []
605 },
606 handler: {
607 type: 'CatchClause',
608 start: 11,
609 end: 23,
610 param: null,
611 body: {
612 type: 'BlockStatement',
613 start: 17,
614 end: 23,
615 body: []
616 }
617 },
618 finalizer: null
619 }
620 ],
621 sourceType: 'script'
622 };
69 const ast = parse('try {} catch {}', { ecmaVersion: 2020, sourceType: 'script' });
70
62371 t.notThrows(() => {
62472 attachScopes(ast, 'scope');
62573 });
62674 });
75
76 test('supports ForStatement', (t) => {
77 const ast = (parse(
78 `
79 for (let a = 0; a < 10; a++) {
80 console.log(a);
81 let b = 10;
82 }
83 `,
84 { ecmaVersion: 2020, sourceType: 'module' }
85 ) as unknown) as estree.Program;
86
87 const scope = attachScopes(ast, 'scope');
88 t.falsy(scope.contains('a'));
89 t.falsy(scope.contains('b'));
90
91 const forLoop = ast.body[0] as estree.ForStatement & { scope: AttachedScope };
92
93 t.truthy(forLoop.scope.contains('a'));
94 t.falsy(forLoop.scope.contains('b'));
95
96 const forBody = forLoop.body as estree.BlockStatement & { scope: AttachedScope };
97 t.truthy(forBody.scope.contains('a'));
98 t.truthy(forBody.scope.contains('b'));
99 });
100
101 test('supports ForOfStatement', (t) => {
102 const ast = (parse(
103 `
104 for (const a of [1, 2, 3]) {
105 console.log(a);
106 let b = 10;
107 }
108 `,
109 { ecmaVersion: 2020, sourceType: 'module' }
110 ) as unknown) as estree.Program;
111
112 const scope = attachScopes(ast, 'scope');
113 t.falsy(scope.contains('a'));
114 t.falsy(scope.contains('b'));
115
116 const forLoop = ast.body[0] as estree.ForOfStatement & { scope: AttachedScope };
117 t.truthy(forLoop.scope.contains('a'));
118 t.falsy(forLoop.scope.contains('b'));
119
120 const forBody = forLoop.body as estree.BlockStatement & { scope: AttachedScope };
121 t.truthy(forBody.scope.contains('a'));
122 t.truthy(forBody.scope.contains('b'));
123 });
124
125 test('supports ForInStatement', (t) => {
126 const ast = (parse(
127 `
128 for (let a in [1, 2, 3]) {
129 console.log(a);
130 let b = 10;
131 }
132 `,
133 { ecmaVersion: 2020, sourceType: 'module' }
134 ) as unknown) as estree.Program;
135
136 const scope = attachScopes(ast, 'scope');
137 t.falsy(scope.contains('a'));
138 t.falsy(scope.contains('b'));
139
140 const forLoop = ast.body[0] as estree.ForInStatement & { scope: AttachedScope };
141 t.truthy(forLoop.scope.contains('a'));
142 t.falsy(forLoop.scope.contains('b'));
143
144 const forBody = forLoop.body as estree.BlockStatement & { scope: AttachedScope };
145 t.truthy(forBody.scope.contains('a'));
146 t.truthy(forBody.scope.contains('b'));
147 });
+0
-86
packages/replace/CHANGELOG.md less more
0 # @rollup/plugin-replace ChangeLog
1
2 ## v2.3.3
3
4 _2020-06-05_
5
6 ### Updates
7
8 - docs: clarify options for allowed replacement values (#422)
9
10 ## v2.3.2
11
12 _2020-04-19_
13
14 ### Updates
15
16 - chore: add rollup 2 to peer range (3e0d775)
17
18 ## v2.3.1
19
20 _2020-02-01_
21
22 ### Updates
23
24 - chore: update dependencies (aca4a94)
25
26 ## 2.3.0
27
28 _2019-12-21_
29
30 - feat(replace): allow plugin to operate as an output plugin (#55)
31
32 ## 2.2.1
33
34 _2019-11-06_
35
36 - Move `typescript` to `devDependencies`
37
38 ## 2.2.0
39
40 _2019-04-10_
41
42 - Add index.d.ts typings file ([#31](https://github.com/rollup/rollup-plugin-replace/pull/31))
43
44 ## 2.1.1
45
46 _2019-03-18_
47
48 - Update rollup-pluginutils ([#29](https://github.com/rollup/rollup-plugin-replace/pull/29))
49 - Update dependencies ([#30](https://github.com/rollup/rollup-plugin-replace/pull/30))
50
51 ## 2.1.0
52
53 _2018-10-07_
54
55 - Do not mutate values passed as option ([#22](https://github.com/rollup/rollup-plugin-replace/pull/22))
56 - Update dependencies and improve tests ([#26](https://github.com/rollup/rollup-plugin-replace/pull/26))
57
58 ## 2.0.0
59
60 - Only match on word boundaries, unless delimiters are empty strings ([#10](https://github.com/rollup/rollup-plugin-replace/pull/10))
61
62 ## 1.2.1
63
64 - Match longest keys first ([#8](https://github.com/rollup/rollup-plugin-replace/pull/8))
65 - Escape keys ([#9](https://github.com/rollup/rollup-plugin-replace/pull/9))
66
67 ## 1.2.0
68
69 - Allow replacement to be a function that takes a module ID ([#1](https://github.com/rollup/rollup-plugin-replace/issues/1))
70
71 ## 1.1.1
72
73 - Return a `name`
74
75 ## 1.1.0
76
77 - Generate sourcemaps by default
78
79 ## 1.0.1
80
81 - Include correct files in package
82
83 ## 1.0.0
84
85 - First release
+0
-125
packages/replace/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-replace
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-replace
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-replace
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-replace
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-replace
10
11 🍣 A Rollup plugin which replaces strings in files while bundling.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-replace --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import replace from '@rollup/plugin-replace';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [
39 replace({
40 __buildEnv__: 'production',
41 __buildDate__: () => new Date(),
42 __buildVersion: 15
43 })
44 ]
45 };
46 ```
47
48 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).
49
50 The configuration above will replace every instance of `__buildEnv__` with `'production'` and `__buildDate__` with the result of the given function in any file included in the build. _Note: Values have to be either primitives or functions that return a string. For complex values, use `JSON.stringify`._
51
52 Typically, `@rollup/plugin-replace` should be placed in `plugins` _before_ other plugins so that they may apply optimizations, such as dead code removal.
53
54 ## Options
55
56 In addition to the properties and values specified for replacement, users may also specify the options below.
57
58 ### `delimiters`
59
60 Type: `Array[...String, String]`<br>
61 Default: `['\b', '\b']`
62
63 Specifies the boundaries around which strings will be replaced. By default, delimiters are [word boundaries](https://www.regular-expressions.info/wordboundaries.html). See [Word Boundaries](#word-boundaries) below for more information.
64
65 ### `exclude`
66
67 Type: `String` | `Array[...String]`<br>
68 Default: `null`
69
70 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 no files are ignored.
71
72 ### `include`
73
74 Type: `String` | `Array[...String]`<br>
75 Default: `null`
76
77 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 all files are targeted.
78
79 ## Word Boundaries
80
81 By default, values will only match if they are surrounded by _word boundaries_.
82
83 Consider the following options and build file:
84
85 ```js
86 module.exports = {
87 ...
88 plugins: [replace({ changed: 'replaced' })]
89 };
90 ```
91
92 ```js
93 // file.js
94 console.log('changed');
95 console.log('unchanged');
96 ```
97
98 The result would be:
99
100 ```js
101 // file.js
102 console.log('replaced');
103 console.log('unchanged');
104 ```
105
106 To ignore word boundaries and replace every instance of the string, wherever it may be, specify empty strings as delimiters:
107
108 ```js
109 export default {
110 ...
111 plugins: [
112 replace({
113 changed: 'replaced',
114 delimiters: ['', '']
115 })
116 ]
117 };
118 ```
119
120 ## Meta
121
122 [CONTRIBUTING](/.github/CONTRIBUTING.md)
123
124 [LICENSE (MIT)](/LICENSE)
+0
-73
packages/replace/package.json less more
0 {
1 "name": "@rollup/plugin-replace",
2 "version": "2.3.3",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Replace strings in files while bundling",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris <richard.a.harris@gmail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/replace#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/rollup-plugin-replace.cjs.js",
13 "module": "dist/rollup-plugin-replace.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run build && pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "prebuild": "del-cli dist",
25 "prepare": "pnpm run build",
26 "prepublishOnly": "pnpm run lint && pnpm run test",
27 "pretest": "pnpm run build",
28 "test": "ava",
29 "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
30 },
31 "files": [
32 "dist",
33 "src",
34 "types",
35 "README.md"
36 ],
37 "keywords": [
38 "rollup",
39 "plugin",
40 "replace",
41 "es2015",
42 "npm",
43 "modules"
44 ],
45 "peerDependencies": {
46 "rollup": "^1.20.0 || ^2.0.0"
47 },
48 "dependencies": {
49 "@rollup/pluginutils": "^3.1.0",
50 "magic-string": "^0.25.7"
51 },
52 "devDependencies": {
53 "@rollup/plugin-buble": "^0.21.3",
54 "del-cli": "^3.0.1",
55 "locate-character": "^2.0.5",
56 "rollup": "^2.23.0",
57 "source-map": "^0.7.3",
58 "typescript": "^3.9.7"
59 },
60 "types": "types/index.d.ts",
61 "ava": {
62 "babel": {
63 "compileEnhancements": false
64 },
65 "files": [
66 "!**/fixtures/**",
67 "!**/helpers/**",
68 "!**/recipes/**",
69 "!**/types.ts"
70 ]
71 }
72 }
+0
-15
packages/replace/rollup.config.js less more
0 import buble from '@rollup/plugin-buble';
1
2 import pkg from './package.json';
3
4 const external = Object.keys(pkg.dependencies).concat('path');
5
6 export default {
7 input: 'src/index.js',
8 plugins: [buble()],
9 external,
10 output: [
11 { file: pkg.main, format: 'cjs', exports: 'auto' },
12 { file: pkg.module, format: 'es' }
13 ]
14 };
+0
-98
packages/replace/src/index.js less more
0 import MagicString from 'magic-string';
1 import { createFilter } from '@rollup/pluginutils';
2
3 function escape(str) {
4 return str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
5 }
6
7 function ensureFunction(functionOrValue) {
8 if (typeof functionOrValue === 'function') return functionOrValue;
9 return () => functionOrValue;
10 }
11
12 function longest(a, b) {
13 return b.length - a.length;
14 }
15
16 function getReplacements(options) {
17 if (options.values) {
18 return Object.assign({}, options.values);
19 }
20 const values = Object.assign({}, options);
21 delete values.delimiters;
22 delete values.include;
23 delete values.exclude;
24 delete values.sourcemap;
25 delete values.sourceMap;
26 return values;
27 }
28
29 function mapToFunctions(object) {
30 return Object.keys(object).reduce((fns, key) => {
31 const functions = Object.assign({}, fns);
32 functions[key] = ensureFunction(object[key]);
33 return functions;
34 }, {});
35 }
36
37 export default function replace(options = {}) {
38 const filter = createFilter(options.include, options.exclude);
39 const { delimiters } = options;
40 const functionValues = mapToFunctions(getReplacements(options));
41 const keys = Object.keys(functionValues)
42 .sort(longest)
43 .map(escape);
44 const pattern = delimiters
45 ? new RegExp(`${escape(delimiters[0])}(${keys.join('|')})${escape(delimiters[1])}`, 'g')
46 : new RegExp(`\\b(${keys.join('|')})\\b`, 'g');
47
48 return {
49 name: 'replace',
50
51 renderChunk(code, chunk) {
52 const id = chunk.fileName;
53 if (!keys.length) return null;
54 if (!filter(id)) return null;
55 return executeReplacement(code, id);
56 },
57
58 transform(code, id) {
59 if (!keys.length) return null;
60 if (!filter(id)) return null;
61 return executeReplacement(code, id);
62 }
63 };
64
65 function executeReplacement(code, id) {
66 const magicString = new MagicString(code);
67 if (!codeHasReplacements(code, id, magicString)) {
68 return null;
69 }
70
71 const result = { code: magicString.toString() };
72 if (isSourceMapEnabled()) {
73 result.map = magicString.generateMap({ hires: true });
74 }
75 return result;
76 }
77
78 function codeHasReplacements(code, id, magicString) {
79 let result = false;
80 let match;
81
82 // eslint-disable-next-line no-cond-assign
83 while ((match = pattern.exec(code))) {
84 result = true;
85
86 const start = match.index;
87 const end = start + match[0].length;
88 const replacement = String(functionValues[match[1]](id));
89 magicString.overwrite(start, end, replacement);
90 }
91 return result;
92 }
93
94 function isSourceMapEnabled() {
95 return options.sourceMap !== false && options.sourcemap !== false;
96 }
97 }
+0
-5
packages/replace/test/.eslintrc less more
0 {
1 rules: {
2 "no-console": "off"
3 }
4 }
+0
-7
packages/replace/test/fixtures/form/delimiters/_config.js less more
0 module.exports = {
1 description: 'observes delimiters',
2 options: {
3 original: 'replaced',
4 delimiters: ['<%', '%>']
5 }
6 };
+0
-5
packages/replace/test/fixtures/form/delimiters/input.js less more
0 console.log(`
1 <%original%>
2 <% original%>
3 <%original %>
4 `);
+0
-5
packages/replace/test/fixtures/form/delimiters/output.js less more
0 console.log(`
1 replaced
2 <% original%>
3 <%original %>
4 `);
+0
-7
packages/replace/test/fixtures/form/match-variables/_config.js less more
0 module.exports = {
1 description: 'matches most specific variables',
2 options: {
3 BUILD: 'beta',
4 BUILD_VERSION: '1.0.0'
5 }
6 };
+0
-1
packages/replace/test/fixtures/form/match-variables/input.js less more
0 console.log('BUILD version BUILD_VERSION');
+0
-1
packages/replace/test/fixtures/form/match-variables/output.js less more
0 console.log('beta version 1.0.0');
+0
-11
packages/replace/test/fixtures/form/observe-plugin-options/_config.js less more
0 module.exports = {
1 description: 'does not replace plugin options',
2 options: {
3 original: 'replaced',
4 delimiters: ['', ''],
5 sourcemap: true,
6 sourceMap: true,
7 include: '**/input.js',
8 exclude: 'node_modules/**'
9 }
10 };
+0
-8
packages/replace/test/fixtures/form/observe-plugin-options/input.js less more
0 console.log(`
1 original
2 delimiters
3 sourcemap
4 sourceMap
5 include
6 exclude
7 `);
+0
-8
packages/replace/test/fixtures/form/observe-plugin-options/output.js less more
0 console.log(`
1 replaced
2 delimiters
3 sourcemap
4 sourceMap
5 include
6 exclude
7 `);
+0
-4
packages/replace/test/fixtures/form/replace-nothing/_config.js less more
0 module.exports = {
1 description: 'replaces nothing',
2 options: {}
3 };
+0
-1
packages/replace/test/fixtures/form/replace-nothing/input.js less more
0 console.log('as-it'); // eslint-disable-line
+0
-1
packages/replace/test/fixtures/form/replace-nothing/output.js less more
0 console.log('as-it');
+0
-6
packages/replace/test/fixtures/form/replace-strings/_config.js less more
0 module.exports = {
1 description: 'replaces strings',
2 options: {
3 ANSWER: '42'
4 }
5 };
+0
-1
packages/replace/test/fixtures/form/replace-strings/input.js less more
0 console.log(ANSWER); // eslint-disable-line
+0
-1
packages/replace/test/fixtures/form/replace-strings/output.js less more
0 console.log(42);
+0
-8
packages/replace/test/fixtures/form/replacement-function/_config.js less more
0 module.exports = {
1 description: 'allows replacement to be a function',
2 options: {
3 __filename(id) {
4 return JSON.stringify(id.slice(__dirname.length + 1));
5 }
6 }
7 };
+0
-1
packages/replace/test/fixtures/form/replacement-function/input.js less more
0 export default __filename;
+0
-1
packages/replace/test/fixtures/form/replacement-function/output.js less more
0 export default 'input.js';
+0
-7
packages/replace/test/fixtures/form/special-characters/_config.js less more
0 module.exports = {
1 description: 'supports special characters',
2 options: {
3 "require('one')": '1',
4 delimiters: ['', '']
5 }
6 };
+0
-3
packages/replace/test/fixtures/form/special-characters/input.js less more
0 const one = require('one'); // eslint-disable-line
1
2 console.log(one);
+0
-2
packages/replace/test/fixtures/form/special-characters/output.js less more
0 const one = 1;
1 console.log(one);
+0
-8
packages/replace/test/fixtures/function/replacement-function/_config.js less more
0 module.exports = {
1 description: 'allows replacement to be a function',
2 pluginOptions: {
3 __filename(id) {
4 return JSON.stringify(id.slice(__dirname.length + 1));
5 }
6 }
7 };
+0
-1
packages/replace/test/fixtures/function/replacement-function/dir/foo.js less more
0 export default __filename;
+0
-10
packages/replace/test/fixtures/function/replacement-function/main.js less more
0 /* global t */
1 import foo from './dir/foo.js'; // eslint-disable-line
2
3 const bar = __filename;
4
5 // To work around windows issues
6 t.is(foo.slice(0, 3), 'dir');
7 t.is(foo.slice(-6), 'foo.js');
8 t.is(foo.length, 10);
9 t.is(bar, 'main.js');
+0
-12
packages/replace/test/fixtures/function/word-boundaries/_config.js less more
0 const assert = require('assert');
1
2 module.exports = {
3 description: 'uses word boundaries if delimiters are unspecified',
4 pluginOptions: { changed: 'replaced' },
5 exports(exports) {
6 assert.deepEqual(exports, {
7 foo: 'unchanged',
8 bar: 'replaced'
9 });
10 }
11 };
+0
-6
packages/replace/test/fixtures/function/word-boundaries/main.js less more
0 /* global t */
1
2 export const foo = 'unchanged';
3 export const bar = 'changed';
4
5 t.pass();
+0
-33
packages/replace/test/form.js less more
0 /* eslint-disable consistent-return, global-require, import/no-dynamic-require */
1
2 process.chdir(__dirname);
3
4 const { readdirSync, readFileSync } = require('fs');
5
6 const test = require('ava');
7
8 const replace = require('../dist/rollup-plugin-replace.cjs.js');
9
10 const transformContext = {};
11
12 readdirSync('./fixtures/form').forEach((dir) => {
13 let config;
14
15 try {
16 config = require(`./fixtures/form/${dir}/_config.js`);
17 } catch (err) {
18 config = {};
19 }
20
21 test(`${dir}: ${config.description}`, (t) => {
22 const { transform } = replace(config.options);
23 const input = readFileSync(`fixtures/form/${dir}/input.js`, 'utf-8');
24
25 return Promise.resolve(
26 transform.call(transformContext, input, `${__dirname}/fixtures/form/${dir}/input.js`)
27 ).then((transformed) => {
28 const actual = (transformed ? transformed.code : input).trim();
29 t.snapshot(actual);
30 });
31 });
32 });
+0
-43
packages/replace/test/function.js less more
0 /* eslint-disable consistent-return, global-require, import/no-dynamic-require */
1
2 process.chdir(__dirname);
3
4 const { readdirSync } = require('fs');
5
6 const test = require('ava');
7 const { rollup } = require('rollup');
8
9 const replace = require('../dist/rollup-plugin-replace.cjs.js');
10
11 const { execute, getCodeFromBundle } = require('./helpers/util');
12
13 readdirSync('./fixtures/function').forEach((dir) => {
14 let config;
15
16 try {
17 config = require(`./fixtures/function/${dir}/_config.js`);
18 } catch (err) {
19 config = {};
20 }
21
22 test(`${dir}: ${config.description}`, async (t) => {
23 const options = Object.assign(
24 {
25 input: `fixtures/function/${dir}/main.js`
26 },
27 config.options || {},
28 {
29 plugins: [
30 ...((config.options && config.options.plugins) || []),
31 replace(config.pluginOptions)
32 ]
33 }
34 );
35
36 const bundle = await rollup(options);
37 const code = await getCodeFromBundle(bundle);
38 const exports = execute(code, config.context, t);
39
40 if (config.exports) config.exports(exports);
41 });
42 });
+0
-66
packages/replace/test/misc.js less more
0 /* eslint-disable consistent-return */
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 const replace = require('../dist/rollup-plugin-replace.cjs.js');
6
7 const { getOutputFromGenerated } = require('./helpers/util');
8
9 test('does not mutate the values map properties', async (t) => {
10 const valuesMap = { ANSWER: '42' };
11 const bundle = await rollup({
12 input: 'main.js',
13 plugins: [
14 replace({ values: valuesMap }),
15 {
16 resolveId(id) {
17 return id;
18 },
19 load(importee) {
20 if (importee === 'main.js') {
21 return 'log(ANSWER);';
22 }
23 }
24 }
25 ]
26 });
27
28 const { code } = getOutputFromGenerated(await bundle.generate({ format: 'es' }));
29 t.is(code.trim(), 'log(42);');
30 t.deepEqual(valuesMap, { ANSWER: '42' });
31 });
32
33 test('can be configured with output plugins', async (t) => {
34 const bundle = await rollup({
35 input: 'main.js',
36 plugins: [
37 {
38 resolveId(id) {
39 return id;
40 },
41 load(importee) {
42 if (importee === 'main.js') {
43 return 'log("environment", process.env.NODE_ENV);';
44 }
45 }
46 }
47 ]
48 });
49
50 const { code, map } = getOutputFromGenerated(
51 await bundle.generate({
52 format: 'es',
53 sourcemap: true,
54 plugins: [
55 replace({
56 'process.env.NODE_ENV': JSON.stringify('production'),
57 delimiters: ['', '']
58 })
59 ]
60 })
61 );
62
63 t.is(code.trim(), 'log("environment", "production");');
64 t.truthy(map);
65 });
+0
-60
packages/replace/test/snapshots/form.js.md less more
0 # Snapshot report for `test/form.js`
1
2 The actual snapshot is saved in `form.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## delimiters: observes delimiters
7
8 > Snapshot 1
9
10 `console.log(`␊
11 replaced␊
12 <% original%>␊
13 <%original %>␊
14 `);`
15
16 ## match-variables: matches most specific variables
17
18 > Snapshot 1
19
20 'console.log(\'beta version 1.0.0\');'
21
22 ## observe-plugin-options: does not replace plugin options
23
24 > Snapshot 1
25
26 `console.log(`␊
27 replaced␊
28 delimiters␊
29 sourcemap␊
30 sourceMap␊
31 include␊
32 exclude␊
33 `);`
34
35 ## replace-nothing: replaces nothing
36
37 > Snapshot 1
38
39 'console.log(\'as-it\'); // eslint-disable-line'
40
41 ## replace-strings: replaces strings
42
43 > Snapshot 1
44
45 'console.log(42); // eslint-disable-line'
46
47 ## replacement-function: allows replacement to be a function
48
49 > Snapshot 1
50
51 'export default "input.js";'
52
53 ## special-characters: supports special characters
54
55 > Snapshot 1
56
57 `const one = 1; // eslint-disable-line␊
58
59 console.log(one);`
packages/replace/test/snapshots/form.js.snap less more
Binary diff not shown
+0
-47
packages/replace/test/snapshots/misc.js.md less more
0 # Snapshot report for `test/misc.js`
1
2 The actual snapshot is saved in `misc.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## does not generate sourcemaps if disabled
7
8 > Snapshot 1
9
10 'Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn\'t generate a sourcemap for the transformation. Consult the plugin documentation for help'
11
12 ## generates sourcemaps
13
14 > Snapshot 1
15
16 {
17 character: 12,
18 column: 12,
19 line: 1,
20 }
21
22 > Snapshot 2
23
24 {
25 column: 15,
26 line: 1,
27 name: null,
28 source: 'other.js',
29 }
30
31 > Snapshot 3
32
33 {
34 character: 17,
35 column: 0,
36 line: 3,
37 }
38
39 > Snapshot 4
40
41 {
42 column: 0,
43 line: 2,
44 name: null,
45 source: 'main.js',
46 }
packages/replace/test/snapshots/misc.js.snap less more
Binary diff not shown
+0
-185
packages/replace/test/snapshots/sourcemaps.js.md less more
0 # Snapshot report for `test/sourcemaps.js`
1
2 The actual snapshot is saved in `sourcemaps.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## generates sourcemaps when sourcemap is used as an output argument
7
8 > Snapshot 1
9
10 {
11 character: 12,
12 column: 12,
13 line: 1,
14 }
15
16 > Snapshot 2
17
18 {
19 column: 15,
20 line: 1,
21 name: null,
22 source: 'other.js',
23 }
24
25 > Snapshot 3
26
27 {
28 character: 17,
29 column: 0,
30 line: 3,
31 }
32
33 > Snapshot 4
34
35 {
36 column: 0,
37 line: 2,
38 name: null,
39 source: 'main.js',
40 }
41
42 ## generates sourcemaps if enabled in plugin
43
44 > Snapshot 1
45
46 {
47 character: 12,
48 column: 12,
49 line: 1,
50 }
51
52 > Snapshot 2
53
54 {
55 column: 15,
56 line: 1,
57 name: null,
58 source: 'other.js',
59 }
60
61 > Snapshot 3
62
63 {
64 character: 17,
65 column: 0,
66 line: 3,
67 }
68
69 > Snapshot 4
70
71 {
72 column: 0,
73 line: 2,
74 name: null,
75 source: 'main.js',
76 }
77
78 ## generates sourcemaps if enabled in plugin (camelcase)
79
80 > Snapshot 1
81
82 {
83 character: 12,
84 column: 12,
85 line: 1,
86 }
87
88 > Snapshot 2
89
90 {
91 column: 15,
92 line: 1,
93 name: null,
94 source: 'other.js',
95 }
96
97 > Snapshot 3
98
99 {
100 character: 17,
101 column: 0,
102 line: 3,
103 }
104
105 > Snapshot 4
106
107 {
108 column: 0,
109 line: 2,
110 name: null,
111 source: 'main.js',
112 }
113
114 ## generates sourcemaps by dfault
115
116 > Snapshot 1
117
118 {
119 character: 12,
120 column: 12,
121 line: 1,
122 }
123
124 > Snapshot 2
125
126 {
127 column: 15,
128 line: 1,
129 name: null,
130 source: 'other.js',
131 }
132
133 > Snapshot 3
134
135 {
136 character: 17,
137 column: 0,
138 line: 3,
139 }
140
141 > Snapshot 4
142
143 {
144 column: 0,
145 line: 2,
146 name: null,
147 source: 'main.js',
148 }
149
150 ## generates sourcemaps by default
151
152 > Snapshot 1
153
154 {
155 character: 12,
156 column: 12,
157 line: 1,
158 }
159
160 > Snapshot 2
161
162 {
163 column: 15,
164 line: 1,
165 name: null,
166 source: 'other.js',
167 }
168
169 > Snapshot 3
170
171 {
172 character: 17,
173 column: 0,
174 line: 3,
175 }
176
177 > Snapshot 4
178
179 {
180 column: 0,
181 line: 2,
182 name: null,
183 source: 'main.js',
184 }
packages/replace/test/snapshots/sourcemaps.js.snap less more
Binary diff not shown
+0
-127
packages/replace/test/sourcemaps.js less more
0 /* eslint-disable consistent-return */
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4 const { SourceMapConsumer } = require('source-map');
5 const { getLocator } = require('locate-character');
6
7 const replace = require('../dist/rollup-plugin-replace.cjs.js');
8
9 const { getOutputFromGenerated } = require('./helpers/util');
10
11 function verifySourcemap(code, map, t) {
12 return SourceMapConsumer.with(map, null, async (smc) => {
13 const locator = getLocator(code, { offsetLine: 1 });
14
15 let generatedLoc = locator('42');
16 let loc = smc.originalPositionFor(generatedLoc);
17 t.snapshot(generatedLoc);
18 t.snapshot(loc);
19
20 generatedLoc = locator('log');
21 loc = smc.originalPositionFor(generatedLoc);
22 t.snapshot(generatedLoc);
23 t.snapshot(loc);
24 });
25 }
26
27 // Boilerplate shared configuration
28 const testPlugin = {
29 resolveId: (id) => id,
30 load: (importee) => {
31 if (importee === 'main.js') {
32 return 'import value from "other.js";\nlog(value);';
33 }
34 if (importee === 'other.js') {
35 return 'export default ANSWER;';
36 }
37 }
38 };
39
40 test('generates sourcemaps by default', async (t) => {
41 const bundle = await rollup({
42 input: 'main.js',
43 onwarn(warning) {
44 throw new Error(warning.message);
45 },
46 plugins: [replace({ values: { ANSWER: '42' } }), testPlugin]
47 });
48
49 const { code, map } = getOutputFromGenerated(
50 await bundle.generate({ format: 'es', sourcemap: true })
51 );
52
53 await verifySourcemap(code, map, t);
54 });
55
56 test('generates sourcemaps if enabled in plugin', async (t) => {
57 const bundle = await rollup({
58 input: 'main.js',
59 onwarn(warning) {
60 throw new Error(warning.message);
61 },
62 plugins: [replace({ values: { ANSWER: '42' }, sourcemap: true }), testPlugin]
63 });
64
65 const { code, map } = getOutputFromGenerated(
66 await bundle.generate({ format: 'es', sourcemap: true })
67 );
68
69 await verifySourcemap(code, map, t);
70 });
71
72 test('generates sourcemaps if enabled in plugin (camelcase)', async (t) => {
73 const bundle = await rollup({
74 input: 'main.js',
75 onwarn(warning) {
76 throw new Error(warning.message);
77 },
78 plugins: [replace({ values: { ANSWER: '42' }, sourceMap: true }), testPlugin]
79 });
80
81 const { code, map } = getOutputFromGenerated(
82 await bundle.generate({ format: 'es', sourcemap: true })
83 );
84
85 await verifySourcemap(code, map, t);
86 });
87
88 test('does not generate sourcemaps if disabled in plugin', async (t) => {
89 let warned = false;
90
91 const bundle = await rollup({
92 input: 'main.js',
93 onwarn(warning) {
94 t.is(
95 warning.message,
96 "Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help"
97 );
98 warned = true;
99 },
100 plugins: [replace({ values: { ANSWER: '42' }, sourcemap: false }), testPlugin]
101 });
102
103 t.truthy(!warned);
104 await bundle.generate({ format: 'es', sourcemap: true });
105 t.truthy(warned);
106 });
107
108 test('does not generate sourcemaps if disabled in plugin (camelcase)', async (t) => {
109 let warned = false;
110
111 const bundle = await rollup({
112 input: 'main.js',
113 onwarn(warning) {
114 t.is(
115 warning.message,
116 "Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help"
117 );
118 warned = true;
119 },
120 plugins: [replace({ values: { ANSWER: '42' }, sourceMap: false }), testPlugin]
121 });
122
123 t.truthy(!warned);
124 await bundle.generate({ format: 'es', sourcemap: true });
125 t.truthy(warned);
126 });
+0
-30
packages/replace/test/types.ts less more
0 // @ts-check
1 import { dirname } from 'path';
2
3 import { RollupOptions } from 'rollup';
4
5 import replace from '..';
6
7 const config: RollupOptions = {
8 input: 'main.js',
9 output: {
10 file: 'bundle.js',
11 format: 'iife'
12 },
13 plugins: [
14 replace({
15 include: 'config.js',
16 exclude: 'node_modules/**',
17 delimiters: ['<@', '@>'],
18 VERSION: '1.0.0',
19 ENVIRONMENT: JSON.stringify('development'),
20 __dirname: (id) => `'${dirname(id)}'`,
21 values: {
22 VERSION: '1.0.0',
23 ENVIRONMENT: JSON.stringify('development')
24 }
25 })
26 ]
27 };
28
29 export default config;
+0
-36
packages/replace/types/index.d.ts less more
0 import { FilterPattern } from '@rollup/pluginutils';
1 import { Plugin } from 'rollup';
2
3 type Replacement = string | ((id: string) => string);
4
5 export interface RollupReplaceOptions {
6 /**
7 * All other options are treated as `string: replacement` replacers,
8 * or `string: (id) => replacement` functions.
9 */
10 [str: string]: Replacement | RollupReplaceOptions['include'] | RollupReplaceOptions['values'];
11
12 /**
13 * A minimatch pattern, or array of patterns, of files that should be
14 * processed by this plugin (if omitted, all files are included by default)
15 */
16 include?: FilterPattern;
17 /**
18 * Files that should be excluded, if `include` is otherwise too permissive.
19 */
20 exclude?: FilterPattern;
21 /**
22 * To replace every occurrence of `<@foo@>` instead of every occurrence
23 * of `foo`, supply delimiters
24 */
25 delimiters?: [string, string];
26 /**
27 * You can separate values to replace from other options.
28 */
29 values?: { [str: string]: Replacement };
30 }
31
32 /**
33 * Replace strings in files while bundling them.
34 */
35 export default function replace(options?: RollupReplaceOptions): Plugin;
+0
-74
packages/run/CHANGELOG.md less more
0 # @rollup/plugin-run ChangeLog
1
2 ## v2.0.2
3
4 _2020-04-12_
5
6 ### Bugfixes
7
8 - fix: use correct hook for reading options, handle facade chunks (#292)
9
10 ### Updates
11
12 - refactor: use Typescript (#237)
13
14 ## v2.0.1
15
16 _2020-03-30_
17
18 ### Bugfixes
19
20 - fix: remove rollup v1 from peerDeps (0eb4d59)
21
22 ## v2.0.0
23
24 _2020-03-29_
25
26 - chore: republish rollup v2 changes, includes breaking Rollup function signature change
27
28 ## v1.2.2
29
30 _2020-03-29_
31
32 - chore: revert rollup v2 changes and republish. resolves breaking changes for rollup v1.x.
33
34 ## v1.2.1
35
36 _2020-03-24_
37
38 ### Bugfixes
39
40 - fix: plugin could fork before bundle generated (#281)
41 - fix: Support assets (#240)
42
43 ### Updates
44
45 - chore: update devDeps (1b08a83)
46
47 ## v1.2.0
48
49 _2020-01-04_
50
51 ### Features
52
53 - feat: add typings (#115)
54
55 ### Updates
56
57 - chore: update readme, linting (e7ff386)
58
59 ## 1.1.0
60
61 - Allow arguments and options to be passed to `child_process.fork`
62
63 ## 1.0.2
64
65 - Warn if Rollup version is too low
66
67 ## 1.0.1
68
69 - Handle output files with different names from input files
70
71 ## 1.0.0
72
73 - First release
+0
-102
packages/run/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-run
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-run
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-run
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-run
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-run
10
11 🍣 A Rollup plugin which runs your bundles in Node once they're built.
12
13 Using this plugin gives much faster results compared to what you would do with [nodemon](https://nodemon.io/).
14
15 ## Install
16
17 Using npm:
18
19 ```console
20 npm install @rollup/plugin-run --save-dev
21 ```
22
23 ## Usage
24
25 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
26
27 ```js
28 import run from '@rollup/plugin-run';
29
30 export default {
31 input: 'src/index.js',
32 output: {
33 file: 'dist/index.js',
34 format: 'cjs'
35 },
36 plugins: [run()]
37 };
38 ```
39
40 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). If the build produces any errors, the plugin will write a 'alias' character to stderr, which should be audible on most systems.
41
42 The plugin `forks` a child process with the generated file, every time the bundle is rebuilt (after first closing the previous process, if it's not the first run).
43
44 _Note: This plugin works with Rollup's code-splitting if you're using dynamic `import(...)` — the only constraint is that you have a single entry point specified in the config._
45
46 ## Options
47
48 This plugin supports pass through option available for [child_process.fork(...)](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options).
49
50 Example:
51
52 Debugging with sourcemaps using [source-map-support](https://www.npmjs.com/package/source-map-support):
53
54 ```diff
55 // rollup.config.js
56 import run from '@rollup/plugin-run';
57
58 export default {
59 input: 'src/index.js',
60 output: {
61 file: 'dist/index.js',
62 format: 'cjs',
63 + sourcemap: true
64 },
65 plugins: [
66 - run()
67 + run({
68 + execArgv: ['-r', 'source-map-support/register']
69 + })
70 ]
71 };
72 ```
73
74 ## Practical Example
75
76 The feature is usually intended for development use, you may prefer to only include it when Rollup is being run in watch mode:
77
78 ```diff
79 // rollup.config.js
80 import run from '@rollup/plugin-run';
81
82 +const dev = process.env.ROLLUP_WATCH === 'true';
83
84 export default {
85 input: 'src/index.js',
86 output: {
87 file: 'dist/index.js',
88 format: 'cjs'
89 },
90 plugins: [
91 - run()
92 + dev && run()
93 ]
94 };
95 ```
96
97 ## Meta
98
99 [CONTRIBUTING](/.github/CONTRIBUTING.md)
100
101 [LICENSE (MIT)](/LICENSE)
+0
-71
packages/run/package.json less more
0 {
1 "name": "@rollup/plugin-run",
2 "version": "2.0.2",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Run your bundle after you've built it",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/run/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
26 "lint:json": "prettier --write tsconfig.json",
27 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
28 "prebuild": "del-cli dist",
29 "prepare": "pnpm run build",
30 "prepublishOnly": "pnpm run lint && pnpm run test",
31 "pretest": "pnpm run build",
32 "test": "ava"
33 },
34 "files": [
35 "dist",
36 "types",
37 "README.md",
38 "LICENSE"
39 ],
40 "keywords": [
41 "rollup",
42 "plugin",
43 "run"
44 ],
45 "peerDependencies": {
46 "rollup": "^2.0.0"
47 },
48 "dependencies": {
49 "@types/node": "14.0.26"
50 },
51 "devDependencies": {
52 "@rollup/plugin-typescript": "^5.0.2",
53 "del": "^5.1.0",
54 "rollup": "^2.23.0",
55 "sinon": "9.0.2"
56 },
57 "types": "types/index.d.ts",
58 "ava": {
59 "babel": {
60 "compileEnhancements": false
61 },
62 "files": [
63 "!**/fixtures/**",
64 "!**/output/**",
65 "!**/helpers/**",
66 "!**/recipes/**",
67 "!**/types.ts"
68 ]
69 }
70 }
+0
-13
packages/run/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 export default {
5 input: 'src/index.ts',
6 plugins: [typescript({ sourceMap: false })],
7 external: Object.keys(pkg.dependencies).concat(['path', 'child_process']),
8 output: [
9 { format: 'cjs', file: pkg.main, exports: 'auto' },
10 { format: 'esm', file: pkg.module }
11 ]
12 };
+0
-58
packages/run/src/index.ts less more
0 import { ChildProcess, fork } from 'child_process';
1 import * as path from 'path';
2
3 import { Plugin, RenderedChunk } from 'rollup';
4
5 import { RollupRunOptions } from '../types';
6
7 export default function run(opts: RollupRunOptions = {}): Plugin {
8 let input: string;
9 let proc: ChildProcess;
10
11 const args = opts.args || [];
12 const forkOptions = opts.options || opts;
13 delete (forkOptions as RollupRunOptions).args;
14
15 return {
16 name: 'run',
17
18 buildStart(options) {
19 let inputs = options.input;
20
21 if (typeof inputs === 'string') {
22 inputs = [inputs];
23 }
24
25 if (typeof inputs === 'object') {
26 inputs = Object.values(inputs);
27 }
28
29 if (inputs.length > 1) {
30 throw new Error(`@rollup/plugin-run only works with a single entry point`);
31 }
32
33 input = path.resolve(inputs[0]);
34 },
35
36 generateBundle(_outputOptions, _bundle, isWrite) {
37 if (!isWrite) {
38 this.error(`@rollup/plugin-run currently only works with bundles that are written to disk`);
39 }
40 },
41
42 writeBundle(outputOptions, bundle) {
43 const dir = outputOptions.dir || path.dirname(outputOptions.file!);
44 const entryFileName = Object.keys(bundle).find((fileName) => {
45 const chunk = bundle[fileName] as RenderedChunk;
46 return chunk.isEntry && chunk.facadeModuleId === input;
47 });
48
49 if (entryFileName) {
50 if (proc) proc.kill();
51 proc = fork(path.join(dir, entryFileName), args, forkOptions);
52 } else {
53 this.error(`@rollup/plugin-run could not find output chunk`);
54 }
55 }
56 };
57 }
+0
-1
packages/run/test/fixtures/change-detect-input.js less more
0 export const Greeting = () => 'Hola'; // eslint-disable-line
+0
-3
packages/run/test/fixtures/facade-entry/dynamic.js less more
0 import log from './library';
1
2 log(0);
+0
-6
packages/run/test/fixtures/facade-entry/index.js less more
0 import log from './library';
1
2 log(0);
3 (async () => {
4 await import('./dynamic');
5 })();
+0
-2
packages/run/test/fixtures/facade-entry/library.js less more
0 const log = (value) => console.log(value);
1 export default log;
+0
-1
packages/run/test/fixtures/input.js less more
0 export const Greeting = () => 'Hello'; // eslint-disable-line
+0
-115
packages/run/test/test.js less more
0 const fs = require('fs');
1 const { EventEmitter } = require('events');
2
3 const { join } = require('path');
4
5 const childProcess = require('child_process');
6
7 const writeFile = require('util').promisify(fs.writeFile);
8
9 const del = require('del');
10 const { rollup } = require('rollup');
11 const test = require('ava');
12 const sinon = require('sinon');
13
14 const run = require('../');
15
16 const cwd = join(__dirname, 'fixtures/');
17 const file = join(cwd, 'output/bundle.js');
18 const input = join(cwd, 'input.js');
19
20 process.chdir(cwd);
21
22 const outputOptions = { file, format: 'cjs' };
23
24 let mockChildProcess;
25 test.before(() => {
26 mockChildProcess = sinon
27 .stub(childProcess, ['fork'])
28 .returns({ ...new EventEmitter(), kill: sinon.fake() });
29 });
30
31 test('builds the bundle and forks a child process', async (t) => {
32 const bundle = await rollup({
33 input,
34 plugins: [run()]
35 });
36 await bundle.write(outputOptions);
37 t.true(mockChildProcess.calledWithExactly(outputOptions.file, [], {}));
38 });
39
40 test('takes input from the latest options', async (t) => {
41 const bundle = await rollup({
42 input: 'incorrect',
43 plugins: [
44 run(),
45 {
46 options(options) {
47 options.input = input;
48 return options;
49 }
50 }
51 ]
52 });
53 await bundle.write(outputOptions);
54 t.true(mockChildProcess.calledWithExactly(outputOptions.file, [], {}));
55 });
56
57 test('checks entry point facade module', async (t) => {
58 const bundle = await rollup({
59 input: join(cwd, 'facade-entry/index.js'),
60 preserveEntrySignatures: 'strict',
61 plugins: [run()]
62 });
63 const outputDir = join(cwd, 'output');
64 await bundle.write({ dir: outputDir, format: 'cjs' });
65 t.true(mockChildProcess.calledWithExactly(join(outputDir, 'index.js'), [], {}));
66 });
67
68 test('allows pass-through options for child_process.fork', async (t) => {
69 const forkOptions = {
70 cwd,
71 detached: false,
72 silent: false
73 };
74 const bundle = await rollup({
75 input,
76 plugins: [run(forkOptions)]
77 });
78 await bundle.write(outputOptions);
79 t.true(mockChildProcess.calledWithExactly(outputOptions.file, [], forkOptions));
80 });
81
82 test('throws an error when bundle is not written to disk', async (t) => {
83 const bundle = await rollup({
84 input,
85 plugins: [run()]
86 });
87 await t.throwsAsync(
88 async () => {
89 await bundle.generate(outputOptions);
90 },
91 {
92 instanceOf: Error,
93 message: '@rollup/plugin-run currently only works with bundles that are written to disk'
94 }
95 );
96 });
97
98 test('detects changes - forks a new child process and kills older process', async (t) => {
99 // eslint-disable-next-line no-shadow
100 const input = join(cwd, 'change-detect-input.js');
101 const bundle = await rollup({
102 input,
103 plugins: [run()]
104 });
105 await bundle.write(outputOptions);
106 await writeFile(input, "export const Greeting = () => 'Hola'; // eslint-disable-line");
107 await bundle.write(outputOptions);
108 t.true(mockChildProcess.calledWithExactly(outputOptions.file, [], {}));
109 t.is(mockChildProcess().kill.callCount, 1);
110 });
111
112 test.after(async () => {
113 await del(['output']);
114 });
+0
-4
packages/run/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": ["src/**/*", "types/**/*"]
3 }
+0
-14
packages/run/types/index.d.ts less more
0 import { ForkOptions } from 'child_process';
1
2 import { Plugin } from 'rollup';
3
4 export interface RollupRunOptions extends ForkOptions {
5 args?: readonly string[];
6 options?: ForkOptions;
7 }
8
9 /**
10 * Run your bundles in Node once they're built
11 * @param options These are passed through to `child_process.fork(..)`
12 */
13 export default function run(options?: RollupRunOptions): Plugin;
+0
-67
packages/strip/CHANGELOG.md less more
0 # @rollup/plugin-strip ChangeLog
1
2 ## v2.0.0
3
4 _2020-07-12_
5
6 ### Breaking Changes
7
8 - feat!: support specifying both functions and labels (#471)
9
10 ### Updates
11
12 - docs: update README (#458)
13
14 ## v1.3.3
15
16 _2020-05-11_
17
18 ### Updates
19
20 - chore: rollup v2 peerDep. (dupe for pub) (628f8c7)
21
22 ## v1.3.2
23
24 _2020-02-01_
25
26 ### Updates
27
28 - chore: update dependencies (059d1f2)
29
30 ## 1.2.2
31
32 - Fix object destructuring assignments with default values ([#17](https://github.com/rollup/@rollup/plugin-strip/pull/17))
33 - update `rollup-pluginutils` ([#22](https://github.com/rollup/@rollup/plugin-strip/pull/22))
34
35 ## 1.2.1
36
37 - Update dependencies
38
39 ## 1.2.0
40
41 - Use `this.parse` instead of `acorn.parse`
42 - Make code removal more conservative ([#9](https://github.com/rollup/@rollup/plugin-strip/pull/9))
43
44 ## 1.1.1
45
46 - Return a `name`
47
48 ## 1.1.0
49
50 - Remove methods of `this` and `super` ([#3](https://github.com/rollup/@rollup/plugin-strip/issues/3))
51
52 ## 1.0.3
53
54 - Fix build
55
56 ## 1.0.2
57
58 - Default to adding sourcemap locations
59
60 ## 1.0.1
61
62 - Skip removed call expressions from further AST traversal
63
64 ## 1.0.0
65
66 - Initial release
+0
-107
packages/strip/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-strip
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-strip
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-strip
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-strip
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-strip
10
11 🍣 A Rollup plugin to remove `debugger` statements and functions like `assert.equal` and `console.log` from your code.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-strip --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import strip from '@rollup/plugin-strip';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [
39 strip({
40 labels: ['unittest']
41 })
42 ]
43 };
44 ```
45
46 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).
47
48 ## Options
49
50 ### `include`
51
52 Type: `String | RegExp | Array[...String|RegExp]`<br>
53 Default: `['**/*.js']`<br>
54 Example: `include: '**/*.(mjs|js)',`<br>
55
56 A pattern, or array of patterns, which specify the files in the build the plugin should operate on.
57
58 ### `exclude`
59
60 Type: `String | RegExp | Array[...String|RegExp]`<br>
61 Default: `[]`<br>
62 Example: `exlude: 'tests/**/*',`<br>
63
64 A pattern, or array of patterns, which specify the files in the build the plugin should _ignore_.
65
66 ### `debugger`
67
68 Type: `Boolean`<br>
69 Default: `true`<br>
70 Example: `debugger: false,`<br>
71
72 If `true` instructs the plugin to remove debugger statements.
73
74 ### `functions`
75
76 Type: `Array[...String]`<br>
77 Default: `[ 'console.*', 'assert.*' ]`<br>
78 Example: `functions: [ 'console.log', 'MyClass.Test' ],`<br>
79
80 Specifies the functions that the plugin will target and remove.
81
82 _Note: specifying functions that are used at the begining of a chain, such as 'a().b().c()', will result in '(void 0).b().c()' which will generate an error at runtime._
83
84 ### `labels`
85
86 Type: `Array[...String]`<br>
87 Default: `[]`<br>
88 Example: `labels: ['unittest'],`<br>
89
90 Specifies the [labeled blocks or statements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label) that the plugin will target and remove.
91
92 _Note: the '**:**' is implied and should not be specified in the config._
93
94 ### `sourceMap`
95
96 Type: `Boolean`<br>
97 Default: `true`<br>
98 Example: `sourceMap: false,`<br>
99
100 If `true`, instructs the plugin to update source maps accordingly after removing configured targets from the bundle.
101
102 ## Meta
103
104 [CONTRIBUTING](/.github/CONTRIBUTING.md)
105
106 [LICENSE (MIT)](/LICENSE)
+0
-60
packages/strip/package.json less more
0 {
1 "name": "@rollup/plugin-strip",
2 "version": "2.0.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Remove debugger statements and functions like assert.equal and console.log from your code",
7 "license": "MIT",
8 "repository": "rollup/@rollup/plugin-strip",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/strip#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "scripts": {
15 "build": "rollup -c",
16 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
17 "ci:lint": "pnpm run lint",
18 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
19 "ci:test": "pnpm run test -- --verbose",
20 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
21 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
22 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
23 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
24 "pretest": "pnpm run build",
25 "test": "ava"
26 },
27 "files": [
28 "dist"
29 ],
30 "keywords": [
31 "rollup",
32 "modules",
33 "debugging",
34 "javascript"
35 ],
36 "peerDependencies": {
37 "rollup": "^1.20.0 || ^2.0.0"
38 },
39 "dependencies": {
40 "@rollup/pluginutils": "^3.1.0",
41 "estree-walker": "^2.0.1",
42 "magic-string": "^0.25.7"
43 },
44 "devDependencies": {
45 "acorn": "^7.3.1",
46 "rollup": "^2.23.0"
47 },
48 "ava": {
49 "babel": {
50 "compileEnhancements": false
51 },
52 "files": [
53 "!**/fixtures/**",
54 "!**/helpers/**",
55 "!**/recipes/**",
56 "!**/types.ts"
57 ]
58 }
59 }
+0
-10
packages/strip/rollup.config.js less more
0 import pkg from './package.json';
1
2 export default {
3 input: 'src/index.js',
4 external: Object.keys(pkg.dependencies),
5 output: [
6 { format: 'cjs', file: pkg.main, exports: 'auto' },
7 { format: 'esm', file: pkg.module }
8 ]
9 };
+0
-153
packages/strip/src/index.js less more
0 /* eslint-disable no-param-reassign */
1 import { walk } from 'estree-walker';
2 import MagicString from 'magic-string';
3 import { createFilter } from '@rollup/pluginutils';
4
5 const whitespace = /\s/;
6
7 function getName(node) {
8 if (node.type === 'Identifier') return node.name;
9 if (node.type === 'ThisExpression') return 'this';
10 if (node.type === 'Super') return 'super';
11
12 return null;
13 }
14
15 function flatten(node) {
16 const parts = [];
17
18 while (node.type === 'MemberExpression') {
19 if (node.computed) return null;
20
21 parts.unshift(node.property.name);
22 node = node.object;
23 }
24
25 const name = getName(node);
26
27 if (!name) return null;
28
29 parts.unshift(name);
30 return parts.join('.');
31 }
32
33 export default function strip(options = {}) {
34 const include = options.include || '**/*.js';
35 const { exclude } = options;
36 const filter = createFilter(include, exclude);
37 const sourceMap = options.sourceMap !== false;
38
39 const removeDebuggerStatements = options.debugger !== false;
40 const functions = (options.functions || ['console.*', 'assert.*']).map((keypath) =>
41 keypath.replace(/\*/g, '\\w+').replace(/\./g, '\\s*\\.\\s*')
42 );
43
44 const labels = options.labels || [];
45
46 const labelsPatterns = labels.map((l) => `${l}\\s*:`);
47
48 const firstPass = [...functions, ...labelsPatterns];
49 if (removeDebuggerStatements) {
50 firstPass.push('debugger\\b');
51 }
52
53 const reFunctions = new RegExp(`^(?:${functions.join('|')})$`);
54 const reFirstpass = new RegExp(`\\b(?:${firstPass.join('|')})`);
55 const firstPassFilter = firstPass.length > 0 ? (code) => reFirstpass.test(code) : () => false;
56 const UNCHANGED = null;
57
58 return {
59 name: 'strip',
60
61 transform(code, id) {
62 if (!filter(id) || !firstPassFilter(code)) {
63 return UNCHANGED;
64 }
65
66 let ast;
67
68 try {
69 ast = this.parse(code);
70 } catch (err) {
71 err.message += ` in ${id}`;
72 throw err;
73 }
74
75 const magicString = new MagicString(code);
76 let edited = false;
77
78 function remove(start, end) {
79 while (whitespace.test(code[start - 1])) start -= 1;
80 magicString.remove(start, end);
81 }
82
83 function isBlock(node) {
84 return node && (node.type === 'BlockStatement' || node.type === 'Program');
85 }
86
87 function removeExpression(node) {
88 const { parent } = node;
89
90 if (parent.type === 'ExpressionStatement') {
91 removeStatement(parent);
92 } else {
93 magicString.overwrite(node.start, node.end, '(void 0)');
94 }
95
96 edited = true;
97 }
98
99 function removeStatement(node) {
100 const { parent } = node;
101
102 if (isBlock(parent)) {
103 remove(node.start, node.end);
104 } else {
105 magicString.overwrite(node.start, node.end, '(void 0);');
106 }
107
108 edited = true;
109 }
110
111 walk(ast, {
112 enter(node, parent) {
113 Object.defineProperty(node, 'parent', {
114 value: parent,
115 enumerable: false,
116 configurable: true
117 });
118
119 if (sourceMap) {
120 magicString.addSourcemapLocation(node.start);
121 magicString.addSourcemapLocation(node.end);
122 }
123
124 if (removeDebuggerStatements && node.type === 'DebuggerStatement') {
125 removeStatement(node);
126 this.skip();
127 } else if (node.type === 'LabeledStatement') {
128 if (node.label && labels.includes(node.label.name)) {
129 removeStatement(node);
130 this.skip();
131 }
132 } else if (node.type === 'CallExpression') {
133 const keypath = flatten(node.callee);
134 if (keypath && reFunctions.test(keypath)) {
135 removeExpression(node);
136 this.skip();
137 }
138 }
139 }
140 });
141
142 if (!edited) {
143 return UNCHANGED;
144 }
145
146 code = magicString.toString();
147 const map = sourceMap ? magicString.generateMap() : null;
148
149 return { code, map };
150 }
151 };
152 }
+0
-16
packages/strip/test/fixtures/.eslintrc less more
0 {
1 "rules": {
2 "class-methods-use-this": "off",
3 "default-case": "off",
4 "import/prefer-default-export": "off",
5 "no-console": "off",
6 "no-debugger": "off",
7 "no-labels": "off",
8 "no-restricted-syntax": "off",
9 "no-unused-expressions": "off",
10 "no-unused-labels": "off",
11 "no-unused-vars": "off",
12 "no-undef": "off",
13 "prefer-rest-params": "off"
14 }
15 }
+0
-6
packages/strip/test/fixtures/assert/input.js less more
0 /* eslint-disable */
1 function foo(message) {
2 assert.equal(arguments.length, 1);
3 assert.equal(typeof arguments[0], 'string');
4 bar(message);
5 }
+0
-4
packages/strip/test/fixtures/console/input.js less more
0 foo(123);
1 console.log('a');
2 console.error('b');
3 bar(789);
+0
-4
packages/strip/test/fixtures/console-custom/input.js less more
0 foo(123);
1 console.log('a');
2 console.error('b');
3 bar(789);
+0
-6
packages/strip/test/fixtures/custom/input.js less more
0 a();
1 debug('hello');
2 b();
3 custom.foo('foo');
4 custom.bar('bar');
5 c();
+0
-5
packages/strip/test/fixtures/debugger/input.js less more
0 export default function foo() {
1 before();
2 debugger;
3 after();
4 }
+0
-5
packages/strip/test/fixtures/debugger-false/input.js less more
0 export default function foo() {
1 before();
2 debugger;
3 after();
4 }
+0
-9
packages/strip/test/fixtures/excluded-not-changed/input.js less more
0 /* eslint-disable */
1 export default function foo() {
2 before();
3 debugger;
4 logging:
5 console.log('a');
6 console.error('b');
7 after();
8 }
+0
-4
packages/strip/test/fixtures/functions-direct/input.js less more
0 /* eslint-disable */
1 before();
2 f().t();
3 after();
+0
-20
packages/strip/test/fixtures/functions-spaced/input.js less more
0 /* eslint-disable */
1 before();
2 function f() {
3 return {
4 g: function () {
5 return {
6 hello: function () {
7 console.log('hello');
8 }
9 };
10 }
11 };
12 }
13
14 Test
15 .
16 f()
17 . g() .
18 hello();
19 after();
+0
-3
packages/strip/test/fixtures/if-block/input.js less more
0 if (DEBUG) {
1 console.log('debugging');
2 }
+0
-1
packages/strip/test/fixtures/inline-call-expressions/input.js less more
0 DEBUG && console.log('debugging');
+0
-1
packages/strip/test/fixtures/inline-if/input.js less more
0 if (DEBUG) console.log('debugging');
+0
-1
packages/strip/test/fixtures/inline-while/input.js less more
0 while (test()) console.log('still true!');
+0
-10
packages/strip/test/fixtures/label-awkward-spacing/input.js less more
0 /* eslint-disable */
1 before();
2 unittest
3 : {
4 test('some test', (assert) => {
5 });
6 }
7 again();
8 unittest:console.log();
9 after();
+0
-7
packages/strip/test/fixtures/label-block/input.js less more
0 before();
1 unittest: {
2 test('some test', (assert) => {
3 assert.true(true);
4 });
5 }
6 after();
+0
-9
packages/strip/test/fixtures/label-block-discriminate/input.js less more
0 before();
1 first: {
2 things();
3 }
4 after();
5 second: {
6 assert.things();
7 }
8 again();
+0
-9
packages/strip/test/fixtures/label-block-multiple/input.js less more
0 before();
1 first: {
2 things();
3 }
4 after();
5 second: {
6 assert.things();
7 }
8 again();
+0
-2
packages/strip/test/fixtures/label-expression/input.js less more
0 /* eslint-disable */
1 before();unittest:console.log();after();
+0
-10
packages/strip/test/fixtures/label-multiple-times/input.js less more
0 /* eslint-disable */
1 before();
2 unittest
3 : {
4 test('some test', (assert) => {
5 });
6 }
7 again();
8 unittest:console.log();
9 after();
+0
-7
packages/strip/test/fixtures/label-whitespace/input.js less more
0 /* eslint-disable */
1 before();
2 unittest : {
3 test('some test', (assert) => {
4 });
5 }
6 after();
+0
-2
packages/strip/test/fixtures/lambda-void/input.js less more
0 /* eslint-disable */
1 console.log(['h', 'e', 'y'].forEach((letter) => console.warn(letter)))
+0
-9
packages/strip/test/fixtures/no-changes/input.js less more
0 /* eslint-disable */
1 export default function foo() {
2 before();
3 debugger;
4 logging:
5 console.log('a');
6 console.error('b');
7 after();
8 }
+0
-4
packages/strip/test/fixtures/object-destructuring-default/input.js less more
0 export function fn({ foo = console.log(), bar } = {}) {
1 const { baz = console.log() } = bar;
2 console.log(foo, bar, baz);
3 }
+0
-8
packages/strip/test/fixtures/super-method/input.js less more
0 /* eslint-disable */
1 class Foo {
2 bar() {
3 a();
4 super.log('hello');
5 b();
6 }
7 }
+0
-4
packages/strip/test/fixtures/switch-case/input.js less more
0 switch (a) {
1 case 1:
2 debugger;
3 }
+0
-4
packages/strip/test/fixtures/this-method/input.js less more
0 a();
1 this.foo('foo');
2 this.bar('bar');
3 b();
+0
-315
packages/strip/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## can be configured to make no changes
7
8 > Snapshot 1
9
10 `/* eslint-disable */␊
11 export default function foo() {␊
12 before();␊
13 debugger;␊
14 logging:␊
15 console.log('a');␊
16 console.error('b');␊
17 after();␊
18 }␊
19 `
20
21 ## does not remove debugger statements with debugger: false
22
23 > Snapshot 1
24
25 `export default function foo() {␊
26 before();␊
27 debugger;␊
28 after();␊
29 }␊
30 `
31
32 ## empty functions list leaves assert statements
33
34 > Snapshot 1
35
36 `/* eslint-disable */␊
37 function foo(message) {␊
38 assert.equal(arguments.length, 1);␊
39 assert.equal(typeof arguments[0], 'string');␊
40 bar(message);␊
41 }␊
42 `
43
44 ## empty functions list leaves console statements
45
46 > Snapshot 1
47
48 `/* eslint-disable */␊
49 export default function foo() {␊
50 before();␊
51 logging:␊
52 console.log('a');␊
53 console.error('b');␊
54 after();␊
55 }␊
56 `
57
58 ## excluded files do not get changed
59
60 > Snapshot 1
61
62 `/* eslint-disable */␊
63 export default function foo() {␊
64 before();␊
65 debugger;␊
66 logging:␊
67 console.log('a');␊
68 console.error('b');␊
69 after();␊
70 }␊
71 `
72
73 ## function calls without object are replaced with (void 0)
74
75 > Snapshot 1
76
77 `/* eslint-disable */␊
78 before();␊
79 (void 0).t();␊
80 after();␊
81 `
82
83 ## leaves console statements if custom functions are provided
84
85 > Snapshot 1
86
87 `foo(123);␊
88 console.error('b');␊
89 bar(789);␊
90 `
91
92 ## only removes specified blocks
93
94 > Snapshot 1
95
96 `before();␊
97 first: {␊
98 things();␊
99 }␊
100 after();␊
101 again();␊
102 `
103
104 ## removes assert statements
105
106 > Snapshot 1
107
108 `/* eslint-disable */␊
109 function foo(message) {␊
110 bar(message);␊
111 }␊
112 `
113
114 ## removes console statements
115
116 > Snapshot 1
117
118 `foo(123);␊
119 bar(789);␊
120 `
121
122 ## removes custom functions
123
124 > Snapshot 1
125
126 `a();␊
127 b();␊
128 c();␊
129 `
130
131 ## removes debugger statements
132
133 > Snapshot 1
134
135 `export default function foo() {␊
136 before();␊
137 after();␊
138 }␊
139 `
140
141 ## removes expressions in if blocks
142
143 > Snapshot 1
144
145 `if (DEBUG) {␊
146 }␊
147 `
148
149 ## removes labeled blocks
150
151 > Snapshot 1
152
153 `before();␊
154 unittest: {␊
155 test('some test', (assert) => {␊
156 });␊
157 }␊
158 after();␊
159 `
160
161 ## removes labeled blocks when filtered function is present
162
163 > Snapshot 1
164
165 `before();␊
166 after();␊
167 `
168
169 ## removes labeled blocks when functions list is empty
170
171 > Snapshot 1
172
173 `before();␊
174 after();␊
175 `
176
177 ## removes labeled even with awkward spacing
178
179 > Snapshot 1
180
181 `/* eslint-disable */␊
182 before();␊
183 again();␊
184 after();␊
185 `
186
187 ## removes methods of this
188
189 > Snapshot 1
190
191 `a();␊
192 b();␊
193 `
194
195 ## removes multiple labeled blocks
196
197 > Snapshot 1
198
199 `before();␊
200 after();␊
201 again();␊
202 `
203
204 ## removes super calls
205
206 > Snapshot 1
207
208 `/* eslint-disable */␊
209 class Foo {␊
210 bar() {␊
211 a();␊
212 b();␊
213 }␊
214 }␊
215 `
216
217 ## removing a lable also works for expressions
218
219 > Snapshot 1
220
221 `/* eslint-disable */␊
222 before();after();␊
223 `
224
225 ## replaces case body with void 0
226
227 > Snapshot 1
228
229 `switch (a) {␊
230 case 1:␊
231 (void 0);␊
232 }␊
233 `
234
235 ## rewrites expressions as void 0 in lambdas
236
237 > Snapshot 1
238
239 `/* eslint-disable */␊
240 console.log(['h', 'e', 'y'].forEach((letter) => (void 0)))␊
241 `
242
243 ## rewrtestes inline call expressions (not expression statements) as void 0
244
245 > Snapshot 1
246
247 `DEBUG && (void 0);␊
248 `
249
250 ## rewrtestes inline if expessions as void 0
251
252 > Snapshot 1
253
254 `if (DEBUG) (void 0);␊
255 `
256
257 ## rewrtestes inline while expressions as void 0
258
259 > Snapshot 1
260
261 `while (test()) (void 0);␊
262 `
263
264 ## spaces around . in function calls are accepted
265
266 > Snapshot 1
267
268 `/* eslint-disable */␊
269 before();␊
270 function f() {␊
271 return {␊
272 g: function () {␊
273 return {␊
274 hello: function () {␊
275 console.log('hello');␊
276 }␊
277 };␊
278 }␊
279 };␊
280 }␊
281
282 (void 0)␊
283 . g() .␊
284 hello();␊
285 after();␊
286 `
287
288 ## supports object destructuring assignments with default values
289
290 > Snapshot 1
291
292 `export function fn({ foo = (void 0), bar } = {}) {␊
293 const { baz = (void 0) } = bar;␊
294 }␊
295 `
296
297 ## the same label can occur multiple times and all are removed
298
299 > Snapshot 1
300
301 `/* eslint-disable */␊
302 before();␊
303 again();␊
304 after();␊
305 `
306
307 ## whitespace between label and colon is accepted
308
309 > Snapshot 1
310
311 `/* eslint-disable */␊
312 before();␊
313 after();␊
314 `
packages/strip/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-150
packages/strip/test/test.js less more
0 const fs = require('fs');
1 const path = require('path');
2
3 const acorn = require('acorn');
4 const test = require('ava');
5
6 // eslint-disable-next-line import/no-unresolved
7 const strip = require('..');
8
9 const compare = (t, fixture, options) => {
10 const filename = path.resolve(`test/fixtures/${fixture}/input.js`);
11 const input = fs.readFileSync(filename, 'utf-8');
12 const output = strip(options).transform.call(
13 {
14 parse: (code) =>
15 acorn.parse(code, {
16 sourceType: 'module',
17 ecmaVersion: 9
18 })
19 },
20 input,
21 filename
22 );
23
24 t.snapshot(output ? output.code : input);
25 };
26
27 test('can be configured to make no changes', (t) => {
28 compare(t, 'no-changes', {
29 labels: [],
30 functions: [],
31 debugger: false
32 });
33 });
34
35 test('excluded files do not get changed', (t) => {
36 compare(t, 'excluded-not-changed', { exclude: `**/excluded-not-changed/input.js` });
37 });
38
39 test('removes debugger statements', (t) => {
40 compare(t, 'debugger');
41 });
42
43 test('does not remove debugger statements with debugger: false', (t) => {
44 compare(t, 'debugger-false', { debugger: false });
45 });
46
47 test('empty functions list leaves console statements', (t) => {
48 compare(t, 'no-changes', { functions: [] });
49 });
50
51 test('removes console statements', (t) => {
52 compare(t, 'console');
53 });
54
55 test('removes assert statements', (t) => {
56 compare(t, 'assert');
57 });
58
59 test('empty functions list leaves assert statements', (t) => {
60 compare(t, 'assert', { functions: [] });
61 });
62
63 test('leaves console statements if custom functions are provided', (t) => {
64 compare(t, 'console-custom', { functions: ['console.log'] });
65 });
66
67 test('removes custom functions', (t) => {
68 compare(t, 'custom', { functions: ['debug', 'custom.*'] });
69 });
70
71 test('rewrtestes inline call expressions (not expression statements) as void 0', (t) => {
72 compare(t, 'inline-call-expressions');
73 });
74
75 test('rewrtestes inline if expessions as void 0', (t) => {
76 compare(t, 'inline-if');
77 });
78
79 test('rewrites expressions as void 0 in lambdas', (t) => {
80 compare(t, 'lambda-void', { functions: ['console.warn'] });
81 });
82
83 test('removes expressions in if blocks', (t) => {
84 compare(t, 'if-block');
85 });
86
87 test('removes methods of this', (t) => {
88 compare(t, 'this-method', { functions: ['this.*'] });
89 });
90
91 test('removes super calls', (t) => {
92 compare(t, 'super-method', { functions: ['super.log'] });
93 });
94
95 test('replaces case body with void 0', (t) => {
96 compare(t, 'switch-case');
97 });
98
99 test('rewrtestes inline while expressions as void 0', (t) => {
100 compare(t, 'inline-while');
101 });
102
103 test('supports object destructuring assignments with default values', (t) => {
104 compare(t, 'object-destructuring-default');
105 });
106
107 test('removes labeled blocks', (t) => {
108 compare(t, 'label-block', { labels: ['untesttest'] });
109 });
110
111 test('removes multiple labeled blocks', (t) => {
112 compare(t, 'label-block-multiple', { labels: ['first', 'second'] });
113 });
114
115 test('only removes specified blocks', (t) => {
116 compare(t, 'label-block-discriminate', { labels: ['second'] });
117 });
118
119 test('removes labeled blocks when filtered function is present', (t) => {
120 compare(t, 'label-block', { labels: ['unittest'], functions: ['console.*'] });
121 });
122
123 test('removes labeled blocks when functions list is empty', (t) => {
124 compare(t, 'label-block', { labels: ['unittest'], functions: [] });
125 });
126
127 test('whitespace between label and colon is accepted', (t) => {
128 compare(t, 'label-whitespace', { labels: ['unittest'], functions: ['console.*'] });
129 });
130
131 test('removing a lable also works for expressions', (t) => {
132 compare(t, 'label-expression', { labels: ['unittest'] });
133 });
134
135 test('the same label can occur multiple times and all are removed', (t) => {
136 compare(t, 'label-multiple-times', { labels: ['unittest'] });
137 });
138
139 test('removes labeled even with awkward spacing', (t) => {
140 compare(t, 'label-awkward-spacing', { labels: ['unittest'], functions: ['console.*'] });
141 });
142
143 test('spaces around . in function calls are accepted', (t) => {
144 compare(t, 'functions-spaced', { labels: ['unittest'], functions: ['Test.f'] });
145 });
146
147 test('function calls without object are replaced with (void 0)', (t) => {
148 compare(t, 'functions-direct', { labels: ['unittest'], functions: ['f'] });
149 });
+0
-48
packages/sucrase/CHANGELOG.md less more
0 # @rollup/plugin-sucrase ChangeLog
1
2 ## v3.1.0
3
4 _2020-06-28_
5
6 ### Features
7
8 - feat: resolve .tsx files (#448)
9
10 ## v3.0.2
11
12 _2020-05-20_
13
14 ### Bugfixes
15
16 - fix: fix aliases not resolving (#387)
17
18 ## v3.0.1
19
20 _2020-05-11_
21
22 ### Updates
23
24 - chore: rollup v2 peerDep. (dupe for pub) (ad08841)
25
26 ## 3.0.0
27
28 _2019-12-??_
29
30 - **Breaking:** Minimum compatible Rollup version is 1.20.0
31 - **Breaking:** Minimum supported Node version is 8.0.0
32 - Published as @rollup/plugin-sucrase
33 - Fix: correctly pass `enableLegacyBabel5ModuleInterop` option to Sucrase
34
35 ## 2.1.0
36
37 - Add `filter` option ([#4](https://github.com/rollup/rollup-plugin-sucrase/pull/4))
38 - Remove lockfile so we always get most recent version of Sucrase
39 - Resolve extensionless imports ([#3](https://github.com/rollup/rollup-plugin-sucrase/issues/3))
40
41 ## 2.0.0
42
43 - Update to Sucrase 3.x ([#2](https://github.com/rollup/rollup-plugin-sucrase/pull/2))
44
45 ## 1.0.0
46
47 - First release
+0
-83
packages/sucrase/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-sucrase
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-sucrase
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-sucrase
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-sucrase
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-sucrase
10
11 🍣 A Rollup plugin which compiles TypeScript, Flow, JSX, etc with Sucrase.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-sucrase --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin. An example of compiling TypeScript (the node-resolve plugin is added to automatically add file extensions, since TypeScript expects not to find them):
28
29 ```js
30 import sucrase from '@rollup/plugin-sucrase';
31 import resolve from '@rollup/plugin-node-resolve';
32
33 export default {
34 input: 'src/index.ts',
35 output: {
36 file: 'dist/bundle.js',
37 format: 'cjs'
38 },
39 plugins: [
40 resolve({
41 extensions: ['.js', '.ts']
42 }),
43 sucrase({
44 exclude: ['node_modules/**'],
45 transforms: ['typescript']
46 })
47 ]
48 };
49 ```
50
51 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).
52
53 ## Options
54
55 The following [Sucrase options](https://github.com/alangpierce/sucrase#transforms) may be passed as options for this plugin:
56
57 - `enableLegacyBabel5ModuleInterop`
58 - `enableLegacyTypeScriptModuleInterop`
59 - `jsxFragmentPragma`
60 - `jsxPragma`
61 - `production`
62 - `transforms`
63
64 ### `exclude`
65
66 Type: `String` | `Array[...String]`
67 Default: `null`
68
69 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 no files are ignored.
70
71 ### `include`
72
73 Type: `String` | `Array[...String]`
74 Default: `null`
75
76 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 all files are targeted.
77
78 ## Meta
79
80 [CONTRIBUTING](/.github/CONTRIBUTING.md)
81
82 [LICENSE (MIT)](/LICENSE)
+0
-70
packages/sucrase/package.json less more
0 {
1 "name": "@rollup/plugin-sucrase",
2 "version": "3.1.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Compile TypeScript, Flow, JSX, etc with Sucrase",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/sucrase/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "sucrase",
42 "typescript",
43 "flow",
44 "jsx"
45 ],
46 "peerDependencies": {
47 "rollup": "^1.20.0 || ^2.0.0"
48 },
49 "dependencies": {
50 "@rollup/pluginutils": "^3.1.0",
51 "sucrase": "^3.15.0"
52 },
53 "devDependencies": {
54 "@rollup/plugin-alias": "^3.1.1",
55 "rollup": "^2.23.0"
56 },
57 "ava": {
58 "babel": {
59 "compileEnhancements": false
60 },
61 "files": [
62 "!**/fixtures/**",
63 "!**/output/**",
64 "!**/helpers/**",
65 "!**/recipes/**",
66 "!**/types.ts"
67 ]
68 }
69 }
+0
-12
packages/sucrase/rollup.config.js less more
0 import pkg from './package.json';
1
2 const external = Object.keys(pkg.dependencies).concat(['path', 'fs']);
3
4 export default {
5 input: 'src/index.js',
6 external,
7 output: [
8 { format: 'cjs', file: pkg.main },
9 { format: 'esm', file: pkg.module }
10 ]
11 };
+0
-52
packages/sucrase/src/index.js less more
0 const fs = require('fs');
1 const path = require('path');
2
3 const { transform } = require('sucrase');
4 const { createFilter } = require('@rollup/pluginutils');
5
6 module.exports = function sucrase(opts = {}) {
7 const filter = createFilter(opts.include, opts.exclude);
8
9 return {
10 name: 'sucrase',
11
12 // eslint-disable-next-line consistent-return
13 resolveId(importee, importer) {
14 if (importer && /^[./]/.test(importee)) {
15 const resolved = path.resolve(importer ? path.dirname(importer) : process.cwd(), importee);
16 // resolve in the same order that TypeScript resolves modules
17 const resolvedFilename = [
18 `${resolved}.ts`,
19 `${resolved}.tsx`,
20 `${resolved}/index.ts`,
21 `${resolved}/index.tsx`
22 ].find((filename) => fs.existsSync(filename));
23
24 if (resolvedFilename) {
25 return resolvedFilename;
26 }
27 }
28 },
29
30 transform(code, id) {
31 if (!filter(id)) return null;
32
33 const result = transform(code, {
34 transforms: opts.transforms,
35 jsxPragma: opts.jsxPragma,
36 jsxFragmentPragma: opts.jsxFragmentPragma,
37 enableLegacyTypeScriptModuleInterop: opts.enableLegacyTypeScriptModuleInterop,
38 enableLegacyBabel5ModuleInterop: opts.enableLegacyBabel5ModuleInterop,
39 production: opts.production,
40 filePath: id,
41 sourceMapOptions: {
42 compiledFilename: id
43 }
44 });
45 return {
46 code: result.code,
47 map: result.sourceMap
48 };
49 }
50 };
51 };
+0
-5
packages/sucrase/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly"
3 }
4 }
+0
-2
packages/sucrase/test/fixtures/flow/example.js less more
0 // @flow
1 export default (a: number, b: number): number => a * b;
+0
-3
packages/sucrase/test/fixtures/flow/main.js less more
0 import example from './example';
1
2 t.snapshot(example.toString());
+0
-1
packages/sucrase/test/fixtures/jsx/example.jsx less more
0 export default () => <div id="foo">hello world</div>
+0
-4
packages/sucrase/test/fixtures/jsx/main.js less more
0 /* eslint-disable import/extensions */
1 import example from './example.jsx';
2
3 t.snapshot(example.toString());
+0
-1
packages/sucrase/test/fixtures/typescript/example.ts less more
0 export default (a: number, b: number): number => a * b;
+0
-4
packages/sucrase/test/fixtures/typescript/main.js less more
0 /* eslint-disable import/extensions */
1 import example from './example.ts';
2
3 t.snapshot(example.toString());
+0
-1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-a/index.ts less more
0 export default (a: number, b: number): number => a * b;
+0
-1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-b/index.ts less more
0 export default 'Should not be imported';
+0
-1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-b.ts less more
0 export default (c: number, d: number): number => c * d;
+0
-5
packages/sucrase/test/fixtures/typescript-resolve-directory/main.js less more
0 import dirImport from './example-a';
1 import fileImport from './example-b';
2
3 t.snapshot(dirImport.toString());
4 t.snapshot(fileImport.toString());
+0
-4
packages/sucrase/test/fixtures/typescript-with-aliases/main.js less more
0 /* eslint-disable import/extensions, import/no-unresolved */
1 import example from '~src/index.ts';
2
3 t.snapshot(example.toString());
+0
-1
packages/sucrase/test/fixtures/typescript-with-aliases/src/example.ts less more
0 export default (a: number, b: number): number => a * b;
+0
-4
packages/sucrase/test/fixtures/typescript-with-aliases/src/index.ts less more
0 /* eslint-disable import/no-unresolved, import/extensions */
1 import example from '~src/example';
2
3 export default example;
+0
-1
packages/sucrase/test/fixtures/typescript-with-tsx/example-a/index.tsx less more
0 export default () => <div id="foo">hello world</div>;
+0
-1
packages/sucrase/test/fixtures/typescript-with-tsx/example-b.tsx less more
0 export default () => <div id="example-b">hello world (a second time)</div>;
+0
-5
packages/sucrase/test/fixtures/typescript-with-tsx/main.js less more
0 import dirImport from './example-a';
1 import fileImport from './example-b';
2
3 t.snapshot(dirImport.toString());
4 t.snapshot(fileImport.toString());
+0
-49
packages/sucrase/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## converts jsx
7
8 > Snapshot 1
9
10 '() => React.createElement(\'div\', { id: "foo", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 1}}, "hello world" )'
11
12 ## converts jsx with custom jsxPragma
13
14 > Snapshot 1
15
16 '() => FakeReactCreateElement(\'div\', { id: "foo", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 1}}, "hello world" )'
17
18 ## converts typescript
19
20 > Snapshot 1
21
22 '(a, b) => a * b'
23
24 ## converts typescript jsx ("tsx")
25
26 > Snapshot 1
27
28 '() => React.createElement(\'div\', { id: "foo", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 1}}, "hello world" )'
29
30 > Snapshot 2
31
32 '() => React.createElement(\'div\', { id: "example-b", __self: undefined, __source: {fileName: _jsxFileName$1, lineNumber: 1}}, "hello world (a second time)" )'
33
34 ## converts typescript with aliases
35
36 > Snapshot 1
37
38 '(a, b) => a * b'
39
40 ## resolves typescript directory imports
41
42 > Snapshot 1
43
44 '(a, b) => a * b'
45
46 > Snapshot 2
47
48 '(c, d) => c * d'
packages/sucrase/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-105
packages/sucrase/test/test.js less more
0 const path = require('path');
1
2 const test = require('ava');
3 const { rollup } = require('rollup');
4
5 // eslint-disable-next-line import/no-unresolved, import/extensions
6 const alias = require('@rollup/plugin-alias');
7
8 const { testBundle } = require('../../../util/test');
9
10 const sucrase = require('..');
11
12 require('source-map-support').install();
13
14 process.chdir(__dirname);
15
16 test('converts jsx', async (t) => {
17 const bundle = await rollup({
18 input: 'fixtures/jsx/main.js',
19 plugins: [
20 sucrase({
21 transforms: ['jsx']
22 })
23 ]
24 });
25 t.plan(1);
26 return testBundle(t, bundle);
27 });
28
29 test('converts jsx with custom jsxPragma', async (t) => {
30 const bundle = await rollup({
31 input: 'fixtures/jsx/main.js',
32 plugins: [
33 sucrase({
34 transforms: ['jsx'],
35 jsxPragma: 'FakeReactCreateElement'
36 })
37 ]
38 });
39 t.plan(1);
40 return testBundle(t, bundle);
41 });
42
43 test('converts typescript', async (t) => {
44 const bundle = await rollup({
45 input: 'fixtures/typescript/main.js',
46 plugins: [
47 sucrase({
48 transforms: ['typescript']
49 })
50 ]
51 });
52 t.plan(1);
53 return testBundle(t, bundle);
54 });
55
56 test('converts typescript with aliases', async (t) => {
57 const bundle = await rollup({
58 input: 'fixtures/typescript-with-aliases/main.js',
59 plugins: [
60 sucrase({
61 transforms: ['typescript']
62 }),
63 alias({
64 entries: [
65 {
66 find: '~src',
67 replacement: path.resolve(__dirname, 'fixtures', 'typescript-with-aliases', 'src')
68 }
69 ]
70 })
71 ]
72 });
73 t.plan(1);
74
75 return testBundle(t, bundle);
76 });
77
78 test('resolves typescript directory imports', async (t) => {
79 const bundle = await rollup({
80 input: 'fixtures/typescript-resolve-directory/main.js',
81 plugins: [
82 sucrase({
83 transforms: ['typescript']
84 })
85 ]
86 });
87 t.plan(2);
88
89 return testBundle(t, bundle);
90 });
91
92 test('converts typescript jsx ("tsx")', async (t) => {
93 const bundle = await rollup({
94 input: 'fixtures/typescript-with-tsx/main.js',
95 plugins: [
96 sucrase({
97 transforms: ['typescript', 'jsx']
98 })
99 ]
100 });
101 t.plan(2);
102
103 return testBundle(t, bundle);
104 });
+0
-1
packages/typescript/.eslintignore less more
0 test/fixtures/syntax-error
+0
-265
packages/typescript/CHANGELOG.md less more
0 # @rollup/plugin-typescript ChangeLog
1
2 ## v6.0.0
3
4 _2020-09-09_
5
6 ### Breaking Changes
7
8 - fix!: Change `noEmitOnError` default to false (#544)
9
10 ### Updates
11
12 - test: add generating declarations with non-default rootDir (#553)
13 - chore: update dependencies (9e52818)
14
15 ## v5.0.2
16
17 _2020-07-12_
18
19 ### Bugfixes
20
21 - fix: utilize 'this.meta.watchMode' (#449)
22
23 ### Updates
24
25 - chore: linting update (410ceb8)
26
27 ## v5.0.1
28
29 _2020-06-28_
30
31 ### Bugfixes
32
33 - fix: load empty emitted files (#476)
34
35 ## v5.0.0
36
37 _2020-06-22_
38
39 ### Breaking Changes
40
41 - fix!: sync rollup and typescript file watch (#425)
42
43 ### Bugfixes
44
45 - fix: Fix peer dep version (#461)
46
47 ## v4.1.2
48
49 _2020-05-20_
50
51 ### Bugfixes
52
53 - fix: memory leak. fixes #322 (#352)
54
55 ### Updates
56
57 - docs: update readme examples (#391)
58 - docs: update link to @rollup/plugin-babel in README.md (#372)
59
60 ## v4.1.1
61
62 _2020-04-12_
63
64 ### Bugfixes
65
66 - fix: sourcemap generated as null (#276)
67 - fix: use parsedOptions.fileNames for emit declaration files (#270) (#271)
68
69 ## v4.1.0
70
71 _2020-04-12_
72
73 ### Features
74
75 - feat: Refine options interface (#284)
76
77 ## v4.0.0
78
79 ### Bugfixes
80
81 - fix: Use builtin extends resolution (#199)
82
83 ### Features
84
85 - feat: Move to BuilderProgram API (#217)
86
87 ### Breaking Changes
88
89 Please see https://github.com/rollup/plugins/pull/217 for more information.
90
91 ## v3.1.0
92
93 _2020-03-05_
94
95 _Note: This was a bad release due to breaking changes. v3.1.1 has been published to revert the latest 3.x.x version to a non-breaking state. For the changes in this erroneous version, please use v4.0.0._
96
97 ### Updates
98
99 - test: Add preserveModules test (#234)
100 - chore: refactor compiler host (#214)
101 - test: Add test for optional chaining (#207)
102 - chore: Use typechecking (4bb8753)
103
104 ## v3.0.0
105
106 _2020-01-27_
107
108 ### Breaking Changes
109
110 - feat: Add typechecking! (#177)
111
112 ### Bugfixes
113
114 - fix: extended config file path (#157)
115
116 ### Updates
117
118 - core: Add note about old behaviour (#181)
119 - chore: Always use ParsedCommandLine (#162)
120 - chore: update devDeps (96c45ff)
121 - chore: Remove resolveHost (#148)
122
123 ## v2.1.0
124
125 _2020-01-07_
126
127 ### Features
128
129 - feat: Warning objects for type errors (#144)
130 - feat: Find tslib asynchronously (#131)
131
132 ### Updates
133
134 - chore: Use ts.findConfigFile helper (#145)
135
136 ## v2.0.2
137
138 _2020-01-04_
139
140 ### Bugfixes
141
142 - fix: Use this.warn for ts errors (#129)
143
144 ### Updates
145
146 - refactor: use typescript in typescript plugin (#122)
147 - chore: update changelog (b723f92)
148 - chore: misc linting updates (4de10f0)
149
150 ## 2.0.1
151
152 _2019-12-04_
153
154 - fix(typescript): import from scoped utils (#78)
155
156 ## 2.0.0
157
158 _2019-11-25_
159
160 - **Breaking:** Minimum compatible Rollup version is 1.20.0
161 - **Breaking:** Minimum supported Node version is 8.0.0
162 - Published as @rollup/plugin-typescript
163
164 ## 1.0.1
165
166 _2019-03-24_
167
168 - Update dependencies ([#136](https://github.com/rollup/rollup-plugin-typescript/issues/136))
169
170 ## 1.0.0
171
172 _2018-09-16_
173
174 - Major update for TypeScript 2/3, Rollup 1 compatibility, lots of fixes ([#124](https://github.com/rollup/rollup-plugin-typescript/issues/124))
175 - Require TypeScript as peer dependency ([#121](https://github.com/rollup/rollup-plugin-typescript/issues/121))
176 - Also test on Node 10 ([#119](https://github.com/rollup/rollup-plugin-typescript/issues/119))
177 - Fix example in readme ([#98](https://github.com/rollup/rollup-plugin-typescript/issues/98))
178
179 ## 0.8.1
180
181 - Ignore typescript-helpers in source maps ([#61](https://github.com/rollup/rollup-plugin-typescript/issues/61))
182
183 ## 0.8.0
184
185 - Fix the rollup breaking change with paths ([#52](https://github.com/rollup/rollup-plugin-typescript/issues/52))
186 - Don't fail without source maps ([#57](https://github.com/rollup/rollup-plugin-typescript/pull/57))
187
188 ## 0.7.7
189
190 - Add missing `__assign` helper ([#49](https://github.com/rollup/rollup-plugin-typescript/issues/49))
191
192 ## 0.7.6
193
194 - Ignore the `declaration` option ([#45](https://github.com/rollup/rollup-plugin-typescript/issues/45))
195 - Disable `strictNullChecks` with a warning for TypeScript versions that don't support it ([#46](https://github.com/rollup/rollup-plugin-typescript/issues/46))
196
197 ## 0.7.5
198
199 - Ensure NPM doesn't ignore typescript-helpers
200
201 ## 0.7.4
202
203 - Resolve typescript-helpers to a file in the filesystem.
204
205 ## 0.7.3
206
207 - Update Tippex to ^2.1.1
208
209 ## 0.7.2
210
211 - Don't error if both `sourceMap` and `inlineSourceMap` are specified
212
213 ## 0.7.1
214
215 - No plugin specific options should be forwarded to TypeScript
216
217 ## 0.7.0
218
219 - Use `compilerOptions` from `tsconfig.json` if found ([#39](https://github.com/rollup/rollup-plugin-typescript/pull/32))
220
221 ## 0.6.1
222
223 - Upgrade Tippex to ^2.1.0
224 - Upgrade TypeScript to ^1.8.9
225
226 ## 0.6.0
227
228 - Upgrade to TypeScript ^1.8.7
229 - Update `__awaiter` helper to support TypeScript 1.8.x ([#32](https://github.com/rollup/rollup-plugin-typescript/pull/32))
230 - Update `ts.nodeModuleNameResolver` to support both 1.7.x and 1.8.x ([#31](https://github.com/rollup/rollup-plugin-typescript/issues/31))
231
232 ## 0.5.0
233
234 - Do not duplicate TypeScript's helpers ([#24](https://github.com/rollup/rollup-plugin-typescript/issues/24))
235 - Handle `export abstract class` ([#23](https://github.com/rollup/rollup-plugin-typescript/issues/23))
236
237 ## 0.4.1
238
239 - Does not attempt resolve or transform `.d.ts` files ([#22](https://github.com/rollup/rollup-plugin-typescript/pull/22))
240
241 ## 0.4.0
242
243 - Work around TypeScript 1.7.5's transpilation issues ([#9](https://github.com/rollup/rollup-plugin-typescript/issues/9))
244 - Overridable TypeScript version when transpiling ([#4](https://github.com/rollup/rollup-plugin-typescript/issues/4))
245 - Add `jsx` support ([#11](https://github.com/rollup/rollup-plugin-typescript/issues/11))
246
247 ## 0.3.0
248
249 - Author plugin in TypeScript
250 - Report diagnostics
251 - Resolve identifiers using `ts.nodeModuleNameResolver`
252
253 ## 0.2.1
254
255 - Upgrade to TypeScript ^1.7.5
256 - Enable source maps per default
257
258 ## 0.2.0
259
260 - Use (_prerelease version of_) TypeScript 1.7.0 to generate ES5 while preserving ES2015 imports for efficient bundling.
261
262 ## 0.1.0
263
264 - Initial release
+0
-195
packages/typescript/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-typescript
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-typescript
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-typescript
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-typescript
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-typescript
10
11 🍣 A Rollup plugin for seamless integration between Rollup and Typescript.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. This plugin also requires at least [TypeScript 3.4](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html).
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-typescript --save-dev
23 ```
24
25 Note that both `typescript` and `tslib` are peer dependencies of this plugin that need to be installed separately.
26
27 ## Why?
28
29 See [@rollup/plugin-babel](https://github.com/rollup/plugins/tree/master/packages/babel).
30
31 ## Usage
32
33 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
34
35 ```js
36 // rollup.config.js
37 import typescript from '@rollup/plugin-typescript';
38
39 export default {
40 input: 'src/index.ts',
41 output: {
42 dir: 'output',
43 format: 'cjs',
44 },
45 plugins: [typescript()],
46 };
47 ```
48
49 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).
50
51 ## Options
52
53 The plugin loads any [`compilerOptions`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) from the `tsconfig.json` file by default. Passing options to the plugin directly overrides those options:
54
55 ```js
56 ...
57 export default {
58 input: './main.ts',
59 plugins: [
60 typescript({lib: ["es5", "es6", "dom"], target: "es5"})
61 ]
62 }
63 ```
64
65 The following options are unique to `rollup-plugin-typescript`:
66
67 ### `exclude`
68
69 Type: `String` | `Array[...String]`<br>
70 Default: `null`
71
72 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 no files are ignored.
73
74 ### `include`
75
76 Type: `String` | `Array[...String]`<br>
77 Default: `null`
78
79 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 all `.ts` and `.tsx` files are targeted.
80
81 ### `tsconfig`
82
83 Type: `String` | `Boolean`<br>
84 Default: `true`
85
86 When set to false, ignores any options specified in the config file. If set to a string that corresponds to a file path, the specified file will be used as config file.
87
88 ### `typescript`
89
90 Type: `import('typescript')`<br>
91 Default: _peer dependency_
92
93 Overrides the TypeScript module used for transpilation.
94
95 ```js
96 typescript({
97 typescript: require('some-fork-of-typescript'),
98 });
99 ```
100
101 ### `tslib`
102
103 Type: `String`<br>
104 Default: _peer dependency_
105
106 Overrides the injected TypeScript helpers with a custom version.
107
108 ```js
109 typescript({
110 tslib: require.resolve('some-fork-of-tslib'),
111 });
112 ```
113
114 ### Typescript compiler options
115
116 Some of Typescript's [CompilerOptions](https://www.typescriptlang.org/docs/handbook/compiler-options.html) affect how Rollup builds files.
117
118 #### `noEmitOnError`
119
120 Type: `Boolean`<br>
121 Default: `false`
122
123 If a type error is detected, the Rollup build is aborted when this option is set to true.
124
125 #### `files`, `include`, `exclude`
126
127 Type: `Array[...String]`<br>
128 Default: `[]`
129
130 Declaration files are automatically included if they are listed in the `files` field in your `tsconfig.json` file. Source files in these fields are ignored as Rollup's configuration is used instead.
131
132 #### Ignored options
133
134 These compiler options are ignored by Rollup:
135
136 - `noEmitHelpers`, `importHelpers`: The `tslib` helper module always must be used.
137 - `noEmit`, `emitDeclarationOnly`: Typescript needs to emit code for the plugin to work with.
138 - `noResolve`: Preventing Typescript from resolving code may break compilation
139
140 ### Importing CommonJS
141
142 Though it is not recommended, it is possible to configure this plugin to handle imports of CommonJS files from TypeScript. For this, you need to specify `CommonJS` as the module format and add `rollup-plugin-commonjs` to transpile the CommonJS output generated by TypeScript to ES Modules so that rollup can process it.
143
144 ```js
145 // rollup.config.js
146 import typescript from '@rollup/plugin-typescript';
147 import commonjs from '@rollup/plugin-commonjs';
148
149 export default {
150 input: './main.ts',
151 plugins: [
152 typescript({ module: 'CommonJS' }),
153 commonjs({ extensions: ['.js', '.ts'] }), // the ".ts" extension is required
154 ],
155 };
156 ```
157
158 Note that this will often result in less optimal output.
159
160 ### Preserving JSX output
161
162 Whenever choosing to preserve JSX output to be further consumed by another transform step via `tsconfig` `compilerOptions` by setting `jsx: 'preserve'` or [overriding options](#options), please bear in mind that, by itself, this plugin won't be able to preserve JSX output, usually failing with:
163
164 ```sh
165 [!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
166 file.tsx (1:15)
167 1: export default <span>Foobar</span>
168 ^
169 ```
170
171 To prevent that, make sure to use the acorn plugin, namely `acorn-jsx`, which will make Rollup's parser acorn handle JSX tokens. (See https://rollupjs.org/guide/en/#acorninjectplugins)
172
173 After adding `acorn-jsx` plugin, your Rollup config would look like the following, correctly preserving your JSX output.
174
175 ```js
176 import jsx from 'acorn-jsx';
177 import typescript from '@rollup/plugin-typescript';
178
179 export default {
180 // … other options …
181 acornInjectPlugins: [jsx()],
182 plugins: [typescript({ jsx: 'preserve' })],
183 };
184 ```
185
186 ### Faster compiling
187
188 Previous versions of this plugin used Typescript's `transpileModule` API, which is faster but does not perform typechecking and does not support cross-file features like `const enum`s and emit-less types. If you want this behaviour, you can use [@rollup/plugin-sucrase](https://github.com/rollup/plugins/tree/master/packages/sucrase) instead.
189
190 ## Meta
191
192 [CONTRIBUTING](/.github/CONTRIBUTING.md)
193
194 [LICENSE (MIT)](/LICENSE)
+0
-82
packages/typescript/package.json less more
0 {
1 "name": "@rollup/plugin-typescript",
2 "version": "6.0.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Seamless integration between Rollup and TypeScript.",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Oskar Segersvärd",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/typescript/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose --serial",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:json": "prettier --write **/tsconfig.json",
27 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
28 "prebuild": "del-cli dist",
29 "prepare": "pnpm run build",
30 "prepublishOnly": "pnpm run lint",
31 "pretest": "pnpm run build",
32 "test": "ava"
33 },
34 "files": [
35 "dist",
36 "types",
37 "README.md",
38 "LICENSE"
39 ],
40 "keywords": [
41 "rollup",
42 "plugin",
43 "typescript",
44 "es2015"
45 ],
46 "peerDependencies": {
47 "rollup": "^2.14.0",
48 "tslib": "*",
49 "typescript": ">=3.4.0"
50 },
51 "dependencies": {
52 "@rollup/pluginutils": "^3.1.0",
53 "resolve": "^1.17.0"
54 },
55 "devDependencies": {
56 "@rollup/plugin-buble": "^0.21.3",
57 "@rollup/plugin-commonjs": "^11.1.0",
58 "@rollup/plugin-typescript": "^5.0.2",
59 "buble": "^0.20.0",
60 "rollup": "^2.14.0"
61 },
62 "types": "types/index.d.ts",
63 "ava": {
64 "babel": {
65 "compileEnhancements": false
66 },
67 "extensions": [
68 "ts"
69 ],
70 "require": [
71 "ts-node/register"
72 ],
73 "files": [
74 "!**/fixtures/**",
75 "!**/output/**",
76 "!**/helpers/**",
77 "!**/recipes/**",
78 "!**/types.ts"
79 ]
80 }
81 }
+0
-15
packages/typescript/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import pkg from './package.json';
3
4 const external = Object.keys(pkg.dependencies).concat(['path', 'fs', 'typescript']);
5
6 export default {
7 input: 'src/index.ts',
8 plugins: [typescript({ sourceMap: false })],
9 external,
10 output: [
11 { format: 'cjs', file: pkg.main, exports: 'auto' },
12 { format: 'esm', file: pkg.module }
13 ]
14 };
+0
-54
packages/typescript/src/diagnostics/emit.ts less more
0 import { PluginContext } from 'rollup';
1
2 import { DiagnosticsHost } from './host';
3 import diagnosticToWarning from './toWarning';
4
5 // `Cannot compile modules into 'es6' when targeting 'ES5' or lower.`
6 const CANNOT_COMPILE_ESM = 1204;
7
8 /**
9 * Emit a Rollup warning or error for a Typescript type error.
10 */
11 export function emitDiagnostic(
12 ts: typeof import('typescript'),
13 context: PluginContext,
14 host: DiagnosticsHost,
15 diagnostic: import('typescript').Diagnostic
16 ) {
17 if (diagnostic.code === CANNOT_COMPILE_ESM) return;
18
19 const { noEmitOnError } = host.getCompilationSettings();
20
21 // Build a Rollup warning object from the diagnostics object.
22 const warning = diagnosticToWarning(ts, host, diagnostic);
23
24 // Errors are fatal. Otherwise emit warnings.
25 if (noEmitOnError && diagnostic.category === ts.DiagnosticCategory.Error) {
26 context.error(warning);
27 } else {
28 context.warn(warning);
29 }
30 }
31
32 export function buildDiagnosticReporter(
33 ts: typeof import('typescript'),
34 context: PluginContext,
35 host: DiagnosticsHost
36 ): import('typescript').DiagnosticReporter {
37 return function reportDiagnostics(diagnostic) {
38 emitDiagnostic(ts, context, host, diagnostic);
39 };
40 }
41
42 /**
43 * For each type error reported by Typescript, emit a Rollup warning or error.
44 */
45 export function emitDiagnostics(
46 ts: typeof import('typescript'),
47 context: PluginContext,
48 host: DiagnosticsHost,
49 diagnostics: readonly import('typescript').Diagnostic[] | undefined
50 ) {
51 if (!diagnostics) return;
52 diagnostics.forEach(buildDiagnosticReporter(ts, context, host));
53 }
+0
-38
packages/typescript/src/diagnostics/host.ts less more
0 type FormatDiagnosticsHost = import('typescript').FormatDiagnosticsHost;
1
2 export interface DiagnosticsHost extends FormatDiagnosticsHost {
3 getCompilationSettings(): import('typescript').CompilerOptions;
4 }
5
6 /**
7 * Create a format diagnostics host to use with the Typescript type checking APIs.
8 * Typescript hosts are used to represent the user's system,
9 * with an API for checking case sensitivity etc.
10 * @param compilerOptions Typescript compiler options. Affects functions such as `getNewLine`.
11 * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
12 */
13 export default function createFormattingHost(
14 ts: typeof import('typescript'),
15 compilerOptions: import('typescript').CompilerOptions
16 ): DiagnosticsHost {
17 return {
18 /** Returns the compiler options for the project. */
19 getCompilationSettings: () => compilerOptions,
20 /** Returns the current working directory. */
21 getCurrentDirectory: () => process.cwd(),
22 /** Returns the string that corresponds with the selected `NewLineKind`. */
23 getNewLine() {
24 switch (compilerOptions.newLine) {
25 case ts.NewLineKind.CarriageReturnLineFeed:
26 return '\r\n';
27 case ts.NewLineKind.LineFeed:
28 return '\n';
29 default:
30 return ts.sys.newLine;
31 }
32 },
33 /** Returns a lower case name on case insensitive systems, otherwise the original name. */
34 getCanonicalFileName: (fileName) =>
35 ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase()
36 };
37 }
+0
-45
packages/typescript/src/diagnostics/toWarning.ts less more
0 import { RollupLogProps } from 'rollup';
1
2 /**
3 * Converts a Typescript type error into an equivalent Rollup warning object.
4 */
5 export default function diagnosticToWarning(
6 ts: typeof import('typescript'),
7 host: import('typescript').FormatDiagnosticsHost | null,
8 diagnostic: import('typescript').Diagnostic
9 ) {
10 const pluginCode = `TS${diagnostic.code}`;
11 const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
12
13 // Build a Rollup warning object from the diagnostics object.
14 const warning: RollupLogProps = {
15 pluginCode,
16 message: `@rollup/plugin-typescript ${pluginCode}: ${message}`
17 };
18
19 if (diagnostic.file) {
20 // Add information about the file location
21 const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
22
23 warning.loc = {
24 column: character + 1,
25 line: line + 1,
26 file: diagnostic.file.fileName
27 };
28
29 if (host) {
30 // Extract a code frame from Typescript
31 const formatted = ts.formatDiagnosticsWithColorAndContext([diagnostic], host);
32 // Typescript only exposes this formatter as a string prefixed with the flattened message.
33 // We need to remove it here since Rollup treats the properties as separate parts.
34 let frame = formatted.slice(formatted.indexOf(message) + message.length);
35 const newLine = host.getNewLine();
36 if (frame.startsWith(newLine)) {
37 frame = frame.slice(frame.indexOf(newLine) + newLine.length);
38 }
39 warning.frame = frame;
40 }
41 }
42
43 return warning;
44 }
+0
-128
packages/typescript/src/index.ts less more
0 import * as path from 'path';
1
2 import { Plugin, SourceDescription } from 'rollup';
3
4 import { RollupTypescriptOptions } from '../types';
5
6 import createFormattingHost from './diagnostics/host';
7 import createModuleResolver from './moduleResolution';
8 import getPluginOptions from './options/plugin';
9 import { emitParsedOptionsErrors, parseTypescriptConfig } from './options/tsconfig';
10 import { validatePaths, validateSourceMap } from './options/validate';
11 import findTypescriptOutput from './outputFile';
12 import createWatchProgram, { WatchProgramHelper } from './watchProgram';
13
14 export default function typescript(options: RollupTypescriptOptions = {}): Plugin {
15 const { filter, tsconfig, compilerOptions, tslib, typescript: ts } = getPluginOptions(options);
16 const emittedFiles = new Map<string, string>();
17 const watchProgramHelper = new WatchProgramHelper();
18
19 const parsedOptions = parseTypescriptConfig(ts, tsconfig, compilerOptions);
20 parsedOptions.fileNames = parsedOptions.fileNames.filter(filter);
21
22 const formatHost = createFormattingHost(ts, parsedOptions.options);
23 const resolveModule = createModuleResolver(ts, formatHost);
24
25 let program: import('typescript').Watch<unknown> | null = null;
26
27 function normalizePath(fileName: string) {
28 return fileName.split(path.win32.sep).join(path.posix.sep);
29 }
30
31 return {
32 name: 'typescript',
33
34 buildStart() {
35 emitParsedOptionsErrors(ts, this, parsedOptions);
36
37 // Fixes a memory leak https://github.com/rollup/plugins/issues/322
38 if (!program) {
39 program = createWatchProgram(ts, this, {
40 formatHost,
41 resolveModule,
42 parsedOptions,
43 writeFile(fileName, data) {
44 emittedFiles.set(fileName, data);
45 },
46 status(diagnostic) {
47 watchProgramHelper.handleStatus(diagnostic);
48 }
49 });
50 }
51 },
52
53 watchChange(id) {
54 if (!filter(id)) return;
55
56 watchProgramHelper.watch();
57 },
58
59 buildEnd() {
60 if (this.meta.watchMode !== true) {
61 // ESLint doesn't understand optional chaining
62 // eslint-disable-next-line
63 program?.close();
64 }
65 },
66
67 renderStart(outputOptions) {
68 validateSourceMap(this, parsedOptions.options, outputOptions, parsedOptions.autoSetSourceMap);
69 validatePaths(ts, this, parsedOptions.options, outputOptions);
70 },
71
72 resolveId(importee, importer) {
73 if (importee === 'tslib') {
74 return tslib;
75 }
76
77 if (!importer) return null;
78
79 // Convert path from windows separators to posix separators
80 const containingFile = normalizePath(importer);
81
82 const resolved = resolveModule(importee, containingFile);
83
84 if (resolved) {
85 if (resolved.extension === '.d.ts') return null;
86 return resolved.resolvedFileName;
87 }
88
89 return null;
90 },
91
92 async load(id) {
93 if (!filter(id)) return null;
94
95 await watchProgramHelper.wait();
96
97 const output = findTypescriptOutput(ts, parsedOptions, id, emittedFiles);
98
99 return output.code != null ? (output as SourceDescription) : null;
100 },
101
102 generateBundle(outputOptions) {
103 parsedOptions.fileNames.forEach((fileName) => {
104 const output = findTypescriptOutput(ts, parsedOptions, fileName, emittedFiles);
105 output.declarations.forEach((id) => {
106 const code = emittedFiles.get(id);
107 if (!code) return;
108
109 this.emitFile({
110 type: 'asset',
111 fileName: normalizePath(path.relative(outputOptions.dir!, id)),
112 source: code
113 });
114 });
115 });
116
117 const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(parsedOptions.options);
118 if (tsBuildInfoPath) {
119 this.emitFile({
120 type: 'asset',
121 fileName: normalizePath(path.relative(outputOptions.dir!, tsBuildInfoPath)),
122 source: emittedFiles.get(tsBuildInfoPath)
123 });
124 }
125 }
126 };
127 }
+0
-38
packages/typescript/src/moduleResolution.ts less more
0 import { DiagnosticsHost } from './diagnostics/host';
1
2 type ModuleResolutionHost = import('typescript').ModuleResolutionHost;
3 type ModuleResolverHost = Partial<ModuleResolutionHost> & DiagnosticsHost;
4
5 export type Resolver = (
6 moduleName: string,
7 containingFile: string
8 ) => import('typescript').ResolvedModuleFull | undefined;
9
10 /**
11 * Create a helper for resolving modules using Typescript.
12 * @param host Typescript host that extends `ModuleResolutionHost`
13 * with methods for sanitizing filenames and getting compiler options.
14 */
15 export default function createModuleResolver(
16 ts: typeof import('typescript'),
17 host: ModuleResolverHost
18 ): Resolver {
19 const compilerOptions = host.getCompilationSettings();
20 const cache = ts.createModuleResolutionCache(
21 process.cwd(),
22 host.getCanonicalFileName,
23 compilerOptions
24 );
25 const moduleHost = { ...ts.sys, ...host };
26
27 return (moduleName, containingFile) => {
28 const resolved = ts.nodeModuleNameResolver(
29 moduleName,
30 containingFile,
31 compilerOptions,
32 moduleHost,
33 cache
34 );
35 return resolved.resolvedModule;
36 };
37 }
+0
-23
packages/typescript/src/options/interfaces.ts less more
0 import { PartialCompilerOptions } from '../../types';
1
2 export { EnumCompilerOptions, JsonCompilerOptions } from '../../types';
3 export { PartialCompilerOptions };
4
5 /** Typescript compiler options */
6 export type CompilerOptions = import('typescript').CompilerOptions;
7
8 export const DEFAULT_COMPILER_OPTIONS: PartialCompilerOptions = {
9 module: 'esnext',
10 skipLibCheck: true
11 };
12
13 export const FORCED_COMPILER_OPTIONS: Partial<CompilerOptions> = {
14 // Always use tslib
15 noEmitHelpers: true,
16 importHelpers: true,
17 // Typescript needs to emit the code for us to work with
18 noEmit: false,
19 emitDeclarationOnly: false,
20 // Preventing Typescript from resolving code may break compilation
21 noResolve: false
22 };
+0
-69
packages/typescript/src/options/normalize.ts less more
0 /* eslint-disable no-param-reassign */
1 import { resolve } from 'path';
2
3 import { CompilerOptions, PartialCompilerOptions } from './interfaces';
4
5 export const DIRECTORY_PROPS = ['outDir', 'declarationDir'] as const;
6
7 /**
8 * Mutates the compiler options to convert paths from relative to absolute.
9 * This should be used with compiler options passed through the Rollup plugin options,
10 * not those found from loading a tsconfig.json file.
11 * @param compilerOptions Compiler options to _mutate_.
12 * @param relativeTo Paths are resolved relative to this path.
13 */
14 export function makePathsAbsolute(compilerOptions: PartialCompilerOptions, relativeTo: string) {
15 for (const pathProp of DIRECTORY_PROPS) {
16 if (compilerOptions[pathProp]) {
17 compilerOptions[pathProp] = resolve(relativeTo, compilerOptions[pathProp] as string);
18 }
19 }
20 }
21
22 /**
23 * Mutates the compiler options to normalize some values for Rollup.
24 * @param compilerOptions Compiler options to _mutate_.
25 * @returns True if the source map compiler option was not initially set.
26 */
27 export function normalizeCompilerOptions(
28 ts: typeof import('typescript'),
29 compilerOptions: CompilerOptions
30 ) {
31 let autoSetSourceMap = false;
32 if (compilerOptions.inlineSourceMap) {
33 // Force separate source map files for Rollup to work with.
34 compilerOptions.sourceMap = true;
35 compilerOptions.inlineSourceMap = false;
36 } else if (typeof compilerOptions.sourceMap !== 'boolean') {
37 // Default to using source maps.
38 // If the plugin user sets sourceMap to false we keep that option.
39 compilerOptions.sourceMap = true;
40 // Using inlineSources to make sure typescript generate source content
41 // instead of source path.
42 compilerOptions.inlineSources = true;
43 autoSetSourceMap = true;
44 }
45
46 switch (compilerOptions.module) {
47 case ts.ModuleKind.ES2015:
48 case ts.ModuleKind.ESNext:
49 case ts.ModuleKind.CommonJS:
50 // OK module type
51 return autoSetSourceMap;
52 case ts.ModuleKind.None:
53 case ts.ModuleKind.AMD:
54 case ts.ModuleKind.UMD:
55 case ts.ModuleKind.System: {
56 // Invalid module type
57 const moduleType = ts.ModuleKind[compilerOptions.module];
58 throw new Error(
59 `@rollup/plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '${moduleType}'`
60 );
61 }
62 default:
63 // Unknown or unspecified module type, force ESNext
64 compilerOptions.module = ts.ModuleKind.ESNext;
65 }
66
67 return autoSetSourceMap;
68 }
+0
-29
packages/typescript/src/options/plugin.ts less more
0 import { createFilter } from '@rollup/pluginutils';
1 import * as defaultTs from 'typescript';
2
3 import { RollupTypescriptOptions, PartialCompilerOptions } from '../../types';
4 import getTsLibPath from '../tslib';
5
6 /**
7 * Separate the Rollup plugin options from the Typescript compiler options,
8 * and normalize the Rollup options.
9 * @returns Object with normalized options:
10 * - `filter`: Checks if a file should be included.
11 * - `tsconfig`: Path to a tsconfig, or directive to ignore tsconfig.
12 * - `compilerOptions`: Custom Typescript compiler options that override tsconfig.
13 * - `typescript`: Instance of Typescript library (possibly custom).
14 * - `tslib`: ESM code from the tslib helper library (possibly custom).
15 */
16 export default function getPluginOptions(options: RollupTypescriptOptions) {
17 const { include, exclude, tsconfig, typescript, tslib, ...compilerOptions } = options;
18
19 const filter = createFilter(include || ['*.ts+(|x)', '**/*.ts+(|x)'], exclude);
20
21 return {
22 filter,
23 tsconfig,
24 compilerOptions: compilerOptions as PartialCompilerOptions,
25 typescript: typescript || defaultTs,
26 tslib: tslib || getTsLibPath()
27 };
28 }
+0
-166
packages/typescript/src/options/tsconfig.ts less more
0 import { readFileSync } from 'fs';
1 import { dirname, resolve } from 'path';
2
3 import { PluginContext } from 'rollup';
4
5 import { RollupTypescriptOptions } from '../../types';
6 import diagnosticToWarning from '../diagnostics/toWarning';
7
8 import {
9 CompilerOptions,
10 DEFAULT_COMPILER_OPTIONS,
11 EnumCompilerOptions,
12 FORCED_COMPILER_OPTIONS,
13 PartialCompilerOptions
14 } from './interfaces';
15 import { normalizeCompilerOptions, makePathsAbsolute } from './normalize';
16
17 /**
18 * Finds the path to the tsconfig file relative to the current working directory.
19 * @param relativePath Relative tsconfig path given by the user.
20 * If `false` is passed, then a null path is returned.
21 * @returns The absolute path, or null if the file does not exist.
22 */
23 function getTsConfigPath(ts: typeof import('typescript'), relativePath?: string | false) {
24 if (relativePath === false) return null;
25
26 // Resolve path to file. `tsConfigOption` defaults to 'tsconfig.json'.
27 const tsConfigPath = resolve(process.cwd(), relativePath || 'tsconfig.json');
28
29 if (!ts.sys.fileExists(tsConfigPath)) {
30 if (relativePath) {
31 // If an explicit path was provided but no file was found, throw
32 throw new Error(`Could not find specified tsconfig.json at ${tsConfigPath}`);
33 } else {
34 return null;
35 }
36 }
37
38 return tsConfigPath;
39 }
40
41 /**
42 * Tries to read the tsconfig file at `tsConfigPath`.
43 * @param tsConfigPath Absolute path to tsconfig JSON file.
44 * @param explicitPath If true, the path was set by the plugin user.
45 * If false, the path was computed automatically.
46 */
47 function readTsConfigFile(ts: typeof import('typescript'), tsConfigPath: string) {
48 const { config, error } = ts.readConfigFile(tsConfigPath, (path) => readFileSync(path, 'utf8'));
49 if (error) {
50 throw Object.assign(Error(), diagnosticToWarning(ts, null, error));
51 }
52
53 return config || {};
54 }
55
56 /**
57 * Returns true if any of the `compilerOptions` contain an enum value (i.e.: ts.ScriptKind) rather than a string.
58 * This indicates that the internal CompilerOptions type is used rather than the JsonCompilerOptions.
59 */
60 function containsEnumOptions(
61 compilerOptions: PartialCompilerOptions
62 ): compilerOptions is Partial<CompilerOptions> {
63 const enums: Array<EnumCompilerOptions> = [
64 'module',
65 'target',
66 'jsx',
67 'moduleResolution',
68 'newLine'
69 ];
70 return enums.some((prop) => prop in compilerOptions && typeof compilerOptions[prop] === 'number');
71 }
72
73 const configCache = new Map() as import('typescript').Map<
74 import('typescript').ExtendedConfigCacheEntry
75 >;
76
77 /**
78 * Parse the Typescript config to use with the plugin.
79 * @param ts Typescript library instance.
80 * @param tsconfig Path to the tsconfig file, or `false` to ignore the file.
81 * @param compilerOptions Options passed to the plugin directly for Typescript.
82 *
83 * @returns Parsed tsconfig.json file with some important properties:
84 * - `options`: Parsed compiler options.
85 * - `fileNames` Type definition files that should be included in the build.
86 * - `errors`: Any errors from parsing the config file.
87 */
88 export function parseTypescriptConfig(
89 ts: typeof import('typescript'),
90 tsconfig: RollupTypescriptOptions['tsconfig'],
91 compilerOptions: PartialCompilerOptions
92 ) {
93 /* eslint-disable no-undefined */
94 const cwd = process.cwd();
95 makePathsAbsolute(compilerOptions, cwd);
96 let parsedConfig: import('typescript').ParsedCommandLine;
97
98 // Resolve path to file. If file is not found, pass undefined path to `parseJsonConfigFileContent`.
99 // eslint-disable-next-line no-undefined
100 const tsConfigPath = getTsConfigPath(ts, tsconfig) || undefined;
101 const tsConfigFile = tsConfigPath ? readTsConfigFile(ts, tsConfigPath) : {};
102 const basePath = tsConfigPath ? dirname(tsConfigPath) : cwd;
103
104 // If compilerOptions has enums, it represents an CompilerOptions object instead of parsed JSON.
105 // This determines where the data is passed to the parser.
106 if (containsEnumOptions(compilerOptions)) {
107 parsedConfig = ts.parseJsonConfigFileContent(
108 {
109 ...tsConfigFile,
110 compilerOptions: {
111 ...DEFAULT_COMPILER_OPTIONS,
112 ...tsConfigFile.compilerOptions
113 }
114 },
115 ts.sys,
116 basePath,
117 { ...compilerOptions, ...FORCED_COMPILER_OPTIONS },
118 tsConfigPath,
119 undefined,
120 undefined,
121 configCache
122 );
123 } else {
124 parsedConfig = ts.parseJsonConfigFileContent(
125 {
126 ...tsConfigFile,
127 compilerOptions: {
128 ...DEFAULT_COMPILER_OPTIONS,
129 ...tsConfigFile.compilerOptions,
130 ...compilerOptions
131 }
132 },
133 ts.sys,
134 basePath,
135 FORCED_COMPILER_OPTIONS,
136 tsConfigPath,
137 undefined,
138 undefined,
139 configCache
140 );
141 }
142
143 const autoSetSourceMap = normalizeCompilerOptions(ts, parsedConfig.options);
144
145 return {
146 ...parsedConfig,
147 autoSetSourceMap
148 };
149 }
150
151 /**
152 * If errors are detected in the parsed options,
153 * display all of them as warnings then emit an error.
154 */
155 export function emitParsedOptionsErrors(
156 ts: typeof import('typescript'),
157 context: PluginContext,
158 parsedOptions: import('typescript').ParsedCommandLine
159 ) {
160 if (parsedOptions.errors.length > 0) {
161 parsedOptions.errors.forEach((error) => context.warn(diagnosticToWarning(ts, null, error)));
162
163 context.error(`@rollup/plugin-typescript: Couldn't process compiler options`);
164 }
165 }
+0
-93
packages/typescript/src/options/validate.ts less more
0 import { relative } from 'path';
1
2 import { OutputOptions, PluginContext } from 'rollup';
3
4 import { CompilerOptions } from './interfaces';
5 import { DIRECTORY_PROPS } from './normalize';
6
7 /**
8 * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`.
9 * @param context Rollup plugin context used to emit warnings.
10 * @param compilerOptions Typescript compiler options.
11 * @param outputOptions Rollup output options.
12 * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true`
13 * by the plugin, not the user.
14 */
15 export function validateSourceMap(
16 context: PluginContext,
17 compilerOptions: CompilerOptions,
18 outputOptions: OutputOptions,
19 autoSetSourceMap: boolean
20 ) {
21 if (compilerOptions.sourceMap && !outputOptions.sourcemap && !autoSetSourceMap) {
22 context.warn(
23 `@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`
24 );
25 } else if (!compilerOptions.sourceMap && outputOptions.sourcemap) {
26 context.warn(
27 `@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`
28 );
29 }
30 }
31
32 /**
33 * Validate that the out directory used by Typescript can be controlled by Rollup.
34 * @param context Rollup plugin context used to emit errors.
35 * @param compilerOptions Typescript compiler options.
36 * @param outputOptions Rollup output options.
37 */
38 export function validatePaths(
39 ts: typeof import('typescript'),
40 context: PluginContext,
41 compilerOptions: CompilerOptions,
42 outputOptions: OutputOptions
43 ) {
44 if (compilerOptions.out) {
45 context.error(
46 `@rollup/plugin-typescript: Deprecated 'out' option is not supported. Use 'outDir' instead.`
47 );
48 } else if (compilerOptions.outFile) {
49 context.error(
50 `@rollup/plugin-typescript: 'outFile' option is not supported. Use 'outDir' instead.`
51 );
52 }
53
54 for (const dirProperty of DIRECTORY_PROPS) {
55 if (compilerOptions[dirProperty]) {
56 if (!outputOptions.dir) {
57 context.error(
58 `@rollup/plugin-typescript: 'dir' must be used when '${dirProperty}' is specified.`
59 );
60 }
61
62 // Checks if the given path lies within Rollup output dir
63 const fromRollupDirToTs = relative(outputOptions.dir, compilerOptions[dirProperty]!);
64 if (fromRollupDirToTs.startsWith('..')) {
65 context.error(`@rollup/plugin-typescript: '${dirProperty}' must be located inside 'dir'.`);
66 }
67 }
68 }
69
70 const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
71 if (tsBuildInfoPath && compilerOptions.incremental) {
72 if (!outputOptions.dir) {
73 context.error(
74 `@rollup/plugin-typescript: 'dir' must be used when 'tsBuildInfoFile' or 'incremental' are specified.`
75 );
76 }
77
78 // Checks if the given path lies within Rollup output dir
79 const fromRollupDirToTs = relative(outputOptions.dir, tsBuildInfoPath);
80 if (fromRollupDirToTs.startsWith('..')) {
81 context.error(`@rollup/plugin-typescript: 'tsBuildInfoFile' must be located inside 'dir'.`);
82 }
83 }
84
85 if (compilerOptions.declaration || compilerOptions.declarationMap) {
86 if (DIRECTORY_PROPS.every((dirProperty) => !compilerOptions[dirProperty])) {
87 context.error(
88 `@rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.`
89 );
90 }
91 }
92 }
+0
-47
packages/typescript/src/outputFile.ts less more
0 import { SourceDescription } from 'rollup';
1
2 export interface TypescriptSourceDescription extends Partial<SourceDescription> {
3 declarations: string[];
4 }
5
6 /**
7 * Checks if the given OutputFile represents some code
8 */
9 function isCodeOutputFile(name: string): boolean {
10 return !isMapOutputFile(name) && !name.endsWith('.d.ts');
11 }
12
13 /**
14 * Checks if the given OutputFile represents some source map
15 */
16 function isMapOutputFile(name: string): boolean {
17 return name.endsWith('.map');
18 }
19
20 /**
21 * Finds the corresponding emitted Javascript files for a given Typescript file.
22 * @param id Path to the Typescript file.
23 * @param emittedFiles Map of file names to source code,
24 * containing files emitted by the Typescript compiler.
25 */
26 export default function findTypescriptOutput(
27 ts: typeof import('typescript'),
28 parsedOptions: import('typescript').ParsedCommandLine,
29 id: string,
30 emittedFiles: ReadonlyMap<string, string>
31 ): TypescriptSourceDescription {
32 const emittedFileNames = ts.getOutputFileNames(
33 parsedOptions,
34 id,
35 !ts.sys.useCaseSensitiveFileNames
36 );
37
38 const codeFile = emittedFileNames.find(isCodeOutputFile);
39 const mapFile = emittedFileNames.find(isMapOutputFile);
40
41 return {
42 code: emittedFiles.get(codeFile!),
43 map: emittedFiles.get(mapFile!),
44 declarations: emittedFileNames.filter((name) => name !== codeFile && name !== mapFile)
45 };
46 }
+0
-13
packages/typescript/src/tslib.ts less more
0 import resolveId, { AsyncOpts } from 'resolve';
1
2 const resolveIdAsync = (file: string, opts: AsyncOpts) =>
3 new Promise<string>((fulfil, reject) =>
4 resolveId(file, opts, (err, contents) => (err ? reject(err) : fulfil(contents)))
5 );
6
7 /**
8 * Returns code asynchronously for the tslib helper library.
9 */
10 export default function getTsLibPath() {
11 return resolveIdAsync('tslib/tslib.es6.js', { basedir: __dirname });
12 }
+0
-160
packages/typescript/src/watchProgram.ts less more
0 import { PluginContext } from 'rollup';
1
2 import { DiagnosticCategory } from 'typescript';
3
4 import { buildDiagnosticReporter } from './diagnostics/emit';
5 import { DiagnosticsHost } from './diagnostics/host';
6 import { Resolver } from './moduleResolution';
7
8 type BuilderProgram = import('typescript').EmitAndSemanticDiagnosticsBuilderProgram;
9
10 // @see https://github.com/microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json
11 enum DiagnosticCode {
12 FILE_CHANGE_DETECTED = 6032,
13 FOUND_1_ERROR_WATCHING_FOR_FILE_CHANGES = 6193,
14 FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES = 6194
15 }
16
17 interface CreateProgramOptions {
18 /** Formatting host used to get some system functions and emit type errors. */
19 formatHost: DiagnosticsHost;
20 /** Parsed Typescript compiler options. */
21 parsedOptions: import('typescript').ParsedCommandLine;
22 /** Callback to save compiled files in memory. */
23 writeFile: import('typescript').WriteFileCallback;
24 /** Callback for the Typescript status reporter. */
25 status: import('typescript').WatchStatusReporter;
26 /** Function to resolve a module location */
27 resolveModule: Resolver;
28 }
29
30 type DeferredResolve = ((value?: boolean) => void) | (() => void);
31
32 interface Deferred {
33 promise: Promise<boolean | void>;
34 resolve: DeferredResolve;
35 }
36
37 function createDeferred(timeout?: number): Deferred {
38 let promise: Promise<boolean | void>;
39 let resolve: DeferredResolve = () => {};
40
41 if (timeout) {
42 promise = Promise.race<Promise<boolean>>([
43 new Promise((r) => setTimeout(r, timeout, true)),
44 new Promise((r) => (resolve = r))
45 ]);
46 } else {
47 promise = new Promise((r) => (resolve = r));
48 }
49
50 return { promise, resolve };
51 }
52
53 /**
54 * Typescript watch program helper to sync Typescript watch status with Rollup hooks.
55 */
56 export class WatchProgramHelper {
57 private _startDeferred: Deferred | null = null;
58 private _finishDeferred: Deferred | null = null;
59
60 watch(timeout = 1000) {
61 // Race watcher start promise against a timeout in case Typescript and Rollup change detection is not in sync.
62 this._startDeferred = createDeferred(timeout);
63 this._finishDeferred = createDeferred();
64 }
65
66 handleStatus(diagnostic: import('typescript').Diagnostic) {
67 // Fullfil deferred promises by Typescript diagnostic message codes.
68 if (diagnostic.category === DiagnosticCategory.Message) {
69 switch (diagnostic.code) {
70 case DiagnosticCode.FILE_CHANGE_DETECTED:
71 this.resolveStart();
72 break;
73
74 case DiagnosticCode.FOUND_1_ERROR_WATCHING_FOR_FILE_CHANGES:
75 case DiagnosticCode.FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES:
76 this.resolveFinish();
77 break;
78
79 default:
80 }
81 }
82 }
83
84 resolveStart() {
85 if (this._startDeferred) {
86 this._startDeferred.resolve(false);
87 this._startDeferred = null;
88 }
89 }
90
91 resolveFinish() {
92 if (this._finishDeferred) {
93 this._finishDeferred.resolve();
94 this._finishDeferred = null;
95 }
96 }
97
98 async wait() {
99 if (this._startDeferred) {
100 const timeout = await this._startDeferred.promise;
101
102 // If there is no file change detected by Typescript skip deferred promises.
103 if (timeout) {
104 this._startDeferred = null;
105 this._finishDeferred = null;
106 }
107
108 await this._finishDeferred?.promise;
109 }
110 }
111 }
112
113 /**
114 * Create a language service host to use with the Typescript compiler & type checking APIs.
115 * Typescript hosts are used to represent the user's system,
116 * with an API for reading files, checking directories and case sensitivity etc.
117 * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
118 */
119 function createWatchHost(
120 ts: typeof import('typescript'),
121 context: PluginContext,
122 { formatHost, parsedOptions, writeFile, status, resolveModule }: CreateProgramOptions
123 ): import('typescript').WatchCompilerHostOfFilesAndCompilerOptions<BuilderProgram> {
124 const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram;
125
126 const baseHost = ts.createWatchCompilerHost(
127 parsedOptions.fileNames,
128 parsedOptions.options,
129 ts.sys,
130 createProgram,
131 buildDiagnosticReporter(ts, context, formatHost),
132 status,
133 parsedOptions.projectReferences
134 );
135
136 return {
137 ...baseHost,
138 /** Override the created program so an in-memory emit is used */
139 afterProgramCreate(program) {
140 const origEmit = program.emit;
141 // eslint-disable-next-line no-param-reassign
142 program.emit = (targetSourceFile, _, ...args) =>
143 origEmit(targetSourceFile, writeFile, ...args);
144 return baseHost.afterProgramCreate!(program);
145 },
146 /** Add helper to deal with module resolution */
147 resolveModuleNames(moduleNames, containingFile) {
148 return moduleNames.map((moduleName) => resolveModule(moduleName, containingFile));
149 }
150 };
151 }
152
153 export default function createWatchProgram(
154 ts: typeof import('typescript'),
155 context: PluginContext,
156 options: CreateProgramOptions
157 ) {
158 return ts.createWatchProgram(createWatchHost(ts, context, options));
159 }
+0
-7
packages/typescript/test/fixtures/assign/main.ts less more
0 const others = {
1 b: 2,
2 c: 1,
3 d: 3
4 };
5
6 export default { a: 5, ...others, c: 3 };
+0
-11
packages/typescript/test/fixtures/async/main.ts less more
0 /* eslint-disable */
1
2 export default async function(n: number) {
3 while (--n) {
4 await delay(10);
5 }
6 }
7
8 function delay(interval: number) {
9 return new Promise((resolve) => setTimeout(resolve, interval));
10 }
+0
-1
packages/typescript/test/fixtures/async/tsconfig.json less more
0 {}
+0
-3
packages/typescript/test/fixtures/basic/main.ts less more
0 const answer = 42;
1 // eslint-disable-next-line no-console
2 console.log(`the answer is ${answer}`);
+0
-1
packages/typescript/test/fixtures/basic/tsconfig.json less more
0 {}
+0
-1
packages/typescript/test/fixtures/commonjs-imports/cjs.js less more
0 module.exports = 'exported from commonjs';
+0
-3
packages/typescript/test/fixtures/commonjs-imports/main.ts less more
0 import cjs = require('./cjs');
1
2 export default cjs;
+0
-1
packages/typescript/test/fixtures/commonjs-imports/tsconfig.json less more
0 {}
+0
-3
packages/typescript/test/fixtures/declaration-root-dir/src/main.ts less more
0 const answer = 42;
1 // eslint-disable-next-line no-console
2 console.log(`the answer is ${answer}`);
+0
-7
packages/typescript/test/fixtures/declaration-root-dir/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "declaration": true,
3 "outDir": "lib",
4 "rootDir": "src"
5 }
6 }
+0
-3
packages/typescript/test/fixtures/dedup-helpers/A.ts less more
0 import Base from './Base';
1 // eslint-disable-next-line import/prefer-default-export
2 export class A extends Base {}
+0
-3
packages/typescript/test/fixtures/dedup-helpers/B.ts less more
0 import Base from './Base';
1 // eslint-disable-next-line import/prefer-default-export
2 export class B extends Base {}
+0
-1
packages/typescript/test/fixtures/dedup-helpers/Base.ts less more
0 export default class Base {}
+0
-2
packages/typescript/test/fixtures/dedup-helpers/main.ts less more
0 export { A } from './A';
1 export { B } from './B';
+0
-1
packages/typescript/test/fixtures/dedup-helpers/tsconfig.json less more
0 {}
+0
-2
packages/typescript/test/fixtures/dom/main.ts less more
0 // eslint-disable-next-line no-undef
1 navigator.clipboard.readText();
+0
-5
packages/typescript/test/fixtures/dom/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "lib": ["dom"]
3 }
4 }
+0
-5
packages/typescript/test/fixtures/dts/main.ts less more
0 /* eslint-disable */
1 // @ts-ignore
2 import { foo } from 'an-import';
3
4 foo();
+0
-1
packages/typescript/test/fixtures/dts/tsconfig.json less more
0 {}
+0
-3
packages/typescript/test/fixtures/dynamic-imports/dynamic.ts less more
0 // eslint-disable-next-line no-console
1 console.log('dynamic');
2 export default 42;
+0
-1
packages/typescript/test/fixtures/dynamic-imports/main.ts less more
0 export default import('./dynamic');
+0
-1
packages/typescript/test/fixtures/dynamic-imports/tsconfig.json less more
0 {}
+0
-2
packages/typescript/test/fixtures/export-abstract-class/main.ts less more
0 // eslint-disable-next-line import/prefer-default-export
1 export abstract class A {}
+0
-1
packages/typescript/test/fixtures/export-abstract-class/tsconfig.json less more
0 {}
+0
-4
packages/typescript/test/fixtures/export-class/Foo.ts less more
0 // eslint-disable-next-line import/prefer-default-export
1 export class Foo {
2 foo = 'bar';
3 }
+0
-3
packages/typescript/test/fixtures/export-class/main.ts less more
0 import { Foo } from './Foo';
1
2 export default new Foo();
+0
-2
packages/typescript/test/fixtures/export-class-fix/default.ts less more
0 // the odd spacing is intentional
1 export default class A {}
+0
-4
packages/typescript/test/fixtures/export-class-fix/main.ts less more
0 import A from './default';
1 import { B } from './named';
2
3 export { A, B };
+0
-3
packages/typescript/test/fixtures/export-class-fix/named.ts less more
0 /* eslint-disable */
1 // the odd spacing is intentional
2 export class B {}
+0
-1
packages/typescript/test/fixtures/export-class-fix/tsconfig.json less more
0 {}
+0
-8
packages/typescript/test/fixtures/export-fodule/main.ts less more
0 /* eslint-disable no-redeclare,import/export */
1
2 export function test() {
3 return 0;
4 }
5 export namespace test {
6 export const foo = '2';
7 }
+0
-1
packages/typescript/test/fixtures/export-interface-only/interface.ts less more
0 export interface ITest {}
+0
-8
packages/typescript/test/fixtures/export-interface-only/main.ts less more
0 import { ITest } from './interface';
1
2 // eslint-disable-next-line import/prefer-default-export
3 export { ITest };
4
5 const answer = 42;
6 // eslint-disable-next-line no-console
7 console.log(`the answer is ${answer}`);
+0
-1
packages/typescript/test/fixtures/export-interface-only/tsconfig.json less more
0 {}
+0
-7
packages/typescript/test/fixtures/export-namespace-export-class/test.ts less more
0 // https://github.com/rollup/rollup-plugin-typescript/issues/70#issuecomment-336216349
1
2 // test.ts
3 export namespace MODE {
4 // eslint-disable-next-line no-shadow
5 export class MODE {}
6 }
+0
-1
packages/typescript/test/fixtures/export-namespace-export-class/tsconfig.json less more
0 {}
+0
-9
packages/typescript/test/fixtures/import-class/A.ts less more
0 class A {
1 getArgs: () => any[];
2
3 constructor(...args: any[]) {
4 this.getArgs = () => args;
5 }
6 }
7
8 export default A;
+0
-4
packages/typescript/test/fixtures/import-class/main.ts less more
0 import A from './A';
1
2 // eslint-disable-next-line no-new
3 new A();
+0
-1
packages/typescript/test/fixtures/import-class/tsconfig.json less more
0 {}
+0
-1920
packages/typescript/test/fixtures/incremental/dist/.tsbuildinfo less more
0 {
1 "program": {
2 "fileInfos": {
3 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.d.ts": {
4 "version": "49ff9798f592c8b7e628fd881401e68810c1b3589ecd7a41b32b3c287374cde0",
5 "signature": "49ff9798f592c8b7e628fd881401e68810c1b3589ecd7a41b32b3c287374cde0"
6 },
7 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es5.d.ts": {
8 "version": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea",
9 "signature": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea"
10 },
11 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.d.ts": {
12 "version": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96",
13 "signature": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96"
14 },
15 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.d.ts": {
16 "version": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1",
17 "signature": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1"
18 },
19 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.d.ts": {
20 "version": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743",
21 "signature": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743"
22 },
23 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.d.ts": {
24 "version": "9c67dcc7ca897b61f58d57d487bc9f07950546e5ac8701cbc41a8a4fec48b091",
25 "signature": "9c67dcc7ca897b61f58d57d487bc9f07950546e5ac8701cbc41a8a4fec48b091"
26 },
27 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.dom.d.ts": {
28 "version": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de",
29 "signature": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de"
30 },
31 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.webworker.importscripts.d.ts": {
32 "version": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b",
33 "signature": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b"
34 },
35 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.scripthost.d.ts": {
36 "version": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9",
37 "signature": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9"
38 },
39 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.core.d.ts": {
40 "version": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6",
41 "signature": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6"
42 },
43 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.collection.d.ts": {
44 "version": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8",
45 "signature": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8"
46 },
47 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.generator.d.ts": {
48 "version": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122",
49 "signature": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122"
50 },
51 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts": {
52 "version": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210",
53 "signature": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210"
54 },
55 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.promise.d.ts": {
56 "version": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca",
57 "signature": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca"
58 },
59 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts": {
60 "version": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe",
61 "signature": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe"
62 },
63 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts": {
64 "version": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976",
65 "signature": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976"
66 },
67 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts": {
68 "version": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230",
69 "signature": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230"
70 },
71 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": {
72 "version": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303",
73 "signature": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303"
74 },
75 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts": {
76 "version": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0",
77 "signature": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0"
78 },
79 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.object.d.ts": {
80 "version": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408",
81 "signature": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408"
82 },
83 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": {
84 "version": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f",
85 "signature": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f"
86 },
87 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.string.d.ts": {
88 "version": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c",
89 "signature": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c"
90 },
91 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.intl.d.ts": {
92 "version": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6",
93 "signature": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6"
94 },
95 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": {
96 "version": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46",
97 "signature": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46"
98 },
99 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": {
100 "version": "2958de3d25bfb0b5cdace0244e11c9637e5988920b99024db705a720ce6348e7",
101 "signature": "2958de3d25bfb0b5cdace0244e11c9637e5988920b99024db705a720ce6348e7"
102 },
103 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": {
104 "version": "85085a0783532dc04b66894748dc4a49983b2fbccb0679b81356947021d7a215",
105 "signature": "85085a0783532dc04b66894748dc4a49983b2fbccb0679b81356947021d7a215"
106 },
107 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.intl.d.ts": {
108 "version": "5494f46d3a8a0329d13ddc37f8759d5288760febb51c92336608d1c06bb18d29",
109 "signature": "5494f46d3a8a0329d13ddc37f8759d5288760febb51c92336608d1c06bb18d29"
110 },
111 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.promise.d.ts": {
112 "version": "efe049114bad1035b0aa9a4a0359f50ab776e3897c411521e51d3013079cbd62",
113 "signature": "efe049114bad1035b0aa9a4a0359f50ab776e3897c411521e51d3013079cbd62"
114 },
115 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts": {
116 "version": "e7780d04cd4120ee554c665829db2bbdd6b947cbaa3c150b7d9ea74df3beb2e8",
117 "signature": "e7780d04cd4120ee554c665829db2bbdd6b947cbaa3c150b7d9ea74df3beb2e8"
118 },
119 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.intl.d.ts": {
120 "version": "1377923021927244ea19433873b997ad8585533b0a56d5de29cda497f7842756",
121 "signature": "1377923021927244ea19433873b997ad8585533b0a56d5de29cda497f7842756"
122 },
123 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.bigint.d.ts": {
124 "version": "0c9ea8c2028047f39a3f66752682604f543c08be8806258c3d95c93e75a43255",
125 "signature": "0c9ea8c2028047f39a3f66752682604f543c08be8806258c3d95c93e75a43255"
126 },
127 "../main.ts": {
128 "version": "406e932c3dd028fa9fad193b8d579254376be01386235d148aaaa0fa79365819",
129 "signature": "d0b4becdfcf36173c1bdf42bc6ec576b96be0482fe88a709d4789ecff6aa7b28"
130 },
131 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts": {
132 "version": "cfb42d1c8aa66607ef3b1e2cee85d28148358ba62dc5e5146b317dae7bfd9a96",
133 "signature": "cfb42d1c8aa66607ef3b1e2cee85d28148358ba62dc5e5146b317dae7bfd9a96"
134 },
135 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts": {
136 "version": "df66dd87e5338e59ca0550af424ba22c59a8f4b30b20a214b6ed250562b7c755",
137 "signature": "df66dd87e5338e59ca0550af424ba22c59a8f4b30b20a214b6ed250562b7c755"
138 },
139 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/buble/0.19.2/node_modules/@types/buble/index.d.ts": {
140 "version": "bf6148950ca5307411c2ae98561f3b845c8cd31c330e731a6822bf52ff757bf6",
141 "signature": "bf6148950ca5307411c2ae98561f3b845c8cd31c330e731a6822bf52ff757bf6"
142 },
143 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/color-name/1.1.1/node_modules/@types/color-name/index.d.ts": {
144 "version": "f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e",
145 "signature": "f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e"
146 },
147 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/eslint-visitor-keys/1.0.0/node_modules/@types/eslint-visitor-keys/index.d.ts": {
148 "version": "725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c",
149 "signature": "725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c"
150 },
151 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/estree/0.0.39/node_modules/@types/estree/index.d.ts": {
152 "version": "89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",
153 "signature": "89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b"
154 },
155 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/events/3.0.0/node_modules/@types/events/index.d.ts": {
156 "version": "400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935",
157 "signature": "400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935"
158 },
159 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts": {
160 "version": "05c42320698cb6eb4052d68ef35a0f3b88291b9275f13e9a188b96119844c5b6",
161 "signature": "05c42320698cb6eb4052d68ef35a0f3b88291b9275f13e9a188b96119844c5b6"
162 },
163 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts": {
164 "version": "7860312f33f0cf2c93500787d02c4cc43ea3d0c080d4781095ac7715d5da3316",
165 "signature": "7860312f33f0cf2c93500787d02c4cc43ea3d0c080d4781095ac7715d5da3316"
166 },
167 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts": {
168 "version": "1305b079a057355f496bdde048716189178877a6b4fe0e9267a46af67f8c7561",
169 "signature": "1305b079a057355f496bdde048716189178877a6b4fe0e9267a46af67f8c7561"
170 },
171 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts": {
172 "version": "61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878",
173 "signature": "61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878"
174 },
175 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts": {
176 "version": "4c50c12d023c7ba3b08aed969b723594bf74e5c5a6c80b421d8664bf22c3c072",
177 "signature": "4c50c12d023c7ba3b08aed969b723594bf74e5c5a6c80b421d8664bf22c3c072"
178 },
179 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts": {
180 "version": "ce629710e5e58724902b753212e97861fd73e2aa09f5d88cb6d55dc763cf8c8a",
181 "signature": "ce629710e5e58724902b753212e97861fd73e2aa09f5d88cb6d55dc763cf8c8a"
182 },
183 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts": {
184 "version": "525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d",
185 "signature": "525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d"
186 },
187 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts": {
188 "version": "0279383034fae92db8097d0a41350293553599cc9c3c917b60e2542d0dfcbd44",
189 "signature": "0279383034fae92db8097d0a41350293553599cc9c3c917b60e2542d0dfcbd44"
190 },
191 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts": {
192 "version": "3b6e751fc790e939efc4352e950b59be8c8e23c6e2bca2cf7359788b53f70485",
193 "signature": "3b6e751fc790e939efc4352e950b59be8c8e23c6e2bca2cf7359788b53f70485"
194 },
195 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts": {
196 "version": "387656ed4d6444031a0042c38701167e77ff5f4698ada32737082fbee76b1db0",
197 "signature": "387656ed4d6444031a0042c38701167e77ff5f4698ada32737082fbee76b1db0"
198 },
199 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts": {
200 "version": "ef226a42de7022eacdfa0f15aabf73b46c47af93044c8ebfab8aa8e3cf6c330c",
201 "signature": "ef226a42de7022eacdfa0f15aabf73b46c47af93044c8ebfab8aa8e3cf6c330c"
202 },
203 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts": {
204 "version": "d5b7c8819ce1bd31a45f7675309e145ec28e3aa1b60a8e0637fd0e8916255baa",
205 "signature": "d5b7c8819ce1bd31a45f7675309e145ec28e3aa1b60a8e0637fd0e8916255baa"
206 },
207 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts": {
208 "version": "3ad728027671c2c3c829e21803f8d7a15b29d808293644d50d928213280c072d",
209 "signature": "3ad728027671c2c3c829e21803f8d7a15b29d808293644d50d928213280c072d"
210 },
211 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts": {
212 "version": "c8274050c46d390d164eaa3ac7f962c256cc5d636e49664cc87f747fab328994",
213 "signature": "c8274050c46d390d164eaa3ac7f962c256cc5d636e49664cc87f747fab328994"
214 },
215 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts": {
216 "version": "4fd41897e21cc6def2735221fa7bd0986b44e44d224939a20f9e173ba2255646",
217 "signature": "4fd41897e21cc6def2735221fa7bd0986b44e44d224939a20f9e173ba2255646"
218 },
219 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts": {
220 "version": "272c8598c3a29a3fa3027bd0a645c5f49b3f7832dfcf8e47b7260843ec8a40f3",
221 "signature": "272c8598c3a29a3fa3027bd0a645c5f49b3f7832dfcf8e47b7260843ec8a40f3"
222 },
223 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts": {
224 "version": "dacbe08610729f6343ea9880ea8e737c6d7a6efa4a318d8f6acaf85db4aceed6",
225 "signature": "dacbe08610729f6343ea9880ea8e737c6d7a6efa4a318d8f6acaf85db4aceed6"
226 },
227 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts": {
228 "version": "4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c",
229 "signature": "4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c"
230 },
231 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts": {
232 "version": "03394bf8deb8781b490ae9266a843fbdf00647947d79e25fcbf1d89a9e9c8a66",
233 "signature": "03394bf8deb8781b490ae9266a843fbdf00647947d79e25fcbf1d89a9e9c8a66"
234 },
235 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts": {
236 "version": "358398fe4034395d85c87c319cca7a04001434b13dc68d067481ecb374385bfc",
237 "signature": "358398fe4034395d85c87c319cca7a04001434b13dc68d067481ecb374385bfc"
238 },
239 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts": {
240 "version": "d9bc6f1917c24d862a68d2633e4a32fd586bfe3e412e5d11fd07d8266b94ced5",
241 "signature": "d9bc6f1917c24d862a68d2633e4a32fd586bfe3e412e5d11fd07d8266b94ced5"
242 },
243 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts": {
244 "version": "5fb30076f0e0e5744db8993648bfb67aadd895f439edad5cce039127a87a8a36",
245 "signature": "5fb30076f0e0e5744db8993648bfb67aadd895f439edad5cce039127a87a8a36"
246 },
247 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts": {
248 "version": "27ef4001526ee9d8afa57687a60bb3b59c52b32d29db0a2260094ab64726164f",
249 "signature": "27ef4001526ee9d8afa57687a60bb3b59c52b32d29db0a2260094ab64726164f"
250 },
251 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts": {
252 "version": "0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e",
253 "signature": "0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e"
254 },
255 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts": {
256 "version": "30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1",
257 "signature": "30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1"
258 },
259 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts": {
260 "version": "66ce86394b4ced375bd59338265a190a5cbe0b78a15bdf64e34b46d3a5ffaa5d",
261 "signature": "66ce86394b4ced375bd59338265a190a5cbe0b78a15bdf64e34b46d3a5ffaa5d"
262 },
263 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts": {
264 "version": "d08dfb553aa396ac399e7c67e24f6b964b12a49e99d245009c7c579827f6d5f2",
265 "signature": "d08dfb553aa396ac399e7c67e24f6b964b12a49e99d245009c7c579827f6d5f2"
266 },
267 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts": {
268 "version": "30b9c2c0949e27506c7e751bd51749ca5ecb0d0a3ea854064039ffaa3707fad4",
269 "signature": "30b9c2c0949e27506c7e751bd51749ca5ecb0d0a3ea854064039ffaa3707fad4"
270 },
271 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts": {
272 "version": "32b0ae0240af34cb90ab2f071bd4da6721bdce7d547ad3bbc2af3723b8e8f812",
273 "signature": "32b0ae0240af34cb90ab2f071bd4da6721bdce7d547ad3bbc2af3723b8e8f812"
274 },
275 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts": {
276 "version": "7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432",
277 "signature": "7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432"
278 },
279 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts": {
280 "version": "b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9",
281 "signature": "b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9"
282 },
283 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts": {
284 "version": "a111f300c29a91c4dd0db95fb46a80d7f95a9da4b0c23e2d84f2a1302fffaabf",
285 "signature": "a111f300c29a91c4dd0db95fb46a80d7f95a9da4b0c23e2d84f2a1302fffaabf"
286 },
287 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts": {
288 "version": "a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638",
289 "signature": "a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638"
290 },
291 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts": {
292 "version": "df905913ad47e24b6cb41d33f0c1f500bf9c4befe4325413a7644c9eb1e7965c",
293 "signature": "df905913ad47e24b6cb41d33f0c1f500bf9c4befe4325413a7644c9eb1e7965c"
294 },
295 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts": {
296 "version": "ae25aec5ed3795a3edfc356a7bc091554917ad0e0009a3cdffd7115ba22bd28d",
297 "signature": "ae25aec5ed3795a3edfc356a7bc091554917ad0e0009a3cdffd7115ba22bd28d"
298 },
299 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts": {
300 "version": "bf237fb2ca1ac62fde63e5f8178a9030e4d6b11987744007272f03a9deec6f76",
301 "signature": "bf237fb2ca1ac62fde63e5f8178a9030e4d6b11987744007272f03a9deec6f76"
302 },
303 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts": {
304 "version": "4407bd5f1d6f748590ba125195eb1d7a003c2de2f3b057456d3ac76a742d2561",
305 "signature": "4407bd5f1d6f748590ba125195eb1d7a003c2de2f3b057456d3ac76a742d2561"
306 },
307 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts": {
308 "version": "bf244a366e8ee68acda125761c6e337c8795b37eef05947d62f89b584de926b3",
309 "signature": "bf244a366e8ee68acda125761c6e337c8795b37eef05947d62f89b584de926b3"
310 },
311 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts": {
312 "version": "7780573ed8387aaadcc61d87f3d60d77dabf1e060da252dc72ab1d73401988bb",
313 "signature": "7780573ed8387aaadcc61d87f3d60d77dabf1e060da252dc72ab1d73401988bb"
314 },
315 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts": {
316 "version": "f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8",
317 "signature": "f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8"
318 },
319 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts": {
320 "version": "6622f76993bdfeaacb947ba7c4cf26f2e5c5194194d02d792c3cba4174cd8fce",
321 "signature": "6622f76993bdfeaacb947ba7c4cf26f2e5c5194194d02d792c3cba4174cd8fce"
322 },
323 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts": {
324 "version": "1ed55651f38540dba21f4a864bd89834ddb552446dce8c8a5f9dc0b44ce0b024",
325 "signature": "1ed55651f38540dba21f4a864bd89834ddb552446dce8c8a5f9dc0b44ce0b024"
326 },
327 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts": {
328 "version": "4f54f0a9dd3b644c99ec32b32f8804d5978bc854799b228ae9c467bf3c84c64c",
329 "signature": "4f54f0a9dd3b644c99ec32b32f8804d5978bc854799b228ae9c467bf3c84c64c"
330 },
331 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts": {
332 "version": "4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1",
333 "signature": "4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1"
334 },
335 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts": {
336 "version": "6e19418b881b57998d218487d41d85534c7fa5ab329bbc72afe571e7683d774a",
337 "signature": "6e19418b881b57998d218487d41d85534c7fa5ab329bbc72afe571e7683d774a"
338 },
339 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts": {
340 "version": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633",
341 "signature": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633"
342 },
343 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/glob/7.1.1/node_modules/@types/glob/index.d.ts": {
344 "version": "d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee",
345 "signature": "d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee"
346 },
347 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts": {
348 "version": "9e951ec338c4232d611552a1be7b4ecec79a8c2307a893ce39701316fe2374bd",
349 "signature": "9e951ec338c4232d611552a1be7b4ecec79a8c2307a893ce39701316fe2374bd"
350 },
351 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts": {
352 "version": "70c61ff569aabdf2b36220da6c06caaa27e45cd7acac81a1966ab4ee2eadc4f2",
353 "signature": "70c61ff569aabdf2b36220da6c06caaa27e45cd7acac81a1966ab4ee2eadc4f2"
354 },
355 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-reports/1.1.1/node_modules/@types/istanbul-reports/index.d.ts": {
356 "version": "93b59bc67329d5add033e3198583c39aa939cef891e6a2b763e0bea2b514ea9b",
357 "signature": "93b59bc67329d5add033e3198583c39aa939cef891e6a2b763e0bea2b514ea9b"
358 },
359 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts": {
360 "version": "71ba0678a3c647f5c0706ae975c031ace0d464e60f9ce56eaa7f1678d065aab7",
361 "signature": "71ba0678a3c647f5c0706ae975c031ace0d464e60f9ce56eaa7f1678d065aab7"
362 },
363 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts": {
364 "version": "162c6f2951bd80ae6e16679378f382200b26bba9de8f255af3a2895fbfa670b4",
365 "signature": "162c6f2951bd80ae6e16679378f382200b26bba9de8f255af3a2895fbfa670b4"
366 },
367 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/jest/24.9.0/node_modules/@types/jest/index.d.ts": {
368 "version": "efa533e2d13eb3af93317b08fea50d35481abdbf9852745167c21cea4e2d27dc",
369 "signature": "efa533e2d13eb3af93317b08fea50d35481abdbf9852745167c21cea4e2d27dc"
370 },
371 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json-schema/7.0.4/node_modules/@types/json-schema/index.d.ts": {
372 "version": "92bc43ea5584457c9325a3d5b2ce5af77df6d2653be7e4c2e9a626f89293c3c1",
373 "signature": "92bc43ea5584457c9325a3d5b2ce5af77df6d2653be7e4c2e9a626f89293c3c1"
374 },
375 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json5/0.0.29/node_modules/@types/json5/index.d.ts": {
376 "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538",
377 "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538"
378 },
379 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/micromatch/3.1.1/node_modules/@types/micromatch/index.d.ts": {
380 "version": "915a88fb10c215db7778993aeea96769ee5d5389315cf67a928b09591ff3e3ff",
381 "signature": "915a88fb10c215db7778993aeea96769ee5d5389315cf67a928b09591ff3e3ff"
382 },
383 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/normalize-package-data/2.4.0/node_modules/@types/normalize-package-data/index.d.ts": {
384 "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613",
385 "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613"
386 },
387 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/q/1.5.2/node_modules/@types/q/index.d.ts": {
388 "version": "57427a9a368f8f0ee4ce03c36a762e19166756b95ab688948b29be553b24a78a",
389 "signature": "57427a9a368f8f0ee4ce03c36a762e19166756b95ab688948b29be553b24a78a"
390 },
391 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/resolve/0.0.8/node_modules/@types/resolve/index.d.ts": {
392 "version": "2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761",
393 "signature": "2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761"
394 },
395 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts": {
396 "version": "fdfbe321c556c39a2ecf791d537b999591d0849e971dd938d88f460fea0186f6",
397 "signature": "fdfbe321c556c39a2ecf791d537b999591d0849e971dd938d88f460fea0186f6"
398 },
399 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs/13.0.5/node_modules/@types/yargs/index.d.ts": {
400 "version": "989ea8e89ef2d6a07a1872fcee14be6b9e1920b04f19a4ab149d673f89af67e6",
401 "signature": "989ea8e89ef2d6a07a1872fcee14be6b9e1920b04f19a4ab149d673f89af67e6"
402 }
403 },
404 "options": {
405 "module": 99,
406 "noEmitOnError": true,
407 "skipLibCheck": true,
408 "incremental": true,
409 "outDir": "./",
410 "tsBuildInfoFile": "./.tsbuildinfo",
411 "configFilePath": "../tsconfig.json",
412 "noEmitHelpers": true,
413 "importHelpers": true,
414 "noEmit": false,
415 "emitDeclarationOnly": false,
416 "noResolve": false,
417 "sourceMap": true
418 },
419 "referencedMap": {
420 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.d.ts": [
421 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
422 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
423 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
424 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
425 ],
426 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es5.d.ts": [
427 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
428 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
429 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
430 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
431 ],
432 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.d.ts": [
433 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
434 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
435 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
436 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
437 ],
438 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.d.ts": [
439 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
440 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
441 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
442 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
443 ],
444 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.d.ts": [
445 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
446 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
447 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
448 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
449 ],
450 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.d.ts": [
451 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
452 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
453 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
454 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
455 ],
456 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.dom.d.ts": [
457 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
458 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
459 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
460 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
461 ],
462 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.webworker.importscripts.d.ts": [
463 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
464 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
465 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
466 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
467 ],
468 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.scripthost.d.ts": [
469 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
470 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
471 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
472 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
473 ],
474 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.core.d.ts": [
475 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
476 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
477 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
478 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
479 ],
480 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.collection.d.ts": [
481 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
482 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
483 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
484 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
485 ],
486 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.generator.d.ts": [
487 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
488 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
489 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
490 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
491 ],
492 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts": [
493 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
494 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
495 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
496 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
497 ],
498 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.promise.d.ts": [
499 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
500 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
501 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
502 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
503 ],
504 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts": [
505 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
506 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
507 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
508 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
509 ],
510 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts": [
511 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
512 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
513 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
514 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
515 ],
516 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts": [
517 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
518 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
519 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
520 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
521 ],
522 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": [
523 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
524 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
525 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
526 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
527 ],
528 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts": [
529 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
530 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
531 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
532 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
533 ],
534 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.object.d.ts": [
535 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
536 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
537 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
538 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
539 ],
540 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": [
541 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
542 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
543 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
544 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
545 ],
546 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.string.d.ts": [
547 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
548 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
549 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
550 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
551 ],
552 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.intl.d.ts": [
553 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
554 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
555 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
556 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
557 ],
558 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": [
559 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
560 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
561 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
562 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
563 ],
564 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": [
565 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
566 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
567 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
568 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
569 ],
570 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": [
571 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
572 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
573 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
574 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
575 ],
576 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.intl.d.ts": [
577 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
578 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
579 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
580 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
581 ],
582 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.promise.d.ts": [
583 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
584 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
585 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
586 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
587 ],
588 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts": [
589 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
590 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
591 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
592 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
593 ],
594 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.intl.d.ts": [
595 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
596 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
597 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
598 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
599 ],
600 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.bigint.d.ts": [
601 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
602 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
603 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
604 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
605 ],
606 "../main.ts": [
607 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
608 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
609 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
610 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
611 ],
612 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts": [
613 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
614 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
615 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
616 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
617 ],
618 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts": [
619 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
620 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
621 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
622 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
623 ],
624 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/buble/0.19.2/node_modules/@types/buble/index.d.ts": [
625 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts",
626 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
627 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
628 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
629 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
630 ],
631 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/color-name/1.1.1/node_modules/@types/color-name/index.d.ts": [
632 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
633 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
634 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
635 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
636 ],
637 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/eslint-visitor-keys/1.0.0/node_modules/@types/eslint-visitor-keys/index.d.ts": [
638 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
639 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
640 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
641 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
642 ],
643 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/estree/0.0.39/node_modules/@types/estree/index.d.ts": [
644 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
645 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
646 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
647 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
648 ],
649 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/events/3.0.0/node_modules/@types/events/index.d.ts": [
650 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
651 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
652 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
653 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
654 ],
655 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts": [
656 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
657 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
658 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
659 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
660 ],
661 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts": [
662 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
663 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
664 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
665 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
666 ],
667 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts": [
668 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
669 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
670 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
671 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
672 ],
673 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts": [
674 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
675 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
676 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
677 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
678 ],
679 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts": [
680 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
681 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
682 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
683 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
684 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
685 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
686 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
687 ],
688 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts": [
689 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts",
690 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
691 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
692 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
693 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
694 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
695 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
696 ],
697 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts": [
698 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
699 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
700 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
701 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
702 ],
703 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts": [
704 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
705 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
706 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
707 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
708 ],
709 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts": [
710 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
711 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
712 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
713 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
714 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
715 ],
716 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts": [
717 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
718 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
719 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
720 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
721 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
722 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
723 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
724 ],
725 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts": [
726 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
727 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
728 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
729 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
730 ],
731 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts": [
732 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
733 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
734 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
735 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
736 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
737 ],
738 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts": [
739 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
740 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
741 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
742 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
743 ],
744 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts": [
745 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
746 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
747 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
748 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
749 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
750 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
751 ],
752 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts": [
753 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
754 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
755 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
756 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
757 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
758 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
759 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
760 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
761 ],
762 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts": [
763 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
764 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
765 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
766 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
767 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
768 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
769 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
770 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
771 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
772 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
773 ],
774 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts": [
775 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
776 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
777 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
778 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
779 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
780 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
781 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
782 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
783 ],
784 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts": [
785 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
786 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
787 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
788 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
789 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
790 ],
791 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts": [
792 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
793 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
794 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
795 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
796 ],
797 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts": [
798 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
799 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
800 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
801 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
802 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
803 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
804 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
805 ],
806 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts": [
807 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
808 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
809 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
810 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
811 ],
812 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts": [
813 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
814 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
815 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
816 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
817 ],
818 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts": [
819 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts",
820 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
821 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
822 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
823 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
824 ],
825 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts": [
826 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts",
827 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
828 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
829 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
830 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
831 ],
832 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts": [
833 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
834 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
835 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
836 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
837 ],
838 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts": [
839 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
840 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
841 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
842 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
843 ],
844 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts": [
845 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
846 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
847 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
848 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
849 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
850 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
851 ],
852 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts": [
853 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts",
854 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
855 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
856 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
857 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
858 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
859 ],
860 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts": [
861 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
862 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
863 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
864 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
865 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
866 ],
867 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts": [
868 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
869 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
870 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
871 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
872 ],
873 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts": [
874 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
875 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
876 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
877 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
878 ],
879 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts": [
880 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts",
881 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
882 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
883 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
884 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
885 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
886 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
887 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
888 ],
889 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts": [
890 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
891 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
892 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
893 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
894 ],
895 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts": [
896 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
897 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
898 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
899 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
900 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
901 ],
902 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts": [
903 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts",
904 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
905 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
906 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
907 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
908 ],
909 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts": [
910 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
911 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
912 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
913 ],
914 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts": [
915 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
916 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
917 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
918 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
919 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
920 ],
921 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts": [
922 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
923 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
924 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
925 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
926 ],
927 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts": [
928 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
929 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
930 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
931 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
932 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
933 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
934 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
935 ],
936 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts": [
937 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
938 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
939 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
940 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
941 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
942 ],
943 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts": [
944 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts",
945 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts",
946 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts",
947 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts",
948 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts",
949 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts",
950 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts",
951 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts",
952 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts",
953 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts",
954 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
955 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts",
956 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
957 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
958 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
959 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts",
960 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts",
961 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts",
962 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts",
963 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
964 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts",
965 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts",
966 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts",
967 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts",
968 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts",
969 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts",
970 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts",
971 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts",
972 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
973 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts",
974 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts",
975 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
976 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts",
977 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts",
978 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
979 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
980 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts",
981 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
982 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts",
983 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts",
984 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
985 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
986 ],
987 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts": [
988 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
989 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
990 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
991 ],
992 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts": [
993 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
994 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
995 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts"
996 ],
997 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts": [
998 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts",
999 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1000 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1001 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1002 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1003 ],
1004 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts": [
1005 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts",
1006 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1007 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts",
1008 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts",
1009 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1010 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts"
1011 ],
1012 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts": [
1013 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1014 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1015 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1016 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1017 ],
1018 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/glob/7.1.1/node_modules/@types/glob/index.d.ts": [
1019 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1020 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts",
1021 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts",
1022 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1023 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1024 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1025 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1026 ],
1027 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts": [
1028 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1029 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1030 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1031 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1032 ],
1033 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts": [
1034 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts",
1035 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1036 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1037 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1038 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1039 ],
1040 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-reports/1.1.1/node_modules/@types/istanbul-reports/index.d.ts": [
1041 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts",
1042 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts",
1043 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1044 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1045 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1046 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1047 ],
1048 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts": [
1049 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1050 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1051 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1052 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1053 ],
1054 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts": [
1055 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts",
1056 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1057 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1058 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1059 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1060 ],
1061 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/jest/24.9.0/node_modules/@types/jest/index.d.ts": [
1062 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts",
1063 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1064 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1065 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1066 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1067 ],
1068 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json-schema/7.0.4/node_modules/@types/json-schema/index.d.ts": [
1069 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1070 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1071 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1072 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1073 ],
1074 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json5/0.0.29/node_modules/@types/json5/index.d.ts": [
1075 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1076 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1077 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1078 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1079 ],
1080 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/micromatch/3.1.1/node_modules/@types/micromatch/index.d.ts": [
1081 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts",
1082 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1083 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1084 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1085 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1086 ],
1087 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/normalize-package-data/2.4.0/node_modules/@types/normalize-package-data/index.d.ts": [
1088 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1089 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1090 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1091 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1092 ],
1093 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/q/1.5.2/node_modules/@types/q/index.d.ts": [
1094 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1095 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1096 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1097 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1098 ],
1099 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/resolve/0.0.8/node_modules/@types/resolve/index.d.ts": [
1100 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts",
1101 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1102 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1103 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1104 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1105 ],
1106 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts": [
1107 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1108 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1109 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1110 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1111 ],
1112 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs/13.0.5/node_modules/@types/yargs/index.d.ts": [
1113 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts",
1114 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1115 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1116 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1117 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1118 ]
1119 },
1120 "exportedModulesMap": {
1121 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.d.ts": [
1122 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1123 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1124 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1125 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1126 ],
1127 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es5.d.ts": [
1128 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1129 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1130 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1131 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1132 ],
1133 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.d.ts": [
1134 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1135 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1136 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1137 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1138 ],
1139 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.d.ts": [
1140 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1141 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1142 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1143 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1144 ],
1145 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.d.ts": [
1146 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1147 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1148 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1149 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1150 ],
1151 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.d.ts": [
1152 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1153 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1154 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1155 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1156 ],
1157 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.dom.d.ts": [
1158 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1159 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1160 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1161 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1162 ],
1163 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.webworker.importscripts.d.ts": [
1164 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1165 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1166 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1167 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1168 ],
1169 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.scripthost.d.ts": [
1170 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1171 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1172 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1173 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1174 ],
1175 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.core.d.ts": [
1176 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1177 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1178 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1179 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1180 ],
1181 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.collection.d.ts": [
1182 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1183 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1184 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1185 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1186 ],
1187 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.generator.d.ts": [
1188 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1189 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1190 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1191 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1192 ],
1193 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts": [
1194 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1195 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1196 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1197 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1198 ],
1199 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.promise.d.ts": [
1200 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1201 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1202 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1203 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1204 ],
1205 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts": [
1206 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1207 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1208 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1209 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1210 ],
1211 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts": [
1212 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1213 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1214 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1215 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1216 ],
1217 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts": [
1218 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1219 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1220 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1221 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1222 ],
1223 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": [
1224 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1225 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1226 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1227 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1228 ],
1229 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts": [
1230 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1231 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1232 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1233 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1234 ],
1235 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.object.d.ts": [
1236 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1237 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1238 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1239 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1240 ],
1241 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": [
1242 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1243 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1244 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1245 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1246 ],
1247 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.string.d.ts": [
1248 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1249 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1250 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1251 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1252 ],
1253 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.intl.d.ts": [
1254 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1255 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1256 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1257 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1258 ],
1259 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": [
1260 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1261 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1262 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1263 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1264 ],
1265 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": [
1266 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1267 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1268 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1269 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1270 ],
1271 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": [
1272 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1273 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1274 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1275 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1276 ],
1277 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.intl.d.ts": [
1278 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1279 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1280 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1281 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1282 ],
1283 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.promise.d.ts": [
1284 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1285 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1286 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1287 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1288 ],
1289 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts": [
1290 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1291 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1292 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1293 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1294 ],
1295 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.intl.d.ts": [
1296 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1297 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1298 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1299 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1300 ],
1301 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.bigint.d.ts": [
1302 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1303 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1304 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1305 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1306 ],
1307 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts": [
1308 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1309 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1310 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1311 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1312 ],
1313 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/micromatch/3.1.1/node_modules/@types/micromatch/index.d.ts": [
1314 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts",
1315 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1316 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1317 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1318 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1319 ],
1320 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts": [
1321 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1322 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1323 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1324 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1325 ],
1326 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/buble/0.19.2/node_modules/@types/buble/index.d.ts": [
1327 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts",
1328 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1329 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1330 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1331 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1332 ],
1333 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/color-name/1.1.1/node_modules/@types/color-name/index.d.ts": [
1334 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1335 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1336 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1337 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1338 ],
1339 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/eslint-visitor-keys/1.0.0/node_modules/@types/eslint-visitor-keys/index.d.ts": [
1340 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1341 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1342 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1343 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1344 ],
1345 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/estree/0.0.39/node_modules/@types/estree/index.d.ts": [
1346 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1347 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1348 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1349 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1350 ],
1351 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/events/3.0.0/node_modules/@types/events/index.d.ts": [
1352 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1353 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1354 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1355 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1356 ],
1357 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts": [
1358 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1359 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1360 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1361 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1362 ],
1363 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts": [
1364 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1365 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1366 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1367 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1368 ],
1369 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts": [
1370 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts",
1371 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts",
1372 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts",
1373 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts",
1374 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts",
1375 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts",
1376 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts",
1377 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts",
1378 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts",
1379 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts",
1380 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
1381 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts",
1382 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1383 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1384 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
1385 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts",
1386 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts",
1387 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts",
1388 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts",
1389 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1390 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts",
1391 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts",
1392 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts",
1393 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts",
1394 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts",
1395 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts",
1396 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts",
1397 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts",
1398 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1399 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts",
1400 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts",
1401 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
1402 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts",
1403 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts",
1404 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1405 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1406 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts",
1407 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
1408 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts",
1409 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts",
1410 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1411 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1412 ],
1413 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts": [
1414 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts",
1415 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1416 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts",
1417 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts",
1418 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1419 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts"
1420 ],
1421 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/resolve/0.0.8/node_modules/@types/resolve/index.d.ts": [
1422 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts",
1423 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1424 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1425 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1426 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1427 ],
1428 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/glob/7.1.1/node_modules/@types/glob/index.d.ts": [
1429 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1430 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts",
1431 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts",
1432 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1433 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1434 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1435 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1436 ],
1437 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts": [
1438 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1439 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1440 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1441 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1442 ],
1443 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts": [
1444 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts",
1445 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1446 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1447 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1448 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1449 ],
1450 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts": [
1451 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1452 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1453 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1454 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1455 ],
1456 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts": [
1457 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1458 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1459 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1460 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1461 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1462 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1463 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1464 ],
1465 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts": [
1466 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts",
1467 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1468 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1469 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1470 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1471 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1472 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1473 ],
1474 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts": [
1475 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1476 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1477 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1478 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1479 ],
1480 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts": [
1481 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1482 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1483 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1484 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1485 ],
1486 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts": [
1487 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1488 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1489 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1490 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1491 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1492 ],
1493 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts": [
1494 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts",
1495 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
1496 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1497 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1498 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1499 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1500 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1501 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1502 ],
1503 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts": [
1504 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
1505 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1506 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
1507 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1508 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1509 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1510 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1511 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1512 ],
1513 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts": [
1514 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1515 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1516 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1517 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1518 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
1519 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1520 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
1521 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1522 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1523 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1524 ],
1525 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts": [
1526 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1527 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
1528 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1529 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1530 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1531 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1532 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1533 ],
1534 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts": [
1535 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1536 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1537 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1538 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1539 ],
1540 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts": [
1541 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1542 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1543 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
1544 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1545 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1546 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1547 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1548 ],
1549 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts": [
1550 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1551 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1552 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1553 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1554 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1555 ],
1556 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts": [
1557 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts",
1558 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1559 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1560 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1561 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1562 ],
1563 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts": [
1564 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1565 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1566 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1567 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1568 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1569 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1570 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1571 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1572 ],
1573 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts": [
1574 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1575 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1576 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1577 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1578 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1579 ],
1580 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts": [
1581 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1582 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1583 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1584 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1585 ],
1586 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts": [
1587 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
1588 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1589 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1590 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1591 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1592 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1593 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1594 ],
1595 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts": [
1596 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1597 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1598 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1599 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1600 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1601 ],
1602 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts": [
1603 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1604 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1605 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1606 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1607 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1608 ],
1609 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts": [
1610 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1611 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1612 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1613 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1614 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1615 ],
1616 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts": [
1617 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1618 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1619 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1620 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1621 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1622 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1623 ],
1624 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts": [
1625 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts",
1626 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
1627 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1628 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1629 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1630 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1631 ],
1632 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts": [
1633 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1634 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1635 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1636 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1637 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1638 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1639 ],
1640 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs/13.0.5/node_modules/@types/yargs/index.d.ts": [
1641 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts",
1642 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1643 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1644 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1645 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1646 ],
1647 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts": [
1648 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1649 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1650 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1651 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1652 ],
1653 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/q/1.5.2/node_modules/@types/q/index.d.ts": [
1654 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1655 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1656 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1657 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1658 ],
1659 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/normalize-package-data/2.4.0/node_modules/@types/normalize-package-data/index.d.ts": [
1660 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1661 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1662 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1663 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1664 ],
1665 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json5/0.0.29/node_modules/@types/json5/index.d.ts": [
1666 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1667 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1668 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1669 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1670 ],
1671 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json-schema/7.0.4/node_modules/@types/json-schema/index.d.ts": [
1672 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1673 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1674 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1675 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1676 ],
1677 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/jest/24.9.0/node_modules/@types/jest/index.d.ts": [
1678 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts",
1679 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1680 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1681 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1682 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1683 ],
1684 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts": [
1685 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts",
1686 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1687 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1688 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1689 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1690 ],
1691 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts": [
1692 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1693 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1694 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1695 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1696 ],
1697 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-reports/1.1.1/node_modules/@types/istanbul-reports/index.d.ts": [
1698 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts",
1699 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts",
1700 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1701 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1702 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1703 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1704 ],
1705 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts": [
1706 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts",
1707 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1708 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1709 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1710 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1711 ],
1712 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts": [
1713 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1714 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1715 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1716 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1717 ],
1718 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts": [
1719 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1720 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1721 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1722 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1723 ],
1724 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts": [
1725 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts",
1726 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1727 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1728 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1729 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1730 ],
1731 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts": [
1732 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1733 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1734 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts"
1735 ],
1736 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts": [
1737 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1738 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1739 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1740 ],
1741 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts": [
1742 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1743 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1744 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1745 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1746 ],
1747 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts": [
1748 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1749 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1750 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1751 ],
1752 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts": [
1753 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts",
1754 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1755 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1756 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1757 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1758 ],
1759 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts": [
1760 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1761 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1762 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1763 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1764 ],
1765 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts": [
1766 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1767 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1768 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1769 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1770 ],
1771 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts": [
1772 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1773 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1774 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1775 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1776 ],
1777 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts": [
1778 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1779 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1780 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1781 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1782 ],
1783 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts": [
1784 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1785 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1786 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1787 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1788 ],
1789 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts": [
1790 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1791 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1792 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1793 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1794 ],
1795 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts": [
1796 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1797 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1798 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1799 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1800 ],
1801 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts": [
1802 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1803 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1804 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1805 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1806 ],
1807 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts": [
1808 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1809 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1810 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1811 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1812 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts"
1813 ]
1814 },
1815 "semanticDiagnosticsPerFile": [
1816 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.d.ts",
1817 "../main.ts",
1818 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/braces/3.0.0/node_modules/@types/braces/index.d.ts",
1819 "../../../../../../node_modules/.pnpm/registry.npmjs.org/magic-string/0.25.6/node_modules/magic-string/index.d.ts",
1820 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/buble/0.19.2/node_modules/@types/buble/index.d.ts",
1821 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/color-name/1.1.1/node_modules/@types/color-name/index.d.ts",
1822 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/eslint-visitor-keys/1.0.0/node_modules/@types/eslint-visitor-keys/index.d.ts",
1823 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/estree/0.0.39/node_modules/@types/estree/index.d.ts",
1824 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/events/3.0.0/node_modules/@types/events/index.d.ts",
1825 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/globals.d.ts",
1826 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/assert.d.ts",
1827 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/async_hooks.d.ts",
1828 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/buffer.d.ts",
1829 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/child_process.d.ts",
1830 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/cluster.d.ts",
1831 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/console.d.ts",
1832 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/constants.d.ts",
1833 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/crypto.d.ts",
1834 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dgram.d.ts",
1835 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/dns.d.ts",
1836 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/domain.d.ts",
1837 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/events.d.ts",
1838 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/fs.d.ts",
1839 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http.d.ts",
1840 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/http2.d.ts",
1841 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/https.d.ts",
1842 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/inspector.d.ts",
1843 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/module.d.ts",
1844 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/net.d.ts",
1845 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/os.d.ts",
1846 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/path.d.ts",
1847 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/perf_hooks.d.ts",
1848 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/process.d.ts",
1849 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/punycode.d.ts",
1850 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/querystring.d.ts",
1851 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/readline.d.ts",
1852 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/repl.d.ts",
1853 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/stream.d.ts",
1854 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/string_decoder.d.ts",
1855 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/timers.d.ts",
1856 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tls.d.ts",
1857 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/trace_events.d.ts",
1858 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/tty.d.ts",
1859 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/url.d.ts",
1860 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/util.d.ts",
1861 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/v8.d.ts",
1862 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/vm.d.ts",
1863 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/worker_threads.d.ts",
1864 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/zlib.d.ts",
1865 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/base.d.ts",
1866 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/fs.d.ts",
1867 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/util.d.ts",
1868 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/globals.d.ts",
1869 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/node/12.12.25/node_modules/@types/node/ts3.2/index.d.ts",
1870 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/minimatch/3.0.3/node_modules/@types/minimatch/index.d.ts",
1871 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/glob/7.1.1/node_modules/@types/glob/index.d.ts",
1872 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-coverage/2.0.1/node_modules/@types/istanbul-lib-coverage/index.d.ts",
1873 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-lib-report/1.1.1/node_modules/@types/istanbul-lib-report/index.d.ts",
1874 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/istanbul-reports/1.1.1/node_modules/@types/istanbul-reports/index.d.ts",
1875 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/types.d.ts",
1876 "../../../../../../node_modules/.pnpm/registry.npmjs.org/jest-diff/24.9.0/node_modules/jest-diff/build/index.d.ts",
1877 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/jest/24.9.0/node_modules/@types/jest/index.d.ts",
1878 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json-schema/7.0.4/node_modules/@types/json-schema/index.d.ts",
1879 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/json5/0.0.29/node_modules/@types/json5/index.d.ts",
1880 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/micromatch/3.1.1/node_modules/@types/micromatch/index.d.ts",
1881 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/normalize-package-data/2.4.0/node_modules/@types/normalize-package-data/index.d.ts",
1882 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/q/1.5.2/node_modules/@types/q/index.d.ts",
1883 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/resolve/0.0.8/node_modules/@types/resolve/index.d.ts",
1884 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs-parser/15.0.0/node_modules/@types/yargs-parser/index.d.ts",
1885 "../../../../../../node_modules/.pnpm/registry.npmjs.org/@types/yargs/13.0.5/node_modules/@types/yargs/index.d.ts",
1886 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.d.ts",
1887 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.d.ts",
1888 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.d.ts",
1889 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.d.ts",
1890 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.bigint.d.ts",
1891 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.esnext.intl.d.ts",
1892 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts",
1893 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.promise.d.ts",
1894 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.intl.d.ts",
1895 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts",
1896 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts",
1897 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts",
1898 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.intl.d.ts",
1899 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.string.d.ts",
1900 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts",
1901 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2017.object.d.ts",
1902 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts",
1903 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts",
1904 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts",
1905 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts",
1906 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts",
1907 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.promise.d.ts",
1908 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts",
1909 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.generator.d.ts",
1910 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.collection.d.ts",
1911 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es2015.core.d.ts",
1912 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.scripthost.d.ts",
1913 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.webworker.importscripts.d.ts",
1914 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.dom.d.ts",
1915 "../../../../../../node_modules/.pnpm/registry.npmjs.org/typescript/3.7.5/node_modules/typescript/lib/lib.es5.d.ts"
1916 ]
1917 },
1918 "version": "3.7.5"
1919 }
+0
-3
packages/typescript/test/fixtures/incremental/main.ts less more
0 const answer = '42';
1 // eslint-disable-next-line no-console
2 console.log(`the answer is ${answer}`);
+0
-7
packages/typescript/test/fixtures/incremental/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "incremental": true,
3 "outDir": "./dist",
4 "tsBuildInfoFile": "./dist/.tsbuildinfo"
5 }
6 }
+0
-3
packages/typescript/test/fixtures/jsx/main.tsx less more
0 const props = {};
1 // @ts-ignore
2 export default <span {...props}>Yo!</span>;
+0
-8
packages/typescript/test/fixtures/optional-chaining/main.ts less more
0 interface OC {
1 a: number;
2 b?: {
3 c?: number;
4 };
5 }
6 const o = { a: 1 } as OC;
7 export default o.b?.c ?? 'NOT FOUND';
+0
-1
packages/typescript/test/fixtures/optional-chaining/tsconfig.json less more
0 {}
+0
-7
packages/typescript/test/fixtures/overriding-tslib/main.ts less more
0 class Base {
1 static baseMethod() {
2 return 'base method';
3 }
4 }
5
6 export default class Main extends Base {}
+0
-1
packages/typescript/test/fixtures/overriding-tslib/tsconfig.json less more
0 {}
+0
-2
packages/typescript/test/fixtures/overriding-tslib/tslib.js less more
0 /* eslint-disable */
1 export const __extends = (Main, Super) => (Main.myParent = Super);
+0
-1
packages/typescript/test/fixtures/overriding-typescript/main.ts less more
0 // empty
+0
-1
packages/typescript/test/fixtures/overriding-typescript/tsconfig.json less more
0 {}
+0
-7
packages/typescript/test/fixtures/preserve-modules/main.ts less more
0 /* eslint-disable */
1 const b = () => {
2 const a = { a: 1, b: 2 };
3 console.log({ ...a });
4 };
5
6 export { b };
+0
-11
packages/typescript/test/fixtures/preserve-modules/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "allowSyntheticDefaultImports": true,
3 "downlevelIteration": true,
4 "esModuleInterop": true,
5 "forceConsistentCasingInFileNames": true,
6 "module": "esnext",
7 "strict": true,
8 "target": "es5"
9 }
10 }
+0
-4
packages/typescript/test/fixtures/project-references/animals/animal.ts less more
0 export type Size = 'small' | 'medium' | 'large';
1 export default interface Animal {
2 size: Size;
3 }
+0
-19
packages/typescript/test/fixtures/project-references/animals/dog.ts less more
0 import { makeRandomName } from '../core/utilities';
1
2 import Animal from '.';
3
4 export interface Dog extends Animal {
5 name: string;
6 woof(): void;
7 }
8
9 export function createDog(): Dog {
10 return {
11 size: 'medium',
12 woof(this: Dog) {
13 // eslint-disable-next-line no-console
14 console.log(`${this.name} says "Woof"!`);
15 },
16 name: makeRandomName()
17 };
18 }
+0
-5
packages/typescript/test/fixtures/project-references/animals/index.ts less more
0 import Animal from './animal';
1 import { createDog, Dog } from './dog';
2
3 export default Animal;
4 export { createDog, Dog };
+0
-8
packages/typescript/test/fixtures/project-references/animals/tsconfig.json less more
0 {
1 "extends": "../tsconfig-base.json",
2 "compilerOptions": {
3 "outDir": "../lib/animals",
4 "rootDir": "."
5 },
6 "references": [{ "path": "../core" }]
7 }
+0
-7
packages/typescript/test/fixtures/project-references/core/tsconfig.json less more
0 {
1 "extends": "../tsconfig-base.json",
2 "compilerOptions": {
3 "outDir": "../lib/core",
4 "rootDir": "."
5 }
6 }
+0
-13
packages/typescript/test/fixtures/project-references/tsconfig-base.json less more
0 {
1 "compilerOptions": {
2 "declaration": true,
3 "target": "es5",
4 "module": "commonjs",
5 "strict": true,
6 "noUnusedLocals": true,
7 "noUnusedParameters": true,
8 "noImplicitReturns": true,
9 "noFallthroughCasesInSwitch": true,
10 "composite": true
11 }
12 }
+0
-14
packages/typescript/test/fixtures/project-references/tsconfig.json less more
0 {
1 "files": [],
2 "references": [
3 {
4 "path": "./core"
5 },
6 {
7 "path": "./animals"
8 },
9 {
10 "path": "./zoo"
11 }
12 ]
13 }
+0
-12
packages/typescript/test/fixtures/project-references/zoo/tsconfig.json less more
0 {
1 "extends": "../tsconfig-base.json",
2 "compilerOptions": {
3 "outDir": "../lib/zoo",
4 "rootDir": "."
5 },
6 "references": [
7 {
8 "path": "../animals"
9 }
10 ]
11 }
+0
-6
packages/typescript/test/fixtures/project-references/zoo/zoo.ts less more
0 // import Animal from '../animals/index';
1 import { Dog, createDog } from '../animals/index';
2
3 export default function createZoo(): Array<Dog> {
4 return [createDog()];
5 }
+0
-1
packages/typescript/test/fixtures/reexport-type/Bar.ts less more
0 export type Bar = object;
+0
-1
packages/typescript/test/fixtures/reexport-type/Baz.ts less more
0 export type Baz = unknown;
+0
-1
packages/typescript/test/fixtures/reexport-type/Foo.ts less more
0 export interface Foo {}
+0
-6
packages/typescript/test/fixtures/reexport-type/main.ts less more
0 import { Foo } from './Foo';
1
2 export { Foo };
3 export { Bar } from './Bar';
4
5 export * from './Baz';
+0
-1
packages/typescript/test/fixtures/reexport-type/tsconfig.json less more
0 {}
+0
-3
packages/typescript/test/fixtures/relative-dir/main.ts less more
0 const answer = 42;
1 // eslint-disable-next-line no-console
2 console.log(`the answer is ${answer}`);
+0
-6
packages/typescript/test/fixtures/relative-dir/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "outDir": "./dist",
3 "declaration": true
4 }
5 }
+0
-2
packages/typescript/test/fixtures/syntax-error/missing-type.ts less more
0 var a: ;
1 console.log('hello world');
+0
-5
packages/typescript/test/fixtures/syntax-error/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "noEmitOnError": true
3 }
4 }
+0
-3
packages/typescript/test/fixtures/tsconfig-extends/main.tsx less more
0 const props = {};
1 // @ts-ignore
2 export default <span {...props}>Yo!</span>;
+0
-3
packages/typescript/test/fixtures/tsconfig-extends/ts-config-extends-child/main.tsx less more
0 const props = {};
1 // @ts-ignore
2 export default <span {...props}>Yo!</span>;
+0
-6
packages/typescript/test/fixtures/tsconfig-extends/ts-config-extends-child/tsconfig.json less more
0 {
1 "extends": "../tsconfig.base",
2 "compilerOptions": {
3 "allowJs": true
4 }
5 }
+0
-5
packages/typescript/test/fixtures/tsconfig-extends/tsconfig.base.json less more
0 {
1 "compilerOptions": {
2 "jsx": "react"
3 }
4 }
+0
-6
packages/typescript/test/fixtures/tsconfig-extends/tsconfig.json less more
0 {
1 "extends": "./tsconfig.base",
2 "compilerOptions": {
3 "allowJs": true
4 }
5 }
+0
-3
packages/typescript/test/fixtures/tsconfig-extends-module/main.tsx less more
0 const props = {};
1 // @ts-ignore
2 export default <span {...props}>Yo!</span>;
+0
-6
packages/typescript/test/fixtures/tsconfig-extends-module/tsconfig.json less more
0 {
1 "extends": "shared-config",
2 "compilerOptions": {
3 "allowJs": true
4 }
5 }
+0
-3
packages/typescript/test/fixtures/tsconfig-jsx/main.tsx less more
0 const props = {};
1 // @ts-ignore
2 export default <span {...props}>Yo!</span>;
+0
-5
packages/typescript/test/fixtures/tsconfig-jsx/tsconfig.json less more
0 {
1 "compilerOptions": {
2 "jsx": "react"
3 }
4 }
+0
-946
packages/typescript/test/test.js less more
0 const path = require('path');
1
2 const commonjs = require('@rollup/plugin-commonjs');
3 const test = require('ava');
4 const { rollup } = require('rollup');
5 const ts = require('typescript');
6
7 const { getCode, testBundle } = require('../../../util/test');
8
9 const typescript = require('..');
10
11 test.beforeEach(() => process.chdir(__dirname));
12
13 const outputOptions = { format: 'esm' };
14
15 async function evaluateBundle(bundle) {
16 const { module } = await testBundle(null, bundle);
17 return module.exports;
18 }
19
20 function onwarn(warning) {
21 // eslint-disable-next-line no-console
22 console.warn(warning.toString());
23 }
24
25 test.serial('runs code through typescript', async (t) => {
26 const bundle = await rollup({
27 input: 'fixtures/basic/main.ts',
28 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', target: 'es5' })],
29 onwarn
30 });
31 const code = await getCode(bundle, outputOptions);
32
33 t.false(code.includes('number'), code);
34 t.false(code.includes('const'), code);
35 });
36
37 test.serial('supports creating declaration files', async (t) => {
38 const bundle = await rollup({
39 input: 'fixtures/basic/main.ts',
40 plugins: [
41 typescript({
42 tsconfig: 'fixtures/basic/tsconfig.json',
43 outDir: 'fixtures/basic/dist',
44 declaration: true
45 })
46 ],
47 onwarn
48 });
49 const output = await getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true);
50
51 t.deepEqual(
52 output.map((out) => out.fileName),
53 ['main.js', 'main.d.ts']
54 );
55
56 t.true(output[1].source.includes('declare const answer = 42;'), output[1].source);
57 });
58
59 test.serial('supports creating declaration files in subfolder', async (t) => {
60 const bundle = await rollup({
61 input: 'fixtures/basic/main.ts',
62 plugins: [
63 typescript({
64 tsconfig: 'fixtures/basic/tsconfig.json',
65 outDir: 'fixtures/basic/dist/types',
66 declaration: true,
67 declarationMap: true
68 })
69 ],
70 onwarn
71 });
72 const output = await getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true);
73
74 t.deepEqual(
75 output.map((out) => out.fileName),
76 ['main.js', 'types/main.d.ts', 'types/main.d.ts.map']
77 );
78
79 const declarationSource = output[1].source;
80 t.true(declarationSource.includes('declare const answer = 42;'), declarationSource);
81 t.true(declarationSource.includes('//# sourceMappingURL=main.d.ts.map'), declarationSource);
82 });
83
84 test.serial('supports creating declarations with non-default rootDir', async (t) => {
85 const bundle = await rollup({
86 input: 'fixtures/declaration-root-dir/src/main.ts',
87 plugins: [
88 typescript({
89 tsconfig: 'fixtures/declaration-root-dir/tsconfig.json'
90 })
91 ],
92 onwarn
93 });
94 const output = await getCode(
95 bundle,
96 { format: 'esm', dir: 'fixtures/declaration-root-dir/lib' },
97 true
98 );
99
100 t.deepEqual(
101 output.map((out) => out.fileName),
102 ['main.js', 'main.d.ts']
103 );
104 });
105
106 test.serial('supports creating declaration files for interface only source file', async (t) => {
107 const bundle = await rollup({
108 input: 'fixtures/export-interface-only/main.ts',
109 plugins: [
110 typescript({
111 tsconfig: 'fixtures/export-interface-only/tsconfig.json',
112 declarationDir: 'fixtures/export-interface-only/dist/types',
113 declaration: true,
114 declarationMap: true
115 })
116 ],
117 onwarn
118 });
119
120 const output = await getCode(
121 bundle,
122 { format: 'esm', dir: 'fixtures/export-interface-only/dist' },
123 true
124 );
125
126 t.deepEqual(
127 output.map((out) => out.fileName),
128 [
129 'main.js',
130 'types/interface.d.ts',
131 'types/interface.d.ts.map',
132 'types/main.d.ts',
133 'types/main.d.ts.map'
134 ]
135 );
136
137 const declarationSource = output[1].source;
138 t.true(declarationSource.includes('export interface ITest'), declarationSource);
139 t.true(declarationSource.includes('//# sourceMappingURL=interface.d.ts.map'), declarationSource);
140 });
141
142 test.serial('supports creating declaration files in declarationDir', async (t) => {
143 const bundle = await rollup({
144 input: 'fixtures/basic/main.ts',
145 plugins: [
146 typescript({
147 tsconfig: 'fixtures/basic/tsconfig.json',
148 declarationDir: 'fixtures/basic/dist/types',
149 declaration: true
150 })
151 ],
152 onwarn
153 });
154 const output = await getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true);
155
156 t.deepEqual(
157 output.map((out) => out.fileName),
158 ['main.js', 'types/main.d.ts']
159 );
160
161 t.true(output[1].source.includes('declare const answer = 42;'), output[1].source);
162 });
163
164 test.serial('ensures outDir is set when creating declaration files', async (t) => {
165 const bundle = await rollup({
166 input: 'fixtures/basic/main.ts',
167 plugins: [
168 typescript({
169 tsconfig: 'fixtures/basic/tsconfig.json',
170 declaration: true
171 })
172 ],
173 onwarn
174 });
175 const caughtError = await t.throwsAsync(() =>
176 getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true)
177 );
178
179 t.true(
180 caughtError.message.includes(
181 `'outDir' or 'declarationDir' must be specified to generate declaration files`
182 ),
183 `Unexpected error message: ${caughtError.message}`
184 );
185 });
186
187 test.serial('ensures outDir is located in Rollup output dir', async (t) => {
188 const bundle = await rollup({
189 input: 'fixtures/basic/main.ts',
190 plugins: [
191 typescript({
192 tsconfig: 'fixtures/basic/tsconfig.json',
193 outDir: 'fixtures/basic/other/'
194 })
195 ],
196 onwarn
197 });
198
199 const noDirError = await t.throwsAsync(() =>
200 getCode(bundle, { format: 'esm', file: 'fixtures/basic/other/out.js' }, true)
201 );
202 t.true(
203 noDirError.message.includes(`'dir' must be used when 'outDir' is specified`),
204 `Unexpected error message: ${noDirError.message}`
205 );
206
207 const wrongDirError = await t.throwsAsync(() =>
208 getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true)
209 );
210 t.true(
211 wrongDirError.message.includes(`'outDir' must be located inside 'dir'`),
212 `Unexpected error message: ${wrongDirError.message}`
213 );
214 });
215
216 test.serial('ensures declarationDir is located in Rollup output dir', async (t) => {
217 const bundle = await rollup({
218 input: 'fixtures/basic/main.ts',
219 plugins: [
220 typescript({
221 tsconfig: 'fixtures/basic/tsconfig.json',
222 declarationDir: 'fixtures/basic/other/',
223 declaration: true
224 })
225 ],
226 onwarn
227 });
228
229 const noDirError = await t.throwsAsync(() =>
230 getCode(bundle, { format: 'esm', file: 'fixtures/basic/other/out.js' }, true)
231 );
232 t.true(
233 noDirError.message.includes(`'dir' must be used when 'declarationDir' is specified`),
234 `Unexpected error message: ${noDirError.message}`
235 );
236
237 const wrongDirError = await t.throwsAsync(() =>
238 getCode(bundle, { format: 'esm', dir: 'fixtures/basic/dist' }, true)
239 );
240 t.true(
241 wrongDirError.message.includes(`'declarationDir' must be located inside 'dir'`),
242 `Unexpected error message: ${wrongDirError.message}`
243 );
244 });
245
246 test.serial('relative paths in tsconfig.json are resolved relative to the file', async (t) => {
247 const bundle = await rollup({
248 input: 'fixtures/relative-dir/main.ts',
249 plugins: [typescript({ tsconfig: 'fixtures/relative-dir/tsconfig.json' })],
250 onwarn
251 });
252 const output = await getCode(bundle, { format: 'esm', dir: 'fixtures/relative-dir/dist' }, true);
253
254 t.deepEqual(
255 output.map((out) => out.fileName),
256 ['main.js', 'main.d.ts']
257 );
258
259 t.true(output[1].source.includes('declare const answer = 42;'), output[1].source);
260 });
261
262 test.serial('throws for unsupported module types', async (t) => {
263 const caughtError = await t.throws(() =>
264 rollup({
265 input: 'fixtures/basic/main.ts',
266 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', module: 'AMD' })],
267 onwarn
268 })
269 );
270
271 t.true(
272 caughtError.message.includes("The module kind should be 'ES2015' or 'ESNext, found: 'AMD'"),
273 `Unexpected error message: ${caughtError.message}`
274 );
275 });
276
277 test.serial('warns for invalid module types', async (t) => {
278 const warnings = [];
279 await t.throwsAsync(() =>
280 rollup({
281 input: 'fixtures/basic/main.ts',
282 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', module: 'ES5' })],
283 onwarn({ toString, ...warning }) {
284 warnings.push(warning);
285 }
286 })
287 );
288
289 t.deepEqual(warnings, [
290 {
291 code: 'PLUGIN_WARNING',
292 plugin: 'typescript',
293 pluginCode: 'TS6046',
294 message: `@rollup/plugin-typescript TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'esnext'.`
295 }
296 ]);
297 });
298
299 test.serial('ignores case of module types', async (t) => {
300 await t.notThrowsAsync(
301 rollup({
302 input: 'fixtures/basic/main.ts',
303 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', module: 'eSnExT' })],
304 onwarn
305 })
306 );
307 });
308
309 test.serial('handles async functions', async (t) => {
310 const bundle = await rollup({
311 input: 'fixtures/async/main.ts',
312 plugins: [typescript({ tsconfig: 'fixtures/async/tsconfig.json' })],
313 onwarn
314 });
315 const wait = await evaluateBundle(bundle);
316 await wait(3);
317 t.pass();
318 });
319
320 test.serial('does not duplicate helpers', async (t) => {
321 const bundle = await rollup({
322 input: 'fixtures/dedup-helpers/main.ts',
323 plugins: [typescript({ tsconfig: 'fixtures/dedup-helpers/tsconfig.json', target: 'es5' })],
324 onwarn
325 });
326 const code = await getCode(bundle, outputOptions);
327
328 // The `__extends` function is defined in the bundle.
329 t.true(code.includes('function __extends'), code);
330
331 // No duplicate `__extends` helper is defined.
332 t.false(code.includes('__extends$1'), code);
333 });
334
335 test.serial('transpiles `export class A` correctly', async (t) => {
336 const bundle = await rollup({
337 input: 'fixtures/export-class-fix/main.ts',
338 plugins: [typescript({ tsconfig: 'fixtures/export-class-fix/tsconfig.json' })],
339 onwarn
340 });
341
342 const code = await getCode(bundle, outputOptions);
343 t.true(code.includes('export { A, B };'), code);
344
345 const { A, B } = await evaluateBundle(bundle);
346 const aInst = new A();
347 const bInst = new B();
348 t.true(aInst instanceof A);
349 t.true(bInst instanceof B);
350 });
351
352 test.serial('transpiles ES6 features to ES5 with source maps', async (t) => {
353 process.chdir('fixtures/import-class');
354
355 const bundle = await rollup({
356 input: 'main.ts',
357 plugins: [typescript()],
358 onwarn
359 });
360
361 const code = await getCode(bundle, outputOptions);
362
363 t.is(code.indexOf('...'), -1, code);
364 t.is(code.indexOf('=>'), -1, code);
365 });
366
367 test.serial('reports diagnostics and throws if errors occur during transpilation', async (t) => {
368 const caughtError = await t.throwsAsync(
369 rollup({
370 input: 'fixtures/syntax-error/missing-type.ts',
371 plugins: [typescript({ tsconfig: 'fixtures/syntax-error/tsconfig.json' })],
372 onwarn
373 })
374 );
375
376 t.is(caughtError.message, '@rollup/plugin-typescript TS1110: Type expected.');
377 t.is(caughtError.pluginCode, 'TS1110');
378 });
379
380 test.serial('ignore type errors if noEmitOnError is false', async (t) => {
381 const warnings = [];
382 const bundle = await rollup({
383 input: 'fixtures/syntax-error/missing-type.ts',
384 plugins: [typescript({ noEmitOnError: false })],
385 onwarn(warning) {
386 warnings.push(warning);
387 }
388 });
389 const code = await getCode(bundle, outputOptions);
390
391 t.true(code.includes(`console.log('hello world')`));
392
393 t.is(warnings.length, 1);
394
395 t.is(warnings[0].code, 'PLUGIN_WARNING');
396 t.is(warnings[0].plugin, 'typescript');
397 t.is(warnings[0].pluginCode, 'TS1110');
398 t.is(warnings[0].message, '@rollup/plugin-typescript TS1110: Type expected.');
399
400 t.is(warnings[0].loc.line, 1);
401 t.is(warnings[0].loc.column, 8);
402 t.true(warnings[0].loc.file.includes('missing-type.ts'));
403 t.true(warnings[0].frame.includes('var a: ;'));
404 });
405
406 test.serial('works with named exports for abstract classes', async (t) => {
407 const bundle = await rollup({
408 input: 'fixtures/export-abstract-class/main.ts',
409 plugins: [typescript({ tsconfig: 'fixtures/export-abstract-class/tsconfig.json' })],
410 onwarn
411 });
412 const code = await getCode(bundle, outputOptions);
413 t.true(code.length > 0, code);
414 });
415
416 test.serial('should use named exports for classes', async (t) => {
417 const bundle = await rollup({
418 input: 'fixtures/export-class/main.ts',
419 plugins: [typescript({ include: 'fixtures/export-class/**/*' })],
420 onwarn
421 });
422 t.is((await evaluateBundle(bundle)).foo, 'bar');
423 });
424
425 test.serial('supports overriding the TypeScript version', async (t) => {
426 const bundle = await rollup({
427 input: 'fixtures/overriding-typescript/main.ts',
428 onwarn,
429 plugins: [
430 typescript({
431 // Don't use `tsconfig.json`
432 tsconfig: false,
433
434 // test with a mocked version of TypeScript
435 typescript: fakeTypescript({
436 version: '1.8.0-fake',
437
438 createWatchProgram(host) {
439 const program = {
440 emit(_, writeFile) {
441 writeFile(
442 path.join(__dirname, 'fixtures/overriding-typescript/main.js'),
443 'export default 1337;'
444 );
445 }
446 };
447 host.afterProgramCreate(program);
448
449 // Call the overrided emit function to trigger writeFile
450 program.emit();
451
452 return { close() {} };
453 }
454 })
455 })
456 ]
457 });
458 const result = await evaluateBundle(bundle);
459
460 t.is(result, 1337);
461 });
462
463 test.serial('supports overriding tslib with a custom path', async (t) => {
464 const bundle = await rollup({
465 input: 'fixtures/overriding-tslib/main.ts',
466 plugins: [
467 typescript({
468 tsconfig: 'fixtures/overriding-tslib/tsconfig.json',
469 tslib: 'fixtures/overriding-tslib/tslib.js'
470 })
471 ],
472 onwarn
473 });
474 const code = await evaluateBundle(bundle);
475
476 t.is(code.myParent.baseMethod(), 'base method');
477 });
478
479 test.serial('supports overriding tslib with a custom path in a promise', async (t) => {
480 const bundle = await rollup({
481 input: 'fixtures/overriding-tslib/main.ts',
482 plugins: [
483 typescript({
484 tsconfig: 'fixtures/overriding-tslib/tsconfig.json',
485 tslib: Promise.resolve('fixtures/overriding-tslib/tslib.js')
486 })
487 ],
488 onwarn
489 });
490 const code = await evaluateBundle(bundle);
491
492 t.is(code.myParent.baseMethod(), 'base method');
493 });
494
495 test.serial('should not resolve .d.ts files', async (t) => {
496 const bundle = await rollup({
497 input: 'fixtures/dts/main.ts',
498 plugins: [typescript({ tsconfig: 'fixtures/dts/tsconfig.json' })],
499 onwarn,
500 external: ['an-import']
501 });
502 const imports = bundle.cache.modules[0].dependencies;
503 t.deepEqual(imports, ['an-import']);
504 });
505
506 test.serial('should transpile JSX if enabled', async (t) => {
507 process.chdir('fixtures/jsx');
508
509 const bundle = await rollup({
510 input: 'main.tsx',
511 plugins: [typescript({ jsx: 'react' })],
512 onwarn
513 });
514 const code = await getCode(bundle, outputOptions);
515
516 t.not(code.indexOf('var __assign = '), -1, 'should contain __assign definition');
517
518 const usage = code.indexOf('React.createElement("span", __assign({}, props), "Yo!")');
519
520 t.not(usage, -1, 'should contain usage');
521 });
522
523 test.serial('automatically loads tsconfig.json from the current directory', async (t) => {
524 process.chdir('fixtures/tsconfig-jsx');
525
526 const bundle = await rollup({
527 input: 'main.tsx',
528 plugins: [typescript()],
529 onwarn
530 });
531 const code = await getCode(bundle, outputOptions);
532
533 const usage = code.indexOf('React.createElement("span", __assign({}, props), "Yo!")');
534 t.not(usage, -1, 'should contain usage');
535 });
536
537 test.serial('should support extends property in tsconfig', async (t) => {
538 process.chdir('fixtures/tsconfig-extends');
539
540 const bundle = await rollup({
541 input: 'main.tsx',
542 plugins: [typescript()],
543 onwarn
544 });
545 const code = await getCode(bundle, outputOptions);
546
547 const usage = code.indexOf('React.createElement("span", __assign({}, props), "Yo!")');
548 t.not(usage, -1, 'should contain usage');
549 });
550
551 test.serial('should support extends property with given tsconfig', async (t) => {
552 process.chdir('fixtures/tsconfig-extends/ts-config-extends-child');
553
554 const bundle = await rollup({
555 input: 'main.tsx',
556 plugins: [
557 typescript({
558 tsconfig: './tsconfig.json'
559 })
560 ],
561 onwarn
562 });
563 const code = await getCode(bundle, outputOptions);
564
565 const usage = code.indexOf('React.createElement("span", __assign({}, props), "Yo!")');
566 t.not(usage, -1, 'should contain usage');
567 });
568
569 test.serial('should support extends property with node resolution', async (t) => {
570 process.chdir('fixtures/tsconfig-extends-module');
571
572 const bundle = await rollup({
573 input: 'main.tsx',
574 plugins: [typescript()],
575 onwarn
576 });
577 const code = await getCode(bundle, outputOptions);
578
579 const usage = code.includes('React.createElement("span", __assign({}, props), "Yo!")');
580 t.true(usage, 'should contain usage');
581 });
582
583 test.serial('complies code that uses browser functions', async (t) => {
584 const bundle = await rollup({
585 input: 'fixtures/dom/main.ts',
586 plugins: [typescript({ tsconfig: './fixtures/dom/tsconfig.json' })],
587 onwarn
588 });
589
590 const code = await getCode(bundle, outputOptions);
591
592 t.true(code.includes('navigator.clipboard.readText()'), code);
593 });
594
595 test.serial('allows specifying a path for tsconfig.json', async (t) => {
596 const bundle = await rollup({
597 input: 'fixtures/tsconfig-jsx/main.tsx',
598 plugins: [
599 typescript({ tsconfig: path.resolve(__dirname, 'fixtures/tsconfig-jsx/tsconfig.json') })
600 ],
601 onwarn
602 });
603 const code = await getCode(bundle, outputOptions);
604
605 const usage = code.indexOf('React.createElement("span", __assign({}, props), "Yo!")');
606 t.not(usage, -1, 'should contain usage');
607 });
608
609 test.serial('throws if tsconfig cannot be found', async (t) => {
610 const caughtError = await t.throws(() =>
611 rollup({
612 input: 'fixtures/tsconfig-jsx/main.tsx',
613 plugins: [typescript({ tsconfig: path.resolve(__dirname, 'does-not-exist.json') })],
614 onwarn
615 })
616 );
617
618 t.true(
619 caughtError.message.includes('Could not find specified tsconfig.json'),
620 `Unexpected error message: ${caughtError.message}`
621 );
622 });
623
624 test.serial('should throw on bad options', async (t) => {
625 const warnings = [];
626 await t.throwsAsync(
627 () =>
628 rollup({
629 input: 'does-not-matter.ts',
630 plugins: [typescript({ foo: 'bar' })],
631 onwarn({ toString, ...warning }) {
632 // Can't match toString function, so omit it
633 warnings.push(warning);
634 }
635 }),
636 {
637 message: "@rollup/plugin-typescript: Couldn't process compiler options"
638 }
639 );
640
641 t.deepEqual(warnings, [
642 {
643 code: 'PLUGIN_WARNING',
644 plugin: 'typescript',
645 pluginCode: 'TS5023',
646 message: `@rollup/plugin-typescript TS5023: Unknown compiler option 'foo'.`
647 }
648 ]);
649 });
650
651 test.serial('creates _tslib.js file when preserveModules is used', async (t) => {
652 const bundle = await rollup({
653 input: 'fixtures/preserve-modules/main.ts',
654 plugins: [typescript({ tsconfig: 'fixtures/preserve-modules/tsconfig.json' })],
655 preserveModules: true,
656 onwarn
657 });
658
659 const files = await getCode(bundle, { format: 'es' }, true);
660 t.true(files[0].fileName.includes('main.js'), files[0].fileName);
661 t.true(files[1].fileName.includes('tslib.es6.js'), files[1].fileName);
662 });
663
664 test.serial('should handle re-exporting types', async (t) => {
665 const bundle = await rollup({
666 input: 'fixtures/reexport-type/main.ts',
667 plugins: [
668 typescript({
669 tsconfig: 'fixtures/reexport-type/tsconfig.json',
670 // Make sure the transpiled files are empty
671 inlineSourceMap: false,
672 sourceMap: false
673 })
674 ],
675 onwarn
676 });
677 await t.notThrowsAsync(getCode(bundle, outputOptions));
678 });
679
680 test.serial(
681 'prevents errors due to conflicting `sourceMap`/`inlineSourceMap` options',
682 async (t) => {
683 await t.notThrowsAsync(
684 rollup({
685 input: 'fixtures/overriding-typescript/main.ts',
686 plugins: [
687 typescript({
688 tsconfig: 'fixtures/overriding-typescript/tsconfig.json',
689 inlineSourceMap: true
690 })
691 ],
692 onwarn
693 })
694 );
695 }
696 );
697
698 test.serial('should not emit null sourceContent', async (t) => {
699 const bundle = await rollup({
700 input: 'fixtures/basic/main.ts',
701 plugins: [
702 typescript({
703 tsconfig: 'fixtures/basic/tsconfig.json'
704 })
705 ],
706 onwarn
707 });
708 const output = await getCode(bundle, { format: 'esm', sourcemap: true }, true);
709 const sourcemap = output[0].map;
710 // eslint-disable-next-line no-undefined
711 t.false(sourcemap.sourcesContent.includes(undefined));
712 });
713
714 test.serial('should not fail if source maps are off', async (t) => {
715 await t.notThrowsAsync(
716 rollup({
717 input: 'fixtures/overriding-typescript/main.ts',
718 plugins: [
719 typescript({
720 tsconfig: 'fixtures/overriding-typescript/tsconfig.json',
721 inlineSourceMap: false,
722 sourceMap: false
723 })
724 ],
725 onwarn
726 })
727 );
728 });
729
730 test.serial('should allow a namespace containing a class', async (t) => {
731 const bundle = await rollup({
732 input: 'fixtures/export-namespace-export-class/test.ts',
733 plugins: [typescript({ tsconfig: 'fixtures/export-namespace-export-class/tsconfig.json' })],
734 onwarn
735 });
736 const { MODE } = (await evaluateBundle(bundle)).MODE;
737 const mode = new MODE();
738
739 t.true(mode instanceof MODE);
740 });
741
742 test.serial('should allow merging an exported function and namespace', async (t) => {
743 process.chdir('fixtures/export-fodule');
744
745 const bundle = await rollup({
746 input: 'main.ts',
747 plugins: [typescript()],
748 onwarn
749 });
750 const f = (await evaluateBundle(bundle)).test;
751
752 t.is(f(), 0);
753 t.is(f.foo, '2');
754 });
755
756 test.serial('supports dynamic imports', async (t) => {
757 const code = await getCode(
758 await rollup({
759 input: 'fixtures/dynamic-imports/main.ts',
760 inlineDynamicImports: true,
761 plugins: [typescript({ tsconfig: 'fixtures/dynamic-imports/tsconfig.json' })],
762 onwarn
763 }),
764 outputOptions
765 );
766 t.true(code.includes("console.log('dynamic')"));
767 });
768
769 test.serial('supports CommonJS imports when the output format is CommonJS', async (t) => {
770 const bundle = await rollup({
771 input: 'fixtures/commonjs-imports/main.ts',
772 plugins: [
773 typescript({ tsconfig: 'fixtures/commonjs-imports/tsconfig.json', module: 'CommonJS' }),
774 commonjs({ extensions: ['.ts', '.js'] })
775 ],
776 onwarn
777 });
778 const output = await evaluateBundle(bundle);
779 t.is(output, 'exported from commonjs');
780 });
781
782 test.serial('supports optional chaining', async (t) => {
783 const bundle = await rollup({
784 input: 'fixtures/optional-chaining/main.ts',
785 plugins: [
786 typescript({
787 tsconfig: 'fixtures/optional-chaining/tsconfig.json',
788 module: 'esnext',
789 target: 'es2020'
790 })
791 ],
792 onwarn
793 });
794 t.regex(await getCode(bundle), /.*var main = o\.b\?\.c \?\? 'NOT FOUND';.*/);
795 });
796
797 test.serial('supports incremental build', async (t) => {
798 const bundle = await rollup({
799 input: 'fixtures/basic/main.ts',
800 plugins: [
801 typescript({
802 tsconfig: 'fixtures/basic/tsconfig.json',
803 incremental: true
804 })
805 ],
806 onwarn
807 });
808 const output = await getCode(bundle, { format: 'esm', dir: 'fixtures/basic' }, true);
809
810 t.deepEqual(
811 output.map((out) => out.fileName),
812 ['main.js', 'tsconfig.tsbuildinfo']
813 );
814 });
815
816 test.serial('supports incremental rebuild', async (t) => {
817 process.chdir('fixtures/incremental');
818
819 const bundle = await rollup({
820 input: 'main.ts',
821 plugins: [typescript()],
822 onwarn
823 });
824 const output = await getCode(bundle, { format: 'esm', dir: 'dist' }, true);
825
826 t.deepEqual(
827 output.map((out) => out.fileName),
828 ['main.js', '.tsbuildinfo']
829 );
830 });
831
832 test.serial.skip('supports project references', async (t) => {
833 process.chdir('fixtures/project-references');
834
835 const bundle = await rollup({
836 input: 'zoo/zoo.ts',
837 plugins: [typescript({ tsconfig: 'zoo/tsconfig.json' })],
838 onwarn
839 });
840 const createZoo = await evaluateBundle(bundle);
841 const zoo = createZoo();
842
843 t.is(zoo.length, 1);
844 t.is(zoo[0].size, 'medium');
845 t.is(zoo[0].name, 'Bob!?! ');
846 });
847
848 test.serial('warns if sourceMap is set in Typescript but not Rollup', async (t) => {
849 const warnings = [];
850 const bundle = await rollup({
851 input: 'fixtures/basic/main.ts',
852 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', sourceMap: true })],
853 onwarn(warning) {
854 warnings.push(warning);
855 }
856 });
857 await getCode(bundle, { format: 'esm' });
858
859 t.is(warnings.length, 1);
860 t.true(
861 warnings[0].message.includes(`Rollup 'sourcemap' option must be set to generate source maps`),
862 warnings[0].message
863 );
864 });
865
866 test.serial('warns if sourceMap is set in Rollup but not Typescript', async (t) => {
867 const warnings = [];
868 const bundle = await rollup({
869 input: 'fixtures/basic/main.ts',
870 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json', sourceMap: false })],
871 onwarn(warning) {
872 warnings.push(warning);
873 }
874 });
875 await getCode(bundle, { format: 'esm', sourcemap: true });
876
877 t.is(warnings.length, 1);
878 t.true(
879 warnings[0].message.includes(
880 `Typescript 'sourceMap' compiler option must be set to generate source maps`
881 ),
882 warnings[0].message
883 );
884 });
885
886 test.serial('does not warn if sourceMap is set in Rollup and unset in Typescript', async (t) => {
887 const warnings = [];
888 const bundle = await rollup({
889 input: 'fixtures/basic/main.ts',
890 plugins: [typescript({ tsconfig: 'fixtures/basic/tsconfig.json' })],
891 onwarn(warning) {
892 warnings.push(warning);
893 }
894 });
895 await getCode(bundle, { format: 'esm', sourcemap: true });
896
897 t.is(warnings.length, 0);
898 });
899
900 function fakeTypescript(custom) {
901 return Object.assign(
902 {
903 sys: ts.sys,
904 createModuleResolutionCache: ts.createModuleResolutionCache,
905 ModuleKind: ts.ModuleKind,
906
907 transpileModule() {
908 return {
909 outputText: '',
910 diagnostics: [],
911 sourceMapText: JSON.stringify({ mappings: '' })
912 };
913 },
914
915 createWatchCompilerHost() {
916 return {
917 afterProgramCreate() {}
918 };
919 },
920
921 createWatchProgram() {
922 return {};
923 },
924
925 parseJsonConfigFileContent(json, host, basePath, existingOptions) {
926 return {
927 options: {
928 ...json.compilerOptions,
929 ...existingOptions
930 },
931 fileNames: [],
932 errors: []
933 };
934 },
935
936 getOutputFileNames(_, id) {
937 return [id.replace(/\.tsx?/, '.js')];
938 },
939
940 // eslint-disable-next-line no-undefined
941 getTsBuildInfoEmitOutputFilePath: () => undefined
942 },
943 custom
944 );
945 }
+0
-4
packages/typescript/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": ["src/**/*", "types/**/*"]
3 }
+0
-47
packages/typescript/types/index.d.ts less more
0 import { FilterPattern } from '@rollup/pluginutils';
1 import { Plugin } from 'rollup';
2 import { CompilerOptions } from 'typescript';
3
4 export interface RollupTypescriptPluginOptions {
5 /**
6 * Determine which files are transpiled by Typescript (all `.ts` and
7 * `.tsx` files by default).
8 */
9 include?: FilterPattern;
10 /**
11 * Determine which files are transpiled by Typescript (all `.ts` and
12 * `.tsx` files by default).
13 */
14 exclude?: FilterPattern;
15 /**
16 * When set to false, ignores any options specified in the config file.
17 * If set to a string that corresponds to a file path, the specified file
18 * will be used as config file.
19 */
20 tsconfig?: string | false;
21 /**
22 * Overrides TypeScript used for transpilation
23 */
24 typescript?: typeof import('typescript');
25 /**
26 * Overrides the injected TypeScript helpers with a custom version.
27 */
28 tslib?: Promise<string> | string;
29 }
30
31 /** Properties of `CompilerOptions` that are normally enums */
32 export type EnumCompilerOptions = 'module' | 'moduleResolution' | 'newLine' | 'jsx' | 'target';
33
34 /** JSON representation of Typescript compiler options */
35 export type JsonCompilerOptions = Omit<CompilerOptions, EnumCompilerOptions> &
36 Record<EnumCompilerOptions, string>;
37
38 /** Compiler options set by the plugin user. */
39 export type PartialCompilerOptions = Partial<CompilerOptions> | Partial<JsonCompilerOptions>;
40
41 export type RollupTypescriptOptions = RollupTypescriptPluginOptions & PartialCompilerOptions;
42
43 /**
44 * Seamless integration between Rollup and Typescript.
45 */
46 export default function typescript(options?: RollupTypescriptOptions): Plugin;
+0
-21
packages/typescript/typings-test.js less more
0 // @ts-check
1 import typescript from '.';
2
3 /** @type {import("rollup").RollupOptions} */
4 const config = {
5 input: 'main.js',
6 output: {
7 file: 'bundle.js',
8 format: 'iife'
9 },
10 plugins: [
11 typescript({
12 lib: ["es5", "es6", "dom"],
13 target: "es5",
14 include: 'node_modules/**',
15 exclude: ['node_modules/foo/**', 'node_modules/bar/**', /node_modules/],
16 })
17 ]
18 };
19
20 export default config;
+0
-160
packages/url/CHANGELOG.md less more
0 # @rollup/plugin-url ChangeLog
1
2 ## v5.0.1
3
4 _2020-06-05_
5
6 ### Bugfixes
7
8 - fix: add name property to plugin (#433)
9
10 ## v5.0.0
11
12 _2020-05-11_
13
14 ### Breaking Changes
15
16 - fix: Don't append path separator on empty dirname (#212)
17
18 ## v4.0.2
19
20 _2020-02-01_
21
22 ### Updates
23
24 - chore: update dependencies (d048a39)
25
26 ## v4.0.1
27
28 _2020-01-07_
29
30 ### Bugfixes
31
32 - fix: windows compatible, tests (#146)
33
34 ### Updates
35
36 - chore: update changelog for v4.0.0 (087be59)
37
38 ## 4.0.0
39
40 _2019-11-25_
41
42 - **Breaking:** Minimum compatible Rollup version is 1.20.0
43 - **Breaking:** Minimum supported Node version is 8.0.0
44 - Published as @rollup/plugins-url
45
46 ### Breaking Changes
47
48 - Version 4.0.0 requires Rollup v1.20.0 or higher
49
50 ## 3.0.0
51
52 _2019-10-08_
53
54 - Drop node 8 support as its maintenance will be closed in [December](https://github.com/nodejs/Release#release-schedule)
55 - Migrate to MIT License
56
57 ## 2.2.4
58
59 _2019-10-08_
60
61 - Fallback to `mkdirp` to keep working on node <= 8
62
63 ## 2.2.3
64
65 _2019-10-08_
66
67 - Remove `mkpath` from dependencies ([#24](https://github.com/rollup/rollup-plugin-url/pull/24))
68 - Update dev dependencies
69
70 ## 2.2.2
71
72 _2019-06-13_
73
74 - Dependencies update
75
76 ## 2.2.1
77
78 _2019-04-10_
79
80 - Fix `dirname` substitution on Windows ([#21](https://github.com/rollup/rollup-plugin-url/pull/21))
81
82 ## 2.2.0
83
84 _2019-01-29_
85
86 - Add `destDir` option ([#19](https://github.com/rollup/rollup-plugin-url/pull/19))
87 - Update dependencies
88
89 ## 2.1.0
90
91 _2018-12-02_
92
93 - Add `fileName` option ([#17](https://github.com/rollup/rollup-plugin-url/pull/17))
94
95 ## 2.0.1
96
97 _2018-10-09_
98
99 - Ensure destination folder exists while `generateBundle` hook performs
100
101 ## 2.0.0
102
103 _2018-10-01_
104
105 ### Breaking Changes
106
107 - Version 2.0.0 requires rollup@0.60 and higher – deprecated `onwrite` hook replaced with new `generateBundle` hook, so plugin will not work with earlier versions of Rollup.
108 Use version 1.4 with rollup<0.60
109
110 ## 1.4.0
111
112 _2018-04-17_
113
114 - Add support for `output.dir` option
115 - Update dependencies
116
117 ## 1.3.0
118
119 _2017-09-17_
120
121 - Internal update: it builds now with rollup@0.50
122
123 ## 1.2.0
124
125 _2017-06-09_
126
127 - Add ability to prevent emitting any files with the `emitFiles=false` option.
128
129 ## 1.1.0
130
131 _2017-04-12_
132
133 - Set default limit to 14kb
134
135 ## 1.0.0
136
137 _2017-04-10_
138
139 - Migrate to newer Rollup API (#5).
140 - Minimal `rollup` version is `0.32.4`
141 - Braking: `write` method was removed
142
143 ## 0.1.2
144
145 _2016-08-30_
146
147 - Add public path option (#1)
148
149 ## 0.1.1
150
151 _2016-02-08_
152
153 - Drop charset, it's not needed
154
155 ## 0.1.0
156
157 _2016-02-08_
158
159 - Initial release
+0
-137
packages/url/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-url
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-url
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-url
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-url
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-url
10
11 🍣 A Rollup plugin which imports files as data-URIs or ES Modules.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-url --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import url from '@rollup/plugin-url';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [url()]
39 };
40 ```
41
42 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).
43
44 With an accompanying file `src/index.js`, the local `image.svg` file would now be importable as seen below:
45
46 ```js
47 // src/index.js
48 import svg from './image.svg';
49 console.log(`svg contents: ${svg}`);
50 ```
51
52 ## Options
53
54 ### `exclude`
55
56 Type: `String` | `Array[...String]`<br>
57 Default: `null`
58
59 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 no files are ignored.
60
61 ### `include`
62
63 Type: `String` | `Array[...String]`<br>
64 Default: `['**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif']`
65
66 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 .svg, .png, .jpg, and .gif files are targeted.
67
68 ### `limit`
69
70 Type: `Number`<br>
71 Default: `14336` (14kb)
72
73 The file size limit for inline files. If a file exceeds this limit, it will be copied to the destination folder and the hashed filename will be provided instead. If `limit` is set to `0` all files will be copied.
74
75 ### `publicPath`
76
77 Type: `String`<br>
78 Default: (empty string)
79
80 A string which will be added in front of filenames when they are not inlined but are copied.
81
82 ### `emitFiles`
83
84 Type: `Boolean`<br>
85 Default: `true`
86
87 If `false`, will prevent files being emitted by this plugin. This is useful for when you are using Rollup to emit both a client-side and server-side bundle.
88
89 ### `fileName`
90
91 Type: `String`<br>
92 Default: `'[hash][extname]'`
93
94 If `emitFiles` is `true`, this option can be used to rename the emitted files. It accepts the following string replacements:
95
96 - `[hash]` - The hash value of the file's contents
97 - `[name]` - The name of the imported file (without its file extension)
98 - `[extname]` - The extension of the imported file (including the leading `.`)
99 - `[dirname]` - The parent directory name of the imported file (including trailing `/`)
100
101 ### sourceDir
102
103 Type: `String`<br>
104 Default: (empty string)
105
106 When using the `[dirname]` replacement in `fileName`, use this directory as the source directory from which to create the file path rather than the parent directory of the imported file. For example:
107
108 _src/path/to/file.js_
109
110 ```js
111 import png from './image.png';
112 ```
113
114 _rollup.config.js_
115
116 ```js
117 url({
118 fileName: '[dirname][hash][extname]',
119 sourceDir: path.join(__dirname, 'src')
120 });
121 ```
122
123 Emitted File: `path/to/image.png`
124
125 ### `destDir`
126
127 Type: `String`<br>
128 Default: (empty string)
129
130 The destination dir to copy assets, usually used to rebase the assets according to HTML files.
131
132 ## Meta
133
134 [CONTRIBUTING](/.github/CONTRIBUTING.md)
135
136 [LICENSE (MIT)](/LICENSE)
+0
-69
packages/url/package.json less more
0 {
1 "name": "@rollup/plugin-url",
2 "version": "5.0.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Import files as data-URIs or ES Modules",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Arpad Borsos <arpad.borsos@googlemail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/url/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "url"
42 ],
43 "peerDependencies": {
44 "rollup": "^1.20.0||^2.0.0"
45 },
46 "dependencies": {
47 "@rollup/pluginutils": "^3.1.0",
48 "make-dir": "^3.1.0",
49 "mime": "^2.4.6"
50 },
51 "devDependencies": {
52 "del": "^5.1.0",
53 "globby": "^11.0.1",
54 "rollup": "^2.23.0"
55 },
56 "ava": {
57 "babel": {
58 "compileEnhancements": false
59 },
60 "files": [
61 "!**/fixtures/**",
62 "!**/output/**",
63 "!**/helpers/**",
64 "!**/recipes/**",
65 "!**/types.ts"
66 ]
67 }
68 }
+0
-12
packages/url/rollup.config.js less more
0 import pkg from './package.json';
1
2 const external = Object.keys(pkg.dependencies).concat(['crypto', 'path', 'fs', 'util']);
3
4 export default {
5 input: 'src/index.js',
6 external,
7 output: [
8 { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'auto' },
9 { file: pkg.module, format: 'es', sourcemap: true }
10 ]
11 };
+0
-126
packages/url/src/index.js less more
0 import crypto from 'crypto';
1 import path from 'path';
2 import util from 'util';
3 import fs from 'fs';
4
5 import makeDir from 'make-dir';
6 import mime from 'mime';
7 import { createFilter } from '@rollup/pluginutils';
8
9 const fsStatPromise = util.promisify(fs.stat);
10 const fsReadFilePromise = util.promisify(fs.readFile);
11 const { posix, sep } = path;
12 const defaultInclude = ['**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif'];
13
14 export default function url(options = {}) {
15 const {
16 limit = 14 * 1024,
17 include = defaultInclude,
18 exclude,
19 publicPath = '',
20 emitFiles = true,
21 fileName = '[hash][extname]'
22 } = options;
23 const filter = createFilter(include, exclude);
24
25 const copies = Object.create(null);
26
27 return {
28 name: 'url',
29 load(id) {
30 if (!filter(id)) {
31 return null;
32 }
33 return Promise.all([fsStatPromise(id), fsReadFilePromise(id)]).then(([stats, buffer]) => {
34 let data;
35 if ((limit && stats.size > limit) || limit === 0) {
36 const hash = crypto
37 .createHash('sha1')
38 .update(buffer)
39 .digest('hex')
40 .substr(0, 16);
41 const ext = path.extname(id);
42 const name = path.basename(id, ext);
43 // Determine the directory name of the file based
44 // on either the relative path provided in options,
45 // or the parent directory
46 const relativeDir = options.sourceDir
47 ? path.relative(options.sourceDir, path.dirname(id))
48 : path
49 .dirname(id)
50 .split(sep)
51 .pop();
52
53 // Generate the output file name based on some string
54 // replacement parameters
55 const outputFileName = fileName
56 .replace(/\[hash\]/g, hash)
57 .replace(/\[extname\]/g, ext)
58 // use `sep` for windows environments
59 .replace(/\[dirname\]/g, relativeDir === '' ? '' : `${relativeDir}${sep}`)
60 .replace(/\[name\]/g, name);
61 // Windows fix - exports must be in unix format
62 data = `${publicPath}${outputFileName.split(sep).join(posix.sep)}`;
63 copies[id] = outputFileName;
64 } else {
65 const mimetype = mime.getType(id);
66 const isSVG = mimetype === 'image/svg+xml';
67 data = isSVG ? encodeSVG(buffer) : buffer.toString('base64');
68 const encoding = isSVG ? '' : ';base64';
69 data = `data:${mimetype}${encoding},${data}`;
70 }
71 return `export default "${data}"`;
72 });
73 },
74 generateBundle: async function write(outputOptions) {
75 // Allow skipping saving files for server side builds.
76 if (!emitFiles) return;
77
78 const base = options.destDir || outputOptions.dir || path.dirname(outputOptions.file);
79
80 await makeDir(base);
81
82 await Promise.all(
83 Object.keys(copies).map(async (name) => {
84 const output = copies[name];
85 // Create a nested directory if the fileName pattern contains
86 // a directory structure
87 const outputDirectory = path.join(base, path.dirname(output));
88 await makeDir(outputDirectory);
89 return copy(name, path.join(base, output));
90 })
91 );
92 }
93 };
94 }
95
96 function copy(src, dest) {
97 return new Promise((resolve, reject) => {
98 const read = fs.createReadStream(src);
99 read.on('error', reject);
100 const write = fs.createWriteStream(dest);
101 write.on('error', reject);
102 write.on('finish', resolve);
103 read.pipe(write);
104 });
105 }
106
107 // https://github.com/filamentgroup/directory-encoder/blob/master/lib/svg-uri-encoder.js
108 function encodeSVG(buffer) {
109 return (
110 encodeURIComponent(
111 buffer
112 .toString('utf-8')
113 // strip newlines and tabs
114 .replace(/[\n\r]/gim, '')
115 .replace(/\t/gim, ' ')
116 // strip comments
117 .replace(/<!--(.*(?=-->))-->/gim, '')
118 // replace
119 .replace(/'/gim, '\\i')
120 )
121 // encode brackets
122 .replace(/\(/g, '%28')
123 .replace(/\)/g, '%29')
124 );
125 }
+0
-3
packages/url/test/fixtures/png.js less more
0 import png from './png.png';
1
2 export default png;
packages/url/test/fixtures/png.png less more
Binary diff not shown
+0
-3
packages/url/test/fixtures/svg.js less more
0 import svg from './svg.svg';
1
2 export default svg;
+0
-1
packages/url/test/fixtures/svg.svg less more
0 <svg><path d=""/></svg>
+0
-205
packages/url/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://ava.li).
5
6 ## copy "large" binary files, limit: 10
7
8 > Snapshot 1
9
10 `var svg = "98ea1a8cc8cd9baf.svg";␊
11
12 export default svg;␊
13 `
14
15 > Snapshot 2
16
17 [
18 'output/98ea1a8cc8cd9baf.svg',
19 ]
20
21 ## copy files, limit: 0
22
23 > Snapshot 1
24
25 `var svg = "98ea1a8cc8cd9baf.svg";␊
26
27 export default svg;␊
28 `
29
30 > Snapshot 2
31
32 [
33 'output/98ea1a8cc8cd9baf.svg',
34 ]
35
36 ## copy the file according to destDir option
37
38 > Snapshot 1
39
40 `var png = "fixtures/6b71fbe07b498a82.png";␊
41
42 export default png;␊
43 `
44
45 > Snapshot 2
46
47 [
48 'output/dest/fixtures/6b71fbe07b498a82.png',
49 ]
50
51 ## create a file with the name and extension of the file
52
53 > Snapshot 1
54
55 `var png = "png.png";␊
56
57 export default png;␊
58 `
59
60 > Snapshot 2
61
62 [
63 'output/png.png',
64 ]
65
66 ## create a file with the name, hash and extension of the file
67
68 > Snapshot 1
69
70 `var png = "png-6b71fbe07b498a82.png";␊
71
72 export default png;␊
73 `
74
75 > Snapshot 2
76
77 [
78 'output/png-6b71fbe07b498a82.png',
79 ]
80
81 ## create a nested directory for the output, if required
82
83 > Snapshot 1
84
85 `var png = "joker/6b71fbe07b498a82.png";␊
86
87 export default png;␊
88 `
89
90 > Snapshot 2
91
92 [
93 'output/joker/6b71fbe07b498a82.png',
94 ]
95
96 ## inline "large" files
97
98 > Snapshot 1
99
100 `var svg = "98ea1a8cc8cd9baf.svg";␊
101
102 export default svg;␊
103 `
104
105 > Snapshot 2
106
107 []
108
109 ## inline binary files
110
111 > Snapshot 1
112
113 `var png = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGP6DwABBQECz6AuzQAAAABJRU5ErkJggg==";␊
114
115 export default png;␊
116 `
117
118 > Snapshot 2
119
120 []
121
122 ## inline text files
123
124 > Snapshot 1
125
126 `var svg = "data:image/svg+xml,%3Csvg%3E%3Cpath%20d%3D%22%22%2F%3E%3C%2Fsvg%3E";␊
127
128 export default svg;␊
129 `
130
131 > Snapshot 2
132
133 []
134
135 ## limit: 0, emitFiles: false, publicPath: empty
136
137 > Snapshot 1
138
139 `var svg = "98ea1a8cc8cd9baf.svg";␊
140
141 export default svg;␊
142 `
143
144 > Snapshot 2
145
146 []
147
148 ## prefix the file with the parent directory of the source file
149
150 > Snapshot 1
151
152 `var png = "fixtures/6b71fbe07b498a82.png";␊
153
154 export default png;␊
155 `
156
157 > Snapshot 2
158
159 [
160 'output/fixtures/6b71fbe07b498a82.png',
161 ]
162
163 ## prefix the file with the parent directory of the source file, relative to the sourceDir option
164
165 > Snapshot 1
166
167 `var png = "test/fixtures/6b71fbe07b498a82.png";␊
168
169 export default png;␊
170 `
171
172 > Snapshot 2
173
174 [
175 'output/test/fixtures/6b71fbe07b498a82.png',
176 ]
177
178 ## use publicPath
179
180 > Snapshot 1
181
182 `var png = "/batman/6b71fbe07b498a82.png";␊
183
184 export default png;␊
185 `
186
187 > Snapshot 2
188
189 []
190
191 ## use publicPath with file that has empty dirname
192
193 > Snapshot 1
194
195 `var png = "/batman/6b71fbe07b498a82.png";␊
196
197 export default png;␊
198 `
199
200 > Snapshot 2
201
202 [
203 'output/6b71fbe07b498a82.png',
204 ]
packages/url/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-111
packages/url/test/test.js less more
0 const { readFileSync } = require('fs');
1 const { join, posix, sep } = require('path');
2
3 const test = require('ava');
4 const del = require('del');
5 const globby = require('globby');
6 const { rollup } = require('rollup');
7
8 const url = require('..');
9
10 require('source-map-support').install();
11
12 process.chdir(__dirname);
13
14 const outputFile = 'output/bundle.js';
15 const outputDir = 'output/';
16
17 const run = async (t, type, opts) => {
18 const defaults = { emitFiles: false, publicPath: '' };
19 const options = { ...defaults, ...opts };
20 const bundle = await rollup({
21 input: `fixtures/${type}.js`,
22 plugins: [url(options)]
23 });
24 await bundle.write({ format: 'es', file: outputFile });
25 const code = readFileSync(outputFile, 'utf-8');
26 // Windows fix, glob paths must be in unix format
27 const glob = join(outputDir, `**/*.${type}`)
28 .split(sep)
29 .join(posix.sep);
30
31 t.snapshot(code);
32 t.snapshot(await globby(glob));
33 };
34
35 test.beforeEach(() => del(outputDir));
36
37 test.serial('inline binary files', async (t) => {
38 await run(t, 'png', { limit: 10 * 1024 });
39 });
40
41 test.serial('inline text files', async (t) => {
42 await run(t, 'svg', { limit: 10 * 1024 });
43 });
44
45 test.serial('inline "large" files', async (t) => {
46 await run(t, 'svg', { limit: 10 });
47 });
48
49 test.serial('limit: 0, emitFiles: false, publicPath: empty', async (t) => {
50 await run(t, 'svg', { limit: 0, publicPath: '', emitFiles: false });
51 });
52
53 test.serial('copy files, limit: 0', async (t) => {
54 await run(t, 'svg', { limit: 0, emitFiles: true });
55 });
56
57 test.serial('copy "large" binary files, limit: 10', async (t) => {
58 await run(t, 'svg', { limit: 10, emitFiles: true });
59 });
60
61 test.serial('use publicPath', async (t) => {
62 await run(t, 'png', { limit: 10, publicPath: '/batman/' });
63 });
64
65 test.serial('use publicPath with file that has empty dirname', async (t) => {
66 await run(t, 'png', {
67 limit: 10,
68 publicPath: '/batman/',
69 emitFiles: true,
70 fileName: '[dirname][hash][extname]',
71 sourceDir: join(__dirname, './fixtures')
72 });
73 });
74
75 test.serial('create a nested directory for the output, if required', async (t) => {
76 await run(t, 'png', { limit: 10, emitFiles: true, fileName: 'joker/[hash][extname]' });
77 });
78
79 test.serial('create a file with the name and extension of the file', async (t) => {
80 await run(t, 'png', { limit: 10, emitFiles: true, fileName: '[name][extname]' });
81 });
82
83 test.serial('create a file with the name, hash and extension of the file', async (t) => {
84 await run(t, 'png', { limit: 10, emitFiles: true, fileName: '[name]-[hash][extname]' });
85 });
86
87 test.serial('prefix the file with the parent directory of the source file', async (t) => {
88 await run(t, 'png', { limit: 10, emitFiles: true, fileName: '[dirname][hash][extname]' });
89 });
90
91 test.serial(
92 'prefix the file with the parent directory of the source file, relative to the sourceDir option',
93 async (t) => {
94 await run(t, 'png', {
95 limit: 10,
96 emitFiles: true,
97 fileName: '[dirname][hash][extname]',
98 sourceDir: join(__dirname, '..')
99 });
100 }
101 );
102
103 test.serial('copy the file according to destDir option', async (t) => {
104 await run(t, 'png', {
105 limit: 10,
106 emitFiles: true,
107 fileName: '[dirname][hash][extname]',
108 destDir: join(__dirname, 'output/dest')
109 });
110 });
+0
-40
packages/virtual/CHANGELOG.md less more
0 # @rollup/plugin-virtual ChangeLog
1
2 ## v2.0.3
3
4 _2020-06-22_
5
6 ### Updates
7
8 - docs: fix file name in readme (#444)
9
10 ## v2.0.2
11
12 _2020-05-11_
13
14 ### Updates
15
16 - docs: example use for bundle input (#323)
17
18 ## v2.0.1
19
20 _2020-02-01_
21
22 ### Updates
23
24 - chore: update devDeps (3e47e87)
25 - docs: typo in virtual plugin readme (#132)
26
27 ## 2.0.0
28
29 - **Breaking:** Minimum compatible Rollup version is 1.20.0
30 - **Breaking:** Minimum supported Node version is 8.0.0
31 - Published under @rollup/plugins-virtual
32
33 ## 1.0.1
34
35 - Add missing `dist` files
36
37 ## 1.0.0
38
39 - First release
+0
-86
packages/virtual/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-virtual
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-virtual
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-virtual
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-virtual
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-virtual
10
11 🍣 A Rollup plugin which loads virtual modules from memory.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-virtual --save-dev
23 ```
24
25 ## Usage
26
27 _Note. Use this plugin **before** any others such as node-resolve or commonjs, so they do not alter the output._
28
29 Suppose an entry file containing the snippet below exists at `src/entry.js`, and attempts to load `batman` and `src/robin.js` from memory:
30
31 ```js
32 // src/entry.js
33 import batman from 'batman';
34 import robin from './robin.js';
35
36 console.log(batman, robin);
37 ```
38
39 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
40
41 ```js
42 import virtual from '@rollup/plugin-virtual';
43
44 export default {
45 entry: 'src/entry.js',
46 // ...
47 plugins: [
48 virtual({
49 batman: `export default 'na na na na na'`,
50 'src/robin.js': `export default 'batmannnnn'`
51 })
52 ]
53 };
54 ```
55
56 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).
57
58 ## Options
59
60 This plugin has no formal options. The lone parameter for this plugin is an `Object` containing properties that correspond to a `String` containing the virtual module's code.
61
62 ## Using the Plugin for Bundle Input
63
64 It's possible to use the plugin to specify an entry point for a bundle. To do so, implement a pattern simple to what is shown below:
65
66 ```js
67 import virtual from '@rollup/plugin-virtual';
68
69 export default {
70 input: 'entry',
71 // ...
72 plugins: [
73 virtual({
74 entry: `
75 import batman from 'batcave';
76 console.log(batman);
77 `
78 })
79 ]
80 };
81 ```
82
83 ## License
84
85 [MIT](LICENSE)
+0
-74
packages/virtual/package.json less more
0 {
1 "name": "@rollup/plugin-virtual",
2 "version": "2.0.3",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Load virtual modules from memory",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Rich Harris",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/virtual#readme",
11 "bugs": "https://github.com/rollup/rollup-plugin-virtual/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=8.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "types",
36 "README.md",
37 "LICENSE"
38 ],
39 "keywords": [
40 "rollup",
41 "plugin",
42 "memory",
43 "module",
44 "modules",
45 "virtual"
46 ],
47 "peerDependencies": {
48 "rollup": "^1.20.0||^2.0.0"
49 },
50 "devDependencies": {
51 "@rollup/plugin-node-resolve": "^8.4.0",
52 "@rollup/plugin-typescript": "^6.0.0",
53 "rollup": "^2.23.0"
54 },
55 "types": "types/index.d.ts",
56 "ava": {
57 "babel": {
58 "compileEnhancements": false
59 },
60 "extensions": [
61 "ts"
62 ],
63 "require": [
64 "ts-node/register"
65 ],
66 "files": [
67 "!**/fixtures/**",
68 "!**/helpers/**",
69 "!**/recipes/**",
70 "!**/types.ts"
71 ]
72 }
73 }
+0
-14
packages/virtual/rollup.config.js less more
0 import resolve from '@rollup/plugin-node-resolve';
1 import typescript from '@rollup/plugin-typescript';
2
3 import pkg from './package.json';
4
5 export default {
6 input: 'src/index.ts',
7 plugins: [resolve(), typescript()],
8 external: ['path'],
9 output: [
10 { format: 'cjs', file: pkg.main, exports: 'auto' },
11 { format: 'esm', file: pkg.module }
12 ]
13 };
+0
-43
packages/virtual/src/index.ts less more
0 import * as path from 'path';
1
2 import { Plugin } from 'rollup';
3
4 import { RollupVirtualOptions } from '../';
5
6 const PREFIX = `\0virtual:`;
7
8 export default function virtual(modules: RollupVirtualOptions): Plugin {
9 const resolvedIds = new Map<string, string>();
10
11 Object.keys(modules).forEach((id) => {
12 resolvedIds.set(path.resolve(id), modules[id]);
13 });
14
15 return {
16 name: 'virtual',
17
18 resolveId(id, importer) {
19 if (id in modules) return PREFIX + id;
20
21 if (importer) {
22 const importerNoPrefix = importer.startsWith(PREFIX)
23 ? importer.slice(PREFIX.length)
24 : importer;
25 const resolved = path.resolve(path.dirname(importerNoPrefix), id);
26 if (resolvedIds.has(resolved)) return PREFIX + resolved;
27 }
28
29 return null;
30 },
31
32 load(id) {
33 if (id.startsWith(PREFIX)) {
34 const idNoPrefix = id.slice(PREFIX.length);
35
36 return idNoPrefix in modules ? modules[idNoPrefix] : resolvedIds.get(idNoPrefix);
37 }
38
39 return null;
40 }
41 };
42 }
+0
-27
packages/virtual/test/test.js less more
0 const path = require('path');
1
2 const test = require('ava');
3
4 const virtual = require('..');
5
6 test('loads a bare module ID from memory', (t) => {
7 const plugin = virtual({
8 foo: 'export default 42'
9 });
10
11 const resolved = plugin.resolveId('foo');
12
13 t.is(resolved, '\0virtual:foo');
14 t.is(plugin.load(resolved), 'export default 42');
15 });
16
17 test('loads an absolute path from memory', (t) => {
18 const plugin = virtual({
19 'src/foo.js': 'export default 42'
20 });
21
22 const resolved = plugin.resolveId('./foo.js', 'src/main.js');
23
24 t.is(resolved, `\0virtual:${path.resolve('src/foo.js')}`);
25 t.is(plugin.load(resolved), 'export default 42');
26 });
+0
-4
packages/virtual/tsconfig.json less more
0 {
1 "extends": "../../tsconfig.base.json",
2 "include": ["src/**/*", "types/**/*"]
3 }
+0
-10
packages/virtual/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 export interface RollupVirtualOptions {
3 [id: string]: string;
4 }
5
6 /**
7 * A Rollup plugin which loads virtual modules from memory.
8 */
9 export default function virtual(modules: RollupVirtualOptions): Plugin;
+0
-45
packages/wasm/CHANGELOG.md less more
0 # @rollup/plugin-wasm ChangeLog
1
2 ## v5.1.0
3
4 _2020-09-09_
5
6 ### Features
7
8 - feat: option to not inline wasm (#543)
9
10 ### Updates
11
12 - chore: update dependencies (8ac8237)
13
14 ## v5.0.0
15
16 _2020-05-20_
17
18 ### Breaking Changes
19
20 - chore!: drop node 8 support (ba32053)
21
22 ### Features
23
24 - feat: Switch to TypeScript & named exports (#363)
25
26 ## v4.0.0
27
28 _2020-05-02_
29
30 ### Breaking Changes
31
32 - fix: work with service workers (#334)
33
34 ## 3.0.0
35
36 _2018-02-17_
37
38 ### Breaking Changes
39
40 - A function is now imported instead of the module.
41
42 ### Features
43
44 - feat: simplify wasm imports (ace7b2a)
+0
-120
packages/wasm/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-wasm
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-wasm
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-wasm
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-wasm
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-wasm
10
11 🍣 A Rollup which allows importing and bundling [WebAssembly modules](http://webassembly.org).
12
13 WebAssembly Modules are imported asynchronous as base64 strings. Small modules [can be imported synchronously](#synchronous-modules).
14
15 ## Requirements
16
17 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
18
19 ## Install
20
21 Using npm:
22
23 ```console
24 npm install @rollup/plugin-wasm --save-dev
25 ```
26
27 ## Usage
28
29 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
30
31 ```js
32 import { wasm } from '@rollup/plugin-wasm';
33
34 export default {
35 input: 'src/index.js',
36 output: {
37 dir: 'output',
38 format: 'cjs',
39 },
40 plugins: [wasm()],
41 };
42 ```
43
44 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).
45
46 ## Options
47
48 ### `sync`
49
50 Type: `Array[...String]`<br>
51 Default: `null`
52
53 Specifies an array of strings that each represent a WebAssembly file to load synchronously. See [Synchronous Modules](#synchronous-modules) for a functional example.
54
55 ### `maxFileSize`
56
57 Type: `Number`<br>
58 Default: `14336` (14kb)
59
60 The maximum file size for inline files. If a file exceeds this limit, it will be copied to the destination folder and loaded from a separate file at runtime. If `maxFileSize` is set to `0` all files will be copied.
61
62 Files specified in `sync` to load synchronously are always inlined, regardless of size.
63
64 ### `publicPath`
65
66 Type: `String`<br>
67 Default: (empty string)
68
69 A string which will be added in front of filenames when they are not inlined but are copied.
70
71 ## WebAssembly Example
72
73 Given the following simple C file:
74
75 ```c
76 int main() {
77 return 42;
78 }
79 ```
80
81 Compile the file using `emscripten`, or the online [WasmFiddle](https://wasdk.github.io/WasmFiddle//) tool. Then import and instantiate the resulting file:
82
83 ```js
84 import sample from './sample.wasm';
85
86 sample({ ...imports }).then(({ instance }) => {
87 console.log(instance.exports.main());
88 });
89 ```
90
91 The WebAssembly is inlined as a base64 encoded string. At runtime the string is decoded and a module is returned.
92
93 _Note: The base64 string that represents the WebAssembly within the bundle will be ~33% larger than the original file._
94
95 ### Synchronous Modules
96
97 Small modules (< 4KB) can be compiled synchronously by specifying them in the configuration.
98
99 ```js
100 wasm({
101 sync: ['web/sample.wasm', 'web/foobar.wasm'],
102 });
103 ```
104
105 This means that the exports can be accessed immediately.
106
107 ```js
108 import sample from './sample.wasm';
109
110 const instance = sample({ ...imports });
111
112 console.log(instance.exports.main());
113 ```
114
115 ## Meta
116
117 [CONTRIBUTING](/.github/CONTRIBUTING.md)
118
119 [LICENSE (MIT)](/LICENSE)
+0
-75
packages/wasm/package.json less more
0 {
1 "name": "@rollup/plugin-wasm",
2 "version": "5.1.0",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Import WebAssembly code with Rollup",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "Jamen Marz <jamenmarz+gh@gmail.com>",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/wasm/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "types",
36 "README.md",
37 "LICENSE"
38 ],
39 "keywords": [
40 "rollup",
41 "plugin",
42 "webassembly",
43 "import",
44 "wasm",
45 "wast",
46 "wat",
47 "emscripten"
48 ],
49 "peerDependencies": {
50 "rollup": "^1.20.0 || ^2.0.0"
51 },
52 "devDependencies": {
53 "@rollup/plugin-typescript": "^5.0.2",
54 "del-cli": "^3.0.1",
55 "rollup": "^2.23.0",
56 "source-map": "^0.7.3"
57 },
58 "types": "types/index.d.ts",
59 "ava": {
60 "babel": {
61 "compileEnhancements": false
62 },
63 "files": [
64 "!**/fixtures/**",
65 "!**/helpers/**",
66 "!**/recipes/**",
67 "!**/types.ts"
68 ]
69 },
70 "contributors": [
71 "Jamen Marz <jamenmarz+gh@gmail.com>",
72 "Colin Eberhardt <colin.eberhardt@gmail.com>"
73 ]
74 }
+0
-10
packages/wasm/rollup.config.js less more
0 import typescript from '@rollup/plugin-typescript';
1
2 import { createConfig } from '../../shared/rollup.config';
3
4 import pkg from './package.json';
5
6 export default {
7 ...createConfig(pkg),
8 plugins: [typescript()]
9 };
+0
-139
packages/wasm/src/index.ts less more
0 import * as fs from 'fs';
1 import * as path from 'path';
2 import { createHash } from 'crypto';
3
4 import { Plugin } from 'rollup';
5
6 import { RollupWasmOptions } from '../types';
7
8 export function wasm(options: RollupWasmOptions = {}): Plugin {
9 const { sync = [], maxFileSize = 14 * 1024, publicPath = '' } = options;
10
11 const syncFiles = sync.map((x) => path.resolve(x));
12 const copies = Object.create(null);
13
14 return {
15 name: 'wasm',
16
17 load(id) {
18 if (!/\.wasm$/.test(id)) {
19 return null;
20 }
21
22 return Promise.all([fs.promises.stat(id), fs.promises.readFile(id)]).then(
23 ([stats, buffer]) => {
24 if ((maxFileSize && stats.size > maxFileSize) || maxFileSize === 0) {
25 const hash = createHash('sha1')
26 .update(buffer)
27 .digest('hex')
28 .substr(0, 16);
29
30 const filename = `${hash}.wasm`;
31 const publicFilepath = `${publicPath}${filename}`;
32
33 // only copy if the file is not marked `sync`, `sync` files are always inlined
34 if (syncFiles.indexOf(id) === -1) {
35 copies[id] = {
36 filename,
37 publicFilepath,
38 buffer
39 };
40 }
41 }
42
43 return buffer.toString('binary');
44 }
45 );
46 },
47
48 banner: `
49 function _loadWasmModule (sync, filepath, src, imports) {
50 function _instantiateOrCompile(source, imports, stream) {
51 var instantiateFunc = stream ? WebAssembly.instantiateStreaming : WebAssembly.instantiate;
52 var compileFunc = stream ? WebAssembly.compileStreaming : WebAssembly.compile;
53
54 if (imports) {
55 return instantiateFunc(source, imports)
56 } else {
57 return compileFunc(source)
58 }
59 }
60
61 var buf = null
62 var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null
63
64 if (filepath && isNode) {
65 var fs = eval('require("fs")')
66 var path = eval('require("path")')
67
68 return new Promise((resolve, reject) => {
69 fs.readFile(path.resolve(__dirname, filepath), (error, buffer) => {
70 if (error != null) {
71 reject(error)
72 }
73
74 resolve(_instantiateOrCompile(buffer, imports, false))
75 });
76 });
77 } else if (filepath) {
78 return _instantiateOrCompile(fetch(filepath), imports, true)
79 }
80
81 if (isNode) {
82 buf = Buffer.from(src, 'base64')
83 } else {
84 var raw = globalThis.atob(src)
85 var rawLength = raw.length
86 buf = new Uint8Array(new ArrayBuffer(rawLength))
87 for(var i = 0; i < rawLength; i++) {
88 buf[i] = raw.charCodeAt(i)
89 }
90 }
91
92 if(sync) {
93 var mod = new WebAssembly.Module(buf)
94 return imports ? new WebAssembly.Instance(mod, imports) : mod
95 } else {
96 return _instantiateOrCompile(buf, imports, false)
97 }
98 }
99 `.trim(),
100
101 transform(code, id) {
102 if (code && /\.wasm$/.test(id)) {
103 const isSync = syncFiles.indexOf(id) !== -1;
104 const publicFilepath = copies[id] ? `'${copies[id].publicFilepath}'` : null;
105 let src;
106
107 if (publicFilepath === null) {
108 src = Buffer.from(code, 'binary').toString('base64');
109 src = `'${src}'`;
110 } else {
111 if (isSync) {
112 this.error('non-inlined files can not be `sync`.');
113 }
114 src = null;
115 }
116
117 return `export default function(imports){return _loadWasmModule(${+isSync}, ${publicFilepath}, ${src}, imports)}`;
118 }
119 return null;
120 },
121 generateBundle: async function write() {
122 await Promise.all(
123 Object.keys(copies).map(async (name) => {
124 const copy = copies[name];
125
126 this.emitFile({
127 type: 'asset',
128 source: copy.buffer,
129 name: 'Rollup WASM Asset',
130 fileName: copy.filename
131 });
132 })
133 );
134 }
135 };
136 }
137
138 export default wasm;
+0
-6
packages/wasm/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly",
3 "WebAssembly": "readonly"
4 }
5 }
+0
-11
packages/wasm/test/fixtures/async.js less more
0 import fixture from './sample.wasm';
1
2 // eslint-disable-next-line no-undef
3 result = (async () => {
4 const module = await fixture();
5 let { instance } = await fixture({ env: {} });
6 t.is(instance.exports.main(), 3, 'wasm loaded');
7
8 instance = await WebAssembly.instantiate(module, { env: {} });
9 t.is(instance.exports.main(), 3, 'wasm loaded (via module)');
10 })();
+0
-21
packages/wasm/test/fixtures/complex.js less more
0 import fixture from './complex.wasm';
1
2 // eslint-disable-next-line no-undef
3 result = (async () => {
4 let { instance } = await fixture({
5 env: {
6 memory: new WebAssembly.Memory({ initial: 1 }),
7 log: console.log // eslint-disable-line no-console
8 }
9 });
10 t.is(instance.exports.parse(), 0, 'wasm loaded');
11
12 const module = await fixture();
13 instance = await WebAssembly.instantiate(module, {
14 env: {
15 memory: new WebAssembly.Memory({ initial: 1 }),
16 log: console.log // eslint-disable-line no-console
17 }
18 });
19 t.is(instance.exports.parse(), 0, 'wasm loaded (via module)');
20 })();
packages/wasm/test/fixtures/complex.wasm less more
Binary diff not shown
+0
-514
packages/wasm/test/fixtures/complex.wast less more
0 (module
1 (type $t0 (func (param i32)))
2 (type $t1 (func (param i32 i32) (result i32)))
3 (type $t2 (func (param i32 i32)))
4 (type $t3 (func (param i32 i32 i32)))
5 (type $t4 (func (param i32) (result i32)))
6 (type $t5 (func (result i32)))
7 (import "env" "memory" (memory $env.memory 0))
8 (import "env" "log" (func $env.log (type $t0)))
9 (func $f1 (type $t1) (param $p0 i32) (param $p1 i32) (result i32)
10 (local $l0 i32)
11 (set_local $l0
12 (i32.add
13 (get_local $p0)
14 (get_local $p1)))
15 (i32.store
16 (i32.add
17 (get_local $l0)
18 (i32.const 8))
19 (i32.add
20 (get_local $l0)
21 (i32.const 20)))
22 (i32.store
23 (i32.add
24 (get_local $l0)
25 (i32.const 0))
26 (i32.const 0))
27 (i32.store
28 (i32.add
29 (get_local $l0)
30 (i32.const 4))
31 (get_local $p0))
32 (i32.store
33 (i32.add
34 (get_local $l0)
35 (i32.const 16))
36 (get_local $p1))
37 (i32.store
38 (i32.add
39 (get_local $l0)
40 (i32.const 12))
41 (i32.const 0))
42 (return
43 (get_local $l0)))
44 (func $f2 (type $t2) (param $p0 i32) (param $p1 i32)
45 (i32.store
46 (i32.add
47 (get_local $p0)
48 (i32.const 12))
49 (i32.add
50 (i32.load
51 (i32.add
52 (get_local $p0)
53 (i32.const 12)))
54 (get_local $p1))))
55 (func $f3 (type $t2) (param $p0 i32) (param $p1 i32)
56 (i32.store8
57 (i32.add
58 (i32.load
59 (i32.add
60 (get_local $p0)
61 (i32.const 8)))
62 (i32.load
63 (i32.add
64 (get_local $p0)
65 (i32.const 12))))
66 (get_local $p1))
67 (i32.store
68 (i32.add
69 (get_local $p0)
70 (i32.const 12))
71 (i32.add
72 (i32.load
73 (i32.add
74 (get_local $p0)
75 (i32.const 12)))
76 (i32.const 1))))
77 (func $f4 (type $t3) (param $p0 i32) (param $p1 i32) (param $p2 i32)
78 (local $l0 i32)
79 (set_local $l0
80 (i32.const 0))
81 (set_local $l0
82 (i32.const 0))
83 (block $B0
84 (loop $L1
85 (br_if $B0
86 (i32.eqz
87 (i32.lt_s
88 (get_local $l0)
89 (get_local $p2))))
90 (call $f3
91 (get_local $p0)
92 (i32.load
93 (i32.add
94 (get_local $p1)
95 (i32.shl
96 (get_local $l0)
97 (i32.const 2)))))
98 (set_local $l0
99 (i32.add
100 (get_local $l0)
101 (i32.const 1)))
102 (br $L1))))
103 (func $f5 (type $t3) (param $p0 i32) (param $p1 i32) (param $p2 i32)
104 (call $f3
105 (get_local $p0)
106 (i32.const 60))
107 (call $f4
108 (get_local $p0)
109 (get_local $p1)
110 (get_local $p2))
111 (call $f3
112 (get_local $p0)
113 (i32.const 62)))
114 (func $f6 (type $t3) (param $p0 i32) (param $p1 i32) (param $p2 i32)
115 (call $f3
116 (get_local $p0)
117 (i32.const 60))
118 (call $f3
119 (get_local $p0)
120 (i32.const 47))
121 (call $f4
122 (get_local $p0)
123 (get_local $p1)
124 (get_local $p2))
125 (call $f3
126 (get_local $p0)
127 (i32.const 62)))
128 (func $f7 (type $t4) (param $p0 i32) (result i32)
129 (if $I0
130 (i32.ge_s
131 (i32.load
132 (i32.add
133 (get_local $p0)
134 (i32.const 0)))
135 (i32.load
136 (i32.add
137 (get_local $p0)
138 (i32.const 16))))
139 (then
140 (return
141 (i32.const 0))))
142 (return
143 (i32.load8_u
144 (i32.add
145 (i32.load
146 (i32.add
147 (get_local $p0)
148 (i32.const 4)))
149 (i32.load
150 (i32.add
151 (get_local $p0)
152 (i32.const 0)))))))
153 (func $f8 (type $t4) (param $p0 i32) (result i32)
154 (if $I0
155 (i32.ge_s
156 (i32.add
157 (i32.load
158 (i32.add
159 (get_local $p0)
160 (i32.const 4)))
161 (i32.load
162 (i32.add
163 (get_local $p0)
164 (i32.const 0))))
165 (i32.load
166 (i32.add
167 (get_local $p0)
168 (i32.const 16))))
169 (then
170 (return
171 (i32.const 0))))
172 (return
173 (i32.load8_u
174 (i32.add
175 (i32.add
176 (i32.load
177 (i32.add
178 (get_local $p0)
179 (i32.const 4)))
180 (i32.load
181 (i32.add
182 (get_local $p0)
183 (i32.const 0))))
184 (i32.const 1)))))
185 (func $f9 (type $t0) (param $p0 i32)
186 (i32.store
187 (i32.add
188 (get_local $p0)
189 (i32.const 0))
190 (i32.add
191 (i32.load
192 (i32.add
193 (get_local $p0)
194 (i32.const 0)))
195 (i32.const 1))))
196 (func $f10 (type $t1) (param $p0 i32) (param $p1 i32) (result i32)
197 (if $I0
198 (i32.eq
199 (get_local $p1)
200 (i32.const 0))
201 (then
202 (if $I1
203 (i32.eq
204 (call $f7
205 (get_local $p0))
206 (i32.const 0))
207 (then
208 (return
209 (i32.const 0))))
210 (i32.store
211 (i32.add
212 (get_local $p0)
213 (i32.const 0))
214 (i32.add
215 (i32.load
216 (i32.add
217 (get_local $p0)
218 (i32.const 0)))
219 (i32.const 1)))
220 (return
221 (i32.const 1))))
222 (if $I2
223 (i32.eq
224 (get_local $p1)
225 (call $f7
226 (get_local $p0)))
227 (then
228 (i32.store
229 (i32.add
230 (get_local $p0)
231 (i32.const 0))
232 (i32.add
233 (i32.load
234 (i32.add
235 (get_local $p0)
236 (i32.const 0)))
237 (i32.const 1)))
238 (return
239 (i32.const 1))))
240 (return
241 (i32.const 0)))
242 (func $f11 (type $t0) (param $p0 i32)
243 (local $l0 i32)
244 (set_local $l0
245 (call $f10
246 (get_local $p0)
247 (i32.const 95)))
248 (call $f5
249 (get_local $p0)
250 (get_global $g5)
251 (i32.div_s
252 (i32.const 8)
253 (i32.const 4)))
254 (block $B0
255 (loop $L1
256 (br_if $B0
257 (i32.eqz
258 (i32.eq
259 (i32.const 0)
260 (call $f10
261 (get_local $p0)
262 (i32.const 95)))))
263 (call $f3
264 (get_local $p0)
265 (call $f7
266 (get_local $p0)))
267 (call $f9
268 (get_local $p0))
269 (br $L1)))
270 (call $f6
271 (get_local $p0)
272 (get_global $g5)
273 (i32.div_s
274 (i32.const 8)
275 (i32.const 4))))
276 (func $f12 (type $t0) (param $p0 i32)
277 (local $l0 i32)
278 (set_local $l0
279 (call $f10
280 (get_local $p0)
281 (i32.const 42)))
282 (set_local $l0
283 (call $f10
284 (get_local $p0)
285 (i32.const 42)))
286 (call $f5
287 (get_local $p0)
288 (get_global $g6)
289 (i32.div_s
290 (i32.const 4)
291 (i32.const 4)))
292 (block $B0
293 (loop $L1
294 (br_if $B0
295 (i32.eqz
296 (i32.eq
297 (i32.const 0)
298 (call $f10
299 (get_local $p0)
300 (i32.const 42)))))
301 (call $f3
302 (get_local $p0)
303 (call $f7
304 (get_local $p0)))
305 (call $f9
306 (get_local $p0))
307 (br $L1)))
308 (call $f6
309 (get_local $p0)
310 (get_global $g6)
311 (i32.div_s
312 (i32.const 4)
313 (i32.const 4))))
314 (func $f13 (type $t0) (param $p0 i32)
315 (local $l0 i32)
316 (set_local $l0
317 (call $f7
318 (get_local $p0)))
319 (block $B0
320 (loop $L1
321 (br_if $B0
322 (i32.eqz
323 (select
324 (i32.ne
325 (get_local $l0)
326 (i32.const 10))
327 (i32.const 0)
328 (get_local $l0))))
329 (if $I2
330 (i32.eq
331 (get_local $l0)
332 (i32.const 95))
333 (then
334 (call $f11
335 (get_local $p0)))
336 (else
337 (if $I3
338 (select
339 (i32.eq
340 (call $f8
341 (get_local $p0))
342 (i32.const 42))
343 (i32.const 0)
344 (i32.eq
345 (get_local $l0)
346 (i32.const 42)))
347 (then
348 (call $f12
349 (get_local $p0)))
350 (else
351 (call $f3
352 (get_local $p0)
353 (get_local $l0))
354 (call $f9
355 (get_local $p0))))))
356 (set_local $l0
357 (call $f7
358 (get_local $p0)))
359 (br $L1))))
360 (func $f14 (type $t0) (param $p0 i32)
361 (local $l0 i32)
362 (set_local $l0
363 (call $f10
364 (get_local $p0)
365 (i32.const 35)))
366 (call $f5
367 (get_local $p0)
368 (get_global $g2)
369 (i32.div_s
370 (i32.const 8)
371 (i32.const 4)))
372 (call $f13
373 (get_local $p0))
374 (call $f6
375 (get_local $p0)
376 (get_global $g2)
377 (i32.div_s
378 (i32.const 8)
379 (i32.const 4)))
380 (call $f3
381 (get_local $p0)
382 (i32.const 10)))
383 (func $f15 (type $t0) (param $p0 i32)
384 (call $f5
385 (get_local $p0)
386 (get_global $g4)
387 (i32.div_s
388 (i32.const 8)
389 (i32.const 4)))
390 (call $f13
391 (get_local $p0))
392 (call $f6
393 (get_local $p0)
394 (get_global $g4)
395 (i32.div_s
396 (i32.const 8)
397 (i32.const 4))))
398 (func $f16 (type $t0) (param $p0 i32)
399 (local $l0 i32)
400 (set_local $l0
401 (call $f10
402 (get_local $p0)
403 (i32.const 42)))
404 (call $f5
405 (get_local $p0)
406 (get_global $g3)
407 (i32.div_s
408 (i32.const 8)
409 (i32.const 4)))
410 (call $f15
411 (get_local $p0))
412 (block $B0
413 (loop $L1
414 (br_if $B0
415 (i32.eqz
416 (select
417 (i32.eq
418 (call $f7
419 (get_local $p0))
420 (i32.const 42))
421 (i32.const 0)
422 (call $f7
423 (get_local $p0)))))
424 (call $f15
425 (get_local $p0))
426 (br $L1)))
427 (call $f6
428 (get_local $p0)
429 (get_global $g3)
430 (i32.div_s
431 (i32.const 8)
432 (i32.const 4))))
433 (func $parse (export "parse") (type $t1) (param $p0 i32) (param $p1 i32) (result i32)
434 (local $l0 i32) (local $l1 i32)
435 (set_local $l0
436 (call $f1
437 (get_local $p0)
438 (get_local $p1)))
439 (set_local $l1
440 (i32.const 1))
441 (block $B0
442 (loop $L1
443 (br_if $B0
444 (i32.eqz
445 (get_local $l1)))
446 (if $I2
447 (i32.eq
448 (call $f7
449 (get_local $l0))
450 (i32.const 35))
451 (then
452 (call $f14
453 (get_local $l0)))
454 (else
455 (if $I3
456 (select
457 (i32.eq
458 (call $f8
459 (get_local $l0))
460 (i32.const 32))
461 (i32.const 0)
462 (i32.eq
463 (call $f7
464 (get_local $l0))
465 (i32.const 42)))
466 (then
467 (call $f16
468 (get_local $l0)))
469 (else
470 (call $f13
471 (get_local $l0))
472 (call $f3
473 (get_local $l0)
474 (i32.const 10))))))
475 (set_local $l1
476 (call $f10
477 (get_local $l0)
478 (i32.const 10)))
479 (br $L1)))
480 (return
481 (get_local $l0)))
482 (func $getOffsetStart (export "getOffsetStart") (type $t5) (result i32)
483 (return
484 (i32.load
485 (i32.add
486 (i32.const 0)
487 (i32.const 0)))))
488 (func $getLength (export "getLength") (type $t4) (param $p0 i32) (result i32)
489 (return
490 (i32.load
491 (i32.add
492 (get_local $p0)
493 (i32.const 12)))))
494 (func $getStart (export "getStart") (type $t4) (param $p0 i32) (result i32)
495 (return
496 (i32.load
497 (i32.add
498 (get_local $p0)
499 (i32.const 8)))))
500 (global $g0 (mut i32) (i32.const 0))
501 (global $g1 (mut i32) (i32.const 0))
502 (global $g2 i32 (i32.const 4))
503 (global $g3 i32 (i32.const 12))
504 (global $g4 i32 (i32.const 20))
505 (global $g5 i32 (i32.const 28))
506 (global $g6 i32 (i32.const 36))
507 (data (i32.const 0) "(\00\00\00")
508 (data (i32.const 4) "h\00\00\001\00\00\00")
509 (data (i32.const 12) "u\00\00\00l\00\00\00")
510 (data (i32.const 20) "l\00\00\00i\00\00\00")
511 (data (i32.const 28) "e\00\00\00m\00\00\00")
512 (data (i32.const 36) "b\00\00\00"))
513
+0
-9
packages/wasm/test/fixtures/imports.js less more
0 import sample from './imports.wasm';
1
2 const instance = sample({
3 env: {
4 foobar: (x) => t.is(x, 10, 'got callback')
5 }
6 });
7
8 instance.exports.main();
packages/wasm/test/fixtures/imports.wasm less more
Binary diff not shown
+0
-6
packages/wasm/test/fixtures/imports.wat less more
0 (module
1 (func $foobar (import "env" "foobar") (param i32))
2 (func (export "main")
3 (call $foobar (i32.const 10))
4 )
5 )
packages/wasm/test/fixtures/sample.wasm less more
Binary diff not shown
+0
-6
packages/wasm/test/fixtures/sample.wat less more
0 (module
1 (func (export "main")
2 (result i32)
3 (i32.const 3)
4 )
5 )
+0
-9
packages/wasm/test/fixtures/sync.js less more
0 import sample from './sample.wasm';
1
2 const instance1 = sample({ env: {} });
3
4 t.is(instance1.exports.main(), 3, 'wasm loaded');
5
6 const instance2 = new WebAssembly.Instance(sample(), { env: {} });
7
8 t.is(instance2.exports.main(), 3, 'wasm loaded (via module)');
+0
-13
packages/wasm/test/fixtures/worker.js less more
0 import sample from './sample.wasm';
1 // atob doesn't exist in node, so we fake it
2 // in the browser, globalThis.atob will exist
3 // eslint-disable-next-line no-undef
4 globalThis.atob = (str) => Buffer.from(str, 'base64').toString('binary');
5 // trick the wasm loader into thinking we are in the browser
6 const realProcess = process;
7 // eslint-disable-next-line no-global-assign, no-undefined
8 process = undefined;
9 sample({});
10 // eslint-disable-next-line no-global-assign
11 process = realProcess;
12 realProcess.exit(0);
+0
-13
packages/wasm/test/snapshots/test.js.md less more
0 # Snapshot report for `test/test.js`
1
2 The actual snapshot is saved in `test.js.snap`.
3
4 Generated by [AVA](https://avajs.dev).
5
6 ## fetching WASM from separate file
7
8 > Snapshot 1
9
10 [
11 'output/85cebae0fa1ae813.wasm',
12 ]
packages/wasm/test/snapshots/test.js.snap less more
Binary diff not shown
+0
-123
packages/wasm/test/test.js less more
0 import { sep, posix, join } from 'path';
1
2 import { rollup } from 'rollup';
3 import globby from 'globby';
4 import test from 'ava';
5 import del from 'del';
6
7 import { getCode } from '../../../util/test';
8
9 import wasm from '../';
10
11 const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor;
12
13 process.chdir(__dirname);
14
15 const outputFile = './output/bundle.js';
16 const outputDir = './output/';
17
18 const testBundle = async (t, bundle) => {
19 const code = await getCode(bundle);
20 const func = new AsyncFunction('t', `let result;\n\n${code}\n\nreturn result;`);
21 return func(t);
22 };
23
24 test('async compiling', async (t) => {
25 t.plan(2);
26
27 const bundle = await rollup({
28 input: 'fixtures/async.js',
29 plugins: [wasm()]
30 });
31 await testBundle(t, bundle);
32 });
33
34 test('fetching WASM from separate file', async (t) => {
35 t.plan(3);
36
37 const bundle = await rollup({
38 input: 'fixtures/complex.js',
39 plugins: [
40 wasm({
41 maxFileSize: 0
42 })
43 ]
44 });
45
46 await bundle.write({ format: 'cjs', file: outputFile });
47 const glob = join(outputDir, `**/*.wasm`)
48 .split(sep)
49 .join(posix.sep);
50
51 global.result = null;
52 global.t = t;
53 require(outputFile);
54
55 await global.result;
56 t.snapshot(await globby(glob));
57 await del(outputDir);
58 });
59
60 test('complex module decoding', async (t) => {
61 t.plan(2);
62
63 const bundle = await rollup({
64 input: 'fixtures/complex.js',
65 plugins: [wasm()]
66 });
67 await testBundle(t, bundle);
68 });
69
70 test('sync compiling', async (t) => {
71 t.plan(2);
72
73 const bundle = await rollup({
74 input: 'fixtures/sync.js',
75 plugins: [
76 wasm({
77 sync: ['fixtures/sample.wasm']
78 })
79 ]
80 });
81 await testBundle(t, bundle);
82 });
83
84 test('imports', async (t) => {
85 t.plan(1);
86
87 const bundle = await rollup({
88 input: 'fixtures/imports.js',
89 plugins: [
90 wasm({
91 sync: ['fixtures/imports.wasm']
92 })
93 ]
94 });
95 await testBundle(t, bundle);
96 });
97
98 try {
99 const { Worker } = require('worker_threads');
100 test('worker', async (t) => {
101 t.plan(2);
102
103 const bundle = await rollup({
104 input: 'fixtures/worker.js',
105 plugins: [wasm()]
106 });
107 const code = await getCode(bundle);
108 const executeWorker = () => {
109 const worker = new Worker(code, { eval: true });
110 return new Promise((resolve, reject) => {
111 worker.on('error', (err) => reject(err));
112 worker.on('exit', (exitCode) => resolve(exitCode));
113 });
114 };
115 await t.notThrowsAsync(async () => {
116 const result = await executeWorker();
117 t.true(result === 0);
118 });
119 });
120 } catch (err) {
121 // worker threads aren't fully supported in Node versions before 11.7.0
122 }
+0
-24
packages/wasm/types/index.d.ts less more
0 import { Plugin } from 'rollup';
1
2 export interface RollupWasmOptions {
3 /**
4 * Specifies an array of strings that each represent a WebAssembly file to load synchronously.
5 */
6 sync?: readonly string[];
7 /**
8 * The maximum file size for inline files. If a file exceeds this limit, it will be copied to the destination folder and loaded from a separate file at runtime.
9 * If `maxFileSize` is set to `0` all files will be copied.
10 * Files specified in `sync` to load synchronously are always inlined, regardless of size.
11 */
12 maxFileSize?: Number;
13 /**
14 * A string which will be added in front of filenames when they are not inlined but are copied.
15 */
16 publicPath?: string;
17 }
18
19 /**
20 * 🍣 A Rollup which allows importing and bundling [WebAssembly modules](http://webassembly.org).
21 */
22 export function wasm(options?: RollupWasmOptions): Plugin;
23 export default wasm;
+0
-32
packages/yaml/CHANGELOG.md less more
0 # @rollup/plugin-yaml ChangeLog
1
2 ## v2.1.1
3
4 _2020-05-11_
5
6 ### Updates
7
8 - chore: rollup v2 peerDep. (dupe for pub) (74281cf)
9
10 ## v2.1.0
11
12 _2020-01-07_
13
14 ### Features
15
16 - feat: add documentMode, safe options (#137)
17
18 ## 2.0.0
19
20 _2019-10-18_
21
22 - Add `transform` option [#6](https://github.com/rollup/rollup-plugin-yaml/pull/6) (by @CharlesHolbrow)
23 - Update dependencies and build, require Node 6 [#7](https://github.com/rollup/rollup-plugin-yaml/pull/7) (by @lukastaegert)
24
25 ## 1.1.0
26
27 - Switch to `js-yaml` for parsing [#2](https://github.com/rollup/rollup-plugin-yaml/pull/2)
28
29 ## 1.0.0
30
31 - First release
+0
-105
packages/yaml/README.md less more
0 [npm]: https://img.shields.io/npm/v/@rollup/plugin-yaml
1 [npm-url]: https://www.npmjs.com/package/@rollup/plugin-yaml
2 [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-yaml
3 [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-yaml
4
5 [![npm][npm]][npm-url]
6 [![size][size]][size-url]
7 [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
8
9 # @rollup/plugin-yaml
10
11 🍣 A Rollup plugin which Converts YAML files to ES6 modules.
12
13 ## Requirements
14
15 This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
17 ## Install
18
19 Using npm:
20
21 ```console
22 npm install @rollup/plugin-yaml --save-dev
23 ```
24
25 ## Usage
26
27 Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
28
29 ```js
30 import yaml from '@rollup/plugin-yaml';
31
32 export default {
33 input: 'src/index.js',
34 output: {
35 dir: 'output',
36 format: 'cjs'
37 },
38 plugins: [yaml()]
39 };
40 ```
41
42 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).
43
44 With an accompanying file `src/index.js`, the local `heroes.yaml` file would now be importable as seen below:
45
46 ```js
47 // src/index.js
48 import { batman } from './heroes.yaml';
49
50 console.log(`na na na na ${batman}`);
51 ```
52
53 ## Options
54
55 ### `documentMode`
56
57 Type: `String`<br>
58 Default: `single`
59
60 If `single`, specifies that the target YAML documents contain only one document in the target file(s). If more than one [document stream](https://yaml.org/spec/1.2/spec.html#id2801681) exists in the target YAML file(s), set `documentMode: 'multi'`.
61
62 ### `exclude`
63
64 Type: `String` | `Array[...String]`<br>
65 Default: `null`
66
67 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 no files are ignored.
68
69 ### `include`
70
71 Type: `String` | `Array[...String]`<br>
72 Default: `null`
73
74 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 all files are targeted.
75
76 ### `safe`
77
78 Type: `Boolean`<br>
79 Default: `true`
80
81 If `true`, specifies that the data in the target YAML file(s) contain trusted data and should be loaded normally. If `false`, data is assumed to be untrusted and will be loaded using [safety methods](https://github.com/nodeca/js-yaml#safeload-string---options-).
82
83 ### `transform`
84
85 Type: `Function`<br>
86 Default: `undefined`
87
88 A function which can optionally mutate parsed YAML. The function should return the mutated `object`, or `undefined` which will make no changes to the parsed YAML.
89
90 ```js
91 yaml({
92 transform(data) {
93 if (Array.isArray(data)) {
94 return data.filter(character => !character.batman);
95 }
96 }
97 });
98 ```
99
100 ## Meta
101
102 [CONTRIBUTING](/.github/CONTRIBUTING.md)
103
104 [LICENSE (MIT)](/LICENSE)
+0
-69
packages/yaml/package.json less more
0 {
1 "name": "@rollup/plugin-yaml",
2 "version": "2.1.1",
3 "publishConfig": {
4 "access": "public"
5 },
6 "description": "Convert YAML files to ES6 modules",
7 "license": "MIT",
8 "repository": "rollup/plugins",
9 "author": "rollup",
10 "homepage": "https://github.com/rollup/plugins/tree/master/packages/yaml/#readme",
11 "bugs": "https://github.com/rollup/plugins/issues",
12 "main": "dist/index.js",
13 "module": "dist/index.es.js",
14 "engines": {
15 "node": ">=10.0.0"
16 },
17 "scripts": {
18 "build": "rollup -c",
19 "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
20 "ci:lint": "pnpm run build && pnpm run lint",
21 "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
22 "ci:test": "pnpm run test -- --verbose",
23 "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
24 "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
25 "lint:js": "eslint --fix --cache src test --ext .js,.ts",
26 "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
27 "prebuild": "del-cli dist",
28 "prepare": "pnpm run build",
29 "prepublishOnly": "pnpm run lint",
30 "pretest": "pnpm run build",
31 "test": "ava"
32 },
33 "files": [
34 "dist",
35 "README.md",
36 "LICENSE"
37 ],
38 "keywords": [
39 "rollup",
40 "plugin",
41 "yaml"
42 ],
43 "peerDependencies": {
44 "rollup": "^1.20.0 || ^2.0.0"
45 },
46 "dependencies": {
47 "@rollup/pluginutils": "^3.1.0",
48 "js-yaml": "^3.14.0",
49 "tosource": "^1.0.0"
50 },
51 "devDependencies": {
52 "@rollup/plugin-node-resolve": "^8.4.0",
53 "del-cli": "^3.0.1",
54 "rollup": "^2.23.0",
55 "source-map-support": "^0.5.19"
56 },
57 "ava": {
58 "babel": {
59 "compileEnhancements": false
60 },
61 "files": [
62 "!**/fixtures/**",
63 "!**/helpers/**",
64 "!**/recipes/**",
65 "!**/types.ts"
66 ]
67 }
68 }
+0
-10
packages/yaml/rollup.config.js less more
0 import pkg from './package.json';
1
2 export default {
3 input: 'src/index.js',
4 external: Object.keys(pkg.dependencies),
5 output: [
6 { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'auto' },
7 { file: pkg.module, format: 'es', sourcemap: true }
8 ]
9 };
+0
-57
packages/yaml/src/index.js less more
0 import YAML from 'js-yaml';
1 import toSource from 'tosource';
2 import { createFilter, makeLegalIdentifier } from '@rollup/pluginutils';
3
4 const defaults = {
5 documentMode: 'single',
6 safe: true,
7 transform: null
8 };
9 const ext = /\.ya?ml$/;
10
11 export default function yamll(opts = {}) {
12 const options = Object.assign({}, defaults, opts);
13 const { documentMode, safe } = options;
14 const filter = createFilter(options.include, options.exclude);
15 let loadMethod = null;
16
17 if (documentMode === 'single') {
18 loadMethod = safe ? YAML.load : YAML.safeLoad;
19 } else if (documentMode === 'multi') {
20 loadMethod = safe ? YAML.loadAll : YAML.safeLoadAll;
21 } else {
22 this.error(
23 `plugin-yaml → documentMode: '${documentMode}' is not a valid value. Please choose 'single' or 'multi'`
24 );
25 }
26
27 return {
28 name: 'yaml',
29
30 transform(content, id) {
31 if (!ext.test(id)) return null;
32 if (!filter(id)) return null;
33
34 let data = loadMethod(content);
35
36 if (typeof options.transform === 'function') {
37 const result = options.transform(data);
38 // eslint-disable-next-line no-undefined
39 if (result !== undefined) {
40 data = result;
41 }
42 }
43
44 const keys = Object.keys(data).filter((key) => key === makeLegalIdentifier(key));
45 const code = `var data = ${toSource(data)};\n\n`;
46 const exports = ['export default data;']
47 .concat(keys.map((key) => `export var ${key} = data.${key};`))
48 .join('\n');
49
50 return {
51 code: code + exports,
52 map: { mappings: '' }
53 };
54 }
55 };
56 }
+0
-5
packages/yaml/test/fixtures/.eslintrc less more
0 {
1 "globals": {
2 "t": "readonly"
3 }
4 }
+0
-2
packages/yaml/test/fixtures/basic/config.yaml less more
0 answer:
1 42
+0
-3
packages/yaml/test/fixtures/basic/main.js less more
0 import config from './config.yaml';
1
2 t.is(config.answer, 42);
+0
-2
packages/yaml/test/fixtures/extensionless/config.yaml less more
0 answer:
1 42
+0
-2
packages/yaml/test/fixtures/extensionless/dir/index.yaml less more
0 Are extensionless imports and /index resolutions a good idea?:
1 No.
+0
-7
packages/yaml/test/fixtures/extensionless/main.js less more
0 /* eslint-disable import/no-unresolved, import/extensions */
1
2 import config from './config';
3 import questions from './dir';
4
5 t.is(config.answer, 42);
6 t.is(questions['Are extensionless imports and /index resolutions a good idea?'], 'No.');
+0
-12
packages/yaml/test/fixtures/multi/config.yml less more
0 ---
1 version: v1
2 spec:
3 selector: 1
4 ---
5 version: v2
6 spec:
7 selector: 2
8 ---
9 version: v3
10 spec:
11 selector: 3
+0
-12
packages/yaml/test/fixtures/multi/main.js less more
0 import config from './config.yml';
1
2 t.is(config.length, 3);
3
4 const [first, second, third] = config;
5
6 t.is(first.version, 'v1');
7 t.is(first.spec.selector, 1);
8 t.is(second.version, 'v2');
9 t.is(second.spec.selector, 2);
10 t.is(third.version, 'v3');
11 t.is(third.spec.selector, 3);
+0
-2
packages/yaml/test/fixtures/named/config.yaml less more
0 answer:
1 42
+0
-3
packages/yaml/test/fixtures/named/main.js less more
0 import { answer } from './config.yaml';
1
2 t.is(answer, 42);
+0
-465
packages/yaml/test/fixtures/spec.json less more
0 {
1 "nulls": [
2 {
3 "yaml": "# comment",
4 "result": null
5 },
6 {
7 "yaml": "~",
8 "result": null
9 },
10 {
11 "yaml": "null",
12 "result": null
13 },
14 {
15 "yaml": "Null",
16 "result": null
17 },
18 {
19 "yaml": "NULL",
20 "result": null
21 },
22 {
23 "yaml": "nUlL",
24 "result": "nUlL"
25 },
26 {
27 "yaml": "!!null",
28 "result": null
29 },
30 {
31 "yaml": "!!null \"~\"",
32 "result": null
33 },
34 {
35 "yaml": "!!null null",
36 "result": null
37 }
38 ],
39
40 "trues": [
41 {
42 "yaml": "true",
43 "result": true
44 },
45 {
46 "yaml": "True",
47 "result": true
48 },
49 {
50 "yaml": "TRUE",
51 "result": true
52 },
53 {
54 "yaml": "tRuE",
55 "result": "tRuE"
56 }
57 ],
58
59 "falses": [
60 {
61 "yaml": "false",
62 "result": false
63 },
64 {
65 "yaml": "False",
66 "result": false
67 },
68 {
69 "yaml": "FALSE",
70 "result": false
71 },
72 {
73 "yaml": "fAlSe",
74 "result": "fAlSe"
75 }
76 ],
77
78 "integers": [
79 {
80 "yaml": "!!int 0",
81 "result": 0
82 },
83 {
84 "yaml": "42",
85 "result": 42
86 },
87 {
88 "yaml": "!!int \"42\"",
89 "result": 42
90 },
91 {
92 "yaml": "-42",
93 "result": -42
94 },
95 {
96 "yaml": "0b1100",
97 "result": 12
98 },
99 {
100 "yaml": "0xC",
101 "result": 12
102 },
103 {
104 "yaml": "685230",
105 "result": 685230
106 },
107 {
108 "yaml": "+685_230",
109 "result": 685230
110 },
111 {
112 "yaml": "02472256",
113 "result": 685230
114 },
115 {
116 "yaml": "0x_0A_74_AE",
117 "result": 685230
118 },
119 {
120 "yaml": "0b1010_0111_0100_1010_1110",
121 "result": 685230
122 },
123 {
124 "yaml": "190:20:30",
125 "result": 685230
126 }
127 ],
128
129 "floats": [
130 {
131 "yaml": "1.23015e+3",
132 "result": 1230.15
133 },
134 {
135 "yaml": "12.3015e+2",
136 "result": 1230.15
137 },
138 {
139 "yaml": "1230.15",
140 "result": 1230.15
141 },
142 {
143 "yaml": "1.",
144 "result": 1.0
145 },
146 {
147 "yaml": ".1",
148 "result": 0.1
149 },
150 {
151 "yaml": "!!float \"1\"",
152 "result": 1.0
153 },
154 {
155 "yaml": "6.8523015e+5",
156 "result": 685230.15
157 },
158 {
159 "yaml": "685.230_15e+03",
160 "result": 685230.15
161 },
162 {
163 "yaml": "685_230.15",
164 "result": 685230.15
165 },
166 {
167 "yaml": "190:20:30.15",
168 "result": 685230.15
169 }
170 ],
171
172 "strings": [
173 {
174 "yaml": "Hello World",
175 "result": "Hello World"
176 },
177 {
178 "yaml": "This [is] a {string}",
179 "result": "This [is] a {string}"
180 },
181 {
182 "yaml": "A{s i[s this",
183 "result": "A{s i[s this"
184 },
185 {
186 "yaml": "\"Hello World\"",
187 "result": "Hello World"
188 },
189 {
190 "yaml": "\"Hello\nWorld\"",
191 "result": "Hello World"
192 },
193 {
194 "yaml": "Hello \"World\"",
195 "result": "Hello \"World\""
196 },
197 {
198 "yaml": "\"42\"",
199 "result": "42"
200 },
201 {
202 "yaml": "!!str true",
203 "result": "true"
204 },
205 {
206 "yaml": "\"# comment\"",
207 "result": "# comment"
208 },
209 {
210 "yaml": "\"\\xd7\"",
211 "result": "×"
212 },
213 {
214 "yaml": "\"\\xD7\"",
215 "result": "×"
216 },
217 {
218 "yaml": "\"\\u00d7\"",
219 "result": "×"
220 },
221 {
222 "yaml": "\"\\u00D7\"",
223 "result": "×"
224 },
225 {
226 "yaml": "\"\\U000000d7\"",
227 "result": "×"
228 },
229 {
230 "yaml": "\"\\U000000D7\"",
231 "result": "×"
232 },
233 {
234 "yaml": "💩",
235 "result": "💩"
236 }
237 ],
238
239 "string formatting": [
240 {
241 "yaml": "# ASCII Art\n--- |\n \\//||\\/||\n // || ||__",
242 "result": "\\//||\\/||\n// || ||__\n"
243 },
244 {
245 "yaml": "--- >\n Mark McGwire's\n year was crippled\n by a knee injury.",
246 "result": "Mark McGwire's year was crippled by a knee injury.\n"
247 },
248 {
249 "yaml": ">\n Sammy Sosa completed another\n fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\n What a year!",
250 "result": "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n"
251 }
252 ],
253
254 "directives": [
255 {
256 "yaml": "%YAML 1.1\n---",
257 "result": null
258 },
259 {
260 "yaml": "%YAML 1.0\n---",
261 "result": null
262 },
263 {
264 "yaml": "%YAML 1.9\n--- # This version doesn't exist. But that doesn't matter.",
265 "result": null
266 },
267 {
268 "yaml": "%TAG !foo! tag:yaml.org,2002:\n--- !foo!str content",
269 "result": "content"
270 }
271 ],
272
273 "simple sequences": [
274 {
275 "yaml": "- Mark McGwire\n- Sammy Sosa\n- Ken Griffey\n",
276 "result": ["Mark McGwire", "Sammy Sosa", "Ken Griffey"]
277 },
278 {
279 "yaml": "[Mark McGwire, Sammy Sosa, Ken Griffey]",
280 "result": ["Mark McGwire", "Sammy Sosa", "Ken Griffey"]
281 },
282 {
283 "yaml": "# A sequence\n---\n - Mark McGwire\n - Sammy Sosa\n - Ken Griffey\n...",
284 "result": ["Mark McGwire", "Sammy Sosa", "Ken Griffey"]
285 },
286 {
287 "yaml": "# Positions\n-\n # First place\n First\n-\n # Second place\n Second\n-\n # Third place\n Third",
288 "result": ["First", "Second", "Third"]
289 },
290 {
291 "yaml": "!!seq [1,2,3]",
292 "result": [1,2,3]
293 },
294 {
295 "yaml": "- Hello, World",
296 "result": ["Hello, World"]
297 }
298 ],
299
300 "simple mappings": [
301 {
302 "yaml": "hr: 65 # Home Runs\navg: 0.2878 # Batting average\nrbi: 147 # Runs Batted In",
303 "result": {"hr": 65, "avg": 0.2878, "rbi": 147}
304 },
305 {
306 "yaml": "{ hr: 65, avg: 0.2878, rbi: 147 }",
307 "result": {"hr": 65, "avg": 0.2878, "rbi": 147}
308 },
309 {
310 "yaml": "# A mapping\n---\n hr: 65\n avg: 0.2878\n rbi: 147\n...",
311 "result": {"hr": 65, "avg": 0.2878, "rbi": 147}
312 },
313 {
314 "yaml": "# Positions\nfirst:\n # First place\n First\nsecond:\n # Second place\n Second\nthird:\n # Third place\n Third",
315 "result": {"first": "First", "second": "Second", "third": "Third"}
316 },
317 {
318 "yaml": "!!map {a,b,c}",
319 "result": {"a": null, "b": null, "c": null}
320 },
321 {
322 "yaml": "hel[l{o, w}o]rld: goodb{y[e, w]o}rld",
323 "result": {"hel[l{o, w}o]rld": "goodb{y[e, w]o}rld"}
324 }
325 ],
326
327 "anchors & aliases": [
328 {
329 "yaml": "&str world",
330 "result": "world"
331 },
332 {
333 "yaml": "&map { hello: world }",
334 "result": {"hello": "world"}
335 },
336 {
337 "yaml": "&seq [ hello, world ]",
338 "result": ["hello", "world"]
339 },
340 {
341 "yaml": "[ &str hello, *str ]",
342 "result": ["hello", "hello"]
343 },
344 {
345 "yaml": "---\nhr:\n - Mark McGwire\n # Following node labeled SS\n - &SS Sammy Sosa\nrbi:\n - *SS # Subsequent occurrence\n - Ken Griffey",
346 "result": {"hr": ["Mark McGwire", "Sammy Sosa"], "rbi": ["Sammy Sosa", "Ken Griffey"]}
347 }
348 ],
349
350 "merging": [
351 {
352 "yaml": "'<<': { hello: world }",
353 "result": {"<<": {"hello": "world"}}
354 },
355 {
356 "yaml": "<<: { hello: world }",
357 "result": {"hello": "world"}
358 },
359 {
360 "yaml": "<<: [ { hello: world }, { hello: something else } ]",
361 "result": {"hello": "world"}
362 },
363 {
364 "yaml": "- &map { hello: world }\n- { <<: *map }",
365 "result": [{"hello": "world"}, {"hello": "world"}]
366 },
367 {
368 "yaml": "- &seq [ { hello: world }, { hello: something else } ]\n- { <<: *seq }",
369 "result": [[{"hello": "world"}, {"hello": "something else"}], {"hello": "world"}]
370 },
371 {
372 "yaml": "- &map1 { hello: world }\n- &map2 { hello: something else }\n- { <<: [ *map1, *map2 ] }",
373 "result": [{"hello": "world"}, {"hello": "something else"}, {"hello": "world"}]
374 }
375 ],
376
377 "complex documents": [
378 {
379 "yaml": "american:\n - Boston Red Sox\n - Detroit Tigers\n - New York Yankees\nnational:\n - New York Mets\n - Chicago Cubs\n - Atlanta Braves",
380 "result": {"american": ["Boston Red Sox", "Detroit Tigers", "New York Yankees"], "national": ["New York Mets", "Chicago Cubs", "Atlanta Braves"]}
381 },
382 {
383 "yaml": "-\n name: Mark McGwire\n hr: 65\n avg: 0.278\n-\n name: Sammy Sosa\n hr: 63\n avg: 0.288",
384 "result": [{"name": "Mark McGwire", "hr": 65, "avg": 0.278}, {"name": "Sammy Sosa", "hr": 63, "avg": 0.288}]
385 },
386 {
387 "yaml": "- [name , hr, avg ]\n- [Mark McGwire, 65, 0.278]\n- [Sammy Sosa , 63, 0.288]",
388 "result": [["name", "hr", "avg"], ["Mark McGwire", 65, 0.278], ["Sammy Sosa", 63, 0.288]]
389 },
390 {
391 "yaml": "Mark McGwire: {hr: 65, avg: 0.278}\nSammy Sosa: {\nhr: 63,\navg: 0.288\n}",
392 "result": {"Mark McGwire": {"hr": 65, "avg": 0.278}, "Sammy Sosa": {"hr": 63, "avg": 0.288}}
393 },
394 {
395 "yaml": "---\n# Products purchased\n- item : Super Hoop\n quantity: 1\n- item : Basketball\n quantity: 4\n- item : Big Shoes\n quantity: 1",
396 "result": [{"item": "Super Hoop", "quantity": 1}, {"item": "Basketball", "quantity": 4}, {"item": "Big Shoes", "quantity": 1}]
397 },
398 {
399 "yaml": "name: Mark McGwire\naccomplishment: >\n Mark set a major league\n home run record in 1998.\nstats: |\n 65 Home Runs\n 0.278 Batting Average",
400 "result": {"name": "Mark McGwire", "accomplishment": "Mark set a major league home run record in 1998.\n", "stats": "65 Home Runs\n0.278 Batting Average\n"}
401 }
402 ],
403
404 "large documents": [
405 {
406 "yaml": "---\ninvoice: 34843\ndate : !!str 2001-01-23\nbill-to: &id001\n given : Chris\n family : Dumars\n address:\n lines: |\n 458 Walkman Dr.\n Suite #292\n city : Royal Oak\n state : MI\n postal : 48046\nship-to: *id001\nproduct:\n - sku : BL394D\n quantity : 4\n description : Basketball\n price : 450.00\n - sku : BL4438H\n quantity : 1\n description : Super Hoop\n price : 2392.00\ntax : 251.42\ntotal: 4443.52\ncomments:\n Late afternoon is best.\n Backup contact is Nancy\n Billsmer @ 338-4338.",
407 "result": {
408 "invoice": 34843,
409 "date": "2001-01-23",
410 "bill-to": {
411 "given": "Chris",
412 "family": "Dumars",
413 "address": {"lines": "458 Walkman Dr.\nSuite #292\n", "city": "Royal Oak", "state": "MI", "postal": 48046}
414 },
415 "ship-to": {
416 "given": "Chris",
417 "family": "Dumars",
418 "address": {"lines": "458 Walkman Dr.\nSuite #292\n", "city": "Royal Oak", "state": "MI", "postal": 48046}
419 },
420 "product": [
421 {"sku": "BL394D", "quantity": 4, "description": "Basketball", "price": 450.0},
422 {"sku": "BL4438H", "quantity": 1, "description": "Super Hoop", "price": 2392.0}
423 ],
424 "tax": 251.42,
425 "total": 4443.52,
426 "comments": "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338."
427 }
428 },
429 {
430 "yaml": "- Time: !!str 2001-11-23 15:01:42 -5\n User: ed\n Warning:\n This is an error message\n for the log file\n- Time: !!str 2001-11-23 15:02:31 -5\n User: ed\n Warning:\n A slightly different error\n message.\n- Date: !!str 2001-11-23 15:03:17 -5\n User: ed\n Fatal:\n Unknown variable \"bar\"\n Stack:\n - file: TopClass.py\n line: 23\n code: |\n x = MoreObject(\"345\\n\")\n - file: MoreClass.py\n line: 58\n code: |-\n foo = bar",
431 "result": [
432 {"Time": "2001-11-23 15:01:42 -5", "User": "ed", "Warning": "This is an error message for the log file"},
433 {"Time": "2001-11-23 15:02:31 -5", "User": "ed", "Warning": "A slightly different error message."},
434 {"Date": "2001-11-23 15:03:17 -5", "User": "ed", "Fatal": "Unknown variable \"bar\"", "Stack": [
435 {"file": "TopClass.py", "line": 23, "code": "x = MoreObject(\"345\\n\")\n"},
436 {"file": "MoreClass.py", "line": 58, "code": "foo = bar"}
437 ]}
438 ]
439 },
440 {
441 "yaml": "# grammar.preg-coffee\n---\n# Matches a character class\n- Class: [ all, [\n [ literal, '[' ],\n [ label, content, maybe_some, all, [\n [ any, [\n [ literal, \\ ],\n [ reject, literal, ']' ]\n ] ],\n advance\n ] ],\n [ literal, ']' ]\n] ]\n\n# Matches a double indent (an indent followed by two space)\n- DOUBLE_INDENT: [ all, [\n INDENT,\n SPACE,\n SPACE\n] ]\n\n# Matches a single indent (a newline followed by two space)\n- INDENT: [ all, [\n NEWLINE,\n SPACE,\n SPACE\n] ]\n\n# Matches a single whitespace character (newline or space)\n- WHITESPACE: [ any, [\n NEWLINE,\n SPACE\n] ]\n\n# Matches a single CR/FL newline\n- NEWLINE: [ any,\n [ all, [\n [ literal, \"\\r\" ],\n [ maybe, literal, \"\\n\" ]\n ] ],\n [ literal, \"\\n\" ]\n]\n\n# Matches a single space\n- SPACE: [ literal, ' ' ]\n...",
442 "result": [
443 {
444 "Class": ["all", [ ["literal", "["], ["label", "content", "maybe_some", "all", [ ["any", [ ["literal", "\\"], ["reject", "literal", "]"] ] ], "advance"] ], ["literal", "]"] ] ]
445 },
446 {
447 "DOUBLE_INDENT": ["all", ["INDENT", "SPACE", "SPACE"]]
448 },
449 {
450 "INDENT": ["all", ["NEWLINE", "SPACE", "SPACE"]]
451 },
452 {
453 "WHITESPACE": ["any", ["NEWLINE", "SPACE"]]
454 },
455 {
456 "NEWLINE": ["any", ["all", [["literal", "\r"], ["maybe", "literal", "\n"]]], ["literal", "\n"]]
457 },
458 {
459 "SPACE": ["literal", " "]
460 }
461 ]
462 }
463 ]
464 }
+0
-5
packages/yaml/test/fixtures/transform/array.yaml less more
0 - name: alice
1 private: true
2 - name: bob
3 private: false
4 - name: carl
+0
-13
packages/yaml/test/fixtures/transform/main.js less more
0 /* eslint-disable no-prototype-builtins */
1
2 import array from './array.yaml';
3 import object from './object.yaml';
4
5 t.is(array.length, 2);
6 t.is(array[0].name, 'bob');
7 t.is(array[1].name, 'carl');
8
9 t.is(Object.keys(object).length, 2);
10 t.falsy(object.hasOwnProperty('alice'));
11 t.truthy(object.hasOwnProperty('bob'));
12 t.truthy(object.hasOwnProperty('carl'));
+0
-3
packages/yaml/test/fixtures/transform/object.yaml less more
0 alice: { private: true }
1 bob: { private: false }
2 carl: {}
+0
-2
packages/yaml/test/fixtures/yml/config.yml less more
0 answer:
1 42
+0
-3
packages/yaml/test/fixtures/yml/main.js less more
0 import config from './config.yml';
1
2 t.is(config.answer, 42);
+0
-113
packages/yaml/test/test.js less more
0 const test = require('ava');
1 const rollup = require('rollup');
2 const { nodeResolve } = require('@rollup/plugin-node-resolve');
3 const yamlParser = require('js-yaml');
4
5 const { testBundle } = require('../../../util/test');
6
7 const yaml = require('..');
8
9 const spec = require('./fixtures/spec.json');
10
11 require('source-map-support').install();
12
13 process.chdir(__dirname);
14
15 // Tests YAML spec conformance from https://github.com/connec/yaml-spec/blob/master/spec.json
16 // Just making sure the underlying YAML parser isn't crap
17 Object.keys(spec).forEach((key, keyIndex) => {
18 Object.keys(spec[key]).forEach((testKey, testIndex) => {
19 const fixture = spec[key][testKey];
20
21 test(`converts YAML spec ${keyIndex}:${testIndex}`, (t) => {
22 const result = yamlParser.load(fixture.yaml);
23 t.deepEqual(result, fixture.result);
24 });
25 });
26 });
27
28 test('converts yaml', async (t) => {
29 const bundle = await rollup.rollup({
30 input: 'fixtures/basic/main.js',
31 plugins: [yaml()]
32 });
33 return testBundle(t, bundle);
34 });
35
36 test('converts yml', async (t) => {
37 const bundle = await rollup.rollup({
38 input: 'fixtures/yml/main.js',
39 plugins: [yaml()]
40 });
41 return testBundle(t, bundle);
42 });
43
44 test('generates named exports', async (t) => {
45 const bundle = await rollup.rollup({
46 input: 'fixtures/named/main.js',
47 plugins: [yaml()]
48 });
49 return testBundle(t, bundle);
50 });
51
52 test('resolves extensionless imports in conjunction with nodeResolve plugin', async (t) => {
53 const bundle = await rollup.rollup({
54 input: 'fixtures/extensionless/main.js',
55 plugins: [nodeResolve({ extensions: ['.js', '.yaml'] }), yaml()]
56 });
57 return testBundle(t, bundle);
58 });
59
60 test('applies the optional transform method to parsed YAML', async (t) => {
61 const transform = (data) => {
62 if (Array.isArray(data)) {
63 return data.filter((datum) => !datum.private);
64 }
65 Object.keys(data).forEach((key) => {
66 if (data[key].private) {
67 delete data[key]; // eslint-disable-line no-param-reassign
68 }
69 });
70 return undefined; // eslint-disable-line no-undefined
71 };
72
73 const bundle = await rollup.rollup({
74 input: 'fixtures/transform/main.js',
75 plugins: [yaml({ transform })]
76 });
77 return testBundle(t, bundle);
78 });
79
80 test('documentMode: multi', async (t) => {
81 const bundle = await rollup.rollup({
82 input: 'fixtures/multi/main.js',
83 plugins: [yaml({ documentMode: 'multi' })]
84 });
85 return testBundle(t, bundle);
86 });
87
88 test('documentMode: multi, safe', async (t) => {
89 const bundle = await rollup.rollup({
90 input: 'fixtures/multi/main.js',
91 plugins: [yaml({ documentMode: 'multi', safe: false })]
92 });
93 return testBundle(t, bundle);
94 });
95
96 test('converts yaml, safe', async (t) => {
97 const bundle = await rollup.rollup({
98 input: 'fixtures/basic/main.js',
99 plugins: [yaml({ safe: false })]
100 });
101 return testBundle(t, bundle);
102 });
103
104 test('bad documentMode', async (t) => {
105 const exec = () =>
106 rollup.rollup({
107 input: 'fixtures/basic/main.js',
108 plugins: [yaml({ documentMode: true })]
109 });
110
111 t.throws(exec);
112 });
+0
-7454
pnpm-lock.yaml less more
0 importers:
1 .:
2 dependencies:
3 conventional-commits-parser: 3.1.0
4 semver: 7.3.2
5 write-pkg: 4.0.0
6 devDependencies:
7 '@ava/babel': 1.0.1
8 '@typescript-eslint/eslint-plugin': 3.7.1_fdf7ae5f472a827bd9d9601df74d9b89
9 '@typescript-eslint/parser': 3.7.1_typescript@3.9.7
10 ava: 3.11.0
11 chalk: 4.1.0
12 codecov-lite: 1.0.3
13 del-cli: 3.0.1
14 eslint-config-rollup: 0.1.0
15 execa: 4.0.3
16 globby: 11.0.1
17 husky: 4.2.5
18 lint-staged: 10.2.11
19 nyc: 15.1.0
20 pnpm: 5.4.6
21 prettier: 2.0.5
22 prettier-plugin-package: 1.0.0_prettier@2.0.5
23 ts-node: 8.10.2_typescript@3.9.7
24 tsconfig-paths: 3.9.0
25 tslib: 2.0.0
26 typescript: 3.9.7
27 yaml: 1.10.0
28 specifiers:
29 '@ava/babel': ^1.0.1
30 '@typescript-eslint/eslint-plugin': ^3.7.1
31 '@typescript-eslint/parser': ^3.7.1
32 ava: ^3.11.0
33 chalk: ^4.1.0
34 codecov-lite: ^1.0.3
35 conventional-commits-parser: ^3.1.0
36 del-cli: ^3.0.1
37 eslint-config-rollup: ^0.1.0
38 execa: ^4.0.3
39 globby: ^11.0.1
40 husky: ^4.2.5
41 lint-staged: ^10.2.11
42 nyc: ^15.1.0
43 pnpm: ^5.4.6
44 prettier: ^2.0.5
45 prettier-plugin-package: ^1.0.0
46 semver: ^7.3.2
47 ts-node: ^8.10.2
48 tsconfig-paths: ^3.9.0
49 tslib: ^2.0.0
50 typescript: ^3.9.7
51 write-pkg: ^4.0.0
52 yaml: ^1.10.0
53 packages/alias:
54 dependencies:
55 slash: 3.0.0
56 devDependencies:
57 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
58 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
59 del-cli: 3.0.1
60 rollup: 2.23.0
61 specifiers:
62 '@rollup/plugin-node-resolve': ^8.4.0
63 '@rollup/plugin-typescript': ^5.0.2
64 del-cli: ^3.0.1
65 rollup: ^2.23.0
66 slash: ^3.0.0
67 packages/auto-install:
68 devDependencies:
69 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
70 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
71 del: 5.1.0
72 node-noop: 1.0.0
73 rollup: 2.23.0
74 specifiers:
75 '@rollup/plugin-node-resolve': ^8.4.0
76 '@rollup/plugin-typescript': ^5.0.2
77 del: ^5.1.0
78 node-noop: ^1.0.0
79 rollup: ^2.23.0
80 packages/babel:
81 dependencies:
82 '@babel/helper-module-imports': 7.10.4
83 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
84 devDependencies:
85 '@babel/core': 7.10.5
86 '@babel/plugin-external-helpers': 7.10.4_@babel+core@7.10.5
87 '@babel/plugin-proposal-decorators': 7.10.5_@babel+core@7.10.5
88 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.10.5
89 '@babel/plugin-transform-runtime': 7.10.5_@babel+core@7.10.5
90 '@babel/preset-env': 7.10.4_@babel+core@7.10.5
91 '@rollup/plugin-json': 4.1.0_rollup@2.23.0
92 '@types/babel__core': 7.1.9
93 rollup: 2.23.0
94 source-map: 0.7.3
95 specifiers:
96 '@babel/core': ^7.10.5
97 '@babel/helper-module-imports': ^7.10.4
98 '@babel/plugin-external-helpers': ^7.10.4
99 '@babel/plugin-proposal-decorators': ^7.10.5
100 '@babel/plugin-syntax-dynamic-import': ^7.8.3
101 '@babel/plugin-transform-runtime': ^7.10.5
102 '@babel/preset-env': ^7.10.4
103 '@rollup/plugin-json': ^4.1.0
104 '@rollup/pluginutils': ^3.1.0
105 '@types/babel__core': ^7.1.9
106 rollup: ^2.23.0
107 source-map: ^0.7.3
108 packages/beep:
109 devDependencies:
110 rollup: 2.23.0
111 strip-ansi: 6.0.0
112 specifiers:
113 rollup: ^2.23.0
114 strip-ansi: ^6.0.0
115 packages/buble:
116 dependencies:
117 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
118 '@types/buble': 0.19.2
119 buble: 0.20.0
120 devDependencies:
121 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0+typescript@3.9.7
122 del-cli: 3.0.1
123 rollup: 2.23.0
124 source-map: 0.7.3
125 typescript: 3.9.7
126 specifiers:
127 '@rollup/plugin-typescript': ^5.0.2
128 '@rollup/pluginutils': ^3.1.0
129 '@types/buble': ^0.19.2
130 buble: ^0.20.0
131 del-cli: ^3.0.1
132 rollup: ^2.23.0
133 source-map: ^0.7.3
134 typescript: ^3.9.7
135 packages/commonjs:
136 dependencies:
137 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
138 commondir: 1.0.1
139 estree-walker: 2.0.1
140 glob: 7.1.6
141 is-reference: 1.2.1
142 magic-string: 0.25.7
143 resolve: 1.17.0
144 devDependencies:
145 '@rollup/plugin-json': 4.1.0_rollup@2.23.0
146 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
147 locate-character: 2.0.5
148 require-relative: 0.8.7
149 rollup: 2.23.0
150 shx: 0.3.2
151 source-map: 0.7.3
152 source-map-support: 0.5.19
153 typescript: 3.9.7
154 specifiers:
155 '@rollup/plugin-json': ^4.1.0
156 '@rollup/plugin-node-resolve': ^8.4.0
157 '@rollup/pluginutils': ^3.1.0
158 commondir: ^1.0.1
159 estree-walker: ^2.0.1
160 glob: ^7.1.6
161 is-reference: ^1.2.1
162 locate-character: ^2.0.5
163 magic-string: ^0.25.7
164 require-relative: ^0.8.7
165 resolve: ^1.17.0
166 rollup: ^2.23.0
167 shx: ^0.3.2
168 source-map: ^0.7.3
169 source-map-support: ^0.5.19
170 typescript: ^3.9.7
171 packages/data-uri:
172 devDependencies:
173 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
174 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
175 rollup: 2.23.0
176 specifiers:
177 '@rollup/plugin-typescript': ^5.0.2
178 '@rollup/pluginutils': ^3.0.1
179 rollup: ^2.23.0
180 packages/dsv:
181 dependencies:
182 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
183 d3-dsv: 1.2.0
184 tosource: 1.0.0
185 devDependencies:
186 del-cli: 3.0.1
187 rollup: 2.23.0
188 specifiers:
189 '@rollup/pluginutils': ^3.1.0
190 d3-dsv: 1.2.0
191 del-cli: ^3.0.1
192 rollup: ^2.23.0
193 tosource: ^1.0.0
194 packages/dynamic-import-vars:
195 dependencies:
196 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
197 estree-walker: 2.0.1
198 globby: 11.0.1
199 magic-string: 0.25.7
200 devDependencies:
201 acorn: 7.3.1
202 acorn-dynamic-import: 4.0.0_acorn@7.3.1
203 prettier: 2.0.5
204 rollup: 2.23.0
205 specifiers:
206 '@rollup/pluginutils': ^3.1.0
207 acorn: ^7.3.1
208 acorn-dynamic-import: ^4.0.0
209 estree-walker: ^2.0.1
210 globby: ^11.0.1
211 magic-string: ^0.25.7
212 prettier: ^2.0.5
213 rollup: ^2.23.0
214 packages/html:
215 devDependencies:
216 rollup: 2.23.0
217 rollup-plugin-postcss: 3.1.3
218 specifiers:
219 rollup: ^2.23.0
220 rollup-plugin-postcss: ^3.1.3
221 packages/image:
222 dependencies:
223 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
224 mini-svg-data-uri: 1.2.3
225 devDependencies:
226 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
227 rollup: 2.23.0
228 specifiers:
229 '@rollup/plugin-buble': ^0.21.3
230 '@rollup/pluginutils': ^3.1.0
231 mini-svg-data-uri: ^1.2.3
232 rollup: ^2.23.0
233 packages/inject:
234 dependencies:
235 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
236 estree-walker: 2.0.1
237 magic-string: 0.25.7
238 devDependencies:
239 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
240 del-cli: 3.0.1
241 locate-character: 2.0.5
242 rollup: 2.23.0
243 source-map: 0.7.3
244 typescript: 3.9.7
245 specifiers:
246 '@rollup/plugin-buble': ^0.21.3
247 '@rollup/pluginutils': ^3.1.0
248 del-cli: ^3.0.1
249 estree-walker: ^2.0.1
250 locate-character: ^2.0.5
251 magic-string: ^0.25.7
252 rollup: ^2.23.0
253 source-map: ^0.7.3
254 typescript: ^3.9.7
255 packages/json:
256 dependencies:
257 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
258 devDependencies:
259 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
260 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
261 rollup: 2.23.0
262 source-map-support: 0.5.19
263 specifiers:
264 '@rollup/plugin-buble': ^0.21.0
265 '@rollup/plugin-node-resolve': ^8.4.0
266 '@rollup/pluginutils': ^3.0.8
267 rollup: ^2.23.0
268 source-map-support: ^0.5.19
269 packages/legacy:
270 devDependencies:
271 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
272 del-cli: 3.0.1
273 rollup: 2.23.0
274 specifiers:
275 '@rollup/plugin-buble': ^0.21.3
276 del-cli: ^3.0.1
277 rollup: ^2.23.0
278 packages/multi-entry:
279 dependencies:
280 '@rollup/plugin-virtual': 2.0.3_rollup@2.23.0
281 matched: 5.0.0
282 devDependencies:
283 rollup: 2.23.0
284 specifiers:
285 '@rollup/plugin-virtual': ^2.0.3
286 matched: ^5.0.0
287 rollup: ^2.23.0
288 packages/node-resolve:
289 dependencies:
290 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
291 '@types/resolve': 1.17.1
292 builtin-modules: 3.1.0
293 deepmerge: 4.2.2
294 is-module: 1.0.0
295 resolve: 1.17.0
296 devDependencies:
297 '@babel/core': 7.10.5
298 '@babel/plugin-transform-typescript': 7.10.5_@babel+core@7.10.5
299 '@rollup/plugin-babel': 5.1.0_@babel+core@7.10.5+rollup@2.23.0
300 '@rollup/plugin-commonjs': 14.0.0_rollup@2.23.0
301 '@rollup/plugin-json': 4.1.0_rollup@2.23.0
302 es5-ext: 0.10.53
303 rollup: 2.23.0
304 source-map: 0.7.3
305 string-capitalize: 1.0.1
306 specifiers:
307 '@babel/core': ^7.10.5
308 '@babel/plugin-transform-typescript': ^7.10.5
309 '@rollup/plugin-babel': ^5.1.0
310 '@rollup/plugin-commonjs': ^14.0.0
311 '@rollup/plugin-json': ^4.1.0
312 '@rollup/pluginutils': ^3.1.0
313 '@types/resolve': 1.17.1
314 builtin-modules: ^3.1.0
315 deepmerge: ^4.2.2
316 es5-ext: ^0.10.53
317 is-module: ^1.0.0
318 resolve: ^1.17.0
319 rollup: ^2.23.0
320 source-map: ^0.7.3
321 string-capitalize: ^1.0.1
322 packages/pluginutils:
323 dependencies:
324 '@types/estree': 0.0.45
325 estree-walker: 2.0.1
326 picomatch: 2.2.2
327 devDependencies:
328 '@rollup/plugin-commonjs': 14.0.0_rollup@2.23.0
329 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
330 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
331 '@types/node': 14.0.26
332 '@types/picomatch': 2.2.1
333 rollup: 2.23.0
334 specifiers:
335 '@rollup/plugin-commonjs': ^14.0.0
336 '@rollup/plugin-node-resolve': ^8.4.0
337 '@rollup/plugin-typescript': ^5.0.2
338 '@types/estree': 0.0.45
339 '@types/node': ^14.0.26
340 '@types/picomatch': ^2.2.1
341 estree-walker: ^2.0.1
342 picomatch: ^2.2.2
343 rollup: ^2.23.0
344 packages/replace:
345 dependencies:
346 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
347 magic-string: 0.25.7
348 devDependencies:
349 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
350 del-cli: 3.0.1
351 locate-character: 2.0.5
352 rollup: 2.23.0
353 source-map: 0.7.3
354 typescript: 3.9.7
355 specifiers:
356 '@rollup/plugin-buble': ^0.21.3
357 '@rollup/pluginutils': ^3.1.0
358 del-cli: ^3.0.1
359 locate-character: ^2.0.5
360 magic-string: ^0.25.7
361 rollup: ^2.23.0
362 source-map: ^0.7.3
363 typescript: ^3.9.7
364 packages/run:
365 dependencies:
366 '@types/node': 14.0.26
367 devDependencies:
368 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
369 del: 5.1.0
370 rollup: 2.23.0
371 sinon: 9.0.2
372 specifiers:
373 '@rollup/plugin-typescript': ^5.0.2
374 '@types/node': 14.0.26
375 del: ^5.1.0
376 rollup: ^2.23.0
377 sinon: 9.0.2
378 packages/strip:
379 dependencies:
380 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
381 estree-walker: 2.0.1
382 magic-string: 0.25.7
383 devDependencies:
384 acorn: 7.3.1
385 rollup: 2.23.0
386 specifiers:
387 '@rollup/pluginutils': ^3.1.0
388 acorn: ^7.3.1
389 estree-walker: ^2.0.1
390 magic-string: ^0.25.7
391 rollup: ^2.23.0
392 packages/sucrase:
393 dependencies:
394 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
395 sucrase: 3.15.0
396 devDependencies:
397 '@rollup/plugin-alias': 3.1.1_rollup@2.23.0
398 rollup: 2.23.0
399 specifiers:
400 '@rollup/plugin-alias': ^3.1.1
401 '@rollup/pluginutils': ^3.1.0
402 rollup: ^2.23.0
403 sucrase: ^3.15.0
404 packages/typescript:
405 dependencies:
406 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
407 resolve: 1.17.0
408 devDependencies:
409 '@rollup/plugin-buble': 0.21.3_rollup@2.23.0
410 '@rollup/plugin-commonjs': 11.1.0_rollup@2.23.0
411 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
412 buble: 0.20.0
413 rollup: 2.23.0
414 specifiers:
415 '@rollup/plugin-buble': ^0.21.3
416 '@rollup/plugin-commonjs': ^11.1.0
417 '@rollup/plugin-typescript': ^5.0.2
418 '@rollup/pluginutils': ^3.1.0
419 buble: ^0.20.0
420 resolve: ^1.17.0
421 rollup: ^2.14.0
422 packages/url:
423 dependencies:
424 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
425 make-dir: 3.1.0
426 mime: 2.4.6
427 devDependencies:
428 del: 5.1.0
429 globby: 11.0.1
430 rollup: 2.23.0
431 specifiers:
432 '@rollup/pluginutils': ^3.1.0
433 del: ^5.1.0
434 globby: ^11.0.1
435 make-dir: ^3.1.0
436 mime: ^2.4.6
437 rollup: ^2.23.0
438 packages/virtual:
439 devDependencies:
440 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
441 '@rollup/plugin-typescript': 6.0.0_rollup@2.23.0
442 rollup: 2.23.0
443 specifiers:
444 '@rollup/plugin-node-resolve': ^8.4.0
445 '@rollup/plugin-typescript': ^6.0.0
446 rollup: ^2.23.0
447 packages/wasm:
448 devDependencies:
449 '@rollup/plugin-typescript': 5.0.2_rollup@2.23.0
450 del-cli: 3.0.1
451 rollup: 2.23.0
452 source-map: 0.7.3
453 specifiers:
454 '@rollup/plugin-typescript': ^5.0.2
455 del-cli: ^3.0.1
456 rollup: ^2.23.0
457 source-map: ^0.7.3
458 packages/yaml:
459 dependencies:
460 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
461 js-yaml: 3.14.0
462 tosource: 1.0.0
463 devDependencies:
464 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0
465 del-cli: 3.0.1
466 rollup: 2.23.0
467 source-map-support: 0.5.19
468 specifiers:
469 '@rollup/plugin-node-resolve': ^8.4.0
470 '@rollup/pluginutils': ^3.1.0
471 del-cli: ^3.0.1
472 js-yaml: ^3.14.0
473 rollup: ^2.23.0
474 source-map-support: ^0.5.19
475 tosource: ^1.0.0
476 lockfileVersion: 5.1
477 packages:
478 /@ava/babel/1.0.1:
479 dependencies:
480 '@ava/require-precompiled': 1.0.0
481 '@babel/core': 7.10.5
482 '@babel/generator': 7.10.5
483 '@babel/plugin-proposal-dynamic-import': 7.10.4_@babel+core@7.10.5
484 '@babel/plugin-proposal-nullish-coalescing-operator': 7.10.4_@babel+core@7.10.5
485 '@babel/plugin-proposal-optional-chaining': 7.10.4_@babel+core@7.10.5
486 '@babel/plugin-transform-modules-commonjs': 7.10.4_@babel+core@7.10.5
487 babel-plugin-espower: 3.0.1
488 concordance: 4.0.0
489 convert-source-map: 1.7.0
490 dot-prop: 5.2.0
491 empower-core: 1.2.0
492 escape-string-regexp: 2.0.0
493 find-up: 4.1.0
494 is-plain-object: 3.0.1
495 md5-hex: 3.0.1
496 package-hash: 4.0.0
497 pkg-conf: 3.1.0
498 source-map-support: 0.5.19
499 strip-bom-buf: 2.0.0
500 write-file-atomic: 3.0.3
501 dev: true
502 engines:
503 node: '>=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0'
504 resolution:
505 integrity: sha512-mGKpGeT6J4UjK2sxPjvwWl/GtsF9+eNyn2HHa7OknWWWYuw+rof/UaTAn1CA0z4sTw4Mruik/ihEasMw+JM6aQ==
506 /@ava/require-precompiled/1.0.0:
507 dev: true
508 engines:
509 node: '>=10'
510 resolution:
511 integrity: sha512-N7w4g+P/SUL8SF+HC4Z4e/ctV6nQ5AERC90K90r4xZQ8WVrJux9albvfyYAzygyU47CSqMWh6yJwFs8DYaeWmg==
512 /@babel/code-frame/7.10.4:
513 dependencies:
514 '@babel/highlight': 7.10.4
515 resolution:
516 integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
517 /@babel/compat-data/7.10.5:
518 dependencies:
519 browserslist: 4.13.0
520 invariant: 2.2.4
521 semver: 5.7.1
522 dev: true
523 resolution:
524 integrity: sha512-mPVoWNzIpYJHbWje0if7Ck36bpbtTvIxOi9+6WSK9wjGEXearAqlwBoTQvVjsAY2VIwgcs8V940geY3okzRCEw==
525 /@babel/core/7.10.5:
526 dependencies:
527 '@babel/code-frame': 7.10.4
528 '@babel/generator': 7.10.5
529 '@babel/helper-module-transforms': 7.10.5
530 '@babel/helpers': 7.10.4
531 '@babel/parser': 7.10.5
532 '@babel/template': 7.10.4
533 '@babel/traverse': 7.10.5
534 '@babel/types': 7.10.5
535 convert-source-map: 1.7.0
536 debug: 4.1.1
537 gensync: 1.0.0-beta.1
538 json5: 2.1.3
539 lodash: 4.17.19
540 resolve: 1.17.0
541 semver: 5.7.1
542 source-map: 0.5.7
543 dev: true
544 engines:
545 node: '>=6.9.0'
546 resolution:
547 integrity: sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==
548 /@babel/generator/7.10.5:
549 dependencies:
550 '@babel/types': 7.10.5
551 jsesc: 2.5.2
552 source-map: 0.5.7
553 dev: true
554 resolution:
555 integrity: sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==
556 /@babel/helper-annotate-as-pure/7.10.4:
557 dependencies:
558 '@babel/types': 7.10.5
559 dev: true
560 resolution:
561 integrity: sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==
562 /@babel/helper-builder-binary-assignment-operator-visitor/7.10.4:
563 dependencies:
564 '@babel/helper-explode-assignable-expression': 7.10.4
565 '@babel/types': 7.10.5
566 dev: true
567 resolution:
568 integrity: sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==
569 /@babel/helper-compilation-targets/7.10.4_@babel+core@7.10.5:
570 dependencies:
571 '@babel/compat-data': 7.10.5
572 '@babel/core': 7.10.5
573 browserslist: 4.13.0
574 invariant: 2.2.4
575 levenary: 1.1.1
576 semver: 5.7.1
577 dev: true
578 peerDependencies:
579 '@babel/core': ^7.0.0
580 resolution:
581 integrity: sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==
582 /@babel/helper-create-class-features-plugin/7.10.5_@babel+core@7.10.5:
583 dependencies:
584 '@babel/core': 7.10.5
585 '@babel/helper-function-name': 7.10.4
586 '@babel/helper-member-expression-to-functions': 7.10.5
587 '@babel/helper-optimise-call-expression': 7.10.4
588 '@babel/helper-plugin-utils': 7.10.4
589 '@babel/helper-replace-supers': 7.10.4
590 '@babel/helper-split-export-declaration': 7.10.4
591 dev: true
592 peerDependencies:
593 '@babel/core': ^7.0.0
594 resolution:
595 integrity: sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==
596 /@babel/helper-create-regexp-features-plugin/7.10.4_@babel+core@7.10.5:
597 dependencies:
598 '@babel/core': 7.10.5
599 '@babel/helper-annotate-as-pure': 7.10.4
600 '@babel/helper-regex': 7.10.5
601 regexpu-core: 4.7.0
602 dev: true
603 peerDependencies:
604 '@babel/core': ^7.0.0
605 resolution:
606 integrity: sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==
607 /@babel/helper-define-map/7.10.5:
608 dependencies:
609 '@babel/helper-function-name': 7.10.4
610 '@babel/types': 7.10.5
611 lodash: 4.17.19
612 dev: true
613 resolution:
614 integrity: sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==
615 /@babel/helper-explode-assignable-expression/7.10.4:
616 dependencies:
617 '@babel/traverse': 7.10.5
618 '@babel/types': 7.10.5
619 dev: true
620 resolution:
621 integrity: sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==
622 /@babel/helper-function-name/7.10.4:
623 dependencies:
624 '@babel/helper-get-function-arity': 7.10.4
625 '@babel/template': 7.10.4
626 '@babel/types': 7.10.5
627 dev: true
628 resolution:
629 integrity: sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==
630 /@babel/helper-get-function-arity/7.10.4:
631 dependencies:
632 '@babel/types': 7.10.5
633 dev: true
634 resolution:
635 integrity: sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==
636 /@babel/helper-hoist-variables/7.10.4:
637 dependencies:
638 '@babel/types': 7.10.5
639 dev: true
640 resolution:
641 integrity: sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==
642 /@babel/helper-member-expression-to-functions/7.10.5:
643 dependencies:
644 '@babel/types': 7.10.5
645 dev: true
646 resolution:
647 integrity: sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==
648 /@babel/helper-module-imports/7.10.4:
649 dependencies:
650 '@babel/types': 7.10.5
651 resolution:
652 integrity: sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==
653 /@babel/helper-module-transforms/7.10.5:
654 dependencies:
655 '@babel/helper-module-imports': 7.10.4
656 '@babel/helper-replace-supers': 7.10.4
657 '@babel/helper-simple-access': 7.10.4
658 '@babel/helper-split-export-declaration': 7.10.4
659 '@babel/template': 7.10.4
660 '@babel/types': 7.10.5
661 lodash: 4.17.19
662 dev: true
663 resolution:
664 integrity: sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==
665 /@babel/helper-optimise-call-expression/7.10.4:
666 dependencies:
667 '@babel/types': 7.10.5
668 dev: true
669 resolution:
670 integrity: sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==
671 /@babel/helper-plugin-utils/7.10.4:
672 dev: true
673 resolution:
674 integrity: sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==
675 /@babel/helper-regex/7.10.5:
676 dependencies:
677 lodash: 4.17.19
678 dev: true
679 resolution:
680 integrity: sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==
681 /@babel/helper-remap-async-to-generator/7.10.4:
682 dependencies:
683 '@babel/helper-annotate-as-pure': 7.10.4
684 '@babel/helper-wrap-function': 7.10.4
685 '@babel/template': 7.10.4
686 '@babel/traverse': 7.10.5
687 '@babel/types': 7.10.5
688 dev: true
689 resolution:
690 integrity: sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==
691 /@babel/helper-replace-supers/7.10.4:
692 dependencies:
693 '@babel/helper-member-expression-to-functions': 7.10.5
694 '@babel/helper-optimise-call-expression': 7.10.4
695 '@babel/traverse': 7.10.5
696 '@babel/types': 7.10.5
697 dev: true
698 resolution:
699 integrity: sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==
700 /@babel/helper-simple-access/7.10.4:
701 dependencies:
702 '@babel/template': 7.10.4
703 '@babel/types': 7.10.5
704 dev: true
705 resolution:
706 integrity: sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==
707 /@babel/helper-split-export-declaration/7.10.4:
708 dependencies:
709 '@babel/types': 7.10.5
710 dev: true
711 resolution:
712 integrity: sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==
713 /@babel/helper-validator-identifier/7.10.4:
714 resolution:
715 integrity: sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
716 /@babel/helper-wrap-function/7.10.4:
717 dependencies:
718 '@babel/helper-function-name': 7.10.4
719 '@babel/template': 7.10.4
720 '@babel/traverse': 7.10.5
721 '@babel/types': 7.10.5
722 dev: true
723 resolution:
724 integrity: sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==
725 /@babel/helpers/7.10.4:
726 dependencies:
727 '@babel/template': 7.10.4
728 '@babel/traverse': 7.10.5
729 '@babel/types': 7.10.5
730 dev: true
731 resolution:
732 integrity: sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==
733 /@babel/highlight/7.10.4:
734 dependencies:
735 '@babel/helper-validator-identifier': 7.10.4
736 chalk: 2.4.2
737 js-tokens: 4.0.0
738 resolution:
739 integrity: sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
740 /@babel/parser/7.10.5:
741 dev: true
742 engines:
743 node: '>=6.0.0'
744 hasBin: true
745 resolution:
746 integrity: sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==
747 /@babel/plugin-external-helpers/7.10.4_@babel+core@7.10.5:
748 dependencies:
749 '@babel/core': 7.10.5
750 '@babel/helper-plugin-utils': 7.10.4
751 dev: true
752 peerDependencies:
753 '@babel/core': ^7.0.0-0
754 resolution:
755 integrity: sha512-5mASqSthmRNYVXOphYzlqmR3Y8yp5SZMZhtKDh2DGV3R2PWGLEmP7qOahw66//6m4hjhlpV1bVM7xIJHt1F77Q==
756 /@babel/plugin-proposal-async-generator-functions/7.10.5_@babel+core@7.10.5:
757 dependencies:
758 '@babel/core': 7.10.5
759 '@babel/helper-plugin-utils': 7.10.4
760 '@babel/helper-remap-async-to-generator': 7.10.4
761 '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.10.5
762 dev: true
763 peerDependencies:
764 '@babel/core': ^7.0.0-0
765 resolution:
766 integrity: sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==
767 /@babel/plugin-proposal-class-properties/7.10.4_@babel+core@7.10.5:
768 dependencies:
769 '@babel/core': 7.10.5
770 '@babel/helper-create-class-features-plugin': 7.10.5_@babel+core@7.10.5
771 '@babel/helper-plugin-utils': 7.10.4
772 dev: true
773 peerDependencies:
774 '@babel/core': ^7.0.0-0
775 resolution:
776 integrity: sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==
777 /@babel/plugin-proposal-decorators/7.10.5_@babel+core@7.10.5:
778 dependencies:
779 '@babel/core': 7.10.5
780 '@babel/helper-create-class-features-plugin': 7.10.5_@babel+core@7.10.5
781 '@babel/helper-plugin-utils': 7.10.4
782 '@babel/plugin-syntax-decorators': 7.10.4_@babel+core@7.10.5
783 dev: true
784 peerDependencies:
785 '@babel/core': ^7.0.0-0
786 resolution:
787 integrity: sha512-Sc5TAQSZuLzgY0664mMDn24Vw2P8g/VhyLyGPaWiHahhgLqeZvcGeyBZOrJW0oSKIK2mvQ22a1ENXBIQLhrEiQ==
788 /@babel/plugin-proposal-dynamic-import/7.10.4_@babel+core@7.10.5:
789 dependencies:
790 '@babel/core': 7.10.5
791 '@babel/helper-plugin-utils': 7.10.4
792 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.10.5
793 dev: true
794 peerDependencies:
795 '@babel/core': ^7.0.0-0
796 resolution:
797 integrity: sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==
798 /@babel/plugin-proposal-json-strings/7.10.4_@babel+core@7.10.5:
799 dependencies:
800 '@babel/core': 7.10.5
801 '@babel/helper-plugin-utils': 7.10.4
802 '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.10.5
803 dev: true
804 peerDependencies:
805 '@babel/core': ^7.0.0-0
806 resolution:
807 integrity: sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==
808 /@babel/plugin-proposal-nullish-coalescing-operator/7.10.4_@babel+core@7.10.5:
809 dependencies:
810 '@babel/core': 7.10.5
811 '@babel/helper-plugin-utils': 7.10.4
812 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.10.5
813 dev: true
814 peerDependencies:
815 '@babel/core': ^7.0.0-0
816 resolution:
817 integrity: sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==
818 /@babel/plugin-proposal-numeric-separator/7.10.4_@babel+core@7.10.5:
819 dependencies:
820 '@babel/core': 7.10.5
821 '@babel/helper-plugin-utils': 7.10.4
822 '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.10.5
823 dev: true
824 peerDependencies:
825 '@babel/core': ^7.0.0-0
826 resolution:
827 integrity: sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==
828 /@babel/plugin-proposal-object-rest-spread/7.10.4_@babel+core@7.10.5:
829 dependencies:
830 '@babel/core': 7.10.5
831 '@babel/helper-plugin-utils': 7.10.4
832 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.10.5
833 '@babel/plugin-transform-parameters': 7.10.5_@babel+core@7.10.5
834 dev: true
835 peerDependencies:
836 '@babel/core': ^7.0.0-0
837 resolution:
838 integrity: sha512-6vh4SqRuLLarjgeOf4EaROJAHjvu9Gl+/346PbDH9yWbJyfnJ/ah3jmYKYtswEyCoWZiidvVHjHshd4WgjB9BA==
839 /@babel/plugin-proposal-optional-catch-binding/7.10.4_@babel+core@7.10.5:
840 dependencies:
841 '@babel/core': 7.10.5
842 '@babel/helper-plugin-utils': 7.10.4
843 '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.10.5
844 dev: true
845 peerDependencies:
846 '@babel/core': ^7.0.0-0
847 resolution:
848 integrity: sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==
849 /@babel/plugin-proposal-optional-chaining/7.10.4_@babel+core@7.10.5:
850 dependencies:
851 '@babel/core': 7.10.5
852 '@babel/helper-plugin-utils': 7.10.4
853 '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.10.5
854 dev: true
855 peerDependencies:
856 '@babel/core': ^7.0.0-0
857 resolution:
858 integrity: sha512-ZIhQIEeavTgouyMSdZRap4VPPHqJJ3NEs2cuHs5p0erH+iz6khB0qfgU8g7UuJkG88+fBMy23ZiU+nuHvekJeQ==
859 /@babel/plugin-proposal-private-methods/7.10.4_@babel+core@7.10.5:
860 dependencies:
861 '@babel/core': 7.10.5
862 '@babel/helper-create-class-features-plugin': 7.10.5_@babel+core@7.10.5
863 '@babel/helper-plugin-utils': 7.10.4
864 dev: true
865 peerDependencies:
866 '@babel/core': ^7.0.0-0
867 resolution:
868 integrity: sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==
869 /@babel/plugin-proposal-unicode-property-regex/7.10.4_@babel+core@7.10.5:
870 dependencies:
871 '@babel/core': 7.10.5
872 '@babel/helper-create-regexp-features-plugin': 7.10.4_@babel+core@7.10.5
873 '@babel/helper-plugin-utils': 7.10.4
874 dev: true
875 engines:
876 node: '>=4'
877 peerDependencies:
878 '@babel/core': ^7.0.0-0
879 resolution:
880 integrity: sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==
881 /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.10.5:
882 dependencies:
883 '@babel/core': 7.10.5
884 '@babel/helper-plugin-utils': 7.10.4
885 dev: true
886 peerDependencies:
887 '@babel/core': ^7.0.0-0
888 resolution:
889 integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==
890 /@babel/plugin-syntax-class-properties/7.10.4_@babel+core@7.10.5:
891 dependencies:
892 '@babel/core': 7.10.5
893 '@babel/helper-plugin-utils': 7.10.4
894 dev: true
895 peerDependencies:
896 '@babel/core': ^7.0.0-0
897 resolution:
898 integrity: sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==
899 /@babel/plugin-syntax-decorators/7.10.4_@babel+core@7.10.5:
900 dependencies:
901 '@babel/core': 7.10.5
902 '@babel/helper-plugin-utils': 7.10.4
903 dev: true
904 peerDependencies:
905 '@babel/core': ^7.0.0-0
906 resolution:
907 integrity: sha512-2NaoC6fAk2VMdhY1eerkfHV+lVYC1u8b+jmRJISqANCJlTxYy19HGdIkkQtix2UtkcPuPu+IlDgrVseZnU03bw==
908 /@babel/plugin-syntax-dynamic-import/7.8.3_@babel+core@7.10.5:
909 dependencies:
910 '@babel/core': 7.10.5
911 '@babel/helper-plugin-utils': 7.10.4
912 dev: true
913 peerDependencies:
914 '@babel/core': ^7.0.0-0
915 resolution:
916 integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==
917 /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.10.5:
918 dependencies:
919 '@babel/core': 7.10.5
920 '@babel/helper-plugin-utils': 7.10.4
921 dev: true
922 peerDependencies:
923 '@babel/core': ^7.0.0-0
924 resolution:
925 integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==
926 /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.10.5:
927 dependencies:
928 '@babel/core': 7.10.5
929 '@babel/helper-plugin-utils': 7.10.4
930 dev: true
931 peerDependencies:
932 '@babel/core': ^7.0.0-0
933 resolution:
934 integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==
935 /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.10.5:
936 dependencies:
937 '@babel/core': 7.10.5
938 '@babel/helper-plugin-utils': 7.10.4
939 dev: true
940 peerDependencies:
941 '@babel/core': ^7.0.0-0
942 resolution:
943 integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==
944 /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.10.5:
945 dependencies:
946 '@babel/core': 7.10.5
947 '@babel/helper-plugin-utils': 7.10.4
948 dev: true
949 peerDependencies:
950 '@babel/core': ^7.0.0-0
951 resolution:
952 integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==
953 /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.10.5:
954 dependencies:
955 '@babel/core': 7.10.5
956 '@babel/helper-plugin-utils': 7.10.4
957 dev: true
958 peerDependencies:
959 '@babel/core': ^7.0.0-0
960 resolution:
961 integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==
962 /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.10.5:
963 dependencies:
964 '@babel/core': 7.10.5
965 '@babel/helper-plugin-utils': 7.10.4
966 dev: true
967 peerDependencies:
968 '@babel/core': ^7.0.0-0
969 resolution:
970 integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==
971 /@babel/plugin-syntax-top-level-await/7.10.4_@babel+core@7.10.5:
972 dependencies:
973 '@babel/core': 7.10.5
974 '@babel/helper-plugin-utils': 7.10.4
975 dev: true
976 peerDependencies:
977 '@babel/core': ^7.0.0-0
978 resolution:
979 integrity: sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==
980 /@babel/plugin-syntax-typescript/7.10.4_@babel+core@7.10.5:
981 dependencies:
982 '@babel/core': 7.10.5
983 '@babel/helper-plugin-utils': 7.10.4
984 dev: true
985 peerDependencies:
986 '@babel/core': ^7.0.0-0
987 resolution:
988 integrity: sha512-oSAEz1YkBCAKr5Yiq8/BNtvSAPwkp/IyUnwZogd8p+F0RuYQQrLeRUzIQhueQTTBy/F+a40uS7OFKxnkRvmvFQ==
989 /@babel/plugin-transform-arrow-functions/7.10.4_@babel+core@7.10.5:
990 dependencies:
991 '@babel/core': 7.10.5
992 '@babel/helper-plugin-utils': 7.10.4
993 dev: true
994 peerDependencies:
995 '@babel/core': ^7.0.0-0
996 resolution:
997 integrity: sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==
998 /@babel/plugin-transform-async-to-generator/7.10.4_@babel+core@7.10.5:
999 dependencies:
1000 '@babel/core': 7.10.5
1001 '@babel/helper-module-imports': 7.10.4
1002 '@babel/helper-plugin-utils': 7.10.4
1003 '@babel/helper-remap-async-to-generator': 7.10.4
1004 dev: true
1005 peerDependencies:
1006 '@babel/core': ^7.0.0-0
1007 resolution:
1008 integrity: sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==
1009 /@babel/plugin-transform-block-scoped-functions/7.10.4_@babel+core@7.10.5:
1010 dependencies:
1011 '@babel/core': 7.10.5
1012 '@babel/helper-plugin-utils': 7.10.4
1013 dev: true
1014 peerDependencies:
1015 '@babel/core': ^7.0.0-0
1016 resolution:
1017 integrity: sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==
1018 /@babel/plugin-transform-block-scoping/7.10.5_@babel+core@7.10.5:
1019 dependencies:
1020 '@babel/core': 7.10.5
1021 '@babel/helper-plugin-utils': 7.10.4
1022 dev: true
1023 peerDependencies:
1024 '@babel/core': ^7.0.0-0
1025 resolution:
1026 integrity: sha512-6Ycw3hjpQti0qssQcA6AMSFDHeNJ++R6dIMnpRqUjFeBBTmTDPa8zgF90OVfTvAo11mXZTlVUViY1g8ffrURLg==
1027 /@babel/plugin-transform-classes/7.10.4_@babel+core@7.10.5:
1028 dependencies:
1029 '@babel/core': 7.10.5
1030 '@babel/helper-annotate-as-pure': 7.10.4
1031 '@babel/helper-define-map': 7.10.5
1032 '@babel/helper-function-name': 7.10.4
1033 '@babel/helper-optimise-call-expression': 7.10.4
1034 '@babel/helper-plugin-utils': 7.10.4
1035 '@babel/helper-replace-supers': 7.10.4
1036 '@babel/helper-split-export-declaration': 7.10.4
1037 globals: 11.12.0
1038 dev: true
1039 peerDependencies:
1040 '@babel/core': ^7.0.0-0
1041 resolution:
1042 integrity: sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==
1043 /@babel/plugin-transform-computed-properties/7.10.4_@babel+core@7.10.5:
1044 dependencies:
1045 '@babel/core': 7.10.5
1046 '@babel/helper-plugin-utils': 7.10.4
1047 dev: true
1048 peerDependencies:
1049 '@babel/core': ^7.0.0-0
1050 resolution:
1051 integrity: sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==
1052 /@babel/plugin-transform-destructuring/7.10.4_@babel+core@7.10.5:
1053 dependencies:
1054 '@babel/core': 7.10.5
1055 '@babel/helper-plugin-utils': 7.10.4
1056 dev: true
1057 peerDependencies:
1058 '@babel/core': ^7.0.0-0
1059 resolution:
1060 integrity: sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==
1061 /@babel/plugin-transform-dotall-regex/7.10.4_@babel+core@7.10.5:
1062 dependencies:
1063 '@babel/core': 7.10.5
1064 '@babel/helper-create-regexp-features-plugin': 7.10.4_@babel+core@7.10.5
1065 '@babel/helper-plugin-utils': 7.10.4
1066 dev: true
1067 peerDependencies:
1068 '@babel/core': ^7.0.0-0
1069 resolution:
1070 integrity: sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==
1071 /@babel/plugin-transform-duplicate-keys/7.10.4_@babel+core@7.10.5:
1072 dependencies:
1073 '@babel/core': 7.10.5
1074 '@babel/helper-plugin-utils': 7.10.4
1075 dev: true
1076 peerDependencies:
1077 '@babel/core': ^7.0.0-0
1078 resolution:
1079 integrity: sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==
1080 /@babel/plugin-transform-exponentiation-operator/7.10.4_@babel+core@7.10.5:
1081 dependencies:
1082 '@babel/core': 7.10.5
1083 '@babel/helper-builder-binary-assignment-operator-visitor': 7.10.4
1084 '@babel/helper-plugin-utils': 7.10.4
1085 dev: true
1086 peerDependencies:
1087 '@babel/core': ^7.0.0-0
1088 resolution:
1089 integrity: sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==
1090 /@babel/plugin-transform-for-of/7.10.4_@babel+core@7.10.5:
1091 dependencies:
1092 '@babel/core': 7.10.5
1093 '@babel/helper-plugin-utils': 7.10.4
1094 dev: true
1095 peerDependencies:
1096 '@babel/core': ^7.0.0-0
1097 resolution:
1098 integrity: sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==
1099 /@babel/plugin-transform-function-name/7.10.4_@babel+core@7.10.5:
1100 dependencies:
1101 '@babel/core': 7.10.5
1102 '@babel/helper-function-name': 7.10.4
1103 '@babel/helper-plugin-utils': 7.10.4
1104 dev: true
1105 peerDependencies:
1106 '@babel/core': ^7.0.0-0
1107 resolution:
1108 integrity: sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==
1109 /@babel/plugin-transform-literals/7.10.4_@babel+core@7.10.5:
1110 dependencies:
1111 '@babel/core': 7.10.5
1112 '@babel/helper-plugin-utils': 7.10.4
1113 dev: true
1114 peerDependencies:
1115 '@babel/core': ^7.0.0-0
1116 resolution:
1117 integrity: sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==
1118 /@babel/plugin-transform-member-expression-literals/7.10.4_@babel+core@7.10.5:
1119 dependencies:
1120 '@babel/core': 7.10.5
1121 '@babel/helper-plugin-utils': 7.10.4
1122 dev: true
1123 peerDependencies:
1124 '@babel/core': ^7.0.0-0
1125 resolution:
1126 integrity: sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==
1127 /@babel/plugin-transform-modules-amd/7.10.5_@babel+core@7.10.5:
1128 dependencies:
1129 '@babel/core': 7.10.5
1130 '@babel/helper-module-transforms': 7.10.5
1131 '@babel/helper-plugin-utils': 7.10.4
1132 babel-plugin-dynamic-import-node: 2.3.3
1133 dev: true
1134 peerDependencies:
1135 '@babel/core': ^7.0.0-0
1136 resolution:
1137 integrity: sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==
1138 /@babel/plugin-transform-modules-commonjs/7.10.4_@babel+core@7.10.5:
1139 dependencies:
1140 '@babel/core': 7.10.5
1141 '@babel/helper-module-transforms': 7.10.5
1142 '@babel/helper-plugin-utils': 7.10.4
1143 '@babel/helper-simple-access': 7.10.4
1144 babel-plugin-dynamic-import-node: 2.3.3
1145 dev: true
1146 peerDependencies:
1147 '@babel/core': ^7.0.0-0
1148 resolution:
1149 integrity: sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==
1150 /@babel/plugin-transform-modules-systemjs/7.10.5_@babel+core@7.10.5:
1151 dependencies:
1152 '@babel/core': 7.10.5
1153 '@babel/helper-hoist-variables': 7.10.4
1154 '@babel/helper-module-transforms': 7.10.5
1155 '@babel/helper-plugin-utils': 7.10.4
1156 babel-plugin-dynamic-import-node: 2.3.3
1157 dev: true
1158 peerDependencies:
1159 '@babel/core': ^7.0.0-0
1160 resolution:
1161 integrity: sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==
1162 /@babel/plugin-transform-modules-umd/7.10.4_@babel+core@7.10.5:
1163 dependencies:
1164 '@babel/core': 7.10.5
1165 '@babel/helper-module-transforms': 7.10.5
1166 '@babel/helper-plugin-utils': 7.10.4
1167 dev: true
1168 peerDependencies:
1169 '@babel/core': ^7.0.0-0
1170 resolution:
1171 integrity: sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==
1172 /@babel/plugin-transform-named-capturing-groups-regex/7.10.4_@babel+core@7.10.5:
1173 dependencies:
1174 '@babel/core': 7.10.5
1175 '@babel/helper-create-regexp-features-plugin': 7.10.4_@babel+core@7.10.5
1176 dev: true
1177 peerDependencies:
1178 '@babel/core': ^7.0.0
1179 resolution:
1180 integrity: sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==
1181 /@babel/plugin-transform-new-target/7.10.4_@babel+core@7.10.5:
1182 dependencies:
1183 '@babel/core': 7.10.5
1184 '@babel/helper-plugin-utils': 7.10.4
1185 dev: true
1186 peerDependencies:
1187 '@babel/core': ^7.0.0-0
1188 resolution:
1189 integrity: sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==
1190 /@babel/plugin-transform-object-super/7.10.4_@babel+core@7.10.5:
1191 dependencies:
1192 '@babel/core': 7.10.5
1193 '@babel/helper-plugin-utils': 7.10.4
1194 '@babel/helper-replace-supers': 7.10.4
1195 dev: true
1196 peerDependencies:
1197 '@babel/core': ^7.0.0-0
1198 resolution:
1199 integrity: sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==
1200 /@babel/plugin-transform-parameters/7.10.5_@babel+core@7.10.5:
1201 dependencies:
1202 '@babel/core': 7.10.5
1203 '@babel/helper-get-function-arity': 7.10.4
1204 '@babel/helper-plugin-utils': 7.10.4
1205 dev: true
1206 peerDependencies:
1207 '@babel/core': ^7.0.0-0
1208 resolution:
1209 integrity: sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==
1210 /@babel/plugin-transform-property-literals/7.10.4_@babel+core@7.10.5:
1211 dependencies:
1212 '@babel/core': 7.10.5
1213 '@babel/helper-plugin-utils': 7.10.4
1214 dev: true
1215 peerDependencies:
1216 '@babel/core': ^7.0.0-0
1217 resolution:
1218 integrity: sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==
1219 /@babel/plugin-transform-regenerator/7.10.4_@babel+core@7.10.5:
1220 dependencies:
1221 '@babel/core': 7.10.5
1222 regenerator-transform: 0.14.5
1223 dev: true
1224 peerDependencies:
1225 '@babel/core': ^7.0.0-0
1226 resolution:
1227 integrity: sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==
1228 /@babel/plugin-transform-reserved-words/7.10.4_@babel+core@7.10.5:
1229 dependencies:
1230 '@babel/core': 7.10.5
1231 '@babel/helper-plugin-utils': 7.10.4
1232 dev: true
1233 peerDependencies:
1234 '@babel/core': ^7.0.0-0
1235 resolution:
1236 integrity: sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==
1237 /@babel/plugin-transform-runtime/7.10.5_@babel+core@7.10.5:
1238 dependencies:
1239 '@babel/core': 7.10.5
1240 '@babel/helper-module-imports': 7.10.4
1241 '@babel/helper-plugin-utils': 7.10.4
1242 resolve: 1.17.0
1243 semver: 5.7.1
1244 dev: true
1245 peerDependencies:
1246 '@babel/core': ^7.0.0-0
1247 resolution:
1248 integrity: sha512-tV4V/FjElJ9lQtyjr5xD2IFFbgY46r7EeVu5a8CpEKT5laheHKSlFeHjpkPppW3PqzGLAuv5k2qZX5LgVZIX5w==
1249 /@babel/plugin-transform-shorthand-properties/7.10.4_@babel+core@7.10.5:
1250 dependencies:
1251 '@babel/core': 7.10.5
1252 '@babel/helper-plugin-utils': 7.10.4
1253 dev: true
1254 peerDependencies:
1255 '@babel/core': ^7.0.0-0
1256 resolution:
1257 integrity: sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==
1258 /@babel/plugin-transform-spread/7.10.4_@babel+core@7.10.5:
1259 dependencies:
1260 '@babel/core': 7.10.5
1261 '@babel/helper-plugin-utils': 7.10.4
1262 dev: true
1263 peerDependencies:
1264 '@babel/core': ^7.0.0-0
1265 resolution:
1266 integrity: sha512-1e/51G/Ni+7uH5gktbWv+eCED9pP8ZpRhZB3jOaI3mmzfvJTWHkuyYTv0Z5PYtyM+Tr2Ccr9kUdQxn60fI5WuQ==
1267 /@babel/plugin-transform-sticky-regex/7.10.4_@babel+core@7.10.5:
1268 dependencies:
1269 '@babel/core': 7.10.5
1270 '@babel/helper-plugin-utils': 7.10.4
1271 '@babel/helper-regex': 7.10.5
1272 dev: true
1273 peerDependencies:
1274 '@babel/core': ^7.0.0-0
1275 resolution:
1276 integrity: sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==
1277 /@babel/plugin-transform-template-literals/7.10.5_@babel+core@7.10.5:
1278 dependencies:
1279 '@babel/core': 7.10.5
1280 '@babel/helper-annotate-as-pure': 7.10.4
1281 '@babel/helper-plugin-utils': 7.10.4
1282 dev: true
1283 peerDependencies:
1284 '@babel/core': ^7.0.0-0
1285 resolution:
1286 integrity: sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==
1287 /@babel/plugin-transform-typeof-symbol/7.10.4_@babel+core@7.10.5:
1288 dependencies:
1289 '@babel/core': 7.10.5
1290 '@babel/helper-plugin-utils': 7.10.4
1291 dev: true
1292 peerDependencies:
1293 '@babel/core': ^7.0.0-0
1294 resolution:
1295 integrity: sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==
1296 /@babel/plugin-transform-typescript/7.10.5_@babel+core@7.10.5:
1297 dependencies:
1298 '@babel/core': 7.10.5
1299 '@babel/helper-create-class-features-plugin': 7.10.5_@babel+core@7.10.5
1300 '@babel/helper-plugin-utils': 7.10.4
1301 '@babel/plugin-syntax-typescript': 7.10.4_@babel+core@7.10.5
1302 dev: true
1303 peerDependencies:
1304 '@babel/core': ^7.0.0-0
1305 resolution:
1306 integrity: sha512-YCyYsFrrRMZ3qR7wRwtSSJovPG5vGyG4ZdcSAivGwTfoasMp3VOB/AKhohu3dFtmB4cCDcsndCSxGtrdliCsZQ==
1307 /@babel/plugin-transform-unicode-escapes/7.10.4_@babel+core@7.10.5:
1308 dependencies:
1309 '@babel/core': 7.10.5
1310 '@babel/helper-plugin-utils': 7.10.4
1311 dev: true
1312 peerDependencies:
1313 '@babel/core': ^7.0.0-0
1314 resolution:
1315 integrity: sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==
1316 /@babel/plugin-transform-unicode-regex/7.10.4_@babel+core@7.10.5:
1317 dependencies:
1318 '@babel/core': 7.10.5
1319 '@babel/helper-create-regexp-features-plugin': 7.10.4_@babel+core@7.10.5
1320 '@babel/helper-plugin-utils': 7.10.4
1321 dev: true
1322 peerDependencies:
1323 '@babel/core': ^7.0.0-0
1324 resolution:
1325 integrity: sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==
1326 /@babel/preset-env/7.10.4_@babel+core@7.10.5:
1327 dependencies:
1328 '@babel/compat-data': 7.10.5
1329 '@babel/core': 7.10.5
1330 '@babel/helper-compilation-targets': 7.10.4_@babel+core@7.10.5
1331 '@babel/helper-module-imports': 7.10.4
1332 '@babel/helper-plugin-utils': 7.10.4
1333 '@babel/plugin-proposal-async-generator-functions': 7.10.5_@babel+core@7.10.5
1334 '@babel/plugin-proposal-class-properties': 7.10.4_@babel+core@7.10.5
1335 '@babel/plugin-proposal-dynamic-import': 7.10.4_@babel+core@7.10.5
1336 '@babel/plugin-proposal-json-strings': 7.10.4_@babel+core@7.10.5
1337 '@babel/plugin-proposal-nullish-coalescing-operator': 7.10.4_@babel+core@7.10.5
1338 '@babel/plugin-proposal-numeric-separator': 7.10.4_@babel+core@7.10.5
1339 '@babel/plugin-proposal-object-rest-spread': 7.10.4_@babel+core@7.10.5
1340 '@babel/plugin-proposal-optional-catch-binding': 7.10.4_@babel+core@7.10.5
1341 '@babel/plugin-proposal-optional-chaining': 7.10.4_@babel+core@7.10.5
1342 '@babel/plugin-proposal-private-methods': 7.10.4_@babel+core@7.10.5
1343 '@babel/plugin-proposal-unicode-property-regex': 7.10.4_@babel+core@7.10.5
1344 '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.10.5
1345 '@babel/plugin-syntax-class-properties': 7.10.4_@babel+core@7.10.5
1346 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.10.5
1347 '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.10.5
1348 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.10.5
1349 '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.10.5
1350 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.10.5
1351 '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.10.5
1352 '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.10.5
1353 '@babel/plugin-syntax-top-level-await': 7.10.4_@babel+core@7.10.5
1354 '@babel/plugin-transform-arrow-functions': 7.10.4_@babel+core@7.10.5
1355 '@babel/plugin-transform-async-to-generator': 7.10.4_@babel+core@7.10.5
1356 '@babel/plugin-transform-block-scoped-functions': 7.10.4_@babel+core@7.10.5
1357 '@babel/plugin-transform-block-scoping': 7.10.5_@babel+core@7.10.5
1358 '@babel/plugin-transform-classes': 7.10.4_@babel+core@7.10.5
1359 '@babel/plugin-transform-computed-properties': 7.10.4_@babel+core@7.10.5
1360 '@babel/plugin-transform-destructuring': 7.10.4_@babel+core@7.10.5
1361 '@babel/plugin-transform-dotall-regex': 7.10.4_@babel+core@7.10.5
1362 '@babel/plugin-transform-duplicate-keys': 7.10.4_@babel+core@7.10.5
1363 '@babel/plugin-transform-exponentiation-operator': 7.10.4_@babel+core@7.10.5
1364 '@babel/plugin-transform-for-of': 7.10.4_@babel+core@7.10.5
1365 '@babel/plugin-transform-function-name': 7.10.4_@babel+core@7.10.5
1366 '@babel/plugin-transform-literals': 7.10.4_@babel+core@7.10.5
1367 '@babel/plugin-transform-member-expression-literals': 7.10.4_@babel+core@7.10.5
1368 '@babel/plugin-transform-modules-amd': 7.10.5_@babel+core@7.10.5
1369 '@babel/plugin-transform-modules-commonjs': 7.10.4_@babel+core@7.10.5
1370 '@babel/plugin-transform-modules-systemjs': 7.10.5_@babel+core@7.10.5
1371 '@babel/plugin-transform-modules-umd': 7.10.4_@babel+core@7.10.5
1372 '@babel/plugin-transform-named-capturing-groups-regex': 7.10.4_@babel+core@7.10.5
1373 '@babel/plugin-transform-new-target': 7.10.4_@babel+core@7.10.5
1374 '@babel/plugin-transform-object-super': 7.10.4_@babel+core@7.10.5
1375 '@babel/plugin-transform-parameters': 7.10.5_@babel+core@7.10.5
1376 '@babel/plugin-transform-property-literals': 7.10.4_@babel+core@7.10.5
1377 '@babel/plugin-transform-regenerator': 7.10.4_@babel+core@7.10.5
1378 '@babel/plugin-transform-reserved-words': 7.10.4_@babel+core@7.10.5
1379 '@babel/plugin-transform-shorthand-properties': 7.10.4_@babel+core@7.10.5
1380 '@babel/plugin-transform-spread': 7.10.4_@babel+core@7.10.5
1381 '@babel/plugin-transform-sticky-regex': 7.10.4_@babel+core@7.10.5
1382 '@babel/plugin-transform-template-literals': 7.10.5_@babel+core@7.10.5
1383 '@babel/plugin-transform-typeof-symbol': 7.10.4_@babel+core@7.10.5
1384 '@babel/plugin-transform-unicode-escapes': 7.10.4_@babel+core@7.10.5
1385 '@babel/plugin-transform-unicode-regex': 7.10.4_@babel+core@7.10.5
1386 '@babel/preset-modules': 0.1.3_@babel+core@7.10.5
1387 '@babel/types': 7.10.5
1388 browserslist: 4.13.0
1389 core-js-compat: 3.6.5
1390 invariant: 2.2.4
1391 levenary: 1.1.1
1392 semver: 5.7.1
1393 dev: true
1394 peerDependencies:
1395 '@babel/core': ^7.0.0-0
1396 resolution:
1397 integrity: sha512-tcmuQ6vupfMZPrLrc38d0sF2OjLT3/bZ0dry5HchNCQbrokoQi4reXqclvkkAT5b+gWc23meVWpve5P/7+w/zw==
1398 /@babel/preset-modules/0.1.3_@babel+core@7.10.5:
1399 dependencies:
1400 '@babel/core': 7.10.5
1401 '@babel/helper-plugin-utils': 7.10.4
1402 '@babel/plugin-proposal-unicode-property-regex': 7.10.4_@babel+core@7.10.5
1403 '@babel/plugin-transform-dotall-regex': 7.10.4_@babel+core@7.10.5
1404 '@babel/types': 7.10.5
1405 esutils: 2.0.3
1406 dev: true
1407 peerDependencies:
1408 '@babel/core': ^7.0.0-0
1409 resolution:
1410 integrity: sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==
1411 /@babel/runtime/7.10.5:
1412 dependencies:
1413 regenerator-runtime: 0.13.7
1414 dev: true
1415 resolution:
1416 integrity: sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==
1417 /@babel/template/7.10.4:
1418 dependencies:
1419 '@babel/code-frame': 7.10.4
1420 '@babel/parser': 7.10.5
1421 '@babel/types': 7.10.5
1422 dev: true
1423 resolution:
1424 integrity: sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==
1425 /@babel/traverse/7.10.5:
1426 dependencies:
1427 '@babel/code-frame': 7.10.4
1428 '@babel/generator': 7.10.5
1429 '@babel/helper-function-name': 7.10.4
1430 '@babel/helper-split-export-declaration': 7.10.4
1431 '@babel/parser': 7.10.5
1432 '@babel/types': 7.10.5
1433 debug: 4.1.1
1434 globals: 11.12.0
1435 lodash: 4.17.19
1436 dev: true
1437 resolution:
1438 integrity: sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==
1439 /@babel/types/7.10.5:
1440 dependencies:
1441 '@babel/helper-validator-identifier': 7.10.4
1442 lodash: 4.17.19
1443 to-fast-properties: 2.0.0
1444 resolution:
1445 integrity: sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==
1446 /@concordance/react/2.0.0:
1447 dependencies:
1448 arrify: 1.0.1
1449 dev: true
1450 engines:
1451 node: '>=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0'
1452 resolution:
1453 integrity: sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==
1454 /@istanbuljs/load-nyc-config/1.1.0:
1455 dependencies:
1456 camelcase: 5.3.1
1457 find-up: 4.1.0
1458 get-package-type: 0.1.0
1459 js-yaml: 3.14.0
1460 resolve-from: 5.0.0
1461 dev: true
1462 engines:
1463 node: '>=8'
1464 resolution:
1465 integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==
1466 /@istanbuljs/schema/0.1.2:
1467 dev: true
1468 engines:
1469 node: '>=8'
1470 resolution:
1471 integrity: sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==
1472 /@nodelib/fs.scandir/2.1.3:
1473 dependencies:
1474 '@nodelib/fs.stat': 2.0.3
1475 run-parallel: 1.1.9
1476 engines:
1477 node: '>= 8'
1478 resolution:
1479 integrity: sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
1480 /@nodelib/fs.stat/2.0.3:
1481 engines:
1482 node: '>= 8'
1483 resolution:
1484 integrity: sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==
1485 /@nodelib/fs.walk/1.2.4:
1486 dependencies:
1487 '@nodelib/fs.scandir': 2.1.3
1488 fastq: 1.8.0
1489 engines:
1490 node: '>= 8'
1491 resolution:
1492 integrity: sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
1493 /@rollup/plugin-alias/3.1.1_rollup@2.23.0:
1494 dependencies:
1495 rollup: 2.23.0
1496 slash: 3.0.0
1497 dev: true
1498 engines:
1499 node: '>=8.0.0'
1500 peerDependencies:
1501 rollup: ^1.20.0||^2.0.0
1502 resolution:
1503 integrity: sha512-hNcQY4bpBUIvxekd26DBPgF7BT4mKVNDF5tBG4Zi+3IgwLxGYRY0itHs9D0oLVwXM5pvJDWJlBQro+au8WaUWw==
1504 /@rollup/plugin-babel/5.1.0_@babel+core@7.10.5+rollup@2.23.0:
1505 dependencies:
1506 '@babel/core': 7.10.5
1507 '@babel/helper-module-imports': 7.10.4
1508 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1509 rollup: 2.23.0
1510 dev: true
1511 engines:
1512 node: '>= 10.0.0'
1513 peerDependencies:
1514 '@babel/core': ^7.0.0
1515 '@types/babel__core': ^7.1.9
1516 rollup: ^1.20.0||^2.0.0
1517 peerDependenciesMeta:
1518 '@types/babel__core':
1519 optional: true
1520 resolution:
1521 integrity: sha512-zXBEYmfiLAMvB+ZBa6m/q9hsQYAq1sUFdjuP1F6C2pf6uQcpHwAWQveZgzS63zXdKPUYHD3Dr7BhjCqcr0bbLw==
1522 /@rollup/plugin-buble/0.21.3_rollup@2.23.0:
1523 dependencies:
1524 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1525 '@types/buble': 0.19.2
1526 buble: 0.20.0
1527 rollup: 2.23.0
1528 dev: true
1529 engines:
1530 node: '>= 8.0.0'
1531 peerDependencies:
1532 rollup: ^1.20.0||^2.0.0
1533 resolution:
1534 integrity: sha512-Iv8cCuFPnMdqV4pcyU+OrfjOfagPArRQ1PyQjx5KgHk3dARedI+8PNTLSMpJts0lQJr8yF2pAU4GxpxCBJ9HYw==
1535 /@rollup/plugin-commonjs/11.1.0_rollup@2.23.0:
1536 dependencies:
1537 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1538 commondir: 1.0.1
1539 estree-walker: 1.0.1
1540 glob: 7.1.6
1541 is-reference: 1.2.1
1542 magic-string: 0.25.7
1543 resolve: 1.17.0
1544 rollup: 2.23.0
1545 dev: true
1546 engines:
1547 node: '>= 8.0.0'
1548 peerDependencies:
1549 rollup: ^1.20.0||^2.0.0
1550 resolution:
1551 integrity: sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==
1552 /@rollup/plugin-commonjs/14.0.0_rollup@2.23.0:
1553 dependencies:
1554 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1555 commondir: 1.0.1
1556 estree-walker: 1.0.1
1557 glob: 7.1.6
1558 is-reference: 1.2.1
1559 magic-string: 0.25.7
1560 resolve: 1.17.0
1561 rollup: 2.23.0
1562 dev: true
1563 engines:
1564 node: '>= 8.0.0'
1565 peerDependencies:
1566 rollup: ^2.3.4
1567 resolution:
1568 integrity: sha512-+PSmD9ePwTAeU106i9FRdc+Zb3XUWyW26mo5Atr2mk82hor8+nPwkztEjFo8/B1fJKfaQDg9aM2bzQkjhi7zOw==
1569 /@rollup/plugin-json/4.1.0_rollup@2.23.0:
1570 dependencies:
1571 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1572 rollup: 2.23.0
1573 dev: true
1574 peerDependencies:
1575 rollup: ^1.20.0 || ^2.0.0
1576 resolution:
1577 integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==
1578 /@rollup/plugin-node-resolve/8.4.0_rollup@2.23.0:
1579 dependencies:
1580 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1581 '@types/resolve': 1.17.1
1582 builtin-modules: 3.1.0
1583 deep-freeze: 0.0.1
1584 deepmerge: 4.2.2
1585 is-module: 1.0.0
1586 resolve: 1.17.0
1587 rollup: 2.23.0
1588 dev: true
1589 engines:
1590 node: '>= 8.0.0'
1591 peerDependencies:
1592 rollup: ^1.20.0||^2.0.0
1593 resolution:
1594 integrity: sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==
1595 /@rollup/plugin-typescript/5.0.2_rollup@2.23.0:
1596 dependencies:
1597 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1598 resolve: 1.17.0
1599 rollup: 2.23.0
1600 dev: true
1601 engines:
1602 node: '>=8.0.0'
1603 peerDependencies:
1604 rollup: ^2.14.0
1605 tslib: '*'
1606 typescript: '>=3.4.0'
1607 resolution:
1608 integrity: sha512-CkS028Itwjqm1uLbFVfpJgtVtnNvZ+og/m6UlNRR5wOOnNTWPcVQzOu5xGdEX+WWJxdvWIqUq2uR/RBt2ZipWg==
1609 /@rollup/plugin-typescript/5.0.2_rollup@2.23.0+typescript@3.9.7:
1610 dependencies:
1611 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1612 resolve: 1.17.0
1613 rollup: 2.23.0
1614 typescript: 3.9.7
1615 dev: true
1616 engines:
1617 node: '>=8.0.0'
1618 peerDependencies:
1619 rollup: ^2.14.0
1620 tslib: '*'
1621 typescript: '>=3.4.0'
1622 resolution:
1623 integrity: sha512-CkS028Itwjqm1uLbFVfpJgtVtnNvZ+og/m6UlNRR5wOOnNTWPcVQzOu5xGdEX+WWJxdvWIqUq2uR/RBt2ZipWg==
1624 /@rollup/plugin-typescript/6.0.0_rollup@2.23.0:
1625 dependencies:
1626 '@rollup/pluginutils': 3.1.0_rollup@2.23.0
1627 resolve: 1.17.0
1628 rollup: 2.23.0
1629 dev: true
1630 engines:
1631 node: '>=8.0.0'
1632 peerDependencies:
1633 rollup: ^2.14.0
1634 tslib: '*'
1635 typescript: '>=3.4.0'
1636 resolution:
1637 integrity: sha512-Y5U2L4eaF3wUSgCZRMdvNmuzWkKMyN3OwvhAdbzAi5sUqedaBk/XbzO4T7RlViDJ78MOPhwAIv2FtId/jhMtbg==
1638 /@rollup/plugin-virtual/2.0.3_rollup@2.23.0:
1639 dependencies:
1640 rollup: 2.23.0
1641 dev: false
1642 peerDependencies:
1643 rollup: ^1.20.0||^2.0.0
1644 resolution:
1645 integrity: sha512-pw6ziJcyjZtntQ//bkad9qXaBx665SgEL8C8KI5wO8G5iU5MPxvdWrQyVaAvjojGm9tJoS8M9Z/EEepbqieYmw==
1646 /@rollup/pluginutils/3.1.0_rollup@2.23.0:
1647 dependencies:
1648 '@types/estree': 0.0.39
1649 estree-walker: 1.0.1
1650 picomatch: 2.2.2
1651 rollup: 2.23.0
1652 engines:
1653 node: '>= 8.0.0'
1654 peerDependencies:
1655 rollup: ^1.20.0||^2.0.0
1656 resolution:
1657 integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
1658 /@sindresorhus/is/0.14.0:
1659 dev: true
1660 engines:
1661 node: '>=6'
1662 resolution:
1663 integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
1664 /@sindresorhus/is/2.1.1:
1665 dev: true
1666 engines:
1667 node: '>=10'
1668 resolution:
1669 integrity: sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg==
1670 /@sinonjs/commons/1.8.1:
1671 dependencies:
1672 type-detect: 4.0.8
1673 dev: true
1674 resolution:
1675 integrity: sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==
1676 /@sinonjs/fake-timers/6.0.1:
1677 dependencies:
1678 '@sinonjs/commons': 1.8.1
1679 dev: true
1680 resolution:
1681 integrity: sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==
1682 /@sinonjs/formatio/5.0.1:
1683 dependencies:
1684 '@sinonjs/commons': 1.8.1
1685 '@sinonjs/samsam': 5.0.3
1686 dev: true
1687 resolution:
1688 integrity: sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==
1689 /@sinonjs/samsam/5.0.3:
1690 dependencies:
1691 '@sinonjs/commons': 1.8.1
1692 lodash.get: 4.4.2
1693 type-detect: 4.0.8
1694 dev: true
1695 resolution:
1696 integrity: sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==
1697 /@sinonjs/text-encoding/0.7.1:
1698 dev: true
1699 resolution:
1700 integrity: sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
1701 /@szmarczak/http-timer/1.1.2:
1702 dependencies:
1703 defer-to-connect: 1.1.3
1704 dev: true
1705 engines:
1706 node: '>=6'
1707 resolution:
1708 integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
1709 /@szmarczak/http-timer/4.0.5:
1710 dependencies:
1711 defer-to-connect: 2.0.0
1712 dev: true
1713 engines:
1714 node: '>=10'
1715 resolution:
1716 integrity: sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==
1717 /@types/babel__core/7.1.9:
1718 dependencies:
1719 '@babel/parser': 7.10.5
1720 '@babel/types': 7.10.5
1721 '@types/babel__generator': 7.6.1
1722 '@types/babel__template': 7.0.2
1723 '@types/babel__traverse': 7.0.13
1724 dev: true
1725 resolution:
1726 integrity: sha512-sY2RsIJ5rpER1u3/aQ8OFSI7qGIy8o1NEEbgb2UaJcvOtXOMpd39ko723NBpjQFg9SIX7TXtjejZVGeIMLhoOw==
1727 /@types/babel__generator/7.6.1:
1728 dependencies:
1729 '@babel/types': 7.10.5
1730 dev: true
1731 resolution:
1732 integrity: sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==
1733 /@types/babel__template/7.0.2:
1734 dependencies:
1735 '@babel/parser': 7.10.5
1736 '@babel/types': 7.10.5
1737 dev: true
1738 resolution:
1739 integrity: sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==
1740 /@types/babel__traverse/7.0.13:
1741 dependencies:
1742 '@babel/types': 7.10.5
1743 dev: true
1744 resolution:
1745 integrity: sha512-i+zS7t6/s9cdQvbqKDARrcbrPvtJGlbYsMkazo03nTAK3RX9FNrLllXys22uiTGJapPOTZTQ35nHh4ISph4SLQ==
1746 /@types/buble/0.19.2:
1747 dependencies:
1748 magic-string: 0.25.7
1749 resolution:
1750 integrity: sha512-uUD8zIfXMKThmFkahTXDGI3CthFH1kMg2dOm3KLi4GlC5cbARA64bEcUMbbWdWdE73eoc/iBB9PiTMqH0dNS2Q==
1751 /@types/cacheable-request/6.0.1:
1752 dependencies:
1753 '@types/http-cache-semantics': 4.0.0
1754 '@types/keyv': 3.1.1
1755 '@types/node': 14.0.26
1756 '@types/responselike': 1.0.0
1757 dev: true
1758 resolution:
1759 integrity: sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==
1760 /@types/color-name/1.1.1:
1761 dev: true
1762 resolution:
1763 integrity: sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
1764 /@types/eslint-visitor-keys/1.0.0:
1765 dev: true
1766 resolution:
1767 integrity: sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
1768 /@types/estree/0.0.39:
1769 resolution:
1770 integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
1771 /@types/estree/0.0.45:
1772 resolution:
1773 integrity: sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==
1774 /@types/glob/7.1.3:
1775 dependencies:
1776 '@types/minimatch': 3.0.3
1777 '@types/node': 14.0.26
1778 dev: true
1779 resolution:
1780 integrity: sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
1781 /@types/http-cache-semantics/4.0.0:
1782 dev: true
1783 resolution:
1784 integrity: sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==
1785 /@types/json-schema/7.0.5:
1786 dev: true
1787 resolution:
1788 integrity: sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==
1789 /@types/json5/0.0.29:
1790 dev: true
1791 resolution:
1792 integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
1793 /@types/keyv/3.1.1:
1794 dependencies:
1795 '@types/node': 14.0.26
1796 dev: true
1797 resolution:
1798 integrity: sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==
1799 /@types/minimatch/3.0.3:
1800 dev: true
1801 resolution:
1802 integrity: sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
1803 /@types/minimist/1.2.0:
1804 resolution:
1805 integrity: sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=
1806 /@types/node/14.0.26:
1807 resolution:
1808 integrity: sha512-W+fpe5s91FBGE0pEa0lnqGLL4USgpLgs4nokw16SrBBco/gQxuua7KnArSEOd5iaMqbbSHV10vUDkJYJJqpXKA==
1809 /@types/normalize-package-data/2.4.0:
1810 resolution:
1811 integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
1812 /@types/parse-json/4.0.0:
1813 dev: true
1814 resolution:
1815 integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
1816 /@types/picomatch/2.2.1:
1817 dev: true
1818 resolution:
1819 integrity: sha512-26/tQcDmJXYHiaWAAIjnTVL5nwrT+IVaqFZIbBImAuKk/r/j1r/1hmZ7uaOzG6IknqP3QHcNNQ6QO8Vp28lUoA==
1820 /@types/q/1.5.4:
1821 dev: true
1822 resolution:
1823 integrity: sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==
1824 /@types/resolve/1.17.1:
1825 dependencies:
1826 '@types/node': 14.0.26
1827 resolution:
1828 integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
1829 /@types/responselike/1.0.0:
1830 dependencies:
1831 '@types/node': 14.0.26
1832 dev: true
1833 resolution:
1834 integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
1835 /@typescript-eslint/eslint-plugin/3.7.1_fdf7ae5f472a827bd9d9601df74d9b89:
1836 dependencies:
1837 '@typescript-eslint/experimental-utils': 3.7.1_typescript@3.9.7
1838 '@typescript-eslint/parser': 3.7.1_typescript@3.9.7
1839 debug: 4.1.1
1840 functional-red-black-tree: 1.0.1
1841 regexpp: 3.1.0
1842 semver: 7.3.2
1843 tsutils: 3.17.1_typescript@3.9.7
1844 typescript: 3.9.7
1845 dev: true
1846 engines:
1847 node: ^10.12.0 || >=12.0.0
1848 peerDependencies:
1849 '@typescript-eslint/parser': ^3.0.0
1850 eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
1851 typescript: '*'
1852 peerDependenciesMeta:
1853 typescript:
1854 optional: true
1855 resolution:
1856 integrity: sha512-3DB9JDYkMrc8Au00rGFiJLK2Ja9CoMP6Ut0sHsXp3ZtSugjNxvSSHTnKLfo4o+QmjYBJqEznDqsG1zj4F2xnsg==
1857 /@typescript-eslint/experimental-utils/3.7.1_typescript@3.9.7:
1858 dependencies:
1859 '@types/json-schema': 7.0.5
1860 '@typescript-eslint/types': 3.7.1
1861 '@typescript-eslint/typescript-estree': 3.7.1_typescript@3.9.7
1862 eslint-scope: 5.1.0
1863 eslint-utils: 2.1.0
1864 dev: true
1865 engines:
1866 node: ^10.12.0 || >=12.0.0
1867 peerDependencies:
1868 eslint: '*'
1869 typescript: '*'
1870 resolution:
1871 integrity: sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng==
1872 /@typescript-eslint/parser/3.7.1_typescript@3.9.7:
1873 dependencies:
1874 '@types/eslint-visitor-keys': 1.0.0
1875 '@typescript-eslint/experimental-utils': 3.7.1_typescript@3.9.7
1876 '@typescript-eslint/types': 3.7.1
1877 '@typescript-eslint/typescript-estree': 3.7.1_typescript@3.9.7
1878 eslint-visitor-keys: 1.3.0
1879 typescript: 3.9.7
1880 dev: true
1881 engines:
1882 node: ^10.12.0 || >=12.0.0
1883 peerDependencies:
1884 eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
1885 typescript: '*'
1886 peerDependenciesMeta:
1887 typescript:
1888 optional: true
1889 resolution:
1890 integrity: sha512-W4QV/gXvfIsccN8225784LNOorcm7ch68Fi3V4Wg7gmkWSQRKevO4RrRqWo6N/Z/myK1QAiGgeaXN57m+R/8iQ==
1891 /@typescript-eslint/types/3.7.1:
1892 dev: true
1893 engines:
1894 node: ^8.10.0 || ^10.13.0 || >=11.10.1
1895 resolution:
1896 integrity: sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg==
1897 /@typescript-eslint/typescript-estree/3.7.1_typescript@3.9.7:
1898 dependencies:
1899 '@typescript-eslint/types': 3.7.1
1900 '@typescript-eslint/visitor-keys': 3.7.1
1901 debug: 4.1.1
1902 glob: 7.1.6
1903 is-glob: 4.0.1
1904 lodash: 4.17.19
1905 semver: 7.3.2
1906 tsutils: 3.17.1_typescript@3.9.7
1907 typescript: 3.9.7
1908 dev: true
1909 engines:
1910 node: ^10.12.0 || >=12.0.0
1911 peerDependencies:
1912 typescript: '*'
1913 peerDependenciesMeta:
1914 typescript:
1915 optional: true
1916 resolution:
1917 integrity: sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA==
1918 /@typescript-eslint/visitor-keys/3.7.1:
1919 dependencies:
1920 eslint-visitor-keys: 1.3.0
1921 dev: true
1922 engines:
1923 node: ^8.10.0 || ^10.13.0 || >=11.10.1
1924 resolution:
1925 integrity: sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA==
1926 /JSONStream/1.3.5:
1927 dependencies:
1928 jsonparse: 1.3.1
1929 through: 2.3.8
1930 dev: false
1931 hasBin: true
1932 resolution:
1933 integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==
1934 /acorn-dynamic-import/4.0.0_acorn@6.4.1:
1935 dependencies:
1936 acorn: 6.4.1
1937 peerDependencies:
1938 acorn: ^6.0.0
1939 resolution:
1940 integrity: sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==
1941 /acorn-dynamic-import/4.0.0_acorn@7.3.1:
1942 dependencies:
1943 acorn: 7.3.1
1944 dev: true
1945 peerDependencies:
1946 acorn: ^6.0.0
1947 resolution:
1948 integrity: sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==
1949 /acorn-jsx/5.2.0_acorn@6.4.1:
1950 dependencies:
1951 acorn: 6.4.1
1952 peerDependencies:
1953 acorn: ^6.0.0 || ^7.0.0
1954 resolution:
1955 integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==
1956 /acorn-jsx/5.2.0_acorn@7.3.1:
1957 dependencies:
1958 acorn: 7.3.1
1959 dev: true
1960 peerDependencies:
1961 acorn: ^6.0.0 || ^7.0.0
1962 resolution:
1963 integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==
1964 /acorn-walk/7.2.0:
1965 dev: true
1966 engines:
1967 node: '>=0.4.0'
1968 resolution:
1969 integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
1970 /acorn/6.4.1:
1971 engines:
1972 node: '>=0.4.0'
1973 hasBin: true
1974 resolution:
1975 integrity: sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
1976 /acorn/7.3.1:
1977 dev: true
1978 engines:
1979 node: '>=0.4.0'
1980 hasBin: true
1981 resolution:
1982 integrity: sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==
1983 /aggregate-error/3.0.1:
1984 dependencies:
1985 clean-stack: 2.2.0
1986 indent-string: 4.0.0
1987 dev: true
1988 engines:
1989 node: '>=8'
1990 resolution:
1991 integrity: sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==
1992 /ajv/6.12.3:
1993 dependencies:
1994 fast-deep-equal: 3.1.3
1995 fast-json-stable-stringify: 2.1.0
1996 json-schema-traverse: 0.4.1
1997 uri-js: 4.2.2
1998 dev: true
1999 resolution:
2000 integrity: sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==
2001 /alphanum-sort/1.0.2:
2002 dev: true
2003 resolution:
2004 integrity: sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
2005 /ansi-align/3.0.0:
2006 dependencies:
2007 string-width: 3.1.0
2008 dev: true
2009 resolution:
2010 integrity: sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==
2011 /ansi-colors/4.1.1:
2012 dev: true
2013 engines:
2014 node: '>=6'
2015 resolution:
2016 integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
2017 /ansi-escapes/4.3.1:
2018 dependencies:
2019 type-fest: 0.11.0
2020 dev: true
2021 engines:
2022 node: '>=8'
2023 resolution:
2024 integrity: sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
2025 /ansi-regex/2.1.1:
2026 dev: true
2027 engines:
2028 node: '>=0.10.0'
2029 resolution:
2030 integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
2031 /ansi-regex/3.0.0:
2032 dev: true
2033 engines:
2034 node: '>=4'
2035 resolution:
2036 integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
2037 /ansi-regex/4.1.0:
2038 dev: true
2039 engines:
2040 node: '>=6'
2041 resolution:
2042 integrity: sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
2043 /ansi-regex/5.0.0:
2044 dev: true
2045 engines:
2046 node: '>=8'
2047 resolution:
2048 integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
2049 /ansi-styles/2.2.1:
2050 dev: true
2051 engines:
2052 node: '>=0.10.0'
2053 resolution:
2054 integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
2055 /ansi-styles/3.2.1:
2056 dependencies:
2057 color-convert: 1.9.3
2058 engines:
2059 node: '>=4'
2060 resolution:
2061 integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
2062 /ansi-styles/4.2.1:
2063 dependencies:
2064 '@types/color-name': 1.1.1
2065 color-convert: 2.0.1
2066 dev: true
2067 engines:
2068 node: '>=8'
2069 resolution:
2070 integrity: sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
2071 /any-promise/1.3.0:
2072 dev: false
2073 resolution:
2074 integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=
2075 /anymatch/3.1.1:
2076 dependencies:
2077 normalize-path: 3.0.0
2078 picomatch: 2.2.2
2079 dev: true
2080 engines:
2081 node: '>= 8'
2082 resolution:
2083 integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
2084 /append-transform/2.0.0:
2085 dependencies:
2086 default-require-extensions: 3.0.0
2087 dev: true
2088 engines:
2089 node: '>=8'
2090 resolution:
2091 integrity: sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==
2092 /archy/1.0.0:
2093 dev: true
2094 resolution:
2095 integrity: sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
2096 /arg/4.1.3:
2097 dev: true
2098 resolution:
2099 integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
2100 /argparse/1.0.10:
2101 dependencies:
2102 sprintf-js: 1.0.3
2103 resolution:
2104 integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
2105 /array-find-index/1.0.2:
2106 dev: true
2107 engines:
2108 node: '>=0.10.0'
2109 resolution:
2110 integrity: sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
2111 /array-includes/3.1.1:
2112 dependencies:
2113 define-properties: 1.1.3
2114 es-abstract: 1.17.6
2115 is-string: 1.0.5
2116 dev: true
2117 engines:
2118 node: '>= 0.4'
2119 resolution:
2120 integrity: sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==
2121 /array-union/2.1.0:
2122 engines:
2123 node: '>=8'
2124 resolution:
2125 integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
2126 /array.prototype.flat/1.2.3:
2127 dependencies:
2128 define-properties: 1.1.3
2129 es-abstract: 1.17.6
2130 dev: true
2131 engines:
2132 node: '>= 0.4'
2133 resolution:
2134 integrity: sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==
2135 /arrgv/1.0.2:
2136 dev: true
2137 engines:
2138 node: '>=8.0.0'
2139 resolution:
2140 integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==
2141 /arrify/1.0.1:
2142 engines:
2143 node: '>=0.10.0'
2144 resolution:
2145 integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
2146 /arrify/2.0.1:
2147 engines:
2148 node: '>=8'
2149 resolution:
2150 integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
2151 /astral-regex/1.0.0:
2152 dev: true
2153 engines:
2154 node: '>=4'
2155 resolution:
2156 integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
2157 /astral-regex/2.0.0:
2158 dev: true
2159 engines:
2160 node: '>=8'
2161 resolution:
2162 integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
2163 /ava/3.11.0:
2164 dependencies:
2165 '@concordance/react': 2.0.0
2166 acorn: 7.3.1
2167 acorn-walk: 7.2.0
2168 ansi-styles: 4.2.1
2169 arrgv: 1.0.2
2170 arrify: 2.0.1
2171 callsites: 3.1.0
2172 chalk: 4.1.0
2173 chokidar: 3.4.1
2174 chunkd: 2.0.1
2175 ci-info: 2.0.0
2176 ci-parallel-vars: 1.0.1
2177 clean-yaml-object: 0.1.0
2178 cli-cursor: 3.1.0
2179 cli-truncate: 2.1.0
2180 code-excerpt: 3.0.0
2181 common-path-prefix: 3.0.0
2182 concordance: 5.0.0
2183 convert-source-map: 1.7.0
2184 currently-unhandled: 0.4.1
2185 debug: 4.1.1
2186 del: 5.1.0
2187 emittery: 0.7.1
2188 equal-length: 1.0.1
2189 figures: 3.2.0
2190 globby: 11.0.1
2191 ignore-by-default: 2.0.0
2192 import-local: 3.0.2
2193 indent-string: 4.0.0
2194 is-error: 2.2.2
2195 is-plain-object: 4.1.1
2196 is-promise: 4.0.0
2197 lodash: 4.17.19
2198 matcher: 3.0.0
2199 md5-hex: 3.0.1
2200 mem: 6.1.0
2201 ms: 2.1.2
2202 ora: 4.0.5
2203 p-map: 4.0.0
2204 picomatch: 2.2.2
2205 pkg-conf: 3.1.0
2206 plur: 4.0.0
2207 pretty-ms: 7.0.0
2208 read-pkg: 5.2.0
2209 resolve-cwd: 3.0.0
2210 slash: 3.0.0
2211 source-map-support: 0.5.19
2212 stack-utils: 2.0.2
2213 strip-ansi: 6.0.0
2214 supertap: 1.0.0
2215 temp-dir: 2.0.0
2216 trim-off-newlines: 1.0.1
2217 update-notifier: 4.1.0
2218 write-file-atomic: 3.0.3
2219 yargs: 15.4.1
2220 dev: true
2221 engines:
2222 node: '>=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0'
2223 hasBin: true
2224 resolution:
2225 integrity: sha512-y5U8BGeSRjs/OypsC4CJxr+L1KtLKU5kUyHr5hcghXn7HNr2f4LE/4gvl0Q5lNkLX1obdRW1oODphNdU/glwmA==
2226 /babel-plugin-dynamic-import-node/2.3.3:
2227 dependencies:
2228 object.assign: 4.1.0
2229 dev: true
2230 resolution:
2231 integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==
2232 /babel-plugin-espower/3.0.1:
2233 dependencies:
2234 '@babel/generator': 7.10.5
2235 '@babel/parser': 7.10.5
2236 call-matcher: 1.1.0
2237 core-js: 2.6.11
2238 espower-location-detector: 1.0.0
2239 espurify: 1.8.1
2240 estraverse: 4.3.0
2241 dev: true
2242 resolution:
2243 integrity: sha512-Ms49U7VIAtQ/TtcqRbD6UBmJBUCSxiC3+zPc+eGqxKUIFO1lTshyEDRUjhoAbd2rWfwYf3cZ62oXozrd8W6J0A==
2244 /balanced-match/1.0.0:
2245 resolution:
2246 integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
2247 /big.js/5.2.2:
2248 dev: true
2249 resolution:
2250 integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
2251 /binary-extensions/2.1.0:
2252 dev: true
2253 engines:
2254 node: '>=8'
2255 resolution:
2256 integrity: sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
2257 /blueimp-md5/2.17.0:
2258 dev: true
2259 resolution:
2260 integrity: sha512-x5PKJHY5rHQYaADj6NwPUR2QRCUVSggPzrUKkeENpj871o9l9IefJbO2jkT5UvYykeOK9dx0VmkIo6dZ+vThYw==
2261 /boolbase/1.0.0:
2262 dev: true
2263 resolution:
2264 integrity: sha1-aN/1++YMUes3cl6p4+0xDcwed24=
2265 /boxen/4.2.0:
2266 dependencies:
2267 ansi-align: 3.0.0
2268 camelcase: 5.3.1
2269 chalk: 3.0.0
2270 cli-boxes: 2.2.0
2271 string-width: 4.2.0
2272 term-size: 2.2.0
2273 type-fest: 0.8.1
2274 widest-line: 3.1.0
2275 dev: true
2276 engines:
2277 node: '>=8'
2278 resolution:
2279 integrity: sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==
2280 /brace-expansion/1.1.11:
2281 dependencies:
2282 balanced-match: 1.0.0
2283 concat-map: 0.0.1
2284 resolution:
2285 integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
2286 /braces/3.0.2:
2287 dependencies:
2288 fill-range: 7.0.1
2289 engines:
2290 node: '>=8'
2291 resolution:
2292 integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
2293 /browserslist/4.13.0:
2294 dependencies:
2295 caniuse-lite: 1.0.30001107
2296 electron-to-chromium: 1.3.509
2297 escalade: 3.0.2
2298 node-releases: 1.1.60
2299 dev: true
2300 engines:
2301 node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7
2302 hasBin: true
2303 resolution:
2304 integrity: sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==
2305 /buble/0.20.0:
2306 dependencies:
2307 acorn: 6.4.1
2308 acorn-dynamic-import: 4.0.0_acorn@6.4.1
2309 acorn-jsx: 5.2.0_acorn@6.4.1
2310 chalk: 2.4.2
2311 magic-string: 0.25.7
2312 minimist: 1.2.5
2313 regexpu-core: 4.5.4
2314 hasBin: true
2315 resolution:
2316 integrity: sha512-/1gnaMQE8xvd5qsNBl+iTuyjJ9XxeaVxAMF86dQ4EyxFJOZtsgOS8Ra+7WHgZTam5IFDtt4BguN0sH0tVTKrOw==
2317 /buffer-from/1.1.1:
2318 dev: true
2319 resolution:
2320 integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
2321 /builtin-modules/3.1.0:
2322 engines:
2323 node: '>=6'
2324 resolution:
2325 integrity: sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==
2326 /cacheable-lookup/2.0.1:
2327 dependencies:
2328 '@types/keyv': 3.1.1
2329 keyv: 4.0.1
2330 dev: true
2331 engines:
2332 node: '>=10'
2333 resolution:
2334 integrity: sha512-EMMbsiOTcdngM/K6gV/OxF2x0t07+vMOWxZNSCRQMjO2MY2nhZQ6OYhOOpyQrbhqsgtvKGI7hcq6xjnA92USjg==
2335 /cacheable-request/6.1.0:
2336 dependencies:
2337 clone-response: 1.0.2
2338 get-stream: 5.1.0
2339 http-cache-semantics: 4.1.0
2340 keyv: 3.1.0
2341 lowercase-keys: 2.0.0
2342 normalize-url: 4.5.0
2343 responselike: 1.0.2
2344 dev: true
2345 engines:
2346 node: '>=8'
2347 resolution:
2348 integrity: sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
2349 /cacheable-request/7.0.1:
2350 dependencies:
2351 clone-response: 1.0.2
2352 get-stream: 5.1.0
2353 http-cache-semantics: 4.1.0
2354 keyv: 4.0.1
2355 lowercase-keys: 2.0.0
2356 normalize-url: 4.5.0
2357 responselike: 2.0.0
2358 dev: true
2359 engines:
2360 node: '>=8'
2361 resolution:
2362 integrity: sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==
2363 /caching-transform/4.0.0:
2364 dependencies:
2365 hasha: 5.2.0
2366 make-dir: 3.1.0
2367 package-hash: 4.0.0
2368 write-file-atomic: 3.0.3
2369 dev: true
2370 engines:
2371 node: '>=8'
2372 resolution:
2373 integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==
2374 /call-matcher/1.1.0:
2375 dependencies:
2376 core-js: 2.6.11
2377 deep-equal: 1.1.1
2378 espurify: 1.8.1
2379 estraverse: 4.3.0
2380 dev: true
2381 resolution:
2382 integrity: sha512-IoQLeNwwf9KTNbtSA7aEBb1yfDbdnzwjCetjkC8io5oGeOmK2CBNdg0xr+tadRYKO0p7uQyZzvon0kXlZbvGrw==
2383 /call-signature/0.0.2:
2384 dev: true
2385 engines:
2386 node: '>=0.10.0'
2387 resolution:
2388 integrity: sha1-qEq8glpV70yysCi9dOIFpluaSZY=
2389 /caller-callsite/2.0.0:
2390 dependencies:
2391 callsites: 2.0.0
2392 dev: true
2393 engines:
2394 node: '>=4'
2395 resolution:
2396 integrity: sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=
2397 /caller-path/2.0.0:
2398 dependencies:
2399 caller-callsite: 2.0.0
2400 dev: true
2401 engines:
2402 node: '>=4'
2403 resolution:
2404 integrity: sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=
2405 /callsites/2.0.0:
2406 dev: true
2407 engines:
2408 node: '>=4'
2409 resolution:
2410 integrity: sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=
2411 /callsites/3.1.0:
2412 dev: true
2413 engines:
2414 node: '>=6'
2415 resolution:
2416 integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
2417 /camelcase-keys/6.2.2:
2418 dependencies:
2419 camelcase: 5.3.1
2420 map-obj: 4.1.0
2421 quick-lru: 4.0.1
2422 engines:
2423 node: '>=8'
2424 resolution:
2425 integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==
2426 /camelcase/5.3.1:
2427 engines:
2428 node: '>=6'
2429 resolution:
2430 integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
2431 /camelcase/6.0.0:
2432 dev: false
2433 engines:
2434 node: '>=10'
2435 resolution:
2436 integrity: sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w==
2437 /caniuse-api/3.0.0:
2438 dependencies:
2439 browserslist: 4.13.0
2440 caniuse-lite: 1.0.30001107
2441 lodash.memoize: 4.1.2
2442 lodash.uniq: 4.5.0
2443 dev: true
2444 resolution:
2445 integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==
2446 /caniuse-lite/1.0.30001107:
2447 dev: true
2448 resolution:
2449 integrity: sha512-86rCH+G8onCmdN4VZzJet5uPELII59cUzDphko3thQFgAQG1RNa+sVLDoALIhRYmflo5iSIzWY3vu1XTWtNMQQ==
2450 /chalk/1.1.3:
2451 dependencies:
2452 ansi-styles: 2.2.1
2453 escape-string-regexp: 1.0.5
2454 has-ansi: 2.0.0
2455 strip-ansi: 3.0.1
2456 supports-color: 2.0.0
2457 dev: true
2458 engines:
2459 node: '>=0.10.0'
2460 resolution:
2461 integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
2462 /chalk/2.4.2:
2463 dependencies:
2464 ansi-styles: 3.2.1
2465 escape-string-regexp: 1.0.5
2466 supports-color: 5.5.0
2467 engines:
2468 node: '>=4'
2469 resolution:
2470 integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
2471 /chalk/3.0.0:
2472 dependencies:
2473 ansi-styles: 4.2.1
2474 supports-color: 7.1.0
2475 dev: true
2476 engines:
2477 node: '>=8'
2478 resolution:
2479 integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
2480 /chalk/4.1.0:
2481 dependencies:
2482 ansi-styles: 4.2.1
2483 supports-color: 7.1.0
2484 dev: true
2485 engines:
2486 node: '>=10'
2487 resolution:
2488 integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
2489 /chardet/0.7.0:
2490 dev: true
2491 resolution:
2492 integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
2493 /chokidar/3.4.1:
2494 dependencies:
2495 anymatch: 3.1.1
2496 braces: 3.0.2
2497 glob-parent: 5.1.1
2498 is-binary-path: 2.1.0
2499 is-glob: 4.0.1
2500 normalize-path: 3.0.0
2501 readdirp: 3.4.0
2502 dev: true
2503 engines:
2504 node: '>= 8.10.0'
2505 optionalDependencies:
2506 fsevents: 2.1.3
2507 resolution:
2508 integrity: sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g==
2509 /chunkd/2.0.1:
2510 dev: true
2511 resolution:
2512 integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==
2513 /ci-info/2.0.0:
2514 dev: true
2515 resolution:
2516 integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
2517 /ci-parallel-vars/1.0.1:
2518 dev: true
2519 resolution:
2520 integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==
2521 /clean-stack/2.2.0:
2522 dev: true
2523 engines:
2524 node: '>=6'
2525 resolution:
2526 integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
2527 /clean-yaml-object/0.1.0:
2528 dev: true
2529 engines:
2530 node: '>=0.10.0'
2531 resolution:
2532 integrity: sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=
2533 /cli-boxes/2.2.0:
2534 dev: true
2535 engines:
2536 node: '>=6'
2537 resolution:
2538 integrity: sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==
2539 /cli-cursor/3.1.0:
2540 dependencies:
2541 restore-cursor: 3.1.0
2542 dev: true
2543 engines:
2544 node: '>=8'
2545 resolution:
2546 integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
2547 /cli-spinners/2.4.0:
2548 dev: true
2549 engines:
2550 node: '>=6'
2551 resolution:
2552 integrity: sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
2553 /cli-truncate/2.1.0:
2554 dependencies:
2555 slice-ansi: 3.0.0
2556 string-width: 4.2.0
2557 dev: true
2558 engines:
2559 node: '>=8'
2560 resolution:
2561 integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==
2562 /cli-width/3.0.0:
2563 dev: true
2564 engines:
2565 node: '>= 10'
2566 resolution:
2567 integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
2568 /cliui/6.0.0:
2569 dependencies:
2570 string-width: 4.2.0
2571 strip-ansi: 6.0.0
2572 wrap-ansi: 6.2.0
2573 dev: true
2574 resolution:
2575 integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
2576 /clone-response/1.0.2:
2577 dependencies:
2578 mimic-response: 1.0.1
2579 dev: true
2580 resolution:
2581 integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
2582 /clone/1.0.4:
2583 dev: true
2584 engines:
2585 node: '>=0.8'
2586 resolution:
2587 integrity: sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
2588 /coa/2.0.2:
2589 dependencies:
2590 '@types/q': 1.5.4
2591 chalk: 2.4.2
2592 q: 1.5.1
2593 dev: true
2594 engines:
2595 node: '>= 4.0'
2596 resolution:
2597 integrity: sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==
2598 /code-excerpt/3.0.0:
2599 dependencies:
2600 convert-to-spaces: 1.0.2
2601 dev: true
2602 engines:
2603 node: '>=10'
2604 resolution:
2605 integrity: sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==
2606 /codecov-lite/1.0.3:
2607 dependencies:
2608 '@babel/runtime': 7.10.5
2609 got: 10.7.0
2610 dev: true
2611 engines:
2612 node: '>=10.13.0'
2613 resolution:
2614 integrity: sha512-GXInsZH2PYwOvLk6bCBXdgiTIWXRbmb0B1H+RqIBzyfWd6CwQfJQ4PS8GUIy4ukViJIZqjebjbe3mDo5dAG+fA==
2615 /color-convert/1.9.3:
2616 dependencies:
2617 color-name: 1.1.3
2618 resolution:
2619 integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
2620 /color-convert/2.0.1:
2621 dependencies:
2622 color-name: 1.1.4
2623 dev: true
2624 engines:
2625 node: '>=7.0.0'
2626 resolution:
2627 integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
2628 /color-name/1.1.3:
2629 resolution:
2630 integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
2631 /color-name/1.1.4:
2632 dev: true
2633 resolution:
2634 integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
2635 /color-string/1.5.3:
2636 dependencies:
2637 color-name: 1.1.4
2638 simple-swizzle: 0.2.2
2639 dev: true
2640 resolution:
2641 integrity: sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==
2642 /color/3.1.2:
2643 dependencies:
2644 color-convert: 1.9.3
2645 color-string: 1.5.3
2646 dev: true
2647 resolution:
2648 integrity: sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==
2649 /commander/2.20.3:
2650 dev: false
2651 resolution:
2652 integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
2653 /commander/4.1.1:
2654 dev: false
2655 engines:
2656 node: '>= 6'
2657 resolution:
2658 integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
2659 /commander/5.1.0:
2660 dev: true
2661 engines:
2662 node: '>= 6'
2663 resolution:
2664 integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
2665 /common-path-prefix/3.0.0:
2666 dev: true
2667 resolution:
2668 integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==
2669 /commondir/1.0.1:
2670 resolution:
2671 integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
2672 /compare-versions/3.6.0:
2673 dev: true
2674 resolution:
2675 integrity: sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
2676 /concat-map/0.0.1:
2677 resolution:
2678 integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
2679 /concat-with-sourcemaps/1.1.0:
2680 dependencies:
2681 source-map: 0.6.1
2682 dev: true
2683 resolution:
2684 integrity: sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==
2685 /concordance/4.0.0:
2686 dependencies:
2687 date-time: 2.1.0
2688 esutils: 2.0.3
2689 fast-diff: 1.2.0
2690 js-string-escape: 1.0.1
2691 lodash.clonedeep: 4.5.0
2692 lodash.flattendeep: 4.4.0
2693 lodash.islength: 4.0.1
2694 lodash.merge: 4.6.2
2695 md5-hex: 2.0.0
2696 semver: 5.7.1
2697 well-known-symbols: 2.0.0
2698 dev: true
2699 engines:
2700 node: '>=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0'
2701 resolution:
2702 integrity: sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ==
2703 /concordance/5.0.0:
2704 dependencies:
2705 date-time: 3.1.0
2706 esutils: 2.0.3
2707 fast-diff: 1.2.0
2708 js-string-escape: 1.0.1
2709 lodash: 4.17.19
2710 md5-hex: 3.0.1
2711 semver: 7.3.2
2712 well-known-symbols: 2.0.0
2713 dev: true
2714 engines:
2715 node: '>=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0'
2716 resolution:
2717 integrity: sha512-stOCz9ffg0+rytwTaL2njUOIyMfANwfwmqc9Dr4vTUS/x/KkVFlWx9Zlzu6tHYtjKxxaCF/cEAZgPDac+n35sg==
2718 /configstore/5.0.1:
2719 dependencies:
2720 dot-prop: 5.2.0
2721 graceful-fs: 4.2.4
2722 make-dir: 3.1.0
2723 unique-string: 2.0.0
2724 write-file-atomic: 3.0.3
2725 xdg-basedir: 4.0.0
2726 dev: true
2727 engines:
2728 node: '>=8'
2729 resolution:
2730 integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==
2731 /contains-path/0.1.0:
2732 dev: true
2733 engines:
2734 node: '>=0.10.0'
2735 resolution:
2736 integrity: sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=
2737 /conventional-commits-parser/3.1.0:
2738 dependencies:
2739 JSONStream: 1.3.5
2740 is-text-path: 1.0.1
2741 lodash: 4.17.19
2742 meow: 7.0.1
2743 split2: 2.2.0
2744 through2: 3.0.2
2745 trim-off-newlines: 1.0.1
2746 dev: false
2747 engines:
2748 node: '>=10'
2749 hasBin: true
2750 resolution:
2751 integrity: sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA==
2752 /convert-source-map/1.7.0:
2753 dependencies:
2754 safe-buffer: 5.1.2
2755 dev: true
2756 resolution:
2757 integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
2758 /convert-to-spaces/1.0.2:
2759 dev: true
2760 engines:
2761 node: '>= 4'
2762 resolution:
2763 integrity: sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=
2764 /core-js-compat/3.6.5:
2765 dependencies:
2766 browserslist: 4.13.0
2767 semver: 7.0.0
2768 dev: true
2769 resolution:
2770 integrity: sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==
2771 /core-js/2.6.11:
2772 deprecated: 'core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.'
2773 dev: true
2774 requiresBuild: true
2775 resolution:
2776 integrity: sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
2777 /core-util-is/1.0.2:
2778 dev: false
2779 resolution:
2780 integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
2781 /cosmiconfig/5.2.1:
2782 dependencies:
2783 import-fresh: 2.0.0
2784 is-directory: 0.3.1
2785 js-yaml: 3.14.0
2786 parse-json: 4.0.0
2787 dev: true
2788 engines:
2789 node: '>=4'
2790 resolution:
2791 integrity: sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==
2792 /cosmiconfig/6.0.0:
2793 dependencies:
2794 '@types/parse-json': 4.0.0
2795 import-fresh: 3.2.1
2796 parse-json: 5.0.1
2797 path-type: 4.0.0
2798 yaml: 1.10.0
2799 dev: true
2800 engines:
2801 node: '>=8'
2802 resolution:
2803 integrity: sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==
2804 /cross-spawn/6.0.5:
2805 dependencies:
2806 nice-try: 1.0.5
2807 path-key: 2.0.1
2808 semver: 5.7.1
2809 shebang-command: 1.2.0
2810 which: 1.3.1
2811 dev: true
2812 engines:
2813 node: '>=4.8'
2814 resolution:
2815 integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
2816 /cross-spawn/7.0.3:
2817 dependencies:
2818 path-key: 3.1.1
2819 shebang-command: 2.0.0
2820 which: 2.0.2
2821 dev: true
2822 engines:
2823 node: '>= 8'
2824 resolution:
2825 integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
2826 /crypto-random-string/2.0.0:
2827 dev: true
2828 engines:
2829 node: '>=8'
2830 resolution:
2831 integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
2832 /css-color-names/0.0.4:
2833 dev: true
2834 resolution:
2835 integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=
2836 /css-declaration-sorter/4.0.1:
2837 dependencies:
2838 postcss: 7.0.32
2839 timsort: 0.3.0
2840 dev: true
2841 engines:
2842 node: '>4'
2843 resolution:
2844 integrity: sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==
2845 /css-modules-loader-core/1.1.0:
2846 dependencies:
2847 icss-replace-symbols: 1.1.0
2848 postcss: 6.0.1
2849 postcss-modules-extract-imports: 1.1.0
2850 postcss-modules-local-by-default: 1.2.0
2851 postcss-modules-scope: 1.1.0
2852 postcss-modules-values: 1.3.0
2853 dev: true
2854 resolution:
2855 integrity: sha1-WQhmgpShvs0mGuCkziGwtVHyHRY=
2856 /css-select-base-adapter/0.1.1:
2857 dev: true
2858 resolution:
2859 integrity: sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==
2860 /css-select/2.1.0:
2861 dependencies:
2862 boolbase: 1.0.0
2863 css-what: 3.3.0
2864 domutils: 1.7.0
2865 nth-check: 1.0.2
2866 dev: true
2867 resolution:
2868 integrity: sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==
2869 /css-selector-tokenizer/0.7.3:
2870 dependencies:
2871 cssesc: 3.0.0
2872 fastparse: 1.1.2
2873 dev: true
2874 resolution:
2875 integrity: sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==
2876 /css-tree/1.0.0-alpha.37:
2877 dependencies:
2878 mdn-data: 2.0.4
2879 source-map: 0.6.1
2880 dev: true
2881 engines:
2882 node: '>=8.0.0'
2883 resolution:
2884 integrity: sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==
2885 /css-tree/1.0.0-alpha.39:
2886 dependencies:
2887 mdn-data: 2.0.6
2888 source-map: 0.6.1
2889 dev: true
2890 engines:
2891 node: '>=8.0.0'
2892 resolution:
2893 integrity: sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==
2894 /css-what/3.3.0:
2895 dev: true
2896 engines:
2897 node: '>= 6'
2898 resolution:
2899 integrity: sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==
2900 /cssesc/3.0.0:
2901 dev: true
2902 engines:
2903 node: '>=4'
2904 hasBin: true
2905 resolution:
2906 integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
2907 /cssnano-preset-default/4.0.7:
2908 dependencies:
2909 css-declaration-sorter: 4.0.1
2910 cssnano-util-raw-cache: 4.0.1
2911 postcss: 7.0.32
2912 postcss-calc: 7.0.2
2913 postcss-colormin: 4.0.3
2914 postcss-convert-values: 4.0.1
2915 postcss-discard-comments: 4.0.2
2916 postcss-discard-duplicates: 4.0.2
2917 postcss-discard-empty: 4.0.1
2918 postcss-discard-overridden: 4.0.1
2919 postcss-merge-longhand: 4.0.11
2920 postcss-merge-rules: 4.0.3
2921 postcss-minify-font-values: 4.0.2
2922 postcss-minify-gradients: 4.0.2
2923 postcss-minify-params: 4.0.2
2924 postcss-minify-selectors: 4.0.2
2925 postcss-normalize-charset: 4.0.1
2926 postcss-normalize-display-values: 4.0.2
2927 postcss-normalize-positions: 4.0.2
2928 postcss-normalize-repeat-style: 4.0.2
2929 postcss-normalize-string: 4.0.2
2930 postcss-normalize-timing-functions: 4.0.2
2931 postcss-normalize-unicode: 4.0.1
2932 postcss-normalize-url: 4.0.1
2933 postcss-normalize-whitespace: 4.0.2
2934 postcss-ordered-values: 4.1.2
2935 postcss-reduce-initial: 4.0.3
2936 postcss-reduce-transforms: 4.0.2
2937 postcss-svgo: 4.0.2
2938 postcss-unique-selectors: 4.0.1
2939 dev: true
2940 engines:
2941 node: '>=6.9.0'
2942 resolution:
2943 integrity: sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==
2944 /cssnano-util-get-arguments/4.0.0:
2945 dev: true
2946 engines:
2947 node: '>=6.9.0'
2948 resolution:
2949 integrity: sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=
2950 /cssnano-util-get-match/4.0.0:
2951 dev: true
2952 engines:
2953 node: '>=6.9.0'
2954 resolution:
2955 integrity: sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=
2956 /cssnano-util-raw-cache/4.0.1:
2957 dependencies:
2958 postcss: 7.0.32
2959 dev: true
2960 engines:
2961 node: '>=6.9.0'
2962 resolution:
2963 integrity: sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==
2964 /cssnano-util-same-parent/4.0.1:
2965 dev: true
2966 engines:
2967 node: '>=6.9.0'
2968 resolution:
2969 integrity: sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==
2970 /cssnano/4.1.10:
2971 dependencies:
2972 cosmiconfig: 5.2.1
2973 cssnano-preset-default: 4.0.7
2974 is-resolvable: 1.1.0
2975 postcss: 7.0.32
2976 dev: true
2977 engines:
2978 node: '>=6.9.0'
2979 resolution:
2980 integrity: sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==
2981 /csso/4.0.3:
2982 dependencies:
2983 css-tree: 1.0.0-alpha.39
2984 dev: true
2985 engines:
2986 node: '>=8.0.0'
2987 resolution:
2988 integrity: sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==
2989 /currently-unhandled/0.4.1:
2990 dependencies:
2991 array-find-index: 1.0.2
2992 dev: true
2993 engines:
2994 node: '>=0.10.0'
2995 resolution:
2996 integrity: sha1-mI3zP+qxke95mmE2nddsF635V+o=
2997 /d/1.0.1:
2998 dependencies:
2999 es5-ext: 0.10.53
3000 type: 1.2.0
3001 dev: true
3002 resolution:
3003 integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==
3004 /d3-dsv/1.2.0:
3005 dependencies:
3006 commander: 2.20.3
3007 iconv-lite: 0.4.24
3008 rw: 1.3.3
3009 dev: false
3010 hasBin: true
3011 resolution:
3012 integrity: sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==
3013 /date-time/2.1.0:
3014 dependencies:
3015 time-zone: 1.0.0
3016 dev: true
3017 engines:
3018 node: '>=4'
3019 resolution:
3020 integrity: sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==
3021 /date-time/3.1.0:
3022 dependencies:
3023 time-zone: 1.0.0
3024 dev: true
3025 engines:
3026 node: '>=6'
3027 resolution:
3028 integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==
3029 /debug/2.6.9:
3030 dependencies:
3031 ms: 2.0.0
3032 dev: true
3033 resolution:
3034 integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
3035 /debug/4.1.1:
3036 dependencies:
3037 ms: 2.1.2
3038 dev: true
3039 resolution:
3040 integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
3041 /decamelize-keys/1.1.0:
3042 dependencies:
3043 decamelize: 1.2.0
3044 map-obj: 1.0.1
3045 engines:
3046 node: '>=0.10.0'
3047 resolution:
3048 integrity: sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=
3049 /decamelize/1.2.0:
3050 engines:
3051 node: '>=0.10.0'
3052 resolution:
3053 integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
3054 /decompress-response/3.3.0:
3055 dependencies:
3056 mimic-response: 1.0.1
3057 dev: true
3058 engines:
3059 node: '>=4'
3060 resolution:
3061 integrity: sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
3062 /decompress-response/5.0.0:
3063 dependencies:
3064 mimic-response: 2.1.0
3065 dev: true
3066 engines:
3067 node: '>=10'
3068 resolution:
3069 integrity: sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw==
3070 /dedent/0.7.0:
3071 dev: true
3072 resolution:
3073 integrity: sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
3074 /deep-equal/1.1.1:
3075 dependencies:
3076 is-arguments: 1.0.4
3077 is-date-object: 1.0.2
3078 is-regex: 1.1.0
3079 object-is: 1.1.2
3080 object-keys: 1.1.1
3081 regexp.prototype.flags: 1.3.0
3082 dev: true
3083 resolution:
3084 integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==
3085 /deep-extend/0.6.0:
3086 dev: true
3087 engines:
3088 node: '>=4.0.0'
3089 resolution:
3090 integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
3091 /deep-freeze/0.0.1:
3092 dev: true
3093 resolution:
3094 integrity: sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=
3095 /deep-is/0.1.3:
3096 dev: true
3097 resolution:
3098 integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
3099 /deepmerge/4.2.2:
3100 engines:
3101 node: '>=0.10.0'
3102 resolution:
3103 integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
3104 /default-require-extensions/3.0.0:
3105 dependencies:
3106 strip-bom: 4.0.0
3107 dev: true
3108 engines:
3109 node: '>=8'
3110 resolution:
3111 integrity: sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==
3112 /defaults/1.0.3:
3113 dependencies:
3114 clone: 1.0.4
3115 dev: true
3116 resolution:
3117 integrity: sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=
3118 /defer-to-connect/1.1.3:
3119 dev: true
3120 resolution:
3121 integrity: sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
3122 /defer-to-connect/2.0.0:
3123 dev: true
3124 engines:
3125 node: '>=10'
3126 resolution:
3127 integrity: sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg==
3128 /define-properties/1.1.3:
3129 dependencies:
3130 object-keys: 1.1.1
3131 dev: true
3132 engines:
3133 node: '>= 0.4'
3134 resolution:
3135 integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
3136 /del-cli/3.0.1:
3137 dependencies:
3138 del: 5.1.0
3139 meow: 6.1.1
3140 dev: true
3141 engines:
3142 node: '>=8'
3143 hasBin: true
3144 resolution:
3145 integrity: sha512-BLHItGr82rUbHhjMu41d+vw9Md49i81jmZSV00HdTq4t+RTHywmEht/23mNFpUl2YeLYJZJyGz4rdlMAyOxNeg==
3146 /del/5.1.0:
3147 dependencies:
3148 globby: 10.0.2
3149 graceful-fs: 4.2.4
3150 is-glob: 4.0.1
3151 is-path-cwd: 2.2.0
3152 is-path-inside: 3.0.2
3153 p-map: 3.0.0
3154 rimraf: 3.0.2
3155 slash: 3.0.0
3156 dev: true
3157 engines:
3158 node: '>=8'
3159 resolution:
3160 integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==
3161 /detect-indent/5.0.0:
3162 dev: false
3163 engines:
3164 node: '>=4'
3165 resolution:
3166 integrity: sha1-OHHMCmoALow+Wzz38zYmRnXwa50=
3167 /diff/4.0.2:
3168 dev: true
3169 engines:
3170 node: '>=0.3.1'
3171 resolution:
3172 integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
3173 /dir-glob/3.0.1:
3174 dependencies:
3175 path-type: 4.0.0
3176 engines:
3177 node: '>=8'
3178 resolution:
3179 integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
3180 /doctrine/1.5.0:
3181 dependencies:
3182 esutils: 2.0.3
3183 isarray: 1.0.0
3184 dev: true
3185 engines:
3186 node: '>=0.10.0'
3187 resolution:
3188 integrity: sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=
3189 /doctrine/3.0.0:
3190 dependencies:
3191 esutils: 2.0.3
3192 dev: true
3193 engines:
3194 node: '>=6.0.0'
3195 resolution:
3196 integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
3197 /dom-serializer/0.2.2:
3198 dependencies:
3199 domelementtype: 2.0.1
3200 entities: 2.0.3
3201 dev: true
3202 resolution:
3203 integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
3204 /domelementtype/1.3.1:
3205 dev: true
3206 resolution:
3207 integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
3208 /domelementtype/2.0.1:
3209 dev: true
3210 resolution:
3211 integrity: sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==
3212 /domutils/1.7.0:
3213 dependencies:
3214 dom-serializer: 0.2.2
3215 domelementtype: 1.3.1
3216 dev: true
3217 resolution:
3218 integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
3219 /dot-prop/5.2.0:
3220 dependencies:
3221 is-obj: 2.0.0
3222 dev: true
3223 engines:
3224 node: '>=8'
3225 resolution:
3226 integrity: sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==
3227 /duplexer3/0.1.4:
3228 dev: true
3229 resolution:
3230 integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
3231 /electron-to-chromium/1.3.509:
3232 dev: true
3233 resolution:
3234 integrity: sha512-cN4lkjNRuTG8rtAqTOVgwpecEC2kbKA04PG6YijcKGHK/kD0xLjiqExcAOmLUwtXZRF8cBeam2I0VZcih919Ug==
3235 /emittery/0.7.1:
3236 dev: true
3237 engines:
3238 node: '>=10'
3239 resolution:
3240 integrity: sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ==
3241 /emoji-regex/7.0.3:
3242 dev: true
3243 resolution:
3244 integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
3245 /emoji-regex/8.0.0:
3246 dev: true
3247 resolution:
3248 integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
3249 /emojis-list/3.0.0:
3250 dev: true
3251 engines:
3252 node: '>= 4'
3253 resolution:
3254 integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
3255 /empower-core/1.2.0:
3256 dependencies:
3257 call-signature: 0.0.2
3258 core-js: 2.6.11
3259 dev: true
3260 resolution:
3261 integrity: sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==
3262 /end-of-stream/1.4.4:
3263 dependencies:
3264 once: 1.4.0
3265 dev: true
3266 resolution:
3267 integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
3268 /enquirer/2.3.6:
3269 dependencies:
3270 ansi-colors: 4.1.1
3271 dev: true
3272 engines:
3273 node: '>=8.6'
3274 resolution:
3275 integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
3276 /entities/2.0.3:
3277 dev: true
3278 resolution:
3279 integrity: sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
3280 /equal-length/1.0.1:
3281 dev: true
3282 engines:
3283 node: '>=4'
3284 resolution:
3285 integrity: sha1-IcoRLUirJLTh5//A5TOdMf38J0w=
3286 /error-ex/1.3.2:
3287 dependencies:
3288 is-arrayish: 0.2.1
3289 resolution:
3290 integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
3291 /es-abstract/1.17.6:
3292 dependencies:
3293 es-to-primitive: 1.2.1
3294 function-bind: 1.1.1
3295 has: 1.0.3
3296 has-symbols: 1.0.1
3297 is-callable: 1.2.0
3298 is-regex: 1.1.0
3299 object-inspect: 1.8.0
3300 object-keys: 1.1.1
3301 object.assign: 4.1.0
3302 string.prototype.trimend: 1.0.1
3303 string.prototype.trimstart: 1.0.1
3304 dev: true
3305 engines:
3306 node: '>= 0.4'
3307 resolution:
3308 integrity: sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==
3309 /es-to-primitive/1.2.1:
3310 dependencies:
3311 is-callable: 1.2.0
3312 is-date-object: 1.0.2
3313 is-symbol: 1.0.3
3314 dev: true
3315 engines:
3316 node: '>= 0.4'
3317 resolution:
3318 integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==
3319 /es5-ext/0.10.53:
3320 dependencies:
3321 es6-iterator: 2.0.3
3322 es6-symbol: 3.1.3
3323 next-tick: 1.0.0
3324 dev: true
3325 resolution:
3326 integrity: sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==
3327 /es6-error/4.1.1:
3328 dev: true
3329 resolution:
3330 integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
3331 /es6-iterator/2.0.3:
3332 dependencies:
3333 d: 1.0.1
3334 es5-ext: 0.10.53
3335 es6-symbol: 3.1.3
3336 dev: true
3337 resolution:
3338 integrity: sha1-p96IkUGgWpSwhUQDstCg+/qY87c=
3339 /es6-object-assign/1.1.0:
3340 dev: true
3341 resolution:
3342 integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=
3343 /es6-symbol/3.1.3:
3344 dependencies:
3345 d: 1.0.1
3346 ext: 1.4.0
3347 dev: true
3348 resolution:
3349 integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==
3350 /escalade/3.0.2:
3351 dev: true
3352 engines:
3353 node: '>=6'
3354 resolution:
3355 integrity: sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==
3356 /escape-goat/2.1.1:
3357 dev: true
3358 engines:
3359 node: '>=8'
3360 resolution:
3361 integrity: sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
3362 /escape-string-regexp/1.0.5:
3363 engines:
3364 node: '>=0.8.0'
3365 resolution:
3366 integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
3367 /escape-string-regexp/2.0.0:
3368 dev: true
3369 engines:
3370 node: '>=8'
3371 resolution:
3372 integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
3373 /escape-string-regexp/4.0.0:
3374 dev: true
3375 engines:
3376 node: '>=10'
3377 resolution:
3378 integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
3379 /eslint-config-rollup/0.1.0:
3380 dependencies:
3381 eslint: 6.8.0
3382 eslint-plugin-import: 2.22.0_eslint@6.8.0
3383 eslint-plugin-prettier: 3.1.4_eslint@6.8.0+prettier@1.19.1
3384 prettier: 1.19.1
3385 dev: true
3386 engines:
3387 node: '>=8.0.0'
3388 resolution:
3389 integrity: sha512-DXJTAX33Kq+iqV1MUEH78IKj3BZIqKR9jUy1ABHcx4fCryY0G2WUFttUVpuwED0XwAIXBVOiISStoly2rtvdKA==
3390 /eslint-import-resolver-node/0.3.4:
3391 dependencies:
3392 debug: 2.6.9
3393 resolve: 1.17.0
3394 dev: true
3395 resolution:
3396 integrity: sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
3397 /eslint-module-utils/2.6.0:
3398 dependencies:
3399 debug: 2.6.9
3400 pkg-dir: 2.0.0
3401 dev: true
3402 engines:
3403 node: '>=4'
3404 resolution:
3405 integrity: sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==
3406 /eslint-plugin-import/2.22.0_eslint@6.8.0:
3407 dependencies:
3408 array-includes: 3.1.1
3409 array.prototype.flat: 1.2.3
3410 contains-path: 0.1.0
3411 debug: 2.6.9
3412 doctrine: 1.5.0
3413 eslint: 6.8.0
3414 eslint-import-resolver-node: 0.3.4
3415 eslint-module-utils: 2.6.0
3416 has: 1.0.3
3417 minimatch: 3.0.4
3418 object.values: 1.1.1
3419 read-pkg-up: 2.0.0
3420 resolve: 1.17.0
3421 tsconfig-paths: 3.9.0
3422 dev: true
3423 engines:
3424 node: '>=4'
3425 peerDependencies:
3426 eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0
3427 resolution:
3428 integrity: sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==
3429 /eslint-plugin-prettier/3.1.4_eslint@6.8.0+prettier@1.19.1:
3430 dependencies:
3431 eslint: 6.8.0
3432 prettier: 1.19.1
3433 prettier-linter-helpers: 1.0.0
3434 dev: true
3435 engines:
3436 node: '>=6.0.0'
3437 peerDependencies:
3438 eslint: '>=5.0.0'
3439 prettier: '>=1.13.0'
3440 resolution:
3441 integrity: sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==
3442 /eslint-scope/5.1.0:
3443 dependencies:
3444 esrecurse: 4.2.1
3445 estraverse: 4.3.0
3446 dev: true
3447 engines:
3448 node: '>=8.0.0'
3449 resolution:
3450 integrity: sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==
3451 /eslint-utils/1.4.3:
3452 dependencies:
3453 eslint-visitor-keys: 1.3.0
3454 dev: true
3455 engines:
3456 node: '>=6'
3457 resolution:
3458 integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
3459 /eslint-utils/2.1.0:
3460 dependencies:
3461 eslint-visitor-keys: 1.3.0
3462 dev: true
3463 engines:
3464 node: '>=6'
3465 resolution:
3466 integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
3467 /eslint-visitor-keys/1.3.0:
3468 dev: true
3469 engines:
3470 node: '>=4'
3471 resolution:
3472 integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
3473 /eslint/6.8.0:
3474 dependencies:
3475 '@babel/code-frame': 7.10.4
3476 ajv: 6.12.3
3477 chalk: 2.4.2
3478 cross-spawn: 6.0.5
3479 debug: 4.1.1
3480 doctrine: 3.0.0
3481 eslint-scope: 5.1.0
3482 eslint-utils: 1.4.3
3483 eslint-visitor-keys: 1.3.0
3484 espree: 6.2.1
3485 esquery: 1.3.1
3486 esutils: 2.0.3
3487 file-entry-cache: 5.0.1
3488 functional-red-black-tree: 1.0.1
3489 glob-parent: 5.1.1
3490 globals: 12.4.0
3491 ignore: 4.0.6
3492 import-fresh: 3.2.1
3493 imurmurhash: 0.1.4
3494 inquirer: 7.3.3
3495 is-glob: 4.0.1
3496 js-yaml: 3.14.0
3497 json-stable-stringify-without-jsonify: 1.0.1
3498 levn: 0.3.0
3499 lodash: 4.17.19
3500 minimatch: 3.0.4
3501 mkdirp: 0.5.5
3502 natural-compare: 1.4.0
3503 optionator: 0.8.3
3504 progress: 2.0.3
3505 regexpp: 2.0.1
3506 semver: 6.3.0
3507 strip-ansi: 5.2.0
3508 strip-json-comments: 3.1.1
3509 table: 5.4.6
3510 text-table: 0.2.0
3511 v8-compile-cache: 2.1.1
3512 dev: true
3513 engines:
3514 node: ^8.10.0 || ^10.13.0 || >=11.10.1
3515 hasBin: true
3516 resolution:
3517 integrity: sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==
3518 /espower-location-detector/1.0.0:
3519 dependencies:
3520 is-url: 1.2.4
3521 path-is-absolute: 1.0.1
3522 source-map: 0.5.7
3523 xtend: 4.0.2
3524 dev: true
3525 resolution:
3526 integrity: sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=
3527 /espree/6.2.1:
3528 dependencies:
3529 acorn: 7.3.1
3530 acorn-jsx: 5.2.0_acorn@7.3.1
3531 eslint-visitor-keys: 1.3.0
3532 dev: true
3533 engines:
3534 node: '>=6.0.0'
3535 resolution:
3536 integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==
3537 /esprima/4.0.1:
3538 engines:
3539 node: '>=4'
3540 hasBin: true
3541 resolution:
3542 integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
3543 /espurify/1.8.1:
3544 dependencies:
3545 core-js: 2.6.11
3546 dev: true
3547 resolution:
3548 integrity: sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==
3549 /esquery/1.3.1:
3550 dependencies:
3551 estraverse: 5.1.0
3552 dev: true
3553 engines:
3554 node: '>=0.10'
3555 resolution:
3556 integrity: sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
3557 /esrecurse/4.2.1:
3558 dependencies:
3559 estraverse: 4.3.0
3560 dev: true
3561 engines:
3562 node: '>=4.0'
3563 resolution:
3564 integrity: sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
3565 /estraverse/4.3.0:
3566 dev: true
3567 engines:
3568 node: '>=4.0'
3569 resolution:
3570 integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
3571 /estraverse/5.1.0:
3572 dev: true
3573 engines:
3574 node: '>=4.0'
3575 resolution:
3576 integrity: sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==
3577 /estree-walker/0.6.1:
3578 dev: true
3579 resolution:
3580 integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
3581 /estree-walker/1.0.1:
3582 resolution:
3583 integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
3584 /estree-walker/2.0.1:
3585 dev: false
3586 resolution:
3587 integrity: sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==
3588 /esutils/2.0.3:
3589 dev: true
3590 engines:
3591 node: '>=0.10.0'
3592 resolution:
3593 integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
3594 /eventemitter3/4.0.4:
3595 dev: true
3596 resolution:
3597 integrity: sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==
3598 /execa/4.0.3:
3599 dependencies:
3600 cross-spawn: 7.0.3
3601 get-stream: 5.1.0
3602 human-signals: 1.1.1
3603 is-stream: 2.0.0
3604 merge-stream: 2.0.0
3605 npm-run-path: 4.0.1
3606 onetime: 5.1.0
3607 signal-exit: 3.0.3
3608 strip-final-newline: 2.0.0
3609 dev: true
3610 engines:
3611 node: '>=10'
3612 resolution:
3613 integrity: sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==
3614 /ext/1.4.0:
3615 dependencies:
3616 type: 2.0.0
3617 dev: true
3618 resolution:
3619 integrity: sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==
3620 /external-editor/3.1.0:
3621 dependencies:
3622 chardet: 0.7.0
3623 iconv-lite: 0.4.24
3624 tmp: 0.0.33
3625 dev: true
3626 engines:
3627 node: '>=4'
3628 resolution:
3629 integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
3630 /fast-deep-equal/3.1.3:
3631 dev: true
3632 resolution:
3633 integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
3634 /fast-diff/1.2.0:
3635 dev: true
3636 resolution:
3637 integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
3638 /fast-glob/3.2.4:
3639 dependencies:
3640 '@nodelib/fs.stat': 2.0.3
3641 '@nodelib/fs.walk': 1.2.4
3642 glob-parent: 5.1.1
3643 merge2: 1.4.1
3644 micromatch: 4.0.2
3645 picomatch: 2.2.2
3646 engines:
3647 node: '>=8'
3648 resolution:
3649 integrity: sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==
3650 /fast-json-stable-stringify/2.1.0:
3651 dev: true
3652 resolution:
3653 integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
3654 /fast-levenshtein/2.0.6:
3655 dev: true
3656 resolution:
3657 integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
3658 /fastparse/1.1.2:
3659 dev: true
3660 resolution:
3661 integrity: sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==
3662 /fastq/1.8.0:
3663 dependencies:
3664 reusify: 1.0.4
3665 resolution:
3666 integrity: sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==
3667 /figures/3.2.0:
3668 dependencies:
3669 escape-string-regexp: 1.0.5
3670 dev: true
3671 engines:
3672 node: '>=8'
3673 resolution:
3674 integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
3675 /file-entry-cache/5.0.1:
3676 dependencies:
3677 flat-cache: 2.0.1
3678 dev: true
3679 engines:
3680 node: '>=4'
3681 resolution:
3682 integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
3683 /fill-range/7.0.1:
3684 dependencies:
3685 to-regex-range: 5.0.1
3686 engines:
3687 node: '>=8'
3688 resolution:
3689 integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
3690 /find-cache-dir/3.3.1:
3691 dependencies:
3692 commondir: 1.0.1
3693 make-dir: 3.1.0
3694 pkg-dir: 4.2.0
3695 dev: true
3696 engines:
3697 node: '>=8'
3698 resolution:
3699 integrity: sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==
3700 /find-up/2.1.0:
3701 dependencies:
3702 locate-path: 2.0.0
3703 dev: true
3704 engines:
3705 node: '>=4'
3706 resolution:
3707 integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
3708 /find-up/3.0.0:
3709 dependencies:
3710 locate-path: 3.0.0
3711 dev: true
3712 engines:
3713 node: '>=6'
3714 resolution:
3715 integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
3716 /find-up/4.1.0:
3717 dependencies:
3718 locate-path: 5.0.0
3719 path-exists: 4.0.0
3720 engines:
3721 node: '>=8'
3722 resolution:
3723 integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
3724 /find-versions/3.2.0:
3725 dependencies:
3726 semver-regex: 2.0.0
3727 dev: true
3728 engines:
3729 node: '>=6'
3730 resolution:
3731 integrity: sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
3732 /flat-cache/2.0.1:
3733 dependencies:
3734 flatted: 2.0.2
3735 rimraf: 2.6.3
3736 write: 1.0.3
3737 dev: true
3738 engines:
3739 node: '>=4'
3740 resolution:
3741 integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
3742 /flatted/2.0.2:
3743 dev: true
3744 resolution:
3745 integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
3746 /foreground-child/2.0.0:
3747 dependencies:
3748 cross-spawn: 7.0.3
3749 signal-exit: 3.0.3
3750 dev: true
3751 engines:
3752 node: '>=8.0.0'
3753 resolution:
3754 integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==
3755 /fromentries/1.2.1:
3756 dev: true
3757 resolution:
3758 integrity: sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==
3759 /fs.realpath/1.0.0:
3760 resolution:
3761 integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
3762 /fsevents/2.1.3:
3763 dev: true
3764 engines:
3765 node: ^8.16.0 || ^10.6.0 || >=11.0.0
3766 optional: true
3767 os:
3768 - darwin
3769 resolution:
3770 integrity: sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
3771 /function-bind/1.1.1:
3772 dev: true
3773 resolution:
3774 integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
3775 /functional-red-black-tree/1.0.1:
3776 dev: true
3777 resolution:
3778 integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
3779 /generic-names/2.0.1:
3780 dependencies:
3781 loader-utils: 1.4.0
3782 dev: true
3783 resolution:
3784 integrity: sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==
3785 /gensync/1.0.0-beta.1:
3786 dev: true
3787 engines:
3788 node: '>=6.9.0'
3789 resolution:
3790 integrity: sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==
3791 /get-caller-file/2.0.5:
3792 dev: true
3793 engines:
3794 node: 6.* || 8.* || >= 10.*
3795 resolution:
3796 integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
3797 /get-own-enumerable-property-symbols/3.0.2:
3798 dev: true
3799 resolution:
3800 integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==
3801 /get-package-type/0.1.0:
3802 dev: true
3803 engines:
3804 node: '>=8.0.0'
3805 resolution:
3806 integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
3807 /get-stream/4.1.0:
3808 dependencies:
3809 pump: 3.0.0
3810 dev: true
3811 engines:
3812 node: '>=6'
3813 resolution:
3814 integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
3815 /get-stream/5.1.0:
3816 dependencies:
3817 pump: 3.0.0
3818 dev: true
3819 engines:
3820 node: '>=8'
3821 resolution:
3822 integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
3823 /glob-parent/5.1.1:
3824 dependencies:
3825 is-glob: 4.0.1
3826 engines:
3827 node: '>= 6'
3828 resolution:
3829 integrity: sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
3830 /glob/7.1.6:
3831 dependencies:
3832 fs.realpath: 1.0.0
3833 inflight: 1.0.6
3834 inherits: 2.0.4
3835 minimatch: 3.0.4
3836 once: 1.4.0
3837 path-is-absolute: 1.0.1
3838 resolution:
3839 integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
3840 /global-dirs/2.0.1:
3841 dependencies:
3842 ini: 1.3.5
3843 dev: true
3844 engines:
3845 node: '>=8'
3846 resolution:
3847 integrity: sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==
3848 /globals/11.12.0:
3849 dev: true
3850 engines:
3851 node: '>=4'
3852 resolution:
3853 integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
3854 /globals/12.4.0:
3855 dependencies:
3856 type-fest: 0.8.1
3857 dev: true
3858 engines:
3859 node: '>=8'
3860 resolution:
3861 integrity: sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==
3862 /globby/10.0.2:
3863 dependencies:
3864 '@types/glob': 7.1.3
3865 array-union: 2.1.0
3866 dir-glob: 3.0.1
3867 fast-glob: 3.2.4
3868 glob: 7.1.6
3869 ignore: 5.1.8
3870 merge2: 1.4.1
3871 slash: 3.0.0
3872 dev: true
3873 engines:
3874 node: '>=8'
3875 resolution:
3876 integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==
3877 /globby/11.0.1:
3878 dependencies:
3879 array-union: 2.1.0
3880 dir-glob: 3.0.1
3881 fast-glob: 3.2.4
3882 ignore: 5.1.8
3883 merge2: 1.4.1
3884 slash: 3.0.0
3885 engines:
3886 node: '>=10'
3887 resolution:
3888 integrity: sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==
3889 /got/10.7.0:
3890 dependencies:
3891 '@sindresorhus/is': 2.1.1
3892 '@szmarczak/http-timer': 4.0.5
3893 '@types/cacheable-request': 6.0.1
3894 cacheable-lookup: 2.0.1
3895 cacheable-request: 7.0.1
3896 decompress-response: 5.0.0
3897 duplexer3: 0.1.4
3898 get-stream: 5.1.0
3899 lowercase-keys: 2.0.0
3900 mimic-response: 2.1.0
3901 p-cancelable: 2.0.0
3902 p-event: 4.2.0
3903 responselike: 2.0.0
3904 to-readable-stream: 2.1.0
3905 type-fest: 0.10.0
3906 dev: true
3907 engines:
3908 node: '>=10'
3909 resolution:
3910 integrity: sha512-aWTDeNw9g+XqEZNcTjMMZSy7B7yE9toWOFYip7ofFTLleJhvZwUxxTxkTpKvF+p1SAA4VHmuEy7PiHTHyq8tJg==
3911 /got/9.6.0:
3912 dependencies:
3913 '@sindresorhus/is': 0.14.0
3914 '@szmarczak/http-timer': 1.1.2
3915 cacheable-request: 6.1.0
3916 decompress-response: 3.3.0
3917 duplexer3: 0.1.4
3918 get-stream: 4.1.0
3919 lowercase-keys: 1.0.1
3920 mimic-response: 1.0.1
3921 p-cancelable: 1.1.0
3922 to-readable-stream: 1.0.0
3923 url-parse-lax: 3.0.0
3924 dev: true
3925 engines:
3926 node: '>=8.6'
3927 resolution:
3928 integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
3929 /graceful-fs/4.2.4:
3930 resolution:
3931 integrity: sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
3932 /hard-rejection/2.1.0:
3933 engines:
3934 node: '>=6'
3935 resolution:
3936 integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==
3937 /has-ansi/2.0.0:
3938 dependencies:
3939 ansi-regex: 2.1.1
3940 dev: true
3941 engines:
3942 node: '>=0.10.0'
3943 resolution:
3944 integrity: sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
3945 /has-flag/1.0.0:
3946 dev: true
3947 engines:
3948 node: '>=0.10.0'
3949 resolution:
3950 integrity: sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=
3951 /has-flag/3.0.0:
3952 engines:
3953 node: '>=4'
3954 resolution:
3955 integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
3956 /has-flag/4.0.0:
3957 dev: true
3958 engines:
3959 node: '>=8'
3960 resolution:
3961 integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
3962 /has-symbols/1.0.1:
3963 dev: true
3964 engines:
3965 node: '>= 0.4'
3966 resolution:
3967 integrity: sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
3968 /has-yarn/2.1.0:
3969 dev: true
3970 engines:
3971 node: '>=8'
3972 resolution:
3973 integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==
3974 /has/1.0.3:
3975 dependencies:
3976 function-bind: 1.1.1
3977 dev: true
3978 engines:
3979 node: '>= 0.4.0'
3980 resolution:
3981 integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
3982 /hasha/5.2.0:
3983 dependencies:
3984 is-stream: 2.0.0
3985 type-fest: 0.8.1
3986 dev: true
3987 engines:
3988 node: '>=8'
3989 resolution:
3990 integrity: sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==
3991 /hex-color-regex/1.1.0:
3992 dev: true
3993 resolution:
3994 integrity: sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
3995 /hosted-git-info/2.8.8:
3996 resolution:
3997 integrity: sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
3998 /hsl-regex/1.0.0:
3999 dev: true
4000 resolution:
4001 integrity: sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=
4002 /hsla-regex/1.0.0:
4003 dev: true
4004 resolution:
4005 integrity: sha1-wc56MWjIxmFAM6S194d/OyJfnDg=
4006 /html-comment-regex/1.1.2:
4007 dev: true
4008 resolution:
4009 integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
4010 /html-escaper/2.0.2:
4011 dev: true
4012 resolution:
4013 integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
4014 /http-cache-semantics/4.1.0:
4015 dev: true
4016 resolution:
4017 integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
4018 /human-signals/1.1.1:
4019 dev: true
4020 engines:
4021 node: '>=8.12.0'
4022 resolution:
4023 integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
4024 /husky/4.2.5:
4025 dependencies:
4026 chalk: 4.1.0
4027 ci-info: 2.0.0
4028 compare-versions: 3.6.0
4029 cosmiconfig: 6.0.0
4030 find-versions: 3.2.0
4031 opencollective-postinstall: 2.0.3
4032 pkg-dir: 4.2.0
4033 please-upgrade-node: 3.2.0
4034 slash: 3.0.0
4035 which-pm-runs: 1.0.0
4036 dev: true
4037 engines:
4038 node: '>=10'
4039 hasBin: true
4040 requiresBuild: true
4041 resolution:
4042 integrity: sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==
4043 /iconv-lite/0.4.24:
4044 dependencies:
4045 safer-buffer: 2.1.2
4046 engines:
4047 node: '>=0.10.0'
4048 resolution:
4049 integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
4050 /icss-replace-symbols/1.1.0:
4051 dev: true
4052 resolution:
4053 integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=
4054 /ignore-by-default/2.0.0:
4055 dev: true
4056 engines:
4057 node: '>=10 <11 || >=12 <13 || >=14'
4058 resolution:
4059 integrity: sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==
4060 /ignore/4.0.6:
4061 dev: true
4062 engines:
4063 node: '>= 4'
4064 resolution:
4065 integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
4066 /ignore/5.1.8:
4067 engines:
4068 node: '>= 4'
4069 resolution:
4070 integrity: sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
4071 /import-cwd/2.1.0:
4072 dependencies:
4073 import-from: 2.1.0
4074 dev: true
4075 engines:
4076 node: '>=4'
4077 resolution:
4078 integrity: sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=
4079 /import-cwd/3.0.0:
4080 dependencies:
4081 import-from: 3.0.0
4082 dev: true
4083 engines:
4084 node: '>=8'
4085 resolution:
4086 integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==
4087 /import-fresh/2.0.0:
4088 dependencies:
4089 caller-path: 2.0.0
4090 resolve-from: 3.0.0
4091 dev: true
4092 engines:
4093 node: '>=4'
4094 resolution:
4095 integrity: sha1-2BNVwVYS04bGH53dOSLUMEgipUY=
4096 /import-fresh/3.2.1:
4097 dependencies:
4098 parent-module: 1.0.1
4099 resolve-from: 4.0.0
4100 dev: true
4101 engines:
4102 node: '>=6'
4103 resolution:
4104 integrity: sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
4105 /import-from/2.1.0:
4106 dependencies:
4107 resolve-from: 3.0.0
4108 dev: true
4109 engines:
4110 node: '>=4'
4111 resolution:
4112 integrity: sha1-M1238qev/VOqpHHUuAId7ja387E=
4113 /import-from/3.0.0:
4114 dependencies:
4115 resolve-from: 5.0.0
4116 dev: true
4117 engines:
4118 node: '>=8'
4119 resolution:
4120 integrity: sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==
4121 /import-lazy/2.1.0:
4122 dev: true
4123 engines:
4124 node: '>=4'
4125 resolution:
4126 integrity: sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
4127 /import-local/3.0.2:
4128 dependencies:
4129 pkg-dir: 4.2.0
4130 resolve-cwd: 3.0.0
4131 dev: true
4132 engines:
4133 node: '>=8'
4134 hasBin: true
4135 resolution:
4136 integrity: sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==
4137 /imurmurhash/0.1.4:
4138 engines:
4139 node: '>=0.8.19'
4140 resolution:
4141 integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=
4142 /indent-string/3.2.0:
4143 dev: true
4144 engines:
4145 node: '>=4'
4146 resolution:
4147 integrity: sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=
4148 /indent-string/4.0.0:
4149 engines:
4150 node: '>=8'
4151 resolution:
4152 integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
4153 /indexes-of/1.0.1:
4154 dev: true
4155 resolution:
4156 integrity: sha1-8w9xbI4r00bHtn0985FVZqfAVgc=
4157 /inflight/1.0.6:
4158 dependencies:
4159 once: 1.4.0
4160 wrappy: 1.0.2
4161 resolution:
4162 integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
4163 /inherits/2.0.4:
4164 resolution:
4165 integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
4166 /ini/1.3.5:
4167 dev: true
4168 resolution:
4169 integrity: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
4170 /inquirer/7.3.3:
4171 dependencies:
4172 ansi-escapes: 4.3.1
4173 chalk: 4.1.0
4174 cli-cursor: 3.1.0
4175 cli-width: 3.0.0
4176 external-editor: 3.1.0
4177 figures: 3.2.0
4178 lodash: 4.17.19
4179 mute-stream: 0.0.8
4180 run-async: 2.4.1
4181 rxjs: 6.6.0
4182 string-width: 4.2.0
4183 strip-ansi: 6.0.0
4184 through: 2.3.8
4185 dev: true
4186 engines:
4187 node: '>=8.0.0'
4188 resolution:
4189 integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
4190 /interpret/1.4.0:
4191 dev: true
4192 engines:
4193 node: '>= 0.10'
4194 resolution:
4195 integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
4196 /invariant/2.2.4:
4197 dependencies:
4198 loose-envify: 1.4.0
4199 dev: true
4200 resolution:
4201 integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
4202 /irregular-plurals/3.2.0:
4203 dev: true
4204 engines:
4205 node: '>=8'
4206 resolution:
4207 integrity: sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==
4208 /is-absolute-url/2.1.0:
4209 dev: true
4210 engines:
4211 node: '>=0.10.0'
4212 resolution:
4213 integrity: sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=
4214 /is-arguments/1.0.4:
4215 dev: true
4216 engines:
4217 node: '>= 0.4'
4218 resolution:
4219 integrity: sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
4220 /is-arrayish/0.2.1:
4221 resolution:
4222 integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
4223 /is-arrayish/0.3.2:
4224 dev: true
4225 resolution:
4226 integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
4227 /is-binary-path/2.1.0:
4228 dependencies:
4229 binary-extensions: 2.1.0
4230 dev: true
4231 engines:
4232 node: '>=8'
4233 resolution:
4234 integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
4235 /is-callable/1.2.0:
4236 dev: true
4237 engines:
4238 node: '>= 0.4'
4239 resolution:
4240 integrity: sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==
4241 /is-ci/2.0.0:
4242 dependencies:
4243 ci-info: 2.0.0
4244 dev: true
4245 hasBin: true
4246 resolution:
4247 integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
4248 /is-color-stop/1.1.0:
4249 dependencies:
4250 css-color-names: 0.0.4
4251 hex-color-regex: 1.1.0
4252 hsl-regex: 1.0.0
4253 hsla-regex: 1.0.0
4254 rgb-regex: 1.0.1
4255 rgba-regex: 1.0.0
4256 dev: true
4257 resolution:
4258 integrity: sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=
4259 /is-date-object/1.0.2:
4260 dev: true
4261 engines:
4262 node: '>= 0.4'
4263 resolution:
4264 integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
4265 /is-directory/0.3.1:
4266 dev: true
4267 engines:
4268 node: '>=0.10.0'
4269 resolution:
4270 integrity: sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
4271 /is-error/2.2.2:
4272 dev: true
4273 resolution:
4274 integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==
4275 /is-extglob/2.1.1:
4276 engines:
4277 node: '>=0.10.0'
4278 resolution:
4279 integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
4280 /is-fullwidth-code-point/2.0.0:
4281 dev: true
4282 engines:
4283 node: '>=4'
4284 resolution:
4285 integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
4286 /is-fullwidth-code-point/3.0.0:
4287 dev: true
4288 engines:
4289 node: '>=8'
4290 resolution:
4291 integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
4292 /is-glob/4.0.1:
4293 dependencies:
4294 is-extglob: 2.1.1
4295 engines:
4296 node: '>=0.10.0'
4297 resolution:
4298 integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
4299 /is-installed-globally/0.3.2:
4300 dependencies:
4301 global-dirs: 2.0.1
4302 is-path-inside: 3.0.2
4303 dev: true
4304 engines:
4305 node: '>=8'
4306 resolution:
4307 integrity: sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==
4308 /is-interactive/1.0.0:
4309 dev: true
4310 engines:
4311 node: '>=8'
4312 resolution:
4313 integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==
4314 /is-module/1.0.0:
4315 resolution:
4316 integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=
4317 /is-npm/4.0.0:
4318 dev: true
4319 engines:
4320 node: '>=8'
4321 resolution:
4322 integrity: sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==
4323 /is-number/7.0.0:
4324 engines:
4325 node: '>=0.12.0'
4326 resolution:
4327 integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
4328 /is-obj/1.0.1:
4329 dev: true
4330 engines:
4331 node: '>=0.10.0'
4332 resolution:
4333 integrity: sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
4334 /is-obj/2.0.0:
4335 dev: true
4336 engines:
4337 node: '>=8'
4338 resolution:
4339 integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
4340 /is-path-cwd/2.2.0:
4341 dev: true
4342 engines:
4343 node: '>=6'
4344 resolution:
4345 integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==
4346 /is-path-inside/3.0.2:
4347 dev: true
4348 engines:
4349 node: '>=8'
4350 resolution:
4351 integrity: sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
4352 /is-plain-obj/1.1.0:
4353 engines:
4354 node: '>=0.10.0'
4355 resolution:
4356 integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
4357 /is-plain-object/3.0.1:
4358 dev: true
4359 engines:
4360 node: '>=0.10.0'
4361 resolution:
4362 integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==
4363 /is-plain-object/4.1.1:
4364 dev: true
4365 engines:
4366 node: '>=0.10.0'
4367 resolution:
4368 integrity: sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA==
4369 /is-promise/4.0.0:
4370 dev: true
4371 resolution:
4372 integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==
4373 /is-reference/1.2.1:
4374 dependencies:
4375 '@types/estree': 0.0.45
4376 resolution:
4377 integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
4378 /is-regex/1.1.0:
4379 dependencies:
4380 has-symbols: 1.0.1
4381 dev: true
4382 engines:
4383 node: '>= 0.4'
4384 resolution:
4385 integrity: sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==
4386 /is-regexp/1.0.0:
4387 dev: true
4388 engines:
4389 node: '>=0.10.0'
4390 resolution:
4391 integrity: sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
4392 /is-resolvable/1.1.0:
4393 dev: true
4394 resolution:
4395 integrity: sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
4396 /is-stream/2.0.0:
4397 dev: true
4398 engines:
4399 node: '>=8'
4400 resolution:
4401 integrity: sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
4402 /is-string/1.0.5:
4403 dev: true
4404 engines:
4405 node: '>= 0.4'
4406 resolution:
4407 integrity: sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
4408 /is-svg/3.0.0:
4409 dependencies:
4410 html-comment-regex: 1.1.2
4411 dev: true
4412 engines:
4413 node: '>=4'
4414 resolution:
4415 integrity: sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==
4416 /is-symbol/1.0.3:
4417 dependencies:
4418 has-symbols: 1.0.1
4419 dev: true
4420 engines:
4421 node: '>= 0.4'
4422 resolution:
4423 integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==
4424 /is-text-path/1.0.1:
4425 dependencies:
4426 text-extensions: 1.9.0
4427 dev: false
4428 engines:
4429 node: '>=0.10.0'
4430 resolution:
4431 integrity: sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=
4432 /is-typedarray/1.0.0:
4433 dev: true
4434 resolution:
4435 integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
4436 /is-url/1.2.4:
4437 dev: true
4438 resolution:
4439 integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
4440 /is-utf8/0.2.1:
4441 dev: true
4442 resolution:
4443 integrity: sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
4444 /is-windows/1.0.2:
4445 dev: true
4446 engines:
4447 node: '>=0.10.0'
4448 resolution:
4449 integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
4450 /is-yarn-global/0.3.0:
4451 dev: true
4452 resolution:
4453 integrity: sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
4454 /isarray/0.0.1:
4455 dev: true
4456 resolution:
4457 integrity: sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
4458 /isarray/1.0.0:
4459 resolution:
4460 integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
4461 /isexe/2.0.0:
4462 dev: true
4463 resolution:
4464 integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
4465 /istanbul-lib-coverage/3.0.0:
4466 dev: true
4467 engines:
4468 node: '>=8'
4469 resolution:
4470 integrity: sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==
4471 /istanbul-lib-hook/3.0.0:
4472 dependencies:
4473 append-transform: 2.0.0
4474 dev: true
4475 engines:
4476 node: '>=8'
4477 resolution:
4478 integrity: sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==
4479 /istanbul-lib-instrument/4.0.3:
4480 dependencies:
4481 '@babel/core': 7.10.5
4482 '@istanbuljs/schema': 0.1.2
4483 istanbul-lib-coverage: 3.0.0
4484 semver: 6.3.0
4485 dev: true
4486 engines:
4487 node: '>=8'
4488 resolution:
4489 integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==
4490 /istanbul-lib-processinfo/2.0.2:
4491 dependencies:
4492 archy: 1.0.0
4493 cross-spawn: 7.0.3
4494 istanbul-lib-coverage: 3.0.0
4495 make-dir: 3.1.0
4496 p-map: 3.0.0
4497 rimraf: 3.0.2
4498 uuid: 3.4.0
4499 dev: true
4500 engines:
4501 node: '>=8'
4502 resolution:
4503 integrity: sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==
4504 /istanbul-lib-report/3.0.0:
4505 dependencies:
4506 istanbul-lib-coverage: 3.0.0
4507 make-dir: 3.1.0
4508 supports-color: 7.1.0
4509 dev: true
4510 engines:
4511 node: '>=8'
4512 resolution:
4513 integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==
4514 /istanbul-lib-source-maps/4.0.0:
4515 dependencies:
4516 debug: 4.1.1
4517 istanbul-lib-coverage: 3.0.0
4518 source-map: 0.6.1
4519 dev: true
4520 engines:
4521 node: '>=8'
4522 resolution:
4523 integrity: sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==
4524 /istanbul-reports/3.0.2:
4525 dependencies:
4526 html-escaper: 2.0.2
4527 istanbul-lib-report: 3.0.0
4528 dev: true
4529 engines:
4530 node: '>=8'
4531 resolution:
4532 integrity: sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==
4533 /js-string-escape/1.0.1:
4534 dev: true
4535 engines:
4536 node: '>= 0.8'
4537 resolution:
4538 integrity: sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=
4539 /js-tokens/4.0.0:
4540 resolution:
4541 integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
4542 /js-yaml/3.14.0:
4543 dependencies:
4544 argparse: 1.0.10
4545 esprima: 4.0.1
4546 hasBin: true
4547 resolution:
4548 integrity: sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
4549 /jsesc/0.5.0:
4550 hasBin: true
4551 resolution:
4552 integrity: sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
4553 /jsesc/2.5.2:
4554 dev: true
4555 engines:
4556 node: '>=4'
4557 hasBin: true
4558 resolution:
4559 integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
4560 /json-buffer/3.0.0:
4561 dev: true
4562 resolution:
4563 integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
4564 /json-buffer/3.0.1:
4565 dev: true
4566 resolution:
4567 integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
4568 /json-parse-better-errors/1.0.2:
4569 resolution:
4570 integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
4571 /json-schema-traverse/0.4.1:
4572 dev: true
4573 resolution:
4574 integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
4575 /json-stable-stringify-without-jsonify/1.0.1:
4576 dev: true
4577 resolution:
4578 integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
4579 /json5/1.0.1:
4580 dependencies:
4581 minimist: 1.2.5
4582 dev: true
4583 hasBin: true
4584 resolution:
4585 integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
4586 /json5/2.1.3:
4587 dependencies:
4588 minimist: 1.2.5
4589 dev: true
4590 engines:
4591 node: '>=6'
4592 hasBin: true
4593 resolution:
4594 integrity: sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
4595 /jsonparse/1.3.1:
4596 dev: false
4597 engines:
4598 '0': node >= 0.2.0
4599 resolution:
4600 integrity: sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=
4601 /just-extend/4.1.0:
4602 dev: true
4603 resolution:
4604 integrity: sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==
4605 /keyv/3.1.0:
4606 dependencies:
4607 json-buffer: 3.0.0
4608 dev: true
4609 resolution:
4610 integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
4611 /keyv/4.0.1:
4612 dependencies:
4613 json-buffer: 3.0.1
4614 dev: true
4615 resolution:
4616 integrity: sha512-xz6Jv6oNkbhrFCvCP7HQa8AaII8y8LRpoSm661NOKLr4uHuBwhX4epXrPQgF3+xdJnN4Esm5X0xwY4bOlALOtw==
4617 /kind-of/6.0.3:
4618 engines:
4619 node: '>=0.10.0'
4620 resolution:
4621 integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
4622 /latest-version/5.1.0:
4623 dependencies:
4624 package-json: 6.5.0
4625 dev: true
4626 engines:
4627 node: '>=8'
4628 resolution:
4629 integrity: sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==
4630 /leven/3.1.0:
4631 dev: true
4632 engines:
4633 node: '>=6'
4634 resolution:
4635 integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==
4636 /levenary/1.1.1:
4637 dependencies:
4638 leven: 3.1.0
4639 dev: true
4640 engines:
4641 node: '>= 6'
4642 resolution:
4643 integrity: sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==
4644 /levn/0.3.0:
4645 dependencies:
4646 prelude-ls: 1.1.2
4647 type-check: 0.3.2
4648 dev: true
4649 engines:
4650 node: '>= 0.8.0'
4651 resolution:
4652 integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
4653 /lines-and-columns/1.1.6:
4654 resolution:
4655 integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
4656 /lint-staged/10.2.11:
4657 dependencies:
4658 chalk: 4.1.0
4659 cli-truncate: 2.1.0
4660 commander: 5.1.0
4661 cosmiconfig: 6.0.0
4662 debug: 4.1.1
4663 dedent: 0.7.0
4664 enquirer: 2.3.6
4665 execa: 4.0.3
4666 listr2: 2.4.0_enquirer@2.3.6
4667 log-symbols: 4.0.0
4668 micromatch: 4.0.2
4669 normalize-path: 3.0.0
4670 please-upgrade-node: 3.2.0
4671 string-argv: 0.3.1
4672 stringify-object: 3.3.0
4673 dev: true
4674 hasBin: true
4675 resolution:
4676 integrity: sha512-LRRrSogzbixYaZItE2APaS4l2eJMjjf5MbclRZpLJtcQJShcvUzKXsNeZgsLIZ0H0+fg2tL4B59fU9wHIHtFIA==
4677 /listr2/2.4.0_enquirer@2.3.6:
4678 dependencies:
4679 chalk: 4.1.0
4680 cli-truncate: 2.1.0
4681 enquirer: 2.3.6
4682 figures: 3.2.0
4683 indent-string: 4.0.0
4684 log-update: 4.0.0
4685 p-map: 4.0.0
4686 rxjs: 6.6.0
4687 through: 2.3.8
4688 dev: true
4689 engines:
4690 node: '>=10.0.0'
4691 peerDependencies:
4692 enquirer: '>= 2.3.0 < 3'
4693 resolution:
4694 integrity: sha512-Hj2ECZdAxDkuYFtIKE35PgdMSqMp0muIhJRG5EyV5pOWFEUmKUG+fhfFrvIUNGBQvvi7wQ41eKTxDBisfvDjFQ==
4695 /load-json-file/2.0.0:
4696 dependencies:
4697 graceful-fs: 4.2.4
4698 parse-json: 2.2.0
4699 pify: 2.3.0
4700 strip-bom: 3.0.0
4701 dev: true
4702 engines:
4703 node: '>=4'
4704 resolution:
4705 integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
4706 /load-json-file/5.3.0:
4707 dependencies:
4708 graceful-fs: 4.2.4
4709 parse-json: 4.0.0
4710 pify: 4.0.1
4711 strip-bom: 3.0.0
4712 type-fest: 0.3.1
4713 dev: true
4714 engines:
4715 node: '>=6'
4716 resolution:
4717 integrity: sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==
4718 /loader-utils/1.4.0:
4719 dependencies:
4720 big.js: 5.2.2
4721 emojis-list: 3.0.0
4722 json5: 1.0.1
4723 dev: true
4724 engines:
4725 node: '>=4.0.0'
4726 resolution:
4727 integrity: sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==
4728 /locate-character/2.0.5:
4729 dev: true
4730 resolution:
4731 integrity: sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==
4732 /locate-path/2.0.0:
4733 dependencies:
4734 p-locate: 2.0.0
4735 path-exists: 3.0.0
4736 dev: true
4737 engines:
4738 node: '>=4'
4739 resolution:
4740 integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
4741 /locate-path/3.0.0:
4742 dependencies:
4743 p-locate: 3.0.0
4744 path-exists: 3.0.0
4745 dev: true
4746 engines:
4747 node: '>=6'
4748 resolution:
4749 integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
4750 /locate-path/5.0.0:
4751 dependencies:
4752 p-locate: 4.1.0
4753 engines:
4754 node: '>=8'
4755 resolution:
4756 integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
4757 /lodash.camelcase/4.3.0:
4758 dev: true
4759 resolution:
4760 integrity: sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
4761 /lodash.clonedeep/4.5.0:
4762 dev: true
4763 resolution:
4764 integrity: sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
4765 /lodash.flattendeep/4.4.0:
4766 dev: true
4767 resolution:
4768 integrity: sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=
4769 /lodash.get/4.4.2:
4770 dev: true
4771 resolution:
4772 integrity: sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
4773 /lodash.islength/4.0.1:
4774 dev: true
4775 resolution:
4776 integrity: sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc=
4777 /lodash.memoize/4.1.2:
4778 dev: true
4779 resolution:
4780 integrity: sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
4781 /lodash.merge/4.6.2:
4782 dev: true
4783 resolution:
4784 integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
4785 /lodash.uniq/4.5.0:
4786 dev: true
4787 resolution:
4788 integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
4789 /lodash/4.17.19:
4790 resolution:
4791 integrity: sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
4792 /log-symbols/3.0.0:
4793 dependencies:
4794 chalk: 2.4.2
4795 dev: true
4796 engines:
4797 node: '>=8'
4798 resolution:
4799 integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==
4800 /log-symbols/4.0.0:
4801 dependencies:
4802 chalk: 4.1.0
4803 dev: true
4804 engines:
4805 node: '>=10'
4806 resolution:
4807 integrity: sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
4808 /log-update/4.0.0:
4809 dependencies:
4810 ansi-escapes: 4.3.1
4811 cli-cursor: 3.1.0
4812 slice-ansi: 4.0.0
4813 wrap-ansi: 6.2.0
4814 dev: true
4815 engines:
4816 node: '>=10'
4817 resolution:
4818 integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==
4819 /loose-envify/1.4.0:
4820 dependencies:
4821 js-tokens: 4.0.0
4822 dev: true
4823 hasBin: true
4824 resolution:
4825 integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
4826 /lowercase-keys/1.0.1:
4827 dev: true
4828 engines:
4829 node: '>=0.10.0'
4830 resolution:
4831 integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
4832 /lowercase-keys/2.0.0:
4833 dev: true
4834 engines:
4835 node: '>=8'
4836 resolution:
4837 integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
4838 /magic-string/0.25.7:
4839 dependencies:
4840 sourcemap-codec: 1.4.8
4841 resolution:
4842 integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
4843 /make-dir/2.1.0:
4844 dependencies:
4845 pify: 4.0.1
4846 semver: 5.7.1
4847 dev: false
4848 engines:
4849 node: '>=6'
4850 resolution:
4851 integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
4852 /make-dir/3.1.0:
4853 dependencies:
4854 semver: 6.3.0
4855 engines:
4856 node: '>=8'
4857 resolution:
4858 integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
4859 /make-error/1.3.6:
4860 dev: true
4861 resolution:
4862 integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
4863 /map-age-cleaner/0.1.3:
4864 dependencies:
4865 p-defer: 1.0.0
4866 dev: true
4867 engines:
4868 node: '>=6'
4869 resolution:
4870 integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==
4871 /map-obj/1.0.1:
4872 engines:
4873 node: '>=0.10.0'
4874 resolution:
4875 integrity: sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
4876 /map-obj/4.1.0:
4877 engines:
4878 node: '>=8'
4879 resolution:
4880 integrity: sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==
4881 /matched/5.0.0:
4882 dependencies:
4883 glob: 7.1.6
4884 picomatch: 2.2.2
4885 dev: false
4886 engines:
4887 node: '>=12'
4888 resolution:
4889 integrity: sha512-O0LCuxYYBNBjP2dmAg0i6PME0Mb0dvjulpMC0tTIeMRh6kXYsugOT5GOWpFkSzqjQjgOUs/eiyvpVhXdN2La4g==
4890 /matcher/3.0.0:
4891 dependencies:
4892 escape-string-regexp: 4.0.0
4893 dev: true
4894 engines:
4895 node: '>=10'
4896 resolution:
4897 integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
4898 /md5-hex/2.0.0:
4899 dependencies:
4900 md5-o-matic: 0.1.1
4901 dev: true
4902 engines:
4903 node: '>=4'
4904 resolution:
4905 integrity: sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=
4906 /md5-hex/3.0.1:
4907 dependencies:
4908 blueimp-md5: 2.17.0
4909 dev: true
4910 engines:
4911 node: '>=8'
4912 resolution:
4913 integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==
4914 /md5-o-matic/0.1.1:
4915 dev: true
4916 resolution:
4917 integrity: sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=
4918 /mdn-data/2.0.4:
4919 dev: true
4920 resolution:
4921 integrity: sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==
4922 /mdn-data/2.0.6:
4923 dev: true
4924 resolution:
4925 integrity: sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==
4926 /mem/6.1.0:
4927 dependencies:
4928 map-age-cleaner: 0.1.3
4929 mimic-fn: 3.1.0
4930 dev: true
4931 engines:
4932 node: '>=8'
4933 resolution:
4934 integrity: sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==
4935 /meow/6.1.1:
4936 dependencies:
4937 '@types/minimist': 1.2.0
4938 camelcase-keys: 6.2.2
4939 decamelize-keys: 1.1.0
4940 hard-rejection: 2.1.0
4941 minimist-options: 4.1.0
4942 normalize-package-data: 2.5.0
4943 read-pkg-up: 7.0.1
4944 redent: 3.0.0
4945 trim-newlines: 3.0.0
4946 type-fest: 0.13.1
4947 yargs-parser: 18.1.3
4948 dev: true
4949 engines:
4950 node: '>=8'
4951 resolution:
4952 integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==
4953 /meow/7.0.1:
4954 dependencies:
4955 '@types/minimist': 1.2.0
4956 arrify: 2.0.1
4957 camelcase: 6.0.0
4958 camelcase-keys: 6.2.2
4959 decamelize-keys: 1.1.0
4960 hard-rejection: 2.1.0
4961 minimist-options: 4.1.0
4962 normalize-package-data: 2.5.0
4963 read-pkg-up: 7.0.1
4964 redent: 3.0.0
4965 trim-newlines: 3.0.0
4966 type-fest: 0.13.1
4967 yargs-parser: 18.1.3
4968 dev: false
4969 engines:
4970 node: '>=10'
4971 resolution:
4972 integrity: sha512-tBKIQqVrAHqwit0vfuFPY3LlzJYkEOFyKa3bPgxzNl6q/RtN8KQ+ALYEASYuFayzSAsjlhXj/JZ10rH85Q6TUw==
4973 /merge-stream/2.0.0:
4974 dev: true
4975 resolution:
4976 integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
4977 /merge2/1.4.1:
4978 engines:
4979 node: '>= 8'
4980 resolution:
4981 integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
4982 /micromatch/4.0.2:
4983 dependencies:
4984 braces: 3.0.2
4985 picomatch: 2.2.2
4986 engines:
4987 node: '>=8'
4988 resolution:
4989 integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
4990 /mime/2.4.6:
4991 dev: false
4992 engines:
4993 node: '>=4.0.0'
4994 hasBin: true
4995 resolution:
4996 integrity: sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==
4997 /mimic-fn/2.1.0:
4998 dev: true
4999 engines:
5000 node: '>=6'
5001 resolution:
5002 integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
5003 /mimic-fn/3.1.0:
5004 dev: true
5005 engines:
5006 node: '>=8'
5007 resolution:
5008 integrity: sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==
5009 /mimic-response/1.0.1:
5010 dev: true
5011 engines:
5012 node: '>=4'
5013 resolution:
5014 integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
5015 /mimic-response/2.1.0:
5016 dev: true
5017 engines:
5018 node: '>=8'
5019 resolution:
5020 integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==
5021 /min-indent/1.0.1:
5022 engines:
5023 node: '>=4'
5024 resolution:
5025 integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
5026 /mini-svg-data-uri/1.2.3:
5027 dev: false
5028 resolution:
5029 integrity: sha512-zd6KCAyXgmq6FV1mR10oKXYtvmA9vRoB6xPSTUJTbFApCtkefDnYueVR1gkof3KcdLZo1Y8mjF2DFmQMIxsHNQ==
5030 /minimatch/3.0.4:
5031 dependencies:
5032 brace-expansion: 1.1.11
5033 resolution:
5034 integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
5035 /minimist-options/4.1.0:
5036 dependencies:
5037 arrify: 1.0.1
5038 is-plain-obj: 1.1.0
5039 kind-of: 6.0.3
5040 engines:
5041 node: '>= 6'
5042 resolution:
5043 integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==
5044 /minimist/1.2.5:
5045 resolution:
5046 integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
5047 /mkdirp/0.5.5:
5048 dependencies:
5049 minimist: 1.2.5
5050 dev: true
5051 hasBin: true
5052 resolution:
5053 integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
5054 /ms/2.0.0:
5055 dev: true
5056 resolution:
5057 integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
5058 /ms/2.1.2:
5059 dev: true
5060 resolution:
5061 integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
5062 /mute-stream/0.0.8:
5063 dev: true
5064 resolution:
5065 integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
5066 /mz/2.7.0:
5067 dependencies:
5068 any-promise: 1.3.0
5069 object-assign: 4.1.1
5070 thenify-all: 1.6.0
5071 dev: false
5072 resolution:
5073 integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
5074 /natural-compare/1.4.0:
5075 dev: true
5076 resolution:
5077 integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
5078 /next-tick/1.0.0:
5079 dev: true
5080 resolution:
5081 integrity: sha1-yobR/ogoFpsBICCOPchCS524NCw=
5082 /nice-try/1.0.5:
5083 dev: true
5084 resolution:
5085 integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
5086 /nise/4.0.4:
5087 dependencies:
5088 '@sinonjs/commons': 1.8.1
5089 '@sinonjs/fake-timers': 6.0.1
5090 '@sinonjs/text-encoding': 0.7.1
5091 just-extend: 4.1.0
5092 path-to-regexp: 1.8.0
5093 dev: true
5094 resolution:
5095 integrity: sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==
5096 /node-modules-regexp/1.0.0:
5097 dev: false
5098 engines:
5099 node: '>=0.10.0'
5100 resolution:
5101 integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
5102 /node-noop/1.0.0:
5103 dev: true
5104 resolution:
5105 integrity: sha1-R6Pn2Az/qmRYNkvSLthcqzMHvnk=
5106 /node-preload/0.2.1:
5107 dependencies:
5108 process-on-spawn: 1.0.0
5109 dev: true
5110 engines:
5111 node: '>=8'
5112 resolution:
5113 integrity: sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==
5114 /node-releases/1.1.60:
5115 dev: true
5116 resolution:
5117 integrity: sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==
5118 /normalize-package-data/2.5.0:
5119 dependencies:
5120 hosted-git-info: 2.8.8
5121 resolve: 1.17.0
5122 semver: 5.7.1
5123 validate-npm-package-license: 3.0.4
5124 resolution:
5125 integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
5126 /normalize-path/3.0.0:
5127 dev: true
5128 engines:
5129 node: '>=0.10.0'
5130 resolution:
5131 integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
5132 /normalize-url/3.3.0:
5133 dev: true
5134 engines:
5135 node: '>=6'
5136 resolution:
5137 integrity: sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
5138 /normalize-url/4.5.0:
5139 dev: true
5140 engines:
5141 node: '>=8'
5142 resolution:
5143 integrity: sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
5144 /npm-run-path/4.0.1:
5145 dependencies:
5146 path-key: 3.1.1
5147 dev: true
5148 engines:
5149 node: '>=8'
5150 resolution:
5151 integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
5152 /nth-check/1.0.2:
5153 dependencies:
5154 boolbase: 1.0.0
5155 dev: true
5156 resolution:
5157 integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
5158 /nyc/15.1.0:
5159 dependencies:
5160 '@istanbuljs/load-nyc-config': 1.1.0
5161 '@istanbuljs/schema': 0.1.2
5162 caching-transform: 4.0.0
5163 convert-source-map: 1.7.0
5164 decamelize: 1.2.0
5165 find-cache-dir: 3.3.1
5166 find-up: 4.1.0
5167 foreground-child: 2.0.0
5168 get-package-type: 0.1.0
5169 glob: 7.1.6
5170 istanbul-lib-coverage: 3.0.0
5171 istanbul-lib-hook: 3.0.0
5172 istanbul-lib-instrument: 4.0.3
5173 istanbul-lib-processinfo: 2.0.2
5174 istanbul-lib-report: 3.0.0
5175 istanbul-lib-source-maps: 4.0.0
5176 istanbul-reports: 3.0.2
5177 make-dir: 3.1.0
5178 node-preload: 0.2.1
5179 p-map: 3.0.0
5180 process-on-spawn: 1.0.0
5181 resolve-from: 5.0.0
5182 rimraf: 3.0.2
5183 signal-exit: 3.0.3
5184 spawn-wrap: 2.0.0
5185 test-exclude: 6.0.0
5186 yargs: 15.4.1
5187 dev: true
5188 engines:
5189 node: '>=8.9'
5190 hasBin: true
5191 resolution:
5192 integrity: sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==
5193 /object-assign/4.1.1:
5194 dev: false
5195 engines:
5196 node: '>=0.10.0'
5197 resolution:
5198 integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
5199 /object-inspect/1.8.0:
5200 dev: true
5201 resolution:
5202 integrity: sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==
5203 /object-is/1.1.2:
5204 dependencies:
5205 define-properties: 1.1.3
5206 es-abstract: 1.17.6
5207 dev: true
5208 engines:
5209 node: '>= 0.4'
5210 resolution:
5211 integrity: sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==
5212 /object-keys/1.1.1:
5213 dev: true
5214 engines:
5215 node: '>= 0.4'
5216 resolution:
5217 integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
5218 /object.assign/4.1.0:
5219 dependencies:
5220 define-properties: 1.1.3
5221 function-bind: 1.1.1
5222 has-symbols: 1.0.1
5223 object-keys: 1.1.1
5224 dev: true
5225 engines:
5226 node: '>= 0.4'
5227 resolution:
5228 integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
5229 /object.getownpropertydescriptors/2.1.0:
5230 dependencies:
5231 define-properties: 1.1.3
5232 es-abstract: 1.17.6
5233 dev: true
5234 engines:
5235 node: '>= 0.8'
5236 resolution:
5237 integrity: sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==
5238 /object.values/1.1.1:
5239 dependencies:
5240 define-properties: 1.1.3
5241 es-abstract: 1.17.6
5242 function-bind: 1.1.1
5243 has: 1.0.3
5244 dev: true
5245 engines:
5246 node: '>= 0.4'
5247 resolution:
5248 integrity: sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==
5249 /once/1.4.0:
5250 dependencies:
5251 wrappy: 1.0.2
5252 resolution:
5253 integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
5254 /onetime/5.1.0:
5255 dependencies:
5256 mimic-fn: 2.1.0
5257 dev: true
5258 engines:
5259 node: '>=6'
5260 resolution:
5261 integrity: sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
5262 /opencollective-postinstall/2.0.3:
5263 dev: true
5264 hasBin: true
5265 resolution:
5266 integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
5267 /optionator/0.8.3:
5268 dependencies:
5269 deep-is: 0.1.3
5270 fast-levenshtein: 2.0.6
5271 levn: 0.3.0
5272 prelude-ls: 1.1.2
5273 type-check: 0.3.2
5274 word-wrap: 1.2.3
5275 dev: true
5276 engines:
5277 node: '>= 0.8.0'
5278 resolution:
5279 integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
5280 /ora/4.0.5:
5281 dependencies:
5282 chalk: 3.0.0
5283 cli-cursor: 3.1.0
5284 cli-spinners: 2.4.0
5285 is-interactive: 1.0.0
5286 log-symbols: 3.0.0
5287 mute-stream: 0.0.8
5288 strip-ansi: 6.0.0
5289 wcwidth: 1.0.1
5290 dev: true
5291 engines:
5292 node: '>=8'
5293 resolution:
5294 integrity: sha512-jCDgm9DqvRcNIAEv2wZPrh7E5PcQiDUnbnWbAfu4NGAE2ZNqPFbDixmWldy1YG2QfLeQhuiu6/h5VRrk6cG50w==
5295 /os-tmpdir/1.0.2:
5296 dev: true
5297 engines:
5298 node: '>=0.10.0'
5299 resolution:
5300 integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
5301 /p-cancelable/1.1.0:
5302 dev: true
5303 engines:
5304 node: '>=6'
5305 resolution:
5306 integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
5307 /p-cancelable/2.0.0:
5308 dev: true
5309 engines:
5310 node: '>=8'
5311 resolution:
5312 integrity: sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==
5313 /p-defer/1.0.0:
5314 dev: true
5315 engines:
5316 node: '>=4'
5317 resolution:
5318 integrity: sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
5319 /p-event/4.2.0:
5320 dependencies:
5321 p-timeout: 3.2.0
5322 dev: true
5323 engines:
5324 node: '>=8'
5325 resolution:
5326 integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==
5327 /p-finally/1.0.0:
5328 dev: true
5329 engines:
5330 node: '>=4'
5331 resolution:
5332 integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
5333 /p-limit/1.3.0:
5334 dependencies:
5335 p-try: 1.0.0
5336 dev: true
5337 engines:
5338 node: '>=4'
5339 resolution:
5340 integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
5341 /p-limit/2.3.0:
5342 dependencies:
5343 p-try: 2.2.0
5344 engines:
5345 node: '>=6'
5346 resolution:
5347 integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
5348 /p-locate/2.0.0:
5349 dependencies:
5350 p-limit: 1.3.0
5351 dev: true
5352 engines:
5353 node: '>=4'
5354 resolution:
5355 integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
5356 /p-locate/3.0.0:
5357 dependencies:
5358 p-limit: 2.3.0
5359 dev: true
5360 engines:
5361 node: '>=6'
5362 resolution:
5363 integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
5364 /p-locate/4.1.0:
5365 dependencies:
5366 p-limit: 2.3.0
5367 engines:
5368 node: '>=8'
5369 resolution:
5370 integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
5371 /p-map/3.0.0:
5372 dependencies:
5373 aggregate-error: 3.0.1
5374 dev: true
5375 engines:
5376 node: '>=8'
5377 resolution:
5378 integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==
5379 /p-map/4.0.0:
5380 dependencies:
5381 aggregate-error: 3.0.1
5382 dev: true
5383 engines:
5384 node: '>=10'
5385 resolution:
5386 integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
5387 /p-queue/6.6.0:
5388 dependencies:
5389 eventemitter3: 4.0.4
5390 p-timeout: 3.2.0
5391 dev: true
5392 engines:
5393 node: '>=8'
5394 resolution:
5395 integrity: sha512-zPHXPNy9jZsiym0PpJjvnHQysx1fSd/QdaNVwiDRLU2KFChD6h9CkCB6b8i3U8lBwJyA+mHgNZCzcy77glUssQ==
5396 /p-timeout/3.2.0:
5397 dependencies:
5398 p-finally: 1.0.0
5399 dev: true
5400 engines:
5401 node: '>=8'
5402 resolution:
5403 integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
5404 /p-try/1.0.0:
5405 dev: true
5406 engines:
5407 node: '>=4'
5408 resolution:
5409 integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
5410 /p-try/2.2.0:
5411 engines:
5412 node: '>=6'
5413 resolution:
5414 integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
5415 /package-hash/4.0.0:
5416 dependencies:
5417 graceful-fs: 4.2.4
5418 hasha: 5.2.0
5419 lodash.flattendeep: 4.4.0
5420 release-zalgo: 1.0.0
5421 dev: true
5422 engines:
5423 node: '>=8'
5424 resolution:
5425 integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==
5426 /package-json/6.5.0:
5427 dependencies:
5428 got: 9.6.0
5429 registry-auth-token: 4.2.0
5430 registry-url: 5.1.0
5431 semver: 6.3.0
5432 dev: true
5433 engines:
5434 node: '>=8'
5435 resolution:
5436 integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==
5437 /parent-module/1.0.1:
5438 dependencies:
5439 callsites: 3.1.0
5440 dev: true
5441 engines:
5442 node: '>=6'
5443 resolution:
5444 integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
5445 /parse-json/2.2.0:
5446 dependencies:
5447 error-ex: 1.3.2
5448 dev: true
5449 engines:
5450 node: '>=0.10.0'
5451 resolution:
5452 integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=
5453 /parse-json/4.0.0:
5454 dependencies:
5455 error-ex: 1.3.2
5456 json-parse-better-errors: 1.0.2
5457 dev: true
5458 engines:
5459 node: '>=4'
5460 resolution:
5461 integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=
5462 /parse-json/5.0.1:
5463 dependencies:
5464 '@babel/code-frame': 7.10.4
5465 error-ex: 1.3.2
5466 json-parse-better-errors: 1.0.2
5467 lines-and-columns: 1.1.6
5468 engines:
5469 node: '>=8'
5470 resolution:
5471 integrity: sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==
5472 /parse-ms/2.1.0:
5473 dev: true
5474 engines:
5475 node: '>=6'
5476 resolution:
5477 integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==
5478 /path-exists/3.0.0:
5479 dev: true
5480 engines:
5481 node: '>=4'
5482 resolution:
5483 integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
5484 /path-exists/4.0.0:
5485 engines:
5486 node: '>=8'
5487 resolution:
5488 integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
5489 /path-is-absolute/1.0.1:
5490 engines:
5491 node: '>=0.10.0'
5492 resolution:
5493 integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
5494 /path-key/2.0.1:
5495 dev: true
5496 engines:
5497 node: '>=4'
5498 resolution:
5499 integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
5500 /path-key/3.1.1:
5501 dev: true
5502 engines:
5503 node: '>=8'
5504 resolution:
5505 integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
5506 /path-parse/1.0.6:
5507 resolution:
5508 integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
5509 /path-to-regexp/1.8.0:
5510 dependencies:
5511 isarray: 0.0.1
5512 dev: true
5513 resolution:
5514 integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==
5515 /path-type/2.0.0:
5516 dependencies:
5517 pify: 2.3.0
5518 dev: true
5519 engines:
5520 node: '>=4'
5521 resolution:
5522 integrity: sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
5523 /path-type/4.0.0:
5524 engines:
5525 node: '>=8'
5526 resolution:
5527 integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
5528 /picomatch/2.2.2:
5529 engines:
5530 node: '>=8.6'
5531 resolution:
5532 integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
5533 /pify/2.3.0:
5534 dev: true
5535 engines:
5536 node: '>=0.10.0'
5537 resolution:
5538 integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
5539 /pify/4.0.1:
5540 engines:
5541 node: '>=6'
5542 resolution:
5543 integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
5544 /pify/5.0.0:
5545 dev: true
5546 engines:
5547 node: '>=10'
5548 resolution:
5549 integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
5550 /pirates/4.0.1:
5551 dependencies:
5552 node-modules-regexp: 1.0.0
5553 dev: false
5554 engines:
5555 node: '>= 6'
5556 resolution:
5557 integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==
5558 /pkg-conf/3.1.0:
5559 dependencies:
5560 find-up: 3.0.0
5561 load-json-file: 5.3.0
5562 dev: true
5563 engines:
5564 node: '>=6'
5565 resolution:
5566 integrity: sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==
5567 /pkg-dir/2.0.0:
5568 dependencies:
5569 find-up: 2.1.0
5570 dev: true
5571 engines:
5572 node: '>=4'
5573 resolution:
5574 integrity: sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
5575 /pkg-dir/4.2.0:
5576 dependencies:
5577 find-up: 4.1.0
5578 dev: true
5579 engines:
5580 node: '>=8'
5581 resolution:
5582 integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
5583 /please-upgrade-node/3.2.0:
5584 dependencies:
5585 semver-compare: 1.0.0
5586 dev: true
5587 resolution:
5588 integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
5589 /plur/4.0.0:
5590 dependencies:
5591 irregular-plurals: 3.2.0
5592 dev: true
5593 engines:
5594 node: '>=10'
5595 resolution:
5596 integrity: sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==
5597 /pnpm/5.4.6:
5598 dev: true
5599 engines:
5600 node: '>=10.13'
5601 hasBin: true
5602 resolution:
5603 integrity: sha512-UZXIBwIlYkT+YbW8QjobVoppYT/hVphu1eu+ed60mGf+Ulz+suAR21zunWUGoETbibvetIkj8HLebsmz5tow8A==
5604 /postcss-calc/7.0.2:
5605 dependencies:
5606 postcss: 7.0.32
5607 postcss-selector-parser: 6.0.2
5608 postcss-value-parser: 4.1.0
5609 dev: true
5610 resolution:
5611 integrity: sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ==
5612 /postcss-colormin/4.0.3:
5613 dependencies:
5614 browserslist: 4.13.0
5615 color: 3.1.2
5616 has: 1.0.3
5617 postcss: 7.0.32
5618 postcss-value-parser: 3.3.1
5619 dev: true
5620 engines:
5621 node: '>=6.9.0'
5622 resolution:
5623 integrity: sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==
5624 /postcss-convert-values/4.0.1:
5625 dependencies:
5626 postcss: 7.0.32
5627 postcss-value-parser: 3.3.1
5628 dev: true
5629 engines:
5630 node: '>=6.9.0'
5631 resolution:
5632 integrity: sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==
5633 /postcss-discard-comments/4.0.2:
5634 dependencies:
5635 postcss: 7.0.32
5636 dev: true
5637 engines:
5638 node: '>=6.9.0'
5639 resolution:
5640 integrity: sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==
5641 /postcss-discard-duplicates/4.0.2:
5642 dependencies:
5643 postcss: 7.0.32
5644 dev: true
5645 engines:
5646 node: '>=6.9.0'
5647 resolution:
5648 integrity: sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==
5649 /postcss-discard-empty/4.0.1:
5650 dependencies:
5651 postcss: 7.0.32
5652 dev: true
5653 engines:
5654 node: '>=6.9.0'
5655 resolution:
5656 integrity: sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==
5657 /postcss-discard-overridden/4.0.1:
5658 dependencies:
5659 postcss: 7.0.32
5660 dev: true
5661 engines:
5662 node: '>=6.9.0'
5663 resolution:
5664 integrity: sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==
5665 /postcss-load-config/2.1.0:
5666 dependencies:
5667 cosmiconfig: 5.2.1
5668 import-cwd: 2.1.0
5669 dev: true
5670 engines:
5671 node: '>= 4'
5672 resolution:
5673 integrity: sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==
5674 /postcss-merge-longhand/4.0.11:
5675 dependencies:
5676 css-color-names: 0.0.4
5677 postcss: 7.0.32
5678 postcss-value-parser: 3.3.1
5679 stylehacks: 4.0.3
5680 dev: true
5681 engines:
5682 node: '>=6.9.0'
5683 resolution:
5684 integrity: sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==
5685 /postcss-merge-rules/4.0.3:
5686 dependencies:
5687 browserslist: 4.13.0
5688 caniuse-api: 3.0.0
5689 cssnano-util-same-parent: 4.0.1
5690 postcss: 7.0.32
5691 postcss-selector-parser: 3.1.2
5692 vendors: 1.0.4
5693 dev: true
5694 engines:
5695 node: '>=6.9.0'
5696 resolution:
5697 integrity: sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==
5698 /postcss-minify-font-values/4.0.2:
5699 dependencies:
5700 postcss: 7.0.32
5701 postcss-value-parser: 3.3.1
5702 dev: true
5703 engines:
5704 node: '>=6.9.0'
5705 resolution:
5706 integrity: sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==
5707 /postcss-minify-gradients/4.0.2:
5708 dependencies:
5709 cssnano-util-get-arguments: 4.0.0
5710 is-color-stop: 1.1.0
5711 postcss: 7.0.32
5712 postcss-value-parser: 3.3.1
5713 dev: true
5714 engines:
5715 node: '>=6.9.0'
5716 resolution:
5717 integrity: sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==
5718 /postcss-minify-params/4.0.2:
5719 dependencies:
5720 alphanum-sort: 1.0.2
5721 browserslist: 4.13.0
5722 cssnano-util-get-arguments: 4.0.0
5723 postcss: 7.0.32
5724 postcss-value-parser: 3.3.1
5725 uniqs: 2.0.0
5726 dev: true
5727 engines:
5728 node: '>=6.9.0'
5729 resolution:
5730 integrity: sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==
5731 /postcss-minify-selectors/4.0.2:
5732 dependencies:
5733 alphanum-sort: 1.0.2
5734 has: 1.0.3
5735 postcss: 7.0.32
5736 postcss-selector-parser: 3.1.2
5737 dev: true
5738 engines:
5739 node: '>=6.9.0'
5740 resolution:
5741 integrity: sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==
5742 /postcss-modules-extract-imports/1.1.0:
5743 dependencies:
5744 postcss: 6.0.1
5745 dev: true
5746 resolution:
5747 integrity: sha1-thTJcgvmgW6u41+zpfqh26agXds=
5748 /postcss-modules-local-by-default/1.2.0:
5749 dependencies:
5750 css-selector-tokenizer: 0.7.3
5751 postcss: 6.0.1
5752 dev: true
5753 resolution:
5754 integrity: sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=
5755 /postcss-modules-scope/1.1.0:
5756 dependencies:
5757 css-selector-tokenizer: 0.7.3
5758 postcss: 6.0.1
5759 dev: true
5760 resolution:
5761 integrity: sha1-1upkmUx5+XtipytCb75gVqGUu5A=
5762 /postcss-modules-values/1.3.0:
5763 dependencies:
5764 icss-replace-symbols: 1.1.0
5765 postcss: 6.0.1
5766 dev: true
5767 resolution:
5768 integrity: sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=
5769 /postcss-modules/2.0.0:
5770 dependencies:
5771 css-modules-loader-core: 1.1.0
5772 generic-names: 2.0.1
5773 lodash.camelcase: 4.3.0
5774 postcss: 7.0.32
5775 string-hash: 1.1.3
5776 dev: true
5777 resolution:
5778 integrity: sha512-eqp+Bva+U2cwQO7dECJ8/V+X+uH1HduNeITB0CPPFAu6d/8LKQ32/j+p9rQ2YL1QytVcrNU0X+fBqgGmQIA1Rw==
5779 /postcss-normalize-charset/4.0.1:
5780 dependencies:
5781 postcss: 7.0.32
5782 dev: true
5783 engines:
5784 node: '>=6.9.0'
5785 resolution:
5786 integrity: sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==
5787 /postcss-normalize-display-values/4.0.2:
5788 dependencies:
5789 cssnano-util-get-match: 4.0.0
5790 postcss: 7.0.32
5791 postcss-value-parser: 3.3.1
5792 dev: true
5793 engines:
5794 node: '>=6.9.0'
5795 resolution:
5796 integrity: sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==
5797 /postcss-normalize-positions/4.0.2:
5798 dependencies:
5799 cssnano-util-get-arguments: 4.0.0
5800 has: 1.0.3
5801 postcss: 7.0.32
5802 postcss-value-parser: 3.3.1
5803 dev: true
5804 engines:
5805 node: '>=6.9.0'
5806 resolution:
5807 integrity: sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==
5808 /postcss-normalize-repeat-style/4.0.2:
5809 dependencies:
5810 cssnano-util-get-arguments: 4.0.0
5811 cssnano-util-get-match: 4.0.0
5812 postcss: 7.0.32
5813 postcss-value-parser: 3.3.1
5814 dev: true
5815 engines:
5816 node: '>=6.9.0'
5817 resolution:
5818 integrity: sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==
5819 /postcss-normalize-string/4.0.2:
5820 dependencies:
5821 has: 1.0.3
5822 postcss: 7.0.32
5823 postcss-value-parser: 3.3.1
5824 dev: true
5825 engines:
5826 node: '>=6.9.0'
5827 resolution:
5828 integrity: sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==
5829 /postcss-normalize-timing-functions/4.0.2:
5830 dependencies:
5831 cssnano-util-get-match: 4.0.0
5832 postcss: 7.0.32
5833 postcss-value-parser: 3.3.1
5834 dev: true
5835 engines:
5836 node: '>=6.9.0'
5837 resolution:
5838 integrity: sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==
5839 /postcss-normalize-unicode/4.0.1:
5840 dependencies:
5841 browserslist: 4.13.0
5842 postcss: 7.0.32
5843 postcss-value-parser: 3.3.1
5844 dev: true
5845 engines:
5846 node: '>=6.9.0'
5847 resolution:
5848 integrity: sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==
5849 /postcss-normalize-url/4.0.1:
5850 dependencies:
5851 is-absolute-url: 2.1.0
5852 normalize-url: 3.3.0
5853 postcss: 7.0.32
5854 postcss-value-parser: 3.3.1
5855 dev: true
5856 engines:
5857 node: '>=6.9.0'
5858 resolution:
5859 integrity: sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==
5860 /postcss-normalize-whitespace/4.0.2:
5861 dependencies:
5862 postcss: 7.0.32
5863 postcss-value-parser: 3.3.1
5864 dev: true
5865 engines:
5866 node: '>=6.9.0'
5867 resolution:
5868 integrity: sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==
5869 /postcss-ordered-values/4.1.2:
5870 dependencies:
5871 cssnano-util-get-arguments: 4.0.0
5872 postcss: 7.0.32
5873 postcss-value-parser: 3.3.1
5874 dev: true
5875 engines:
5876 node: '>=6.9.0'
5877 resolution:
5878 integrity: sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==
5879 /postcss-reduce-initial/4.0.3:
5880 dependencies:
5881 browserslist: 4.13.0
5882 caniuse-api: 3.0.0
5883 has: 1.0.3
5884 postcss: 7.0.32
5885 dev: true
5886 engines:
5887 node: '>=6.9.0'
5888 resolution:
5889 integrity: sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==
5890 /postcss-reduce-transforms/4.0.2:
5891 dependencies:
5892 cssnano-util-get-match: 4.0.0
5893 has: 1.0.3
5894 postcss: 7.0.32
5895 postcss-value-parser: 3.3.1
5896 dev: true
5897 engines:
5898 node: '>=6.9.0'
5899 resolution:
5900 integrity: sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==
5901 /postcss-selector-parser/3.1.2:
5902 dependencies:
5903 dot-prop: 5.2.0
5904 indexes-of: 1.0.1
5905 uniq: 1.0.1
5906 dev: true
5907 engines:
5908 node: '>=8'
5909 resolution:
5910 integrity: sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==
5911 /postcss-selector-parser/6.0.2:
5912 dependencies:
5913 cssesc: 3.0.0
5914 indexes-of: 1.0.1
5915 uniq: 1.0.1
5916 dev: true
5917 engines:
5918 node: '>=4'
5919 resolution:
5920 integrity: sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==
5921 /postcss-svgo/4.0.2:
5922 dependencies:
5923 is-svg: 3.0.0
5924 postcss: 7.0.32
5925 postcss-value-parser: 3.3.1
5926 svgo: 1.3.2
5927 dev: true
5928 engines:
5929 node: '>=6.9.0'
5930 resolution:
5931 integrity: sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==
5932 /postcss-unique-selectors/4.0.1:
5933 dependencies:
5934 alphanum-sort: 1.0.2
5935 postcss: 7.0.32
5936 uniqs: 2.0.0
5937 dev: true
5938 engines:
5939 node: '>=6.9.0'
5940 resolution:
5941 integrity: sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==
5942 /postcss-value-parser/3.3.1:
5943 dev: true
5944 resolution:
5945 integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
5946 /postcss-value-parser/4.1.0:
5947 dev: true
5948 resolution:
5949 integrity: sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
5950 /postcss/6.0.1:
5951 dependencies:
5952 chalk: 1.1.3
5953 source-map: 0.5.7
5954 supports-color: 3.2.3
5955 dev: true
5956 engines:
5957 node: '>=4.0.0'
5958 resolution:
5959 integrity: sha1-AA29H47vIXqjaLmiEsX8QLKo8/I=
5960 /postcss/7.0.32:
5961 dependencies:
5962 chalk: 2.4.2
5963 source-map: 0.6.1
5964 supports-color: 6.1.0
5965 dev: true
5966 engines:
5967 node: '>=6.0.0'
5968 resolution:
5969 integrity: sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==
5970 /prelude-ls/1.1.2:
5971 dev: true
5972 engines:
5973 node: '>= 0.8.0'
5974 resolution:
5975 integrity: sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
5976 /prepend-http/2.0.0:
5977 dev: true
5978 engines:
5979 node: '>=4'
5980 resolution:
5981 integrity: sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
5982 /prettier-linter-helpers/1.0.0:
5983 dependencies:
5984 fast-diff: 1.2.0
5985 dev: true
5986 engines:
5987 node: '>=6.0.0'
5988 resolution:
5989 integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
5990 /prettier-plugin-package/1.0.0_prettier@2.0.5:
5991 dependencies:
5992 prettier: 2.0.5
5993 dev: true
5994 engines:
5995 node: '>= 8.0.0'
5996 peerDependencies:
5997 prettier: ^2.0.0
5998 resolution:
5999 integrity: sha512-flbKuLB7ftrW2zQYJjb0mF6zY7R0jDrYatpr0BBNj04Eb+g1RLbquOQSJE1LffDZfzU03fwJQ74grqQjQjYa3Q==
6000 /prettier/1.19.1:
6001 dev: true
6002 engines:
6003 node: '>=4'
6004 hasBin: true
6005 resolution:
6006 integrity: sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
6007 /prettier/2.0.5:
6008 dev: true
6009 engines:
6010 node: '>=10.13.0'
6011 hasBin: true
6012 resolution:
6013 integrity: sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
6014 /pretty-ms/7.0.0:
6015 dependencies:
6016 parse-ms: 2.1.0
6017 dev: true
6018 engines:
6019 node: '>=10'
6020 resolution:
6021 integrity: sha512-J3aPWiC5e9ZeZFuSeBraGxSkGMOvulSWsxDByOcbD1Pr75YL3LSNIKIb52WXbCLE1sS5s4inBBbryjF4Y05Ceg==
6022 /process-nextick-args/2.0.1:
6023 dev: false
6024 resolution:
6025 integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
6026 /process-on-spawn/1.0.0:
6027 dependencies:
6028 fromentries: 1.2.1
6029 dev: true
6030 engines:
6031 node: '>=8'
6032 resolution:
6033 integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==
6034 /progress/2.0.3:
6035 dev: true
6036 engines:
6037 node: '>=0.4.0'
6038 resolution:
6039 integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
6040 /promise.series/0.2.0:
6041 dev: true
6042 engines:
6043 node: '>=0.12'
6044 resolution:
6045 integrity: sha1-LMfr6Vn8OmYZwEq029yeRS2GS70=
6046 /pump/3.0.0:
6047 dependencies:
6048 end-of-stream: 1.4.4
6049 once: 1.4.0
6050 dev: true
6051 resolution:
6052 integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
6053 /punycode/2.1.1:
6054 dev: true
6055 engines:
6056 node: '>=6'
6057 resolution:
6058 integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
6059 /pupa/2.0.1:
6060 dependencies:
6061 escape-goat: 2.1.1
6062 dev: true
6063 engines:
6064 node: '>=8'
6065 resolution:
6066 integrity: sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==
6067 /q/1.5.1:
6068 dev: true
6069 engines:
6070 node: '>=0.6.0'
6071 teleport: '>=0.2.0'
6072 resolution:
6073 integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
6074 /quick-lru/4.0.1:
6075 engines:
6076 node: '>=8'
6077 resolution:
6078 integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==
6079 /rc/1.2.8:
6080 dependencies:
6081 deep-extend: 0.6.0
6082 ini: 1.3.5
6083 minimist: 1.2.5
6084 strip-json-comments: 2.0.1
6085 dev: true
6086 hasBin: true
6087 resolution:
6088 integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
6089 /read-pkg-up/2.0.0:
6090 dependencies:
6091 find-up: 2.1.0
6092 read-pkg: 2.0.0
6093 dev: true
6094 engines:
6095 node: '>=4'
6096 resolution:
6097 integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
6098 /read-pkg-up/7.0.1:
6099 dependencies:
6100 find-up: 4.1.0
6101 read-pkg: 5.2.0
6102 type-fest: 0.8.1
6103 engines:
6104 node: '>=8'
6105 resolution:
6106 integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==
6107 /read-pkg/2.0.0:
6108 dependencies:
6109 load-json-file: 2.0.0
6110 normalize-package-data: 2.5.0
6111 path-type: 2.0.0
6112 dev: true
6113 engines:
6114 node: '>=4'
6115 resolution:
6116 integrity: sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
6117 /read-pkg/5.2.0:
6118 dependencies:
6119 '@types/normalize-package-data': 2.4.0
6120 normalize-package-data: 2.5.0
6121 parse-json: 5.0.1
6122 type-fest: 0.6.0
6123 engines:
6124 node: '>=8'
6125 resolution:
6126 integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==
6127 /readable-stream/2.3.7:
6128 dependencies:
6129 core-util-is: 1.0.2
6130 inherits: 2.0.4
6131 isarray: 1.0.0
6132 process-nextick-args: 2.0.1
6133 safe-buffer: 5.1.2
6134 string_decoder: 1.1.1
6135 util-deprecate: 1.0.2
6136 dev: false
6137 resolution:
6138 integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
6139 /readable-stream/3.6.0:
6140 dependencies:
6141 inherits: 2.0.4
6142 string_decoder: 1.3.0
6143 util-deprecate: 1.0.2
6144 dev: false
6145 engines:
6146 node: '>= 6'
6147 resolution:
6148 integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
6149 /readdirp/3.4.0:
6150 dependencies:
6151 picomatch: 2.2.2
6152 dev: true
6153 engines:
6154 node: '>=8.10.0'
6155 resolution:
6156 integrity: sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==
6157 /rechoir/0.6.2:
6158 dependencies:
6159 resolve: 1.17.0
6160 dev: true
6161 engines:
6162 node: '>= 0.10'
6163 resolution:
6164 integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=
6165 /redent/3.0.0:
6166 dependencies:
6167 indent-string: 4.0.0
6168 strip-indent: 3.0.0
6169 engines:
6170 node: '>=8'
6171 resolution:
6172 integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==
6173 /regenerate-unicode-properties/8.2.0:
6174 dependencies:
6175 regenerate: 1.4.1
6176 engines:
6177 node: '>=4'
6178 resolution:
6179 integrity: sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==
6180 /regenerate/1.4.1:
6181 resolution:
6182 integrity: sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==
6183 /regenerator-runtime/0.13.7:
6184 dev: true
6185 resolution:
6186 integrity: sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
6187 /regenerator-transform/0.14.5:
6188 dependencies:
6189 '@babel/runtime': 7.10.5
6190 dev: true
6191 resolution:
6192 integrity: sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==
6193 /regexp.prototype.flags/1.3.0:
6194 dependencies:
6195 define-properties: 1.1.3
6196 es-abstract: 1.17.6
6197 dev: true
6198 engines:
6199 node: '>= 0.4'
6200 resolution:
6201 integrity: sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
6202 /regexpp/2.0.1:
6203 dev: true
6204 engines:
6205 node: '>=6.5.0'
6206 resolution:
6207 integrity: sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
6208 /regexpp/3.1.0:
6209 dev: true
6210 engines:
6211 node: '>=8'
6212 resolution:
6213 integrity: sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
6214 /regexpu-core/4.5.4:
6215 dependencies:
6216 regenerate: 1.4.1
6217 regenerate-unicode-properties: 8.2.0
6218 regjsgen: 0.5.2
6219 regjsparser: 0.6.4
6220 unicode-match-property-ecmascript: 1.0.4
6221 unicode-match-property-value-ecmascript: 1.2.0
6222 engines:
6223 node: '>=4'
6224 resolution:
6225 integrity: sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==
6226 /regexpu-core/4.7.0:
6227 dependencies:
6228 regenerate: 1.4.1
6229 regenerate-unicode-properties: 8.2.0
6230 regjsgen: 0.5.2
6231 regjsparser: 0.6.4
6232 unicode-match-property-ecmascript: 1.0.4
6233 unicode-match-property-value-ecmascript: 1.2.0
6234 dev: true
6235 engines:
6236 node: '>=4'
6237 resolution:
6238 integrity: sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==
6239 /registry-auth-token/4.2.0:
6240 dependencies:
6241 rc: 1.2.8
6242 dev: true
6243 engines:
6244 node: '>=6.0.0'
6245 resolution:
6246 integrity: sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==
6247 /registry-url/5.1.0:
6248 dependencies:
6249 rc: 1.2.8
6250 dev: true
6251 engines:
6252 node: '>=8'
6253 resolution:
6254 integrity: sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==
6255 /regjsgen/0.5.2:
6256 resolution:
6257 integrity: sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==
6258 /regjsparser/0.6.4:
6259 dependencies:
6260 jsesc: 0.5.0
6261 hasBin: true
6262 resolution:
6263 integrity: sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==
6264 /release-zalgo/1.0.0:
6265 dependencies:
6266 es6-error: 4.1.1
6267 dev: true
6268 engines:
6269 node: '>=4'
6270 resolution:
6271 integrity: sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=
6272 /require-directory/2.1.1:
6273 dev: true
6274 engines:
6275 node: '>=0.10.0'
6276 resolution:
6277 integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
6278 /require-main-filename/2.0.0:
6279 dev: true
6280 resolution:
6281 integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
6282 /require-relative/0.8.7:
6283 dev: true
6284 resolution:
6285 integrity: sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=
6286 /resolve-cwd/3.0.0:
6287 dependencies:
6288 resolve-from: 5.0.0
6289 dev: true
6290 engines:
6291 node: '>=8'
6292 resolution:
6293 integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==
6294 /resolve-from/3.0.0:
6295 dev: true
6296 engines:
6297 node: '>=4'
6298 resolution:
6299 integrity: sha1-six699nWiBvItuZTM17rywoYh0g=
6300 /resolve-from/4.0.0:
6301 dev: true
6302 engines:
6303 node: '>=4'
6304 resolution:
6305 integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
6306 /resolve-from/5.0.0:
6307 dev: true
6308 engines:
6309 node: '>=8'
6310 resolution:
6311 integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
6312 /resolve/1.17.0:
6313 dependencies:
6314 path-parse: 1.0.6
6315 resolution:
6316 integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
6317 /responselike/1.0.2:
6318 dependencies:
6319 lowercase-keys: 1.0.1
6320 dev: true
6321 resolution:
6322 integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
6323 /responselike/2.0.0:
6324 dependencies:
6325 lowercase-keys: 2.0.0
6326 dev: true
6327 resolution:
6328 integrity: sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==
6329 /restore-cursor/3.1.0:
6330 dependencies:
6331 onetime: 5.1.0
6332 signal-exit: 3.0.3
6333 dev: true
6334 engines:
6335 node: '>=8'
6336 resolution:
6337 integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
6338 /reusify/1.0.4:
6339 engines:
6340 iojs: '>=1.0.0'
6341 node: '>=0.10.0'
6342 resolution:
6343 integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
6344 /rgb-regex/1.0.1:
6345 dev: true
6346 resolution:
6347 integrity: sha1-wODWiC3w4jviVKR16O3UGRX+rrE=
6348 /rgba-regex/1.0.0:
6349 dev: true
6350 resolution:
6351 integrity: sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=
6352 /rimraf/2.6.3:
6353 dependencies:
6354 glob: 7.1.6
6355 dev: true
6356 hasBin: true
6357 resolution:
6358 integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
6359 /rimraf/3.0.2:
6360 dependencies:
6361 glob: 7.1.6
6362 dev: true
6363 hasBin: true
6364 resolution:
6365 integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
6366 /rollup-plugin-postcss/3.1.3:
6367 dependencies:
6368 chalk: 4.1.0
6369 concat-with-sourcemaps: 1.1.0
6370 cssnano: 4.1.10
6371 import-cwd: 3.0.0
6372 p-queue: 6.6.0
6373 pify: 5.0.0
6374 postcss: 7.0.32
6375 postcss-load-config: 2.1.0
6376 postcss-modules: 2.0.0
6377 promise.series: 0.2.0
6378 resolve: 1.17.0
6379 rollup-pluginutils: 2.8.2
6380 safe-identifier: 0.4.1
6381 style-inject: 0.3.0
6382 dev: true
6383 engines:
6384 node: '>=10'
6385 resolution:
6386 integrity: sha512-5Zm70/HkuYaQuhFbiGSO3U0bVj0magAPo09sd4sRE7I434Iwe4p7xF43pYfW0BcDvY0ZxzD3Fh2vRJzsm4OEiQ==
6387 /rollup-pluginutils/2.8.2:
6388 dependencies:
6389 estree-walker: 0.6.1
6390 dev: true
6391 resolution:
6392 integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
6393 /rollup/2.23.0:
6394 dev: true
6395 engines:
6396 node: '>=10.0.0'
6397 hasBin: true
6398 optionalDependencies:
6399 fsevents: 2.1.3
6400 resolution:
6401 integrity: sha512-vLNmZFUGVwrnqNAJ/BvuLk1MtWzu4IuoqsH9UWK5AIdO3rt8/CSiJNvPvCIvfzrbNsqKbNzPAG1V2O4eTe2XZg==
6402 /run-async/2.4.1:
6403 dev: true
6404 engines:
6405 node: '>=0.12.0'
6406 resolution:
6407 integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
6408 /run-parallel/1.1.9:
6409 resolution:
6410 integrity: sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
6411 /rw/1.3.3:
6412 dev: false
6413 resolution:
6414 integrity: sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=
6415 /rxjs/6.6.0:
6416 dependencies:
6417 tslib: 1.13.0
6418 dev: true
6419 engines:
6420 npm: '>=2.0.0'
6421 resolution:
6422 integrity: sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==
6423 /safe-buffer/5.1.2:
6424 resolution:
6425 integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
6426 /safe-buffer/5.2.1:
6427 dev: false
6428 resolution:
6429 integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
6430 /safe-identifier/0.4.1:
6431 dev: true
6432 resolution:
6433 integrity: sha512-73tOz5TXsq3apuCc3vC8c9QRhhdNZGiBhHmPPjqpH4TO5oCDqk8UIsDcSs/RG6dYcFAkOOva0pqHS3u7hh7XXA==
6434 /safer-buffer/2.1.2:
6435 resolution:
6436 integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
6437 /sax/1.2.4:
6438 dev: true
6439 resolution:
6440 integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
6441 /semver-compare/1.0.0:
6442 dev: true
6443 resolution:
6444 integrity: sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
6445 /semver-diff/3.1.1:
6446 dependencies:
6447 semver: 6.3.0
6448 dev: true
6449 engines:
6450 node: '>=8'
6451 resolution:
6452 integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==
6453 /semver-regex/2.0.0:
6454 dev: true
6455 engines:
6456 node: '>=6'
6457 resolution:
6458 integrity: sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
6459 /semver/5.7.1:
6460 hasBin: true
6461 resolution:
6462 integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
6463 /semver/6.3.0:
6464 hasBin: true
6465 resolution:
6466 integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
6467 /semver/7.0.0:
6468 dev: true
6469 hasBin: true
6470 resolution:
6471 integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
6472 /semver/7.3.2:
6473 engines:
6474 node: '>=10'
6475 hasBin: true
6476 resolution:
6477 integrity: sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
6478 /serialize-error/2.1.0:
6479 dev: true
6480 engines:
6481 node: '>=0.10.0'
6482 resolution:
6483 integrity: sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=
6484 /set-blocking/2.0.0:
6485 dev: true
6486 resolution:
6487 integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
6488 /shebang-command/1.2.0:
6489 dependencies:
6490 shebang-regex: 1.0.0
6491 dev: true
6492 engines:
6493 node: '>=0.10.0'
6494 resolution:
6495 integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
6496 /shebang-command/2.0.0:
6497 dependencies:
6498 shebang-regex: 3.0.0
6499 dev: true
6500 engines:
6501 node: '>=8'
6502 resolution:
6503 integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
6504 /shebang-regex/1.0.0:
6505 dev: true
6506 engines:
6507 node: '>=0.10.0'
6508 resolution:
6509 integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
6510 /shebang-regex/3.0.0:
6511 dev: true
6512 engines:
6513 node: '>=8'
6514 resolution:
6515 integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
6516 /shelljs/0.8.4:
6517 dependencies:
6518 glob: 7.1.6
6519 interpret: 1.4.0
6520 rechoir: 0.6.2
6521 dev: true
6522 engines:
6523 node: '>=4'
6524 hasBin: true
6525 resolution:
6526 integrity: sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==
6527 /shx/0.3.2:
6528 dependencies:
6529 es6-object-assign: 1.1.0
6530 minimist: 1.2.5
6531 shelljs: 0.8.4
6532 dev: true
6533 engines:
6534 node: '>=4'
6535 hasBin: true
6536 resolution:
6537 integrity: sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==
6538 /signal-exit/3.0.3:
6539 resolution:
6540 integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
6541 /simple-swizzle/0.2.2:
6542 dependencies:
6543 is-arrayish: 0.3.2
6544 dev: true
6545 resolution:
6546 integrity: sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=
6547 /sinon/9.0.2:
6548 dependencies:
6549 '@sinonjs/commons': 1.8.1
6550 '@sinonjs/fake-timers': 6.0.1
6551 '@sinonjs/formatio': 5.0.1
6552 '@sinonjs/samsam': 5.0.3
6553 diff: 4.0.2
6554 nise: 4.0.4
6555 supports-color: 7.1.0
6556 dev: true
6557 resolution:
6558 integrity: sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==
6559 /slash/3.0.0:
6560 engines:
6561 node: '>=8'
6562 resolution:
6563 integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
6564 /slice-ansi/2.1.0:
6565 dependencies:
6566 ansi-styles: 3.2.1
6567 astral-regex: 1.0.0
6568 is-fullwidth-code-point: 2.0.0
6569 dev: true
6570 engines:
6571 node: '>=6'
6572 resolution:
6573 integrity: sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
6574 /slice-ansi/3.0.0:
6575 dependencies:
6576 ansi-styles: 4.2.1
6577 astral-regex: 2.0.0
6578 is-fullwidth-code-point: 3.0.0
6579 dev: true
6580 engines:
6581 node: '>=8'
6582 resolution:
6583 integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==
6584 /slice-ansi/4.0.0:
6585 dependencies:
6586 ansi-styles: 4.2.1
6587 astral-regex: 2.0.0
6588 is-fullwidth-code-point: 3.0.0
6589 dev: true
6590 engines:
6591 node: '>=10'
6592 resolution:
6593 integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
6594 /sort-keys/2.0.0:
6595 dependencies:
6596 is-plain-obj: 1.1.0
6597 dev: false
6598 engines:
6599 node: '>=4'
6600 resolution:
6601 integrity: sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
6602 /source-map-support/0.5.19:
6603 dependencies:
6604 buffer-from: 1.1.1
6605 source-map: 0.6.1
6606 dev: true
6607 resolution:
6608 integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
6609 /source-map/0.5.7:
6610 dev: true
6611 engines:
6612 node: '>=0.10.0'
6613 resolution:
6614 integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
6615 /source-map/0.6.1:
6616 dev: true
6617 engines:
6618 node: '>=0.10.0'
6619 resolution:
6620 integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
6621 /source-map/0.7.3:
6622 dev: true
6623 engines:
6624 node: '>= 8'
6625 resolution:
6626 integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
6627 /sourcemap-codec/1.4.8:
6628 resolution:
6629 integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
6630 /spawn-wrap/2.0.0:
6631 dependencies:
6632 foreground-child: 2.0.0
6633 is-windows: 1.0.2
6634 make-dir: 3.1.0
6635 rimraf: 3.0.2
6636 signal-exit: 3.0.3
6637 which: 2.0.2
6638 dev: true
6639 engines:
6640 node: '>=8'
6641 resolution:
6642 integrity: sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==
6643 /spdx-correct/3.1.1:
6644 dependencies:
6645 spdx-expression-parse: 3.0.1
6646 spdx-license-ids: 3.0.5
6647 resolution:
6648 integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==
6649 /spdx-exceptions/2.3.0:
6650 resolution:
6651 integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==
6652 /spdx-expression-parse/3.0.1:
6653 dependencies:
6654 spdx-exceptions: 2.3.0
6655 spdx-license-ids: 3.0.5
6656 resolution:
6657 integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==
6658 /spdx-license-ids/3.0.5:
6659 resolution:
6660 integrity: sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==
6661 /split2/2.2.0:
6662 dependencies:
6663 through2: 2.0.5
6664 dev: false
6665 resolution:
6666 integrity: sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==
6667 /sprintf-js/1.0.3:
6668 resolution:
6669 integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
6670 /stable/0.1.8:
6671 dev: true
6672 resolution:
6673 integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
6674 /stack-utils/2.0.2:
6675 dependencies:
6676 escape-string-regexp: 2.0.0
6677 dev: true
6678 engines:
6679 node: '>=10'
6680 resolution:
6681 integrity: sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==
6682 /string-argv/0.3.1:
6683 dev: true
6684 engines:
6685 node: '>=0.6.19'
6686 resolution:
6687 integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
6688 /string-capitalize/1.0.1:
6689 dev: true
6690 resolution:
6691 integrity: sha1-qGZfdzYbTOBKa95tm7shcSu5dJ4=
6692 /string-hash/1.1.3:
6693 dev: true
6694 resolution:
6695 integrity: sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=
6696 /string-width/3.1.0:
6697 dependencies:
6698 emoji-regex: 7.0.3
6699 is-fullwidth-code-point: 2.0.0
6700 strip-ansi: 5.2.0
6701 dev: true
6702 engines:
6703 node: '>=6'
6704 resolution:
6705 integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
6706 /string-width/4.2.0:
6707 dependencies:
6708 emoji-regex: 8.0.0
6709 is-fullwidth-code-point: 3.0.0
6710 strip-ansi: 6.0.0
6711 dev: true
6712 engines:
6713 node: '>=8'
6714 resolution:
6715 integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
6716 /string.prototype.trimend/1.0.1:
6717 dependencies:
6718 define-properties: 1.1.3
6719 es-abstract: 1.17.6
6720 dev: true
6721 resolution:
6722 integrity: sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==
6723 /string.prototype.trimstart/1.0.1:
6724 dependencies:
6725 define-properties: 1.1.3
6726 es-abstract: 1.17.6
6727 dev: true
6728 resolution:
6729 integrity: sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==
6730 /string_decoder/1.1.1:
6731 dependencies:
6732 safe-buffer: 5.1.2
6733 dev: false
6734 resolution:
6735 integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
6736 /string_decoder/1.3.0:
6737 dependencies:
6738 safe-buffer: 5.2.1
6739 dev: false
6740 resolution:
6741 integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
6742 /stringify-object/3.3.0:
6743 dependencies:
6744 get-own-enumerable-property-symbols: 3.0.2
6745 is-obj: 1.0.1
6746 is-regexp: 1.0.0
6747 dev: true
6748 engines:
6749 node: '>=4'
6750 resolution:
6751 integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
6752 /strip-ansi/3.0.1:
6753 dependencies:
6754 ansi-regex: 2.1.1
6755 dev: true
6756 engines:
6757 node: '>=0.10.0'
6758 resolution:
6759 integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
6760 /strip-ansi/4.0.0:
6761 dependencies:
6762 ansi-regex: 3.0.0
6763 dev: true
6764 engines:
6765 node: '>=4'
6766 resolution:
6767 integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8=
6768 /strip-ansi/5.2.0:
6769 dependencies:
6770 ansi-regex: 4.1.0
6771 dev: true
6772 engines:
6773 node: '>=6'
6774 resolution:
6775 integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
6776 /strip-ansi/6.0.0:
6777 dependencies:
6778 ansi-regex: 5.0.0
6779 dev: true
6780 engines:
6781 node: '>=8'
6782 resolution:
6783 integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
6784 /strip-bom-buf/2.0.0:
6785 dependencies:
6786 is-utf8: 0.2.1
6787 dev: true
6788 engines:
6789 node: '>=8'
6790 resolution:
6791 integrity: sha512-gLFNHucd6gzb8jMsl5QmZ3QgnUJmp7qn4uUSHNwEXumAp7YizoGYw19ZUVfuq4aBOQUtyn2k8X/CwzWB73W2lQ==
6792 /strip-bom/3.0.0:
6793 dev: true
6794 engines:
6795 node: '>=4'
6796 resolution:
6797 integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
6798 /strip-bom/4.0.0:
6799 dev: true
6800 engines:
6801 node: '>=8'
6802 resolution:
6803 integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==
6804 /strip-final-newline/2.0.0:
6805 dev: true
6806 engines:
6807 node: '>=6'
6808 resolution:
6809 integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
6810 /strip-indent/3.0.0:
6811 dependencies:
6812 min-indent: 1.0.1
6813 engines:
6814 node: '>=8'
6815 resolution:
6816 integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==
6817 /strip-json-comments/2.0.1:
6818 dev: true
6819 engines:
6820 node: '>=0.10.0'
6821 resolution:
6822 integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=
6823 /strip-json-comments/3.1.1:
6824 dev: true
6825 engines:
6826 node: '>=8'
6827 resolution:
6828 integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
6829 /style-inject/0.3.0:
6830 dev: true
6831 resolution:
6832 integrity: sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==
6833 /stylehacks/4.0.3:
6834 dependencies:
6835 browserslist: 4.13.0
6836 postcss: 7.0.32
6837 postcss-selector-parser: 3.1.2
6838 dev: true
6839 engines:
6840 node: '>=6.9.0'
6841 resolution:
6842 integrity: sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==
6843 /sucrase/3.15.0:
6844 dependencies:
6845 commander: 4.1.1
6846 glob: 7.1.6
6847 lines-and-columns: 1.1.6
6848 mz: 2.7.0
6849 pirates: 4.0.1
6850 ts-interface-checker: 0.1.11
6851 dev: false
6852 engines:
6853 node: '>=8'
6854 hasBin: true
6855 resolution:
6856 integrity: sha512-05TJOUfMgckH7wKqfk/1p4G6q16nIeW/GHQwD44vkT0mQMqqzgfHCwkX3whNmwyOo7nVF0jDLwVu/qOBTtsscw==
6857 /supertap/1.0.0:
6858 dependencies:
6859 arrify: 1.0.1
6860 indent-string: 3.2.0
6861 js-yaml: 3.14.0
6862 serialize-error: 2.1.0
6863 strip-ansi: 4.0.0
6864 dev: true
6865 engines:
6866 node: '>=4'
6867 resolution:
6868 integrity: sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==
6869 /supports-color/2.0.0:
6870 dev: true
6871 engines:
6872 node: '>=0.8.0'
6873 resolution:
6874 integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
6875 /supports-color/3.2.3:
6876 dependencies:
6877 has-flag: 1.0.0
6878 dev: true
6879 engines:
6880 node: '>=0.8.0'
6881 resolution:
6882 integrity: sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=
6883 /supports-color/5.5.0:
6884 dependencies:
6885 has-flag: 3.0.0
6886 engines:
6887 node: '>=4'
6888 resolution:
6889 integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
6890 /supports-color/6.1.0:
6891 dependencies:
6892 has-flag: 3.0.0
6893 dev: true
6894 engines:
6895 node: '>=6'
6896 resolution:
6897 integrity: sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
6898 /supports-color/7.1.0:
6899 dependencies:
6900 has-flag: 4.0.0
6901 dev: true
6902 engines:
6903 node: '>=8'
6904 resolution:
6905 integrity: sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
6906 /svgo/1.3.2:
6907 dependencies:
6908 chalk: 2.4.2
6909 coa: 2.0.2
6910 css-select: 2.1.0
6911 css-select-base-adapter: 0.1.1
6912 css-tree: 1.0.0-alpha.37
6913 csso: 4.0.3
6914 js-yaml: 3.14.0
6915 mkdirp: 0.5.5
6916 object.values: 1.1.1
6917 sax: 1.2.4
6918 stable: 0.1.8
6919 unquote: 1.1.1
6920 util.promisify: 1.0.1
6921 dev: true
6922 engines:
6923 node: '>=4.0.0'
6924 hasBin: true
6925 resolution:
6926 integrity: sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==
6927 /table/5.4.6:
6928 dependencies:
6929 ajv: 6.12.3
6930 lodash: 4.17.19
6931 slice-ansi: 2.1.0
6932 string-width: 3.1.0
6933 dev: true
6934 engines:
6935 node: '>=6.0.0'
6936 resolution:
6937 integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
6938 /temp-dir/2.0.0:
6939 dev: true
6940 engines:
6941 node: '>=8'
6942 resolution:
6943 integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==
6944 /term-size/2.2.0:
6945 dev: true
6946 engines:
6947 node: '>=8'
6948 resolution:
6949 integrity: sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==
6950 /test-exclude/6.0.0:
6951 dependencies:
6952 '@istanbuljs/schema': 0.1.2
6953 glob: 7.1.6
6954 minimatch: 3.0.4
6955 dev: true
6956 engines:
6957 node: '>=8'
6958 resolution:
6959 integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==
6960 /text-extensions/1.9.0:
6961 dev: false
6962 engines:
6963 node: '>=0.10'
6964 resolution:
6965 integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==
6966 /text-table/0.2.0:
6967 dev: true
6968 resolution:
6969 integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
6970 /thenify-all/1.6.0:
6971 dependencies:
6972 thenify: 3.3.1
6973 dev: false
6974 engines:
6975 node: '>=0.8'
6976 resolution:
6977 integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=
6978 /thenify/3.3.1:
6979 dependencies:
6980 any-promise: 1.3.0
6981 dev: false
6982 resolution:
6983 integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
6984 /through/2.3.8:
6985 resolution:
6986 integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
6987 /through2/2.0.5:
6988 dependencies:
6989 readable-stream: 2.3.7
6990 xtend: 4.0.2
6991 dev: false
6992 resolution:
6993 integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
6994 /through2/3.0.2:
6995 dependencies:
6996 inherits: 2.0.4
6997 readable-stream: 3.6.0
6998 dev: false
6999 resolution:
7000 integrity: sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==
7001 /time-zone/1.0.0:
7002 dev: true
7003 engines:
7004 node: '>=4'
7005 resolution:
7006 integrity: sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=
7007 /timsort/0.3.0:
7008 dev: true
7009 resolution:
7010 integrity: sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
7011 /tmp/0.0.33:
7012 dependencies:
7013 os-tmpdir: 1.0.2
7014 dev: true
7015 engines:
7016 node: '>=0.6.0'
7017 resolution:
7018 integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
7019 /to-fast-properties/2.0.0:
7020 engines:
7021 node: '>=4'
7022 resolution:
7023 integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
7024 /to-readable-stream/1.0.0:
7025 dev: true
7026 engines:
7027 node: '>=6'
7028 resolution:
7029 integrity: sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
7030 /to-readable-stream/2.1.0:
7031 dev: true
7032 engines:
7033 node: '>=8'
7034 resolution:
7035 integrity: sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w==
7036 /to-regex-range/5.0.1:
7037 dependencies:
7038 is-number: 7.0.0
7039 engines:
7040 node: '>=8.0'
7041 resolution:
7042 integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
7043 /tosource/1.0.0:
7044 dev: false
7045 engines:
7046 node: '>=0.4.0'
7047 resolution:
7048 integrity: sha1-QtiN0RZhi88A1hBt1URvNCeQL/E=
7049 /trim-newlines/3.0.0:
7050 engines:
7051 node: '>=8'
7052 resolution:
7053 integrity: sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==
7054 /trim-off-newlines/1.0.1:
7055 engines:
7056 node: '>=0.10.0'
7057 resolution:
7058 integrity: sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
7059 /ts-interface-checker/0.1.11:
7060 dev: false
7061 resolution:
7062 integrity: sha512-Jx6cFBiuCQrRl3CgoIOamIE/toZ8jQJbIlsLGpkBiUpCEUyFcyZ2pvjP8kSXIcz8V5v/murgm/5EfIQapUmh6A==
7063 /ts-node/8.10.2_typescript@3.9.7:
7064 dependencies:
7065 arg: 4.1.3
7066 diff: 4.0.2
7067 make-error: 1.3.6
7068 source-map-support: 0.5.19
7069 typescript: 3.9.7
7070 yn: 3.1.1
7071 dev: true
7072 engines:
7073 node: '>=6.0.0'
7074 hasBin: true
7075 peerDependencies:
7076 typescript: '>=2.7'
7077 resolution:
7078 integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==
7079 /tsconfig-paths/3.9.0:
7080 dependencies:
7081 '@types/json5': 0.0.29
7082 json5: 1.0.1
7083 minimist: 1.2.5
7084 strip-bom: 3.0.0
7085 dev: true
7086 resolution:
7087 integrity: sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==
7088 /tslib/1.13.0:
7089 dev: true
7090 resolution:
7091 integrity: sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
7092 /tslib/2.0.0:
7093 dev: true
7094 resolution:
7095 integrity: sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==
7096 /tsutils/3.17.1_typescript@3.9.7:
7097 dependencies:
7098 tslib: 1.13.0
7099 typescript: 3.9.7
7100 dev: true
7101 engines:
7102 node: '>= 6'
7103 peerDependencies:
7104 typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
7105 resolution:
7106 integrity: sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
7107 /type-check/0.3.2:
7108 dependencies:
7109 prelude-ls: 1.1.2
7110 dev: true
7111 engines:
7112 node: '>= 0.8.0'
7113 resolution:
7114 integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
7115 /type-detect/4.0.8:
7116 dev: true
7117 engines:
7118 node: '>=4'
7119 resolution:
7120 integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
7121 /type-fest/0.10.0:
7122 dev: true
7123 engines:
7124 node: '>=8'
7125 resolution:
7126 integrity: sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw==
7127 /type-fest/0.11.0:
7128 dev: true
7129 engines:
7130 node: '>=8'
7131 resolution:
7132 integrity: sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
7133 /type-fest/0.13.1:
7134 engines:
7135 node: '>=10'
7136 resolution:
7137 integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
7138 /type-fest/0.3.1:
7139 dev: true
7140 engines:
7141 node: '>=6'
7142 resolution:
7143 integrity: sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==
7144 /type-fest/0.4.1:
7145 dev: false
7146 engines:
7147 node: '>=6'
7148 resolution:
7149 integrity: sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==
7150 /type-fest/0.6.0:
7151 engines:
7152 node: '>=8'
7153 resolution:
7154 integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
7155 /type-fest/0.8.1:
7156 engines:
7157 node: '>=8'
7158 resolution:
7159 integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
7160 /type/1.2.0:
7161 dev: true
7162 resolution:
7163 integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==
7164 /type/2.0.0:
7165 dev: true
7166 resolution:
7167 integrity: sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==
7168 /typedarray-to-buffer/3.1.5:
7169 dependencies:
7170 is-typedarray: 1.0.0
7171 dev: true
7172 resolution:
7173 integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
7174 /typescript/3.9.7:
7175 dev: true
7176 engines:
7177 node: '>=4.2.0'
7178 hasBin: true
7179 resolution:
7180 integrity: sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
7181 /unicode-canonical-property-names-ecmascript/1.0.4:
7182 engines:
7183 node: '>=4'
7184 resolution:
7185 integrity: sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==
7186 /unicode-match-property-ecmascript/1.0.4:
7187 dependencies:
7188 unicode-canonical-property-names-ecmascript: 1.0.4
7189 unicode-property-aliases-ecmascript: 1.1.0
7190 engines:
7191 node: '>=4'
7192 resolution:
7193 integrity: sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==
7194 /unicode-match-property-value-ecmascript/1.2.0:
7195 engines:
7196 node: '>=4'
7197 resolution:
7198 integrity: sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==
7199 /unicode-property-aliases-ecmascript/1.1.0:
7200 engines:
7201 node: '>=4'
7202 resolution:
7203 integrity: sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==
7204 /uniq/1.0.1:
7205 dev: true
7206 resolution:
7207 integrity: sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=
7208 /uniqs/2.0.0:
7209 dev: true
7210 resolution:
7211 integrity: sha1-/+3ks2slKQaW5uFl1KWe25mOawI=
7212 /unique-string/2.0.0:
7213 dependencies:
7214 crypto-random-string: 2.0.0
7215 dev: true
7216 engines:
7217 node: '>=8'
7218 resolution:
7219 integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==
7220 /unquote/1.1.1:
7221 dev: true
7222 resolution:
7223 integrity: sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=
7224 /update-notifier/4.1.0:
7225 dependencies:
7226 boxen: 4.2.0
7227 chalk: 3.0.0
7228 configstore: 5.0.1
7229 has-yarn: 2.1.0
7230 import-lazy: 2.1.0
7231 is-ci: 2.0.0
7232 is-installed-globally: 0.3.2
7233 is-npm: 4.0.0
7234 is-yarn-global: 0.3.0
7235 latest-version: 5.1.0
7236 pupa: 2.0.1
7237 semver-diff: 3.1.1
7238 xdg-basedir: 4.0.0
7239 dev: true
7240 engines:
7241 node: '>=8'
7242 resolution:
7243 integrity: sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==
7244 /uri-js/4.2.2:
7245 dependencies:
7246 punycode: 2.1.1
7247 dev: true
7248 resolution:
7249 integrity: sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
7250 /url-parse-lax/3.0.0:
7251 dependencies:
7252 prepend-http: 2.0.0
7253 dev: true
7254 engines:
7255 node: '>=4'
7256 resolution:
7257 integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
7258 /util-deprecate/1.0.2:
7259 dev: false
7260 resolution:
7261 integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
7262 /util.promisify/1.0.1:
7263 dependencies:
7264 define-properties: 1.1.3
7265 es-abstract: 1.17.6
7266 has-symbols: 1.0.1
7267 object.getownpropertydescriptors: 2.1.0
7268 dev: true
7269 resolution:
7270 integrity: sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==
7271 /uuid/3.4.0:
7272 dev: true
7273 hasBin: true
7274 resolution:
7275 integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
7276 /v8-compile-cache/2.1.1:
7277 dev: true
7278 resolution:
7279 integrity: sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==
7280 /validate-npm-package-license/3.0.4:
7281 dependencies:
7282 spdx-correct: 3.1.1
7283 spdx-expression-parse: 3.0.1
7284 resolution:
7285 integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
7286 /vendors/1.0.4:
7287 dev: true
7288 resolution:
7289 integrity: sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==
7290 /wcwidth/1.0.1:
7291 dependencies:
7292 defaults: 1.0.3
7293 dev: true
7294 resolution:
7295 integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
7296 /well-known-symbols/2.0.0:
7297 dev: true
7298 engines:
7299 node: '>=6'
7300 resolution:
7301 integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==
7302 /which-module/2.0.0:
7303 dev: true
7304 resolution:
7305 integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
7306 /which-pm-runs/1.0.0:
7307 dev: true
7308 resolution:
7309 integrity: sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
7310 /which/1.3.1:
7311 dependencies:
7312 isexe: 2.0.0
7313 dev: true
7314 hasBin: true
7315 resolution:
7316 integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
7317 /which/2.0.2:
7318 dependencies:
7319 isexe: 2.0.0
7320 dev: true
7321 engines:
7322 node: '>= 8'
7323 hasBin: true
7324 resolution:
7325 integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
7326 /widest-line/3.1.0:
7327 dependencies:
7328 string-width: 4.2.0
7329 dev: true
7330 engines:
7331 node: '>=8'
7332 resolution:
7333 integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==
7334 /word-wrap/1.2.3:
7335 dev: true
7336 engines:
7337 node: '>=0.10.0'
7338 resolution:
7339 integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
7340 /wrap-ansi/6.2.0:
7341 dependencies:
7342 ansi-styles: 4.2.1
7343 string-width: 4.2.0
7344 strip-ansi: 6.0.0
7345 dev: true
7346 engines:
7347 node: '>=8'
7348 resolution:
7349 integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
7350 /wrappy/1.0.2:
7351 resolution:
7352 integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
7353 /write-file-atomic/2.4.3:
7354 dependencies:
7355 graceful-fs: 4.2.4
7356 imurmurhash: 0.1.4
7357 signal-exit: 3.0.3
7358 dev: false
7359 resolution:
7360 integrity: sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==
7361 /write-file-atomic/3.0.3:
7362 dependencies:
7363 imurmurhash: 0.1.4
7364 is-typedarray: 1.0.0
7365 signal-exit: 3.0.3
7366 typedarray-to-buffer: 3.1.5
7367 dev: true
7368 resolution:
7369 integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
7370 /write-json-file/3.2.0:
7371 dependencies:
7372 detect-indent: 5.0.0
7373 graceful-fs: 4.2.4
7374 make-dir: 2.1.0
7375 pify: 4.0.1
7376 sort-keys: 2.0.0
7377 write-file-atomic: 2.4.3
7378 dev: false
7379 engines:
7380 node: '>=6'
7381 resolution:
7382 integrity: sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==
7383 /write-pkg/4.0.0:
7384 dependencies:
7385 sort-keys: 2.0.0
7386 type-fest: 0.4.1
7387 write-json-file: 3.2.0
7388 dev: false
7389 engines:
7390 node: '>=8'
7391 resolution:
7392 integrity: sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==
7393 /write/1.0.3:
7394 dependencies:
7395 mkdirp: 0.5.5
7396 dev: true
7397 engines:
7398 node: '>=4'
7399 resolution:
7400 integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
7401 /xdg-basedir/4.0.0:
7402 dev: true
7403 engines:
7404 node: '>=8'
7405 resolution:
7406 integrity: sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
7407 /xtend/4.0.2:
7408 engines:
7409 node: '>=0.4'
7410 resolution:
7411 integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
7412 /y18n/4.0.0:
7413 dev: true
7414 resolution:
7415 integrity: sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
7416 /yaml/1.10.0:
7417 dev: true
7418 engines:
7419 node: '>= 6'
7420 resolution:
7421 integrity: sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
7422 /yargs-parser/18.1.3:
7423 dependencies:
7424 camelcase: 5.3.1
7425 decamelize: 1.2.0
7426 engines:
7427 node: '>=6'
7428 resolution:
7429 integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
7430 /yargs/15.4.1:
7431 dependencies:
7432 cliui: 6.0.0
7433 decamelize: 1.2.0
7434 find-up: 4.1.0
7435 get-caller-file: 2.0.5
7436 require-directory: 2.1.1
7437 require-main-filename: 2.0.0
7438 set-blocking: 2.0.0
7439 string-width: 4.2.0
7440 which-module: 2.0.0
7441 y18n: 4.0.0
7442 yargs-parser: 18.1.3
7443 dev: true
7444 engines:
7445 node: '>=8'
7446 resolution:
7447 integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
7448 /yn/3.1.1:
7449 dev: true
7450 engines:
7451 node: '>=6'
7452 resolution:
7453 integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
+0
-2
pnpm-workspace.yaml less more
0 packages:
1 - "packages/*"
+0
-38
scripts/codecov.js less more
0 /* eslint-disable import/no-extraneous-dependencies */
1
2 const { readFileSync } = require('fs');
3 const { join } = require('path');
4
5 const chalk = require('chalk');
6 const { default: codecov } = require('codecov-lite');
7 const globby = require('globby');
8
9 const { log } = console;
10 const root = join(__dirname, '..');
11
12 (async () => {
13 const files = await globby(['packages/*/coverage.lcov'], {
14 cwd: root,
15 onlyFiles: false
16 });
17
18 if (!files.length) {
19 log(chalk.cyan('No Coverage Files Found to Submit'));
20 return;
21 }
22
23 log(chalk.blue('Submitting Coverage to CodeCov.io'));
24 log('Found Coverage Files:');
25 log(' ', chalk.grey(files.join('\n ')), '\n');
26
27 for (const file of files) {
28 try {
29 const lcovData = readFileSync(join(root, file), 'utf8');
30 await codecov(lcovData); // eslint-disable-line no-await-in-loop
31 log(chalk.green('Coverage Submitted:'), file.replace(root, ''));
32 } catch (e) {
33 log(chalk.red('Coverage Failure:'), file.replace(root, ''));
34 log(e.stack);
35 }
36 }
37 })();
+0
-7
scripts/disallow-npm.js less more
0 const agent = process.env.npm_config_user_agent;
1 const { error } = console;
2
3 if (!agent.startsWith('pnpm')) {
4 error('\nPlease use pnpm to manage dependencies in this repository.\n $ npm i pnpm -g\n');
5 process.exit(1);
6 }
+0
-210
scripts/publish.js less more
0 #!/usr/bin/env node
1
2 /* eslint-disable import/no-extraneous-dependencies, import/no-dynamic-require, no-await-in-loop, global-require */
3
4 const { join } = require('path');
5 const { readFileSync, writeFileSync } = require('fs');
6
7 const parser = require('conventional-commits-parser');
8 const chalk = require('chalk');
9 const execa = require('execa');
10 const semver = require('semver');
11 const writePackage = require('write-pkg');
12
13 const packagesPath = join(__dirname, '..', 'packages');
14 const { log } = console;
15 const parserOptions = {
16 noteKeywords: ['BREAKING CHANGE', 'Breaking Change']
17 };
18 const reBreaking = new RegExp(`(${parserOptions.noteKeywords.join(')|(')})`);
19 const dryRun = process.argv.includes('--dry');
20 const noPush = process.argv.includes('--no-push');
21 const noTag = process.argv.includes('--no-tag');
22
23 const commitChanges = async (cwd, pluginName, version) => {
24 if (dryRun) {
25 log(chalk`{yellow Skipping Git Commit}`);
26 return;
27 }
28
29 log(chalk`{blue Committing} CHANGELOG.md, package.json`);
30 let params = ['add', cwd];
31 await execa('git', params);
32
33 params = ['commit', '--m', `chore(release): ${pluginName} v${version}`];
34 await execa('git', params);
35 };
36
37 const getCommits = async (pluginName) => {
38 log(chalk`{blue Gathering Commits}`);
39
40 let params = ['tag', '--list', `${pluginName}-v*`, '--sort', '-taggerdate'];
41 const { stdout: tags } = await execa('git', params);
42 const [latestTag] = tags.split('\n');
43
44 log(chalk`{blue Last Release Tag}: ${latestTag}`);
45
46 // i wanted to use '--grep', `"(${pluginName})"` here, but there's something up with execa
47 // https://github.com/sindresorhus/execa/issues/406 - FIXED
48 // TODO: const params = ['log', '--grep', '"(pluginutils)"', 'pluginutils-v3.0.1..HEAD'];
49 params = ['--no-pager', 'log', `${latestTag}..HEAD`, '--format=%B%n-hash-%n%H🐒💨🙊'];
50 const rePlugin = new RegExp(`^[\\w\\!]+\\(${pluginName}\\)`, 'i');
51 const { stdout } = await execa('git', params);
52 const commits = stdout
53 .split('🐒💨🙊')
54 .filter((commit) => {
55 const chunk = commit.trim();
56 return chunk && rePlugin.test(chunk);
57 })
58 .map((commit) => {
59 const node = parser.sync(commit);
60
61 node.breaking = reBreaking.test(node.body || node.footer) || /!:/.test(node.header);
62
63 return node;
64 });
65
66 return commits;
67 };
68
69 const getNewVersion = (version, commits) => {
70 log(chalk`{blue Determining New Version}`);
71 const intersection = process.argv.filter((arg) =>
72 ['--major', '--minor', '--patch'].includes(arg)
73 );
74 if (intersection.length) {
75 return semver.inc(version, intersection[0].substring(2));
76 }
77
78 const types = new Set(commits.map(({ type }) => type));
79 const breaking = commits.some((commit) => !!commit.breaking);
80 const level = breaking ? 'major' : types.has('feat') ? 'minor' : 'patch';
81
82 return semver.inc(version, level);
83 };
84
85 const publish = async (cwd) => {
86 if (dryRun) {
87 log(chalk`{yellow Skipping Publish}`);
88 return;
89 }
90
91 log(chalk`\n{cyan Publishing to NPM}`);
92
93 await execa('pnpm', ['publish'], { cwd, stdio: 'inherit' });
94 };
95
96 const push = async () => {
97 if (dryRun || noPush) {
98 log(chalk`{yellow Skipping Git Push}`);
99 return;
100 }
101
102 log(chalk`{blue Pushing Release and Tags}`);
103 await execa('git', ['push']);
104 await execa('git', ['push', '--tags']);
105 };
106
107 const tag = async (cwd, pluginName, version) => {
108 if (dryRun || noTag) {
109 log(chalk`{yellow Skipping Git Tag}`);
110 return;
111 }
112
113 const tagName = `${pluginName}-v${version}`;
114 log(chalk`\n{blue Tagging} {grey ${tagName}}`);
115 await execa('git', ['tag', tagName], { cwd, stdio: 'inherit' });
116 };
117
118 const updateChangelog = (commits, cwd, pluginName, version) => {
119 log(chalk`{blue Gathering Changes}`);
120
121 const plugin = pluginName === 'pluginutils' ? pluginName : `plugin-${pluginName}`;
122 const title = `# @rollup/${plugin} ChangeLog`;
123 const [date] = new Date().toISOString().split('T');
124 const logPath = join(cwd, 'CHANGELOG.md');
125 const logFile = readFileSync(logPath, 'utf-8');
126 const oldNotes = logFile.startsWith(title) ? logFile.slice(title.length).trim() : logFile;
127 const notes = { breaking: [], fixes: [], features: [], updates: [] };
128
129 for (const { breaking, hash, header, type } of commits) {
130 const ref = /\(#\d+\)/.test(header) ? '' : ` (${hash.substring(0, 7)})`;
131 const message = header.trim().replace(`(${pluginName})`, '') + ref;
132 if (breaking) {
133 notes.breaking.push(message);
134 } else if (type === 'fix') {
135 notes.fixes.push(message);
136 } else if (type === 'feat') {
137 notes.features.push(message);
138 } else {
139 notes.updates.push(message);
140 }
141 }
142
143 const parts = [
144 `## v${version}`,
145 `_${date}_`,
146 notes.breaking.length ? `### Breaking Changes\n\n- ${notes.breaking.join('\n- ')}`.trim() : '',
147 notes.fixes.length ? `### Bugfixes\n\n- ${notes.fixes.join('\n- ')}`.trim() : '',
148 notes.features.length ? `### Features\n\n- ${notes.features.join('\n- ')}`.trim() : '',
149 notes.updates.length ? `### Updates\n\n- ${notes.updates.join('\n- ')}`.trim() : ''
150 ].filter(Boolean);
151
152 const newLog = parts.join('\n\n');
153
154 if (dryRun) {
155 log(chalk`{blue New ChangeLog}:\n${newLog}`);
156 return;
157 }
158
159 log(chalk`{blue Updating} CHANGELOG.md`);
160 const content = [title, newLog, oldNotes].filter(Boolean).join('\n\n');
161 writeFileSync(logPath, content, 'utf-8');
162 };
163
164 const updatePackage = async (cwd, pkg, version) => {
165 if (dryRun) {
166 log(chalk`{yellow Skipping package.json Update}`);
167 return;
168 }
169
170 log(chalk`{blue Updating} package.json`);
171 pkg.version = version; // eslint-disable-line no-param-reassign
172 await writePackage(cwd, pkg);
173 };
174
175 (async () => {
176 try {
177 const [, , pluginName] = process.argv;
178 const cwd = join(packagesPath, pluginName);
179 const pkg = require(join(cwd, 'package.json'));
180
181 if (dryRun) {
182 log(chalk`{magenta DRY RUN}: No files will be modified`);
183 }
184
185 log(chalk`{cyan Publishing \`${pluginName}\`} from {grey packages/${pluginName}}\n`);
186
187 const commits = await getCommits(pluginName);
188
189 if (!commits.length) {
190 log(chalk`\n{red No Commits Found}. Did you mean to publish ${pluginName}?`);
191 return;
192 }
193
194 log(chalk`{blue Found} {bold ${commits.length}} Commits\n`);
195
196 const newVersion = getNewVersion(pkg.version, commits);
197
198 log(chalk`{blue New Version}: ${newVersion}\n`);
199
200 await updatePackage(cwd, pkg, newVersion);
201 await updateChangelog(commits, cwd, pluginName, newVersion);
202 await commitChanges(cwd, pluginName, newVersion);
203 await publish(cwd);
204 await tag(cwd, pluginName, newVersion);
205 await push();
206 } catch (e) {
207 log(e);
208 }
209 })();
+0
-77
scripts/run-changed.js less more
0 #!/usr/bin/env node
1
2 /* eslint-disable import/no-extraneous-dependencies */
3
4 const { existsSync, readFileSync } = require('fs');
5 const { join, sep } = require('path');
6
7 const chalk = require('chalk');
8 const execa = require('execa');
9 const yaml = require('yaml');
10
11 const [, , task] = process.argv;
12 const { log } = console;
13
14 const getDiff = async () => {
15 const {
16 CIRCLE_BRANCH,
17 CIRCLE_SHA1,
18 CIRCLE_COMPARE_URL,
19 GITHUB_SHA,
20 GITHUB_BASE_REF
21 } = process.env;
22 let baseRef = 'master';
23 let range = 'HEAD';
24
25 if (CIRCLE_SHA1) {
26 if (CIRCLE_BRANCH === 'master' && CIRCLE_COMPARE_URL) {
27 const reCompare = /compare\/([0-9a-z]+)\.\.\.([0-9a-z]+)$/;
28 const [, from] = CIRCLE_COMPARE_URL.match(reCompare);
29 baseRef = from || 'master';
30 }
31 range = `${baseRef}...${CIRCLE_SHA1}`;
32 }
33
34 if (GITHUB_SHA) {
35 baseRef = GITHUB_BASE_REF || 'master';
36 range = `${baseRef}...${GITHUB_SHA}`;
37 }
38
39 log(chalk`{blue Comparing ${range}}`);
40
41 const { stdout } = await execa('git', ['diff', range, '--name-only']);
42 return stdout;
43 };
44
45 (async () => {
46 const workspace = readFileSync(join(__dirname, '..', 'pnpm-workspace.yaml'), 'utf-8');
47 const { packages } = yaml.parse(workspace);
48 const roots = packages.map((item) => item.split(sep)[0]).join('|');
49 const rePkg = new RegExp(`(${roots}/([\\w\\-_]+))/?`);
50 const diff = await getDiff();
51 const filters = diff
52 .split('\n')
53 .filter((line) => rePkg.test(line) && existsSync(join(__dirname, '..', line)))
54 .map((line) => {
55 const [, directory] = line.match(rePkg);
56 return `--filter ./${directory}`;
57 });
58 const uniqueFilters = filters.length ? Array.from(new Set(filters)) : ['--filter ./packages'];
59
60 if (!filters.length) {
61 log(chalk`{yellow No individual package changes detected}`);
62 return;
63 }
64
65 log(chalk`{blue Executing \`${task}\`} for:\n ${uniqueFilters.join('\n ')}\n`);
66
67 const command = `pnpm run ${task} ${uniqueFilters.join(' ')}`;
68
69 try {
70 const res = await execa.command(command, { stdio: 'inherit' });
71 log(res);
72 } catch (e) {
73 log(e);
74 process.exit(e.exitCode);
75 }
76 })();
+0
-18
tsconfig.base.json less more
0 {
1 "compilerOptions": {
2 "allowSyntheticDefaultImports": true,
3 "lib": ["es6"],
4 "module": "esnext",
5 "moduleResolution": "node",
6 "noEmit": true,
7 "noEmitOnError": false,
8 "noUnusedLocals": true,
9 "noUnusedParameters": true,
10 "pretty": true,
11 "skipLibCheck": true,
12 "sourceMap": true,
13 "strict": true,
14 "target": "es2017"
15 },
16 "exclude": ["dist", "node_modules", "test/types"]
17 }
+0
-4
tsconfig.eslint.json less more
0 {
1 "extends": "./tsconfig.base.json",
2 "include": ["packages", "scripts", "util"]
3 }