immosquare-cleaner 0.1.42 → 0.1.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/.bin/ncu +1 -1
- data/node_modules/.bin/npm-check-updates +1 -1
- data/node_modules/.bin/rimraf +1 -1
- data/node_modules/@eslint/config-array/dist/cjs/index.cjs +5 -0
- data/node_modules/@eslint/config-array/dist/esm/index.js +5 -0
- data/node_modules/@eslint/config-array/package.json +1 -1
- data/node_modules/@eslint/js/package.json +1 -1
- data/node_modules/ansi-regex/index.d.ts +13 -9
- data/node_modules/ansi-regex/index.js +5 -3
- data/node_modules/ansi-regex/license +1 -1
- data/node_modules/ansi-regex/package.json +6 -9
- data/node_modules/ansi-regex/readme.md +8 -2
- data/node_modules/brace-expansion/README.md +0 -6
- data/node_modules/brace-expansion/index.js +84 -86
- data/node_modules/brace-expansion/package.json +4 -3
- data/node_modules/chalk/license +1 -1
- data/node_modules/chalk/package.json +23 -38
- data/node_modules/chalk/readme.md +85 -69
- data/node_modules/chalk/source/index.js +84 -80
- data/node_modules/eslint/README.md +1 -1
- data/node_modules/eslint/lib/cli.js +4 -23
- data/node_modules/eslint/lib/eslint/eslint.js +93 -17
- data/node_modules/eslint/lib/languages/js/source-code/source-code.js +19 -0
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +24 -12
- data/node_modules/eslint/lib/linter/linter.js +44 -20
- data/node_modules/eslint/lib/linter/report-translator.js +10 -10
- data/node_modules/eslint/lib/linter/rule-fixer.js +38 -15
- data/node_modules/eslint/lib/rules/require-await.js +37 -3
- data/node_modules/eslint/lib/rules/utils/ast-utils.js +4 -3
- data/node_modules/eslint/lib/shared/flags.js +3 -2
- data/node_modules/eslint/package.json +18 -8
- data/node_modules/glob/LICENSE +7 -1
- data/node_modules/glob/README.md +284 -1120
- data/node_modules/glob/common.js +238 -0
- data/node_modules/glob/glob.js +790 -0
- data/node_modules/glob/package.json +34 -76
- data/node_modules/glob/sync.js +486 -0
- data/node_modules/jscodeshift/CHANGELOG.md +17 -0
- data/node_modules/jscodeshift/CONTRIBUTING.md +7 -6
- data/node_modules/jscodeshift/README.md +3 -2
- data/node_modules/jscodeshift/dist/Runner.js +15 -15
- data/node_modules/jscodeshift/dist/collections/ImportDeclaration.js +113 -0
- data/node_modules/jscodeshift/dist/collections/index.js +1 -0
- data/node_modules/jscodeshift/dist/src/Runner.js +15 -15
- data/node_modules/jscodeshift/dist/src/collections/ImportDeclaration.js +113 -0
- data/node_modules/jscodeshift/dist/src/collections/index.js +1 -0
- data/node_modules/jscodeshift/package.json +9 -7
- data/node_modules/jscodeshift/parser/tsOptions.js +2 -0
- data/node_modules/jscodeshift/src/Runner.js +15 -15
- data/node_modules/jscodeshift/src/collections/ImportDeclaration.js +113 -0
- data/node_modules/jscodeshift/src/collections/index.js +1 -0
- data/node_modules/jscodeshift/utils/testUtils.js +1 -2
- data/node_modules/jscodeshift/website/README.md +44 -0
- data/node_modules/jscodeshift/website/astro.config.mjs +36 -0
- data/node_modules/jscodeshift/website/package.json +17 -0
- data/node_modules/jscodeshift/website/public/favicon.svg +1 -0
- data/node_modules/jscodeshift/website/src/assets/houston.webp +0 -0
- data/node_modules/jscodeshift/website/src/content/config.ts +6 -0
- data/node_modules/jscodeshift/website/src/content/docs/build/api-reference.mdx +406 -0
- data/node_modules/jscodeshift/website/src/content/docs/build/ast-grammar.mdx +3086 -0
- data/node_modules/jscodeshift/website/src/content/docs/index.mdx +15 -0
- data/node_modules/jscodeshift/website/src/content/docs/overview/introduction.mdx +45 -0
- data/node_modules/jscodeshift/website/src/content/docs/run/cli.mdx +161 -0
- data/node_modules/jscodeshift/website/src/env.d.ts +2 -0
- data/node_modules/jscodeshift/website/tsconfig.json +3 -0
- data/node_modules/lru-cache/LICENSE +1 -1
- data/node_modules/lru-cache/README.md +104 -1055
- data/node_modules/lru-cache/index.js +246 -1139
- data/node_modules/lru-cache/package.json +11 -75
- data/node_modules/minimatch/LICENSE +1 -1
- data/node_modules/minimatch/README.md +65 -289
- data/node_modules/minimatch/package.json +14 -67
- data/node_modules/npm-check-updates/README.md +43 -33
- data/node_modules/npm-check-updates/build/cli.js +21 -21
- data/node_modules/npm-check-updates/build/cli.js.map +1 -1
- data/node_modules/npm-check-updates/build/index-CWktU8PK.js +58 -0
- data/node_modules/npm-check-updates/build/index-CWktU8PK.js.map +1 -0
- data/node_modules/npm-check-updates/build/index.d.ts +1 -3
- data/node_modules/npm-check-updates/build/index.js +207 -223
- data/node_modules/npm-check-updates/build/index.js.map +1 -1
- data/node_modules/npm-check-updates/package.json +101 -105
- data/node_modules/rimraf/LICENSE +1 -1
- data/node_modules/rimraf/README.md +70 -188
- data/node_modules/rimraf/bin.js +50 -0
- data/node_modules/rimraf/package.json +16 -74
- data/node_modules/rimraf/rimraf.js +364 -0
- data/node_modules/semver/README.md +27 -221
- data/node_modules/semver/bin/semver.js +84 -107
- data/node_modules/semver/package.json +14 -63
- data/node_modules/semver/semver.js +1643 -0
- data/node_modules/strip-ansi/index.d.ts +4 -2
- data/node_modules/strip-ansi/index.js +3 -13
- data/node_modules/strip-ansi/license +1 -1
- data/node_modules/strip-ansi/package.json +7 -10
- data/node_modules/strip-ansi/readme.md +7 -2
- data/node_modules/strip-json-comments/index.d.ts +13 -18
- data/node_modules/strip-json-comments/index.js +38 -68
- data/node_modules/strip-json-comments/package.json +5 -13
- data/node_modules/strip-json-comments/readme.md +18 -15
- data/node_modules/yallist/package.json +1 -1
- data/node_modules/yallist/yallist.js +3 -3
- data/package.json +4 -4
- metadata +30 -744
- data/node_modules/@eslint/config-array/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/@eslint/config-array/node_modules/minimatch/README.md +0 -230
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/@eslint/config-array/node_modules/minimatch/package.json +0 -33
- data/node_modules/chalk/source/index.d.ts +0 -320
- data/node_modules/chalk/source/utilities.js +0 -33
- data/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- data/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- data/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- data/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- data/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- data/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- data/node_modules/eslint/node_modules/chalk/license +0 -9
- data/node_modules/eslint/node_modules/chalk/package.json +0 -68
- data/node_modules/eslint/node_modules/chalk/readme.md +0 -341
- data/node_modules/eslint/node_modules/chalk/source/index.js +0 -229
- data/node_modules/eslint/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/eslint/node_modules/minimatch/README.md +0 -230
- data/node_modules/eslint/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/eslint/node_modules/minimatch/package.json +0 -33
- data/node_modules/eslint/node_modules/strip-ansi/index.d.ts +0 -17
- data/node_modules/eslint/node_modules/strip-ansi/index.js +0 -4
- data/node_modules/eslint/node_modules/strip-ansi/license +0 -9
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -10
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -55
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -78
- data/node_modules/eslint/node_modules/strip-ansi/package.json +0 -54
- data/node_modules/eslint/node_modules/strip-ansi/readme.md +0 -46
- data/node_modules/glob/dist/commonjs/glob.d.ts +0 -344
- data/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/glob.js +0 -243
- data/node_modules/glob/dist/commonjs/glob.js.map +0 -1
- data/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
- data/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/has-magic.js +0 -27
- data/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
- data/node_modules/glob/dist/commonjs/ignore.d.ts +0 -20
- data/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/ignore.js +0 -108
- data/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
- data/node_modules/glob/dist/commonjs/index.d.ts +0 -96
- data/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/index.js +0 -68
- data/node_modules/glob/dist/commonjs/index.js.map +0 -1
- data/node_modules/glob/dist/commonjs/package.json +0 -1
- data/node_modules/glob/dist/commonjs/pattern.d.ts +0 -77
- data/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/pattern.js +0 -219
- data/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
- data/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
- data/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/processor.js +0 -302
- data/node_modules/glob/dist/commonjs/processor.js.map +0 -1
- data/node_modules/glob/dist/commonjs/walker.d.ts +0 -96
- data/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/walker.js +0 -358
- data/node_modules/glob/dist/commonjs/walker.js.map +0 -1
- data/node_modules/glob/dist/esm/bin.d.mts +0 -3
- data/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
- data/node_modules/glob/dist/esm/bin.mjs +0 -275
- data/node_modules/glob/dist/esm/bin.mjs.map +0 -1
- data/node_modules/glob/dist/esm/glob.d.ts +0 -344
- data/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/glob.js +0 -239
- data/node_modules/glob/dist/esm/glob.js.map +0 -1
- data/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
- data/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/has-magic.js +0 -23
- data/node_modules/glob/dist/esm/has-magic.js.map +0 -1
- data/node_modules/glob/dist/esm/ignore.d.ts +0 -20
- data/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/ignore.js +0 -104
- data/node_modules/glob/dist/esm/ignore.js.map +0 -1
- data/node_modules/glob/dist/esm/index.d.ts +0 -96
- data/node_modules/glob/dist/esm/index.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/index.js +0 -56
- data/node_modules/glob/dist/esm/index.js.map +0 -1
- data/node_modules/glob/dist/esm/package.json +0 -1
- data/node_modules/glob/dist/esm/pattern.d.ts +0 -77
- data/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/pattern.js +0 -215
- data/node_modules/glob/dist/esm/pattern.js.map +0 -1
- data/node_modules/glob/dist/esm/processor.d.ts +0 -59
- data/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/processor.js +0 -295
- data/node_modules/glob/dist/esm/processor.js.map +0 -1
- data/node_modules/glob/dist/esm/walker.d.ts +0 -96
- data/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/walker.js +0 -352
- data/node_modules/glob/dist/esm/walker.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/glob/node_modules/minimatch/README.md +0 -454
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
- data/node_modules/glob/node_modules/minimatch/package.json +0 -86
- data/node_modules/glob/node_modules/minipass/LICENSE +0 -15
- data/node_modules/glob/node_modules/minipass/README.md +0 -825
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts +0 -549
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js +0 -1028
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/commonjs/package.json +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts +0 -549
- data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/index.js +0 -1018
- data/node_modules/glob/node_modules/minipass/dist/esm/index.js.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/package.json +0 -1
- data/node_modules/glob/node_modules/minipass/package.json +0 -82
- data/node_modules/jscodeshift/node_modules/chalk/index.d.ts +0 -415
- data/node_modules/jscodeshift/node_modules/chalk/license +0 -9
- data/node_modules/jscodeshift/node_modules/chalk/package.json +0 -68
- data/node_modules/jscodeshift/node_modules/chalk/readme.md +0 -341
- data/node_modules/jscodeshift/node_modules/chalk/source/index.js +0 -229
- data/node_modules/jscodeshift/node_modules/chalk/source/templates.js +0 -134
- data/node_modules/jscodeshift/node_modules/chalk/source/util.js +0 -39
- data/node_modules/jscodeshift/website/index.htm +0 -9
- data/node_modules/lru-cache/index.d.ts +0 -869
- data/node_modules/lru-cache/index.mjs +0 -1227
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +0 -66
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +0 -1
- data/node_modules/npm-check-updates/build/package.json +0 -183
- data/node_modules/npm-check-updates/build/src/bin/cli.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/bin/cli.js +0 -182
- data/node_modules/npm-check-updates/build/src/bin/cli.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/cli-options.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/cli-options.js +0 -795
- data/node_modules/npm-check-updates/build/src/cli-options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/index.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/index.js +0 -316
- data/node_modules/npm-check-updates/build/src/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/cache.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/lib/cache.js +0 -105
- data/node_modules/npm-check-updates/build/src/lib/cache.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/chalk.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/chalk.js +0 -66
- data/node_modules/npm-check-updates/build/src/lib/chalk.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js +0 -32
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/doctor.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/doctor.js +0 -290
- data/node_modules/npm-check-updates/build/src/lib/doctor.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/exists.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/exists.js +0 -10
- data/node_modules/npm-check-updates/build/src/lib/exists.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js +0 -112
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js +0 -80
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/filterObject.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/lib/filterObject.js +0 -10
- data/node_modules/npm-check-updates/build/src/lib/filterObject.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.js +0 -54
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/findPackage.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/lib/findPackage.js +0 -78
- data/node_modules/npm-check-updates/build/src/lib/findPackage.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js +0 -126
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.d.ts +0 -15
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js +0 -76
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js +0 -37
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js +0 -35
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.d.ts +0 -22
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js +0 -60
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js +0 -30
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js +0 -31
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js +0 -35
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js +0 -30
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.d.ts +0 -11
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js +0 -81
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/initOptions.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/initOptions.js +0 -207
- data/node_modules/npm-check-updates/build/src/lib/initOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js +0 -68
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js +0 -23
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +0 -108
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js +0 -27
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/logging.d.ts +0 -77
- data/node_modules/npm-check-updates/build/src/lib/logging.js +0 -287
- data/node_modules/npm-check-updates/build/src/lib/logging.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.d.ts +0 -69
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js +0 -23
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/programError.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/programError.js +0 -19
- data/node_modules/npm-check-updates/build/src/lib/programError.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.js +0 -118
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js +0 -20
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.js +0 -76
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/runLocal.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/lib/runLocal.js +0 -239
- data/node_modules/npm-check-updates/build/src/lib/runLocal.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/table.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/table.js +0 -27
- data/node_modules/npm-check-updates/build/src/lib/table.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js +0 -103
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js +0 -50
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js +0 -58
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/version-util.d.ts +0 -180
- data/node_modules/npm-check-updates/build/src/lib/version-util.js +0 -518
- data/node_modules/npm-check-updates/build/src/lib/version-util.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/wrap.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/wrap.js +0 -45
- data/node_modules/npm-check-updates/build/src/lib/wrap.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/bun.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -89
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/filters.d.ts +0 -35
- data/node_modules/npm-check-updates/build/src/package-managers/filters.js +0 -96
- data/node_modules/npm-check-updates/build/src/package-managers/filters.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js +0 -112
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/index.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/package-managers/index.js +0 -40
- data/node_modules/npm-check-updates/build/src/package-managers/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/npm.d.ts +0 -147
- data/node_modules/npm-check-updates/build/src/package-managers/npm.js +0 -688
- data/node_modules/npm-check-updates/build/src/package-managers/npm.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.d.ts +0 -25
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js +0 -103
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js +0 -52
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.d.ts +0 -60
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.js +0 -248
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/scripts/build-options.d.ts +0 -1
- data/node_modules/npm-check-updates/build/src/scripts/build-options.js +0 -121
- data/node_modules/npm-check-updates/build/src/scripts/build-options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/CLIOption.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/types/CLIOption.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/CLIOption.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Cacher.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/types/Cacher.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Cacher.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/GetVersion.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/GetVersion.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/GetVersion.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/IndexType.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/IndexType.js +0 -4
- data/node_modules/npm-check-updates/build/src/types/IndexType.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Maybe.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/Maybe.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Maybe.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Options.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/types/Options.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageFile.d.ts +0 -24
- data/node_modules/npm-check-updates/build/src/types/PackageFile.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageFile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageManager.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/types/PackageManager.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Packument.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/types/Packument.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Packument.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/RunOptions.d.ts +0 -137
- data/node_modules/npm-check-updates/build/src/types/RunOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/RunOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Target.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/types/Target.js +0 -6
- data/node_modules/npm-check-updates/build/src/types/Target.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.d.ts +0 -1
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Version.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/Version.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Version.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionResult.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/types/VersionResult.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionResult.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/chalk/license +0 -9
- data/node_modules/npm-check-updates/node_modules/chalk/package.json +0 -83
- data/node_modules/npm-check-updates/node_modules/chalk/readme.md +0 -325
- data/node_modules/npm-check-updates/node_modules/chalk/source/index.d.ts +0 -320
- data/node_modules/npm-check-updates/node_modules/chalk/source/index.js +0 -225
- data/node_modules/npm-check-updates/node_modules/chalk/source/utilities.js +0 -33
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- data/node_modules/npm-check-updates/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/npm-check-updates/node_modules/minimatch/README.md +0 -454
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
- data/node_modules/npm-check-updates/node_modules/minimatch/package.json +0 -86
- data/node_modules/npm-check-updates/node_modules/strip-ansi/index.d.ts +0 -15
- data/node_modules/npm-check-updates/node_modules/strip-ansi/index.js +0 -14
- data/node_modules/npm-check-updates/node_modules/strip-ansi/license +0 -9
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -33
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -8
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -58
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -72
- data/node_modules/npm-check-updates/node_modules/strip-ansi/package.json +0 -57
- data/node_modules/npm-check-updates/node_modules/strip-ansi/readme.md +0 -41
- data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/default-tmp.js +0 -61
- data/node_modules/rimraf/dist/commonjs/default-tmp.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fix-eperm.js +0 -58
- data/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fs.d.ts +0 -17
- data/node_modules/rimraf/dist/commonjs/fs.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fs.js +0 -46
- data/node_modules/rimraf/dist/commonjs/fs.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.js +0 -21
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/index.d.ts +0 -50
- data/node_modules/rimraf/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/index.js +0 -76
- data/node_modules/rimraf/dist/commonjs/index.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +0 -35
- data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/opt-arg.js +0 -53
- data/node_modules/rimraf/dist/commonjs/opt-arg.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/package.json +0 -1
- data/node_modules/rimraf/dist/commonjs/path-arg.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/path-arg.js +0 -54
- data/node_modules/rimraf/dist/commonjs/path-arg.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/platform.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/platform.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/platform.js +0 -4
- data/node_modules/rimraf/dist/commonjs/platform.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +0 -5
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.js +0 -19
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +0 -8
- data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/retry-busy.js +0 -68
- data/node_modules/rimraf/dist/commonjs/retry-busy.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.js +0 -12
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +0 -192
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-native.js +0 -24
- data/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.js +0 -123
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.js +0 -182
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/use-native.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/use-native.js +0 -22
- data/node_modules/rimraf/dist/commonjs/use-native.js.map +0 -1
- data/node_modules/rimraf/dist/esm/bin.d.mts +0 -8
- data/node_modules/rimraf/dist/esm/bin.d.mts.map +0 -1
- data/node_modules/rimraf/dist/esm/bin.mjs +0 -256
- data/node_modules/rimraf/dist/esm/bin.mjs.map +0 -1
- data/node_modules/rimraf/dist/esm/default-tmp.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/default-tmp.js +0 -55
- data/node_modules/rimraf/dist/esm/default-tmp.js.map +0 -1
- data/node_modules/rimraf/dist/esm/fix-eperm.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/fix-eperm.js +0 -53
- data/node_modules/rimraf/dist/esm/fix-eperm.js.map +0 -1
- data/node_modules/rimraf/dist/esm/fs.d.ts +0 -17
- data/node_modules/rimraf/dist/esm/fs.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/fs.js +0 -31
- data/node_modules/rimraf/dist/esm/fs.js.map +0 -1
- data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/ignore-enoent.js +0 -16
- data/node_modules/rimraf/dist/esm/ignore-enoent.js.map +0 -1
- data/node_modules/rimraf/dist/esm/index.d.ts +0 -50
- data/node_modules/rimraf/dist/esm/index.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/index.js +0 -68
- data/node_modules/rimraf/dist/esm/index.js.map +0 -1
- data/node_modules/rimraf/dist/esm/opt-arg.d.ts +0 -35
- data/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/opt-arg.js +0 -46
- data/node_modules/rimraf/dist/esm/opt-arg.js.map +0 -1
- data/node_modules/rimraf/dist/esm/package.json +0 -1
- data/node_modules/rimraf/dist/esm/path-arg.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/path-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/path-arg.js +0 -49
- data/node_modules/rimraf/dist/esm/path-arg.js.map +0 -1
- data/node_modules/rimraf/dist/esm/platform.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/platform.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/platform.js +0 -2
- data/node_modules/rimraf/dist/esm/platform.js.map +0 -1
- data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +0 -5
- data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/readdir-or-error.js +0 -14
- data/node_modules/rimraf/dist/esm/readdir-or-error.js.map +0 -1
- data/node_modules/rimraf/dist/esm/retry-busy.d.ts +0 -8
- data/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/retry-busy.js +0 -63
- data/node_modules/rimraf/dist/esm/retry-busy.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-manual.js +0 -6
- data/node_modules/rimraf/dist/esm/rimraf-manual.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.js +0 -187
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-native.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-native.js +0 -19
- data/node_modules/rimraf/dist/esm/rimraf-native.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-posix.js +0 -118
- data/node_modules/rimraf/dist/esm/rimraf-posix.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-windows.js +0 -177
- data/node_modules/rimraf/dist/esm/rimraf-windows.js.map +0 -1
- data/node_modules/rimraf/dist/esm/use-native.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/use-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/use-native.js +0 -16
- data/node_modules/rimraf/dist/esm/use-native.js.map +0 -1
- data/node_modules/semver/classes/comparator.js +0 -141
- data/node_modules/semver/classes/index.js +0 -5
- data/node_modules/semver/classes/range.js +0 -539
- data/node_modules/semver/classes/semver.js +0 -302
- data/node_modules/semver/functions/clean.js +0 -6
- data/node_modules/semver/functions/cmp.js +0 -52
- data/node_modules/semver/functions/coerce.js +0 -52
- data/node_modules/semver/functions/compare-build.js +0 -7
- data/node_modules/semver/functions/compare-loose.js +0 -3
- data/node_modules/semver/functions/compare.js +0 -5
- data/node_modules/semver/functions/diff.js +0 -65
- data/node_modules/semver/functions/eq.js +0 -3
- data/node_modules/semver/functions/gt.js +0 -3
- data/node_modules/semver/functions/gte.js +0 -3
- data/node_modules/semver/functions/inc.js +0 -19
- data/node_modules/semver/functions/lt.js +0 -3
- data/node_modules/semver/functions/lte.js +0 -3
- data/node_modules/semver/functions/major.js +0 -3
- data/node_modules/semver/functions/minor.js +0 -3
- data/node_modules/semver/functions/neq.js +0 -3
- data/node_modules/semver/functions/parse.js +0 -16
- data/node_modules/semver/functions/patch.js +0 -3
- data/node_modules/semver/functions/prerelease.js +0 -6
- data/node_modules/semver/functions/rcompare.js +0 -3
- data/node_modules/semver/functions/rsort.js +0 -3
- data/node_modules/semver/functions/satisfies.js +0 -10
- data/node_modules/semver/functions/sort.js +0 -3
- data/node_modules/semver/functions/valid.js +0 -6
- data/node_modules/semver/index.js +0 -89
- data/node_modules/semver/internal/constants.js +0 -35
- data/node_modules/semver/internal/debug.js +0 -9
- data/node_modules/semver/internal/identifiers.js +0 -23
- data/node_modules/semver/internal/parse-options.js +0 -15
- data/node_modules/semver/internal/re.js +0 -212
- data/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
- data/node_modules/semver/node_modules/lru-cache/README.md +0 -166
- data/node_modules/semver/node_modules/lru-cache/index.js +0 -334
- data/node_modules/semver/node_modules/lru-cache/package.json +0 -34
- data/node_modules/semver/preload.js +0 -2
- data/node_modules/semver/ranges/gtr.js +0 -4
- data/node_modules/semver/ranges/intersects.js +0 -7
- data/node_modules/semver/ranges/ltr.js +0 -4
- data/node_modules/semver/ranges/max-satisfying.js +0 -25
- data/node_modules/semver/ranges/min-satisfying.js +0 -24
- data/node_modules/semver/ranges/min-version.js +0 -61
- data/node_modules/semver/ranges/outside.js +0 -80
- data/node_modules/semver/ranges/simplify.js +0 -47
- data/node_modules/semver/ranges/subset.js +0 -247
- data/node_modules/semver/ranges/to-comparators.js +0 -8
- data/node_modules/semver/ranges/valid.js +0 -11
- /data/node_modules/{eslint/node_modules/chalk → chalk}/index.d.ts +0 -0
- /data/node_modules/{eslint/node_modules/chalk → chalk}/source/templates.js +0 -0
- /data/node_modules/{eslint/node_modules/chalk → chalk}/source/util.js +0 -0
- /data/node_modules/{@eslint/config-array/node_modules/minimatch → minimatch}/minimatch.js +0 -0
@@ -0,0 +1,113 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
3
|
+
*
|
4
|
+
* This source code is licensed under the MIT license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
const Collection = require("../Collection");
|
11
|
+
const NodeCollection = require("./Node");
|
12
|
+
|
13
|
+
const assert = require("assert");
|
14
|
+
const once = require("../utils/once");
|
15
|
+
const recast = require("recast");
|
16
|
+
|
17
|
+
const types = recast.types.namedTypes;
|
18
|
+
|
19
|
+
const globalMethods = {
|
20
|
+
/**
|
21
|
+
* Inserts an ImportDeclaration at the top of the AST
|
22
|
+
*
|
23
|
+
* @param {string} sourcePath
|
24
|
+
* @param {Array} specifiers
|
25
|
+
*/
|
26
|
+
insertImportDeclaration: function (sourcePath, specifiers) {
|
27
|
+
assert.ok(
|
28
|
+
sourcePath && typeof sourcePath === "string",
|
29
|
+
"insertImportDeclaration(...) needs a source path"
|
30
|
+
);
|
31
|
+
|
32
|
+
assert.ok(
|
33
|
+
specifiers && Array.isArray(specifiers),
|
34
|
+
"insertImportDeclaration(...) needs an array of specifiers"
|
35
|
+
);
|
36
|
+
|
37
|
+
if (this.hasImportDeclaration(sourcePath)) {
|
38
|
+
return this;
|
39
|
+
}
|
40
|
+
|
41
|
+
const importDeclaration = recast.types.builders.importDeclaration(
|
42
|
+
specifiers,
|
43
|
+
recast.types.builders.stringLiteral(sourcePath)
|
44
|
+
);
|
45
|
+
|
46
|
+
return this.forEach((path) => {
|
47
|
+
if (path.value.type === "Program") {
|
48
|
+
path.value.body.unshift(importDeclaration);
|
49
|
+
}
|
50
|
+
});
|
51
|
+
},
|
52
|
+
/**
|
53
|
+
* Finds all ImportDeclarations optionally filtered by name
|
54
|
+
*
|
55
|
+
* @param {string} sourcePath
|
56
|
+
* @return {Collection}
|
57
|
+
*/
|
58
|
+
findImportDeclarations: function (sourcePath) {
|
59
|
+
assert.ok(
|
60
|
+
sourcePath && typeof sourcePath === "string",
|
61
|
+
"findImportDeclarations(...) needs a source path"
|
62
|
+
);
|
63
|
+
|
64
|
+
return this.find(types.ImportDeclaration, {
|
65
|
+
source: { value: sourcePath },
|
66
|
+
});
|
67
|
+
},
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Determines if the collection has an ImportDeclaration with the given sourcePath
|
71
|
+
*
|
72
|
+
* @param {string} sourcePath
|
73
|
+
* @returns {boolean}
|
74
|
+
*/
|
75
|
+
hasImportDeclaration: function (sourcePath) {
|
76
|
+
assert.ok(
|
77
|
+
sourcePath && typeof sourcePath === "string",
|
78
|
+
"findImportDeclarations(...) needs a source path"
|
79
|
+
);
|
80
|
+
|
81
|
+
return this.findImportDeclarations(sourcePath).length > 0;
|
82
|
+
},
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Renames all ImportDeclarations with the given name
|
86
|
+
*
|
87
|
+
* @param {string} sourcePath
|
88
|
+
* @param {string} newSourcePath
|
89
|
+
* @return {Collection}
|
90
|
+
*/
|
91
|
+
renameImportDeclaration: function (sourcePath, newSourcePath) {
|
92
|
+
assert.ok(
|
93
|
+
sourcePath && typeof sourcePath === "string",
|
94
|
+
"renameImportDeclaration(...) needs a name to look for"
|
95
|
+
);
|
96
|
+
|
97
|
+
assert.ok(
|
98
|
+
newSourcePath && typeof newSourcePath === "string",
|
99
|
+
"renameImportDeclaration(...) needs a new name to rename to"
|
100
|
+
);
|
101
|
+
|
102
|
+
return this.findImportDeclarations(sourcePath).forEach((path) => {
|
103
|
+
path.value.source.value = newSourcePath;
|
104
|
+
});
|
105
|
+
},
|
106
|
+
};
|
107
|
+
|
108
|
+
function register() {
|
109
|
+
NodeCollection.register();
|
110
|
+
Collection.registerMethods(globalMethods, types.Node);
|
111
|
+
}
|
112
|
+
|
113
|
+
exports.register = once(register);
|
@@ -9,14 +9,13 @@
|
|
9
9
|
'use strict';
|
10
10
|
|
11
11
|
const fs = require('fs');
|
12
|
-
const mkdirp = require('mkdirp');
|
13
12
|
const path = require('path');
|
14
13
|
const temp = require('temp');
|
15
14
|
|
16
15
|
function renameFileTo(oldPath, newFilename, extension = '') {
|
17
16
|
const projectPath = path.dirname(oldPath);
|
18
17
|
const newPath = path.join(projectPath, newFilename + extension);
|
19
|
-
|
18
|
+
fs.mkdirSync(path.dirname(newPath), { recursive: true });
|
20
19
|
fs.renameSync(oldPath, newPath);
|
21
20
|
return newPath;
|
22
21
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# jscodeshift docs
|
2
|
+
|
3
|
+
[](https://starlight.astro.build)
|
4
|
+
|
5
|
+
## 🚀 Project Structure
|
6
|
+
|
7
|
+
```
|
8
|
+
.
|
9
|
+
├── public/
|
10
|
+
├── src/
|
11
|
+
│ ├── assets/
|
12
|
+
│ ├── content/
|
13
|
+
│ │ ├── docs/
|
14
|
+
│ │ └── config.ts
|
15
|
+
│ └── env.d.ts
|
16
|
+
├── astro.config.mjs
|
17
|
+
├── package.json
|
18
|
+
└── tsconfig.json
|
19
|
+
```
|
20
|
+
|
21
|
+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on
|
22
|
+
its file name.
|
23
|
+
|
24
|
+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
|
25
|
+
|
26
|
+
Static assets, like favicons, can be placed in the `public/` directory.
|
27
|
+
|
28
|
+
## 🧞 Commands
|
29
|
+
|
30
|
+
All commands are run from the root of the project, from a terminal:
|
31
|
+
|
32
|
+
| Command | Action |
|
33
|
+
|:-----------------------|:-------------------------------------------------|
|
34
|
+
| `yarn install` | Installs dependencies |
|
35
|
+
| `yarn dev` | Starts local dev server at `localhost:4321` |
|
36
|
+
| `yarn build` | Build your production site to `./dist/` |
|
37
|
+
| `yarn preview` | Preview your build locally, before deploying |
|
38
|
+
| `yarn astro ...` | Run CLI commands like `astro add`, `astro check` |
|
39
|
+
| `yarn astro -- --help` | Get help using the Astro CLI |
|
40
|
+
|
41
|
+
## 👀 Want to learn more?
|
42
|
+
|
43
|
+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build),
|
44
|
+
or jump into the [Astro Discord server](https://astro.build/chat).
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import {defineConfig} from 'astro/config';
|
2
|
+
import starlight from '@astrojs/starlight';
|
3
|
+
|
4
|
+
// https://astro.build/config
|
5
|
+
export default defineConfig({
|
6
|
+
integrations: [
|
7
|
+
starlight({
|
8
|
+
title: 'jscodeshift',
|
9
|
+
social: {
|
10
|
+
github: 'https://github.com/facebook/jscodeshift',
|
11
|
+
},
|
12
|
+
sidebar: [
|
13
|
+
{
|
14
|
+
label: 'Overview',
|
15
|
+
items: [
|
16
|
+
// Each item here is one entry in the navigation menu.
|
17
|
+
{label: 'Introduction', link: '/overview/introduction/'},
|
18
|
+
],
|
19
|
+
},
|
20
|
+
{
|
21
|
+
label: 'Building',
|
22
|
+
items: [
|
23
|
+
{label: 'API Reference', link: '/build/api-reference/'},
|
24
|
+
{label: 'AST Grammar', link: '/build/ast-grammar/'},
|
25
|
+
],
|
26
|
+
},
|
27
|
+
{
|
28
|
+
label: 'Running',
|
29
|
+
items: [
|
30
|
+
{label: 'CLI', link: '/run/cli/'},
|
31
|
+
],
|
32
|
+
},
|
33
|
+
],
|
34
|
+
}),
|
35
|
+
],
|
36
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "docs",
|
3
|
+
"type": "module",
|
4
|
+
"version": "0.0.1",
|
5
|
+
"scripts": {
|
6
|
+
"dev": "astro dev",
|
7
|
+
"start": "astro dev",
|
8
|
+
"build": "astro build",
|
9
|
+
"preview": "astro preview",
|
10
|
+
"astro": "astro"
|
11
|
+
},
|
12
|
+
"dependencies": {
|
13
|
+
"@astrojs/starlight": "^0.24.4",
|
14
|
+
"astro": "^4.10.2",
|
15
|
+
"sharp": "^0.32.5"
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 287.56 191"><defs><style>.cls-1{fill:#0081fb;}.cls-2{fill:url(#linear-gradient);}.cls-3{fill:url(#linear-gradient-2);}</style><linearGradient id="linear-gradient" x1="62.34" y1="101.45" x2="260.34" y2="91.45" gradientTransform="matrix(1, 0, 0, -1, 0, 192)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0064e1"/><stop offset="0.4" stop-color="#0064e1"/><stop offset="0.83" stop-color="#0073ee"/><stop offset="1" stop-color="#0082fb"/></linearGradient><linearGradient id="linear-gradient-2" x1="41.42" y1="53" x2="41.42" y2="126" gradientTransform="matrix(1, 0, 0, -1, 0, 192)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0082fb"/><stop offset="1" stop-color="#0064e0"/></linearGradient></defs><title>facebook-meta</title><path class="cls-1" d="M31.06,126c0,11,2.41,19.41,5.56,24.51A19,19,0,0,0,53.19,160c8.1,0,15.51-2,29.79-21.76,11.44-15.83,24.92-38,34-52l15.36-23.6c10.67-16.39,23-34.61,37.18-47C181.07,5.6,193.54,0,206.09,0c21.07,0,41.14,12.21,56.5,35.11,16.81,25.08,25,56.67,25,89.27,0,19.38-3.82,33.62-10.32,44.87C271,180.13,258.72,191,238.13,191V160c17.63,0,22-16.2,22-34.74,0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16c-18.2,32.27-22.81,39.62-31.91,51.75C84.74,183,71.12,191,53.19,191c-21.27,0-34.72-9.21-43-23.09C3.34,156.6,0,141.76,0,124.85Z"/><path class="cls-2" d="M24.49,37.3C38.73,15.35,59.28,0,82.85,0c13.65,0,27.22,4,41.39,15.61,15.5,12.65,32,33.48,52.63,67.81l7.39,12.32c17.84,29.72,28,45,33.93,52.22,7.64,9.26,13,12,19.94,12,17.63,0,22-16.2,22-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87C271,180.13,258.72,191,238.13,191c-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71L146.08,93.6c-12.94-21.62-24.81-37.74-31.68-45C107,40.71,97.51,31.23,82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78Z"/><path class="cls-3" d="M82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78C38.61,71.62,31.06,99.34,31.06,126c0,11,2.41,19.41,5.56,24.51L10.14,167.91C3.34,156.6,0,141.76,0,124.85,0,94.1,8.44,62.05,24.49,37.3,38.73,15.35,59.28,0,82.85,0Z"/></svg>
|
Binary file
|
@@ -0,0 +1,406 @@
|
|
1
|
+
---
|
2
|
+
title: API Reference
|
3
|
+
---
|
4
|
+
|
5
|
+
import {Steps, LinkCard, Card, CardGrid} from '@astrojs/starlight/components';
|
6
|
+
|
7
|
+
`jscodeshift` has around 25 APIs to help developers easily detect and transform any JS/TS code.
|
8
|
+
|
9
|
+
Generally, creating a codemod involves two main tasks: **detection** and **transformation**.
|
10
|
+
|
11
|
+
<Steps>
|
12
|
+
1. **Detection**
|
13
|
+
|
14
|
+
Detecting a specific pattern in a large codebase can be expensive, so this task is often divided into two passes.
|
15
|
+
|
16
|
+
<Steps>
|
17
|
+
1. **First pass**
|
18
|
+
|
19
|
+
In the first pass, we perform an initial scope reduction of the AST nodes to significantly reduce the search space and produce a collection of AST nodes to process.
|
20
|
+
2. **Second pass**
|
21
|
+
|
22
|
+
In the second pass, we process and filter the nodes collection to pinpoint the specific AST nodes that need transformation.
|
23
|
+
</Steps>
|
24
|
+
|
25
|
+
2. **Transformation**
|
26
|
+
|
27
|
+
Once we detect the desired nodes, we transform the AST and produce the modified code.
|
28
|
+
</Steps>
|
29
|
+
|
30
|
+
For jscodeshift, we have a set of APIs for each part of the codemod process (initial traversal, filtering, transformation), as detailed below. jscodeshift accepts `—parser` as argument. We can select from the list of parser that are currently supported, all those parsers should be compatible with `estree` spec and have same AST grammar. It's important to know the AST grammar for describing the nodes in the codemod.
|
31
|
+
|
32
|
+
Refer to the [`jscodeshift` node types](/build/ast-grammar/).
|
33
|
+
|
34
|
+
## Building jscodeshift codemods
|
35
|
+
|
36
|
+
<CardGrid>
|
37
|
+
<LinkCard title="Core API" href="#core-api"/>
|
38
|
+
<LinkCard title="Node Traversal APIs" href="#node-traversal-apis"/>
|
39
|
+
<LinkCard title="Node Transformation APIs" href="#node-transformation-apis"/>
|
40
|
+
</CardGrid>
|
41
|
+
|
42
|
+
## Core API
|
43
|
+
|
44
|
+
### **`jscodeshift`**
|
45
|
+
|
46
|
+
The main function that returns the jscodeshift instance.
|
47
|
+
|
48
|
+
**Parameters**: `source` (String): The source code to be transformed.
|
49
|
+
|
50
|
+
**Example**:
|
51
|
+
|
52
|
+
```jsx
|
53
|
+
const jscodeshift = require('jscodeshift');
|
54
|
+
const sourceCode = `const a = 1;`;
|
55
|
+
const j = jscodeshift(sourceCode);
|
56
|
+
```
|
57
|
+
|
58
|
+
## Node Traversal APIs
|
59
|
+
|
60
|
+
Below are APIs that often used in the **initial scope reduction** phase ([source](https://github.com/facebook/jscodeshift/blob/4851fc8a01036868efb4cf9676f3e97836097376/src/collections/Node.js#L139)). The input is usually the whole file, and the output is a collection of nodes.
|
61
|
+
|
62
|
+
### **`find`**
|
63
|
+
|
64
|
+
Finds nodes that match the provided type.
|
65
|
+
|
66
|
+
**Parameters**: `type` (String or Function): The type of nodes to find.
|
67
|
+
|
68
|
+
**Example**:
|
69
|
+
|
70
|
+
```jsx
|
71
|
+
const variableDeclarations = j.find(j.VariableDeclaration);
|
72
|
+
```
|
73
|
+
|
74
|
+
### **`closestScope`**
|
75
|
+
|
76
|
+
Finds the closest enclosing scope of a node. Useful for determining the scope context of variables and functions.
|
77
|
+
|
78
|
+
**Example**:
|
79
|
+
|
80
|
+
```jsx
|
81
|
+
const closestScopes = j.find(j.Identifier).closestScope();
|
82
|
+
```
|
83
|
+
|
84
|
+
### **`closest`**
|
85
|
+
|
86
|
+
Finds the nearest parent node that matches the specified type. The child node must be obtained from a previous function call, such as find.
|
87
|
+
|
88
|
+
**Parameters**:`type` (String or Function): The type of ancestor to find.
|
89
|
+
|
90
|
+
```jsx
|
91
|
+
const closestFunction = j.find(j.Identifier).closest(j.FunctionDeclaration);
|
92
|
+
```
|
93
|
+
|
94
|
+
### **`getVariableDeclarators`**
|
95
|
+
|
96
|
+
Retrieves variable declarators from the current collection. If the callback function returns a falsy value, the element is not included in the result.
|
97
|
+
|
98
|
+
**Parameters**:`callback` (Function): A function that returns the name of the variable to find.
|
99
|
+
|
100
|
+
**Example**:
|
101
|
+
|
102
|
+
```jsx
|
103
|
+
const variableDeclarators = j.find(j.Identifier).getVariableDeclarators(path => path.value.name);
|
104
|
+
```
|
105
|
+
|
106
|
+
### **`findVariableDeclarators` ([source](https://github.com/facebook/jscodeshift/blob/main/src/collections/VariableDeclarator.js))**
|
107
|
+
|
108
|
+
Finds variable declarators by name.
|
109
|
+
|
110
|
+
**Parameters**: `name` (String): The name of the variable to find.
|
111
|
+
|
112
|
+
**Example**:
|
113
|
+
|
114
|
+
```jsx
|
115
|
+
const variableDeclarators = j.findVariableDeclarators('a');
|
116
|
+
```
|
117
|
+
|
118
|
+
Below are the APIs that are often used in the second phase, which is the **detailed node filtering** ([source](https://github.com/facebook/jscodeshift/blob/4851fc8a01036868efb4cf9676f3e97836097376/src/Collection.js)). The input of this phase is usually a collection of nodes, and the output, is specific nodes to transform.
|
119
|
+
|
120
|
+
### **`filter`**
|
121
|
+
|
122
|
+
Filters nodes based on a predicate function.
|
123
|
+
|
124
|
+
**Parameters**: `predicate` (Function): A function to test each element.
|
125
|
+
|
126
|
+
**Example**:
|
127
|
+
|
128
|
+
```jsx
|
129
|
+
const constDeclarations = j.find(j.VariableDeclaration)
|
130
|
+
.filter(path => path.node.kind === 'const');
|
131
|
+
```
|
132
|
+
|
133
|
+
### **`forEach`**
|
134
|
+
|
135
|
+
Iterates over each node in the collection.
|
136
|
+
|
137
|
+
**Parameters**: `callback` (Function): A function to call for each node.
|
138
|
+
|
139
|
+
**Example**:
|
140
|
+
|
141
|
+
```jsx
|
142
|
+
j.find(j.VariableDeclaration).forEach(path => {
|
143
|
+
console.log(path.node);
|
144
|
+
});
|
145
|
+
```
|
146
|
+
|
147
|
+
### `some`
|
148
|
+
|
149
|
+
`some` checks if at least one element in the collection passes the test implemented by the provided function.
|
150
|
+
|
151
|
+
**Parameters:** `callback`: A function that tests each element. The callback function takes three arguments:
|
152
|
+
|
153
|
+
- `path`: The current element being processed.
|
154
|
+
- `index`: The index of the current element.
|
155
|
+
- `array`: The array `some` was called upon.
|
156
|
+
|
157
|
+
**Example:**
|
158
|
+
|
159
|
+
```jsx
|
160
|
+
const j = require('jscodeshift');
|
161
|
+
|
162
|
+
const root = j(`const a = 1; const b = 2; const c = 3;`);
|
163
|
+
|
164
|
+
const hasVariableA = root.find(j.VariableDeclarator).some(path => path.node.id.name === 'a');
|
165
|
+
console.log(hasVariableA); // true
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
### `every`
|
170
|
+
|
171
|
+
`every` checks if all elements in the collection pass the test implemented by the provided function.
|
172
|
+
|
173
|
+
**Parameters:** `callback`: A function that tests each element. The callback function takes three arguments:
|
174
|
+
|
175
|
+
- `path`: The current element being processed.
|
176
|
+
- `index`: The index of the current element.
|
177
|
+
- `array`: The array `every` was called upon.
|
178
|
+
|
179
|
+
**Example:**
|
180
|
+
|
181
|
+
```jsx
|
182
|
+
const j = require('jscodeshift');
|
183
|
+
|
184
|
+
const root = j(`const a = 1; const b = 2; const c = 3;`);
|
185
|
+
|
186
|
+
const allAreConst = root.find(j.VariableDeclaration).every(path => path.node.kind === 'const');
|
187
|
+
console.log(allAreConst); // true
|
188
|
+
|
189
|
+
```
|
190
|
+
|
191
|
+
### **`map`**
|
192
|
+
|
193
|
+
Maps each node in the collection to a new value.
|
194
|
+
|
195
|
+
**Parameters**:`callback` (Function): A function to call for each node.
|
196
|
+
|
197
|
+
**Example**:
|
198
|
+
|
199
|
+
```jsx
|
200
|
+
const variableNames = j.find(j.VariableDeclaration)
|
201
|
+
.map(path => path.node.declarations.map(decl => decl.id.name));
|
202
|
+
```
|
203
|
+
|
204
|
+
### **`size`**
|
205
|
+
|
206
|
+
Returns the number of nodes in the collection.
|
207
|
+
|
208
|
+
**Example**:
|
209
|
+
|
210
|
+
```jsx
|
211
|
+
const numberOfNodes = j.find(j.VariableDeclaration).size();
|
212
|
+
```
|
213
|
+
|
214
|
+
### `length`
|
215
|
+
|
216
|
+
`length` returns the number of elements in the collection.
|
217
|
+
|
218
|
+
**Example:**
|
219
|
+
|
220
|
+
```jsx
|
221
|
+
const j = require('jscodeshift');
|
222
|
+
|
223
|
+
const root = j(`const a = 1; const b = 2; const c = 3;`);
|
224
|
+
|
225
|
+
const varCount = root.find(j.VariableDeclarator).length;
|
226
|
+
console.log(varCount); // 3
|
227
|
+
|
228
|
+
```
|
229
|
+
|
230
|
+
### **`nodes`**
|
231
|
+
|
232
|
+
Returns the AST nodes in the collection.
|
233
|
+
|
234
|
+
**Example**:
|
235
|
+
|
236
|
+
```jsx
|
237
|
+
const nodes = j.find(j.VariableDeclaration).nodes();
|
238
|
+
```
|
239
|
+
|
240
|
+
### **`paths`**
|
241
|
+
|
242
|
+
Returns the paths of the found nodes.
|
243
|
+
|
244
|
+
**Example**:
|
245
|
+
|
246
|
+
```jsx
|
247
|
+
const paths = j.find(j.VariableDeclaration).paths();
|
248
|
+
```
|
249
|
+
|
250
|
+
### `getAST`
|
251
|
+
|
252
|
+
`getAST` returns the root AST node of the collection.
|
253
|
+
|
254
|
+
**Example:**
|
255
|
+
|
256
|
+
```jsx
|
257
|
+
const j = require('jscodeshift');
|
258
|
+
|
259
|
+
const root = j(`const a = 1;`);
|
260
|
+
|
261
|
+
const ast = root.getAST();
|
262
|
+
console.log(ast.type); // File
|
263
|
+
|
264
|
+
```
|
265
|
+
|
266
|
+
### **`get`**
|
267
|
+
|
268
|
+
Gets the first node in the collection.
|
269
|
+
|
270
|
+
**Example**:
|
271
|
+
|
272
|
+
```jsx
|
273
|
+
const firstVariableDeclaration = j.find(j.VariableDeclaration).get();
|
274
|
+
```
|
275
|
+
|
276
|
+
### **`at`**
|
277
|
+
|
278
|
+
Navigates to a specific path in the AST.
|
279
|
+
|
280
|
+
**Parameters**: `index` (Number): The index of the path to navigate to.
|
281
|
+
|
282
|
+
**Example**:
|
283
|
+
|
284
|
+
```jsx
|
285
|
+
const secondVariableDeclaration = j.find(j.VariableDeclaration).at(1);
|
286
|
+
```
|
287
|
+
|
288
|
+
### `getTypes`
|
289
|
+
|
290
|
+
`getTypes` returns the set of node types present in the collection.
|
291
|
+
|
292
|
+
**Example:**
|
293
|
+
|
294
|
+
```jsx
|
295
|
+
const j = require('jscodeshift');
|
296
|
+
|
297
|
+
const root = j(`const a = 1; const b = 2;`);
|
298
|
+
|
299
|
+
const types = root.find(j.VariableDeclarator).getTypes();
|
300
|
+
console.log(types); // Set { 'VariableDeclarator' }
|
301
|
+
|
302
|
+
```
|
303
|
+
|
304
|
+
### `isOfType`
|
305
|
+
|
306
|
+
`isOfType` checks if the node in the collection is of a specific type.
|
307
|
+
|
308
|
+
**Parameters:** `type`: The type to check against.
|
309
|
+
|
310
|
+
**Example:**
|
311
|
+
|
312
|
+
```jsx
|
313
|
+
const j = require('jscodeshift');
|
314
|
+
|
315
|
+
const root = j(`const a = 1;`);
|
316
|
+
|
317
|
+
const isVariableDeclarator = root.find(j.VariableDeclarator).at(0).isOfType('VariableDeclarator');
|
318
|
+
console.log(isVariableDeclarator); // true
|
319
|
+
|
320
|
+
```
|
321
|
+
|
322
|
+
## Node Transformation APIs
|
323
|
+
|
324
|
+
Below are the APIs used in node transformations. ([source](https://github.com/facebook/jscodeshift/blob/4851fc8a01036868efb4cf9676f3e97836097376/src/collections/Node.js#L139))
|
325
|
+
|
326
|
+
### **`replaceWith`**
|
327
|
+
|
328
|
+
Replaces the current node(s) with a new node.
|
329
|
+
|
330
|
+
**Parameters**: `newNode` (Node or Function): The new node or a function that returns a new node.
|
331
|
+
|
332
|
+
**Example**:
|
333
|
+
|
334
|
+
```jsx
|
335
|
+
j.find(j.Identifier)
|
336
|
+
.replaceWith(path => j.identifier(path.node.name.toUpperCase()));
|
337
|
+
```
|
338
|
+
|
339
|
+
### **`insertBefore`**
|
340
|
+
|
341
|
+
Inserts a node before the current node.
|
342
|
+
|
343
|
+
**Parameters**: `newNode` (Node): The node to insert.
|
344
|
+
|
345
|
+
**Example**:
|
346
|
+
|
347
|
+
```jsx
|
348
|
+
j.find(j.FunctionDeclaration)
|
349
|
+
.insertBefore(j.expressionStatement(j.stringLiteral('Inserted before')));
|
350
|
+
```
|
351
|
+
|
352
|
+
### **`insertAfter`**
|
353
|
+
|
354
|
+
Inserts a node after the current node.
|
355
|
+
|
356
|
+
**Parameters**: `newNode` (Node): The node to insert.
|
357
|
+
|
358
|
+
**Example**:
|
359
|
+
|
360
|
+
```jsx
|
361
|
+
j.find(j.FunctionDeclaration)
|
362
|
+
.insertAfter(j.expressionStatement(j.stringLiteral('Inserted after')));
|
363
|
+
```
|
364
|
+
|
365
|
+
### **`remove`**
|
366
|
+
|
367
|
+
Removes the current node(s).
|
368
|
+
|
369
|
+
**Example**:
|
370
|
+
|
371
|
+
```jsx
|
372
|
+
j.find(j.VariableDeclaration).remove();
|
373
|
+
```
|
374
|
+
|
375
|
+
### `renameTo` ([source](https://github.com/facebook/jscodeshift/blob/main/src/collections/VariableDeclarator.js))
|
376
|
+
|
377
|
+
`renameTo` renames the nodes in the collection to a new name.
|
378
|
+
|
379
|
+
**Parameters:** `newName`: The new name to rename to.
|
380
|
+
|
381
|
+
**Example:**
|
382
|
+
|
383
|
+
```jsx
|
384
|
+
const j = require('jscodeshift');
|
385
|
+
|
386
|
+
const root = j(`const a = 1; const b = 2;`);
|
387
|
+
|
388
|
+
root.find(j.Identifier, { name: 'a' }).renameTo('x');
|
389
|
+
|
390
|
+
console.log(root.toSource()); // const x = 1; const b = 2;
|
391
|
+
|
392
|
+
```
|
393
|
+
|
394
|
+
These descriptions and examples should give you a clear understanding of how to use each of these jscodeshift APIs.
|
395
|
+
|
396
|
+
### **`toSource`**
|
397
|
+
|
398
|
+
Converts the transformed AST back to source code.
|
399
|
+
|
400
|
+
**Parameters**: `options` (Object): Optional formatting options.
|
401
|
+
|
402
|
+
**Example**:
|
403
|
+
|
404
|
+
```jsx
|
405
|
+
const transformedSource = j.toSource({ quote: 'single' });
|
406
|
+
```
|