├── test ├── unit │ ├── tsx │ │ ├── lib.ts │ │ ├── lib.tsx │ │ ├── dep.tsx │ │ ├── input.js │ │ └── output.js │ ├── dirname-emit │ │ ├── asset.txt │ │ ├── subdir │ │ │ └── file.txt │ │ ├── input.js │ │ └── output.js │ ├── fs-emission │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── asset3.txt │ │ ├── output.js │ │ └── input.js │ ├── import-assertions │ │ ├── foo.js │ │ ├── info.json │ │ ├── input.js │ │ └── output.js │ ├── import-attributes │ │ ├── foo.js │ │ ├── info.json │ │ ├── input.js │ │ └── output.js │ ├── path-sep │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-graceful-fs │ │ ├── sub │ │ │ └── asset.txt │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-node-require │ │ ├── mock.node │ │ ├── input.js │ │ └── output.js │ ├── class-static │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── multi-input │ │ ├── asset.txt │ │ ├── asset-2.txt │ │ ├── style.module.css │ │ ├── input-3.js │ │ ├── input.js │ │ ├── input-2.js │ │ ├── input-4.js │ │ ├── child-3.js │ │ ├── child-4.js │ │ ├── child-1.js │ │ ├── child-2.js │ │ └── output.js │ ├── require-symlink │ │ ├── symlink │ │ ├── input.js │ │ ├── another.js │ │ └── output.js │ ├── ts-path-join │ │ ├── file.txt │ │ ├── output.js │ │ └── input.js │ ├── webpack-wrapper │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-extra │ │ ├── asset1.txt │ │ ├── asset2.json │ │ └── input.js │ ├── asset-fs-inlining-multi │ │ ├── sub │ │ │ └── asset.txt │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inlining │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-logical │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-symlink │ │ ├── asset.txt │ │ ├── asset1.txt │ │ ├── input.js │ │ └── output.js │ ├── glob-dot │ │ ├── with-dot │ │ │ └── .dot │ │ │ │ └── first.txt │ │ ├── without-dot │ │ │ └── normal │ │ │ │ └── first.txt │ │ ├── output.js │ │ └── input.js │ ├── import-meta-url │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── imports │ │ ├── no.js │ │ ├── node.js │ │ ├── input.js │ │ ├── output.js │ │ └── package.json │ ├── process-cwd │ │ ├── _posts │ │ │ ├── first.md │ │ │ └── second.md │ │ ├── output.js │ │ └── input.js │ ├── process-env │ │ ├── a.js │ │ ├── b.js │ │ ├── input.js │ │ └── output.js │ ├── require-dot │ │ ├── input.js │ │ ├── index.js │ │ └── output.js │ ├── require-resolve │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── asset3.txt │ │ ├── dep2.js │ │ ├── dep1.js │ │ ├── output.js │ │ └── input.js │ ├── return-emission │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── webpack-wrapper-multi │ │ ├── asset.txt │ │ └── output.js │ ├── wildcard │ │ ├── assets │ │ │ ├── asset1.txt │ │ │ ├── asset2.txt │ │ │ └── asset3.txt │ │ ├── input.js │ │ └── output.js │ ├── wildcard2 │ │ ├── assets │ │ │ ├── asset1.txt │ │ │ ├── asset2.txt │ │ │ └── asset3.txt │ │ ├── input.js │ │ └── output.js │ ├── wildcard3 │ │ ├── assets │ │ │ ├── asset1.txt │ │ │ ├── asset2.txt │ │ │ └── asset3.txt │ │ ├── input.js │ │ └── output.js │ ├── array-emission │ │ ├── renderer │ │ │ ├── dom.js │ │ │ └── util.js │ │ ├── output.js │ │ └── input.js │ ├── array-holes │ │ ├── input.js │ │ └── output.js │ ├── asset-conditional │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-array-expr │ │ ├── asset1.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-inline-tpl │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── browserify │ │ ├── dep1.js │ │ ├── dep2.js │ │ ├── output.js │ │ └── input.js │ ├── dirname-emit-concat │ │ ├── assets │ │ │ └── file.txt │ │ ├── input.js │ │ └── output.js │ ├── esm │ │ ├── esm-dep.js │ │ ├── input.js │ │ └── output.js │ ├── exports │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── index.js │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ └── import-main.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ └── output.js │ ├── import-meta-bad-url │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── output.js │ │ └── input.js │ ├── import-meta-tpl-cnd │ │ ├── asset1.txt │ │ ├── asset2.txt │ │ ├── output.js │ │ └── input.js │ ├── protobuf-loop │ │ ├── assets │ │ │ ├── asset1.txt │ │ │ └── asset2.txt │ │ ├── output.js │ │ └── input.js │ ├── protobuf-loop2 │ │ ├── assets │ │ │ ├── asset1.txt │ │ │ └── asset2.txt │ │ ├── output.js │ │ └── input.js │ ├── require-call │ │ ├── input.js │ │ └── output.js │ ├── tsx-input │ │ ├── dep.tsx │ │ ├── input.tsx │ │ └── output.js │ ├── yarn-workspaces │ │ ├── input.js │ │ ├── node_modules │ │ │ └── x │ │ ├── packages │ │ │ └── x │ │ │ │ ├── dep.js │ │ │ │ ├── main.ts │ │ │ │ └── package.json │ │ ├── .gitignore │ │ └── output.js │ ├── asset-fs-inline-path-babel │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-inline-path-enc-es │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inline-path-shadow │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-inline-path-ts │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── dot-dot │ │ ├── index.js │ │ ├── input.js │ │ ├── dir │ │ │ └── dot-dot-req.js │ │ └── output.js │ ├── esm-paths │ │ ├── esm-dep.js │ │ ├── input.js │ │ └── output.js │ ├── exports-fallback │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ └── import-main.js │ │ │ │ ├── index.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ └── output.js │ ├── exports-nomodule │ │ ├── no.js │ │ ├── node.js │ │ ├── input.js │ │ ├── output.js │ │ └── package.json │ ├── exports-only │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── index.js │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ └── import-main.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ └── output.js │ ├── exports-wildcard │ │ ├── no.js │ │ ├── node.js │ │ ├── input.js │ │ ├── output.js │ │ └── package.json │ ├── ffmpeg-installer │ │ ├── ffmpeg.exe │ │ ├── input.js │ │ ├── output.js │ │ └── ffmpeg.js │ ├── jsx-input │ │ ├── dep.jsx │ │ ├── output.js │ │ └── input.jsx │ ├── module-register │ │ ├── hook.mjs │ │ ├── hook2.mjs │ │ ├── hook3.mjs │ │ ├── node_modules │ │ │ └── test-pkg │ │ │ │ ├── index.mjs │ │ │ │ └── package.json │ │ ├── input-esm.mjs │ │ ├── input.js │ │ └── output.js │ ├── resolve-from │ │ ├── dep.js │ │ ├── input.js │ │ └── output.js │ ├── resolve-hook │ │ ├── dep.js │ │ ├── input.js │ │ └── output.js │ ├── when-wrapper │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-array-expr-node-prefix │ │ ├── asset1.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-inline-path-enc-es-2 │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inline-path-enc-es-3 │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inline-path-enc-es-4 │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── asset-fs-inline-path-enc-es-5 │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── basic-analysis-require │ │ ├── input.js │ │ ├── dep.js │ │ └── output.js │ ├── browser-remappings │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ ├── import-main.js │ │ │ │ └── import-main-browser.js │ │ │ │ ├── index.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ ├── test-opts.json │ │ ├── .gitignore │ │ └── output.js │ ├── browserify-uglify │ │ ├── dep1.js │ │ ├── dep2.js │ │ ├── output.js │ │ └── input.js │ ├── esm-dynamic-import │ │ ├── dep.js │ │ ├── package.json │ │ ├── input.js │ │ └── output.js │ ├── esm-export-wildcard │ │ ├── all.js │ │ ├── input.js │ │ ├── week.js │ │ └── output.js │ ├── module-require │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── processed-dependency │ │ ├── parent-1.js │ │ ├── parent-2.js │ │ ├── child-2.js │ │ ├── input-cached.js │ │ ├── child.js │ │ ├── input.js │ │ ├── output-cached.js │ │ └── output.js │ ├── require-wrapper │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── require-wrapper2 │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── require-wrapper3 │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── string-concat │ │ ├── lib │ │ │ └── dep.js │ │ ├── input.js │ │ └── output.js │ ├── top-level-await │ │ ├── module.js │ │ ├── input.js │ │ └── output.js │ ├── ts-input-esm │ │ ├── dep2.ts │ │ ├── input.ts │ │ ├── package.json │ │ ├── dep1.ts │ │ ├── output.js │ │ └── tsconfig.json │ ├── webpack-wrapper-dirname-inject │ │ ├── schema.prisma │ │ └── output.js │ ├── webpack-wrapper-name │ │ ├── input.js │ │ └── output.js │ ├── webpack-wrapper-null │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inline-path-ts-no-interop │ │ ├── asset.txt │ │ ├── output.js │ │ └── input.js │ ├── browser-remappings-false │ │ ├── input.js │ │ ├── test-opts.json │ │ ├── .gitignore │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ └── output.js │ ├── esm-paths-trailer │ │ ├── esm-dep.js │ │ ├── input.js │ │ └── output.js │ ├── jsonc-parser-wrapper │ │ ├── dep.js │ │ ├── output.js │ │ └── input.js │ ├── node-modules-filter │ │ ├── sub │ │ │ └── node_modules │ │ │ │ └── pkg │ │ │ │ └── noemit │ │ ├── output.js │ │ └── input.js │ ├── non-analyzable-requires │ │ ├── dep.js │ │ ├── ignored.js │ │ ├── output.js │ │ └── input.js │ ├── prisma-photon │ │ ├── input.js │ │ ├── node_modules │ │ │ └── @generated │ │ │ │ └── photon │ │ │ │ ├── index.js │ │ │ │ └── runtime │ │ │ │ └── query-engine-darwin │ │ └── output.js │ ├── require-dirname-tpl │ │ ├── dep.js │ │ ├── input.js │ │ └── output.js │ ├── ts-filter │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── index.ts │ │ │ │ ├── index.js │ │ │ │ └── dep.js │ │ ├── output.js │ │ └── input.js │ ├── webpack-node │ │ ├── level1 │ │ │ ├── a.b.js │ │ │ ├── c.d.js │ │ │ └── level2 │ │ │ │ └── level3 │ │ │ │ └── page.js │ │ ├── input.js │ │ └── output.js │ ├── asset-fs-inline-path-enc-es-node-prefix │ │ ├── asset.txt │ │ ├── input.js │ │ └── output.js │ ├── asset-package-json │ │ ├── package.json │ │ ├── output.js │ │ └── input.js │ ├── browser-remappings-disabled │ │ ├── input.js │ │ ├── test-opts.json │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ ├── import-main.js │ │ │ │ └── import-main-browser.js │ │ │ │ ├── index.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ ├── .gitignore │ │ └── output.js │ ├── browser-remappings-malformed │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ ├── import-main.js │ │ │ │ └── import-main-browser.js │ │ │ │ ├── index.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ ├── test-opts.json │ │ ├── .gitignore │ │ └── output.js │ ├── browser-remappings-malformed2 │ │ ├── input.js │ │ ├── test-opts.json │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── index.js │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ ├── import-main.js │ │ │ │ └── import-main-browser.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ ├── .gitignore │ │ └── output.js │ ├── browser-remappings-string │ │ ├── input.js │ │ ├── test-opts.json │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ ├── .gitignore │ │ └── output.js │ ├── browser-remappings-undefined │ │ ├── input.js │ │ ├── node_modules │ │ │ └── pkg │ │ │ │ ├── subdir │ │ │ │ ├── package.json │ │ │ │ ├── import-main.js │ │ │ │ └── import-main-browser.js │ │ │ │ ├── index.js │ │ │ │ ├── require-main.cjs │ │ │ │ └── package.json │ │ ├── test-opts.json │ │ ├── .gitignore │ │ └── output.js │ ├── file-folder-slash │ │ ├── input.js │ │ ├── file-folder.js │ │ ├── file-folder │ │ │ └── index.js │ │ └── output.js │ ├── module-create-require │ │ ├── lib.node │ │ ├── output.js │ │ └── input.js │ ├── mongoose │ │ ├── dir │ │ │ └── connection.js │ │ ├── input.js │ │ └── output.js │ ├── require-dynamic-fallback │ │ ├── dep.js │ │ ├── input.js │ │ └── output.js │ ├── wildcard-require │ │ ├── modules │ │ │ ├── module1.js │ │ │ ├── module2.js │ │ │ └── module3.js │ │ ├── input.js │ │ └── output.js │ ├── yarn-workspace-esm │ │ ├── node_modules │ │ │ ├── @example │ │ │ │ ├── web │ │ │ │ └── common │ │ │ └── .yarn-integrity │ │ ├── .gitignore │ │ ├── input.js │ │ ├── packages │ │ │ ├── common │ │ │ │ ├── hello.js │ │ │ │ └── package.json │ │ │ └── web │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ ├── yarn.lock │ │ ├── package.json │ │ └── output.js │ ├── mixed-esm-cjs │ │ ├── ecmascript-module.js │ │ ├── commonjs-module.js │ │ ├── input.js │ │ └── output.js │ ├── syntax-err │ │ ├── input.js │ │ └── output.js │ ├── webpack-wrapper-strs-namespaces-large │ │ ├── content │ │ │ ├── packages.json │ │ │ └── guides │ │ │ │ └── index.md │ │ └── output.js │ ├── datadog-pprof-node-gyp │ │ └── input.js │ ├── require-var-branch │ │ ├── lib1 │ │ │ └── createsend.js │ │ ├── lib2 │ │ │ └── createsend.js │ │ ├── input.js │ │ └── output.js │ ├── webpack-5-wrapper-namespace │ │ ├── assets │ │ │ └── dictionary.json │ │ ├── output.js │ │ └── input.js │ ├── pkginfo │ │ ├── input.js │ │ ├── package.json │ │ └── output.js │ ├── webpack-wrapper-strs-namespaces │ │ ├── assets │ │ │ └── dictionary.json │ │ └── output.js │ ├── url-error │ │ ├── input.js │ │ └── output.js │ ├── null-destructure │ │ ├── input.js │ │ └── output.js │ ├── pnpm-symlinks │ │ ├── node_modules │ │ │ ├── .pnpm │ │ │ │ ├── node_modules │ │ │ │ │ └── parse5 │ │ │ │ ├── parse5-htmlparser2-tree-adapter@6.0.1 │ │ │ │ │ └── node_modules │ │ │ │ │ │ ├── parse5 │ │ │ │ │ │ └── parse5-htmlparser2-tree-adapter │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ └── README.md │ │ │ │ ├── parse5@6.0.1 │ │ │ │ │ └── node_modules │ │ │ │ │ │ └── parse5 │ │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── utils │ │ │ │ │ │ │ ├── merge-options.js │ │ │ │ │ │ │ └── mixin.js │ │ │ │ │ │ ├── extensions │ │ │ │ │ │ │ ├── error-reporting │ │ │ │ │ │ │ │ ├── tokenizer-mixin.js │ │ │ │ │ │ │ │ ├── preprocessor-mixin.js │ │ │ │ │ │ │ │ ├── mixin-base.js │ │ │ │ │ │ │ │ └── parser-mixin.js │ │ │ │ │ │ │ └── location-info │ │ │ │ │ │ │ │ └── open-element-stack-mixin.js │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── LICENSE │ │ │ │ └── lock.yaml │ │ │ ├── parse5-htmlparser2-tree-adapter │ │ │ └── .modules.yaml │ │ ├── input.js │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ └── output.js │ ├── zeromq-node-gyp │ │ ├── input.js │ │ └── output.js │ ├── amd-disable │ │ ├── output.js │ │ └── input.js │ ├── dirname-len │ │ ├── output.js │ │ └── input.js │ ├── exports-path │ │ ├── node_modules │ │ │ ├── apollo-upload-client │ │ │ │ ├── index.js │ │ │ │ ├── public │ │ │ │ │ └── ReactNativeFile.js │ │ │ │ └── package.json │ │ │ └── extract-files │ │ │ │ ├── public │ │ │ │ └── ReactNativeFile.js │ │ │ │ └── package.json │ │ ├── input.js │ │ └── output.js │ ├── require-empty │ │ ├── output.js │ │ └── input.js │ ├── filter-asset-base │ │ ├── output.js │ │ └── input.js │ ├── microtime-node-gyp │ │ ├── input.js │ │ └── output.js │ ├── pixelmatch │ │ ├── input.js │ │ └── output.js │ ├── phantomjs-prebuilt │ │ ├── input.js │ │ └── output.js │ ├── browserify-minify │ │ ├── output.js │ │ └── input.js │ └── shiki │ │ └── input.js ├── fixtures │ ├── tsconfig.json │ ├── es-module-dep.js │ ├── index.html │ ├── test.ts │ ├── es-module.js │ ├── img.jpg │ └── test.js ├── integration │ ├── camaro.js │ ├── got.js │ ├── loopback.js │ ├── mariadb.js │ ├── oracledb.js │ ├── chromeless.js │ ├── fast-glob.js │ ├── hot-shots.js │ ├── jimp.js │ ├── lighthouse.js │ ├── azure-storage.js │ ├── firebase-admin.js │ ├── path-platform.js │ ├── azure-cosmos.js │ ├── es-get-iterator.js │ ├── express.js │ ├── fetch-h2.js │ ├── ioredis.js │ ├── mailgun.js │ ├── stripe.js │ ├── dogfood.js │ ├── firestore.js │ ├── sentry.js │ ├── bindings-failure.js │ ├── datadog-pprof.js │ ├── paraphrase.js │ ├── tiny-json-http.js │ ├── browserify-middleware.js │ ├── ffmpeg.js │ ├── koa.js │ ├── sparql-builder.js │ ├── aws-sdk.js │ ├── jugglingdb.js │ ├── zeromq.js │ ├── passport-trakt.js │ ├── pg.js │ ├── pug.js │ ├── bugsnag-js.js │ ├── core-js.js │ ├── passport.js │ ├── redis.js │ ├── when.js │ ├── vm2.js │ ├── argon2.js │ ├── saslprep.js │ ├── serialport.js │ ├── env-var.js │ ├── leveldown.js │ ├── memcached.js │ ├── analytics-node.js │ ├── geo-tz.js │ ├── fluent-ffmpeg.js │ ├── geoip-lite.js │ ├── otel-api.js │ ├── pixelmatch.js │ ├── bcrypt.js │ ├── esm.js │ ├── google-bigquery.js │ ├── sequelize.js │ ├── pdfkit.js │ ├── uglify.js │ ├── mysql.js │ ├── twilio.js │ ├── semver.js │ ├── highlights.js │ ├── cowsay.js │ ├── pdf2json.js │ ├── socket.io.js │ ├── remark-prism.mjs │ ├── auth0.js │ ├── sharp.js │ ├── react.js │ ├── sharp-pnpm.js │ ├── vue.js │ ├── axios.js │ ├── rxjs.js │ ├── playwright-core.js │ ├── shiki.js │ ├── esbuild.js │ ├── isomorphic-unfetch.js │ ├── express-template.js │ ├── polyfill-library.js │ ├── mongoose.js │ ├── express-template-engine.js │ ├── request.js │ ├── express-consolidate.js │ ├── apollo.js │ ├── bull.js │ ├── typescript.js │ ├── bullmq.js │ └── firebase.js └── ecmascript │ ├── README.md │ └── update-all-data.mjs ├── release.config.js ├── .gitignore ├── .github ├── CODEOWNERS └── workflows │ └── pr.yml ├── src ├── index.ts └── utils │ ├── types.ts │ ├── interop-require.ts │ ├── sharedlib-emit.ts │ ├── get-package-base.ts │ └── ast-helpers.ts ├── .prettierignore ├── jest.config.js ├── .git-blame-ignore-revs ├── .kodiak.toml ├── tsconfig.json └── LICENSE /test/unit/tsx/lib.ts: -------------------------------------------------------------------------------- 1 | included 2 | -------------------------------------------------------------------------------- /test/fixtures/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/unit/dirname-emit/asset.txt: -------------------------------------------------------------------------------- 1 | asset -------------------------------------------------------------------------------- /test/unit/fs-emission/asset1.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/unit/fs-emission/asset2.txt: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /test/unit/fs-emission/asset3.txt: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /test/unit/import-assertions/foo.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/unit/import-attributes/foo.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/unit/path-sep/asset.txt: -------------------------------------------------------------------------------- 1 | asset 2 | -------------------------------------------------------------------------------- /test/unit/tsx/lib.tsx: -------------------------------------------------------------------------------- 1 | not included 2 | -------------------------------------------------------------------------------- /test/integration/camaro.js: -------------------------------------------------------------------------------- 1 | require('camaro') -------------------------------------------------------------------------------- /test/integration/got.js: -------------------------------------------------------------------------------- 1 | require('got'); 2 | -------------------------------------------------------------------------------- /test/unit/asset-graceful-fs/sub/asset.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/unit/asset-node-require/mock.node: -------------------------------------------------------------------------------- 1 | asdf -------------------------------------------------------------------------------- /test/unit/class-static/asset.txt: -------------------------------------------------------------------------------- 1 | asset 2 | -------------------------------------------------------------------------------- /test/unit/dirname-emit/subdir/file.txt: -------------------------------------------------------------------------------- 1 | file -------------------------------------------------------------------------------- /test/unit/multi-input/asset.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/require-symlink/symlink: -------------------------------------------------------------------------------- 1 | another.js -------------------------------------------------------------------------------- /test/unit/ts-path-join/file.txt: -------------------------------------------------------------------------------- 1 | file content -------------------------------------------------------------------------------- /test/unit/tsx/dep.tsx: -------------------------------------------------------------------------------- 1 | import './lib'; 2 | -------------------------------------------------------------------------------- /test/unit/tsx/input.js: -------------------------------------------------------------------------------- 1 | require('./dep'); -------------------------------------------------------------------------------- /test/unit/webpack-wrapper/asset.txt: -------------------------------------------------------------------------------- 1 | asset -------------------------------------------------------------------------------- /test/fixtures/es-module-dep.js: -------------------------------------------------------------------------------- 1 | export var p = 5; -------------------------------------------------------------------------------- /test/integration/loopback.js: -------------------------------------------------------------------------------- 1 | require("loopback"); -------------------------------------------------------------------------------- /test/unit/asset-fs-extra/asset1.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/asset-fs-inlining-multi/sub/asset.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/unit/asset-fs-inlining/asset.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/asset-fs-logical/asset1.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/asset-fs-logical/asset2.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/asset-graceful-fs/asset.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/asset-symlink/asset.txt: -------------------------------------------------------------------------------- 1 | ./asset1.txt -------------------------------------------------------------------------------- /test/unit/asset-symlink/asset1.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/glob-dot/with-dot/.dot/first.txt: -------------------------------------------------------------------------------- 1 | hello -------------------------------------------------------------------------------- /test/unit/import-meta-url/asset.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /test/unit/imports/no.js: -------------------------------------------------------------------------------- 1 | export var y = 'y'; 2 | -------------------------------------------------------------------------------- /test/unit/multi-input/asset-2.txt: -------------------------------------------------------------------------------- 1 | hello again -------------------------------------------------------------------------------- /test/unit/process-cwd/_posts/first.md: -------------------------------------------------------------------------------- 1 | # first -------------------------------------------------------------------------------- /test/unit/process-cwd/_posts/second.md: -------------------------------------------------------------------------------- 1 | # second -------------------------------------------------------------------------------- /test/unit/process-env/a.js: -------------------------------------------------------------------------------- 1 | console.log('a'); 2 | -------------------------------------------------------------------------------- /test/unit/process-env/b.js: -------------------------------------------------------------------------------- 1 | console.log('b'); 2 | -------------------------------------------------------------------------------- /test/unit/require-dot/input.js: -------------------------------------------------------------------------------- 1 | require('.'); 2 | -------------------------------------------------------------------------------- /test/unit/require-resolve/asset1.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/require-resolve/asset2.txt: -------------------------------------------------------------------------------- 1 | asset2 2 | -------------------------------------------------------------------------------- /test/unit/require-resolve/asset3.txt: -------------------------------------------------------------------------------- 1 | asset3 2 | -------------------------------------------------------------------------------- /test/unit/return-emission/asset.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/webpack-wrapper-multi/asset.txt: -------------------------------------------------------------------------------- 1 | asset -------------------------------------------------------------------------------- /test/unit/wildcard/assets/asset1.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/wildcard/assets/asset2.txt: -------------------------------------------------------------------------------- 1 | asset2 2 | -------------------------------------------------------------------------------- /test/unit/wildcard/assets/asset3.txt: -------------------------------------------------------------------------------- 1 | asset3 2 | -------------------------------------------------------------------------------- /test/unit/wildcard2/assets/asset1.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/wildcard2/assets/asset2.txt: -------------------------------------------------------------------------------- 1 | asset2 2 | -------------------------------------------------------------------------------- /test/unit/wildcard2/assets/asset3.txt: -------------------------------------------------------------------------------- 1 | asset3 2 | -------------------------------------------------------------------------------- /test/unit/wildcard3/assets/asset1.txt: -------------------------------------------------------------------------------- 1 | asset1 2 | -------------------------------------------------------------------------------- /test/unit/wildcard3/assets/asset2.txt: -------------------------------------------------------------------------------- 1 | asset2 2 | -------------------------------------------------------------------------------- /test/unit/wildcard3/assets/asset3.txt: -------------------------------------------------------------------------------- 1 | asset3 2 | -------------------------------------------------------------------------------- /test/fixtures/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
npm install --save parse5
15 | 19 | 📖 Documentation 📖 20 |
21 | 22 | --- 23 | 24 |25 | List of parse5 toolset packages 26 |
27 | 28 |29 | GitHub 30 |
31 | 32 |33 | Online playground 34 |
35 | 36 |37 | Version history 38 |
39 | -------------------------------------------------------------------------------- /test/unit/ffmpeg-installer/ffmpeg.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var os = require('os'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | 7 | var verifyFile; 8 | 9 | var platform = (os.platform() + '-' + os.arch()) && '.'; 10 | 11 | var packageName = '@ffmpeg-installer/' + platform; 12 | 13 | var binary = os.platform() === 'win32' ? 'ffmpeg.exe' : 'ffmpeg.exe'; 14 | 15 | // var npm3Path = path.resolve(__dirname, '..', platform); 16 | var npm2Path = path.resolve(__dirname, '.', platform); 17 | 18 | var npm3Binary = path.join(npm3Path, binary); 19 | var npm2Binary = path.join(npm2Path, binary); 20 | 21 | var npm3Package = path.join(npm3Path, 'package.json'); 22 | var npm2Package = path.join(npm2Path, 'package.json'); 23 | 24 | var ffmpegPath, packageJson; 25 | 26 | if (verifyFile(npm3Binary)) { 27 | ffmpegPath = npm3Binary; 28 | } else if (verifyFile(npm2Binary)) { 29 | ffmpegPath = npm2Binary; 30 | } else { 31 | throw 'Could not find ffmpeg executable, tried "' + npm3Binary + '" and "' + npm2Binary + '"'; 32 | } 33 | 34 | var version = packageJson.ffmpeg || packageJson.version; 35 | var url = packageJson.homepage; 36 | 37 | module.exports = { 38 | path: ffmpegPath, 39 | version: version, 40 | url: url 41 | }; -------------------------------------------------------------------------------- /src/utils/get-package-base.ts: -------------------------------------------------------------------------------- 1 | // returns the base-level package folder based on detecting "node_modules" 2 | // package name boundaries 3 | const pkgNameRegEx = /^(@[^\\\/]+[\\\/])?[^\\\/]+/; 4 | 5 | export function getPackageBase(id: string): string | undefined { 6 | const pkgIndex = id.lastIndexOf('node_modules'); 7 | if ( 8 | pkgIndex !== -1 && 9 | (id[pkgIndex - 1] === '/' || id[pkgIndex - 1] === '\\') && 10 | (id[pkgIndex + 12] === '/' || id[pkgIndex + 12] === '\\') 11 | ) { 12 | const pkgNameMatch = id.slice(pkgIndex + 13).match(pkgNameRegEx); 13 | if (pkgNameMatch) 14 | return id.slice(0, pkgIndex + 13 + pkgNameMatch[0].length); 15 | } 16 | return undefined; 17 | } 18 | 19 | export function getPackageName(id: string): string | undefined { 20 | const pkgIndex = id.lastIndexOf('node_modules'); 21 | if ( 22 | pkgIndex !== -1 && 23 | (id[pkgIndex - 1] === '/' || id[pkgIndex - 1] === '\\') && 24 | (id[pkgIndex + 12] === '/' || id[pkgIndex + 12] === '\\') 25 | ) { 26 | const pkgNameMatch = id.slice(pkgIndex + 13).match(pkgNameRegEx); 27 | if (pkgNameMatch && pkgNameMatch.length > 0) { 28 | return pkgNameMatch[0].replace(/\\/g, '/'); 29 | } 30 | } 31 | return undefined; 32 | } 33 | -------------------------------------------------------------------------------- /test/unit/pnpm-symlinks/node_modules/.pnpm/parse5@6.0.1/node_modules/parse5/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /test/unit/webpack-wrapper-strs-namespaces-large/output.js: -------------------------------------------------------------------------------- 1 | [ 2 | "node_modules/object-assign/index.js", 3 | "node_modules/object-assign/package.json", 4 | "node_modules/prop-types/checkPropTypes.js", 5 | "node_modules/prop-types/factoryWithThrowingShims.js", 6 | "node_modules/prop-types/factoryWithTypeCheckers.js", 7 | "node_modules/prop-types/index.js", 8 | "node_modules/prop-types/lib/ReactPropTypesSecret.js", 9 | "node_modules/prop-types/lib/has.js", 10 | "node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js", 11 | "node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js", 12 | "node_modules/prop-types/node_modules/react-is/index.js", 13 | "node_modules/prop-types/node_modules/react-is/package.json", 14 | "node_modules/prop-types/package.json", 15 | "node_modules/react/cjs/react.development.js", 16 | "node_modules/react/cjs/react.production.min.js", 17 | "node_modules/react/index.js", 18 | "node_modules/react/package.json", 19 | "package.json", 20 | "test/unit/webpack-wrapper-strs-namespaces-large/content/guides/index.md", 21 | "test/unit/webpack-wrapper-strs-namespaces-large/content/packages.json", 22 | "test/unit/webpack-wrapper-strs-namespaces-large/input.js" 23 | ] 24 | -------------------------------------------------------------------------------- /test/unit/pnpm-symlinks/node_modules/.pnpm/parse5@6.0.1/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Mixin = require('../../utils/mixin'); 4 | 5 | class ErrorReportingMixinBase extends Mixin { 6 | constructor(host, opts) { 7 | super(host); 8 | 9 | this.posTracker = null; 10 | this.onParseError = opts.onParseError; 11 | } 12 | 13 | _setErrorLocation(err) { 14 | err.startLine = err.endLine = this.posTracker.line; 15 | err.startCol = err.endCol = this.posTracker.col; 16 | err.startOffset = err.endOffset = this.posTracker.offset; 17 | } 18 | 19 | _reportError(code) { 20 | const err = { 21 | code: code, 22 | startLine: -1, 23 | startCol: -1, 24 | startOffset: -1, 25 | endLine: -1, 26 | endCol: -1, 27 | endOffset: -1 28 | }; 29 | 30 | this._setErrorLocation(err); 31 | this.onParseError(err); 32 | } 33 | 34 | _getOverriddenMethods(mxn) { 35 | return { 36 | _err(code) { 37 | mxn._reportError(code); 38 | } 39 | }; 40 | } 41 | } 42 | 43 | module.exports = ErrorReportingMixinBase; 44 | -------------------------------------------------------------------------------- /test/unit/browserify-minify/input.js: -------------------------------------------------------------------------------- 1 | ! function (e) { 2 | "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).ytSearch = e() 3 | }(function () { 4 | return function r(l, u, o) { 5 | function s(t, e) { 6 | if (!u[t]) { 7 | if (!l[t]) { 8 | var i = "function" == typeof require && require; 9 | if (!e && i) return i(t, !0); 10 | if (c) return c(t, !0); 11 | var n = new Error("Cannot find module '" + t + "'"); 12 | throw n.code = "MODULE_NOT_FOUND", n 13 | } 14 | var a = u[t] = { 15 | exports: {} 16 | }; 17 | l[t][0].call(a.exports, function (e) { 18 | return s(l[t][1][e] || e) 19 | }, a, a.exports, r, l, u, o) 20 | } 21 | return u[t].exports 22 | } 23 | for (var c = "function" == typeof require && require, e = 0; e < o.length; e++) s(o[e]); 24 | return s 25 | }({ 26 | 1: [function (s, e, t) { 27 | "use strict"; 28 | var ee = s("acorn"); 29 | }, { 30 | acorn: void 0 31 | }] 32 | }, {}, [1])(1) 33 | }); -------------------------------------------------------------------------------- /test/unit/pnpm-symlinks/node_modules/.pnpm/parse5-htmlparser2-tree-adapter@6.0.1/node_modules/parse5-htmlparser2-tree-adapter/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /test/unit/pnpm-symlinks/node_modules/.pnpm/parse5-htmlparser2-tree-adapter@6.0.1/node_modules/parse5-htmlparser2-tree-adapter/README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
npm install --save parse5-htmlparser2-tree-adapter
15 | 19 | 📖 Documentation 📖 20 |
21 | 22 | --- 23 | 24 |25 | List of parse5 toolset packages 26 |
27 | 28 |29 | GitHub 30 |
31 | 32 |33 | Version history 34 |
35 | -------------------------------------------------------------------------------- /test/unit/pixelmatch/output.js: -------------------------------------------------------------------------------- 1 | [ 2 | "node_modules/pixelmatch/bin/pixelmatch", 3 | "node_modules/pixelmatch/index.js", 4 | "node_modules/pixelmatch/package.json", 5 | "node_modules/pngjs/lib/bitmapper.js", 6 | "node_modules/pngjs/lib/bitpacker.js", 7 | "node_modules/pngjs/lib/chunkstream.js", 8 | "node_modules/pngjs/lib/constants.js", 9 | "node_modules/pngjs/lib/crc.js", 10 | "node_modules/pngjs/lib/filter-pack.js", 11 | "node_modules/pngjs/lib/filter-parse-async.js", 12 | "node_modules/pngjs/lib/filter-parse-sync.js", 13 | "node_modules/pngjs/lib/filter-parse.js", 14 | "node_modules/pngjs/lib/format-normaliser.js", 15 | "node_modules/pngjs/lib/interlace.js", 16 | "node_modules/pngjs/lib/packer-async.js", 17 | "node_modules/pngjs/lib/packer-sync.js", 18 | "node_modules/pngjs/lib/packer.js", 19 | "node_modules/pngjs/lib/paeth-predictor.js", 20 | "node_modules/pngjs/lib/parser-async.js", 21 | "node_modules/pngjs/lib/parser-sync.js", 22 | "node_modules/pngjs/lib/parser.js", 23 | "node_modules/pngjs/lib/png-sync.js", 24 | "node_modules/pngjs/lib/png.js", 25 | "node_modules/pngjs/lib/sync-inflate.js", 26 | "node_modules/pngjs/lib/sync-reader.js", 27 | "node_modules/pngjs/package.json", 28 | "package.json", 29 | "test/unit/pixelmatch/input.js" 30 | ] -------------------------------------------------------------------------------- /test/integration/firebase.js: -------------------------------------------------------------------------------- 1 | const firebase = require('firebase/app') 2 | require('firebase/firestore') 3 | require('firebase/database') 4 | 5 | firebase.initializeApp({ projectId: 'noop' }) 6 | const store = firebase.firestore() 7 | 8 | store 9 | .collection('users') 10 | .get() 11 | .then( 12 | () => { 13 | process.exit(0) 14 | }, 15 | e => { 16 | /* 17 | Error: unresolvable extensions: 'extend google.protobuf.MethodOptions' in .google.api 18 | at Root.resolveAll (/private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/node_modules/protobufjs/src/root.js:243:1) 19 | at Object.loadSync (/private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/a707d6b7ee4afe5b484993180e617e2d/index.js:43406:16) 20 | at loadProtos (/private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/a707d6b7ee4afe5b484993180e617e2d/index.js:16778:41) 21 | at NodePlatform.module.exports.278.NodePlatform.loadConnection (/private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/a707d6b7ee4afe5b484993180e617e2d/index.js:16815:22) 22 | at FirestoreClient.module.exports.278.FirestoreClient.initializeRest (/private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/a707d6b7ee4afe5b484993180e617e2d/index.js:28414:14) 23 | at /private/var/folders/c3/vytj6_h56b77f_g72smntm3m0000gn/T/a707d6b7ee4afe5b484993180e617e2d/index.js:28239:64 24 | */ 25 | console.error(e) 26 | process.exit(1) 27 | } 28 | ) 29 | -------------------------------------------------------------------------------- /src/utils/ast-helpers.ts: -------------------------------------------------------------------------------- 1 | import { Node } from './types'; 2 | 3 | export function isIdentifierRead(node: Node, parent: Node) { 4 | switch (parent.type) { 5 | case 'ObjectPattern': 6 | case 'ArrayPattern': 7 | // Note: default values not currently supported 8 | return false; 9 | // disregard `bar` in `bar = thing()` 10 | case 'AssignmentExpression': 11 | return parent.right === node; 12 | case 'MemberExpression': 13 | return parent.computed || node === parent.object; 14 | // disregard the `bar` in `{ bar: foo }` 15 | case 'Property': 16 | return node === parent.value; 17 | // disregard the `bar` in `class Foo { bar () {...} }` 18 | case 'MethodDefinition': 19 | return false; 20 | // disregard the `bar` in var bar = asdf 21 | case 'VariableDeclarator': 22 | return parent.id !== node; 23 | // disregard the `bar` in `export { foo as bar }` 24 | case 'ExportSpecifier': 25 | return false; 26 | // disregard the `bar` in `function (bar) {}` 27 | case 'FunctionExpression': 28 | case 'FunctionDeclaration': 29 | case 'ArrowFunctionExpression': 30 | return false; 31 | default: 32 | return true; 33 | } 34 | } 35 | 36 | export function isVarLoop(node: Node) { 37 | return ( 38 | node.type === 'ForStatement' || 39 | node.type === 'ForInStatement' || 40 | node.type === 'ForOfStatement' 41 | ); 42 | } 43 | 44 | export function isLoop(node: Node) { 45 | return ( 46 | node.type === 'ForStatement' || 47 | node.type === 'ForInStatement' || 48 | node.type === 'ForOfStatement' || 49 | node.type === 'WhileStatement' || 50 | node.type === 'DoWhileStatement' 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /test/unit/asset-fs-inline-path-babel/input.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4 | 5 | var _fs = _interopRequireDefault(require("fs")); 6 | 7 | var path = _interopRequireWildcard(require("path")); 8 | 9 | function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } 10 | 11 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } 12 | 13 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14 | 15 | console.log(_fs["default"].readFileSync(path.join(__dirname, 'asset.txt'), 'utf8')); 16 | 17 | /* Input source: 18 | import fs from 'fs'; 19 | import * as path from 'path'; 20 | 21 | console.log(fs.readFileSync(path.join(__dirname, 'asset.txt'), 'utf8')); 22 | */ 23 | -------------------------------------------------------------------------------- /test/unit/webpack-5-wrapper-namespace/input.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var exports = {}; 3 | exports.id = 223; 4 | exports.ids = [223]; 5 | exports.modules = { 6 | 7 | /***/ 0: 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | module.exports = __webpack_require__("PicC"); 11 | 12 | 13 | /***/ }), 14 | 15 | /***/ "PicC": 16 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 17 | 18 | "use strict"; 19 | __webpack_require__.r(__webpack_exports__); 20 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return handler; }); 21 | /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = require('path'); 22 | /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); 23 | /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = require('fs'); 24 | /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); 25 | 26 | f(__webpack_require__("oyvS")); 27 | 28 | 29 | function handler(req, res) { 30 | const dictionaryPath = path__WEBPACK_IMPORTED_MODULE_0___default().join(process.cwd(), "assets", "dictionary.json"); 31 | const content = fs__WEBPACK_IMPORTED_MODULE_1___default().readFileSync(dictionaryPath, "utf-8"); 32 | res.json(content); 33 | } 34 | 35 | /***/ }), 36 | 37 | /***/ "mw/K": 38 | /***/ (function(module, exports) { 39 | 40 | module.exports = require("fs"); 41 | 42 | /***/ }), 43 | 44 | /***/ "oyvS": 45 | /***/ (function(module, exports) { 46 | 47 | module.exports = require("path"); 48 | 49 | /***/ }) 50 | 51 | /******/ }; 52 | 53 | // load runtime 54 | var __webpack_require__ = require("../../webpack-runtime.js"); 55 | __webpack_require__.C(exports); 56 | var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } 57 | var __webpack_exports__ = (__webpack_exec__(277)); 58 | module.exports = __webpack_exports__; 59 | 60 | })(); 61 | -------------------------------------------------------------------------------- /test/unit/webpack-wrapper/input.js: -------------------------------------------------------------------------------- 1 | !(function(e) { 2 | var t = {}; 3 | function r(n) { 4 | if (t[n]) return t[n].exports; 5 | var o = (t[n] = { i: n, l: !1, exports: {} }); 6 | return e[n].call(o.exports, o, o.exports, r), (o.l = !0), o.exports; 7 | } 8 | (r.m = e), 9 | (r.c = t), 10 | (r.d = function(e, t, n) { 11 | r.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n }); 12 | }), 13 | (r.r = function(e) { 14 | "undefined" != typeof Symbol && 15 | Symbol.toStringTag && 16 | Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), 17 | Object.defineProperty(e, "__esModule", { value: !0 }); 18 | }), 19 | (r.t = function(e, t) { 20 | if ((1 & t && (e = r(e)), 8 & t)) return e; 21 | if (4 & t && "object" == typeof e && e && e.__esModule) return e; 22 | var n = Object.create(null); 23 | if ( 24 | (r.r(n), 25 | Object.defineProperty(n, "default", { enumerable: !0, value: e }), 26 | 2 & t && "string" != typeof e) 27 | ) 28 | for (var o in e) 29 | r.d( 30 | n, 31 | o, 32 | function(t) { 33 | return e[t]; 34 | }.bind(null, o) 35 | ); 36 | return n; 37 | }), 38 | (r.n = function(e) { 39 | var t = 40 | e && e.__esModule 41 | ? function() { 42 | return e.default; 43 | } 44 | : function() { 45 | return e; 46 | }; 47 | return r.d(t, "a", t), t; 48 | }), 49 | (r.o = function(e, t) { 50 | return Object.prototype.hasOwnProperty.call(e, t); 51 | }), 52 | (r.p = ""), 53 | r((r.s = 2)); 54 | })([ 55 | function(e, t) { 56 | e.exports = require("fs"); 57 | }, 58 | function(e, t) { 59 | e.exports = require("path"); 60 | }, 61 | function(e, t, r) { 62 | const n = r(0), 63 | o = r(1); 64 | console.log(n.readFileSync(o.resolve(__dirname, "./asset.txt"))); 65 | } 66 | ]); -------------------------------------------------------------------------------- /test/unit/pnpm-symlinks/node_modules/.pnpm/parse5@6.0.1/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const ErrorReportingMixinBase = require('./mixin-base'); 4 | const ErrorReportingTokenizerMixin = require('./tokenizer-mixin'); 5 | const LocationInfoTokenizerMixin = require('../location-info/tokenizer-mixin'); 6 | const Mixin = require('../../utils/mixin'); 7 | 8 | class ErrorReportingParserMixin extends ErrorReportingMixinBase { 9 | constructor(parser, opts) { 10 | super(parser, opts); 11 | 12 | this.opts = opts; 13 | this.ctLoc = null; 14 | this.locBeforeToken = false; 15 | } 16 | 17 | _setErrorLocation(err) { 18 | if (this.ctLoc) { 19 | err.startLine = this.ctLoc.startLine; 20 | err.startCol = this.ctLoc.startCol; 21 | err.startOffset = this.ctLoc.startOffset; 22 | 23 | err.endLine = this.locBeforeToken ? this.ctLoc.startLine : this.ctLoc.endLine; 24 | err.endCol = this.locBeforeToken ? this.ctLoc.startCol : this.ctLoc.endCol; 25 | err.endOffset = this.locBeforeToken ? this.ctLoc.startOffset : this.ctLoc.endOffset; 26 | } 27 | } 28 | 29 | _getOverriddenMethods(mxn, orig) { 30 | return { 31 | _bootstrap(document, fragmentContext) { 32 | orig._bootstrap.call(this, document, fragmentContext); 33 | 34 | Mixin.install(this.tokenizer, ErrorReportingTokenizerMixin, mxn.opts); 35 | Mixin.install(this.tokenizer, LocationInfoTokenizerMixin); 36 | }, 37 | 38 | _processInputToken(token) { 39 | mxn.ctLoc = token.location; 40 | 41 | orig._processInputToken.call(this, token); 42 | }, 43 | 44 | _err(code, options) { 45 | mxn.locBeforeToken = options && options.beforeToken; 46 | mxn._reportError(code); 47 | } 48 | }; 49 | } 50 | } 51 | 52 | module.exports = ErrorReportingParserMixin; 53 | --------------------------------------------------------------------------------