diff --git a/README.md b/README.md index 43f6872..6b5237c 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Simply create a `jest.config.js` file in the root of your project, and extend th ```js // ./jest.config.js module.exports = { - preset: "@stoplight/scripts" + preset: "@stoplight/scripts", }; ``` @@ -187,3 +187,17 @@ Simply add a `release` property to your `package.json` file. For example: // ... props } ``` + +## Rollup + +By default all `dependencies` and `peerDependencies` declared in your `package.json` will be treated as external deps during `sl-scripts bundle`. If you would like to always bundle a dep, list those deps in your `package.json` file like so: + +```json +{ + "name": "your-package", + "version": "0.0.0", + "rollup": { + "bundleDeps": ["dep-1", "dep-2"] + } +} +``` diff --git a/package.json b/package.json index 82964eb..8cc9e6c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "/bin", "/dist", "/templates", + "/vendor", "/npm-shrinkwrap.json", "/oclif.manifest.json", "release.js", @@ -93,6 +94,8 @@ "@oclif/plugin-help": "2.2.3", "@rollup/plugin-commonjs": "^19.0.0", "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.0.6", + "@rollup/pluginutils": "4.x", "@semantic-release/commit-analyzer": "8.0.1", "@semantic-release/git": "9.0.0", "@semantic-release/github": "7.0.3", @@ -102,10 +105,12 @@ "commitizen": "4.0.3", "cz-conventional-changelog": "3.1.x", "esm": "^3.2.25", + "estree-walker": "2.x", "find-up": "^4.1.0", "husky": "4.2.3", "inquirer": "7.0.4", "lint-staged": "10.0.7", + "magic-string": "0.25.x", "rimraf": "3.0.2", "rollup": "^2.47.0", "rollup-plugin-terser": "^7.0.2", diff --git a/rollup.config.js b/rollup.config.js index 7c15388..d6cf584 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,6 +5,9 @@ const commonjs = require('@rollup/plugin-commonjs'); const json = require('@rollup/plugin-json'); const path = require('path'); const fs = require('fs'); +const { nodeResolve } = require('@rollup/plugin-node-resolve'); + +const { optimizeLodashImports } = require('./vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js'); const BASE_PATH = process.cwd(); @@ -23,6 +26,9 @@ const plugins = () => tsconfig: getConfigFile('tsconfig.build.json'), useTsconfigDeclarationDir: true, }), + nodeResolve(), + commonjs(), + optimizeLodashImports(), process.env.MINIFY ? terser() : null, ].filter(Boolean); @@ -31,7 +37,15 @@ const dependencies = [ ...Object.keys(packageJson.dependencies || {}), ...Object.keys(packageJson.peerDependencies || {}), ]; -const external = module => dependencies.some(dep => module === dep || module.startsWith(`${dep}/`)); +const rollupConfig = packageJson.rollup || {}; +const alwaysInclude = rollupConfig.bundleDeps || []; + +const external = module => { + const isDefaultExternal = dependencies.some(dep => module === dep || module.startsWith(`${dep}/`)); + const forceBundle = alwaysInclude.some(dep => module === dep || module.startsWith(`${dep}/`)); + + return isDefaultExternal && !forceBundle; +}; module.exports = [ { @@ -41,7 +55,7 @@ module.exports = [ dir: path.resolve(BASE_PATH, 'dist'), format: 'cjs', }, - plugins: [json(), commonjs(), ...plugins()], + plugins: [json(), ...plugins()], external }, { diff --git a/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts new file mode 100644 index 0000000..da08e6c --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts @@ -0,0 +1,40 @@ +import type { Plugin } from "rollup"; +import { FilterPattern } from "@rollup/pluginutils"; +export declare type OptimizeLodashOptions = { + /** + * A minimatch pattern, or array of patterns, of files that should be + * processed by this plugin (if omitted, all files are included by default) + */ + include?: FilterPattern; + /** + * Files that should be excluded, if `include` is otherwise too permissive. + */ + exclude?: FilterPattern; + /** + * Changes *all* lodash imports (but not lodash/fp imports!) to 'lodash-es' imports. + * Don't use this for CommonJS outputs, the plugin will error should you do so. + */ + useLodashEs?: true; +}; +/** + * Converts lodash imports to be specific, enabling better tree-shaking: + * + * `import { isNil } from "lodash";` -> `import { isNil } from "lodash/isNil";` + * + * Note that only specific named imports are supported, unlike babel-plugin-lodash. For example, + * this plugin will print a warning for this import and make no changes to the import: + * + * `import _ from "lodash";` + * + * Optionally, set `useLodashEs` to true and `lodash` imports will be converted to `lodash-es` + * imports. Note that it's up to user to include the `lodash-es` module and ensure the output + * is set to some form of `es` (other output formats will error). An example: + * + * `import { isNil } from "lodash";` -> `import { isNil } from "lodash-es";` + * + * @param include files/globs to include with this plugin (optional) + * @param exclude files/globs to exclude from this plugin (optional) + * @param useLodashEs set `true` to convert imports to use "lodash-es" (optional; default false) + */ +export declare function optimizeLodashImports({ include, exclude, useLodashEs, }?: OptimizeLodashOptions): Plugin & Required>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts.map b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts.map new file mode 100644 index 0000000..d70fa5c --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGlE,oBAAY,qBAAqB,GAAG;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB,CAAC;AAIF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,OAAO,EACP,WAAW,GACZ,GAAE,qBAA0B,GAAG,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CA2B3E"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js new file mode 100644 index 0000000..e215c66 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.optimizeLodashImports = void 0; +const pluginutils_1 = require("@rollup/pluginutils"); +const transform_1 = require("../../transform/dist/index.js"); +const UNCHANGED = null; +/** + * Converts lodash imports to be specific, enabling better tree-shaking: + * + * `import { isNil } from "lodash";` -> `import { isNil } from "lodash/isNil";` + * + * Note that only specific named imports are supported, unlike babel-plugin-lodash. For example, + * this plugin will print a warning for this import and make no changes to the import: + * + * `import _ from "lodash";` + * + * Optionally, set `useLodashEs` to true and `lodash` imports will be converted to `lodash-es` + * imports. Note that it's up to user to include the `lodash-es` module and ensure the output + * is set to some form of `es` (other output formats will error). An example: + * + * `import { isNil } from "lodash";` -> `import { isNil } from "lodash-es";` + * + * @param include files/globs to include with this plugin (optional) + * @param exclude files/globs to exclude from this plugin (optional) + * @param useLodashEs set `true` to convert imports to use "lodash-es" (optional; default false) + */ +function optimizeLodashImports({ include, exclude, useLodashEs, } = {}) { + const filter = pluginutils_1.createFilter(include, exclude); + return { + name: "optimize-lodash-imports", + outputOptions(options) { + var _a; + if (useLodashEs && options.format !== "es") { + this.error(`'useLodashEs' is true but the output format is not 'es', it's ${(_a = options.format) !== null && _a !== void 0 ? _a : "undefined"}`); + } + return UNCHANGED; + }, + transform(code, id) { + const warn = this.warn.bind(this); + const parse = this.parse.bind(this); + // honor include/exclude + if (!filter(id)) { + return UNCHANGED; + } + return transform_1.transform({ code, id, parse, warn, useLodashEs }); + }, + }; +} +exports.optimizeLodashImports = optimizeLodashImports; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js.map b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js.map new file mode 100644 index 0000000..a60f8c3 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,qDAAkE;AAClE,0DAA0E;AAoB1E,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,OAAO,EACP,WAAW,MACc,EAAE;IAC3B,MAAM,MAAM,GAAG,0BAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE9C,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,aAAa,CAAC,OAAO;;YACnB,IAAI,WAAW,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE;gBAC1C,IAAI,CAAC,KAAK,CACR,iEACE,MAAA,OAAO,CAAC,MAAM,mCAAI,WACpB,EAAE,CACH,CAAC;aACH;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,CAAC,IAAI,EAAE,EAAE;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEpC,wBAAwB;YACxB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;gBACf,OAAO,SAAS,CAAC;aAClB;YAED,OAAO,qBAAe,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC;AA/BD,sDA+BC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/package.json b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/package.json new file mode 100644 index 0000000..f5c3497 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/rollup-plugin/package.json @@ -0,0 +1,79 @@ +{ + "name": "@optimize-lodash/rollup-plugin", + "version": "2.1.0", + "description": "Rewrite lodash imports with Rollup for improved tree-shaking.", + "keywords": [ + "lodash", + "rollup", + "rollup-plugin", + "optimize", + "minify" + ], + "homepage": "https://github.com/kyle-johnson/rollup-plugin-optimize-lodash-imports/tree/main/packages/rollup-plugin", + "repository": { + "type": "git", + "url": "https://github.com/kyle-johnson/rollup-plugin-optimize-lodash-imports.git" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "author": "Kyle Johnson", + "license": "MIT", + "engines": { + "node": ">= 12" + }, + "publishConfig": { + "access": "public" + }, + "scripts": { + "type-check": "tsc --noEmit", + "lint": "eslint .", + "test": "jest", + "test:ci": "jest --coverage --ci", + "build": "rm -rf dist && tsc -p tsconfig.dist.json", + "format": "prettier --write .", + "format:check": "prettier --check .", + "depcheck": "depcheck" + }, + "jest": { + "coverageDirectory": "coverage", + "testEnvironment": "node", + "preset": "ts-jest", + "globals": { + "ts-jest": {} + }, + "testTimeout": 10000 + }, + "peerDependencies": { + "rollup": "2.x" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "21.0.1", + "@rollup/plugin-node-resolve": "13.0.6", + "@tsconfig/node12": "1.0.9", + "@types/estree": "0.0.50", + "@types/jest": "27.0.3", + "@types/lodash": "4.14.177", + "@types/node": "12.20.37", + "@typescript-eslint/eslint-plugin": "5.4.0", + "@typescript-eslint/parser": "5.4.0", + "depcheck": "1.4.2", + "eslint": "8.2.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-jest": "25.2.4", + "eslint-plugin-unicorn": "38.0.1", + "jest": "27.3.1", + "lodash": "4.17.21", + "prettier": "2.4.1", + "rollup": "2.59.0", + "rollup-plugin-terser": "7.0.2", + "ts-jest": "27.0.7", + "typescript": "4.3.5" + }, + "dependencies": { + "@optimize-lodash/transform": "workspace:2.x", + "@rollup/pluginutils": "4.x" + } +} diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts new file mode 100644 index 0000000..8d32d46 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts @@ -0,0 +1,5 @@ +import type { BaseNode, ImportDeclaration, ImportSpecifier, Program } from "estree"; +export declare function isImportDeclaration(node: BaseNode): node is ImportDeclaration; +export declare function isProgram(node: BaseNode): node is Program; +export declare function isImportSpecifierArray(items: ImportDeclaration["specifiers"]): items is Array; +//# sourceMappingURL=guards.d.ts.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts.map new file mode 100644 index 0000000..0310ec8 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,OAAO,EACR,MAAM,QAAQ,CAAC;AAEhB,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,iBAAiB,CAE7E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,OAAO,CAEzD;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,CAAC,YAAY,CAAC,GACrC,KAAK,IAAI,KAAK,CAAC,eAAe,CAAC,CAEjC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js new file mode 100644 index 0000000..7af06b7 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isImportSpecifierArray = exports.isProgram = exports.isImportDeclaration = void 0; +function isImportDeclaration(node) { + return node.type === "ImportDeclaration"; +} +exports.isImportDeclaration = isImportDeclaration; +function isProgram(node) { + return node.type === "Program"; +} +exports.isProgram = isProgram; +function isImportSpecifierArray(items) { + return items.every((item) => item.type === "ImportSpecifier"); +} +exports.isImportSpecifierArray = isImportSpecifierArray; +//# sourceMappingURL=guards.js.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js.map new file mode 100644 index 0000000..b022a6f --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/guards.js.map @@ -0,0 +1 @@ +{"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;;AAOA,SAAgB,mBAAmB,CAAC,IAAc;IAChD,OAAO,IAAI,CAAC,IAAI,KAAK,mBAAmB,CAAC;AAC3C,CAAC;AAFD,kDAEC;AAED,SAAgB,SAAS,CAAC,IAAc;IACtC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AACjC,CAAC;AAFD,8BAEC;AAED,SAAgB,sBAAsB,CACpC,KAAsC;IAEtC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC;AAChE,CAAC;AAJD,wDAIC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts new file mode 100644 index 0000000..6f83ee6 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts @@ -0,0 +1,24 @@ +import type { Node } from "acorn"; +import { SourceMap } from "magic-string"; +declare module "estree" { + interface BaseNodeWithoutComments { + start: number; + end: number; + } +} +export declare type UNCHANGED = null; +export declare const UNCHANGED: null; +export interface CodeWithSourcemap { + code: string; + map: SourceMap; +} +export declare type ParseFunction = (code: string) => Node; +export declare type WarnFunction = (message: string) => void; +export declare function transform({ code, id, parse, warn, useLodashEs, }: { + code: string; + id: string; + parse: ParseFunction; + warn?: WarnFunction; + useLodashEs?: true; +}): CodeWithSourcemap | UNCHANGED; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts.map new file mode 100644 index 0000000..a06d420 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAClC,OAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAYtD,OAAO,QAAQ,QAAQ,CAAC;IACtB,UAAU,uBAAuB;QAE/B,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb;CACF;AAED,oBAAY,SAAS,GAAG,IAAI,CAAC;AAC7B,eAAO,MAAM,SAAS,MAAO,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,SAAS,CAAC;CAChB;AACD,oBAAY,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AACnD,oBAAY,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAErD,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,EAAE,EACF,KAAK,EACL,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB,GAAG,iBAAiB,GAAG,SAAS,CA4EhC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js new file mode 100644 index 0000000..03dd38d --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js @@ -0,0 +1,79 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transform = exports.UNCHANGED = void 0; +const magic_string_1 = __importDefault(require("magic-string")); +const estree_walker_1 = require("estree-walker"); +const guards_1 = require("./guards"); +const lodash_specifiers_to_es_1 = require("./lodash-specifiers-to-es"); +const lodash_specifiers_to_cjs_1 = require("./lodash-specifiers-to-cjs"); +exports.UNCHANGED = null; +function transform({ code, id, parse, warn, useLodashEs, }) { + // before parsing, check if we can skip the whole file + if (!code.includes("lodash")) { + return exports.UNCHANGED; + } + let ast; + try { + ast = parse(code); + } + catch (error) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + error.message += ` in ${id}`; + throw error; + } + // source map generation + let magicString; + estree_walker_1.walk(ast, { + enter(node) { + var _a, _b, _c; + // top-level node; we need to walk its children to find imports + if (guards_1.isProgram(node)) { + return; + } + // skip any nodes that aren't imports (this skips most everything) + if (!guards_1.isImportDeclaration(node)) { + this.skip(); + return; + } + // narrow-in on lodash imports we care about + if (node.source.value !== "lodash" && node.source.value !== "lodash/fp") { + this.skip(); + return; + } + // transform specific "lodash" and "lodash/fp" imports such as: + // import { isNil } from "lodash"; + if (guards_1.isImportSpecifierArray(node.specifiers)) { + magicString = magicString !== null && magicString !== void 0 ? magicString : new magic_string_1.default(code); + // modify + const imports = useLodashEs + ? lodash_specifiers_to_es_1.lodashSpecifiersToEs(node.source.value, node.specifiers) + : lodash_specifiers_to_cjs_1.lodashSpecifiersToCjs(node.source.value, node.specifiers); + // write + magicString.overwrite(node.start, node.end, imports.join("\n")); + // no need to dig deeper + this.skip(); + } + else if (warn !== undefined) { + // help end-users benefit from this plugin (this behavior differs from + // babel-plugin-lodash which does optimize non-specific imports) + warn(`Detected a default lodash or lodash/fp import within ${id} on line ${(_c = (_b = (_a = node.loc) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.line) !== null && _c !== void 0 ? _c : "unknown"}.\nThis import cannot be optimized by optimize-lodash-imports.`); + } + }, + }); + if (!magicString) { + return exports.UNCHANGED; + } + return { + code: magicString.toString(), + map: magicString.generateMap({ + file: id, + includeContent: true, + hires: true, + }), + }; +} +exports.transform = transform; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js.map new file mode 100644 index 0000000..4f23db7 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,gEAAsD;AACtD,iDAAqC;AAErC,qCAIkB;AAClB,uEAAiE;AACjE,yEAAmE;AAYtD,QAAA,SAAS,GAAG,IAAI,CAAC;AAS9B,SAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,EAAE,EACF,KAAK,EACL,IAAI,EACJ,WAAW,GAOZ;IACC,sDAAsD;IACtD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC5B,OAAO,iBAAS,CAAC;KAClB;IAED,IAAI,GAAG,CAAC;IACR,IAAI;QACF,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;KACnB;IAAC,OAAO,KAAK,EAAE;QACd,sEAAsE;QACtE,KAAK,CAAC,OAAO,IAAI,OAAO,EAAE,EAAE,CAAC;QAC7B,MAAM,KAAK,CAAC;KACb;IAED,wBAAwB;IACxB,IAAI,WAAoC,CAAC;IAEzC,oBAAI,CAAC,GAAG,EAAE;QACR,KAAK,CAAC,IAAI;;YACR,+DAA+D;YAC/D,IAAI,kBAAS,CAAC,IAAI,CAAC,EAAE;gBACnB,OAAO;aACR;YAED,kEAAkE;YAClE,IAAI,CAAC,4BAAmB,CAAC,IAAI,CAAC,EAAE;gBAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;gBACZ,OAAO;aACR;YAED,4CAA4C;YAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,WAAW,EAAE;gBACvE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACZ,OAAO;aACR;YAED,+DAA+D;YAC/D,kCAAkC;YAClC,IAAI,+BAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAC3C,WAAW,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,sBAAW,CAAC,IAAI,CAAC,CAAC;gBAEnD,SAAS;gBACT,MAAM,OAAO,GAAG,WAAW;oBACzB,CAAC,CAAC,8CAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;oBAC1D,CAAC,CAAC,gDAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;gBAE9D,QAAQ;gBACR,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBAEhE,wBAAwB;gBACxB,IAAI,CAAC,IAAI,EAAE,CAAC;aACb;iBAAM,IAAI,IAAI,KAAK,SAAS,EAAE;gBAC7B,sEAAsE;gBACtE,gEAAgE;gBAChE,IAAI,CACF,wDAAwD,EAAE,YACxD,MAAA,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,KAAK,0CAAE,IAAI,mCAAI,SAC3B,gEAAgE,CACjE,CAAC;aACH;QACH,CAAC;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,iBAAS,CAAC;KAClB;IAED,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE;QAC5B,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC;YAC3B,IAAI,EAAE,EAAE;YACR,cAAc,EAAE,IAAI;YACpB,KAAK,EAAE,IAAI;SACZ,CAAC;KACH,CAAC;AACJ,CAAC;AAxFD,8BAwFC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts new file mode 100644 index 0000000..e11e382 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts @@ -0,0 +1,10 @@ +import type { ImportSpecifier } from "estree"; +/** + * Turns a generic lodash import into a specific import using the CommonJS + * lodash package. + * + * @param base "lodash" or "lodash/fp" + * @param specifiers from an AST; assumes they are all ImportSpecifiers + */ +export declare function lodashSpecifiersToCjs(base: string, specifiers: Array): Array; +//# sourceMappingURL=lodash-specifiers-to-cjs.d.ts.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts.map new file mode 100644 index 0000000..649d63c --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lodash-specifiers-to-cjs.d.ts","sourceRoot":"","sources":["../src/lodash-specifiers-to-cjs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,KAAK,CAAC,eAAe,CAAC,GACjC,KAAK,CAAC,MAAM,CAAC,CAOf"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js new file mode 100644 index 0000000..d360719 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lodashSpecifiersToCjs = void 0; +/** + * Turns a generic lodash import into a specific import using the CommonJS + * lodash package. + * + * @param base "lodash" or "lodash/fp" + * @param specifiers from an AST; assumes they are all ImportSpecifiers + */ +function lodashSpecifiersToCjs(base, specifiers) { + return specifiers.map(({ imported, local }) => `import ${imported.name !== local.name ? local.name : imported.name} from "${base}/${imported.name}.js";`); +} +exports.lodashSpecifiersToCjs = lodashSpecifiersToCjs; +//# sourceMappingURL=lodash-specifiers-to-cjs.js.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js.map new file mode 100644 index 0000000..d1d1b1c --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lodash-specifiers-to-cjs.js","sourceRoot":"","sources":["../src/lodash-specifiers-to-cjs.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,SAAgB,qBAAqB,CACnC,IAAY,EACZ,UAAkC;IAElC,OAAO,UAAU,CAAC,GAAG,CACnB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CACtB,UACE,QAAQ,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IACvD,UAAU,IAAI,IAAI,QAAQ,CAAC,IAAI,OAAO,CACzC,CAAC;AACJ,CAAC;AAVD,sDAUC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts new file mode 100644 index 0000000..535514d --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts @@ -0,0 +1,10 @@ +import type { ImportSpecifier } from "estree"; +/** + * Turns a generic lodash import into a specific import referencing the "lodash-es" + * pacakge. Note that lodash-es cannot be imported from CommonJS. + * + * @param base "lodash" or "lodash/fp" + * @param specifiers from an AST; assumes they are all ImportSpecifiers + */ +export declare function lodashSpecifiersToEs(base: string, specifiers: Array): Array; +//# sourceMappingURL=lodash-specifiers-to-es.d.ts.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts.map new file mode 100644 index 0000000..4138082 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lodash-specifiers-to-es.d.ts","sourceRoot":"","sources":["../src/lodash-specifiers-to-es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,KAAK,CAAC,eAAe,CAAC,GACjC,KAAK,CAAC,MAAM,CAAC,CAUf"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js new file mode 100644 index 0000000..7f1cf03 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lodashSpecifiersToEs = void 0; +/** + * Turns a generic lodash import into a specific import referencing the "lodash-es" + * pacakge. Note that lodash-es cannot be imported from CommonJS. + * + * @param base "lodash" or "lodash/fp" + * @param specifiers from an AST; assumes they are all ImportSpecifiers + */ +function lodashSpecifiersToEs(base, specifiers) { + const isFp = base.endsWith("fp"); + return specifiers.map(({ imported, local }) => `import { ${imported.name !== local.name + ? imported.name + " as " + local.name + : local.name} } from "lodash-es${isFp ? "/fp" : ""}";`); +} +exports.lodashSpecifiersToEs = lodashSpecifiersToEs; +//# sourceMappingURL=lodash-specifiers-to-es.js.map \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js.map b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js.map new file mode 100644 index 0000000..d3b29e0 --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/dist/lodash-specifiers-to-es.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lodash-specifiers-to-es.js","sourceRoot":"","sources":["../src/lodash-specifiers-to-es.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAClC,IAAY,EACZ,UAAkC;IAElC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,UAAU,CAAC,GAAG,CACnB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CACtB,YACE,QAAQ,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;QAC1B,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI;QACrC,CAAC,CAAC,KAAK,CAAC,IACZ,qBAAqB,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAC7C,CAAC;AACJ,CAAC;AAbD,oDAaC"} \ No newline at end of file diff --git a/vendor/rollup-plugin-optimize-lodash-imports/transform/package.json b/vendor/rollup-plugin-optimize-lodash-imports/transform/package.json new file mode 100644 index 0000000..62f19ad --- /dev/null +++ b/vendor/rollup-plugin-optimize-lodash-imports/transform/package.json @@ -0,0 +1,68 @@ +{ + "name": "@optimize-lodash/transform", + "version": "2.1.0", + "description": "Rewrites lodash imports in a given source file to be specific.", + "keywords": [ + "lodash", + "optimize" + ], + "homepage": "https://github.com/kyle-johnson/rollup-plugin-optimize-lodash-imports/tree/main/packages/transform", + "repository": { + "type": "git", + "url": "https://github.com/kyle-johnson/rollup-plugin-optimize-lodash-imports.git" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "author": "Kyle Johnson", + "license": "MIT", + "engines": { + "node": ">= 12" + }, + "publishConfig": { + "access": "public" + }, + "scripts": { + "type-check": "tsc --noEmit", + "lint": "eslint .", + "test": "jest", + "test:ci": "jest --coverage --ci", + "build": "rm -rf dist && tsc -p tsconfig.dist.json", + "format": "prettier --write .", + "format:check": "prettier --check .", + "depcheck": "depcheck" + }, + "jest": { + "coverageDirectory": "coverage", + "testEnvironment": "node", + "preset": "ts-jest", + "globals": { + "ts-jest": {} + } + }, + "devDependencies": { + "@tsconfig/node12": "1.0.9", + "@types/estree": "0.0.50", + "@types/jest": "27.0.3", + "@types/lodash": "4.14.177", + "@types/node": "12.20.37", + "@typescript-eslint/eslint-plugin": "5.4.0", + "@typescript-eslint/parser": "5.4.0", + "acorn": "8.5.0", + "depcheck": "1.4.2", + "eslint": "8.2.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-jest": "25.2.4", + "eslint-plugin-unicorn": "38.0.1", + "jest": "27.3.1", + "prettier": "2.4.1", + "ts-jest": "27.0.7", + "typescript": "4.3.5" + }, + "dependencies": { + "estree-walker": "2.x", + "magic-string": "0.25.x" + } +} diff --git a/yarn.lock b/yarn.lock index fcadce7..8a965ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -693,9 +693,9 @@ "@types/node" ">= 8" "@rollup/plugin-commonjs@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.0.tgz#8c3e71f9a66908e60d70cc1be205834ef3e45f71" - integrity sha512-adTpD6ATGbehdaQoZQ6ipDFhdjqsTgpOAhFiPwl+dzre4pPshsecptDPyEFb61JMJ1+mGljktaC4jI8ARMSNyw== + version "19.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.2.tgz#1ccc3d63878d1bc9846f8969f09dd3b3e4ecc244" + integrity sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" @@ -712,6 +712,26 @@ dependencies: "@rollup/pluginutils" "^3.0.8" +"@rollup/plugin-node-resolve@^13.0.6": + version "13.0.6" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz#29629070bb767567be8157f575cfa8f2b8e9ef77" + integrity sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA== + dependencies: + "@rollup/pluginutils" "^3.1.0" + "@types/resolve" "1.17.1" + builtin-modules "^3.1.0" + deepmerge "^4.2.2" + is-module "^1.0.0" + resolve "^1.19.0" + +"@rollup/pluginutils@4.x": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" + integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -960,6 +980,13 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/resolve@1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" + integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== + dependencies: + "@types/node" "*" + "@types/retry@^0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -1521,6 +1548,11 @@ builtin-modules@^1.1.1: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= +builtin-modules@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -2363,6 +2395,11 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -2674,16 +2711,16 @@ estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estree-walker@2.x, estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== -estree-walker@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -3955,6 +3992,11 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" @@ -5196,7 +5238,7 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== -magic-string@^0.25.7: +magic-string@0.25.x, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -6930,7 +6972,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.20.0, resolve@^1.17.0: +resolve@1.20.0, resolve@^1.17.0, resolve@^1.19.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==