diff --git a/master.sh b/master.sh new file mode 100755 index 0000000..41cae8c --- /dev/null +++ b/master.sh @@ -0,0 +1,94 @@ + + + +REPO_BASE="mime-types" + +REPO_FOLDER="../candidates-repos/$REPO_BASE" + +fail() { + echo "Error: $1" + exit "${2-1}" ## Return a code specified by $2, or 1 by default. +} + +if [[ -d "$REPO_FOLDER" ]]; then + echo "" +else + fail "Repository folder does not exist: $REPO_FOLDER" +fi + +INPUT_FUNCTION="$1" + +if [[ -z "$INPUT_FUNCTION" ]]; then + fail "No input function provided. Usage: $0 " +fi + +echo "Input function: $INPUT_FUNCTION"; + +case "$INPUT_FUNCTION" in + "pre-test") + pushd "$REPO_FOLDER" + read -p "Deleting old node_modules_2 directory?" choice + if [[ "$choice" == "y" || "$choice" == "Y" ]]; + then + rm -rf node_modules_2 + else + echo "Skipping deletion of node_modules_2" + fi + npm i --silent || fail "Failed to install dependencies" + npm run test + popd + ;; + "rollback") + pushd "$REPO_FOLDER" + # Move node_modules_2 back to node_modules + if [[ -d "node_modules_2" ]]; then + echo "Restoring node_modules from node_modules_2" + rm -irf node_modules + mv node_modules_2 node_modules + else + fail "node_modules_2 does not exist, cannot rollback" + fi + popd + ;; + "indeps") + # Inactivate the repo by moving node_modules to node_modules_2 + pushd "$REPO_FOLDER" + mv node_modules node_modules_2 + popd + ;; + "stat") + # Generate dependency statistics + pushd "$REPO_FOLDER" >> /dev/null + if [[ ! -d "node_modules" ]]; then + echo "node_modules directory does not exist" + else + echo "node_modules directory exists" + fi + if [[ ! -d "node_modules_2" ]]; then + echo "node_modules_2 directory does not exist" + else + echo "node_modules_2 directory exists" + fi + popd >> /dev/null + ;; + "cov") + pushd "$REPO_FOLDER" + npm i --silent || fail "Failed to install dependencies" + npm i -D @types/node || fail "Failed to install node types" + nyc npm run test + ;; + "exec") + + ./script-placer.sh "$REPO_FOLDER" + OVERALL_RESULT=$? + if [[ $OVERALL_RESULT -ne 0 ]]; then + fail "script-placer.sh failed with exit code $OVERALL_RESULT" + else + echo "script-placer.sh executed successfully." + fi + ;; + *) + fail "Unknown function: $INPUT_FUNCTION. Supported functions: test, build." + ;; + +esac \ No newline at end of file diff --git a/minableRepositories2.csv b/minableRepositories2.csv index c46258f..7ef8ae0 100644 --- a/minableRepositories2.csv +++ b/minableRepositories2.csv @@ -2,6 +2,7 @@ debug,npm run test:node && npm run test:browser && npm run lint glob-parent,nyc mocha --async-only js-yaml,npm run lint && mocha fs-extra,npm run lint && npm run unit && npm run unit-esm +cross-spawn,jest --env node --coverage iconv-lite,mocha --reporter spec --grep . braces,mocha -r ./test/mocha-initialization.js fill-range,npm run lint && npm run mocha @@ -42,6 +43,7 @@ through2,npm run lint && npm run test:node && npm run test:browser css-tree,mocha lib/__tests --require lib/__tests/helpers/setup.js --reporter progress psl,mocha test/*.spec.js proxy-addr,mocha --reporter spec --bail --check-leaks test/ +prop-types,npm run tests-only 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 jsdom,npm-run-all --continue-on-error test:* @@ -69,7 +71,9 @@ color,xo && tsd && mocha @webassemblyjs/ieee754,make test @webassemblyjs/utf8,make test @webassemblyjs/floating-point-hex-parser,make test +@babel/preset-modules,eslint src test && jest --colors url-parse,c8 --reporter=lcov --reporter=text mocha test/test.js +jsx-ast-utils,npm run tests-only -- @cspotcode/source-map-support,mocha simple-swizzle,mocha --compilers coffee:coffee-script/register global-prefix,mocha @@ -78,11 +82,14 @@ compression,mocha --check-leaks --reporter spec @aws-crypto/util,lerna run test compressible,mocha --reporter spec --bail --check-leaks test/ regenerator-transform,test/run.sh +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 +postcss-modules-scope,yarn test:coverage thenify,mocha --reporter spec ecdsa-sig-formatter,istanbul cover --root src _mocha -- spec mz,mocha --reporter spec @@ -90,6 +97,7 @@ thenify-all,mocha --reporter spec rechoir,nyc mocha --async-only eslint-plugin-prettier,pnpm lint && 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 handlebars,npm run test:mocha @@ -103,11 +111,16 @@ expand-brackets,mocha node-gyp,cross-env NODE_GYP_NULL_LOGGER=true mocha --timeout 15000 test/test-download.js test/test-* extglob,mocha fd-slicer,mocha --reporter spec --check-leaks +cli-table3,jest --color +react-transition-group,npm run lint && npm run testonly +safe-regex,jest src/* http-proxy,nyc --reporter=text --reporter=lcov npm run mocha promise,mocha --bail --timeout 200 --slow 99999 -R dot && npm run test-memory-leak set-value,mocha csso,mocha test --reporter ${REPORTER:-progress} promise-retry,mocha --bail -t 10000 +react-router,jest +postcss-loader,npm run test:coverage object.pick,mocha language-tags,c8 mocha d3-array,mocha 'test/**/*-test.js' && eslint src test @@ -121,6 +134,7 @@ archiver-utils,mocha --reporter dot object-visit,mocha collection-visit,mocha map-visit,mocha +react-router-dom,jest pascalcase,mocha object-copy,mocha static-extend,mocha @@ -135,14 +149,17 @@ snapdragon,mocha nanomatch,mocha class-utils,mocha selfsigned,mocha -t 5000 +sass-loader,npm run test:coverage snapdragon-util,mocha hash.js,mocha --reporter=spec test/*-test.js && npm run lint lie,npm run jshint && mocha -R nyan ./test/cover.js && tsc --noEmit ./test/types.ts elliptic,npm run lint && npm run unit 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 +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 +lint-staged,cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --coverage d3-interpolate,mocha 'test/**/*-test.js' && eslint src test pretty-error,"mocha ""test/**/*.coffee""" spdy,mocha --reporter=spec test/*-test.js @@ -159,8 +176,10 @@ des.js,NODE_OPTIONS=--openssl-legacy-provider mocha --reporter=spec test/*-test. d3-time-format,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test d3-scale,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test json-bigint,./node_modules/mocha/bin/mocha -R spec --check-leaks test/*-test.js +formidable,pnpm run audit && node --test ./test-node/**/*.test.js && pnpm run test-jest:ci dom-converter,"mocha ""test/**/*.coffee""" expand-tilde,mocha +file-loader,npm run test:coverage archiver,mocha --reporter dot homedir-polyfill,mocha zip-stream,mocha --reporter dot @@ -172,7 +191,9 @@ linkify-it,npm run lint && npm run build && c8 --exclude build --exclude test -r one-time,nyc --reporter=text --reporter=json-summary npm run test:runner colorspace,mocha test.js resolve-dir,mocha +yargs-unparser,jest --env node --coverage @dabh/diagnostics,nyc --reporter=text --reporter=lcov npm run test:runner +warning,npm run test:dev && npm run test:prod @parcel/watcher,mocha findup-sync,nyc mocha --async-only duplexer2,mocha -R tap @@ -180,16 +201,21 @@ compare-func,npm run-script lint && mocha 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 notifications-node-client,"mocha ""spec/**/*.js"" && npm run test:markdown:standard" basic-auth,mocha --reporter spec --bail --check-leaks test/ +portfinder,jest --runInBand @img/sharp-linux-x64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types +@remix-run/router,jest connect,mocha --require test/support/env --reporter spec --bail --check-leaks test/ needle,mocha test ts-loader,git clean -xfd test/comparison-tests && git clean -xfd test/execution-tests && node test/run-tests.js +polished,jest src @aws-crypto/crc32c,lerna run test @aws-crypto/sha1-browser,lerna run test aws-sdk,node ./scripts/composite-test.js for-own,mocha sinon,npm run test-node && npm run test-headless && npm run test-webworker md5,mocha +source-map-loader,npm run test:coverage +node-notifier,jest nodemon,npm run lint && npm run spec sane,npm run format && eslint src/ test/ index.js && mocha --bail test/test.js && mocha --bail test/utils-test.js && mocha --bail 'test/watchexec_*-test.js' @parcel/watcher-linux-x64-glibc,mocha @@ -203,13 +229,18 @@ write,mocha coa,nyc mocha multer,mocha --reporter spec --exit --check-leaks test/ redis-parser,nyc --cache --preserve-comments mocha -- -R spec && nyc report --reporter=html +webpack-bundle-analyzer,npm run install-test-webpack-versions && jest --runInBand eslint-plugin-es,npm run -s test:mocha @parcel/watcher-linux-x64-musl,mocha temp,mocha test/temp-test.js recursive-readdir,mocha test/ path-root,mocha lazy-cache,mocha +eslint-plugin-promise,jest --coverage nise,mocha lib/**/*.test.js +css-to-react-native,jest +react-smooth,cross-env BABEL_ENV=test jest +url-loader,npm run test:coverage router,mocha --reporter spec --check-leaks test/ parse-filepath,mocha vinyl,nyc mocha --async-only @@ -217,12 +248,15 @@ css,mocha --require should --reporter spec test/*.js node-dir,./node_modules/.bin/mocha --reporter spec request-progress,mocha --bail streamroller,nyc --check-coverage mocha +yarn,yarn lint && yarn test-only currently-unhandled,xo && nyc ava @webassemblyjs/wast-parser,make test @webassemblyjs/helper-code-frame,make test @webassemblyjs/helper-fsm,make test @webassemblyjs/helper-module-context,make test isomorphic-fetch,jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha +jscodeshift,jest --bail +jest-junit,jest d3-transition,mocha 'test/**/*-test.js' && eslint src test @cypress/xvfb,eslint **/*.js && mocha morgan,mocha --check-leaks --reporter spec @@ -235,15 +269,21 @@ browser-resolve,node scripts/setup-symlinks.js && mocha --reporter list test/*.j wait-on,npm run lint && npm run test:mocha chromium-bidi,wireit d3-zoom,mocha 'test/**/*-test.js' && eslint src test +@pnpm/npm-conf,jest babel-eslint,npm run lint && npm run test-only +rollup-plugin-terser,jest +@tailwindcss/typography,jest @aws-crypto/ie11-detection,lerna run test nock,nyc --reporter=lcov --reporter=text mocha --recursive tests stacktrace-parser,tsd && mocha --require ./mocha-babel-hook 'test/**/*.spec.js' zen-observable-ts,mocha tests/bundle.cjs watchpack-chokidar2,mocha +react-popper,yarn test:eslint && yarn test:flow && yarn test:ts && yarn test:jest randexp,istanbul cover node_modules/.bin/_mocha -- test/*-test.js +swagger-ui-dist,run-s lint-errors test:unit cy:ci mnemonist,mocha find-yarn-workspace-root,mocha tests/**/*-test.js +postcss-clamp,jest && eslint-ci *.js unixify,mocha @surma/rollup-plugin-off-main-thread,node ./run_tests.js cli-progress,mocha test/**/*.test.js @@ -253,22 +293,29 @@ npm-run-all,nyc --require babel-register npm run _mocha d3-scale-chromatic,mocha 'test/**/*-test.js' && eslint src test cookie-parser,mocha --reporter spec --bail --check-leaks test/ d3-force,mocha 'test/**/*-test.js' && eslint src test +react-dropzone,cross-env NODE_ENV=test yarn lint && jest --coverage && yarn typescript d3-dsv,TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test localforage,"node -e ""require('grunt').cli()"" null test" +raw-loader,npm run test:coverage +babel-plugin-styled-components,jest @mui/icons-material,node scripts/test.mjs @zkochan/js-yaml,npm run lint && mocha d3-delaunay,mocha 'test/**/*-test.js' && eslint src test d3,mocha 'test/**/*-test.js' && eslint src test window-size,mocha +@module-federation/sdk,nx run-many --target=test sockjs-client,mocha tests/node.js +@ardatan/relay-compiler,"f() { EXIT=0; npm run typecheck || EXIT=$?; npm run test-dependencies || EXIT=$?; npm run jest ""$@"" || EXIT=$?; exit $EXIT; }; f" seek-bzip,mocha cookies,mocha --require test/support/env --reporter spec --bail --check-leaks test/ keygrip,mocha --reporter spec test/ @wry/context,nx run-many --target=test --all --parallel +react-shallow-renderer,jest marked-terminal,cross-env FORCE_HYPERLINK=0 mocha tests/*.js --reporter spec get-pkg-repo,eslint src/ && nyc mocha --opts mocha.opts src/**/*.spec.js d3-brush,mocha 'test/**/*-test.js' && eslint src test brotli,mocha +lazy-universal-dotenv,NODE_OPTIONS=--experimental-vm-modules jest lolex,npm run test-node && npm run test-headless contains-path,mocha d3-chord,mocha 'test/**/*-test.js' && eslint src test @@ -277,6 +324,7 @@ d3-contour,mkdir -p test/output && mocha -r module-alias/register 'test/**/*-tes canvas,mocha test/*.test.js unicode-trie,mocha passport,node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js +relay-runtime,"f() { EXIT=0; npm run typecheck || EXIT=$?; npm run test-dependencies || EXIT=$?; npm run jest ""$@"" || EXIT=$?; exit $EXIT; }; f" plist,make test object.defaults,mocha d3-fetch,mocha 'test/**/*-test.js' && eslint src test @@ -285,15 +333,24 @@ klaw-sync,npm run lint && npm run unit dd-trace,SERVICES=* yarn services && mocha --expose-gc 'packages/dd-trace/test/setup/node.js' 'packages/*/test/**/*.spec.js' nearley,mocha test/*.test.js @datadog/native-iast-taint-tracking,mocha --recursive +@module-federation/runtime,nx run-many --target=test stylus,mocha test/ test/middleware/ --require chai --bail --check-leaks --reporter dot @datadog/native-metrics,mocha -n expose-gc 'test/**/*.spec.js' && node test/main +react-element-to-jsx-string,jest +@module-federation/error-codes,nx run-many --target=test +proper-lockfile,jest --env node --coverage --runInBand +@module-federation/webpack-bundler-runtime,nx run-many --target=test is-color-stop,nyc --reporter=lcov --reporter=text mocha gonzales-pe,bash ./scripts/test.sh bufferutil,mocha +stylelint-scss,npm run jest -- --coverage +@module-federation/runtime-tools,nx run-many --target=test +inline-style-prefixer,cross-env BABEL_ENV=commonjs jest make-iterator,mocha glob-base,mocha c8,cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js mocha --timeout=10000 ./test/*.js liftoff,nyc mocha --async-only +react-syntax-highlighter,jest http-assert,mocha --reporter spec --check-leaks test/ uid-safe,mocha --trace-deprecation --reporter spec --bail --check-leaks test/ karma,npm run test:unit && npm run test:e2e && npm run test:client @@ -302,6 +359,7 @@ object.map,mocha sanitize-html,npx eslint . && mocha test/test.js find-file-up,mocha object.omit,mocha +find-babel-config,jest find-pkg,mocha koa-convert,mocha index.spec.js --exit ssf,make test @@ -310,19 +368,24 @@ cfb,make test utf-8-validate,mocha glob-stream,nyc mocha --async-only expand-range,mocha +babel-plugin-module-resolver,jest jsonpath,mocha -u tdd test && jscs lib && jshint lib xss,export DEBUG=xss:* && mocha -t 5000 mquery,mocha --exit test/index.js test/*.test.js +json-to-pretty-yaml,jest mv,mocha test/test.js --reporter spec eslint-plugin-eslint-comments,nyc npm run -s test:mocha vinyl-fs,nyc mocha --async-only ethers,npm run test-esm +css-box-model,yarn jest easy-table,mocha -R dot --check-leaks eslint-plugin-es-x,npm run -s test:mocha wait-port,DEBUG=wait-port nyc --report-dir 'artifacts/coverage' -x 'lib/**/*.spec.js' --reporter=html --reporter=text mocha --recursive -t 10000 'lib/**/*.spec.js' is-dotfile,mocha parse-glob,mocha +serve-handler,yarn run test-lint && yarn run test-integration plugin-error,nyc mocha --async-only +xml-js,npm run jasmine && npm run jest && npm run test:types ansi-to-html,nyc mocha --reporter tap unicode-properties,npm run build && mocha lmdb,mocha test/**.test.js --expose-gc --recursive @@ -330,6 +393,7 @@ tdigest,mocha specs tslint,npm-run-all test:pre -p test:mocha test:rules serve-favicon,mocha --reporter spec --bail --check-leaks test/ is-equal-shallow,mocha +@module-federation/runtime-core,nx run-many --target=test regex-cache,mocha git-log-parser,mocha node-environment-flags,mocha @@ -343,6 +407,7 @@ module-definition,npm run lint && npm run mocha json2mq,./node_modules/.bin/mocha test create-error-class,mocha detective-amd,npm run lint && npm run mocha +web3-utils,lerna run test --stream --parallel get-amd-module-type,npm run lint && npm run mocha detective-cjs,npm run lint && npm run mocha should,mocha -R mocha-better-spec-reporter --require ./cjs/should --color --check-leaks ./test/*.test.js ./test/**/*.test.js @@ -362,15 +427,24 @@ vinyl-sourcemap,nyc mocha --async-only cls-hooked,mocha test/*.js & tap test/tap/*.tap.js ansi-gray,mocha pm2,bash test/unit.sh && bash test/e2e.sh +bcrypt,jest mixin-object,mocha good-listener,karma start --single-run +jest-canvas-mock,jest --no-cache +has-symbol-support-x,npm run clean:coverage && jest +has-to-string-tag-x,npm run clean:coverage && jest express-session,./test/support/gencert.sh && mocha --require test/support/env --check-leaks --bail --no-exit --reporter spec test/ isurl,nyc --silent mocha test.js --bail --check-leaks @supabase/node-fetch,cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js +postcss-modules,make test @ethersproject/abi,npm run test-esm react-clientside-effect,mocha +@module-federation/dts-plugin,nx run-many --target=test load-yaml-file,standard && mocha && ts-readme-generator --check @wry/caches,nx run-many --target=test --all --parallel +@module-federation/managers,nx run-many --target=test +@module-federation/third-party-dts-extractor,nx run-many --target=test +optimize-css-assets-webpack-plugin,jest ordered-read-streams,nyc mocha --async-only errorhandler,mocha --reporter spec --bail --check-leaks test/ react-helmet,karma start karma.config.js @@ -383,6 +457,7 @@ align-text,mocha swagger-ui-express,./node_modules/.bin/mocha test/*.spec.js gulplog,nyc mocha --async-only broadcast-channel,"echo ""RUN ALL:"" && npm run test:node && npm run test:browser && npm run test:e2e && npm run test:modules" +stylus-loader,npm run test:coverage css-vendor,cross-env NODE_ENV=test karma start --single-run @ethersproject/bytes,npm run test-esm @ethersproject/address,npm run test-esm @@ -394,9 +469,13 @@ right-align,mocha @ethersproject/keccak256,npm run test-esm cwd,mocha @parcel/watcher-linux-arm64-glibc,mocha +@module-federation/enhanced,nx run-many --target=test @parcel/watcher-win32-x64,mocha +@module-federation/rspack,nx run-many --target=test +@module-federation/manifest,nx run-many --target=test karma-coverage,mocha @ethersproject/rlp,npm run test-esm +@module-federation/bridge-react-webpack-plugin,nx run-many --target=test wkx,jshint . && nyc mocha @parcel/watcher-linux-arm64-musl,mocha @ethersproject/abstract-signer,npm run test-esm @@ -407,10 +486,12 @@ sync-fetch,mocha --throw-deprecation test/spec.js fontkit,run-s build mocha @ethersproject/hash,npm run test-esm @ethersproject/properties,npm run test-esm +babel-plugin-const-enum,jest @ethersproject/networks,npm run test-esm multipipe,prettier-standard '**/*.js' 'test/*.js' && standard && mocha --reporter spec --timeout 300 @ethersproject/signing-key,npm run test-esm chai-as-promised,c8 mocha +stylelint-order,node --experimental-vm-modules node_modules/jest/bin/jest.js @ethersproject/web,npm run test-esm gulp,nyc mocha --async-only glob-watcher,nyc mocha test test/lib --async-only @@ -418,15 +499,22 @@ glob-watcher,nyc mocha test test/lib --async-only @sinonjs/formatio,mocha 'lib/**/*.test.js' @ethersproject/base64,npm run test-esm stream-to-array,mocha --reporter spec --bail +@module-federation/data-prefetch,nx run-many --target=test react-modal,cross-env NODE_ENV=test karma start @parcel/watcher-darwin-arm64,mocha axios-mock-adapter,mocha && npm run clean && npm run build:umd:min && npm run test:types cz-conventional-changelog,mocha *.test.js json-pointer,nyc make test async-done,nyc mocha --async-only +react-beautiful-dnd,jest --config ./jest.config.js +babel-plugin-react-docgen,jest has-glob,mocha +vue-style-loader,jest +@date-io/core,TZ=UTC NODE_ICU_DATA='./node_modules/full-icu' jest --watch @parcel/watcher-darwin-x64,mocha +promptly,jest --env node --coverage --runInBand gulp-cli,mocha --async-only --timeout 5000 test/lib test +vuex,npm run lint && npm run build && npm run test:types && npm run test:unit && npm run test:ssr && npm run test:e2e && npm run test:esm semver-greatest-satisfied-range,nyc mocha --async-only merge-deep,mocha bach,nyc mocha --async-only @@ -437,3 +525,100 @@ each-props,nyc mocha --async-only @parcel/watcher-android-arm64,mocha @parcel/watcher-win32-ia32,mocha is2,./node_modules/.bin/mocha -C --reporter list tests.js +@parcel/watcher-freebsd-x64,mocha +tcp-port-used,./node_modules/.bin/mocha --reporter=list ./test.js +@ethersproject/sha2,npm run test-esm +undertaker,nyc mocha --async-only +levenary,jest +postcss-html,nyc npm run mocha +airbnb-prop-types,npm run build:test && npm run tests-only +@ethersproject/providers,npm run test-esm +remove-bom-stream,nyc mocha --async-only +sqlite3,node test/support/createdb.js && mocha -R spec --timeout 480000 +append-buffer,mocha +reactcss,npm run unit-test -s && npm run eslint -s +remove-bom-buffer,mocha +@img/sharp-linux-arm64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types +amqplib,make test +react-color,npm run jest && npm run eslint +pm2-axon-rpc,mocha --reporter spec +@ethersproject/basex,npm run test-esm +@ethersproject/random,npm run test-esm +mocha-junit-reporter,MOCHA_FILE=test/mocha.xml node_modules/.bin/mocha test --reporter=spec +as-table,npm run build && env AS_TABLE_TEST_FILE='./build/as-table' nyc --reporter=html --reporter=text mocha --reporter spec +module-lookup-amd,npm run lint && npm run mocha +docker-modem,./node_modules/mocha/bin/mocha.js -R spec --exit +filing-cabinet,npm run lint && npm run mocha +dependency-tree,npm run lint && npm run mocha +get-source,nyc --reporter=html --reporter=text mocha test/test.path test/test.node --reporter spec +stacktracey,nyc --reporter=html --reporter=text mocha --reporter spec +node-sass,"mocha test/{*,**/**}.js" +dotenv-defaults,jest +@pm2/agent,mocha test/units/*.mocha.js +dockerode,./node_modules/mocha/bin/mocha.js -R spec --exit +mochawesome-report-generator,"cross-env NODE_ENV=test nyc mocha ""test/spec/**/*.test.js"" --exit" +create-react-context,jest +child-process-ext,mocha --recursive +commitizen,nyc --require @babel/register npm run test-actual +@img/sharp-linuxmusl-arm64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types +pm2-axon,make test +passport-jwt,./node_modules/.bin/mocha --reporter spec --require test/bootstrap test/*test.js +@ethersproject/wordlists,npm run test-esm +@ethersproject/pbkdf2,npm run test-esm +@ethersproject/hdnode,npm run test-esm +pm2-deploy,mocha +tcomb-validation,npm run lint && mocha +@ethersproject/contracts,npm run test-esm +sass-graph,nyc mocha +dotenv-webpack,jest +vscode-json-languageservice,mocha +@ethersproject/json-wallets,npm run test-esm +@ethersproject/wallet,npm run test-esm +@pm2/js-api,mocha test/* +@ethersproject/units,npm run test-esm +start-server-and-test,npm run unit +dogapi,mocha --recursive ./test +rework,mocha --require should --reporter spec +@fortawesome/react-fontawesome,jest --silent +scss-tokenizer,jest +redux-mock-store,npm run build && npm run test:unit && npm run test:cjs && npm run test:es +mochawesome,npm run lint && cross-env NODE_ENV=test nyc mocha --config test/.mocharc.json +html-loader,npm run test:coverage +thread-loader,npm run test:coverage +vizion,mocha +parse-git-config,mocha +ember-cli-version-checker,mocha tests/*-tests.js +array-sort,mocha +react-sizeme,jest +@img/sharp-darwin-arm64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types +default-compare,mocha +whatwg-url-without-unicode,jest +@img/sharp-win32-x64,npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types +@ethersproject/solidity,npm run test-esm +pad-right,mocha +array-last,mocha +prop-types-extra,npm run lint && jest +eslint-loader,npm run test:coverage +passport-local,make test +linebreak,parcel build && mocha test/index.js --reporter landing +gifwrap,mocha --timeout=6000 ./test/*.js +@parcel/watcher-linux-arm-musl,mocha +native-url,jest && karmatic +console.table,node test/test.js && grunt && npm run unit +depcheck,mocha ./test ./test/special --timeout 10000 +coveralls,npm run lint && npm run mocha +is-whitespace,mocha +msgpack-lite,make test +diffable-html,jest --verbose +assertion-error-formatter,yarn run lint && yarn run unit-test +cli-tableau,mocha test/* +better-sqlite3,mocha --exit --slow=75 --timeout=5000 +jest-serializer-html,jest --verbose +web3-eth-iban,lerna run test --stream --parallel +sync-rpc,jest --coverage +eslint-import-resolver-webpack,npm run tests-only +web3-providers-http,lerna run test --stream --parallel +arr-map,mocha +@lezer/json,npm run build && mocha test/test-json.js +condense-newlines,mocha +requireg,mocha -u tdd --ui exports --reporter spec --slow 2000ms --bail diff --git a/package-lock.json b/package-lock.json index c7e22c8..f28ff0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "all-the-package-repos": "^2.0.2306", "ansi-colors": "^4.1.3", + "babel-preset-node6": "^11.0.0", "csv": "^6.3.11", "download-counts": "^2.20250701.0", "eslint-scope": "^8.4.0", @@ -37,6 +38,7 @@ "@types/eslint-scope": "^8.3.0", "@types/estree": "^1.0.8", "@types/node": "^24.0.0", + "babel-preset-stage-2": "^6.24.1", "chai": "^5.2.1", "classnames": "^2.5.1", "mocha": "^11.7.1" @@ -646,6 +648,442 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-code-frame/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha512-TYX2QQATKA6Wssp6j7jqlw4QLmABDN1olRdEHndYvBXdaXM5dcx6j5rN0+nd+aVL+Th40fAEYvvw/Xxd/LETuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha512-gCtfYORSG1fUMX4kKraymq607FWgMWg+j42IFPc18kFQEsmtaibP4UrqsXt8FlEJle25HUd4tsoDR7H2wDhe9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha512-SFbWewr0/0U4AiRzsHqwsbOQeLXVa9T1ELdqEa2efcQB5KopTnunAqoj07TuHlN2lfTQNPGO/rJR4FMln5fVcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-bindify-decorators": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha512-WfgKFX6swFB1jS2vo+DwivRN4NB8XUdM3ij0Y1gnC21y1tdBoe6xjVnd7NSI6alv+gZXCtJqvrTeMW3fR/c0ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha512-RYqaPD0mQyQIFRu7Ho5wE2yvA/5jxqCIj/Lv4BXNq23mHYu/vxikOy2JueLiBxQknwapwrJeNCesvY0ZcfnlHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha512-4Zp4unmHgw30A1eWI5EpACji2qMocisdXhAftfhXoSV9j0Tvj6nRFE3tOmRY912E0FMRm/L5xWE7MGVT2FoLnw==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha512-EbciFN5Jb9iqU9bqaLmmFLx2G8pAUsvpWJ6OzOWBNrSY9qTohXj+7YfZx6Ug1Qqh7tCb1EA7Jvn9bMC1HBiucg==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha512-chI3Rt9T1AbrQD1s+vxw3KcwC9yHtF621/MacuItITfZX344uhQoANjpoSJZleAmW2tjlolqB/f+h7jIqXa7pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha512-AWj19x2aDm8qFQ5O2JcD6pwJDW1YdcnO+1b81t7gxrGjz5VHiUqeYWAR4h7zueWMalRelrQDXprv2FrY1dbpbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha512-MioUE+LfjCEz65Wf7Z/Rm4XCP5k2c+TbMd2Z2JKc7U9uwjBhAfNPE48KC4GTGKhppMeYVepwDBNO/nGY6NYHBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha512-Z/flU+T9ta0aIEKl1tGEmN/pZiI1uXmCiGFRegKacQfEJzp7iNsKloZmyJlQr+75FCJtiFfGIK03SiCvCt9cPQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha512-C4Aq+GaAj83pRQ0EFgTvw5YO6T3Qz2KGrNRwIj9mSoNHVvdZY4KO2uA6HNtNXCw993iSZnckY1aLW8nOi8i4+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha512-Gx9CH3Q/3GKbhs07Bszw5fPTlU+ygrOGfAhEt7W2JICwufpC4SuO0mG0+4NykPBSYPMJhqvVlDBU17qB1D+hMQ==", + "license": "MIT" + }, + "node_modules/babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha512-uT7eovUxtXe8Q2ufcjRuJIOL0hg6VAUJhiWJBLxH/evYAw+aqoJLcYTR8hqx13iOx/FfbCMHgBmXWZjukbkyPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-generators": "^6.5.0", + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha512-7BgYJujNCg0Ti3x0c/DL3tStvnKS6ktIYOmo9wginv/dfZOrbSZ+qG4IRRHMBOzZ5Awb1skTiAsQXg/+IWkZYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha512-n4jtBA3OYBdvG5PRMKsMXJXHfLYw/ZOmtxCLOOwz6Ro5XlrColkStLnz1AS1L2yfPA9BKJ1ZNlmVCLjAL9DSIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "node_modules/babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha512-skQ2CImwDkCHu0mkWvCOlBCpBIHW4/49IZWVwV4A/EnWjL9bB6UBvLyMNe3Td5XDStSZNhe69j4bfEW8dvUbew==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-explode-class": "^6.24.1", + "babel-plugin-syntax-decorators": "^6.13.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "license": "MIT", + "dependencies": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "node_modules/babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha512-LzXDmbMkklvNhprr20//RStKVcT8Cu+SQtX18eMHLhjHf2yFzwtQ0S2f0jQ+89rokoNdmwoSqYzAhq86FxlLSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha512-ocgA9VJvyxwt+qJB0ncxV8kb/CjfTcECUY4tQ5VT7nP6Aohzobm8CDFaQ5FHdvZQzLmf0sgDxB8iRXZXxwZcyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "node_modules/babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha512-j3KtSpjyLSJxNoCDrhwiJad8kw0gJ9REGj8/CqL0HeRyLnvUNYV9zcqluL6QJSXh3nfsLEmSLvwRfGzrgR96Pw==", + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-preset-node6": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-node6/-/babel-preset-node6-11.0.0.tgz", + "integrity": "sha512-8NjYV/YC0WBNhV/G4Nhj0dzGN9vthc1nzhi0gzp1BH/nHp77Q1ByK5MWWe3em/n2wwGYjfuUcgvG+H09lEr9Gw==", + "license": "MIT", + "dependencies": { + "babel-plugin-syntax-trailing-function-commas": "^6.5.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.7.4" + } + }, + "node_modules/babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha512-9F+nquz+37PrlTSBdpeQBKnQfAMNBnryXw+m4qBh35FNbJPfzZz+sjN2G5Uf1CRedU9PH7fJkTbYijxmkLX8Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators": "^6.24.1", + "babel-preset-stage-3": "^6.24.1" + } + }, + "node_modules/babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha512-eCbEOF8uN0KypFXJmZXn2sTk7bPV9uM5xov7G/7BM08TbQEObsVs0cEWfy6NQySlfk7JBi/t+XJP1JkruYfthA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-plugin-transform-exponentiation-operator": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.22.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "license": "MIT", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", + "license": "MIT", + "dependencies": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/babel-traverse/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "license": "MIT", + "bin": { + "babylon": "bin/babylon.js" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1058,6 +1496,14 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true, + "license": "MIT" + }, "node_modules/count-array-values": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/count-array-values/-/count-array-values-1.2.1.tgz", @@ -1652,6 +2098,15 @@ "node": ">=4.0" } }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -1967,6 +2422,15 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "license": "BSD-2-Clause" }, + "node_modules/globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -2012,6 +2476,27 @@ "proxyquire": "^1.4.0" } }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -2140,6 +2625,15 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/is-arguments": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", @@ -2672,6 +3166,12 @@ "integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==", "license": "MIT" }, + "node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "license": "MIT" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2729,6 +3229,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -2746,6 +3252,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/loupe": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", @@ -3349,6 +3867,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -4088,6 +4612,15 @@ "node": ">=0.8" } }, + "node_modules/to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 634ee54..1de597c 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "all-the-package-repos": "^2.0.2306", "ansi-colors": "^4.1.3", + "babel-preset-node6": "^11.0.0", "csv": "^6.3.11", "download-counts": "^2.20250701.0", "eslint-scope": "^8.4.0", @@ -39,6 +40,7 @@ "@types/eslint-scope": "^8.3.0", "@types/estree": "^1.0.8", "@types/node": "^24.0.0", + "babel-preset-stage-2": "^6.24.1", "chai": "^5.2.1", "classnames": "^2.5.1", "mocha": "^11.7.1" diff --git a/run-tests-swapped.sh b/run-tests-swapped.sh new file mode 100755 index 0000000..f71fb13 --- /dev/null +++ b/run-tests-swapped.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -x +# This script processes a given repository by replacing its node_modules with the ones from the dist folder. +# The dist folder is expected to contain the base folder name of the repository, then inside that will be sliced dependencies. +# Usage: ./script-placer.sh + +fail() { + echo "Error: $1" + exit "${2-1}" ## Return a code specified by $2, or 1 by default. +} + +REPO_FOLDER="$1" +REPO_BASE=$(basename "$REPO_FOLDER") +if [[ -z "$REPO_FOLDER" ]]; then + echo "Usage: $0 " + exit 1 +fi + + +pushd "$REPO_FOLDER" + +if [[ -d "node_modules" ]]; then + echo "node_modules directory already exists, renaming to node_modules_2" + mv node_modules node_modules_2 +else + echo "No node_modules directory found, proceeding with the script" +fi + +NODE_PATH="/home/atreyab/Documents/Docs/SlicingImport/repos-js/safeImport/dist/$REPO_BASE:/home/atreyab/Documents/Docs/SlicingImport/repos-js/candidates-repos/$REPO_BASE/node_modules_2" npm run test +POST_TEST_RESULT=$? +# if post test is true, or both are false, then we can proceed + +if [[ $POST_TEST_RESULT -eq 0 ]]; then + echo "Successfully processed $REPO_BASE" +else + echo "Post test failed for $REPO_BASE" +fi +popd + diff --git a/script-placer-successes.sh b/script-placer-successes.sh new file mode 100755 index 0000000..460e73f --- /dev/null +++ b/script-placer-successes.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +## Run the script-placer.sh for each repository in the success.txt file + +while read -r repo; do + if [[ -n "$repo" ]]; then + # echo "Running script-placer.sh for repository: candidates/$repo" + ./script-placer.sh "../candidates-repos/$repo" || echo "Failed to process $repo" + else + echo "Skipping empty repository entry" + fi +done < success.txt \ No newline at end of file diff --git a/script-placer.sh b/script-placer.sh new file mode 100755 index 0000000..fbf3e2a --- /dev/null +++ b/script-placer.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# This script processes a given repository by replacing its node_modules with the ones from the dist folder. +# The dist folder is expected to contain the base folder name of the repository, then inside that will be sliced dependencies. +# Usage: ./script-placer.sh + +fail() { + echo "Error: $1" + exit "${2-1}" ## Return a code specified by $2, or 1 by default. +} + +REPO_FOLDER="$1" +REPO_BASE=$(basename "$REPO_FOLDER") +if [[ -z "$REPO_FOLDER" ]]; then + echo "Usage: $0 " + exit 1 +fi + +pushd "$REPO_FOLDER" +npm i --silent || fail "Failed to install dependencies" +rm -rf node_modules_2 +npm run test >> ../coverage/$REPO_BASE-pre.json +less ../coverage/$REPO_BASE-pre.json +if [[ $? -ne 0 ]]; then + echo "Tests failed in $REPO_FOLDER" + echo "$REPO_FOLDER" >> ../coverage/pre-failed.txt +fi +popd + + +echo "Processing repository at: $REPO_FOLDER" + +node src/index.mjs "$REPO_FOLDER" +PRE_TEST_RESULT=$? +if [[ $PRE_TEST_RESULT -ne 0 ]]; then + fail "Error processing repository: $REPO_FOLDER" +fi + +pushd "$REPO_FOLDER" +mv node_modules node_modules_2 +NODE_PATH="/home/atreyab/Documents/Docs/SlicingImport/repos-js/safeImport/dist/$REPO_BASE:/home/atreyab/Documents/Docs/SlicingImport/repos-js/candidates-repos/$REPO_BASE/node_modules_2" npm run test >> ../coverage/$REPO_BASE-post.txt +less ../coverage/$REPO_BASE-post.txt +POST_TEST_RESULT=$? +# if post test is true, or both are false, then we can proceed +if [[ $POST_TEST_RESULT -ne 0 && $PRE_TEST_RESULT -ne 0 ]]; then + echo "something" + echo $REPO_FOLDER >> ../coverage/failed.txt + # exit 1 +fi +if [[ $POST_TEST_RESULT -eq 0 ]]; then + echo "$REPO_BASE" >> ../coverage/success.txt + echo "Successfully processed $REPO_BASE" +fi +popd + diff --git a/script.sh b/script.sh index 5877edf..667db63 100755 --- a/script.sh +++ b/script.sh @@ -1,10 +1,17 @@ #!/bin/bash - -IGNORE_REPOS=("source-map-support") # Add the list of repositories to ignore +# test repos +IGNORE_REPOS=("source-map-support" "jsdom" "eslint-utils" "polished" "webpack-bundle-analyzer" "jscodeshift" "chromium-bidi" "react-popper" "react-dropzone" "babel-plugin-styled-components" "unicode-trie" "relay-runtime" "react-element-to-jsx-string" "inline-style-prefixer" "karma" "cfb" "serve-handler") # Add the list of repositories to ignore # set -e -rm -rf candidates + +function fail { + printf '%s\n' "$1" >&2 ## Send message to stderr. + exit "${2-1}" ## Return a code specified by $2, or 1 by default. +} + +# rm -rf candidates mkdir -p candidates +rm -iv processed.log current.log success.txt # Read the minableRepositories2.csv file (rows of repo,test script). Read the repo and copy it from the `cache` folder` while IFS=, read -r repo test_script; do @@ -23,25 +30,42 @@ while IFS=, read -r repo test_script; do # Check if the repo directory exists in the cache folder if [[ -d "../cache-repos/repos/$repo_name" ]]; then echo "Processing repository: $repo_name" - echo "Processing repository: $repo_name" > current.log + echo "Processing repository: $repo_name" >> current.log # Change to the repository directory - cp -r "../cache-repos/repos/$repo_name" "candidates/$repo_name" || exit - pushd "candidates/$repo_name" || exit - pnpm install || exit - popd || exit - + if [[ -d "candidates/$repo_name" ]]; then + echo "Repository $repo_name already exists in candidates, skipping..." + if [[ -f "candidates/$repo_name/.done" ]]; then + echo "Skipping $repo_name as it has already been processed." + continue + else + echo "Processing $repo_name again as .done file is missing. Run it again." + rm -rf "candidates/$repo_name" + fi + # Uncomment the next line if you want to remove the existing directory + # rm -rf "candidates/$repo_name" + else + cp -r "../cache-repos/repos/$repo_name" "candidates/$repo_name" || exit + pushd "candidates/$repo_name" > /dev/null || fail "Failed to pushd" + npm install --silent || fail "Failed to npm i" + popd > /dev/null || fail "Failed to popd" + - node src/index.mjs "candidates/$repo_name" >> processed.log - RESULT=$? - if [[ $RESULT -ne 0 ]]; then - echo "Error processing repository: $repo_name" - # exit $RESULT - else - echo "$repo_name">> "success.txt" + node src/index.mjs "candidates/$repo_name" >> processed.log 2>&1 + RESULT=$? + echo "--Separator-- $repo_name" >> processed.log + touch "candidates/$repo_name/.done" + if [[ $RESULT -ne 0 ]]; then + echo "Error processing repository: $repo_name" + # exit $RESULT + else + echo "$repo_name">> "success.txt" + fi fi # Change back to the original directory else echo "Repository $repo_name not found in cache" || exit 1 fi + else + echo "Skipping empty repository entry $repo"; fi done < minableRepositories2.csv \ No newline at end of file