├── .eslintrc.json ├── .gitignore ├── .prettierrc ├── .vscode ├── extensions.json └── launch.json ├── .vscodeignore ├── LICENSE.md ├── README.md ├── extension.js ├── images └── icon.png ├── jsconfig.json ├── package-lock.json ├── package.json └── plugins ├── cjs-esm-plugin.js └── esm-cjs-plugin.js /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "commonjs": true, 5 | "es6": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | "parserOptions": { 10 | "ecmaVersion": 2018, 11 | "ecmaFeatures": { 12 | "jsx": true 13 | }, 14 | "sourceType": "module" 15 | }, 16 | "rules": { 17 | "no-const-assign": "warn", 18 | "no-this-before-super": "warn", 19 | "no-undef": "warn", 20 | "no-unreachable": "warn", 21 | "no-unused-vars": "warn", 22 | "constructor-super": "warn", 23 | "valid-typeof": "warn" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode-test/ 3 | *.vsix 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "arrowParens": "avoid" 4 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | }, 16 | { 17 | "name": "Extension Tests", 18 | "type": "extensionHost", 19 | "request": "launch", 20 | "args": [ 21 | "--extensionDevelopmentPath=${workspaceFolder}", 22 | "--extensionTestsPath=${workspaceFolder}/test/suite/index" 23 | ] 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | test/** 4 | .gitignore 5 | .yarnrc 6 | vsc-extension-quickstart.md 7 | **/jsconfig.json 8 | **/*.map 9 | **/.eslintrc.json 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## English 2 | ### esm-cjs-converter 3 | - Convert ES modules to CommonJS 4 | - Convert CommonJS to ES modules 5 | 6 | ### usage 7 | ![](https://static.zhufengpeixun.com/esmcjsconverter_1680840927105.png) 8 | #### Convert ES modules to CommonJS 9 | Before 10 | ```js 11 | import { a } from './a.js'; 12 | import b from './b.js'; 13 | 14 | export var c = 1; 15 | export default 2 16 | export default class Person { } 17 | export default function(){} 18 | ``` 19 | 20 | After 21 | ```js 22 | const {a} = require('./a.js'); 23 | const b = require('./b.js'); 24 | var c = 1; 25 | exports.c = c; 26 | module.exports = 2; 27 | ``` 28 | 29 | #### Convert CommonJS to ES modules 30 | Before 31 | ```js 32 | const {a} = require('./a.js'); 33 | const b = require('./b.js'); 34 | var c = 1; 35 | exports.c = c; 36 | module.exports = 2; 37 | ``` 38 | 39 | After 40 | ```js 41 | import { a } from "./a.js"; 42 | import b from "./b.js"; 43 | var c = 1; 44 | export { c }; 45 | export default 2; 46 | ``` 47 | 48 | ## 中文 49 | ### esm-cjs-converter 50 | - 将 ES 模块转换为 CommonJS 51 | - 将 CommonJS 转换为 ES 模块 52 | 53 | ### 使用方法 54 | ![](https://static.zhufengpeixun.com/esmcjsconverter_1680840927105.png) 55 | #### 把 ES modules 转成 CommonJS 56 | 转换前 57 | ```js 58 | import { a } from './a.js'; 59 | import b from './b.js'; 60 | 61 | export var c = 1; 62 | export default 2 63 | ``` 64 | 65 | 转换后 66 | ```js 67 | const {a} = require('./a.js'); 68 | const b = require('./b.js'); 69 | var c = 1; 70 | exports.c = c; 71 | module.exports = 2; 72 | ``` 73 | 74 | #### 把 CommonJS 转成 ES modules 75 | 转换前 76 | ```js 77 | const {a} = require('./a.js'); 78 | const b = require('./b.js'); 79 | var c = 1; 80 | exports.c = c; 81 | module.exports = 2; 82 | ``` 83 | 84 | 转换后 85 | ```js 86 | import { a } from "./a.js"; 87 | import b from "./b.js"; 88 | var c = 1; 89 | export { c }; 90 | export default 2; 91 | ``` -------------------------------------------------------------------------------- /extension.js: -------------------------------------------------------------------------------- 1 | const vscode = require('vscode'); 2 | const babel = require("@babel/core"); 3 | const esmCjsPlugin = require('./plugins/esm-cjs-plugin') 4 | const cjsEsmPlugin = require('./plugins/cjs-esm-plugin') 5 | function activate(context) { 6 | const esmoduleToCommonjsDisposable = vscode.commands.registerCommand('extension.esmoduleToCommonjs', function () { 7 | vscode.window.activeTextEditor.edit(editBuilder => { 8 | const text = vscode.window.activeTextEditor.document.getText(); 9 | let { code } = babel.transformSync(text, { 10 | sourceType: 'module', 11 | plugins: [esmCjsPlugin] 12 | 13 | }); 14 | const end = new vscode.Position(vscode.window.activeTextEditor.document.lineCount + 1, 0); 15 | editBuilder.replace(new vscode.Range(new vscode.Position(0, 0), end), code); 16 | }); 17 | }); 18 | context.subscriptions.push(esmoduleToCommonjsDisposable); 19 | const commonjsToEsmoduleDisposable = vscode.commands.registerCommand('extension.commonjsToEsmodule', function () { 20 | vscode.window.activeTextEditor.edit(editBuilder => { 21 | const text = vscode.window.activeTextEditor.document.getText(); 22 | let { code } = babel.transformSync(text, { 23 | sourceType: 'module', 24 | plugins: [cjsEsmPlugin] 25 | }); 26 | const end = new vscode.Position(vscode.window.activeTextEditor.document.lineCount + 1, 0); 27 | editBuilder.replace(new vscode.Range(new vscode.Position(0, 0), end), code); 28 | }); 29 | }); 30 | context.subscriptions.push(commonjsToEsmoduleDisposable); 31 | } 32 | function deactivate() { } 33 | module.exports = { 34 | activate, 35 | deactivate 36 | }; -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangrenyang/esm-cjs-converter/109b50f2321b0aa7ee63dbcbb47bb5e8b861ad3c/images/icon.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "checkJs": true, /* Typecheck .js files. */ 6 | "lib": [ 7 | "es2021" 8 | ] 9 | }, 10 | "exclude": [ 11 | "node_modules" 12 | ] 13 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esm-cjs-converter", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "esm-cjs-converter", 9 | "version": "1.0.0", 10 | "dependencies": { 11 | "@babel/core": "^7.21.4" 12 | }, 13 | "devDependencies": {}, 14 | "engines": { 15 | "vscode": "^1.49.0" 16 | } 17 | }, 18 | "node_modules/@ampproject/remapping": { 19 | "version": "2.2.0", 20 | "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.2.0.tgz", 21 | "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", 22 | "dependencies": { 23 | "@jridgewell/gen-mapping": "^0.1.0", 24 | "@jridgewell/trace-mapping": "^0.3.9" 25 | }, 26 | "engines": { 27 | "node": ">=6.0.0" 28 | } 29 | }, 30 | "node_modules/@babel/code-frame": { 31 | "version": "7.21.4", 32 | "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.21.4.tgz", 33 | "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", 34 | "dependencies": { 35 | "@babel/highlight": "^7.18.6" 36 | }, 37 | "engines": { 38 | "node": ">=6.9.0" 39 | } 40 | }, 41 | "node_modules/@babel/compat-data": { 42 | "version": "7.21.4", 43 | "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.21.4.tgz", 44 | "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", 45 | "engines": { 46 | "node": ">=6.9.0" 47 | } 48 | }, 49 | "node_modules/@babel/core": { 50 | "version": "7.21.4", 51 | "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.21.4.tgz", 52 | "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", 53 | "dependencies": { 54 | "@ampproject/remapping": "^2.2.0", 55 | "@babel/code-frame": "^7.21.4", 56 | "@babel/generator": "^7.21.4", 57 | "@babel/helper-compilation-targets": "^7.21.4", 58 | "@babel/helper-module-transforms": "^7.21.2", 59 | "@babel/helpers": "^7.21.0", 60 | "@babel/parser": "^7.21.4", 61 | "@babel/template": "^7.20.7", 62 | "@babel/traverse": "^7.21.4", 63 | "@babel/types": "^7.21.4", 64 | "convert-source-map": "^1.7.0", 65 | "debug": "^4.1.0", 66 | "gensync": "^1.0.0-beta.2", 67 | "json5": "^2.2.2", 68 | "semver": "^6.3.0" 69 | }, 70 | "engines": { 71 | "node": ">=6.9.0" 72 | } 73 | }, 74 | "node_modules/@babel/core/node_modules/semver": { 75 | "version": "6.3.0", 76 | "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz", 77 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 78 | "bin": { 79 | "semver": "bin/semver.js" 80 | } 81 | }, 82 | "node_modules/@babel/generator": { 83 | "version": "7.21.4", 84 | "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.21.4.tgz", 85 | "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", 86 | "dependencies": { 87 | "@babel/types": "^7.21.4", 88 | "@jridgewell/gen-mapping": "^0.3.2", 89 | "@jridgewell/trace-mapping": "^0.3.17", 90 | "jsesc": "^2.5.1" 91 | }, 92 | "engines": { 93 | "node": ">=6.9.0" 94 | } 95 | }, 96 | "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { 97 | "version": "0.3.2", 98 | "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", 99 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", 100 | "dependencies": { 101 | "@jridgewell/set-array": "^1.0.1", 102 | "@jridgewell/sourcemap-codec": "^1.4.10", 103 | "@jridgewell/trace-mapping": "^0.3.9" 104 | }, 105 | "engines": { 106 | "node": ">=6.0.0" 107 | } 108 | }, 109 | "node_modules/@babel/helper-compilation-targets": { 110 | "version": "7.21.4", 111 | "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", 112 | "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", 113 | "dependencies": { 114 | "@babel/compat-data": "^7.21.4", 115 | "@babel/helper-validator-option": "^7.21.0", 116 | "browserslist": "^4.21.3", 117 | "lru-cache": "^5.1.1", 118 | "semver": "^6.3.0" 119 | }, 120 | "engines": { 121 | "node": ">=6.9.0" 122 | }, 123 | "peerDependencies": { 124 | "@babel/core": "^7.0.0" 125 | } 126 | }, 127 | "node_modules/@babel/helper-compilation-targets/node_modules/semver": { 128 | "version": "6.3.0", 129 | "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz", 130 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 131 | "bin": { 132 | "semver": "bin/semver.js" 133 | } 134 | }, 135 | "node_modules/@babel/helper-environment-visitor": { 136 | "version": "7.18.9", 137 | "resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", 138 | "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", 139 | "engines": { 140 | "node": ">=6.9.0" 141 | } 142 | }, 143 | "node_modules/@babel/helper-function-name": { 144 | "version": "7.21.0", 145 | "resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", 146 | "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", 147 | "dependencies": { 148 | "@babel/template": "^7.20.7", 149 | "@babel/types": "^7.21.0" 150 | }, 151 | "engines": { 152 | "node": ">=6.9.0" 153 | } 154 | }, 155 | "node_modules/@babel/helper-hoist-variables": { 156 | "version": "7.18.6", 157 | "resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", 158 | "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", 159 | "dependencies": { 160 | "@babel/types": "^7.18.6" 161 | }, 162 | "engines": { 163 | "node": ">=6.9.0" 164 | } 165 | }, 166 | "node_modules/@babel/helper-module-imports": { 167 | "version": "7.21.4", 168 | "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", 169 | "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", 170 | "dependencies": { 171 | "@babel/types": "^7.21.4" 172 | }, 173 | "engines": { 174 | "node": ">=6.9.0" 175 | } 176 | }, 177 | "node_modules/@babel/helper-module-transforms": { 178 | "version": "7.21.2", 179 | "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", 180 | "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", 181 | "dependencies": { 182 | "@babel/helper-environment-visitor": "^7.18.9", 183 | "@babel/helper-module-imports": "^7.18.6", 184 | "@babel/helper-simple-access": "^7.20.2", 185 | "@babel/helper-split-export-declaration": "^7.18.6", 186 | "@babel/helper-validator-identifier": "^7.19.1", 187 | "@babel/template": "^7.20.7", 188 | "@babel/traverse": "^7.21.2", 189 | "@babel/types": "^7.21.2" 190 | }, 191 | "engines": { 192 | "node": ">=6.9.0" 193 | } 194 | }, 195 | "node_modules/@babel/helper-simple-access": { 196 | "version": "7.20.2", 197 | "resolved": "https://registry.npmmirror.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", 198 | "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", 199 | "dependencies": { 200 | "@babel/types": "^7.20.2" 201 | }, 202 | "engines": { 203 | "node": ">=6.9.0" 204 | } 205 | }, 206 | "node_modules/@babel/helper-split-export-declaration": { 207 | "version": "7.18.6", 208 | "resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", 209 | "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", 210 | "dependencies": { 211 | "@babel/types": "^7.18.6" 212 | }, 213 | "engines": { 214 | "node": ">=6.9.0" 215 | } 216 | }, 217 | "node_modules/@babel/helper-string-parser": { 218 | "version": "7.19.4", 219 | "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", 220 | "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", 221 | "engines": { 222 | "node": ">=6.9.0" 223 | } 224 | }, 225 | "node_modules/@babel/helper-validator-identifier": { 226 | "version": "7.19.1", 227 | "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 228 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", 229 | "engines": { 230 | "node": ">=6.9.0" 231 | } 232 | }, 233 | "node_modules/@babel/helper-validator-option": { 234 | "version": "7.21.0", 235 | "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", 236 | "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", 237 | "engines": { 238 | "node": ">=6.9.0" 239 | } 240 | }, 241 | "node_modules/@babel/helpers": { 242 | "version": "7.21.0", 243 | "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.21.0.tgz", 244 | "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", 245 | "dependencies": { 246 | "@babel/template": "^7.20.7", 247 | "@babel/traverse": "^7.21.0", 248 | "@babel/types": "^7.21.0" 249 | }, 250 | "engines": { 251 | "node": ">=6.9.0" 252 | } 253 | }, 254 | "node_modules/@babel/highlight": { 255 | "version": "7.18.6", 256 | "resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.18.6.tgz", 257 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 258 | "dependencies": { 259 | "@babel/helper-validator-identifier": "^7.18.6", 260 | "chalk": "^2.0.0", 261 | "js-tokens": "^4.0.0" 262 | }, 263 | "engines": { 264 | "node": ">=6.9.0" 265 | } 266 | }, 267 | "node_modules/@babel/highlight/node_modules/chalk": { 268 | "version": "2.4.2", 269 | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", 270 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 271 | "dependencies": { 272 | "ansi-styles": "^3.2.1", 273 | "escape-string-regexp": "^1.0.5", 274 | "supports-color": "^5.3.0" 275 | }, 276 | "engines": { 277 | "node": ">=4" 278 | } 279 | }, 280 | "node_modules/@babel/parser": { 281 | "version": "7.21.4", 282 | "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.4.tgz", 283 | "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", 284 | "bin": { 285 | "parser": "bin/babel-parser.js" 286 | }, 287 | "engines": { 288 | "node": ">=6.0.0" 289 | } 290 | }, 291 | "node_modules/@babel/template": { 292 | "version": "7.20.7", 293 | "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.20.7.tgz", 294 | "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", 295 | "dependencies": { 296 | "@babel/code-frame": "^7.18.6", 297 | "@babel/parser": "^7.20.7", 298 | "@babel/types": "^7.20.7" 299 | }, 300 | "engines": { 301 | "node": ">=6.9.0" 302 | } 303 | }, 304 | "node_modules/@babel/traverse": { 305 | "version": "7.21.4", 306 | "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.21.4.tgz", 307 | "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", 308 | "dependencies": { 309 | "@babel/code-frame": "^7.21.4", 310 | "@babel/generator": "^7.21.4", 311 | "@babel/helper-environment-visitor": "^7.18.9", 312 | "@babel/helper-function-name": "^7.21.0", 313 | "@babel/helper-hoist-variables": "^7.18.6", 314 | "@babel/helper-split-export-declaration": "^7.18.6", 315 | "@babel/parser": "^7.21.4", 316 | "@babel/types": "^7.21.4", 317 | "debug": "^4.1.0", 318 | "globals": "^11.1.0" 319 | }, 320 | "engines": { 321 | "node": ">=6.9.0" 322 | } 323 | }, 324 | "node_modules/@babel/traverse/node_modules/globals": { 325 | "version": "11.12.0", 326 | "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", 327 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 328 | "engines": { 329 | "node": ">=4" 330 | } 331 | }, 332 | "node_modules/@babel/types": { 333 | "version": "7.21.4", 334 | "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.21.4.tgz", 335 | "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", 336 | "dependencies": { 337 | "@babel/helper-string-parser": "^7.19.4", 338 | "@babel/helper-validator-identifier": "^7.19.1", 339 | "to-fast-properties": "^2.0.0" 340 | }, 341 | "engines": { 342 | "node": ">=6.9.0" 343 | } 344 | }, 345 | "node_modules/@jridgewell/gen-mapping": { 346 | "version": "0.1.1", 347 | "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", 348 | "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", 349 | "dependencies": { 350 | "@jridgewell/set-array": "^1.0.0", 351 | "@jridgewell/sourcemap-codec": "^1.4.10" 352 | }, 353 | "engines": { 354 | "node": ">=6.0.0" 355 | } 356 | }, 357 | "node_modules/@jridgewell/resolve-uri": { 358 | "version": "3.1.0", 359 | "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 360 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 361 | "engines": { 362 | "node": ">=6.0.0" 363 | } 364 | }, 365 | "node_modules/@jridgewell/set-array": { 366 | "version": "1.1.2", 367 | "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.1.2.tgz", 368 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", 369 | "engines": { 370 | "node": ">=6.0.0" 371 | } 372 | }, 373 | "node_modules/@jridgewell/sourcemap-codec": { 374 | "version": "1.4.14", 375 | "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 376 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" 377 | }, 378 | "node_modules/@jridgewell/trace-mapping": { 379 | "version": "0.3.17", 380 | "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", 381 | "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", 382 | "dependencies": { 383 | "@jridgewell/resolve-uri": "3.1.0", 384 | "@jridgewell/sourcemap-codec": "1.4.14" 385 | } 386 | }, 387 | "node_modules/ansi-styles": { 388 | "version": "3.2.1", 389 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 390 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 391 | "dependencies": { 392 | "color-convert": "^1.9.0" 393 | }, 394 | "engines": { 395 | "node": ">=4" 396 | } 397 | }, 398 | "node_modules/browserslist": { 399 | "version": "4.21.5", 400 | "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.5.tgz", 401 | "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", 402 | "dependencies": { 403 | "caniuse-lite": "^1.0.30001449", 404 | "electron-to-chromium": "^1.4.284", 405 | "node-releases": "^2.0.8", 406 | "update-browserslist-db": "^1.0.10" 407 | }, 408 | "bin": { 409 | "browserslist": "cli.js" 410 | }, 411 | "engines": { 412 | "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" 413 | } 414 | }, 415 | "node_modules/caniuse-lite": { 416 | "version": "1.0.30001474", 417 | "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz", 418 | "integrity": "sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q==" 419 | }, 420 | "node_modules/color-convert": { 421 | "version": "1.9.3", 422 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 423 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 424 | "dependencies": { 425 | "color-name": "1.1.3" 426 | } 427 | }, 428 | "node_modules/color-name": { 429 | "version": "1.1.3", 430 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 431 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 432 | }, 433 | "node_modules/convert-source-map": { 434 | "version": "1.8.0", 435 | "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-1.8.0.tgz", 436 | "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", 437 | "dependencies": { 438 | "safe-buffer": "~5.1.1" 439 | } 440 | }, 441 | "node_modules/convert-source-map/node_modules/safe-buffer": { 442 | "version": "5.1.2", 443 | "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", 444 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 445 | }, 446 | "node_modules/debug": { 447 | "version": "4.2.0", 448 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", 449 | "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", 450 | "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", 451 | "dependencies": { 452 | "ms": "2.1.2" 453 | }, 454 | "engines": { 455 | "node": ">=6.0" 456 | }, 457 | "peerDependenciesMeta": { 458 | "supports-color": { 459 | "optional": true 460 | } 461 | } 462 | }, 463 | "node_modules/electron-to-chromium": { 464 | "version": "1.4.355", 465 | "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.355.tgz", 466 | "integrity": "sha512-056hxzEE4l667YeOccgjhRr5fTiwZ6EIJ4FpzGps4k3YcS8iAhiaBYUBrv5E2LDQJsussscv9EEUwAYKnv+ZKg==" 467 | }, 468 | "node_modules/escalade": { 469 | "version": "3.1.1", 470 | "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz", 471 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 472 | "engines": { 473 | "node": ">=6" 474 | } 475 | }, 476 | "node_modules/escape-string-regexp": { 477 | "version": "1.0.5", 478 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 479 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 480 | "engines": { 481 | "node": ">=0.8.0" 482 | } 483 | }, 484 | "node_modules/gensync": { 485 | "version": "1.0.0-beta.2", 486 | "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", 487 | "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", 488 | "engines": { 489 | "node": ">=6.9.0" 490 | } 491 | }, 492 | "node_modules/has-flag": { 493 | "version": "3.0.0", 494 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 495 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 496 | "engines": { 497 | "node": ">=4" 498 | } 499 | }, 500 | "node_modules/js-tokens": { 501 | "version": "4.0.0", 502 | "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", 503 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 504 | }, 505 | "node_modules/jsesc": { 506 | "version": "2.5.2", 507 | "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz", 508 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", 509 | "bin": { 510 | "jsesc": "bin/jsesc" 511 | }, 512 | "engines": { 513 | "node": ">=4" 514 | } 515 | }, 516 | "node_modules/json5": { 517 | "version": "2.2.3", 518 | "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", 519 | "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", 520 | "bin": { 521 | "json5": "lib/cli.js" 522 | }, 523 | "engines": { 524 | "node": ">=6" 525 | } 526 | }, 527 | "node_modules/lru-cache": { 528 | "version": "5.1.1", 529 | "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", 530 | "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", 531 | "dependencies": { 532 | "yallist": "^3.0.2" 533 | } 534 | }, 535 | "node_modules/ms": { 536 | "version": "2.1.2", 537 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 538 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 539 | }, 540 | "node_modules/node-releases": { 541 | "version": "2.0.10", 542 | "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.10.tgz", 543 | "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" 544 | }, 545 | "node_modules/picocolors": { 546 | "version": "1.0.0", 547 | "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", 548 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" 549 | }, 550 | "node_modules/supports-color": { 551 | "version": "5.5.0", 552 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 553 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 554 | "dependencies": { 555 | "has-flag": "^3.0.0" 556 | }, 557 | "engines": { 558 | "node": ">=4" 559 | } 560 | }, 561 | "node_modules/to-fast-properties": { 562 | "version": "2.0.0", 563 | "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 564 | "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", 565 | "engines": { 566 | "node": ">=4" 567 | } 568 | }, 569 | "node_modules/update-browserslist-db": { 570 | "version": "1.0.10", 571 | "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", 572 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", 573 | "dependencies": { 574 | "escalade": "^3.1.1", 575 | "picocolors": "^1.0.0" 576 | }, 577 | "bin": { 578 | "browserslist-lint": "cli.js" 579 | }, 580 | "peerDependencies": { 581 | "browserslist": ">= 4.21.0" 582 | } 583 | }, 584 | "node_modules/yallist": { 585 | "version": "3.1.1", 586 | "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", 587 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" 588 | } 589 | }, 590 | "dependencies": { 591 | "@ampproject/remapping": { 592 | "version": "2.2.0", 593 | "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.2.0.tgz", 594 | "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", 595 | "requires": { 596 | "@jridgewell/gen-mapping": "^0.1.0", 597 | "@jridgewell/trace-mapping": "^0.3.9" 598 | } 599 | }, 600 | "@babel/code-frame": { 601 | "version": "7.21.4", 602 | "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.21.4.tgz", 603 | "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", 604 | "requires": { 605 | "@babel/highlight": "^7.18.6" 606 | } 607 | }, 608 | "@babel/compat-data": { 609 | "version": "7.21.4", 610 | "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.21.4.tgz", 611 | "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==" 612 | }, 613 | "@babel/core": { 614 | "version": "7.21.4", 615 | "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.21.4.tgz", 616 | "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", 617 | "requires": { 618 | "@ampproject/remapping": "^2.2.0", 619 | "@babel/code-frame": "^7.21.4", 620 | "@babel/generator": "^7.21.4", 621 | "@babel/helper-compilation-targets": "^7.21.4", 622 | "@babel/helper-module-transforms": "^7.21.2", 623 | "@babel/helpers": "^7.21.0", 624 | "@babel/parser": "^7.21.4", 625 | "@babel/template": "^7.20.7", 626 | "@babel/traverse": "^7.21.4", 627 | "@babel/types": "^7.21.4", 628 | "convert-source-map": "^1.7.0", 629 | "debug": "^4.1.0", 630 | "gensync": "^1.0.0-beta.2", 631 | "json5": "^2.2.2", 632 | "semver": "^6.3.0" 633 | }, 634 | "dependencies": { 635 | "semver": { 636 | "version": "6.3.0", 637 | "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz", 638 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 639 | } 640 | } 641 | }, 642 | "@babel/generator": { 643 | "version": "7.21.4", 644 | "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.21.4.tgz", 645 | "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", 646 | "requires": { 647 | "@babel/types": "^7.21.4", 648 | "@jridgewell/gen-mapping": "^0.3.2", 649 | "@jridgewell/trace-mapping": "^0.3.17", 650 | "jsesc": "^2.5.1" 651 | }, 652 | "dependencies": { 653 | "@jridgewell/gen-mapping": { 654 | "version": "0.3.2", 655 | "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", 656 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", 657 | "requires": { 658 | "@jridgewell/set-array": "^1.0.1", 659 | "@jridgewell/sourcemap-codec": "^1.4.10", 660 | "@jridgewell/trace-mapping": "^0.3.9" 661 | } 662 | } 663 | } 664 | }, 665 | "@babel/helper-compilation-targets": { 666 | "version": "7.21.4", 667 | "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", 668 | "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", 669 | "requires": { 670 | "@babel/compat-data": "^7.21.4", 671 | "@babel/helper-validator-option": "^7.21.0", 672 | "browserslist": "^4.21.3", 673 | "lru-cache": "^5.1.1", 674 | "semver": "^6.3.0" 675 | }, 676 | "dependencies": { 677 | "semver": { 678 | "version": "6.3.0", 679 | "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.0.tgz", 680 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 681 | } 682 | } 683 | }, 684 | "@babel/helper-environment-visitor": { 685 | "version": "7.18.9", 686 | "resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", 687 | "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" 688 | }, 689 | "@babel/helper-function-name": { 690 | "version": "7.21.0", 691 | "resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", 692 | "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", 693 | "requires": { 694 | "@babel/template": "^7.20.7", 695 | "@babel/types": "^7.21.0" 696 | } 697 | }, 698 | "@babel/helper-hoist-variables": { 699 | "version": "7.18.6", 700 | "resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", 701 | "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", 702 | "requires": { 703 | "@babel/types": "^7.18.6" 704 | } 705 | }, 706 | "@babel/helper-module-imports": { 707 | "version": "7.21.4", 708 | "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", 709 | "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", 710 | "requires": { 711 | "@babel/types": "^7.21.4" 712 | } 713 | }, 714 | "@babel/helper-module-transforms": { 715 | "version": "7.21.2", 716 | "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", 717 | "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", 718 | "requires": { 719 | "@babel/helper-environment-visitor": "^7.18.9", 720 | "@babel/helper-module-imports": "^7.18.6", 721 | "@babel/helper-simple-access": "^7.20.2", 722 | "@babel/helper-split-export-declaration": "^7.18.6", 723 | "@babel/helper-validator-identifier": "^7.19.1", 724 | "@babel/template": "^7.20.7", 725 | "@babel/traverse": "^7.21.2", 726 | "@babel/types": "^7.21.2" 727 | } 728 | }, 729 | "@babel/helper-simple-access": { 730 | "version": "7.20.2", 731 | "resolved": "https://registry.npmmirror.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", 732 | "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", 733 | "requires": { 734 | "@babel/types": "^7.20.2" 735 | } 736 | }, 737 | "@babel/helper-split-export-declaration": { 738 | "version": "7.18.6", 739 | "resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", 740 | "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", 741 | "requires": { 742 | "@babel/types": "^7.18.6" 743 | } 744 | }, 745 | "@babel/helper-string-parser": { 746 | "version": "7.19.4", 747 | "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", 748 | "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==" 749 | }, 750 | "@babel/helper-validator-identifier": { 751 | "version": "7.19.1", 752 | "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 753 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" 754 | }, 755 | "@babel/helper-validator-option": { 756 | "version": "7.21.0", 757 | "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", 758 | "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==" 759 | }, 760 | "@babel/helpers": { 761 | "version": "7.21.0", 762 | "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.21.0.tgz", 763 | "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", 764 | "requires": { 765 | "@babel/template": "^7.20.7", 766 | "@babel/traverse": "^7.21.0", 767 | "@babel/types": "^7.21.0" 768 | } 769 | }, 770 | "@babel/highlight": { 771 | "version": "7.18.6", 772 | "resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.18.6.tgz", 773 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 774 | "requires": { 775 | "@babel/helper-validator-identifier": "^7.18.6", 776 | "chalk": "^2.0.0", 777 | "js-tokens": "^4.0.0" 778 | }, 779 | "dependencies": { 780 | "chalk": { 781 | "version": "2.4.2", 782 | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", 783 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 784 | "requires": { 785 | "ansi-styles": "^3.2.1", 786 | "escape-string-regexp": "^1.0.5", 787 | "supports-color": "^5.3.0" 788 | } 789 | } 790 | } 791 | }, 792 | "@babel/parser": { 793 | "version": "7.21.4", 794 | "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.4.tgz", 795 | "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==" 796 | }, 797 | "@babel/template": { 798 | "version": "7.20.7", 799 | "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.20.7.tgz", 800 | "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", 801 | "requires": { 802 | "@babel/code-frame": "^7.18.6", 803 | "@babel/parser": "^7.20.7", 804 | "@babel/types": "^7.20.7" 805 | } 806 | }, 807 | "@babel/traverse": { 808 | "version": "7.21.4", 809 | "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.21.4.tgz", 810 | "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", 811 | "requires": { 812 | "@babel/code-frame": "^7.21.4", 813 | "@babel/generator": "^7.21.4", 814 | "@babel/helper-environment-visitor": "^7.18.9", 815 | "@babel/helper-function-name": "^7.21.0", 816 | "@babel/helper-hoist-variables": "^7.18.6", 817 | "@babel/helper-split-export-declaration": "^7.18.6", 818 | "@babel/parser": "^7.21.4", 819 | "@babel/types": "^7.21.4", 820 | "debug": "^4.1.0", 821 | "globals": "^11.1.0" 822 | }, 823 | "dependencies": { 824 | "globals": { 825 | "version": "11.12.0", 826 | "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", 827 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" 828 | } 829 | } 830 | }, 831 | "@babel/types": { 832 | "version": "7.21.4", 833 | "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.21.4.tgz", 834 | "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", 835 | "requires": { 836 | "@babel/helper-string-parser": "^7.19.4", 837 | "@babel/helper-validator-identifier": "^7.19.1", 838 | "to-fast-properties": "^2.0.0" 839 | } 840 | }, 841 | "@jridgewell/gen-mapping": { 842 | "version": "0.1.1", 843 | "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", 844 | "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", 845 | "requires": { 846 | "@jridgewell/set-array": "^1.0.0", 847 | "@jridgewell/sourcemap-codec": "^1.4.10" 848 | } 849 | }, 850 | "@jridgewell/resolve-uri": { 851 | "version": "3.1.0", 852 | "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 853 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" 854 | }, 855 | "@jridgewell/set-array": { 856 | "version": "1.1.2", 857 | "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.1.2.tgz", 858 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" 859 | }, 860 | "@jridgewell/sourcemap-codec": { 861 | "version": "1.4.14", 862 | "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 863 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" 864 | }, 865 | "@jridgewell/trace-mapping": { 866 | "version": "0.3.17", 867 | "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", 868 | "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", 869 | "requires": { 870 | "@jridgewell/resolve-uri": "3.1.0", 871 | "@jridgewell/sourcemap-codec": "1.4.14" 872 | } 873 | }, 874 | "ansi-styles": { 875 | "version": "3.2.1", 876 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 877 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 878 | "requires": { 879 | "color-convert": "^1.9.0" 880 | } 881 | }, 882 | "browserslist": { 883 | "version": "4.21.5", 884 | "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.5.tgz", 885 | "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", 886 | "requires": { 887 | "caniuse-lite": "^1.0.30001449", 888 | "electron-to-chromium": "^1.4.284", 889 | "node-releases": "^2.0.8", 890 | "update-browserslist-db": "^1.0.10" 891 | } 892 | }, 893 | "caniuse-lite": { 894 | "version": "1.0.30001474", 895 | "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz", 896 | "integrity": "sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q==" 897 | }, 898 | "color-convert": { 899 | "version": "1.9.3", 900 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 901 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 902 | "requires": { 903 | "color-name": "1.1.3" 904 | } 905 | }, 906 | "color-name": { 907 | "version": "1.1.3", 908 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 909 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 910 | }, 911 | "convert-source-map": { 912 | "version": "1.8.0", 913 | "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-1.8.0.tgz", 914 | "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", 915 | "requires": { 916 | "safe-buffer": "~5.1.1" 917 | }, 918 | "dependencies": { 919 | "safe-buffer": { 920 | "version": "5.1.2", 921 | "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", 922 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 923 | } 924 | } 925 | }, 926 | "debug": { 927 | "version": "4.2.0", 928 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", 929 | "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", 930 | "requires": { 931 | "ms": "2.1.2" 932 | } 933 | }, 934 | "electron-to-chromium": { 935 | "version": "1.4.355", 936 | "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.355.tgz", 937 | "integrity": "sha512-056hxzEE4l667YeOccgjhRr5fTiwZ6EIJ4FpzGps4k3YcS8iAhiaBYUBrv5E2LDQJsussscv9EEUwAYKnv+ZKg==" 938 | }, 939 | "escalade": { 940 | "version": "3.1.1", 941 | "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz", 942 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" 943 | }, 944 | "escape-string-regexp": { 945 | "version": "1.0.5", 946 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 947 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 948 | }, 949 | "gensync": { 950 | "version": "1.0.0-beta.2", 951 | "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", 952 | "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" 953 | }, 954 | "has-flag": { 955 | "version": "3.0.0", 956 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 957 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 958 | }, 959 | "js-tokens": { 960 | "version": "4.0.0", 961 | "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", 962 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 963 | }, 964 | "jsesc": { 965 | "version": "2.5.2", 966 | "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz", 967 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" 968 | }, 969 | "json5": { 970 | "version": "2.2.3", 971 | "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", 972 | "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" 973 | }, 974 | "lru-cache": { 975 | "version": "5.1.1", 976 | "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", 977 | "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", 978 | "requires": { 979 | "yallist": "^3.0.2" 980 | } 981 | }, 982 | "ms": { 983 | "version": "2.1.2", 984 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 985 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 986 | }, 987 | "node-releases": { 988 | "version": "2.0.10", 989 | "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.10.tgz", 990 | "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" 991 | }, 992 | "picocolors": { 993 | "version": "1.0.0", 994 | "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", 995 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" 996 | }, 997 | "supports-color": { 998 | "version": "5.5.0", 999 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1000 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1001 | "requires": { 1002 | "has-flag": "^3.0.0" 1003 | } 1004 | }, 1005 | "to-fast-properties": { 1006 | "version": "2.0.0", 1007 | "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 1008 | "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" 1009 | }, 1010 | "update-browserslist-db": { 1011 | "version": "1.0.10", 1012 | "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", 1013 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", 1014 | "requires": { 1015 | "escalade": "^3.1.1", 1016 | "picocolors": "^1.0.0" 1017 | } 1018 | }, 1019 | "yallist": { 1020 | "version": "3.1.1", 1021 | "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", 1022 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" 1023 | } 1024 | } 1025 | } 1026 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esm-cjs-converter", 3 | "displayName": "esm-cjs-converter", 4 | "description": "Convert ES modules to CommonJS, or convert CommonJS to ES modules.", 5 | "keywords": [ 6 | "esmodule", 7 | "commonjs", 8 | "module", 9 | "transform", 10 | "conversion", 11 | "esm", 12 | "cjs", 13 | "javascript", 14 | "bundler", 15 | "import", 16 | "export", 17 | "interop" 18 | ], 19 | "version": "1.0.6", 20 | "publisher": "zhang-renyang", 21 | "icon": "images/icon.png", 22 | "repository": "https://github.com/zhangrenyang/esm-cjs-converter", 23 | "engines": { 24 | "vscode": "^1.49.0" 25 | }, 26 | "categories": [ 27 | "Formatters" 28 | ], 29 | "main": "./extension.js", 30 | "activationEvents": [ 31 | "onCommand:extension.esmoduleToCommonjs", 32 | "onCommand:extension.commonjsToEsmodule" 33 | ], 34 | "contributes": { 35 | "commands": [ 36 | { 37 | "command": "extension.esmoduleToCommonjs", 38 | "title": "esmoduleToCommonjs" 39 | }, 40 | { 41 | "command": "extension.commonjsToEsmodule", 42 | "title": "commonjsToEsmodule" 43 | } 44 | ], 45 | "keybindings": [ 46 | { 47 | "command": "extension.esmoduleToCommonjs", 48 | "key": "ctrl+f11", 49 | "mac": "cmd+f11", 50 | "when": "editorTextFocus" 51 | }, 52 | { 53 | "command": "extension.commonjsToEsmodule", 54 | "key": "ctrl+f12", 55 | "mac": "cmd+f12", 56 | "when": "commonjsToEsmodule" 57 | } 58 | ], 59 | "menus": { 60 | "editor/context": [ 61 | { 62 | "when": "editorFocus", 63 | "command": "extension.esmoduleToCommonjs", 64 | "group": "navigation" 65 | }, 66 | { 67 | "when": "editorFocus", 68 | "command": "extension.commonjsToEsmodule", 69 | "group": "navigation" 70 | } 71 | ] 72 | } 73 | }, 74 | "scripts": {}, 75 | "dependencies": { 76 | "@babel/core": "^7.21.4" 77 | } 78 | } -------------------------------------------------------------------------------- /plugins/cjs-esm-plugin.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function (babel) { 3 | const { types: t } = babel; 4 | return { 5 | name: "cjs-to-esm", 6 | visitor: { 7 | CallExpression(path) { 8 | if (t.isIdentifier(path.node.callee, { name: "require" })) { 9 | if (path.parentPath.node.type === "VariableDeclarator") { 10 | let newNode; 11 | if (t.isObjectPattern(path.parentPath.node.id)) { 12 | newNode = t.importDeclaration( 13 | path.parentPath.node.id.properties.map((item) => { 14 | return t.importSpecifier( 15 | t.identifier(item.key.name), 16 | t.identifier(item.value.name) 17 | ); 18 | }), 19 | t.stringLiteral(path.node.arguments[0].value) 20 | ); 21 | path.parentPath.replaceWith(newNode); 22 | } else { 23 | newNode = t.importDeclaration( 24 | [ 25 | t.importDefaultSpecifier( 26 | t.identifier(path.parentPath.node.id.name) 27 | ), 28 | ], 29 | t.stringLiteral(path.node.arguments[0].value) 30 | ); 31 | path.parentPath.replaceWith(newNode); 32 | } 33 | } 34 | if (path.parentPath.node.type === "VariableDeclaration") { 35 | const newNode = t.importDeclaration( 36 | [ 37 | t.importDefaultSpecifier( 38 | t.identifier(path.parentPath.node.declarations[0].id.name) 39 | ), 40 | ], 41 | t.stringLiteral(path.node.arguments[0].value) 42 | ); 43 | path.parentPath.replaceWith(newNode); 44 | } 45 | if (path.parentPath.node.type === "ObjectProperty") { 46 | const newNode = t.importDeclaration( 47 | [ 48 | t.importDefaultSpecifier( 49 | t.identifier(path.parentPath.node.key.name) 50 | ), 51 | ], 52 | t.stringLiteral(path.node.arguments[0].value) 53 | ); 54 | path.parentPath.replaceWith(newNode); 55 | } 56 | if (path.parentPath.node.type === "ObjectExpression") { 57 | const newNode = t.importDeclaration( 58 | [ 59 | t.importDefaultSpecifier( 60 | t.identifier(path.parentPath.node.properties[0].key.name) 61 | ), 62 | ], 63 | t.stringLiteral(path.node.arguments[0].value) 64 | ); 65 | path.parentPath.replaceWith(newNode); 66 | } 67 | if (path.parentPath.node.type === "CallExpression") { 68 | const newNode = t.importDeclaration( 69 | [ 70 | t.importDefaultSpecifier( 71 | t.identifier(path.parentPath.node.arguments[0].name) 72 | ), 73 | ], 74 | t.stringLiteral(path.node.arguments[0].value) 75 | ); 76 | path.parentPath.replaceWith(newNode); 77 | } 78 | //删除最左则的const或var,但是要保留 import语句 79 | if (path.parentPath.parentPath.node.type === "VariableDeclaration") { 80 | path.parentPath.parentPath.replaceWith(path.parentPath.node); 81 | } 82 | } 83 | }, 84 | AssignmentExpression(path) { 85 | if ( 86 | t.isMemberExpression(path.node.left) && 87 | t.isIdentifier(path.node.left.object, { name: "module" }) && 88 | t.isIdentifier(path.node.left.property, { name: "exports" }) 89 | ) { 90 | const newNode = t.exportDefaultDeclaration(path.node.right); 91 | path.parentPath.replaceWith(newNode); 92 | } else if ( 93 | t.isMemberExpression(path.node.left) && 94 | t.isIdentifier(path.node.left.object, { name: "exports" }) 95 | ) { 96 | //如果path.node.right是一个Identifier,那么就是exports.a = a;这种情况 97 | if (t.isIdentifier(path.node.right)) { 98 | const newNode = t.exportNamedDeclaration( 99 | null, 100 | [t.exportSpecifier(t.identifier(path.node.left.property.name), t.identifier(path.node.left.property.name))], 101 | null 102 | ); 103 | path.parentPath.replaceWith(newNode); 104 | } else { 105 | //如果path.node.right是一个值,那么就是exports.a = 1;这种情况 106 | const newNode = t.variableDeclaration("let", [ 107 | t.variableDeclarator( 108 | t.identifier(path.node.left.property.name), 109 | path.node.right 110 | ), 111 | ]); 112 | path.parentPath.replaceWith(newNode); 113 | const newNode2 = t.exportNamedDeclaration( 114 | null, 115 | [t.exportSpecifier(t.identifier(path.node.left.property.name), t.identifier(path.node.left.property.name))], 116 | null 117 | ); 118 | path.insertAfter(newNode2); 119 | } 120 | } 121 | }, 122 | }, 123 | }; 124 | }; 125 | -------------------------------------------------------------------------------- /plugins/esm-cjs-plugin.js: -------------------------------------------------------------------------------- 1 | module.exports = function (babel) { 2 | const { types: t } = babel; 3 | return { 4 | name: "esm-to-cjs", 5 | visitor: { 6 | ImportDeclaration(path) { 7 | const { node } = path; 8 | const specifiers = node.specifiers; 9 | const source = node.source; 10 | if (t.isImportDefaultSpecifier(specifiers[0])) { 11 | const newNode = t.variableDeclaration("const", [t.variableDeclarator(t.identifier(specifiers[0].local.name), t.callExpression(t.identifier("require"), [source]))]); 12 | path.replaceWith(newNode); 13 | } else { 14 | const newNode = t.variableDeclaration("const", [t.variableDeclarator(t.objectPattern( 15 | specifiers.map(item => t.objectProperty(t.identifier(item.local.name), t.identifier(item.local.name), false, true))) 16 | , t.callExpression(t.identifier("require"), [source]))]); 17 | path.replaceWith(newNode); 18 | } 19 | }, 20 | ExportNamedDeclaration(path) { 21 | const { node } = path; 22 | if (node.declaration) { 23 | if (t.isVariableDeclaration(node.declaration)) { 24 | const newNodes = []; 25 | for (let i = 0; i < node.declaration.declarations.length; i++) { 26 | const newNode = t.expressionStatement( 27 | t.assignmentExpression("=", 28 | t.memberExpression(t.identifier("exports"), 29 | node.declaration.declarations[i].id), 30 | node.declaration.declarations[i].init)); 31 | newNodes.push(newNode); 32 | } 33 | path.replaceWithMultiple(newNodes); 34 | } 35 | } else { 36 | if (node.specifiers.length > 0) { 37 | const newNodes = []; 38 | for (let i = 0; i < node.specifiers.length; i++) { 39 | const newNode = t.expressionStatement( 40 | t.assignmentExpression("=", 41 | t.memberExpression(t.identifier("exports"), 42 | node.specifiers[i].exported), 43 | node.specifiers[i].local)); 44 | newNodes.push(newNode); 45 | } 46 | path.replaceWithMultiple(newNodes); 47 | } 48 | } 49 | }, 50 | ExportDefaultDeclaration(path) { 51 | const { node } = path; 52 | if (t.isIdentifier(node.declaration)) { 53 | const newNode = t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports")), node.declaration)); 54 | path.replaceWith(newNode); 55 | } else { 56 | if (t.isFunctionDeclaration(node.declaration)) { 57 | const newNode = t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports")), t.functionExpression(null, node.declaration.params, node.declaration.body, node.declaration.generator, node.declaration.async))); 58 | path.replaceWith(newNode); 59 | } else if (t.isClassDeclaration(node.declaration)) { 60 | const newNode = t.expressionStatement( 61 | t.assignmentExpression("=", 62 | t.memberExpression( 63 | t.identifier("module"), t.identifier("exports")), 64 | t.classExpression(node.declaration.id, 65 | node.declaration.superClass, 66 | node.declaration.body, node.declaration.decorators 67 | ))); 68 | path.replaceWith(newNode); 69 | } else { 70 | const newNode = t.expressionStatement( 71 | t.assignmentExpression("=", 72 | t.memberExpression(t.identifier("module"), t.identifier("exports")), 73 | node.declaration)); 74 | path.replaceWith(newNode); 75 | } 76 | } 77 | } 78 | } 79 | }; 80 | }; --------------------------------------------------------------------------------