[update]
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
dist
|
dist
|
||||||
output.csv
|
output.csv
|
||||||
output/
|
output/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
cache
|
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -12,7 +12,7 @@
|
|||||||
"<node_internals>/**"
|
"<node_internals>/**"
|
||||||
],
|
],
|
||||||
"program": "${workspaceFolder}/src/index.mjs",
|
"program": "${workspaceFolder}/src/index.mjs",
|
||||||
"args": ["${workspaceFolder}/test_src/index.js"],
|
"args": ["${workspaceFolder}/test_src/index.mjs"],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"cache/**": true
|
||||||
|
},
|
||||||
|
}
|
518
minableRepositories2.csv
Normal file
518
minableRepositories2.csv
Normal file
@@ -0,0 +1,518 @@
|
|||||||
|
debug,npm run test:node && npm run test:browser && npm run lint
|
||||||
|
emoji-regex,mocha
|
||||||
|
react-is,node ./scripts/jest/jest-cli.js
|
||||||
|
glob-parent,nyc mocha --async-only
|
||||||
|
kind-of,mocha
|
||||||
|
json-schema-traverse,npm run eslint && nyc npm run test-spec
|
||||||
|
eslint-visitor-keys,npm test --workspaces --if-present
|
||||||
|
js-yaml,npm run lint && mocha
|
||||||
|
argparse,npm run lint && nyc mocha
|
||||||
|
estraverse,npm run-script lint && npm run-script unit-test
|
||||||
|
fs-extra,npm run lint && npm run unit && npm run unit-esm
|
||||||
|
picomatch,npm run lint && npm run mocha
|
||||||
|
cross-spawn,jest --env node --coverage
|
||||||
|
punycode,mocha tests
|
||||||
|
iconv-lite,mocha --reporter spec --grep .
|
||||||
|
ws,nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js
|
||||||
|
is-number,mocha
|
||||||
|
webidl-conversions,mocha test/*.js
|
||||||
|
form-data,npm run tests-only
|
||||||
|
braces,mocha -r ./test/mocha-initialization.js
|
||||||
|
fill-range,npm run lint && npm run mocha
|
||||||
|
eslint-scope,npm test --workspaces --if-present
|
||||||
|
micromatch,mocha
|
||||||
|
jsesc,mocha tests
|
||||||
|
mime-db,mocha --reporter spec --check-leaks test/
|
||||||
|
to-regex-range,mocha
|
||||||
|
is-glob,mocha && node benchmark.js
|
||||||
|
typescript,hereby runtests-parallel --light=false
|
||||||
|
mime-types,mocha --reporter spec test/test.js
|
||||||
|
normalize-path,mocha
|
||||||
|
doctrine,nyc mocha
|
||||||
|
define-property,mocha
|
||||||
|
js-tokens,eslint . --report-unused-disable-directives && prettier --check . && npm run build && tsd && node benchmark.js && vitest run
|
||||||
|
sprintf-js,mocha test/*.js
|
||||||
|
extend-shallow,mocha
|
||||||
|
lodash,npm run test:main && npm run test:fp
|
||||||
|
is-arrayish,mocha --require coffeescript/register ./test/**/*.coffee
|
||||||
|
anymatch,nyc mocha
|
||||||
|
undici-types,npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript
|
||||||
|
statuses,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
fast-deep-equal,npm run build && npm run eslint && npm run test-ts && npm run test-cov
|
||||||
|
source-map-support,mocha
|
||||||
|
jsonfile,npm run lint && npm run unit
|
||||||
|
is-extglob,mocha
|
||||||
|
optionator,make test
|
||||||
|
http-errors,mocha --reporter spec
|
||||||
|
prelude-ls,make test
|
||||||
|
type-check,make test
|
||||||
|
levn,make test
|
||||||
|
node-fetch,mocha
|
||||||
|
depd,mocha --reporter spec --bail test/
|
||||||
|
async,npm run lint && npm run mocha-node-test
|
||||||
|
encodeurl,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
esprima,npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis
|
||||||
|
espree,npm test --workspaces --if-present
|
||||||
|
@babel/helper-module-imports,make test
|
||||||
|
regenerator-runtime,test/run.sh
|
||||||
|
istanbul-lib-instrument,"cross-env NODE_ENV=test nyc mocha --timeout 30000 packages/*/test{,/*}.js"
|
||||||
|
esutils,npm run-script lint && npm run-script unit-test
|
||||||
|
negotiator,mocha --reporter spec --check-leaks test/
|
||||||
|
eslint,node Makefile.js test
|
||||||
|
require-directory,mocha
|
||||||
|
flat-cache,pnpm -r --workspace-concurrency 1 test
|
||||||
|
bytes,mocha --check-leaks --reporter spec
|
||||||
|
file-entry-cache,pnpm -r --workspace-concurrency 1 test
|
||||||
|
setprototypeof,standard && mocha
|
||||||
|
isobject,mocha -r esm
|
||||||
|
is-extendable,mocha
|
||||||
|
fast-levenshtein,mocha
|
||||||
|
asynckit,istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec
|
||||||
|
esrecurse,gulp travis
|
||||||
|
@eslint/eslintrc,mocha -R progress -c 'tests/lib/*.cjs' && c8 mocha -R progress -c 'tests/lib/**/*.js'
|
||||||
|
is-plain-object,npm run test_node && npm run build && npm run test_browser
|
||||||
|
esquery,nyc npm run mocha && npm run lint
|
||||||
|
tmp,npm run clean && istanbul cover ./node_modules/mocha/bin/_mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul report text-summary
|
||||||
|
on-finished,mocha --reporter spec --check-leaks test/
|
||||||
|
loader-utils,jest
|
||||||
|
follow-redirects,nyc mocha
|
||||||
|
error-ex,mocha --compilers coffee:coffee-script/register
|
||||||
|
merge-stream,istanbul cover test.js && istanbul check-cover --statements 100 --branches 100
|
||||||
|
bn.js,npm run lint && npm run unit
|
||||||
|
magic-string,vitest run
|
||||||
|
eventemitter3,c8 --reporter=lcov --reporter=text mocha test/test.js
|
||||||
|
lodash.merge,npm run test:main && npm run test:fp
|
||||||
|
raw-body,mocha --trace-deprecation --reporter spec --bail --check-leaks test/
|
||||||
|
finalhandler,mocha --reporter spec --check-leaks test/
|
||||||
|
gensync,jest
|
||||||
|
word-wrap,mocha
|
||||||
|
istanbul-lib-coverage,"cross-env NODE_ENV=test nyc mocha --timeout 30000 packages/*/test{,/*}.js"
|
||||||
|
send,mocha --check-leaks --reporter spec
|
||||||
|
arg,WARN_EXIT=1 jest --coverage -w 2
|
||||||
|
retry,./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape ./test/integration/*.js
|
||||||
|
body-parser,mocha --reporter spec --check-leaks test/
|
||||||
|
accepts,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
serve-static,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
@eslint/js,node Makefile.js test
|
||||||
|
tapable,jest
|
||||||
|
istanbul-reports,"cross-env NODE_ENV=test nyc mocha --timeout 30000 packages/*/test{,/*}.js"
|
||||||
|
toidentifier,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
fresh,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
media-typer,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
istanbul-lib-source-maps,"cross-env NODE_ENV=test nyc mocha --timeout 30000 packages/*/test{,/*}.js"
|
||||||
|
express,mocha --require test/support/env --reporter spec --check-leaks test/ test/acceptance/
|
||||||
|
range-parser,mocha --reporter spec
|
||||||
|
@sinonjs/fake-timers,npm run test-node && npm run test-headless
|
||||||
|
type-is,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
istanbul-lib-report,"cross-env NODE_ENV=test nyc mocha --timeout 30000 packages/*/test{,/*}.js"
|
||||||
|
scheduler,node ./scripts/jest/jest-cli.js
|
||||||
|
escape-html,mocha test/
|
||||||
|
cookie-signature,mocha --require should --reporter spec
|
||||||
|
ansi-colors,mocha
|
||||||
|
content-type,mocha --reporter spec --check-leaks --bail test/
|
||||||
|
terser,node test/compress.js && mocha test/mocha
|
||||||
|
ee-first,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
require-from-string,mocha
|
||||||
|
vary,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
escodegen,gulp travis
|
||||||
|
parseurl,mocha --check-leaks --bail --reporter spec test/
|
||||||
|
react,node ./scripts/jest/jest-cli.js
|
||||||
|
eastasianwidth,mocha
|
||||||
|
through2,npm run lint && npm run test:node && npm run test:browser
|
||||||
|
etag,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
unpipe,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
@babel/plugin-syntax-typescript,make test
|
||||||
|
@babel/helper-optimise-call-expression,make test
|
||||||
|
css-tree,mocha lib/__tests --require lib/__tests/helpers/setup.js --reporter progress
|
||||||
|
destroy,mocha --reporter spec
|
||||||
|
react-dom,node ./scripts/jest/jest-cli.js
|
||||||
|
@babel/plugin-syntax-class-properties,make test
|
||||||
|
psl,mocha test/*.spec.js
|
||||||
|
cjs-module-lexer,npm run test-wasm ; npm run test-wasm-sync ; npm run test-js
|
||||||
|
@babel/plugin-syntax-numeric-separator,make test
|
||||||
|
proxy-addr,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
forwarded,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
cssesc,mocha tests
|
||||||
|
methods,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
utils-merge,node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js
|
||||||
|
prop-types,npm run tests-only
|
||||||
|
neo-async,istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec ./test --recursive
|
||||||
|
babel-plugin-istanbul,cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --timeout 5000 test/*.js
|
||||||
|
@humanwhocodes/config-array,mocha -r esm tests/ --recursive
|
||||||
|
co,mocha --harmony
|
||||||
|
jsdom,npm-run-all --continue-on-error test:*
|
||||||
|
@humanwhocodes/object-schema,mocha tests/
|
||||||
|
set-blocking,nyc mocha ./test/*.js
|
||||||
|
makeerror,NODE_PATH=./lib mocha --ui exports
|
||||||
|
walker,NODE_PATH=./lib mocha --ui exports
|
||||||
|
pako,npm run lint && mocha
|
||||||
|
make-error,jest
|
||||||
|
tmpl,NODE_PATH=./lib mocha --ui exports
|
||||||
|
bluebird,node --expose-gc tools/test.js
|
||||||
|
webpack,yarn test:base
|
||||||
|
watchpack,mocha
|
||||||
|
requires-port,c8 --reporter=lcov --reporter=text mocha test.js
|
||||||
|
eslint-plugin-import,npm run tests-only
|
||||||
|
@babel/preset-env,make test
|
||||||
|
@babel/plugin-transform-block-scoping,make test
|
||||||
|
@babel/plugin-transform-classes,make test
|
||||||
|
eslint-module-utils,npm run tests-only
|
||||||
|
process,mocha test.js
|
||||||
|
json-stringify-safe,make test
|
||||||
|
eslint-import-resolver-node,npm run tests-only
|
||||||
|
eslint-utils,"run-s ""format:prettier -- --check"" lint build test:mocha"
|
||||||
|
es-module-lexer,npm install -g chomp ; chomp test
|
||||||
|
has-values,mocha
|
||||||
|
xmlbuilder,"nyc mocha ""test/**/*.coffee"""
|
||||||
|
has-value,mocha
|
||||||
|
eslint-config-prettier,yarn test:prettier && ESLINT_CONFIG_PRETTIER_NO_DEPRECATED=true yarn test:with-env && ESLINT_USE_FLAT_CONFIG=false yarn test:with-env
|
||||||
|
he,node tests/tests.js
|
||||||
|
@webassemblyjs/ast,make test
|
||||||
|
lodash.isplainobject,npm run test:main && npm run test:fp
|
||||||
|
@webassemblyjs/helper-wasm-bytecode,make test
|
||||||
|
http-cache-semantics,mocha
|
||||||
|
require-main-filename,tap --coverage test.js
|
||||||
|
color,xo && tsd && mocha
|
||||||
|
@webassemblyjs/wast-printer,make test
|
||||||
|
@webassemblyjs/helper-api-error,make test
|
||||||
|
@webassemblyjs/wasm-parser,make test
|
||||||
|
@webassemblyjs/wasm-gen,make test
|
||||||
|
is-windows,mocha
|
||||||
|
@webassemblyjs/wasm-edit,make test
|
||||||
|
@webassemblyjs/wasm-opt,make test
|
||||||
|
@webassemblyjs/helper-wasm-section,make test
|
||||||
|
@webassemblyjs/helper-buffer,make test
|
||||||
|
@webassemblyjs/leb128,make test
|
||||||
|
@webassemblyjs/ieee754,make test
|
||||||
|
@webassemblyjs/utf8,make test
|
||||||
|
symbol-tree,istanbul cover test/SymbolTree.js
|
||||||
|
object-hash,node ./node_modules/.bin/mocha test
|
||||||
|
lodash.memoize,npm run test:main && npm run test:fp
|
||||||
|
vite,pnpm test-unit && pnpm test-serve && pnpm test-build
|
||||||
|
loader-runner,npm run test:basic
|
||||||
|
@webassemblyjs/floating-point-hex-parser,make test
|
||||||
|
regenerate,node tests/tests.js
|
||||||
|
@babel/preset-modules,eslint src test && jest --colors
|
||||||
|
lodash.debounce,npm run test:main && npm run test:fp
|
||||||
|
url-parse,c8 --reporter=lcov --reporter=text mocha test/test.js
|
||||||
|
eslint-plugin-react-hooks,node ./scripts/jest/jest-cli.js
|
||||||
|
querystringify,c8 --reporter=lcov --reporter=text mocha test.js
|
||||||
|
is-potential-custom-element-name,mocha
|
||||||
|
interpret,nyc mocha --async-only
|
||||||
|
jsx-ast-utils,npm run tests-only --
|
||||||
|
on-headers,mocha --reporter spec --check-leaks test/test.js
|
||||||
|
@cspotcode/source-map-support,mocha
|
||||||
|
asn1,./node_modules/.bin/tape ./test/ber/*.test.js
|
||||||
|
normalize-range,npm run cover && npm run lint && npm run style
|
||||||
|
dayjs,TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && TZ=America/Whitehorse npm run test-tz && npm run test-tz && jest
|
||||||
|
aws4,mocha ./test/fast.js -R list
|
||||||
|
deep-extend,./node_modules/.bin/mocha
|
||||||
|
simple-swizzle,mocha --compilers coffee:coffee-script/register
|
||||||
|
jsonc-parser,npm run compile && mocha ./lib/umd/test
|
||||||
|
node-forge,npm run test-node
|
||||||
|
global-prefix,mocha
|
||||||
|
@radix-ui/react-slot,vitest
|
||||||
|
@radix-ui/react-context,vitest
|
||||||
|
repeat-string,mocha
|
||||||
|
enquirer,mocha && tsc -p ./test/types
|
||||||
|
any-promise,ava
|
||||||
|
@radix-ui/react-primitive,vitest
|
||||||
|
compression,mocha --check-leaks --reporter spec
|
||||||
|
deep-eql,npm run test:node && npm run test:browser
|
||||||
|
@aws-crypto/util,lerna run test
|
||||||
|
compressible,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
regenerator-transform,test/run.sh
|
||||||
|
setimmediate,mocha test/tests.js
|
||||||
|
css-loader,npm run test:coverage
|
||||||
|
@aws-crypto/sha256-js,lerna run test
|
||||||
|
url,npm run tests-only
|
||||||
|
ejs,npx jake test
|
||||||
|
global-modules,mocha
|
||||||
|
@webassemblyjs/helper-numbers,make test
|
||||||
|
postcss-modules-local-by-default,yarn test:coverage
|
||||||
|
@radix-ui/react-compose-refs,vitest
|
||||||
|
postcss-modules-scope,yarn test:coverage
|
||||||
|
cacheable-request,pnpm -r --workspace-concurrency 1 test
|
||||||
|
fraction.js,mocha tests/*.js
|
||||||
|
postcss-modules-extract-imports,yarn test:coverage
|
||||||
|
thenify,mocha --reporter spec
|
||||||
|
ecdsa-sig-formatter,istanbul cover --root src _mocha -- spec
|
||||||
|
mz,mocha --reporter spec
|
||||||
|
thenify-all,mocha --reporter spec
|
||||||
|
check-error,npm run test:node && npm run test:browser
|
||||||
|
buffer-equal-constant-time,mocha test.js
|
||||||
|
rechoir,nyc mocha --async-only
|
||||||
|
pathval,npm run test:node && npm run test:browser
|
||||||
|
eslint-plugin-prettier,pnpm lint && mocha
|
||||||
|
arr-diff,mocha
|
||||||
|
hoist-non-react-statics,nyc mocha tests/unit/ --recursive --reporter spec --require=@babel/register
|
||||||
|
postcss-modules-values,yarn test:coverage
|
||||||
|
clone-deep,mocha
|
||||||
|
shallow-clone,mocha
|
||||||
|
@vitest/utils,pnpm --filter test-core test:threads
|
||||||
|
icss-utils,yarn test:coverage
|
||||||
|
handlebars,npm run test:mocha
|
||||||
|
@swc/helpers,cd ./packages/core && yarn test
|
||||||
|
react-refresh,node ./scripts/jest/jest-cli.js
|
||||||
|
tailwindcss,cargo test && vitest run --hideSkippedTests
|
||||||
|
lodash.once,npm run test:main && npm run test:fp
|
||||||
|
lodash.isstring,npm run test:main && npm run test:fp
|
||||||
|
@babel/plugin-transform-private-property-in-object,make test
|
||||||
|
@babel/plugin-transform-numeric-separator,make test
|
||||||
|
@babel/plugin-transform-export-namespace-from,make test
|
||||||
|
@babel/plugin-transform-logical-assignment-operators,make test
|
||||||
|
@babel/plugin-transform-optional-catch-binding,make test
|
||||||
|
for-in,mocha
|
||||||
|
array-unique,mocha
|
||||||
|
lodash.camelcase,npm run test:main && npm run test:fp
|
||||||
|
jsonwebtoken,npm run lint && npm run coverage && cost-of-modules
|
||||||
|
jake,./bin/cli.js test
|
||||||
|
@floating-ui/dom,turbo test
|
||||||
|
@aws-crypto/supports-web-crypto,lerna run test
|
||||||
|
lodash.uniq,npm run test:main && npm run test:fp
|
||||||
|
prettier-linter-helpers,npm run lint && mocha
|
||||||
|
@aws-crypto/sha256-browser,lerna run test
|
||||||
|
undici,npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript
|
||||||
|
@floating-ui/core,turbo test
|
||||||
|
cors,npm run lint && npm run test-ci
|
||||||
|
@radix-ui/primitive,vitest
|
||||||
|
expand-brackets,mocha
|
||||||
|
node-gyp,cross-env NODE_GYP_NULL_LOGGER=true mocha --timeout 15000 test/test-download.js test/test-*
|
||||||
|
@radix-ui/react-use-layout-effect,vitest
|
||||||
|
extglob,mocha
|
||||||
|
stylis,nyc npm run spec
|
||||||
|
fd-slicer,mocha --reporter spec --check-leaks
|
||||||
|
cli-table3,jest --color
|
||||||
|
@floating-ui/utils,turbo test
|
||||||
|
react-transition-group,npm run lint && npm run testonly
|
||||||
|
tree-kill,mocha
|
||||||
|
safe-regex,jest src/*
|
||||||
|
http-proxy,nyc --reporter=text --reporter=lcov npm run mocha
|
||||||
|
@vitest/pretty-format,pnpm --filter test-core test:threads
|
||||||
|
promise,mocha --bail --timeout 200 --slow 99999 -R dot && npm run test-memory-leak
|
||||||
|
set-value,mocha
|
||||||
|
csso,mocha test --reporter ${REPORTER:-progress}
|
||||||
|
arr-union,mocha
|
||||||
|
@radix-ui/react-use-callback-ref,vitest
|
||||||
|
use-sync-external-store,node ./scripts/jest/jest-cli.js
|
||||||
|
@radix-ui/react-use-controllable-state,vitest
|
||||||
|
style-loader,npm run test:coverage
|
||||||
|
lodash.sortby,npm run test:main && npm run test:fp
|
||||||
|
damerau-levenshtein,mocha --use_strict
|
||||||
|
promise-retry,mocha --bail -t 10000
|
||||||
|
@vitest/spy,pnpm --filter test-core test:threads
|
||||||
|
lodash.isboolean,npm run test:main && npm run test:fp
|
||||||
|
react-router,jest
|
||||||
|
upath,npx grunt
|
||||||
|
postcss-loader,npm run test:coverage
|
||||||
|
object.pick,mocha
|
||||||
|
@radix-ui/react-portal,vitest
|
||||||
|
@radix-ui/react-id,vitest
|
||||||
|
@vitest/expect,pnpm --filter test-core test:threads
|
||||||
|
language-tags,c8 mocha
|
||||||
|
@radix-ui/react-dismissable-layer,vitest
|
||||||
|
obuf,mocha test/**/*-test.js
|
||||||
|
lodash.get,npm run test:main && npm run test:fp
|
||||||
|
d3-array,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
source-map-url,npm run lint && npm run unit
|
||||||
|
@img/sharp-linuxmusl-x64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types
|
||||||
|
registry-auth-token,mocha --require test/global-hooks.js
|
||||||
|
camelcase-css,mocha test.js --check-leaks --bail
|
||||||
|
assign-symbols,mocha
|
||||||
|
lodash.includes,npm run test:main && npm run test:fp
|
||||||
|
lodash.isnumber,npm run test:main && npm run test:fp
|
||||||
|
lodash.isinteger,npm run test:main && npm run test:fp
|
||||||
|
urix,jshint index.js test/ && mocha
|
||||||
|
@floating-ui/react-dom,turbo test
|
||||||
|
ua-parser-js,./script/test-all.sh
|
||||||
|
split-string,nyc mocha
|
||||||
|
union-value,mocha
|
||||||
|
@radix-ui/react-presence,vitest
|
||||||
|
repeat-element,mocha
|
||||||
|
to-object-path,mocha
|
||||||
|
fs-monkey,jest
|
||||||
|
unset-value,mocha
|
||||||
|
css.escape,node tests/tests.js
|
||||||
|
arr-flatten,mocha
|
||||||
|
archiver-utils,mocha --reporter dot
|
||||||
|
object-visit,mocha
|
||||||
|
collection-visit,mocha
|
||||||
|
map-visit,mocha
|
||||||
|
react-router-dom,jest
|
||||||
|
mixin-deep,mocha
|
||||||
|
pascalcase,mocha
|
||||||
|
dateformat,npm run build && mocha
|
||||||
|
copy-descriptor,mocha
|
||||||
|
object-copy,mocha
|
||||||
|
type,mocha --recursive
|
||||||
|
static-extend,mocha
|
||||||
|
memory-fs,mocha
|
||||||
|
fragment-cache,mocha
|
||||||
|
use,mocha
|
||||||
|
cache-base,nyc --reporter=text --reporter=html mocha
|
||||||
|
pinkie,xo && nyc mocha
|
||||||
|
pinkie-promise,mocha
|
||||||
|
regex-not,mocha
|
||||||
|
to-regex,mocha
|
||||||
|
base,mocha
|
||||||
|
snapdragon,mocha
|
||||||
|
nanomatch,mocha
|
||||||
|
posix-character-classes,mocha
|
||||||
|
class-utils,mocha
|
||||||
|
selfsigned,mocha -t 5000
|
||||||
|
lodash.clonedeep,npm run test:main && npm run test:fp
|
||||||
|
@radix-ui/react-focus-scope,vitest
|
||||||
|
stack-trace,jest
|
||||||
|
ip,npm run lint && mocha --reporter spec test/*-test.js
|
||||||
|
pluralize,npm run lint && npm run test-cov
|
||||||
|
sass-loader,npm run test:coverage
|
||||||
|
connect-history-api-fallback,jest && eslint lib/*.js test/*.js
|
||||||
|
snapdragon-util,mocha
|
||||||
|
snapdragon-node,mocha
|
||||||
|
@radix-ui/react-use-escape-keydown,vitest
|
||||||
|
hash.js,mocha --reporter=spec test/*-test.js && npm run lint
|
||||||
|
common-tags,npm run lint && jest src
|
||||||
|
whatwg-fetch,karma start ./test/karma.config.js && karma start ./test/karma-worker.config.js
|
||||||
|
@discoveryjs/json-ext,npm run test:src
|
||||||
|
lie,npm run jshint && mocha -R nyan ./test/cover.js && tsc --noEmit ./test/types.ts
|
||||||
|
lodash-es,npm run test:main && npm run test:fp
|
||||||
|
@radix-ui/react-focus-guards,vitest
|
||||||
|
elliptic,npm run lint && npm run unit
|
||||||
|
validator,nyc --reporter=cobertura --reporter=text-summary mocha --require @babel/register --reporter dot --recursive
|
||||||
|
batch,mocha --check-leaks
|
||||||
|
asn1.js,mocha --reporter spec test/*-test.js && cd rfc/2560 && npm i && npm test && cd ../../rfc/5280 && npm i && npm test && cd ../../ && npm run lint
|
||||||
|
mocha,run-s lint test-node test-browser
|
||||||
|
html-minifier-terser,npm run test:node
|
||||||
|
serve-index,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
d3-shape,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
relateurl,c8 mocha test.js --bail --check-leaks
|
||||||
|
d3-path,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
lint-staged,cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --coverage
|
||||||
|
d3-interpolate,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
find-root,mocha
|
||||||
|
pretty-error,"mocha ""test/**/*.coffee"""
|
||||||
|
@popperjs/core,turbo test
|
||||||
|
spdy,mocha --reporter=spec test/*-test.js
|
||||||
|
handle-thing,mocha --reporter=spec test/*-test.js
|
||||||
|
spdy-transport,mocha --reporter=spec test/**/*-test.js test/**/**/*-test.js
|
||||||
|
renderkid,"mocha ""test/**/*.coffee"""
|
||||||
|
select-hose,jscs lib/*.js test/*.js && jshint lib/*.js && mocha --reporter=spec test/*-test.js
|
||||||
|
hpack.js,mocha test/*-test.js
|
||||||
|
http-deceiver,mocha --reporter=spec test/*-test.js
|
||||||
|
wbuf,mocha test/**/*-test.js
|
||||||
|
browserify-zlib,npm run test:node && npm run test:browser
|
||||||
|
d3-time,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
d3-color,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
filesize,npm run lint && npm run mocha
|
||||||
|
ansi-html-community,./node_modules/.bin/mocha -R spec -t 5000
|
||||||
|
vite-node,pnpm --filter test-core test:threads
|
||||||
|
string.prototype.repeat,npm run tests-only
|
||||||
|
brorand,mocha --reporter=spec test/**/*-test.js
|
||||||
|
luxon,jest --coverage
|
||||||
|
envinfo,jest --env=node && eslint src && prettier -l src/**/*.js
|
||||||
|
@aws-crypto/crc32,lerna run test
|
||||||
|
sharp,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types
|
||||||
|
minimalistic-crypto-utils,mocha --reporter=spec test/*-test.js
|
||||||
|
hmac-drbg,mocha --reporter=spec test/*-test.js
|
||||||
|
acorn-import-attributes,mocha ./test/index.js
|
||||||
|
crc-32,make test
|
||||||
|
lodash.isequal,npm run test:main && npm run test:fp
|
||||||
|
confusing-browser-globals,cd packages/react-scripts && node bin/react-scripts.js test
|
||||||
|
d3-format,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
@radix-ui/react-collection,vitest
|
||||||
|
des.js,NODE_OPTIONS=--openssl-legacy-provider mocha --reporter=spec test/*-test.js
|
||||||
|
@swc/core,cd ./packages/core && yarn test
|
||||||
|
eventemitter2,mocha ./test/loader.js --exit --timeout=3000
|
||||||
|
d3-time-format,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
internmap,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
lodash.defaults,npm run test:main && npm run test:fp
|
||||||
|
d3-scale,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
@unrs/resolver-binding-linux-x64-musl,vitest run -r ./napi
|
||||||
|
@vitest/snapshot,pnpm --filter test-core test:threads
|
||||||
|
json-bigint,./node_modules/mocha/bin/mocha -R spec --check-leaks test/*-test.js
|
||||||
|
@radix-ui/react-direction,vitest
|
||||||
|
es6-promise,ember test
|
||||||
|
vitest,pnpm --filter test-core test:threads
|
||||||
|
get-func-name,npm run test:node && npm run test:browser && npm run upload-coverage
|
||||||
|
formidable,pnpm run audit && node --test ./test-node/**/*.test.js && pnpm run test-jest:ci
|
||||||
|
lodash.truncate,npm run test:main && npm run test:fp
|
||||||
|
process-warning,npm run test:unit && npm run test:jest && npm run test:typescript
|
||||||
|
d3-timer,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
dom-converter,"mocha ""test/**/*.coffee"""
|
||||||
|
mdurl,npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov mocha
|
||||||
|
expand-tilde,mocha
|
||||||
|
source-list-map,mocha -R spec
|
||||||
|
@vitest/runner,pnpm --filter test-core test:threads
|
||||||
|
file-loader,npm run test:coverage
|
||||||
|
@swc/core-linux-x64-gnu,cd ./packages/core && yarn test
|
||||||
|
ramda,npm-run-all --parallel spec lint
|
||||||
|
triple-beam,nyc mocha test.js
|
||||||
|
archiver,mocha --reporter dot
|
||||||
|
homedir-polyfill,mocha
|
||||||
|
zip-stream,mocha --reporter dot
|
||||||
|
compress-commons,mocha --reporter dot
|
||||||
|
@radix-ui/react-popper,vitest
|
||||||
|
crc32-stream,mocha --reporter dot
|
||||||
|
superagent,npm run build && npm run lint && make test
|
||||||
|
d3-ease,mocha 'test/**/*-test.js' && eslint src test
|
||||||
|
@radix-ui/react-dialog,vitest
|
||||||
|
@radix-ui/react-arrow,vitest
|
||||||
|
@radix-ui/react-use-size,vitest
|
||||||
|
miller-rabin,mocha --reporter=spec test/**/*-test.js
|
||||||
|
@swc/types,cd ./packages/core && yarn test
|
||||||
|
parse-passwd,mocha
|
||||||
|
path-is-inside,mocha
|
||||||
|
netmask,coffee -c lib/*.coffee && vows --spec test/* && mocha tests/*
|
||||||
|
linkify-it,npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov mocha
|
||||||
|
enabled,istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js
|
||||||
|
kuler,mocha test.js
|
||||||
|
@tailwindcss/oxide-linux-x64-musl,cargo test && vitest run --hideSkippedTests
|
||||||
|
one-time,nyc --reporter=text --reporter=json-summary npm run test:runner
|
||||||
|
node-abort-controller,jest
|
||||||
|
colorspace,mocha test.js
|
||||||
|
text-hex,mocha --reporter spec --ui bdd test.js
|
||||||
|
resolve-dir,mocha
|
||||||
|
yargs-unparser,jest --env node --coverage
|
||||||
|
@dabh/diagnostics,nyc --reporter=text --reporter=lcov npm run test:runner
|
||||||
|
@radix-ui/react-use-rect,vitest
|
||||||
|
@radix-ui/rect,vitest
|
||||||
|
warning,npm run test:dev && npm run test:prod
|
||||||
|
uc.micro,npm run build && mocha
|
||||||
|
@radix-ui/react-visually-hidden,vitest
|
||||||
|
next,pnpm testheadless
|
||||||
|
@parcel/watcher,mocha
|
||||||
|
fn.name,mocha test.js
|
||||||
|
@radix-ui/react-roving-focus,vitest
|
||||||
|
async-limiter,mocha --require intelli-espower-loader test/
|
||||||
|
findup-sync,nyc mocha --async-only
|
||||||
|
denque,istanbul cover --report lcov _mocha && npm run typescript
|
||||||
|
duplexer2,mocha -R tap
|
||||||
|
@swc/core-linux-x64-musl,cd ./packages/core && yarn test
|
||||||
|
@xmldom/xmldom,jest
|
||||||
|
stackback,mocha --ui qunit
|
||||||
|
rsvp,ember test
|
||||||
|
@aashutoshrathi/word-wrap,mocha
|
||||||
|
is-module,mocha --reporter spec
|
||||||
|
@radix-ui/react-use-previous,vitest
|
||||||
|
compare-func,npm run-script lint && mocha
|
||||||
|
@next/swc-linux-x64-gnu,pnpm testheadless
|
||||||
|
markdown-it,npm run lint && CJS_ONLY=1 npm run build && c8 --exclude dist --exclude test -r text -r html -r lcov mocha && node support/specsplit.mjs
|
||||||
|
shallowequal,jest .
|
||||||
|
call-me-maybe,mocha
|
||||||
|
@babel/eslint-parser,make test
|
||||||
|
string.prototype.includes,npm run tests-only
|
||||||
|
inline-style-parser,jest
|
||||||
|
notifications-node-client,"mocha ""spec/**/*.js"" && npm run test:markdown:standard"
|
||||||
|
basic-auth,mocha --reporter spec --bail --check-leaks test/
|
||||||
|
lodash.flatten,npm run test:main && npm run test:fp
|
||||||
|
array-ify,npm run-script lint && mocha
|
||||||
|
portfinder,jest --runInBand
|
||||||
|
es6-error,cross-env BABEL_ENV=test mocha --require babel-core/register --recursive
|
||||||
|
@img/sharp-linux-x64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types
|
||||||
|
svg-parser,mocha
|
||||||
|
set-cookie-parser,npm run lint && mocha
|
||||||
|
@radix-ui/number,vitest
|
||||||
|
acorn-import-assertions,mocha ./test/index.js
|
||||||
|
@remix-run/router,jest
|
||||||
|
@vitejs/plugin-react,pnpm run test-unit && pnpm run test-serve && pnpm run test-build && pnpm --filter ./packages/plugin-react-swc run test
|
||||||
|
case-sensitive-paths-webpack-plugin,mocha test/
|
|
2456
package-lock.json
generated
2456
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"description": "",
|
"description": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"all-the-package-repos": "^2.0.2306",
|
||||||
"csv": "^6.3.11",
|
"csv": "^6.3.11",
|
||||||
"download-counts": "^2.20250701.0",
|
"download-counts": "^2.20250701.0",
|
||||||
"eslint-scope": "^8.4.0",
|
"eslint-scope": "^8.4.0",
|
||||||
@@ -18,8 +19,13 @@
|
|||||||
"esquery": "^1.6.0",
|
"esquery": "^1.6.0",
|
||||||
"esrecurse": "^4.3.0",
|
"esrecurse": "^4.3.0",
|
||||||
"estraverse": "^5.3.0",
|
"estraverse": "^5.3.0",
|
||||||
|
"git-client": "^1.9.3",
|
||||||
|
"glob": "^11.0.3",
|
||||||
"jalangi2": "^0.2.6",
|
"jalangi2": "^0.2.6",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.2",
|
||||||
|
"set.prototype.intersection": "^1.1.7",
|
||||||
|
"ts-morph": "^26.0.0",
|
||||||
|
"typescript": "^5.8.3",
|
||||||
"webpack": "^5.99.9"
|
"webpack": "^5.99.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@@ -56,9 +56,9 @@ export class ExpressionArrayVisitor extends Visitor {
|
|||||||
this.arguments.push(node.value);
|
this.arguments.push(node.value);
|
||||||
}
|
}
|
||||||
ObjectExpression(node) {
|
ObjectExpression(node) {
|
||||||
console.warning("Not finished");
|
console.warn("Not finished");
|
||||||
throw Error("TBD");
|
|
||||||
this.arguments.push(new ObjectSimplifierVisitor().visit(node));
|
this.arguments.push(new ObjectSimplifierVisitor().visit(node));
|
||||||
|
throw Error("TBD");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,17 +88,100 @@ class ObjectSimplifierVisitor extends Visitor {
|
|||||||
*
|
*
|
||||||
* @param {import("estree").Property} node
|
* @param {import("estree").Property} node
|
||||||
*/
|
*/
|
||||||
Property(node){
|
Property(node) {
|
||||||
this.#topOfStack()?.[ node.key.value];
|
this.#topOfStack()?.[node.key.value];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import('estree').ObjectExpression} node
|
||||||
|
*/
|
||||||
|
ObjectExpression(node) {
|
||||||
|
const x = {};
|
||||||
|
for (const property of node.properties) {
|
||||||
|
if (property.type === 'Property') {
|
||||||
|
if( property.key.type==='PrivateIdentifier'){
|
||||||
|
|
||||||
|
}
|
||||||
|
const propertyKey =
|
||||||
|
x[property.key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import('estree').Literal} node
|
||||||
|
*/
|
||||||
|
Literal(node) {
|
||||||
|
return node.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {SpreadExpression} node
|
||||||
|
*/
|
||||||
|
SpreadExpression(node) {
|
||||||
|
throw new Error("unsupported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
visit(node) {
|
visit(node) {
|
||||||
console.log("Objvisit",node);
|
console.log("Objvisit", node);
|
||||||
return super.visit(node);
|
return super.visit(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
#topOfStack(){
|
#topOfStack() {
|
||||||
return this.exprStack[this.exprStack.length-1];
|
return this.exprStack[this.exprStack.length - 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GetExpressionStaticValue extends Visitor {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import('estree').Identifier} node
|
||||||
|
*/
|
||||||
|
Identifier(node) {
|
||||||
|
throw new Error('not compat');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import('estree').Literal} node
|
||||||
|
*/
|
||||||
|
Literal(node) {
|
||||||
|
return node.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import('estree').BinaryExpression} node
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
BinaryExpression(node) {
|
||||||
|
return this.applyOperation(super.left(node.left), super.right(node.right), node.operator);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} left
|
||||||
|
* @param {*} right
|
||||||
|
* @param {import('estree').BinaryOperator} operator
|
||||||
|
*/
|
||||||
|
applyOperation(left, right, operator) {
|
||||||
|
switch (operator) {
|
||||||
|
case '+': return left + right;
|
||||||
|
case '-': return left - right;
|
||||||
|
case '*': return left * right;
|
||||||
|
case '/': return left / right;
|
||||||
|
case '%': return left % right;
|
||||||
|
case '==': return left == right;
|
||||||
|
case '===': return left === right;
|
||||||
|
case '>': return left > right;
|
||||||
|
case '<': return left < right;
|
||||||
|
case '>=': return left >= right;
|
||||||
|
case '<=': return left <= right;
|
||||||
|
case '<<': return left << right;
|
||||||
|
case '>>': return left >> right;
|
||||||
|
case '^': return left ^ right;
|
||||||
|
case '&': return left & right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -5,7 +5,6 @@ import { LibraryCallsRecorder } from './libcalls.mjs';
|
|||||||
import { tagASTNode, getTagKey, untagASTNode } from './ast/tag.mjs';
|
import { tagASTNode, getTagKey, untagASTNode } from './ast/tag.mjs';
|
||||||
import { ExpressionArrayVisitor } from './ast/visitors.mjs';
|
import { ExpressionArrayVisitor } from './ast/visitors.mjs';
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {import('eslint').Scope.ScopeManager} scopeManager
|
* @param {import('eslint').Scope.ScopeManager} scopeManager
|
||||||
|
@@ -3,12 +3,12 @@ import assert from 'node:assert';
|
|||||||
import { getASTAndScope } from './ast/analysis.mjs';
|
import { getASTAndScope } from './ast/analysis.mjs';
|
||||||
|
|
||||||
import { getRequireCallsAndConstantArgs } from './calls.mjs';
|
import { getRequireCallsAndConstantArgs } from './calls.mjs';
|
||||||
import { analyze, instrumentString, instrumentDir } from 'jalangi2';
|
|
||||||
import { readFileSync ,realpathSync ,mkdirSync} from 'node:fs';
|
import { readFileSync ,realpathSync ,mkdirSync} from 'node:fs';
|
||||||
import { writeFile } from 'node:fs/promises';
|
import { writeFile } from 'node:fs/promises';
|
||||||
|
import tsc, { Project, SyntaxKind } from 'ts-morph';
|
||||||
import {getSliceAndInfoSync} from 'slice-js/src/slice-code/test/helpers/utils.js';
|
import {getSliceAndInfoSync} from 'slice-js/src/slice-code/test/helpers/utils.js';
|
||||||
import path, { dirname,join } from 'node:path';
|
import path, { dirname,join } from 'node:path';
|
||||||
|
// import tsc from 'typescript'
|
||||||
/**
|
/**
|
||||||
* Call parameter generation
|
* Call parameter generation
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +49,7 @@ function main() {
|
|||||||
console.log(`Writing to`,writePath);
|
console.log(`Writing to`,writePath);
|
||||||
|
|
||||||
writePromises.push(writeFile(writePath,slicedCode));
|
writePromises.push(writeFile(writePath,slicedCode));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(writePromises).then(p=>{
|
Promise.all(writePromises).then(p=>{
|
||||||
@@ -57,9 +57,71 @@ function main() {
|
|||||||
}).catch(console.log);
|
}).catch(console.log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ImportCall{
|
||||||
|
/**
|
||||||
|
* @type {'import'|'importExpr'|'require'}
|
||||||
|
*/
|
||||||
|
importType;
|
||||||
|
/**
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
importSyntax;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {'import'|'importExpr'|'require'} importType
|
||||||
|
* @param {string} importSyntax
|
||||||
|
*/
|
||||||
|
constructor(importType, importSyntax){
|
||||||
|
this.importSyntax = importSyntax;
|
||||||
|
this.importType = importType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function main2() {
|
||||||
|
const FILE_PATH = './test_src/index.cjs';
|
||||||
|
|
||||||
|
const project = new Project({compilerOptions:{allowJs: true, checkJs: false,}});
|
||||||
|
project.addSourceFileAtPathIfExists(FILE_PATH);
|
||||||
|
|
||||||
|
// const project = tsc.createProgram([FILE_PATH],);
|
||||||
|
const checker = project.getTypeChecker();
|
||||||
|
|
||||||
|
const sourceFile = project.getSourceFile(FILE_PATH)
|
||||||
|
|
||||||
|
const importDecls = sourceFile.getImportStringLiterals()
|
||||||
|
for(const importStringDecl of importDecls){
|
||||||
|
console.log(importStringDecl);
|
||||||
|
const importDecl = importStringDecl.getFirstAncestor();
|
||||||
|
if(importDecl.isKind(SyntaxKind.CallExpression)){
|
||||||
|
// the declaration is callExpression. Verify its based an identifier aliasing import or require
|
||||||
|
const importExpr = importDecl.getExpression();
|
||||||
|
const type = checker.getTypeAtLocation(importExpr);
|
||||||
|
console.log("Type of import expression",checker.compilerObject.resolveName());
|
||||||
|
console.log(importExpr);
|
||||||
|
if(importExpr.isKind(SyntaxKind.Identifier)){
|
||||||
|
// import is a require or import
|
||||||
|
const importName = importExpr.getText();
|
||||||
|
if(importName==='require' || importName==='import'){
|
||||||
|
console.log("Found require/import call",importExpr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else if(importDecl.isKind(SyntaxKind.ImportDeclaration)){
|
||||||
|
// TODO pending extract the calls.
|
||||||
|
}else{
|
||||||
|
console.error("Unexpected import specifier",SyntaxKind[importDecl]);
|
||||||
|
}
|
||||||
|
const importThing = importStringDecl.getParent()
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(importDecls);
|
||||||
|
}
|
||||||
|
|
||||||
if (process.argv[1] === import.meta.filename) {
|
if (process.argv[1] === import.meta.filename) {
|
||||||
console.log("[SafeImport] started")
|
console.log("[SafeImport] started");
|
||||||
main();
|
main2();
|
||||||
|
console.log("done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -77,4 +139,3 @@ function logCallList(calls) {
|
|||||||
function isRelativeModule(moduleName) {
|
function isRelativeModule(moduleName) {
|
||||||
return moduleName.startsWith('.');
|
return moduleName.startsWith('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
src_bundle/README
Normal file
1
src_bundle/README
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Reads a bundle and bundles its dependencies into objects.
|
@@ -3,38 +3,58 @@ import path from 'node:path'
|
|||||||
const outputPath = path.resolve('./output/');
|
const outputPath = path.resolve('./output/');
|
||||||
console.log(outputPath);
|
console.log(outputPath);
|
||||||
|
|
||||||
const l = 'classnames'
|
const ls = [
|
||||||
const libraryLocation = import.meta.resolve(l);
|
'classnames',
|
||||||
console.log(libraryLocation);
|
'semver',
|
||||||
|
'ansi-styles',
|
||||||
|
'debug',
|
||||||
|
'supports-color',
|
||||||
|
'chalk',
|
||||||
|
'ms',
|
||||||
|
'minimatch',
|
||||||
|
'strip-ansi',
|
||||||
|
'tslib',
|
||||||
|
'has-flag',
|
||||||
|
'ansi-regex',
|
||||||
|
'color-convert',
|
||||||
|
'color-name',
|
||||||
|
// 'type-fest',
|
||||||
|
'string-width'
|
||||||
|
]
|
||||||
|
|
||||||
|
ls.forEach(l=>{
|
||||||
// throw Error("5");
|
|
||||||
const compiler = wp({
|
const libraryLocation = import.meta.resolve(l);
|
||||||
entry:libraryLocation,
|
console.log(libraryLocation);
|
||||||
mode: 'production',
|
// throw Error("5");
|
||||||
optimization:{
|
wp({
|
||||||
mangleExports: false,
|
entry:libraryLocation,
|
||||||
avoidEntryIife: true,
|
mode: 'production',
|
||||||
minimize: false
|
optimization:{
|
||||||
|
mangleExports: false,
|
||||||
},
|
avoidEntryIife: true,
|
||||||
// experiments:{}
|
minimize: false
|
||||||
output: {
|
|
||||||
path: outputPath,
|
},
|
||||||
filename: l+'.bundle.cjs',
|
output: {
|
||||||
clean: true,
|
path: outputPath,
|
||||||
iife: false,
|
filename: l+'.bundle.cjs',
|
||||||
library: {
|
clean: false,
|
||||||
type: 'commonjs2',
|
iife: false,
|
||||||
// name: l
|
library: {
|
||||||
|
type: 'commonjs2',
|
||||||
|
// name: l
|
||||||
|
}
|
||||||
|
// module: true
|
||||||
}
|
}
|
||||||
// module: true
|
,
|
||||||
}
|
},(err,stats)=>{
|
||||||
,
|
if (err || stats.hasErrors()) {
|
||||||
},(err,stats)=>{
|
console.log(err?.stack)
|
||||||
if (err || stats.hasErrors()) {
|
console.log(stats?.hasErrors())
|
||||||
console.log(err?.stack)
|
console.log(stats?.toJson());
|
||||||
console.log(stats?.hasErrors())
|
}
|
||||||
console.log(stats?.toJson());
|
})
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
1
src_bundle/install.sh
Normal file
1
src_bundle/install.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
npm i classnames semver ansi-styles debug supports-color chalk ms minimatch strip-ansi tslib has-flag ansi-regex color-convert color-name type-fest string-width
|
257
src_bundle/package-lock.json
generated
Normal file
257
src_bundle/package-lock.json
generated
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
{
|
||||||
|
"name": "src_bundle",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "src_bundle",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": "^6.1.0",
|
||||||
|
"ansi-styles": "^6.2.1",
|
||||||
|
"chalk": "^5.4.1",
|
||||||
|
"classnames": "^2.5.1",
|
||||||
|
"color-convert": "^3.1.0",
|
||||||
|
"color-name": "^2.0.0",
|
||||||
|
"debug": "^4.4.1",
|
||||||
|
"has-flag": "^5.0.1",
|
||||||
|
"minimatch": "^10.0.3",
|
||||||
|
"ms": "^2.1.3",
|
||||||
|
"semver": "^7.7.2",
|
||||||
|
"string-width": "^7.2.0",
|
||||||
|
"strip-ansi": "^7.1.0",
|
||||||
|
"supports-color": "^10.0.0",
|
||||||
|
"tslib": "^2.8.1",
|
||||||
|
"type-fest": "^4.41.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@isaacs/balanced-match": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "20 || >=22"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@isaacs/brace-expansion": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@isaacs/balanced-match": "^4.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "20 || >=22"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ansi-regex": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ansi-styles": {
|
||||||
|
"version": "6.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
||||||
|
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/chalk": {
|
||||||
|
"version": "5.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
|
||||||
|
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/classnames": {
|
||||||
|
"version": "2.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
||||||
|
"integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/color-convert": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-TVoqAq8ZDIpK5lsQY874DDnu65CSsc9vzq0wLpNQ6UMBq81GSZocVazPiBbYGzngzBOIRahpkTzCLVe2at4MfA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"color-name": "^2.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-name": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/debug": {
|
||||||
|
"version": "4.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
||||||
|
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "^2.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"supports-color": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/emoji-regex": {
|
||||||
|
"version": "10.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
|
||||||
|
"integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/get-east-asian-width": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-flag": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/minimatch": {
|
||||||
|
"version": "10.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz",
|
||||||
|
"integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@isaacs/brace-expansion": "^5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "20 || >=22"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ms": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/semver": {
|
||||||
|
"version": "7.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||||
|
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/string-width": {
|
||||||
|
"version": "7.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
|
||||||
|
"integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"emoji-regex": "^10.3.0",
|
||||||
|
"get-east-asian-width": "^1.0.0",
|
||||||
|
"strip-ansi": "^7.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/strip-ansi": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": "^6.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/supports-color": {
|
||||||
|
"version": "10.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz",
|
||||||
|
"integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tslib": {
|
||||||
|
"version": "2.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||||
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
|
"license": "0BSD"
|
||||||
|
},
|
||||||
|
"node_modules/type-fest": {
|
||||||
|
"version": "4.41.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
|
||||||
|
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
|
||||||
|
"license": "(MIT OR CC0-1.0)",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
src_bundle/package.json
Normal file
29
src_bundle/package.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"name": "src_bundle",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Reads a bundle and bundles its dependencies into objects.",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": "^6.1.0",
|
||||||
|
"ansi-styles": "^6.2.1",
|
||||||
|
"chalk": "^5.4.1",
|
||||||
|
"classnames": "^2.5.1",
|
||||||
|
"color-convert": "^3.1.0",
|
||||||
|
"color-name": "^2.0.0",
|
||||||
|
"debug": "^4.4.1",
|
||||||
|
"has-flag": "^5.0.1",
|
||||||
|
"minimatch": "^10.0.3",
|
||||||
|
"ms": "^2.1.3",
|
||||||
|
"semver": "^7.7.2",
|
||||||
|
"string-width": "^7.2.0",
|
||||||
|
"strip-ansi": "^7.1.0",
|
||||||
|
"supports-color": "^10.0.0",
|
||||||
|
"tslib": "^2.8.1",
|
||||||
|
"type-fest": "^4.41.0"
|
||||||
|
}
|
||||||
|
}
|
35
src_dataset/FILTER_LIST.mjs
Normal file
35
src_dataset/FILTER_LIST.mjs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
export const FILTER_LIST = [
|
||||||
|
"https://gitlab.com/contexttesting/zoroaster.git",
|
||||||
|
"https://github.com/Eternity-Bots",
|
||||||
|
"https://github.com/node-x-extras/x-path",
|
||||||
|
"https://github.com/substack/node-x256",
|
||||||
|
"https://github.com/substack/node-wordwrap",
|
||||||
|
|
||||||
|
"https://github.com/zkochan/packages/blob/main/which-pm-runs",
|
||||||
|
"https://github.com/webpack-contrib/webpack-addons",
|
||||||
|
"https://github.com/zznoillusion1026/MyImage",
|
||||||
|
"https://codehub.devcloud.huaweicloud.com/jsztxm00001/zzb-vue-ui.git",
|
||||||
|
"https://github.com/DZSF",
|
||||||
|
"https://github.com/chuzhixin/zx-count",
|
||||||
|
"https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat",
|
||||||
|
"https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir",
|
||||||
|
"https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk",
|
||||||
|
"https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.macchiato",
|
||||||
|
"https://github.com/substack/text-table",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-catch-binding",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-chaining",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-json-strings",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-nullish-coalescing-operator",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-dynamic-import",
|
||||||
|
"https://github.com/substack/node-commondir",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-namespace-from",
|
||||||
|
"https://github.com/substack/https-browserify",
|
||||||
|
"https://github.com/babel/babel/tree/master/packages/babel-runtime",
|
||||||
|
"https://github.com/paulmillr/async-each",
|
||||||
|
"https://github.com/yarnpkg/yarn/blob/master/packages",
|
||||||
|
"https://github.com/substack/semver-compare",
|
||||||
|
"https://github.com/substack/node-archy"
|
||||||
|
];
|
46
src_dataset/batch.mjs
Normal file
46
src_dataset/batch.mjs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { writeFile,open } from "node:fs/promises";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @template T
|
||||||
|
* @template U
|
||||||
|
* @param {T[]} items
|
||||||
|
* @param {number} limit
|
||||||
|
* @param {(T)=>Promise<U>} asyncCallback
|
||||||
|
* @returns {Promise<U[]>}
|
||||||
|
*/
|
||||||
|
export async function processPromisesBatch(
|
||||||
|
items,
|
||||||
|
limit,
|
||||||
|
asyncCallback,
|
||||||
|
) {
|
||||||
|
const results = [];
|
||||||
|
const fileHandle = await open('cache/progress.txt',"w+");
|
||||||
|
for (let start = 0; start < items.length; start += limit) {
|
||||||
|
const end = start + limit > items.length ? items.length : start + limit;
|
||||||
|
|
||||||
|
const slicedResults = await Promise.all(items.slice(start, end).map(asyncCallback));
|
||||||
|
|
||||||
|
const writePromise = writeFile(fileHandle,transformRes(slicedResults),{flush:true});
|
||||||
|
console.log(`[batch] finished batch [${start},${end})`)
|
||||||
|
results.push(...slicedResults);
|
||||||
|
await writePromise;
|
||||||
|
}
|
||||||
|
fileHandle.close();
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @template T
|
||||||
|
* @param {Array<T>} results
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function transformRes(results){
|
||||||
|
let str = ""
|
||||||
|
for(const x of results){
|
||||||
|
str += JSON.stringify(x)+'\n';
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
26
src_dataset/cache.mjs
Normal file
26
src_dataset/cache.mjs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import { existsSync } from "node:fs";
|
||||||
|
import { readFile, writeFile } from "node:fs/promises";
|
||||||
|
import { resolve } from "node:path";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @template T
|
||||||
|
* @param {string} fileName
|
||||||
|
* @param {()=>Promise<T>} asyncCallback
|
||||||
|
* @returns {Promise<T>}
|
||||||
|
*/
|
||||||
|
export async function cacheFunctionOutput(fileName, asyncCallback) {
|
||||||
|
const fileLoc = resolve('./cache', fileName);
|
||||||
|
if (existsSync(fileLoc)) {
|
||||||
|
console.log("[cacher] Using cached ", fileLoc);
|
||||||
|
const fileContents = (await readFile(fileLoc)).toString();
|
||||||
|
return JSON.parse(fileContents);
|
||||||
|
} else {
|
||||||
|
console.log("[cacher] cache miss")
|
||||||
|
const returnRes = await asyncCallback();
|
||||||
|
const fileContents = JSON.stringify(returnRes);
|
||||||
|
await writeFile(fileLoc,fileContents);
|
||||||
|
console.log("[cacher] saved ",fileLoc)
|
||||||
|
return returnRes;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,10 +1,44 @@
|
|||||||
import packages from 'download-counts' assert { type: 'json'}
|
|
||||||
import * as csv from 'csv'
|
import * as csv from 'csv'
|
||||||
import fsp from 'fs/promises'
|
import fsp from 'fs/promises'
|
||||||
const packageList = Object.keys(packages).map(e => [e, packages[e]]).filter(e=>e[1]>500000).sort((e,f)=>(f[1]-e[1]));
|
import { cloneRepoAndCheck } from './mine.mjs';
|
||||||
const packageMap = new Map(packageList)
|
import { cacheFunctionOutput } from './cache.mjs';
|
||||||
|
import { processPromisesBatch } from './batch.mjs';
|
||||||
|
|
||||||
console.log(packageMap.size)
|
|
||||||
|
|
||||||
const output = csv.stringify(packageList)
|
|
||||||
await fsp.writeFile('output.csv',output);
|
const intermediateRepoList = await cacheFunctionOutput('repos.json', async function () {
|
||||||
|
const [packagesM, packageReposM] = await Promise.all([
|
||||||
|
import('download-counts', { with:{type: 'json'}}),
|
||||||
|
import('all-the-package-repos', { with: { type: 'json' } })
|
||||||
|
]);
|
||||||
|
const packages = packagesM.default;
|
||||||
|
const packageRepos = packageReposM.default;
|
||||||
|
|
||||||
|
const packageList = Object.keys(packages).map(e => [e, packages[e]])
|
||||||
|
.filter(e => e[1] > 100).filter(e => !e[0].startsWith("@types/"))
|
||||||
|
console.log('packagelist', packageList.length)
|
||||||
|
/**
|
||||||
|
* @type {[string,string,number][]} repo, link count
|
||||||
|
*/
|
||||||
|
const withRepos = packageList.map(e => [e[0], packageRepos[e[0]], e[1]])
|
||||||
|
console.log('withrepos', withRepos.length);
|
||||||
|
const withExactRepos = withRepos.filter(e => ((e[1]) !== null && (e[1]) !== undefined && (e[1]) !== ""))
|
||||||
|
console.log('withreposCleaned', withExactRepos.length);
|
||||||
|
withExactRepos.sort((a,b)=>(-a[2]+b[2]))
|
||||||
|
return withExactRepos;
|
||||||
|
})
|
||||||
|
// const packageMap = new Map(packageList)
|
||||||
|
|
||||||
|
console.log(intermediateRepoList.length)
|
||||||
|
const intermediateRepoListSmaller = intermediateRepoList.slice(0,2000);
|
||||||
|
|
||||||
|
const repoStatus = await processPromisesBatch(intermediateRepoListSmaller,15,cloneRepoAndCheck)
|
||||||
|
|
||||||
|
const repoStatusString = csv.stringify(repoStatus);
|
||||||
|
await fsp.writeFile('repostatus.csv', repoStatusString);
|
||||||
|
|
||||||
|
const minableRepositories = repoStatus.filter(e=>(e!==null && e?.[1]));
|
||||||
|
const output = csv.stringify(minableRepositories);
|
||||||
|
await fsp.writeFile('minableRepositories2.csv', output);
|
||||||
|
// console.log("written results")
|
||||||
|
|
||||||
|
76
src_dataset/mine.mjs
Normal file
76
src_dataset/mine.mjs
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import { existsSync, } from 'fs'
|
||||||
|
import { lstat, readFile } from 'fs/promises'
|
||||||
|
import git from 'git-client'
|
||||||
|
import { resolve } from 'path'
|
||||||
|
import int from 'set.prototype.intersection';
|
||||||
|
import { FILTER_LIST } from './FILTER_LIST.mjs';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {[string,string,number]} param0
|
||||||
|
* @returns {Promise<[string,string|null]>}
|
||||||
|
*/
|
||||||
|
export async function cloneRepoAndCheck([repoName, repoGitUrl, downloadCount]) {
|
||||||
|
const repoPath = resolve('cache/repos', repoName)
|
||||||
|
|
||||||
|
if (FILTER_LIST.includes(repoGitUrl)) {
|
||||||
|
console.log("[git] ignoring ", repoName)
|
||||||
|
return [repoName, null]
|
||||||
|
};
|
||||||
|
// console.log('[git] fetching',repoName, repoGitUrl);
|
||||||
|
await cacheCloneIdempotently(repoPath, repoName, repoGitUrl)
|
||||||
|
|
||||||
|
const tsConfigFileLocation = resolve(repoPath,'tsconfig.json');
|
||||||
|
const tsConfigFileExists = existsSync(tsConfigFileLocation);
|
||||||
|
if(tsConfigFileExists) return [repoName, null];
|
||||||
|
|
||||||
|
|
||||||
|
const packageFile = resolve(repoPath, 'package.json')
|
||||||
|
if (!existsSync(packageFile)) return [repoName, null];
|
||||||
|
const packageJSONContentsString = (await readFile(packageFile)).toString()
|
||||||
|
|
||||||
|
// console.log(packageJSONContentsString);
|
||||||
|
const packageJSONContents = JSON.parse(packageJSONContentsString)
|
||||||
|
// console.log(repoName, packageJSONContents.license)
|
||||||
|
const hasDependencies = checkTestingDependencies(packageJSONContents, repoName);
|
||||||
|
if (hasDependencies)
|
||||||
|
return [repoName, ((packageJSONContents?.scripts?.test))]
|
||||||
|
else return [repoName, null]
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkTestingDependencies(packageJSONContents, repoName) {
|
||||||
|
const testingLibraries = new Set(['jest', 'mocha', 'chai', 'istanbul', 'vitest']);
|
||||||
|
const dependencies = new Set();
|
||||||
|
if (packageJSONContents.dependencies !== undefined) {
|
||||||
|
for (const dep of Object.keys(packageJSONContents.dependencies)) {
|
||||||
|
dependencies.add(dep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (packageJSONContents.devDependencies !== undefined) {
|
||||||
|
for (const dep of Object.keys(packageJSONContents.devDependencies)) {
|
||||||
|
dependencies.add(dep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log(dependencies)
|
||||||
|
/**
|
||||||
|
* @type {Set}
|
||||||
|
*/
|
||||||
|
const x = int(testingLibraries, dependencies);
|
||||||
|
// console.log(`join`, x)
|
||||||
|
return x.size > 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function cacheCloneIdempotently(repoPath, repoName, repoGitUrl) {
|
||||||
|
if (existsSync(repoPath)) {
|
||||||
|
const isDir = (await lstat(repoPath)).isDirectory()
|
||||||
|
if (!isDir) throw new Error(repoName, " is mangled. delete directory and re-clone.")
|
||||||
|
else {
|
||||||
|
// const path = await git.status({ $cwd: repoPath })
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("[git] cloning", repoGitUrl);
|
||||||
|
await git.clone(repoGitUrl, repoPath,{'single-branch':true,depth:1})
|
||||||
|
}
|
||||||
|
}
|
@@ -1,10 +1,13 @@
|
|||||||
|
|
||||||
var {existsSync,readFile} = require('node:fs');
|
var {existsSync,readFile} = require('node:fs');
|
||||||
// const {cwd} = require('process');
|
// const {cwd} = require('process');
|
||||||
var _var = require('process');
|
var _var = require('process');
|
||||||
var {sum, div,sad} = require('./arithmetic.cjs');
|
var {sum, div,sad} = require('./arithmetic.cjs');
|
||||||
// var {sum, div} = require('../output/lodash.bundle.js');
|
// var {sum, div} = require('../output/lodash.bundle.js');
|
||||||
// var {ceil} = require('./lodash.js')
|
var ms = require('./ms.bundle.cjs')
|
||||||
var cn = require('./classnames.bundle.cjs')
|
var cn = require('./classnames.bundle.cjs')
|
||||||
|
|
||||||
|
|
||||||
let cwd = process.cwd;
|
let cwd = process.cwd;
|
||||||
console.log('a')
|
console.log('a')
|
||||||
|
|
||||||
@@ -22,5 +25,6 @@ console.log(`Read some data`,newLocal,
|
|||||||
div(7,0),
|
div(7,0),
|
||||||
div(32,3),
|
div(32,3),
|
||||||
// ceil(10.24),
|
// ceil(10.24),
|
||||||
cn('fooo','foobar')
|
cn('fooo','foobar'),
|
||||||
|
ms('1000y',{long:true})
|
||||||
);
|
);
|
5
test_src/index.mjs
Normal file
5
test_src/index.mjs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import {readFile} from 'node:fs'
|
||||||
|
|
||||||
|
readFile('a',(err)=>{
|
||||||
|
if(err){return;}
|
||||||
|
})
|
205
test_src/ms.bundle.cjs
Normal file
205
test_src/ms.bundle.cjs
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ 585:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helpers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var s = 1000;
|
||||||
|
var m = s * 60;
|
||||||
|
var h = m * 60;
|
||||||
|
var d = h * 24;
|
||||||
|
var w = d * 7;
|
||||||
|
var y = d * 365.25;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse or format the given `val`.
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
*
|
||||||
|
* - `long` verbose formatting [false]
|
||||||
|
*
|
||||||
|
* @param {String|Number} val
|
||||||
|
* @param {Object} [options]
|
||||||
|
* @throws {Error} throw an error if val is not a non-empty string or a number
|
||||||
|
* @return {String|Number}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = function (val, options) {
|
||||||
|
options = options || {};
|
||||||
|
var type = typeof val;
|
||||||
|
if (type === 'string' && val.length > 0) {
|
||||||
|
return parse(val);
|
||||||
|
} else if (type === 'number' && isFinite(val)) {
|
||||||
|
return options.long ? fmtLong(val) : fmtShort(val);
|
||||||
|
}
|
||||||
|
throw new Error(
|
||||||
|
'val is not a non-empty string or a valid number. val=' +
|
||||||
|
JSON.stringify(val)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse the given `str` and return milliseconds.
|
||||||
|
*
|
||||||
|
* @param {String} str
|
||||||
|
* @return {Number}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function parse(str) {
|
||||||
|
str = String(str);
|
||||||
|
if (str.length > 100) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
||||||
|
str
|
||||||
|
);
|
||||||
|
if (!match) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var n = parseFloat(match[1]);
|
||||||
|
var type = (match[2] || 'ms').toLowerCase();
|
||||||
|
switch (type) {
|
||||||
|
case 'years':
|
||||||
|
case 'year':
|
||||||
|
case 'yrs':
|
||||||
|
case 'yr':
|
||||||
|
case 'y':
|
||||||
|
return n * y;
|
||||||
|
case 'weeks':
|
||||||
|
case 'week':
|
||||||
|
case 'w':
|
||||||
|
return n * w;
|
||||||
|
case 'days':
|
||||||
|
case 'day':
|
||||||
|
case 'd':
|
||||||
|
return n * d;
|
||||||
|
case 'hours':
|
||||||
|
case 'hour':
|
||||||
|
case 'hrs':
|
||||||
|
case 'hr':
|
||||||
|
case 'h':
|
||||||
|
return n * h;
|
||||||
|
case 'minutes':
|
||||||
|
case 'minute':
|
||||||
|
case 'mins':
|
||||||
|
case 'min':
|
||||||
|
case 'm':
|
||||||
|
return n * m;
|
||||||
|
case 'seconds':
|
||||||
|
case 'second':
|
||||||
|
case 'secs':
|
||||||
|
case 'sec':
|
||||||
|
case 's':
|
||||||
|
return n * s;
|
||||||
|
case 'milliseconds':
|
||||||
|
case 'millisecond':
|
||||||
|
case 'msecs':
|
||||||
|
case 'msec':
|
||||||
|
case 'ms':
|
||||||
|
return n;
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Short format for `ms`.
|
||||||
|
*
|
||||||
|
* @param {Number} ms
|
||||||
|
* @return {String}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function fmtShort(ms) {
|
||||||
|
var msAbs = Math.abs(ms);
|
||||||
|
if (msAbs >= d) {
|
||||||
|
return Math.round(ms / d) + 'd';
|
||||||
|
}
|
||||||
|
if (msAbs >= h) {
|
||||||
|
return Math.round(ms / h) + 'h';
|
||||||
|
}
|
||||||
|
if (msAbs >= m) {
|
||||||
|
return Math.round(ms / m) + 'm';
|
||||||
|
}
|
||||||
|
if (msAbs >= s) {
|
||||||
|
return Math.round(ms / s) + 's';
|
||||||
|
}
|
||||||
|
return ms + 'ms';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Long format for `ms`.
|
||||||
|
*
|
||||||
|
* @param {Number} ms
|
||||||
|
* @return {String}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function fmtLong(ms) {
|
||||||
|
var msAbs = Math.abs(ms);
|
||||||
|
if (msAbs >= d) {
|
||||||
|
return plural(ms, msAbs, d, 'day');
|
||||||
|
}
|
||||||
|
if (msAbs >= h) {
|
||||||
|
return plural(ms, msAbs, h, 'hour');
|
||||||
|
}
|
||||||
|
if (msAbs >= m) {
|
||||||
|
return plural(ms, msAbs, m, 'minute');
|
||||||
|
}
|
||||||
|
if (msAbs >= s) {
|
||||||
|
return plural(ms, msAbs, s, 'second');
|
||||||
|
}
|
||||||
|
return ms + ' ms';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pluralization helper.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function plural(ms, msAbs, n, name) {
|
||||||
|
var isPlural = msAbs >= n * 1.5;
|
||||||
|
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var __webpack_module_cache__ = {};
|
||||||
|
/******/
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||||
|
/******/ if (cachedModule !== undefined) {
|
||||||
|
/******/ return cachedModule.exports;
|
||||||
|
/******/ }
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||||
|
/******/ // no module.id needed
|
||||||
|
/******/ // no module.loaded needed
|
||||||
|
/******/ exports: {}
|
||||||
|
/******/ };
|
||||||
|
/******/
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports;
|
||||||
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/************************************************************************/
|
||||||
|
/******/
|
||||||
|
/******/ // startup
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
||||||
|
/******/ var __webpack_exports__ = __webpack_require__(585);
|
||||||
|
/******/ module.exports = __webpack_exports__;
|
||||||
|
/******/
|
600
test_src/string-width.bundle.cjs
Normal file
600
test_src/string-width.bundle.cjs
Normal file
File diff suppressed because one or more lines are too long
16
todo
16
todo
@@ -3,12 +3,22 @@ Please note down problem exploration
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Repo mining
|
||||||
|
|
||||||
|
-> Get list of all packages
|
||||||
|
-> >50000 downloads
|
||||||
|
-> filter by package.json exists in root
|
||||||
|
-> filter by test libs
|
||||||
|
-> filter away typescript -> existence of tsconfig.json
|
||||||
|
|
||||||
|
|
||||||
|
-> filter by unsliceable libs (?)
|
||||||
|
|
||||||
###
|
|
||||||
My single lib analysis.
|
|
||||||
|
|
||||||
|
### My single lib analysis.
|
||||||
|
|
||||||
- [ ] Scan a library. Get its dependencies.
|
- [ ] Scan a library. Get its dependencies.
|
||||||
- [ ] Call for its dependencies. Proxy it.
|
- [ ] Call for its dependencies. Webpack them into individual files.
|
||||||
|
- [ ] Optional: Use webpack to push them all into one lib file
|
||||||
|
- [ ] Slice this lib for packages
|
||||||
|
- [ ] Replace/proxy them and then unit test them.
|
Reference in New Issue
Block a user