From 2e511c3508e087dbd659637e56cb1c8de73de942 Mon Sep 17 00:00:00 2001 From: SorenEricMent Date: Sat, 17 Sep 2022 23:39:57 +0800 Subject: [PATCH] upd action --- .github/workflows/lint.yml | 23 + modules/iapi.mjs | 5 +- modules/utils.mjs | 12 +- node_modules/.package-lock.json | 92 +- node_modules/ansi-styles/index.d.ts | 2 +- node_modules/ansi-styles/index.js | 47 +- node_modules/ansi-styles/package.json | 6 +- node_modules/ansi-styles/readme.md | 6 +- .../es-abstract/2020/SameValueNonNumeric.js | 2 +- .../es-abstract/2021/SameValueNonNumeric.js | 2 +- .../es-abstract/2022/SameValueNonNumeric.js | 2 +- node_modules/es-abstract/CHANGELOG.md | 8 + node_modules/es-abstract/package.json | 17 +- node_modules/fast-stable-stringify/.npmignore | 4 + .../fast-stable-stringify/.travis.yml | 10 + node_modules/fast-stable-stringify/LICENSE | 21 + node_modules/fast-stable-stringify/README.md | 81 + .../cli/files-to-comparison-results.js | 67 + .../fast-stable-stringify/cli/format-table.js | 70 + .../fast-stable-stringify/cli/index.js | 19 + .../fast-stable-stringify/fixtures/index.js | 5 + .../fixtures/input-data-types.js | 191 + .../fixtures/log-result.json | 22 + .../fast-stable-stringify/fixtures/log.txt | 24 + node_modules/fast-stable-stringify/index.js | 73 + .../fast-stable-stringify/karma.conf.js | 124 + .../karma.conf.travis.js | 95 + .../fast-stable-stringify/package.json | 47 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 57 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 57 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 57 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 57 + .../IE 10.0.0 (Windows 7 0.0.0).json | 57 + .../IE 11.0.0 (Windows 7 0.0.0).json | 57 + .../IE 9.0.0 (Windows 7 0.0.0).json | 57 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 57 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 57 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 57 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 57 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 57 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 57 + .../IE 10.0.0 (Windows 7 0.0.0).json | 57 + .../IE 11.0.0 (Windows 7 0.0.0).json | 57 + .../IE 9.0.0 (Windows 7 0.0.0).json | 57 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 57 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 57 + .../fast-stable-stringify/results/escape.md | 20 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 35 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 35 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 35 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 35 + .../IE 10.0.0 (Windows 7 0.0.0).json | 35 + .../IE 11.0.0 (Windows 7 0.0.0).json | 35 + .../itar-long/IE 9.0.0 (Windows 7 0.0.0).json | 35 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 35 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 35 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 35 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 35 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 35 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 35 + .../IE 10.0.0 (Windows 7 0.0.0).json | 35 + .../IE 11.0.0 (Windows 7 0.0.0).json | 35 + .../IE 9.0.0 (Windows 7 0.0.0).json | 35 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 35 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 35 + .../fast-stable-stringify/results/itar.md | 20 + .../fast-stable-stringify/results/iter.md | 14 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 35 + .../Chrome Mobile 39.0.0 (Android 5.1.1).json | 35 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 35 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 35 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 35 + .../iter/IE 10.0.0 (Windows 7 0.0.0).json | 35 + .../iter/IE 11.0.0 (Windows 7 0.0.0).json | 35 + .../iter/IE 9.0.0 (Windows 7 0.0.0).json | 35 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 35 + .../iter/Mobile Safari 9.0.0 (iOS 9.2.0).json | 35 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 35 + .../iter/Safari 9.1.2 (Mac OS X 10.11.6).json | 35 + .../fast-stable-stringify/results/libs.md | 15 + .../Chrome 60.0.3112 (Windows 7 0.0.0).json | 46 + ...rome Mobile 55.0.2883 (Android 6.0.0).json | 46 + .../Edge 14.14393.0 (Windows 10 0.0.0).json | 46 + .../Firefox 54.0.0 (Windows 7 0.0.0).json | 46 + .../libs/IE 10.0.0 (Windows 7 0.0.0).json | 35 + .../libs/IE 11.0.0 (Windows 7 0.0.0).json | 35 + .../libs/IE 9.0.0 (Windows 7 0.0.0).json | 35 + .../Mobile Safari 10.0.0 (iOS 10.3.0).json | 46 + .../Safari 10.0.1 (Mac OS X 10.12.1).json | 46 + .../fast-stable-stringify/test/escape-long.js | 147 + .../test/escape-short.js | 147 + .../fast-stable-stringify/test/index.js | 6 + .../fast-stable-stringify/test/itar-long.js | 52 + .../fast-stable-stringify/test/itar-short.js | 52 + .../fast-stable-stringify/test/iter.js | 84 + .../fast-stable-stringify/test/libs.js | 57 + .../fast-stable-stringify/test/travis.js | 43 + .../fast-stable-stringify/test/validate.js | 24 + .../util/eachRecursive.js | 9 + .../util/get-git-hash-sync.js | 21 + .../util/get-lib-info.js | 22 + .../fast-stable-stringify/util/object-path.js | 47 + .../fast-stable-stringify/v8-profile/bench.js | 8 + .../fast-stable-stringify/v8-profile/run.sh | 2 + .../fast-stable-stringify/zuul-local.sh | 2 + node_modules/figures/index.js | 2 +- node_modules/figures/package.json | 11 +- node_modules/figures/readme.md | 7 +- node_modules/get-intrinsic/CHANGELOG.md | 7 + node_modules/get-intrinsic/index.js | 2 +- node_modules/get-intrinsic/package.json | 11 +- node_modules/inquirer/README.md | 3 +- node_modules/inquirer/lib/prompts/editor.js | 6 + node_modules/inquirer/package.json | 6 +- node_modules/ioredis/README.md | 7 +- .../ioredis/built/constants/TLSProfiles.d.ts | 10 +- .../ioredis/built/constants/TLSProfiles.js | 243 +- .../ioredis/built/utils/RedisCommander.d.ts | 4 +- node_modules/ioredis/package.json | 2 +- node_modules/is-callable/.editorconfig | 5 + node_modules/is-callable/.eslintignore | 1 - node_modules/is-callable/.eslintrc | 11 - node_modules/is-callable/.istanbul.yml | 47 - node_modules/is-callable/CHANGELOG.md | 37 + node_modules/is-callable/README.md | 13 + node_modules/is-callable/index.js | 33 +- node_modules/is-callable/package.json | 40 +- node_modules/is-callable/test/index.js | 69 +- node_modules/is-unicode-supported/index.js | 2 + .../is-unicode-supported/package.json | 2 +- node_modules/nodemailer/CHANGELOG.md | 4 + node_modules/nodemailer/README.md | 4 + .../nodemailer/lib/mailer/mail-message.js | 2 +- node_modules/nodemailer/package.json | 8 +- node_modules/object.assign/.eslintignore | 1 - node_modules/object.assign/.eslintrc | 4 +- .../.github/workflows/rebase.yml | 15 - .../.github/workflows/require-allow-edits.yml | 14 - node_modules/object.assign/.nycrc | 5 - node_modules/object.assign/CHANGELOG.md | 24 + node_modules/object.assign/README.md | 13 +- node_modules/object.assign/dist/browser.js | 231 +- node_modules/object.assign/implementation.js | 46 +- node_modules/object.assign/package.json | 39 +- node_modules/object.assign/test.html | 18458 ++++++++++++++++ .../object.assign/test/implementation.js | 19 + node_modules/object.assign/test/tests.js | 9 +- node_modules/slow-json-stringify/CHANGELOG.md | 9 + node_modules/slow-json-stringify/LICENSE | 21 + node_modules/slow-json-stringify/README.md | 365 + .../benchmark_before_find_optimization.md | 105 + node_modules/slow-json-stringify/dist/sjs.js | 2 + .../slow-json-stringify/dist/sjs.js.map | 1 + node_modules/slow-json-stringify/dist/sjs.mjs | 2 + .../slow-json-stringify/dist/sjs.mjs.map | 1 + .../slow-json-stringify/dist/sjs.umd.js | 2 + .../slow-json-stringify/dist/sjs.umd.js.map | 1 + node_modules/slow-json-stringify/index.d.ts | 78 + .../messages-for-my-future-self.md | 28 + node_modules/slow-json-stringify/package.json | 50 + .../slow-json-stringify/src/_makeChunks.mjs | 49 + .../slow-json-stringify/src/_makeQueue.mjs | 37 + .../slow-json-stringify/src/_prepare.js | 22 + .../slow-json-stringify/src/_select.js | 31 + .../slow-json-stringify/src/_utils.mjs | 85 + node_modules/slow-json-stringify/src/sjs.mjs | 47 + node_modules/test/.github/workflows/ci.yml | 4 + node_modules/test/CHANGELOG.md | 31 + node_modules/test/README.md | 227 +- .../test/lib/internal/abort_controller.js | 30 + node_modules/test/lib/internal/errors.js | 30 + .../test/lib/internal/main/test_runner.js | 89 +- .../lib/internal/per_context/primordials.js | 9 +- .../test/lib/internal/streams/operators.js | 24 + .../test/lib/internal/test_runner/harness.js | 24 +- .../test/lib/internal/test_runner/test.js | 275 +- .../test/lib/internal/test_runner/utils.js | 12 +- node_modules/test/lib/internal/timers.js | 7 + node_modules/test/lib/internal/validators.js | 69 +- node_modules/test/lib/test.d.ts | 88 +- node_modules/test/lib/test.js | 10 +- node_modules/test/package.json | 4 +- node_modules/test/test/common/index.js | 44 +- .../test-runner/never_ending_async.js | 7 + .../fixtures/test-runner/never_ending_sync.js | 6 + node_modules/test/test/message.js | 8 +- .../test/test/message/test_runner_abort.js | 48 + .../test/test/message/test_runner_abort.out | 249 + .../test/message/test_runner_abort_suite.js | 28 + .../test/message/test_runner_abort_suite.out | 99 + .../test/message/test_runner_desctibe_it.js | 64 +- .../test/message/test_runner_desctibe_it.out | 143 +- .../test/test/message/test_runner_hooks.js | 112 + .../test/test/message/test_runner_hooks.out | 229 + .../test/test/message/test_runner_output.js | 24 +- .../test/test/message/test_runner_output.out | 29 +- .../message/test_runner_unresolved_promise.js | 4 +- .../test_runner_unresolved_promise.out | 2 +- node_modules/test/test/parallel.mjs | 21 + .../test/parallel/test-runner-concurrency.js | 66 + .../test/parallel/test-runner-exit-code.js | 53 +- .../test/test/parallel/test-runner-misc.js | 35 + .../parallel/test-runner-option-validation.js | 30 + package-lock.json | 184 +- package.json | 2 + 205 files changed, 26349 insertions(+), 810 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 node_modules/fast-stable-stringify/.npmignore create mode 100644 node_modules/fast-stable-stringify/.travis.yml create mode 100644 node_modules/fast-stable-stringify/LICENSE create mode 100644 node_modules/fast-stable-stringify/README.md create mode 100644 node_modules/fast-stable-stringify/cli/files-to-comparison-results.js create mode 100644 node_modules/fast-stable-stringify/cli/format-table.js create mode 100644 node_modules/fast-stable-stringify/cli/index.js create mode 100644 node_modules/fast-stable-stringify/fixtures/index.js create mode 100644 node_modules/fast-stable-stringify/fixtures/input-data-types.js create mode 100644 node_modules/fast-stable-stringify/fixtures/log-result.json create mode 100644 node_modules/fast-stable-stringify/fixtures/log.txt create mode 100644 node_modules/fast-stable-stringify/index.js create mode 100644 node_modules/fast-stable-stringify/karma.conf.js create mode 100644 node_modules/fast-stable-stringify/karma.conf.travis.js create mode 100644 node_modules/fast-stable-stringify/package.json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/results/escape.md create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/results/itar.md create mode 100644 node_modules/fast-stable-stringify/results/iter.md create mode 100644 node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json create mode 100644 node_modules/fast-stable-stringify/results/libs.md create mode 100644 node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json create mode 100644 node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json create mode 100644 node_modules/fast-stable-stringify/test/escape-long.js create mode 100644 node_modules/fast-stable-stringify/test/escape-short.js create mode 100644 node_modules/fast-stable-stringify/test/index.js create mode 100644 node_modules/fast-stable-stringify/test/itar-long.js create mode 100644 node_modules/fast-stable-stringify/test/itar-short.js create mode 100644 node_modules/fast-stable-stringify/test/iter.js create mode 100644 node_modules/fast-stable-stringify/test/libs.js create mode 100644 node_modules/fast-stable-stringify/test/travis.js create mode 100644 node_modules/fast-stable-stringify/test/validate.js create mode 100644 node_modules/fast-stable-stringify/util/eachRecursive.js create mode 100644 node_modules/fast-stable-stringify/util/get-git-hash-sync.js create mode 100644 node_modules/fast-stable-stringify/util/get-lib-info.js create mode 100644 node_modules/fast-stable-stringify/util/object-path.js create mode 100644 node_modules/fast-stable-stringify/v8-profile/bench.js create mode 100755 node_modules/fast-stable-stringify/v8-profile/run.sh create mode 100755 node_modules/fast-stable-stringify/zuul-local.sh delete mode 100644 node_modules/is-callable/.eslintignore delete mode 100644 node_modules/is-callable/.istanbul.yml delete mode 100644 node_modules/object.assign/.eslintignore delete mode 100644 node_modules/object.assign/.github/workflows/rebase.yml delete mode 100644 node_modules/object.assign/.github/workflows/require-allow-edits.yml create mode 100644 node_modules/object.assign/test.html create mode 100644 node_modules/object.assign/test/implementation.js create mode 100644 node_modules/slow-json-stringify/CHANGELOG.md create mode 100644 node_modules/slow-json-stringify/LICENSE create mode 100644 node_modules/slow-json-stringify/README.md create mode 100644 node_modules/slow-json-stringify/benchmark_before_find_optimization.md create mode 100644 node_modules/slow-json-stringify/dist/sjs.js create mode 100644 node_modules/slow-json-stringify/dist/sjs.js.map create mode 100644 node_modules/slow-json-stringify/dist/sjs.mjs create mode 100644 node_modules/slow-json-stringify/dist/sjs.mjs.map create mode 100644 node_modules/slow-json-stringify/dist/sjs.umd.js create mode 100644 node_modules/slow-json-stringify/dist/sjs.umd.js.map create mode 100644 node_modules/slow-json-stringify/index.d.ts create mode 100644 node_modules/slow-json-stringify/messages-for-my-future-self.md create mode 100644 node_modules/slow-json-stringify/package.json create mode 100644 node_modules/slow-json-stringify/src/_makeChunks.mjs create mode 100644 node_modules/slow-json-stringify/src/_makeQueue.mjs create mode 100644 node_modules/slow-json-stringify/src/_prepare.js create mode 100644 node_modules/slow-json-stringify/src/_select.js create mode 100644 node_modules/slow-json-stringify/src/_utils.mjs create mode 100644 node_modules/slow-json-stringify/src/sjs.mjs create mode 100644 node_modules/test/lib/internal/abort_controller.js create mode 100644 node_modules/test/lib/internal/streams/operators.js create mode 100644 node_modules/test/lib/internal/timers.js create mode 100644 node_modules/test/test/fixtures/test-runner/never_ending_async.js create mode 100644 node_modules/test/test/fixtures/test-runner/never_ending_sync.js mode change 100644 => 100755 node_modules/test/test/message.js create mode 100644 node_modules/test/test/message/test_runner_abort.js create mode 100644 node_modules/test/test/message/test_runner_abort.out create mode 100644 node_modules/test/test/message/test_runner_abort_suite.js create mode 100644 node_modules/test/test/message/test_runner_abort_suite.out create mode 100644 node_modules/test/test/message/test_runner_hooks.js create mode 100644 node_modules/test/test/message/test_runner_hooks.out create mode 100755 node_modules/test/test/parallel.mjs create mode 100644 node_modules/test/test/parallel/test-runner-concurrency.js create mode 100644 node_modules/test/test/parallel/test-runner-misc.js create mode 100644 node_modules/test/test/parallel/test-runner-option-validation.js diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..bbd9ac4a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + pull_request: + push: + branches: + - master + +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci # or yarn install + - uses: sibiraj-s/action-eslint@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} # Optional + eslint-args: '--ignore-path=.gitignore --quiet' + extensions: 'js,jsx,ts,tsx' + annotations: true diff --git a/modules/iapi.mjs b/modules/iapi.mjs index 9a6dc83e..955c9dbf 100644 --- a/modules/iapi.mjs +++ b/modules/iapi.mjs @@ -16,7 +16,6 @@ class IAPI { this.log = log; this.salt = salt; this.rp = redisPrefix; - this.rateLimitFallback = siteConfig.ratelimit_fallback; //For util functions in IAPI, redis prefix will not be automatically added. //Redis prefix needed to be added manually in caller function. this.log("log", "IAPI", "IAPI instance created."); @@ -196,7 +195,7 @@ class IAPI { })); } Promise.allSettled(promisePool).then((results) => { - let permissions = getPermissionSum(this.rateLimitFallback, results); + let permissions = getPermissionSum(results); resolve(permissions); }).catch((err) => { reject(err); @@ -209,7 +208,7 @@ class IAPI { return new Promise((resolve, reject) => { password = blake3Hash(this.salt + password); this.mysql.query( - "SELECT uid,password,permissions FROM users WHERE username = ?", + "SELECT uid,password,roles FROM users WHERE username = ?", [username], (err, results) => { if (err) { diff --git a/modules/utils.mjs b/modules/utils.mjs index 6d64118d..25be8475 100644 --- a/modules/utils.mjs +++ b/modules/utils.mjs @@ -171,6 +171,10 @@ function pureArray(arr){ //remove all empty items in an array return arr.filter(item => item !== ""); } + +function mergeArray(...args){ + return Array.from(new Set(args.reduce((a, b) => a.concat(b)))); +} function getPermissionSum(...p){ //return the greatest permissions of all given role permissions @@ -184,7 +188,13 @@ function getPermissionSum(...p){ }; let isRateLimitContained = false; for(const perm of p){ - + if(perm.with_rate_limit == 1){ + if(!isRateLimitContained){ + p.rate_limits = perm.rate_limits; + } + isRateLimitContained = true; + //todo: rate limit merge + } } return permSum; } diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 93538902..f4f12488 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -47,9 +47,9 @@ } }, "node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz", + "integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==", "engines": { "node": ">=12" }, @@ -371,15 +371,15 @@ } }, "node_modules/es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", + "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -391,9 +391,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -511,16 +511,21 @@ "node": ">=4" } }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "node_modules/figures": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz", - "integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", "dependencies": { "escape-string-regexp": "^5.0.0", "is-unicode-supported": "^1.2.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -598,9 +603,9 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -731,16 +736,16 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/inquirer": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.2.tgz", - "integrity": "sha512-AqmDHmz3bIe573OiM4svTZzajBzff1xpuzYAimW8gjzW5ncuPllWB8t/GKl+NSuKRJaKyIF2bU2RCx8H1dwqyQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.1.tgz", + "integrity": "sha512-hfS9EJ1pVkGNbYKqzdGwMj0Dqosd36Qvxd5pFy4657QT23gmtFTSqoYBisZR75DReeSMWPNa8J0Lf6TQCz8PvA==", "dependencies": { "ansi-escapes": "^5.0.0", "chalk": "^5.0.1", "cli-cursor": "^4.0.0", "cli-width": "^4.0.0", "external-editor": "^3.0.3", - "figures": "^4.0.1", + "figures": "^5.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", "ora": "^6.1.2", @@ -769,9 +774,9 @@ } }, "node_modules/ioredis": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.2.tgz", - "integrity": "sha512-wryKc1ur8PcCmNwfcGkw5evouzpbDXxxkMkzPK8wl4xQfQf7lHe11Jotell5ikMVAtikXJEu/OJVaoV51BggRQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.3.tgz", + "integrity": "sha512-gQNcMF23/NpvjCaa1b5YycUyQJ9rBNH2xP94LWinNpodMWVUPP5Ai/xXANn/SM7gfIvI62B5CCvZxhg5pOgyMw==", "dependencies": { "@ioredis/commands": "^1.1.1", "cluster-key-slot": "^1.1.0", @@ -847,9 +852,9 @@ } }, "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.6.tgz", + "integrity": "sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==", "engines": { "node": ">= 0.4" }, @@ -967,9 +972,9 @@ } }, "node_modules/is-unicode-supported": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz", - "integrity": "sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "engines": { "node": ">=12" }, @@ -1182,9 +1187,9 @@ } }, "node_modules/nodemailer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.7.tgz", - "integrity": "sha512-pOLC/s+2I1EXuSqO5Wa34i3kXZG3gugDssH+ZNCevHad65tc8vQlCQpOLaUjopvkRQKm2Cki2aME7fEOPRy3bA==", + "version": "6.7.8", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.8.tgz", + "integrity": "sha512-2zaTFGqZixVmTxpJRCFC+Vk5eGRd/fYtvIR+dl5u9QXLTQWGIf48x/JXvo58g9sa0bU6To04XUv554Paykum3g==", "engines": { "node": ">=6.0.0" } @@ -1206,13 +1211,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -1516,6 +1521,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/slow-json-stringify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/slow-json-stringify/-/slow-json-stringify-2.0.1.tgz", + "integrity": "sha512-jqyzIqTaSkRGcWdWqjmOLKHZgOGUT71ZCTsvQu1xGu9Mqaod7O26y5FJJEmaUQhaTWh0bkXv2qqN0i+EQsD1jQ==" + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -1634,9 +1644,9 @@ } }, "node_modules/test": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/test/-/test-3.1.0.tgz", - "integrity": "sha512-3lO5M33Y4JoWYNzhJeKBSaZCcyFf2LJS5EsRwI5J//keVINQAWBybLZXoXZNHm8fFe2kcASb2EfjEodDY4kqRg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/test/-/test-3.2.1.tgz", + "integrity": "sha512-D9eN4OxdhyYS3xHSsAh5A0e+UhaOPxeREwBHTknZHoVFd4TqnPtkVrQ7lIUATPgpO9vvGg1D+TyMckVmUyaEig==", "dependencies": { "minimist": "^1.2.6", "string.prototype.replaceall": "^1.0.6" diff --git a/node_modules/ansi-styles/index.d.ts b/node_modules/ansi-styles/index.d.ts index 951bb952..7518d2a3 100644 --- a/node_modules/ansi-styles/index.d.ts +++ b/node_modules/ansi-styles/index.d.ts @@ -1,4 +1,4 @@ -export interface CSPair { +export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention /** The ANSI terminal control sequence for starting this style. */ diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js index e732c065..30e3ba8d 100644 --- a/node_modules/ansi-styles/index.js +++ b/node_modules/ansi-styles/index.js @@ -19,7 +19,7 @@ function assembleStyles() { overline: [53, 55], inverse: [7, 27], hidden: [8, 28], - strikethrough: [9, 29] + strikethrough: [9, 29], }, color: { black: [30, 39], @@ -39,7 +39,7 @@ function assembleStyles() { blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], - whiteBright: [97, 39] + whiteBright: [97, 39], }, bgColor: { bgBlack: [40, 49], @@ -59,8 +59,8 @@ function assembleStyles() { bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } + bgWhiteBright: [107, 49], + }, }; // Alias bright black as gray (and grey) @@ -73,7 +73,7 @@ function assembleStyles() { for (const [styleName, style] of Object.entries(group)) { styles[styleName] = { open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` + close: `\u001B[${style[1]}m`, }; group[styleName] = styles[styleName]; @@ -83,13 +83,13 @@ function assembleStyles() { Object.defineProperty(styles, groupName, { value: group, - enumerable: false + enumerable: false, }); } Object.defineProperty(styles, 'codes', { value: codes, - enumerable: false + enumerable: false, }); styles.color.close = '\u001B[39m'; @@ -120,39 +120,41 @@ function assembleStyles() { return Math.round(((red - 8) / 247) * 24) + 232; } - return 16 + - (36 * Math.round(red / 255 * 5)) + - (6 * Math.round(green / 255 * 5)) + - Math.round(blue / 255 * 5); + return 16 + + (36 * Math.round(red / 255 * 5)) + + (6 * Math.round(green / 255 * 5)) + + Math.round(blue / 255 * 5); }, - enumerable: false + enumerable: false, }, hexToRgb: { value: hex => { - const matches = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16)); + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); if (!matches) { return [0, 0, 0]; } - let {colorString} = matches.groups; + let [colorString] = matches; if (colorString.length === 3) { - colorString = colorString.split('').map(character => character + character).join(''); + colorString = [...colorString].map(character => character + character).join(''); } const integer = Number.parseInt(colorString, 16); return [ + /* eslint-disable no-bitwise */ (integer >> 16) & 0xFF, (integer >> 8) & 0xFF, - integer & 0xFF + integer & 0xFF, + /* eslint-enable no-bitwise */ ]; }, - enumerable: false + enumerable: false, }, hexToAnsi256: { value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false + enumerable: false, }, ansi256ToAnsi: { value: code => { @@ -188,6 +190,7 @@ function assembleStyles() { return 30; } + // eslint-disable-next-line no-bitwise let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); if (value === 2) { @@ -196,16 +199,16 @@ function assembleStyles() { return result; }, - enumerable: false + enumerable: false, }, rgbToAnsi: { value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false + enumerable: false, }, hexToAnsi: { value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false - } + enumerable: false, + }, }); return styles; diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json index 13666a65..294ed595 100644 --- a/node_modules/ansi-styles/package.json +++ b/node_modules/ansi-styles/package.json @@ -1,6 +1,6 @@ { "name": "ansi-styles", - "version": "6.1.0", + "version": "6.1.1", "description": "ANSI escape codes for styling strings in the terminal", "license": "MIT", "repository": "chalk/ansi-styles", @@ -48,7 +48,7 @@ "devDependencies": { "ava": "^3.15.0", "svg-term-cli": "^2.1.1", - "tsd": "^0.14.0", - "xo": "^0.38.2" + "tsd": "^0.19.0", + "xo": "^0.47.0" } } diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md index 4b07dbbf..37d99437 100644 --- a/node_modules/ansi-styles/readme.md +++ b/node_modules/ansi-styles/readme.md @@ -4,12 +4,12 @@ You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - +![](screenshot.png) ## Install -``` -$ npm install ansi-styles +```sh +npm install ansi-styles ``` ## Usage diff --git a/node_modules/es-abstract/2020/SameValueNonNumeric.js b/node_modules/es-abstract/2020/SameValueNonNumeric.js index f7ef12c0..04f6cbfb 100644 --- a/node_modules/es-abstract/2020/SameValueNonNumeric.js +++ b/node_modules/es-abstract/2020/SameValueNonNumeric.js @@ -11,7 +11,7 @@ var Type = require('./Type'); module.exports = function SameValueNonNumeric(x, y) { var xType = Type(x); - if (xType === 'Number' || xType === 'Bigint') { + if (xType === 'Number' || xType === 'BigInt') { throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); } if (xType !== Type(y)) { diff --git a/node_modules/es-abstract/2021/SameValueNonNumeric.js b/node_modules/es-abstract/2021/SameValueNonNumeric.js index f7ef12c0..04f6cbfb 100644 --- a/node_modules/es-abstract/2021/SameValueNonNumeric.js +++ b/node_modules/es-abstract/2021/SameValueNonNumeric.js @@ -11,7 +11,7 @@ var Type = require('./Type'); module.exports = function SameValueNonNumeric(x, y) { var xType = Type(x); - if (xType === 'Number' || xType === 'Bigint') { + if (xType === 'Number' || xType === 'BigInt') { throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); } if (xType !== Type(y)) { diff --git a/node_modules/es-abstract/2022/SameValueNonNumeric.js b/node_modules/es-abstract/2022/SameValueNonNumeric.js index f7ef12c0..04f6cbfb 100644 --- a/node_modules/es-abstract/2022/SameValueNonNumeric.js +++ b/node_modules/es-abstract/2022/SameValueNonNumeric.js @@ -11,7 +11,7 @@ var Type = require('./Type'); module.exports = function SameValueNonNumeric(x, y) { var xType = Type(x); - if (xType === 'Number' || xType === 'Bigint') { + if (xType === 'Number' || xType === 'BigInt') { throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); } if (xType !== Type(y)) { diff --git a/node_modules/es-abstract/CHANGELOG.md b/node_modules/es-abstract/CHANGELOG.md index a2d3cbf2..c4592d56 100644 --- a/node_modules/es-abstract/CHANGELOG.md +++ b/node_modules/es-abstract/CHANGELOG.md @@ -1,3 +1,11 @@ +1.20.2 / 2022-09-01 +================= + * [Fix] `ES2020+`: `SameValueNonNumeric`: properly throw on BigInt values + * [Deps] update `object.assign`, `get-intrinsic`, `object-inspect` + * [Dev Deps] update `array.prototype.indexof`, `diff`, `es-value-fixtures`, `tape` + * [meta] `spackle`: always mkdirp new files to be written + * [Tests] fix vscode auto-const from 8fc256d + 1.20.1 / 2022-05-16 ================= * [Fix] `thisTimeValue`: use `getTime`, not `valueOf`, to get the time value diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json index d8c4f692..469409e7 100644 --- a/node_modules/es-abstract/package.json +++ b/node_modules/es-abstract/package.json @@ -1,6 +1,6 @@ { "name": "es-abstract", - "version": "1.20.1", + "version": "1.20.2", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -56,7 +56,7 @@ "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -68,9 +68,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -79,13 +79,14 @@ "devDependencies": { "@ljharb/eslint-config": "^21.0.0", "array.prototype.filter": "^1.0.1", - "array.prototype.indexof": "^1.0.3", + "array.prototype.flatmap": "^1.3.0", + "array.prototype.indexof": "^1.0.4", "aud": "^2.0.0", "available-regexp-flags": "^1.0.0", "cheerio": "=1.0.0-rc.3", - "diff": "^5.0.0", + "diff": "^5.1.0", "eclint": "^2.8.1", - "es-value-fixtures": "^1.4.1", + "es-value-fixtures": "^1.4.2", "eslint": "=8.8.0", "for-each": "^0.3.3", "functions-have-names": "^1.2.3", @@ -102,7 +103,7 @@ "object.fromentries": "^2.0.5", "safe-publish-latest": "^2.0.0", "ses": "^0.10.4", - "tape": "^5.5.3" + "tape": "^5.6.0" }, "testling": { "files": "test/index.js", diff --git a/node_modules/fast-stable-stringify/.npmignore b/node_modules/fast-stable-stringify/.npmignore new file mode 100644 index 00000000..ce699323 --- /dev/null +++ b/node_modules/fast-stable-stringify/.npmignore @@ -0,0 +1,4 @@ +node_modules +.idea +.zuulrc +*~ diff --git a/node_modules/fast-stable-stringify/.travis.yml b/node_modules/fast-stable-stringify/.travis.yml new file mode 100644 index 00000000..0ad0b888 --- /dev/null +++ b/node_modules/fast-stable-stringify/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +node_js: +- '6' +install: npm install +script: npm run test-browsers + +env: + global: + - secure: dxsYyywaNs56mtg5zSJgA3GTUIzGKt6btJrE0+j0oB/6pwJt2GvPNetd6bCe9ddyvoRA1ZwW/PlL86tsLpSSM4hf3hySw9ozb0dC0wPDPN3rfHyI8sNW7LjcPAxCncVwJ1CQf3kO/NGVgQi4K8HCy0LkOPrQ0NCWhsnUaAtY0IOOdeBYahFoQ2boK6F5RFnK65gIaPdk9PqRiS7B43XPOFOSP/vVQd2AzcrZzMgjit505EF8oozlgMBM6eFQvX4vX1I4OgFuO1owOQBMrS/bvmeURoAt3313UvuMeezq7MgTWABo19WDHMg3KUs2aJO4QxiOiQek9jluKhOmjkNJ08lum5d2s6UnoD3MNoN7mdvy2DsifrzZzDzxjkvEsQ0E15+hyMdPpILBXqIXjXZdIs46TiGlX5No2In0zwfzuAXkJVgpQ7jTkqdvEejDk5Kf4nl01TscZFNMpmq9+gL6xUE95BCHLx8YwYZN9hME98CffSgWQTRGcOd9sI9SC3fgWr7k3GZtuuXMATc2U/cZtuJrClOGTaK0l3FEe9U0d6cf+rZDQh72iBHy4Y1/RERaoM37eOyKg7tngRIevmftnvRRALIeoIb2KAxV5XrxcwxQRumV7jbs8Y5g/gsFnwbJBgcn9a7tez/wQSVQ2/fiQn93OJOQrXHOywk3PV3PX0Y= + - secure: Nyatsejgr4rJfqCrhQ9U+mrx1hsGkP4qqZWVsc/MC8RG3XfmKuyJFGwbJAhAlGHiebG2a2PrErvwnr8Veo/QwkuDy5beQ+5KocCuIT/hIsGMIFuRDs0RRPMFPX0j4xQmZr47iCPdSHSh67jrURf/sXlIdCfrX1eYDsNiKfmS/mFAaQKkcnfJu0PO2IRmucHNKgU5jpH2SvVmEK0kxYIG8kkk5A8NUzbqJn3E7kVzZ3zslYT2gRDxSVP7Hb13LR1ZLDStKvAjuZHMckQYF6Wl8+vKja041yDgmh88+L6HoDPigKEGH5vJzaoBdoxT+asdsvDbMkbBVQMLm4RdkHIlRAUNASOfsUSOe9LBFRp6eSJkGRhc5JQxjf8G246dRae8dBIcloRMethGelc7WR4Pdm5u6ByswbfCIHFszIlJLWiq/QM81akHHbWcTUtaaM/8/s4R3luO/d6IL2RyTN9NZfoZmrCb7xF9UAVnlqogkrQ5VKvv+222Nmpa7jPhckJStURAKYi4IulYLWkBXv5uMvpKt8riCBQUft+arHwWOfJsT07ksYy/+K39t45ut1tKBjtInLErd7P/ROjPrsHSdMsdZspey7dpxXt3ePrUry+NgsLPwqOqo9wV+TZA3pBijxH93/C4eHCSOydKJ3+MGr2A+eLLjc3Ky8qG73trYdc= diff --git a/node_modules/fast-stable-stringify/LICENSE b/node_modules/fast-stable-stringify/LICENSE new file mode 100644 index 00000000..45198687 --- /dev/null +++ b/node_modules/fast-stable-stringify/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Nicolaas Johannes Out + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/fast-stable-stringify/README.md b/node_modules/fast-stable-stringify/README.md new file mode 100644 index 00000000..15ded498 --- /dev/null +++ b/node_modules/fast-stable-stringify/README.md @@ -0,0 +1,81 @@ +# fast-stable-stringify +*Notice: The License of this repository has been changed from GPL-3.0 to MIT as of 2017-08-25. All following commits will fall under the MIT license.* + +[![Build Status](https://travis-ci.org/nickyout/fast-stable-stringify.svg?branch=master)](https://travis-ci.org/nickyout/fast-stable-stringify) +[![Sauce Test Status](https://saucelabs.com/browser-matrix/nickyout_fast-stable.svg)](https://saucelabs.com/u/nickyout_fast-stable) + +_The test only succeeds when mine is faster than substack's in a particular browser._ + +The most popular repository providing this feature is [substack's json-stable-stringify][sub]. The intent if this library is to provide a faster alternative for when performance is more important than features. It assumes you provide basic javascript values without circular references, and returns a non-indented string. + +It currently offers a performance boost in popular browsers of about 40%. See the comparsion table below. + +Usage: + +```javascript +var stringify = require('fast-stable-stringify'); +stringify({ d: 0, c: 1, a: 2, b: 3, e: 4 }); // '{"a":2,"b":3,"c":1,"d":0,"e":4}' +``` + +Just like substack's, it does: + +* handle all variations of all basic javascript values (number, string, boolean, array, object, null, Date) +* handle undefined _and_ function in the same way as `JSON.stringify` +* **not support ie8 (and below) with complete certainty**. + +Unlike substack's, it does: + +* not implement the 'replacer' or 'space' arguments of the JSON.stringify method +* not check for circular references + +## Test results +Tested validity (answer equal to substack's) and benchmark (faster than substack's). A test passes only if it has the same output as substack's but is faster (as concluded by [benchmark.js][ben]). + +To (hopefully) prevent [certain smart browsers][cat] from concluding the stringification is not necessary because it is never used anywhere, I summed up all the lengths of the resulting strings of each benchmark contestant and printed it along with the result data. + +### Latest interpreted result + +See [caniuse browser usage][usg] for the 'most popular browsers'. + +| Suite | Browser | JSON.stringify@native | fast-stable-stringify@a9f81e8 | json-stable-stringify@1.0.1 | faster-stable-stringify@1.0.0 | +| :---- | :-------------------------------------- | --------------------: | ----------------------------: | --------------------------: | ----------------------------: | +| libs | Chrome 60.0.3112 (Windows 7 0.0.0) | 414.45% (±2.67%) | *146.41% (±1.74%) | 100.00% (±1.11%) | 111.26% (±1.24%) | +| libs | Chrome Mobile 55.0.2883 (Android 6.0.0) | 495.16% (±16.9%) | *162.18% (±3.59%) | 100.00% (±5.44%) | 129.66% (±3.20%) | +| libs | Edge 14.14393.0 (Windows 10 0.0.0) | 487.88% (±11.9%) | *138.69% (±2.27%) | 100.00% (±1.51%) | 113.19% (±1.56%) | +| libs | Firefox 54.0.0 (Windows 7 0.0.0) | 530.66% (±17.6%) | *169.34% (±2.38%) | 100.00% (±1.68%) | 152.30% (±2.48%) | +| libs | IE 10.0.0 (Windows 7 0.0.0) | 427.80% (±10.9%) | *183.26% (±3.02%) | 100.00% (±2.42%) | ? | +| libs | IE 11.0.0 (Windows 7 0.0.0) | 298.01% (±4.35%) | *136.25% (±1.89%) | 100.00% (±1.73%) | ? | +| libs | IE 9.0.0 (Windows 7 0.0.0) | 316.18% (±4.01%) | *170.14% (±2.30%) | 100.00% (±1.52%) | ? | +| libs | Mobile Safari 10.0.0 (iOS 10.3.0) | 554.98% (±23.7%) | *115.33% (±4.23%) | 100.00% (±3.11%) | *118.66% (±2.96%) | +| libs | Safari 10.0.1 (Mac OS X 10.12.1) | 722.94% (±24.8%) | *119.49% (±3.62%) | 100.00% (±2.12%) | 106.06% (±3.12%) | + +Click the build status badge to view the original output. + +Disclaimer: the more I test the more I realize how many factors actually affect the outcome. Not only the browser and browser version, but particularly the json content and a random factor in every test run. Outcomes may sometimes vary more than 10% between tests, despite my attempt to reduce this by increasing the sample size to 2.5 times. Nevertheless, the overall picture typically still holds. + +`JSON.stringify` has been added for reference. In general, aside from the cases where you need the guarantee of a stable result, I would recommend against using this library, or any stable stringification library for that matter. + +[`faster-stable-stringify`][fss] has been added for comparison. It seems it does not work in IE 9 to 11 without a polyfill solution for WeakMap. It is displayed as somewhat slower, but as I decided on the JSON input to test and develop against, this result may be somewhat biased. In some test runs, [`faster-stable-stringify`][fss] will be faster in a browser. In fact, it is consistently somewhat faster in the Mobile Safari 10. + +## Note about string escaping +The original implementation was with regexp. A pull request showed a literal string approach that was faster in some browsers. Other libraries would just use JSON.stringify. After a speed comparison between all three methods, it became clear that native JSON.stringify is generally much faster in string escaping than both these methods, even in the IE legacy browsers. The browsers that do not have `JSON.stringify` are not offered for test automation, and when looking at the [usage percentage][usg] of such browsers I no longer see a reason to not use `JSON.stringify`. + +Therefore, the exposed regexp and string are removed from the API. If you still need this functionality, I simply encourage you to use `JSON.stringify`. + +## Running tests +It runs karma-benchmark tests now. For testing in node, do: + +``` +npm test +``` + +This requires [saucelabs credentials in your env][env]. That, or edit the karma.conf.js to your liking. + +Running this test will cause files in `./results/libs/` to update. Run `npm run table` to get a pretty md table of the results. + +[sub]: https://github.com/substack/json-stable-stringify +[ben]: https://github.com/bestiejs/benchmark.js +[cat]: http://mrale.ph/blog/2014/02/23/the-black-cat-of-microbenchmarks.html +[usg]: http://caniuse.com/usage-table +[env]: https://wiki.saucelabs.com/display/DOCS/Best+Practice%3A+Use+Environment+Variables+for+Authentication+Credentials +[fss]: https://github.com/ppaskaris/faster-stable-stringify \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/cli/files-to-comparison-results.js b/node_modules/fast-stable-stringify/cli/files-to-comparison-results.js new file mode 100644 index 00000000..bd12b25d --- /dev/null +++ b/node_modules/fast-stable-stringify/cli/files-to-comparison-results.js @@ -0,0 +1,67 @@ +var fs = require('fs-extra'); +var obj = require('../util/object-path'); + +/** + * Converts the file contents generated by BenchmarkStatsProcessor to a DataSetComparisonResult array. + * @param {Array} arrFileObj + * @returns {Object} + */ +function mergeToMap(arrFileObj) { + return arrFileObj.reduce(function(result, fileObj) { + var name; + var libData; + for (name in fileObj) { + libData = fileObj[name]; + obj.setObject(result, [libData.suite, libData.browser, libData.name], libData); + } + return result; + }, {}); +} + +/** + * Since every machine has its own speed, absolute test results have no absolute value. + * However, (I suspect that) the one that is the fastest will relatively be faster than the others. + * @typedef {Object} DataSetComparisonResultItem + * @prop {string} name + * @prop {string} browser + * @prop {string} suite + * @prop {boolean} success + * @prop {number} hz + * @prop {boolean} fastest - is fastest or, statistic significantly speaking, no slower than the fastest + * @prop {number} rme - relative margin of error (expressed as decimal, NOT %) + * @prop {number} rhz - relative hz compared to the fastest (expressed as decimal, NOT %) + * @prop {number} sampleSize + */ +/** + * Describes all results of a single test suite within single browser + * @typedef {Object} DataSetComparisonResult + * @prop {string} browser + * @prop {string} suite + * @prop {Object} resultMap - key is libName + */ + +/** + * + * @param {string[]} files + * @returns {Promise} + */ +module.exports = function(files) { + return Promise + .all(files.map(function(file) { + return fs.readJson(file); + })) + .then(function (arrFileObj) { + var map = mergeToMap(arrFileObj); + var result = []; + var suiteName; + var browserName; + var suite; + for (suiteName in map) { + suite = map[suiteName]; + for (browserName in suite) { + result.push({ browser: browserName, suite: suiteName, resultMap: suite[browserName]}) + } + } + return result; + }); +}; \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/cli/format-table.js b/node_modules/fast-stable-stringify/cli/format-table.js new file mode 100644 index 00000000..dde67d27 --- /dev/null +++ b/node_modules/fast-stable-stringify/cli/format-table.js @@ -0,0 +1,70 @@ +var table = require('markdown-table'); + +// Crude, but should be enough internally +function toFixedWidth(value, maxChars) { + var result = value.toFixed(2).substr(0, maxChars); + if (result[result.length - 1] == '.') { + result = result.substr(0, result.length - 2) + ' '; + } + return result; +} + +/** + * + * @param {DataSetComparisonResult[]} results + * @param {Object} [options] + */ +function createTable(results, options) { + options || (options = {}); + var columnAlign = ['l', 'l']; + var header = ['Suite', 'Browser']; + var libNames = []; + var rows = []; + var errorCell = 'X'; + var emptyCell = '?'; + var hideColumns = options.hideColumns || []; + var compareTo = options.compareTo; + results.forEach(function(comparisonResult) { + var resultMap = comparisonResult.resultMap; + var libName; + var libResults; + var result; + var compareRHZ = resultMap[compareTo] && resultMap[compareTo].rhz || 1; + for (libName in resultMap) { + // dictates order + if (libNames.indexOf(libName) === -1 && hideColumns.indexOf(libName) === -1) { + libNames.push(libName); + columnAlign.push('r'); + rows.forEach(function(row) { + // new column added, push empty element + row.push(emptyCell); + }) + } + } + libResults = libNames.map(function(libName) { + result = resultMap[libName]; + if (result) { + if (result.success) { + return (result.fastest ? '*' : '') + + (100 * result.rhz / compareRHZ).toFixed(2) + '% ' + + '(\xb1' + toFixedWidth(100 * (result.rhz / compareRHZ) * result.rme, 4) + '%)'; + } else { + return errorCell; + } + } else { + return emptyCell; + } + }); + + rows.push([comparisonResult.suite, comparisonResult.browser].concat(libResults)); + }); + + // slap header before it + rows.unshift(header.concat(libNames)); + + return table(rows, { align: columnAlign }); +} + +module.exports = function(data, options) { + return createTable(data, options); +}; diff --git a/node_modules/fast-stable-stringify/cli/index.js b/node_modules/fast-stable-stringify/cli/index.js new file mode 100644 index 00000000..3128bd63 --- /dev/null +++ b/node_modules/fast-stable-stringify/cli/index.js @@ -0,0 +1,19 @@ +var argv = require('minimist')(process.argv.slice(2)); +var formatTable = require('./format-table'); +var glob = require('glob'); +var filesToComparisonResults = require('./files-to-comparison-results'); + +var pattern = argv._.length > 1 ? '{' + argv._.slice(0).join(',') + '}' : argv._[0]; +var fileList = glob.sync(pattern, { nodir: true }); + +//console.log(fileList); +filesToComparisonResults(fileList) + .then(function(comparisonResult) { + return formatTable(comparisonResult, { hideColumns: [], compareTo: 'json-stable-stringify@1.0.1' }) + }) + .then(function(str) { + console.log(str); + }) + .catch(function(err) { + console.error(err); + }); diff --git a/node_modules/fast-stable-stringify/fixtures/index.js b/node_modules/fast-stable-stringify/fixtures/index.js new file mode 100644 index 00000000..2e3d470d --- /dev/null +++ b/node_modules/fast-stable-stringify/fixtures/index.js @@ -0,0 +1,5 @@ +module.exports = { + input: require('./input-data-types') + /*, + expected: require("./expected.json")*/ +}; diff --git a/node_modules/fast-stable-stringify/fixtures/input-data-types.js b/node_modules/fast-stable-stringify/fixtures/input-data-types.js new file mode 100644 index 00000000..9fbb800f --- /dev/null +++ b/node_modules/fast-stable-stringify/fixtures/input-data-types.js @@ -0,0 +1,191 @@ +function ImplementingToJSON() {} +ImplementingToJSON.prototype.toJSON = function() { + return 'dummy!'; +}; + +function NotImplementingToJSON() {} + +module.exports = { + "objects": { + "string": { + "VALUES_WITH_SPACES": "a b c", + "LOWERCASE": "abc", + "UPPERCASE": "ABC", + "NUMBER_ONLY": "123", + "EMPTY_STRING": "", + "ESCAPE_RANGE": "\u0000\u001F", + "NON_ESCAPE_RANGE": "\u0020\uFFFF", + "UTF16": "☃", + "QUOTATION_MARK": "\"", + "REVERSE_SOLIDUS": "\\", + "SOLIDUS": "\/", + "FORM_FEED": "\f", + "LINE_FEED": "\n", + "CARRIAGE_RETURN": "\r", + "TAB": "\t", + "BACKSPACE": "\b", + "MIXED": "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b" + }, + "key": { + "a b c": "VALUES_WITH_SPACES", + "abc": "LOWERCASE", + "ABC": "UPPERCASE", + "NUMBER_ONLY": "123", + "": "EMPTY_STRING", + "\u0000\u001F": "ESCAPE_RANGE", + "\u0020\uFFFF": "NON_ESCAPE_RANGE", + "☃": "UTF16", + "\"": "QUOTATION_MARK", + "\\": "REVERSE_SOLIDUS", + "\/": "SOLIDUS", + "\f": "FORM_FEED", + "\n": "LINE_FEED", + "\r": "CARRIAGE_RETURN", + "\t": "TAB", + "\b": "BACKSPACE", + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b": "MIXED" + }, + "number": { + "MAX_SAFE_INTEGER": 9007199254740991, + "MIN_SAFE_INTEGER": -9007199254740991, + "FALSY": 0, + "NEGATIVE": -1, + "FLOAT": 0.1234567, + "NEGATIVE_FLOAT": -0.9876543, + "MAX_VALUE": 1.7976931348623157e+308, + "MIN_VALUE": 5e-324, + "NEGATIVE_MAX_VALUE": -1.7976931348623157e+308, + "NEGATIVE_MIN_VALUE": -5e-324, + "INFINITY": Infinity, + "NEG_INFINITY": -Infinity, + "NAN": NaN + }, + "boolean": { + "TRUE": true, + "FALSE": false + }, + "null": { + "NULL": null + }, + "undefined": undefined, + "undefineds": { + "ONE": undefined, + "TWO": undefined, + "THREE": undefined + }, + "date": new Date('2017'), + "function": function() {}, + "instances": { + 'implementingToJSON': new ImplementingToJSON(), + 'notImplementingToJSON': new NotImplementingToJSON() + }, + "mixed": { + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b": "MIXED", + "MIXED": "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b", + "MAX_VALUE": 1.7976931348623157e+308, + "MIN_VALUE": 5e-324, + "NEGATIVE_MAX_VALUE": -1.7976931348623157e+308, + "NEGATIVE_MIN_VALUE": -5e-324, + "TRUE": true, + "FALSE": false, + "NULL": null, + "UNDEFINED": undefined, + "zzz": "ending" + } + }, + "arrays": { + "number": [ + 9007199254740991, + -9007199254740991, + 0, + -1, + 0.1234567, + -0.9876543, + 1.7976931348623157e+308, + 5e-324, + -1.7976931348623157e+308, + -5e-324, + Infinity, + -Infinity, + NaN + ], + "string": [ + "a b c", + "abc", + "ABC", + "NUMBER_ONLY", + "", + "\u0000\u001F", + "\u0020\uFFFF", + "☃", + "\"", + "\\", + "\/", + "\f", + "\n", + "\r", + "\t", + "\b", + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b" + ], + "boolean": [ + true, + false + ], + "null": [ + null + ], + "undefined": [ + undefined + ], + "date": [ + new Date('2017') + ], + "instances": [ + new ImplementingToJSON(), + new NotImplementingToJSON() + ], + "function": [ + function(){} + ], + "mixed": [ + -1.7976931348623157e+308, + -5e-324, + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b", + true, + false, + null, + undefined + ] + }, + "mixed": [ + { + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b": "MIXED", + "MIXED": "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b", + "MAX_VALUE": 1.7976931348623157e+308, + "MIN_VALUE": 5e-324, + "NEGATIVE_MAX_VALUE": -1.7976931348623157e+308, + "NEGATIVE_MIN_VALUE": -5e-324, + "TRUE": true, + "FALSE": false, + "NULL": null, + "UNDEFINED": undefined, + "DATE": new Date('2017'), + "IMPLEMENTING_TO_JSON": new ImplementingToJSON(), + "NOT_IMPLEMENTING_TO_JSON": new NotImplementingToJSON(), + "FUNCTION": function(){}, + "zzz": "ending" + }, + -1.7976931348623157e+308, + -5e-324, + "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b", + true, + false, + null, + undefined, + new Date('2017'), + function(){}, + new ImplementingToJSON(), + new NotImplementingToJSON() + ] +}; diff --git a/node_modules/fast-stable-stringify/fixtures/log-result.json b/node_modules/fast-stable-stringify/fixtures/log-result.json new file mode 100644 index 00000000..964fb1bb --- /dev/null +++ b/node_modules/fast-stable-stringify/fixtures/log-result.json @@ -0,0 +1,22 @@ +{ + "nickyout/fast-stable-stringify": { + "chrome 26": { + "Windows 2008": { + "opsPerSec": 6.025, + "percentage": 6.76, + "numSamples": 50, + "cumStrLength": 94425969 + } + } + }, + "substack/json-stable-stringify": { + "chrome 26": { + "Windows 2008": { + "opsPerSec": 4.114, + "percentage": 1.05, + "numSamples": 50, + "cumStrLength": 61301724 + } + } + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/fixtures/log.txt b/node_modules/fast-stable-stringify/fixtures/log.txt new file mode 100644 index 00000000..d81e2e97 --- /dev/null +++ b/node_modules/fast-stable-stringify/fixtures/log.txt @@ -0,0 +1,24 @@ +- testing: chrome @ Windows 2008: 26 +- testing: opera @ Windows 2003: 11 12 +- queuing: +- starting: + console +Finished benchmarking: nickyout/fast-stable-stringify x 6,025 ops/sec ±6.76% (50 runs sampled) (cumulative string length: 94425969) +Finished benchmarking: substack/json-stable-stringify x 4,114 ops/sec ±1.05% (50 runs sampled) (cumulative string length: 61301724) +- passed: +- queuing: +- starting: + Benchmark :: fastest +Error: Benchmark.js was unable to find a working timer. + clock([arguments not available]) __zuul/test-bundle.js:4066 + cycle([arguments not available]) __zuul/test-bundle.js:4301 + run([arguments not available]) __zuul/test-bundle.js:4409 + execute([arguments not available]) __zuul/test-bundle.js:3088 + invoke([arguments not available]) __zuul/test-bundle.js:3202 + compute([arguments not available]) __zuul/test-bundle.js:4259 + run([arguments not available]) __zuul/test-bundle.js:4414 + execute([arguments not available]) __zuul/test-bundle.js:3088 + invoke([arguments not available]) __zuul/test-bundle.js:3202 + runSuite([arguments not available]) __zuul/test-bundle.js:3451 + +- passed: diff --git a/node_modules/fast-stable-stringify/index.js b/node_modules/fast-stable-stringify/index.js new file mode 100644 index 00000000..400cac04 --- /dev/null +++ b/node_modules/fast-stable-stringify/index.js @@ -0,0 +1,73 @@ +var objToString = Object.prototype.toString; +var objKeys = Object.keys || function(obj) { + var keys = []; + for (var name in obj) { + keys.push(name); + } + return keys; + }; + +function stringify(val, isArrayProp) { + var i, max, str, keys, key, propVal, toStr; + if (val === true) { + return "true"; + } + if (val === false) { + return "false"; + } + switch (typeof val) { + case "object": + if (val === null) { + return null; + } else if (val.toJSON && typeof val.toJSON === "function") { + return stringify(val.toJSON(), isArrayProp); + } else { + toStr = objToString.call(val); + if (toStr === "[object Array]") { + str = '['; + max = val.length - 1; + for(i = 0; i < max; i++) { + str += stringify(val[i], true) + ','; + } + if (max > -1) { + str += stringify(val[i], true); + } + return str + ']'; + } else if (toStr === "[object Object]") { + // only object is left + keys = objKeys(val).sort(); + max = keys.length; + str = ""; + i = 0; + while (i < max) { + key = keys[i]; + propVal = stringify(val[key], false); + if (propVal !== undefined) { + if (str) { + str += ','; + } + str += JSON.stringify(key) + ':' + propVal; + } + i++; + } + return '{' + str + '}'; + } else { + return JSON.stringify(val); + } + } + case "function": + case "undefined": + return isArrayProp ? null : undefined; + case "string": + return JSON.stringify(val); + default: + return isFinite(val) ? val : null; + } +} + +module.exports = function(val) { + var returnVal = stringify(val, false); + if (returnVal !== undefined) { + return ''+ returnVal; + } +}; diff --git a/node_modules/fast-stable-stringify/karma.conf.js b/node_modules/fast-stable-stringify/karma.conf.js new file mode 100644 index 00000000..59573fa1 --- /dev/null +++ b/node_modules/fast-stable-stringify/karma.conf.js @@ -0,0 +1,124 @@ +// Karma configuration +// Generated on Sun Sep 03 2017 04:55:32 GMT+0200 (CEST) + +module.exports = function(config) { + + // in seconds + var TIMEOUT = 360; + + var customLaunchers = { + // desktop evergreen + sl_chrome: { base: 'SauceLabs', browserName: 'chrome', version: '60', idleTimeout: TIMEOUT }, + sl_firefox: { base: 'SauceLabs', browserName: 'firefox', version: '54', idleTimeout: TIMEOUT }, + sl_safari: { base: "SauceLabs", browserName: "safari", version: '10', platform: 'macOS 10.12', idleTimeout: TIMEOUT }, + sl_edge: { base: "SauceLabs", browserName: "microsoftedge", version: '14', platform: 'Windows 10', idleTimeout: TIMEOUT }, + //sl_opera: { base: "SauceLabs", browsername: "opera", version: '12', platform: 'Windows 7', idleTimeout: TIMEOUT }, + + // desktop legacy + sl_ie_9: { base: 'SauceLabs', browserName: 'internet explorer', version: '9', idleTimeout: TIMEOUT }, + sl_ie_10: { base: 'SauceLabs', browserName: 'internet explorer', version: '10', idleTimeout: TIMEOUT }, + sl_ie_11: { base: 'SauceLabs', browserName: 'internet explorer', version: '11', idleTimeout: TIMEOUT }, + + // mobile + sl_iphone: { base: 'SauceLabs', browserName: 'iphone', version: '10.3', idleTimeout: TIMEOUT }, + sl_android: { base: 'SauceLabs', browserName: 'android', version: '6.0', idleTimeout: TIMEOUT }, + }; + + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['benchmark'], + + + // list of files / patterns to load in the browser + files: [ + 'test/index.js' + ], + + + // list of files to exclude + exclude: [ + ], + + client: { + captureConsole: true, + logLevel: config.LOG_LOG, + mocha: { + ui: 'tdd' + } + }, + + browserConsoleLogOptions: { + level: 'log', + format: '%b %T: %m', + terminal: true + }, + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + 'test/index.js': ['webpack'] + }, + + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['benchmark'], + + benchmarkReporter: { + destDir: 'results', + exclude: ['native', 'faster-stable-stringify', 'fast-stable-stringify'], + resolveName: function(benchName, suiteName) { + if (suiteName == 'libs') { + var libInfo = require('./util/get-lib-info')(benchName); + return libInfo.name + '@' + libInfo.version; + } else { + return benchName; + } + }, + logStyle: 'benchmark' + }, + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + customLaunchers: customLaunchers, + browsers: Object.keys(customLaunchers), + //browsers: ['Chrome', 'Firefox'], + + browserNoActivityTimeout: TIMEOUT * 1000, + + captureTimeout: TIMEOUT * 1000, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: true, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 5 + }) +}; diff --git a/node_modules/fast-stable-stringify/karma.conf.travis.js b/node_modules/fast-stable-stringify/karma.conf.travis.js new file mode 100644 index 00000000..8db491ac --- /dev/null +++ b/node_modules/fast-stable-stringify/karma.conf.travis.js @@ -0,0 +1,95 @@ +// Karma configuration +// Generated on Sun Sep 03 2017 04:55:32 GMT+0200 (CEST) + +module.exports = function(config) { + + // in seconds + var TIMEOUT = 360; + + var customLaunchers = { + // desktop evergreen + sl_chrome: { base: 'SauceLabs', browserName: 'chrome', version: '60', idleTimeout: TIMEOUT }, + sl_firefox: { base: 'SauceLabs', browserName: 'firefox', version: '54', idleTimeout: TIMEOUT }, + sl_safari: { base: "SauceLabs", browserName: "safari", version: '10', platform: 'macOS 10.12', idleTimeout: TIMEOUT }, + sl_edge: { base: "SauceLabs", browserName: "microsoftedge", version: '14', platform: 'Windows 10', idleTimeout: TIMEOUT }, + //sl_opera: { base: "SauceLabs", browsername: "opera", version: '12', platform: 'Windows 7', idleTimeout: TIMEOUT }, + + // desktop legacy + sl_ie_9: { base: 'SauceLabs', browserName: 'internet explorer', version: '9', idleTimeout: TIMEOUT }, + sl_ie_10: { base: 'SauceLabs', browserName: 'internet explorer', version: '10', idleTimeout: TIMEOUT }, + sl_ie_11: { base: 'SauceLabs', browserName: 'internet explorer', version: '11', idleTimeout: TIMEOUT }, + + // mobile + sl_iphone: { base: 'SauceLabs', browserName: 'iphone', version: '10.3', idleTimeout: TIMEOUT }, + sl_android: { base: 'SauceLabs', browserName: 'android', version: '6.0', idleTimeout: TIMEOUT }, + }; + + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['benchmark'], + + + // list of files / patterns to load in the browser + files: [ + 'test/travis.js' + ], + + + // list of files to exclude + exclude: [ + ], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + 'test/travis.js': ['webpack'] + }, + + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['benchmark'], + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: false, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + customLaunchers: customLaunchers, + browsers: Object.keys(customLaunchers), + //browsers: ['Chrome', 'Firefox'], + + browserNoActivityTimeout: TIMEOUT * 1000, + + captureTimeout: TIMEOUT * 1000, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: true, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 5 + }) +}; diff --git a/node_modules/fast-stable-stringify/package.json b/node_modules/fast-stable-stringify/package.json new file mode 100644 index 00000000..a8a3293c --- /dev/null +++ b/node_modules/fast-stable-stringify/package.json @@ -0,0 +1,47 @@ +{ + "name": "fast-stable-stringify", + "version": "1.0.0", + "description": "Deterministic stringification for when performance matters", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "./node_modules/.bin/karma start", + "travis": "./node_modules/.bin/karma start ./karma.conf.travis.js", + "table": "node ./cli/index.js results/libs/*.json" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nickyout/fast-stable-stringify.git" + }, + "keywords": [ + "JSON", + "stable", + "deterministic", + "stringify", + "fast" + ], + "author": "Nicky Out", + "license": "MIT", + "bugs": { + "url": "https://github.com/nickyout/fast-stable-stringify/issues" + }, + "homepage": "https://github.com/nickyout/fast-stable-stringify#readme", + "devDependencies": { + "faster-stable-stringify": "^1.0.0", + "fs-extra": "^4.0.1", + "glob": "^7.1.2", + "json-stable-stringify": "^1.0.0", + "karma": "^1.7.1", + "karma-benchmark": "^0.7.1", + "karma-benchmark-reporter": "git+https://github.com/nickyout/karma-benchmark-reporter.git#4b570c9", + "karma-firefox-launcher": "^1.0.1", + "karma-sauce-launcher": "^1.2.0", + "karma-webpack": "^2.0.4", + "markdown-table": "^1.1.1", + "minimist": "^1.2.0", + "split": "^1.0.1", + "webpack": "^3.5.5" + } +} diff --git a/node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..854c39f0 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 253343.14412049987, + "success": true, + "fastest": false, + "rme": 0.014150323478317376, + "rhz": 0.8571066586149397, + "sampleSize": 173 + }, + "fn if": { + "name": "fn if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 152430.27131168763, + "success": true, + "fastest": false, + "rme": 0.009869184897547099, + "rhz": 0.5156997674805344, + "sampleSize": 173 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 134572.13503988463, + "success": true, + "fastest": false, + "rme": 0.00900151732022404, + "rhz": 0.4552823934002038, + "sampleSize": 171 + }, + "escape31": { + "name": "escape31", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 164000.28145229374, + "success": true, + "fastest": false, + "rme": 0.010577368405487704, + "rhz": 0.5548432492044333, + "sampleSize": 172 + }, + "native": { + "name": "native", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 295579.48427316535, + "success": true, + "fastest": true, + "rme": 0.01035041406915358, + "rhz": 1, + "sampleSize": 171 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..731cdeb1 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-long", + "hz": 294647.6540008401, + "success": true, + "fastest": false, + "rme": 0.024928682964508394, + "rhz": 0.7543996843123166, + "sampleSize": 152 + }, + "fn if": { + "name": "fn if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-long", + "hz": 172908.7333875609, + "success": true, + "fastest": false, + "rme": 0.016138250187070446, + "rhz": 0.44270603248056595, + "sampleSize": 150 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-long", + "hz": 124965.18805848437, + "success": true, + "fastest": false, + "rme": 0.027301864775113205, + "rhz": 0.31995400995482254, + "sampleSize": 147 + }, + "escape31": { + "name": "escape31", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-long", + "hz": 188347.98186648387, + "success": true, + "fastest": false, + "rme": 0.026531318695469853, + "rhz": 0.48223583704668577, + "sampleSize": 144 + }, + "native": { + "name": "native", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-long", + "hz": 390572.3453071566, + "success": true, + "fastest": true, + "rme": 0.024051025167801422, + "rhz": 1, + "sampleSize": 149 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..65dcf9bc --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-long", + "hz": 456455.66360715276, + "success": true, + "fastest": false, + "rme": 0.01632374357524679, + "rhz": 0.6291712254945833, + "sampleSize": 169 + }, + "fn if": { + "name": "fn if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-long", + "hz": 193679.9495017831, + "success": true, + "fastest": false, + "rme": 0.01950064206644373, + "rhz": 0.2669653613645212, + "sampleSize": 169 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-long", + "hz": 103885.45242442277, + "success": true, + "fastest": false, + "rme": 0.02131717275903938, + "rhz": 0.14319405502915764, + "sampleSize": 165 + }, + "escape31": { + "name": "escape31", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-long", + "hz": 203638.06134905503, + "success": true, + "fastest": false, + "rme": 0.020628729439989432, + "rhz": 0.28069146432279773, + "sampleSize": 171 + }, + "native": { + "name": "native", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-long", + "hz": 725487.1887193171, + "success": true, + "fastest": true, + "rme": 0.020436075036992615, + "rhz": 1, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..6af36f57 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 292285.14849283424, + "success": true, + "fastest": false, + "rme": 0.029313572210377326, + "rhz": 0.6340733965180414, + "sampleSize": 170 + }, + "fn if": { + "name": "fn if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 163169.81969413554, + "success": true, + "fastest": false, + "rme": 0.024903199178875946, + "rhz": 0.35397502170806816, + "sampleSize": 163 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 164334.08219979555, + "success": true, + "fastest": false, + "rme": 0.022262815350227484, + "rhz": 0.3565007329363297, + "sampleSize": 163 + }, + "escape31": { + "name": "escape31", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 163872.13126377563, + "success": true, + "fastest": false, + "rme": 0.025364753280213054, + "rhz": 0.3554985923878372, + "sampleSize": 163 + }, + "native": { + "name": "native", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 460964.2197541997, + "success": true, + "fastest": true, + "rme": 0.04515613595385393, + "rhz": 1, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..0c66b509 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 384943.06980031956, + "success": true, + "fastest": false, + "rme": 0.020243907492717567, + "rhz": 0.6228702284653227, + "sampleSize": 167 + }, + "fn if": { + "name": "fn if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 110991.37890127092, + "success": true, + "fastest": false, + "rme": 0.028344902311864196, + "rhz": 0.17959337615761495, + "sampleSize": 171 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 78994.03583279483, + "success": true, + "fastest": false, + "rme": 0.012880272414078419, + "rhz": 0.12781898677145626, + "sampleSize": 169 + }, + "escape31": { + "name": "escape31", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 112745.75228367363, + "success": true, + "fastest": false, + "rme": 0.029183958343077552, + "rhz": 0.18243209968646687, + "sampleSize": 170 + }, + "native": { + "name": "native", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 618014.8804812408, + "success": true, + "fastest": true, + "rme": 0.025956314459866358, + "rhz": 1, + "sampleSize": 160 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..5007d724 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 376419.7269868499, + "success": true, + "fastest": false, + "rme": 0.02384499571699006, + "rhz": 0.5037035677866308, + "sampleSize": 169 + }, + "fn if": { + "name": "fn if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 135765.75434799597, + "success": true, + "fastest": false, + "rme": 0.014645250447295578, + "rhz": 0.18167404613923935, + "sampleSize": 172 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 71111.50057399167, + "success": true, + "fastest": false, + "rme": 0.03988751428801817, + "rhz": 0.09515738411614111, + "sampleSize": 169 + }, + "escape31": { + "name": "escape31", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 139727.09470691156, + "success": true, + "fastest": false, + "rme": 0.019847762101041267, + "rhz": 0.18697488753768354, + "sampleSize": 161 + }, + "native": { + "name": "native", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 747304.0714023721, + "success": true, + "fastest": true, + "rme": 0.01350595023982867, + "rhz": 1, + "sampleSize": 167 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..b5e04d1b --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 295607.88583768904, + "success": true, + "fastest": false, + "rme": 0.007232800727358036, + "rhz": 0.4980642885243391, + "sampleSize": 170 + }, + "fn if": { + "name": "fn if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 89162.00387931858, + "success": true, + "fastest": false, + "rme": 0.014524314993346383, + "rhz": 0.15022742001524522, + "sampleSize": 168 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 58497.49421155238, + "success": true, + "fastest": false, + "rme": 0.019957328292353076, + "rhz": 0.09856135181363554, + "sampleSize": 158 + }, + "escape31": { + "name": "escape31", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 94657.77431504549, + "success": true, + "fastest": false, + "rme": 0.018818194357686804, + "rhz": 0.1594871425162423, + "sampleSize": 169 + }, + "native": { + "name": "native", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-long", + "hz": 593513.513513514, + "success": true, + "fastest": true, + "rme": 0.011966146496422055, + "rhz": 1, + "sampleSize": 159 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..3a633e74 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-long", + "hz": 402089.26277975074, + "success": true, + "fastest": false, + "rme": 0.009840618321492465, + "rhz": 0.33427940860849686, + "sampleSize": 176 + }, + "fn if": { + "name": "fn if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-long", + "hz": 92081.06960950758, + "success": true, + "fastest": false, + "rme": 0.00906764573748056, + "rhz": 0.07655216973541666, + "sampleSize": 177 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-long", + "hz": 82352.01198595639, + "success": true, + "fastest": false, + "rme": 0.016802527454663683, + "rhz": 0.06846385718950287, + "sampleSize": 174 + }, + "escape31": { + "name": "escape31", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-long", + "hz": 92918.88649108761, + "success": true, + "fastest": false, + "rme": 0.01548384596707835, + "rhz": 0.07724869400905834, + "sampleSize": 178 + }, + "native": { + "name": "native", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-long", + "hz": 1202853.8175699352, + "success": true, + "fastest": true, + "rme": 0.009327160436626335, + "rhz": 1, + "sampleSize": 176 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..08551762 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-long", + "hz": 338041.79919469816, + "success": true, + "fastest": false, + "rme": 0.028614838392745215, + "rhz": 0.37806329872403155, + "sampleSize": 167 + }, + "fn if": { + "name": "fn if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-long", + "hz": 93369.49659361344, + "success": true, + "fastest": false, + "rme": 0.02106853001441757, + "rhz": 0.10442371318125844, + "sampleSize": 167 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-long", + "hz": 83557.77738018853, + "success": true, + "fastest": false, + "rme": 0.016320452691922446, + "rhz": 0.09345036331500452, + "sampleSize": 169 + }, + "escape31": { + "name": "escape31", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-long", + "hz": 100947.54042740246, + "success": true, + "fastest": false, + "rme": 0.013158480020082207, + "rhz": 0.11289893800997104, + "sampleSize": 173 + }, + "native": { + "name": "native", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-long", + "hz": 894140.7439854478, + "success": true, + "fastest": true, + "rme": 0.028000583912129402, + "rhz": 1, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..ee208c66 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 421050.7010850686, + "success": true, + "fastest": false, + "rme": 0.017587416521659537, + "rhz": 0.3627606464390377, + "sampleSize": 172 + }, + "fn if": { + "name": "fn if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 612197.8607722911, + "success": true, + "fastest": false, + "rme": 0.014130797234954116, + "rhz": 0.5274454861375074, + "sampleSize": 171 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 638820.1263584908, + "success": true, + "fastest": false, + "rme": 0.015818194070298164, + "rhz": 0.5503821782005622, + "sampleSize": 172 + }, + "escape31": { + "name": "escape31", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 906462.1950352091, + "success": true, + "fastest": false, + "rme": 0.01609037527785378, + "rhz": 0.7809720088248596, + "sampleSize": 169 + }, + "native": { + "name": "native", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 1160684.6145474233, + "success": true, + "fastest": true, + "rme": 0.01621618746604937, + "rhz": 1, + "sampleSize": 171 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..ab44db42 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-short", + "hz": 383550.51167372527, + "success": true, + "fastest": false, + "rme": 0.07384001243033904, + "rhz": 0.29787002825625064, + "sampleSize": 146 + }, + "fn if": { + "name": "fn if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-short", + "hz": 618580.987554145, + "success": true, + "fastest": false, + "rme": 0.020759770661330924, + "rhz": 0.4803975764169341, + "sampleSize": 147 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-short", + "hz": 566687.2120246552, + "success": true, + "fastest": false, + "rme": 0.024273474903516126, + "rhz": 0.4400962343177167, + "sampleSize": 147 + }, + "escape31": { + "name": "escape31", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-short", + "hz": 924253.0121271972, + "success": true, + "fastest": false, + "rme": 0.022119683746745625, + "rhz": 0.7177862170927007, + "sampleSize": 148 + }, + "native": { + "name": "native", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "escape-short", + "hz": 1287643.8556744142, + "success": true, + "fastest": true, + "rme": 0.029172189762178075, + "rhz": 1, + "sampleSize": 145 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..37ac8c7f --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-short", + "hz": 613213.9007119045, + "success": true, + "fastest": false, + "rme": 0.014974749195626105, + "rhz": 0.4084658150744344, + "sampleSize": 172 + }, + "fn if": { + "name": "fn if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-short", + "hz": 714253.4975991725, + "success": true, + "fastest": false, + "rme": 0.018992545536700448, + "rhz": 0.4757689555437499, + "sampleSize": 168 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-short", + "hz": 595903.4738796077, + "success": true, + "fastest": false, + "rme": 0.017260970308691965, + "rhz": 0.3969352258344779, + "sampleSize": 167 + }, + "escape31": { + "name": "escape31", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-short", + "hz": 1013969.6558224236, + "success": true, + "fastest": false, + "rme": 0.01728600326103597, + "rhz": 0.6754118610902676, + "sampleSize": 172 + }, + "native": { + "name": "native", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "escape-short", + "hz": 1501261.2514468536, + "success": true, + "fastest": true, + "rme": 0.012863296877945634, + "rhz": 1, + "sampleSize": 172 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..2dd120f3 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 419028.44034580654, + "success": true, + "fastest": false, + "rme": 0.025905905131812446, + "rhz": 0.4073284694703158, + "sampleSize": 171 + }, + "fn if": { + "name": "fn if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 902805.3886212112, + "success": true, + "fastest": false, + "rme": 0.026929282009452646, + "rhz": 0.877597560855661, + "sampleSize": 163 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 890390.3422737826, + "success": true, + "fastest": false, + "rme": 0.02730976550531793, + "rhz": 0.8655291632477855, + "sampleSize": 163 + }, + "escape31": { + "name": "escape31", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 1028723.6757369431, + "success": true, + "fastest": true, + "rme": 0.02519295334946404, + "rhz": 1, + "sampleSize": 161 + }, + "native": { + "name": "native", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 773500.4517877887, + "success": true, + "fastest": false, + "rme": 0.05956270707829001, + "rhz": 0.7519030328855597, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..e170502c --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 581239.0461276657, + "success": true, + "fastest": false, + "rme": 0.024732909178170403, + "rhz": 0.44122546422972886, + "sampleSize": 170 + }, + "fn if": { + "name": "fn if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 555729.4222633594, + "success": true, + "fastest": false, + "rme": 0.027909801235014572, + "rhz": 0.42186080573536117, + "sampleSize": 169 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 501086.63136037166, + "success": true, + "fastest": false, + "rme": 0.01642873238900235, + "rhz": 0.38038081408028707, + "sampleSize": 169 + }, + "escape31": { + "name": "escape31", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 596529.88438048, + "success": true, + "fastest": false, + "rme": 0.02664240853437143, + "rhz": 0.4528329211814042, + "sampleSize": 169 + }, + "native": { + "name": "native", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 1317328.8788813811, + "success": true, + "fastest": true, + "rme": 0.02441843017891321, + "rhz": 1, + "sampleSize": 174 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..21730fbc --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 597081.931706083, + "success": true, + "fastest": false, + "rme": 0.016901868480679677, + "rhz": 0.4197455025738681, + "sampleSize": 174 + }, + "fn if": { + "name": "fn if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 663555.4809467852, + "success": true, + "fastest": false, + "rme": 0.019327894019762218, + "rhz": 0.4664760630753073, + "sampleSize": 162 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 427901.8236123469, + "success": true, + "fastest": false, + "rme": 0.02050123195761757, + "rhz": 0.30081276365410636, + "sampleSize": 169 + }, + "escape31": { + "name": "escape31", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 836386.5501103073, + "success": true, + "fastest": false, + "rme": 0.02042011161457491, + "rhz": 0.5879754086996735, + "sampleSize": 172 + }, + "native": { + "name": "native", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 1422485.5967361, + "success": true, + "fastest": true, + "rme": 0.018082968121653838, + "rhz": 1, + "sampleSize": 174 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..d02f8fe7 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 451918.6269906427, + "success": true, + "fastest": false, + "rme": 0.014367526545734477, + "rhz": 0.3631427610829891, + "sampleSize": 166 + }, + "fn if": { + "name": "fn if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 458041.9492929381, + "success": true, + "fastest": false, + "rme": 0.014164362470847206, + "rhz": 0.36806320479796495, + "sampleSize": 168 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 307481.77110852796, + "success": true, + "fastest": false, + "rme": 0.012392303592867627, + "rhz": 0.2470793914528124, + "sampleSize": 159 + }, + "escape31": { + "name": "escape31", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 521251.41025503376, + "success": true, + "fastest": false, + "rme": 0.01429694912407263, + "rhz": 0.41885566346070136, + "sampleSize": 159 + }, + "native": { + "name": "native", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "escape-short", + "hz": 1244465.4703921403, + "success": true, + "fastest": true, + "rme": 0.013138952266236287, + "rhz": 1, + "sampleSize": 164 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..f7a920e2 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-short", + "hz": 537701.626064145, + "success": true, + "fastest": false, + "rme": 0.03257562097595429, + "rhz": 0.26353460226563175, + "sampleSize": 171 + }, + "fn if": { + "name": "fn if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-short", + "hz": 553756.7978187922, + "success": true, + "fastest": false, + "rme": 0.012983308427960112, + "rhz": 0.27140345200975097, + "sampleSize": 177 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-short", + "hz": 583552.7504135764, + "success": true, + "fastest": false, + "rme": 0.010066045577636453, + "rhz": 0.28600683822911, + "sampleSize": 177 + }, + "escape31": { + "name": "escape31", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-short", + "hz": 570858.7989009853, + "success": true, + "fastest": false, + "rme": 0.025407559708725852, + "rhz": 0.27978536650410013, + "sampleSize": 175 + }, + "native": { + "name": "native", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "escape-short", + "hz": 2040345.4477760172, + "success": true, + "fastest": true, + "rme": 0.025360418301269214, + "rhz": 1, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..0b7b30cc --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,57 @@ +{ + "reg": { + "name": "reg", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-short", + "hz": 533176.8779355418, + "success": true, + "fastest": false, + "rme": 0.029034713022792057, + "rhz": 0.282500548086439, + "sampleSize": 164 + }, + "fn if": { + "name": "fn if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-short", + "hz": 533457.5359566113, + "success": true, + "fastest": false, + "rme": 0.02156079440256287, + "rhz": 0.28264925304357064, + "sampleSize": 168 + }, + "fn if reverse": { + "name": "fn if reverse", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-short", + "hz": 603198.7984494594, + "success": true, + "fastest": false, + "rme": 0.013174622557629538, + "rhz": 0.3196012396990228, + "sampleSize": 175 + }, + "escape31": { + "name": "escape31", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-short", + "hz": 713978.8522159118, + "success": true, + "fastest": false, + "rme": 0.011570099195855615, + "rhz": 0.37829738201345275, + "sampleSize": 174 + }, + "native": { + "name": "native", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "escape-short", + "hz": 1887348.118604008, + "success": true, + "fastest": true, + "rme": 0.02768628880843476, + "rhz": 1, + "sampleSize": 171 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/escape.md b/node_modules/fast-stable-stringify/results/escape.md new file mode 100644 index 00000000..abbe7bd2 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/escape.md @@ -0,0 +1,20 @@ +| Suite | Browser | reg | fn if | fn if reverse | escape31 | native | +| :----------- | :-------------------------------------- | --------------: | --------------: | --------------: | ----------------: | ----------------: | +| escape-long | Chrome 60.0.3112 (Windows 7 0.0.0) | 85.71% (±1.21%) | 51.57% (±0.51%) | 45.53% (±0.41%) | 55.48% (±0.59%) | *100.00% (±1.04%) | +| escape-long | Chrome Mobile 55.0.2883 (Android 6.0.0) | 75.44% (±1.88%) | 44.27% (±0.71%) | 32.00% (±0.87%) | 48.22% (±1.28%) | *100.00% (±2.41%) | +| escape-long | Edge 14.14393.0 (Windows 10 0.0.0) | 62.92% (±1.03%) | 26.70% (±0.52%) | 14.32% (±0.31%) | 28.07% (±0.58%) | *100.00% (±2.04%) | +| escape-long | Firefox 54.0.0 (Windows 7 0.0.0) | 63.41% (±1.86%) | 35.40% (±0.88%) | 35.65% (±0.79%) | 35.55% (±0.90%) | *100.00% (±4.52%) | +| escape-long | IE 10.0.0 (Windows 7 0.0.0) | 62.29% (±1.26%) | 17.96% (±0.51%) | 12.78% (±0.16%) | 18.24% (±0.53%) | *100.00% (±2.60%) | +| escape-long | IE 11.0.0 (Windows 7 0.0.0) | 50.37% (±1.20%) | 18.17% (±0.27%) | 9.52% (±0.38%) | 18.70% (±0.37%) | *100.00% (±1.35%) | +| escape-long | IE 9.0.0 (Windows 7 0.0.0) | 49.81% (±0.36%) | 15.02% (±0.22%) | 9.86% (±0.20%) | 15.95% (±0.30%) | *100.00% (±1.20%) | +| escape-long | Mobile Safari 10.0.0 (iOS 10.3.0) | 33.43% (±0.33%) | 7.66% (±0.07%) | 6.85% (±0.12%) | 7.72% (±0.12%) | *100.00% (±0.93%) | +| escape-long | Safari 10.0.1 (Mac OS X 10.12.1) | 37.81% (±1.08%) | 10.44% (±0.22%) | 9.35% (±0.15%) | 11.29% (±0.15%) | *100.00% (±2.80%) | +| escape-short | Chrome 60.0.3112 (Windows 7 0.0.0) | 36.28% (±0.64%) | 52.74% (±0.75%) | 55.04% (±0.87%) | 78.10% (±1.26%) | *100.00% (±1.62%) | +| escape-short | Chrome Mobile 55.0.2883 (Android 6.0.0) | 29.79% (±2.20%) | 48.04% (±1.00%) | 44.01% (±1.07%) | 71.78% (±1.59%) | *100.00% (±2.92%) | +| escape-short | Edge 14.14393.0 (Windows 10 0.0.0) | 40.85% (±0.61%) | 47.58% (±0.90%) | 39.69% (±0.69%) | 67.54% (±1.17%) | *100.00% (±1.29%) | +| escape-short | Firefox 54.0.0 (Windows 7 0.0.0) | 40.73% (±1.06%) | 87.76% (±2.36%) | 86.55% (±2.36%) | *100.00% (±2.52%) | 75.19% (±4.48%) | +| escape-short | IE 10.0.0 (Windows 7 0.0.0) | 44.12% (±1.09%) | 42.19% (±1.18%) | 38.04% (±0.62%) | 45.28% (±1.21%) | *100.00% (±2.44%) | +| escape-short | IE 11.0.0 (Windows 7 0.0.0) | 41.97% (±0.71%) | 46.65% (±0.90%) | 30.08% (±0.62%) | 58.80% (±1.20%) | *100.00% (±1.81%) | +| escape-short | IE 9.0.0 (Windows 7 0.0.0) | 36.31% (±0.52%) | 36.81% (±0.52%) | 24.71% (±0.31%) | 41.89% (±0.60%) | *100.00% (±1.31%) | +| escape-short | Mobile Safari 10.0.0 (iOS 10.3.0) | 26.35% (±0.86%) | 27.14% (±0.35%) | 28.60% (±0.29%) | 27.98% (±0.71%) | *100.00% (±2.54%) | +| escape-short | Safari 10.0.1 (Mac OS X 10.12.1) | 28.25% (±0.82%) | 28.26% (±0.61%) | 31.96% (±0.42%) | 37.83% (±0.44%) | *100.00% (±2.77%) | diff --git a/node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..697fb191 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 36411.53526294366, + "success": true, + "fastest": true, + "rme": 0.007522440507810787, + "rhz": 1, + "sampleSize": 211 + }, + "while + if": { + "name": "while + if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 36119.51959062462, + "success": true, + "fastest": true, + "rme": 0.009843502140930696, + "rhz": 0.9919801329383596, + "sampleSize": 211 + }, + "array join": { + "name": "array join", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 32849.563515559996, + "success": true, + "fastest": false, + "rme": 0.0115358668742216, + "rhz": 0.902174634448641, + "sampleSize": 213 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..eef6daca --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-long", + "hz": 26338.90022369847, + "success": true, + "fastest": true, + "rme": 0.025063817288098963, + "rhz": 1, + "sampleSize": 193 + }, + "while + if": { + "name": "while + if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-long", + "hz": 25959.375873252164, + "success": true, + "fastest": false, + "rme": 0.023417818686660433, + "rhz": 0.9855907290272952, + "sampleSize": 192 + }, + "array join": { + "name": "array join", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-long", + "hz": 25445.828238320097, + "success": true, + "fastest": false, + "rme": 0.02452188410321602, + "rhz": 0.9660930419344225, + "sampleSize": 191 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..8c3c61d0 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-long", + "hz": 26381.694221257356, + "success": true, + "fastest": false, + "rme": 0.014195682606163837, + "rhz": 0.9244556621814648, + "sampleSize": 210 + }, + "while + if": { + "name": "while + if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-long", + "hz": 23771.041213810397, + "success": true, + "fastest": false, + "rme": 0.020663938617191867, + "rhz": 0.8329743139979672, + "sampleSize": 206 + }, + "array join": { + "name": "array join", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-long", + "hz": 28537.544092708253, + "success": true, + "fastest": true, + "rme": 0.014926600493283032, + "rhz": 1, + "sampleSize": 209 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..923e132d --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 14666.732983263433, + "success": true, + "fastest": true, + "rme": 0.017720925761977167, + "rhz": 1, + "sampleSize": 206 + }, + "while + if": { + "name": "while + if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 14304.32478751105, + "success": true, + "fastest": false, + "rme": 0.019517232560753738, + "rhz": 0.9752904620159148, + "sampleSize": 206 + }, + "array join": { + "name": "array join", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 14128.325816957695, + "success": true, + "fastest": false, + "rme": 0.02191559968248959, + "rhz": 0.9632905864639297, + "sampleSize": 212 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..34ac31fb --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 24532.66436126496, + "success": true, + "fastest": false, + "rme": 0.024335714081936355, + "rhz": 0.8134502756892201, + "sampleSize": 210 + }, + "while + if": { + "name": "while + if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 22714.555324734756, + "success": true, + "fastest": false, + "rme": 0.02508863769322542, + "rhz": 0.7531656985548391, + "sampleSize": 210 + }, + "array join": { + "name": "array join", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 30158.775643021236, + "success": true, + "fastest": true, + "rme": 0.02294916733281892, + "rhz": 1, + "sampleSize": 214 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..b0340c81 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 23299.253985498104, + "success": true, + "fastest": false, + "rme": 0.012604441829821445, + "rhz": 0.7612665520486154, + "sampleSize": 213 + }, + "while + if": { + "name": "while + if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 21471.605639232734, + "success": true, + "fastest": false, + "rme": 0.016078837449727854, + "rhz": 0.7015510111225076, + "sampleSize": 211 + }, + "array join": { + "name": "array join", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 30605.907908075522, + "success": true, + "fastest": true, + "rme": 0.01788399233872233, + "rhz": 1, + "sampleSize": 215 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..1fe99d1d --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 19171.209140973908, + "success": true, + "fastest": false, + "rme": 0.007741079564622982, + "rhz": 0.7577476601195926, + "sampleSize": 207 + }, + "while + if": { + "name": "while + if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 18014.493794751823, + "success": true, + "fastest": false, + "rme": 0.007724848359851887, + "rhz": 0.7120281470425117, + "sampleSize": 217 + }, + "array join": { + "name": "array join", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-long", + "hz": 25300.255150835023, + "success": true, + "fastest": true, + "rme": 0.006573257208666089, + "rhz": 1, + "sampleSize": 214 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..96e6a7fa --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-long", + "hz": 23297.55521668556, + "success": true, + "fastest": false, + "rme": 0.00631699710436391, + "rhz": 0.9710234238747862, + "sampleSize": 207 + }, + "while + if": { + "name": "while + if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-long", + "hz": 22230.138102258647, + "success": true, + "fastest": false, + "rme": 0.026905685238200833, + "rhz": 0.9265343342894962, + "sampleSize": 212 + }, + "array join": { + "name": "array join", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-long", + "hz": 23992.783947187032, + "success": true, + "fastest": true, + "rme": 0.011710983965349786, + "rhz": 1, + "sampleSize": 209 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..44cd9597 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-long", + "hz": 24983.89047457792, + "success": true, + "fastest": false, + "rme": 0.014556136047743569, + "rhz": 0.9435641971541613, + "sampleSize": 206 + }, + "while + if": { + "name": "while + if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-long", + "hz": 24686.899076943977, + "success": true, + "fastest": false, + "rme": 0.014123011962622743, + "rhz": 0.9323477515027001, + "sampleSize": 209 + }, + "array join": { + "name": "array join", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-long", + "hz": 26478.209484771287, + "success": true, + "fastest": true, + "rme": 0.012780034002736902, + "rhz": 1, + "sampleSize": 209 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..6a4efc27 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 310902.8640157301, + "success": true, + "fastest": true, + "rme": 0.01056819380382985, + "rhz": 0.9976547366334327, + "sampleSize": 211 + }, + "while + if": { + "name": "while + if", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 311633.7271798719, + "success": true, + "fastest": true, + "rme": 0.008028741690013557, + "rhz": 1, + "sampleSize": 212 + }, + "array join": { + "name": "array join", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 264982.8188203513, + "success": true, + "fastest": false, + "rme": 0.010026939975144393, + "rhz": 0.8503021197940038, + "sampleSize": 212 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..7c3c25bd --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-short", + "hz": 235578.4947828406, + "success": true, + "fastest": true, + "rme": 0.03974005580662533, + "rhz": 1, + "sampleSize": 190 + }, + "while + if": { + "name": "while + if", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-short", + "hz": 225073.11912308275, + "success": true, + "fastest": false, + "rme": 0.029700688684889318, + "rhz": 0.9554060498202867, + "sampleSize": 193 + }, + "array join": { + "name": "array join", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "itar-short", + "hz": 221468.15872985727, + "success": true, + "fastest": false, + "rme": 0.020249883449366055, + "rhz": 0.9401034628988931, + "sampleSize": 196 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..709054a1 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-short", + "hz": 258326.20076670017, + "success": true, + "fastest": true, + "rme": 0.01562542930728137, + "rhz": 1, + "sampleSize": 210 + }, + "while + if": { + "name": "while + if", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-short", + "hz": 250131.81743630744, + "success": true, + "fastest": false, + "rme": 0.015426062316980953, + "rhz": 0.9682789306463216, + "sampleSize": 210 + }, + "array join": { + "name": "array join", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "itar-short", + "hz": 257660.10445245806, + "success": true, + "fastest": true, + "rme": 0.012689221094028156, + "rhz": 0.9974214914620926, + "sampleSize": 212 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..cfb3fff7 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 144024.47792698225, + "success": true, + "fastest": false, + "rme": 0.016729460336229386, + "rhz": 0.9777132666148783, + "sampleSize": 210 + }, + "while + if": { + "name": "while + if", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 147307.48046984777, + "success": true, + "fastest": true, + "rme": 0.013771889405180435, + "rhz": 1, + "sampleSize": 211 + }, + "array join": { + "name": "array join", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 126449.56973836492, + "success": true, + "fastest": false, + "rme": 0.015284854766094137, + "rhz": 0.8584056243107612, + "sampleSize": 206 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..d94e6283 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 267177.37118361465, + "success": true, + "fastest": false, + "rme": 0.027664987498672043, + "rhz": 0.8851453953349694, + "sampleSize": 209 + }, + "while + if": { + "name": "while + if", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 240946.1863334928, + "success": true, + "fastest": false, + "rme": 0.024334312597545857, + "rhz": 0.7982427793633902, + "sampleSize": 212 + }, + "array join": { + "name": "array join", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 301845.7448818401, + "success": true, + "fastest": true, + "rme": 0.025510367215445445, + "rhz": 1, + "sampleSize": 211 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..ff86f295 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 299157.6065641091, + "success": true, + "fastest": false, + "rme": 0.017444833079293707, + "rhz": 0.9755083449865074, + "sampleSize": 214 + }, + "while + if": { + "name": "while + if", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 285034.8470662392, + "success": true, + "fastest": false, + "rme": 0.015476162917584716, + "rhz": 0.9294561322327022, + "sampleSize": 213 + }, + "array join": { + "name": "array join", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 306668.42380343436, + "success": true, + "fastest": true, + "rme": 0.015684034742271553, + "rhz": 1, + "sampleSize": 215 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..5d598cc7 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 240965.2696072598, + "success": true, + "fastest": false, + "rme": 0.013595390361967868, + "rhz": 0.8402592586317352, + "sampleSize": 209 + }, + "while + if": { + "name": "while + if", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 230187.22948896923, + "success": true, + "fastest": false, + "rme": 0.01328665941718909, + "rhz": 0.8026756350080547, + "sampleSize": 217 + }, + "array join": { + "name": "array join", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "itar-short", + "hz": 286774.90564000903, + "success": true, + "fastest": true, + "rme": 0.015580324289100318, + "rhz": 1, + "sampleSize": 198 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..86838ca6 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-short", + "hz": 203203.20404721753, + "success": true, + "fastest": false, + "rme": 0.031725599593069885, + "rhz": 0.8894144359714051, + "sampleSize": 201 + }, + "while + if": { + "name": "while + if", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-short", + "hz": 228468.5247156822, + "success": true, + "fastest": true, + "rme": 0.012472328119036293, + "rhz": 1, + "sampleSize": 211 + }, + "array join": { + "name": "array join", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "itar-short", + "hz": 227457.50626324932, + "success": true, + "fastest": false, + "rme": 0.02322443731392338, + "rhz": 0.9955748020271455, + "sampleSize": 206 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..d4d1d103 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,35 @@ +{ + "for + if": { + "name": "for + if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-short", + "hz": 252961.02857752063, + "success": true, + "fastest": true, + "rme": 0.015411371090374376, + "rhz": 1, + "sampleSize": 205 + }, + "while + if": { + "name": "while + if", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-short", + "hz": 245223.46117305866, + "success": true, + "fastest": false, + "rme": 0.012279924013953218, + "rhz": 0.9694120179382067, + "sampleSize": 208 + }, + "array join": { + "name": "array join", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "itar-short", + "hz": 252326.4006791167, + "success": true, + "fastest": true, + "rme": 0.013639798860321599, + "rhz": 0.9974912028861811, + "sampleSize": 207 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/itar.md b/node_modules/fast-stable-stringify/results/itar.md new file mode 100644 index 00000000..3489e01c --- /dev/null +++ b/node_modules/fast-stable-stringify/results/itar.md @@ -0,0 +1,20 @@ +| Suite | Browser | for + if | while + if | array join | +| :--------- | :-------------------------------------- | ----------------: | ----------------: | ----------------: | +| itar-long | Chrome 60.0.3112 (Windows 7 0.0.0) | *100.00% (±0.75%) | *99.20% (±0.98%) | 90.22% (±1.04%) | +| itar-long | Chrome Mobile 55.0.2883 (Android 6.0.0) | *100.00% (±2.51%) | 98.56% (±2.31%) | 96.61% (±2.37%) | +| itar-long | Edge 14.14393.0 (Windows 10 0.0.0) | 92.45% (±1.31%) | 83.30% (±1.72%) | *100.00% (±1.49%) | +| itar-long | Firefox 54.0.0 (Windows 7 0.0.0) | *100.00% (±1.77%) | 97.53% (±1.90%) | 96.33% (±2.11%) | +| itar-long | IE 10.0.0 (Windows 7 0.0.0) | 81.35% (±1.98%) | 75.32% (±1.89%) | *100.00% (±2.29%) | +| itar-long | IE 11.0.0 (Windows 7 0.0.0) | 76.13% (±0.96%) | 70.16% (±1.13%) | *100.00% (±1.79%) | +| itar-long | IE 9.0.0 (Windows 7 0.0.0) | 75.77% (±0.59%) | 71.20% (±0.55%) | *100.00% (±0.66%) | +| itar-long | Mobile Safari 10.0.0 (iOS 10.3.0) | 97.10% (±0.61%) | 92.65% (±2.49%) | *100.00% (±1.17%) | +| itar-long | Safari 10.0.1 (Mac OS X 10.12.1) | 94.36% (±1.37%) | 93.23% (±1.32%) | *100.00% (±1.28%) | +| itar-short | Chrome 60.0.3112 (Windows 7 0.0.0) | *99.77% (±1.05%) | *100.00% (±0.80%) | 85.03% (±0.85%) | +| itar-short | Chrome Mobile 55.0.2883 (Android 6.0.0) | *100.00% (±3.97%) | 95.54% (±2.84%) | 94.01% (±1.90%) | +| itar-short | Edge 14.14393.0 (Windows 10 0.0.0) | *100.00% (±1.56%) | 96.83% (±1.49%) | *99.74% (±1.27%) | +| itar-short | Firefox 54.0.0 (Windows 7 0.0.0) | 97.77% (±1.64%) | *100.00% (±1.38%) | 85.84% (±1.31%) | +| itar-short | IE 10.0.0 (Windows 7 0.0.0) | 88.51% (±2.45%) | 79.82% (±1.94%) | *100.00% (±2.55%) | +| itar-short | IE 11.0.0 (Windows 7 0.0.0) | 97.55% (±1.70%) | 92.95% (±1.44%) | *100.00% (±1.57%) | +| itar-short | IE 9.0.0 (Windows 7 0.0.0) | 84.03% (±1.14%) | 80.27% (±1.07%) | *100.00% (±1.56%) | +| itar-short | Mobile Safari 10.0.0 (iOS 10.3.0) | 88.94% (±2.82%) | *100.00% (±1.25%) | 99.56% (±2.31%) | +| itar-short | Safari 10.0.1 (Mac OS X 10.12.1) | *100.00% (±1.54%) | 96.94% (±1.19%) | *99.75% (±1.36%) | diff --git a/node_modules/fast-stable-stringify/results/iter.md b/node_modules/fast-stable-stringify/results/iter.md new file mode 100644 index 00000000..73d1193b --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter.md @@ -0,0 +1,14 @@ +| Suite | Browser | keys-while | keys-for | incr-for | +| :---- | :-------------------------------------- | ----------------: | ----------------: | --------------: | +| iter | Chrome 60.0.3112 (Windows 7 0.0.0) | *100.00% (±1.19%) | *98.26% (±1.51%) | 30.51% (±0.67%) | +| iter | Chrome Mobile 39.0.0 (Android 5.1.1) | *100.00% (±2.29%) | 93.22% (±1.78%) | 37.71% (±0.67%) | +| iter | Chrome Mobile 55.0.2883 (Android 6.0.0) | *100.00% (±2.89%) | 95.03% (±2.24%) | 32.52% (±0.61%) | +| iter | Edge 14.14393.0 (Windows 10 0.0.0) | *100.00% (±1.79%) | *98.76% (±2.02%) | 37.88% (±0.64%) | +| iter | Firefox 54.0.0 (Windows 7 0.0.0) | *100.00% (±2.06%) | *99.28% (±2.17%) | 8.57% (±0.10%) | +| iter | IE 10.0.0 (Windows 7 0.0.0) | *100.00% (±2.27%) | *94.97% (±2.48%) | 41.65% (±1.21%) | +| iter | IE 11.0.0 (Windows 7 0.0.0) | *100.00% (±1.98%) | 95.75% (±1.72%) | 38.21% (±0.75%) | +| iter | IE 9.0.0 (Windows 7 0.0.0) | *100.00% (±1.37%) | 90.99% (±1.59%) | 45.06% (±0.93%) | +| iter | Mobile Safari 10.0.0 (iOS 10.3.0) | *100.00% (±3.09%) | *99.25% (±2.38%) | 47.22% (±1.16%) | +| iter | Mobile Safari 9.0.0 (iOS 9.2.0) | 97.40% (±2.65%) | *100.00% (±1.98%) | 57.77% (±1.32%) | +| iter | Safari 10.0.1 (Mac OS X 10.12.1) | *100.00% (±0.60%) | *93.17% (±2.38%) | 47.47% (±0.55%) | +| iter | Safari 9.1.2 (Mac OS X 10.11.6) | *100.00% (±1.96%) | 98.12% (±1.52%) | 51.10% (±0.89%) | diff --git a/node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..2f8390a9 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 56574.051312644304, + "success": true, + "fastest": true, + "rme": 0.011898094024098757, + "rhz": 1, + "sampleSize": 172 + }, + "keys-for": { + "name": "keys-for", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 55589.971512360826, + "success": true, + "fastest": true, + "rme": 0.015368014920102797, + "rhz": 0.9826054564336365, + "sampleSize": 170 + }, + "incr-for": { + "name": "incr-for", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 17263.158679413995, + "success": true, + "fastest": false, + "rme": 0.022115589132274314, + "rhz": 0.3051426984433706, + "sampleSize": 170 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json b/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json new file mode 100644 index 00000000..e914cbed --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Chrome Mobile 39.0.0 (Android 5.1.1)", + "suite": "iter", + "hz": 41449.9799734825, + "success": true, + "fastest": true, + "rme": 0.022947386031672564, + "rhz": 1, + "sampleSize": 159 + }, + "keys-for": { + "name": "keys-for", + "browser": "Chrome Mobile 39.0.0 (Android 5.1.1)", + "suite": "iter", + "hz": 38639.94651532041, + "success": true, + "fastest": false, + "rme": 0.019140969586850222, + "rhz": 0.9322066389426532, + "sampleSize": 160 + }, + "incr-for": { + "name": "incr-for", + "browser": "Chrome Mobile 39.0.0 (Android 5.1.1)", + "suite": "iter", + "hz": 15632.699209216895, + "success": true, + "fastest": false, + "rme": 0.017769563380438193, + "rhz": 0.37714612212642484, + "sampleSize": 161 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..d054ee0a --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "iter", + "hz": 50801.098785564085, + "success": true, + "fastest": true, + "rme": 0.028921852048030095, + "rhz": 1, + "sampleSize": 141 + }, + "keys-for": { + "name": "keys-for", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "iter", + "hz": 48275.00969473481, + "success": true, + "fastest": false, + "rme": 0.0235223967226664, + "rhz": 0.9502749123302997, + "sampleSize": 140 + }, + "incr-for": { + "name": "incr-for", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "iter", + "hz": 16517.995894922962, + "success": true, + "fastest": false, + "rme": 0.01887891379164421, + "rhz": 0.32515036662192837, + "sampleSize": 141 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..a4007259 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "iter", + "hz": 39031.42857339076, + "success": true, + "fastest": true, + "rme": 0.017905605200443618, + "rhz": 1, + "sampleSize": 168 + }, + "keys-for": { + "name": "keys-for", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "iter", + "hz": 38547.41168447369, + "success": true, + "fastest": true, + "rme": 0.020491580283930267, + "rhz": 0.987599303776264, + "sampleSize": 170 + }, + "incr-for": { + "name": "incr-for", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "iter", + "hz": 14785.513229498973, + "success": true, + "fastest": false, + "rme": 0.016773346589086083, + "rhz": 0.37881045531545904, + "sampleSize": 168 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..7d8fec02 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 51288.89848137886, + "success": true, + "fastest": true, + "rme": 0.02056985493082276, + "rhz": 1, + "sampleSize": 167 + }, + "keys-for": { + "name": "keys-for", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 50917.49218801942, + "success": true, + "fastest": true, + "rme": 0.0218368615440906, + "rhz": 0.9927585441614761, + "sampleSize": 170 + }, + "incr-for": { + "name": "incr-for", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 4396.20812127132, + "success": true, + "fastest": false, + "rme": 0.011792452259220165, + "rhz": 0.08571461371640539, + "sampleSize": 173 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..e401e992 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 35966.149453114274, + "success": true, + "fastest": true, + "rme": 0.022718710100452157, + "rhz": 1, + "sampleSize": 170 + }, + "keys-for": { + "name": "keys-for", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 34156.64425441182, + "success": true, + "fastest": true, + "rme": 0.026098683427836902, + "rhz": 0.9496886593027886, + "sampleSize": 167 + }, + "incr-for": { + "name": "incr-for", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 14980.832916171697, + "success": true, + "fastest": false, + "rme": 0.029043619258269707, + "rhz": 0.416525904050441, + "sampleSize": 164 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..7f35564f --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 41364.6571228128, + "success": true, + "fastest": true, + "rme": 0.019812279223258095, + "rhz": 1, + "sampleSize": 168 + }, + "keys-for": { + "name": "keys-for", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 39608.00547823607, + "success": true, + "fastest": false, + "rme": 0.017923341293839844, + "rhz": 0.9575325467013739, + "sampleSize": 169 + }, + "incr-for": { + "name": "incr-for", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 15804.911836102421, + "success": true, + "fastest": false, + "rme": 0.019576578880425893, + "rhz": 0.3820873406293978, + "sampleSize": 170 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..0e7a066c --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 25471.56659459879, + "success": true, + "fastest": true, + "rme": 0.013725500697529026, + "rhz": 1, + "sampleSize": 160 + }, + "keys-for": { + "name": "keys-for", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 23176.549771364575, + "success": true, + "fastest": false, + "rme": 0.017528369032824627, + "rhz": 0.9098988743110575, + "sampleSize": 171 + }, + "incr-for": { + "name": "incr-for", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "iter", + "hz": 11476.374922658983, + "success": true, + "fastest": false, + "rme": 0.02058629668256995, + "rhz": 0.45055630481293335, + "sampleSize": 163 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..3f572e6c --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "iter", + "hz": 23603.301526308816, + "success": true, + "fastest": true, + "rme": 0.030880882113979637, + "rhz": 1, + "sampleSize": 167 + }, + "keys-for": { + "name": "keys-for", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "iter", + "hz": 23426.457275766345, + "success": true, + "fastest": true, + "rme": 0.02398797289803229, + "rhz": 0.9925076476972784, + "sampleSize": 171 + }, + "incr-for": { + "name": "incr-for", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "iter", + "hz": 11144.323028321938, + "success": true, + "fastest": false, + "rme": 0.024524181905002183, + "rhz": 0.47215102581730795, + "sampleSize": 164 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json b/node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json new file mode 100644 index 00000000..33235c82 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Mobile Safari 9.0.0 (iOS 9.2.0)", + "suite": "iter", + "hz": 22809.567212345646, + "success": true, + "fastest": false, + "rme": 0.027252985712392003, + "rhz": 0.974024526377425, + "sampleSize": 160 + }, + "keys-for": { + "name": "keys-for", + "browser": "Mobile Safari 9.0.0 (iOS 9.2.0)", + "suite": "iter", + "hz": 23417.857142857163, + "success": true, + "fastest": true, + "rme": 0.019752086707305883, + "rhz": 1, + "sampleSize": 166 + }, + "incr-for": { + "name": "incr-for", + "browser": "Mobile Safari 9.0.0 (iOS 9.2.0)", + "suite": "iter", + "hz": 13528.47751268248, + "success": true, + "fastest": false, + "rme": 0.022810499348243016, + "rhz": 0.5776992074959725, + "sampleSize": 170 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..dfc1179e --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "iter", + "hz": 37350.5774949858, + "success": true, + "fastest": true, + "rme": 0.00603595175796559, + "rhz": 1, + "sampleSize": 178 + }, + "keys-for": { + "name": "keys-for", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "iter", + "hz": 34798.70521653226, + "success": true, + "fastest": true, + "rme": 0.025579700229008188, + "rhz": 0.9316778360710454, + "sampleSize": 165 + }, + "incr-for": { + "name": "incr-for", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "iter", + "hz": 17731.809750745466, + "success": true, + "fastest": false, + "rme": 0.011567636716923044, + "rhz": 0.4747399087236578, + "sampleSize": 176 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json b/node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json new file mode 100644 index 00000000..ff3238da --- /dev/null +++ b/node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json @@ -0,0 +1,35 @@ +{ + "keys-while": { + "name": "keys-while", + "browser": "Safari 9.1.2 (Mac OS X 10.11.6)", + "suite": "iter", + "hz": 28986.560290298727, + "success": true, + "fastest": true, + "rme": 0.01955387244622322, + "rhz": 1, + "sampleSize": 163 + }, + "keys-for": { + "name": "keys-for", + "browser": "Safari 9.1.2 (Mac OS X 10.11.6)", + "suite": "iter", + "hz": 28441.864683475418, + "success": true, + "fastest": false, + "rme": 0.015457331597656216, + "rhz": 0.9812086842533846, + "sampleSize": 168 + }, + "incr-for": { + "name": "incr-for", + "browser": "Safari 9.1.2 (Mac OS X 10.11.6)", + "suite": "iter", + "hz": 14812.329514457171, + "success": true, + "fastest": false, + "rme": 0.01749261318544788, + "rhz": 0.5110068033637847, + "sampleSize": 171 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs.md b/node_modules/fast-stable-stringify/results/libs.md new file mode 100644 index 00000000..84ff068a --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs.md @@ -0,0 +1,15 @@ + +> fast-stable-stringify@0.2.0 table /var/www/fast-stable-stringify +> node ./cli/index.js results/libs/*.json + +| Suite | Browser | JSON.stringify@native | fast-stable-stringify@48915d2 | json-stable-stringify@1.0.1 | faster-stable-stringify@1.0.0 | +| :---- | :-------------------------------------- | --------------------: | ----------------------------: | --------------------------: | ----------------------------: | +| libs | Chrome 60.0.3112 (Windows 7 0.0.0) | 401.69% (±8.33%) | *154.24% (±2.21%) | 100.00% (±2.08%) | 112.80% (±2.43%) | +| libs | Chrome Mobile 55.0.2883 (Android 6.0.0) | 442.96% (±24.6%) | *149.99% (±3.69%) | 100.00% (±4.11%) | 127.49% (±2.23%) | +| libs | Edge 14.14393.0 (Windows 10 0.0.0) | 452.54% (±8.66%) | *131.31% (±2.46%) | 100.00% (±1.38%) | 110.88% (±1.21%) | +| libs | Firefox 54.0.0 (Windows 7 0.0.0) | 486.58% (±18.1%) | *156.10% (±3.53%) | 100.00% (±3.59%) | 128.86% (±3.73%) | +| libs | IE 10.0.0 (Windows 7 0.0.0) | 419.75% (±13.8%) | *199.75% (±5.28%) | 100.00% (±1.91%) | ? | +| libs | IE 11.0.0 (Windows 7 0.0.0) | 314.45% (±5.07%) | *139.88% (±1.89%) | 100.00% (±1.14%) | ? | +| libs | IE 9.0.0 (Windows 7 0.0.0) | 317.90% (±3.63%) | *185.72% (±1.37%) | 100.00% (±1.62%) | ? | +| libs | Mobile Safari 10.0.0 (iOS 10.3.0) | 746.20% (±14.7%) | *128.14% (±2.21%) | 100.00% (±1.52%) | *123.21% (±3.26%) | +| libs | Safari 10.0.1 (Mac OS X 10.12.1) | 765.32% (±15.0%) | *125.73% (±2.62%) | 100.00% (±1.39%) | 106.87% (±2.29%) | diff --git a/node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json new file mode 100644 index 00000000..480d73be --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 23318.188713986212, + "success": true, + "fastest": false, + "rme": 0.006452566696644349, + "rhz": 2.8306993977343704, + "sampleSize": 172 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 8237.60683760684, + "success": true, + "fastest": true, + "rme": 0.011894091296418823, + "rhz": 1, + "sampleSize": 158 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 5626.352941176469, + "success": true, + "fastest": false, + "rme": 0.011093377969860959, + "rhz": 0.683008190618019, + "sampleSize": 147 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Chrome 60.0.3112 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 6259.964985901354, + "success": true, + "fastest": false, + "rme": 0.011160692994486833, + "rhz": 0.7599251954248374, + "sampleSize": 171 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json b/node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json new file mode 100644 index 00000000..cb99051e --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "libs", + "hz": 22212.791828443846, + "success": true, + "fastest": false, + "rme": 0.034133757882904736, + "rhz": 3.053112613993719, + "sampleSize": 168 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "libs", + "hz": 7275.4577497839855, + "success": true, + "fastest": true, + "rme": 0.022136656281279646, + "rhz": 1, + "sampleSize": 172 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "libs", + "hz": 4486.002693832929, + "success": true, + "fastest": false, + "rme": 0.05442614536157505, + "rhz": 0.6165938760301539, + "sampleSize": 168 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Chrome Mobile 55.0.2883 (Android 6.0.0)", + "suite": "libs", + "hz": 5816.35383305631, + "success": true, + "fastest": false, + "rme": 0.024694090743245932, + "rhz": 0.7994485066220063, + "sampleSize": 147 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json new file mode 100644 index 00000000..d7c47eb9 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "libs", + "hz": 21346.248036663714, + "success": true, + "fastest": false, + "rme": 0.02454137183514576, + "rhz": 3.51787999536997, + "sampleSize": 171 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "libs", + "hz": 6067.929566886422, + "success": true, + "fastest": true, + "rme": 0.01636142507497922, + "rhz": 1, + "sampleSize": 149 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "libs", + "hz": 4375.290115410294, + "success": true, + "fastest": false, + "rme": 0.015137049904064193, + "rhz": 0.7210515658070408, + "sampleSize": 141 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Edge 14.14393.0 (Windows 10 0.0.0)", + "suite": "libs", + "hz": 4952.367339646239, + "success": true, + "fastest": false, + "rme": 0.01379783018004576, + "rhz": 0.8161543875973826, + "sampleSize": 142 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..3c9db99c --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 12763.618282362055, + "success": true, + "fastest": false, + "rme": 0.03332406073767073, + "rhz": 3.133737310719279, + "sampleSize": 171 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 4072.9700727316076, + "success": true, + "fastest": true, + "rme": 0.014051350129001836, + "rhz": 1, + "sampleSize": 140 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 2405.242424808171, + "success": true, + "fastest": false, + "rme": 0.016842437737423815, + "rhz": 0.5905377112665731, + "sampleSize": 132 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Firefox 54.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 3663.1315639282516, + "success": true, + "fastest": false, + "rme": 0.01626300385787352, + "rhz": 0.8993760078063892, + "sampleSize": 169 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..0024bd06 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 14399.576564897297, + "success": true, + "fastest": false, + "rme": 0.025493726819537762, + "rhz": 2.334401010263042, + "sampleSize": 171 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 6168.424577264358, + "success": true, + "fastest": true, + "rme": 0.016452779720660355, + "rhz": 1, + "sampleSize": 151 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "IE 10.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 3365.990566485956, + "success": true, + "fastest": false, + "rme": 0.02423016956488021, + "rhz": 0.5456807527309904, + "sampleSize": 172 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..74613d64 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 14003.509566928884, + "success": true, + "fastest": false, + "rme": 0.014594535695529036, + "rhz": 2.187283150730621, + "sampleSize": 174 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 6402.239034416405, + "success": true, + "fastest": true, + "rme": 0.013900958827880387, + "rhz": 1, + "sampleSize": 150 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "IE 11.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 4699.054054054045, + "success": true, + "fastest": false, + "rme": 0.01732984212468934, + "rhz": 0.7339704170358873, + "sampleSize": 173 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json b/node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json new file mode 100644 index 00000000..6019c3b5 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json @@ -0,0 +1,35 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 9927.615273483276, + "success": true, + "fastest": false, + "rme": 0.012686011907513476, + "rhz": 1.8583624088037056, + "sampleSize": 164 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 5342.1309139986515, + "success": true, + "fastest": true, + "rme": 0.013540097031428645, + "rhz": 1, + "sampleSize": 146 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "IE 9.0.0 (Windows 7 0.0.0)", + "suite": "libs", + "hz": 3139.8341435516154, + "success": true, + "fastest": false, + "rme": 0.015201173421442258, + "rhz": 0.5877493820535017, + "sampleSize": 135 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json b/node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json new file mode 100644 index 00000000..3271f18a --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "libs", + "hz": 19950.666709438065, + "success": true, + "fastest": false, + "rme": 0.04273375035790549, + "rhz": 4.812102268741366, + "sampleSize": 159 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "libs", + "hz": 4145.935725230603, + "success": true, + "fastest": true, + "rme": 0.03670494962202425, + "rhz": 1, + "sampleSize": 162 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "libs", + "hz": 3594.843462246778, + "success": true, + "fastest": false, + "rme": 0.031147610553987737, + "rhz": 0.8670765058825961, + "sampleSize": 138 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Mobile Safari 10.0.0 (iOS 10.3.0)", + "suite": "libs", + "hz": 4265.550460127418, + "success": true, + "fastest": true, + "rme": 0.024960420577611418, + "rhz": 1.028851082801136, + "sampleSize": 142 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json b/node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json new file mode 100644 index 00000000..8fa53603 --- /dev/null +++ b/node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json @@ -0,0 +1,46 @@ +{ + "JSON.stringify@native": { + "name": "JSON.stringify@native", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "libs", + "hz": 20880.94942943559, + "success": true, + "fastest": false, + "rme": 0.034431069225489566, + "rhz": 6.0500575134602785, + "sampleSize": 171 + }, + "fast-stable-stringify@a9f81e8": { + "name": "fast-stable-stringify@a9f81e8", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "libs", + "hz": 3451.36379001014, + "success": true, + "fastest": true, + "rme": 0.030283351076228322, + "rhz": 1, + "sampleSize": 136 + }, + "json-stable-stringify@1.0.1": { + "name": "json-stable-stringify@1.0.1", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "libs", + "hz": 2888.328126218209, + "success": true, + "fastest": false, + "rme": 0.021217425635208887, + "rhz": 0.8368657440801751, + "sampleSize": 171 + }, + "faster-stable-stringify@1.0.0": { + "name": "faster-stable-stringify@1.0.0", + "browser": "Safari 10.0.1 (Mac OS X 10.12.1)", + "suite": "libs", + "hz": 3063.3319729455015, + "success": true, + "fastest": false, + "rme": 0.029382106163122576, + "rhz": 0.887571452714494, + "sampleSize": 164 + } +} \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/escape-long.js b/node_modules/fast-stable-stringify/test/escape-long.js new file mode 100644 index 00000000..2d212a59 --- /dev/null +++ b/node_modules/fast-stable-stringify/test/escape-long.js @@ -0,0 +1,147 @@ +var assert = require('assert'); +var stringTest = "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b. Quisque id mi. Fusce egestas elit eget lorem. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Vivamus euismod mauris. Nam eget dui."; +var stringResult = JSON.stringify(stringTest); + +var strReg = /[\u0000-\u001f"\\]/g; + +function strReplace(str) { + var code = str.charCodeAt(0); + switch (code) { + case 34: return '\\"'; + case 92: return '\\\\'; + case 12: return "\\f"; + case 10: return "\\n"; + case 13: return "\\r"; + case 9: return "\\t"; + case 8: return "\\b"; + default: + if (code > 15) { + return "\\u00" + code.toString(16); + } else { + return "\\u000" + code.toString(16); + } + } +} + +function strEscapeIf(str){ + var length = str.length; + var buffer = ''; + var code = 0; + var i = 0; + + for (; i < length; i++) { + code = str.charCodeAt(i); + + if (code === 34) buffer += '\\"'; + else if (code === 92) buffer += '\\\\'; + else if (code > 31) buffer += str[i]; + else if (code > 15) buffer += "\\u00" + code.toString(16); + else if (code === 12) buffer += "\\f"; + else if (code === 10) buffer += "\\n"; + else if (code === 13) buffer += "\\r"; + else if (code === 9) buffer += "\\t"; + else if (code === 8) buffer += "\\b"; + else buffer += "\\u000" + code.toString(16); + } + + return buffer; +} + +function strEscapeIfReverse(str){ + var buffer = ''; + var code = 0; + var i = str.length - 1; + + for (; i >= 0; i--) { + code = str.charCodeAt(i); + + if (code === 34) buffer = '\\"' + buffer; + else if (code === 92) buffer = '\\\\' + buffer; + else if (code > 31) buffer = str[i] + buffer; + else if (code > 15) buffer = "\\u00" + code.toString(16) + buffer; + else if (code === 12) buffer = "\\f" + buffer; + else if (code === 10) buffer = "\\n" + buffer; + else if (code === 13) buffer = "\\r" + buffer; + else if (code === 9) buffer = "\\t" + buffer; + else if (code === 8) buffer = "\\b" + buffer; + else buffer = "\\u000" + code.toString(16) + buffer; + } + + return buffer; +} + +var escape31 = { + '31': "\\u001f", + '30': "\\u001e", + '29': "\\u001d", + '28': "\\u001c", + '27': "\\u001b", + '26': "\\u001a", + '25': "\\u0019", + '24': "\\u0018", + '23': "\\u0017", + '22': "\\u0016", + '21': "\\u0015", + '20': "\\u0014", + '19': "\\u0013", + '18': "\\u0012", + '17': "\\u0011", + '16': "\\u0010", + '15': "\\u000f", + '14': "\\u000e", + '13': "\\r", + '12': "\\f", + '11': "\\u000b", + '10': "\\n", + '9': "\\t", + '8': "\\b", + '7': "\\u0007", + '6': "\\u0006", + '5': "\\u0005", + '4': "\\u0004", + '3': "\\u0003", + '2': "\\u0002", + '1': "\\u0001", + '0': "\\u0000" +}; + +function stringEscapeObj(str) { + var i = 0; + var max = str.length; + var buffer = ''; + var code = 0; + for (; i < max; i++) { + code = str.charCodeAt(i); + + if (code <= 31) buffer += escape31[code]; + else if (code === 34) buffer += '\\"'; + else if (code === 92) buffer += '\\\\'; + else buffer += str[i]; + } + return buffer; +} + +suite("escape-long", function() { + + var minSamples = 120; + + benchmark("reg", function() { + assert.equal('"'+stringTest.replace(strReg, strReplace)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("fn if", function() { + assert.equal('"'+strEscapeIf(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("fn if reverse", function() { + assert.equal('"'+strEscapeIfReverse(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("escape31", function() { + assert.equal('"'+stringEscapeObj(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("native", function() { + assert.equal(JSON.stringify(stringTest), stringResult); + }, { minSamples: minSamples }) +}); \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/escape-short.js b/node_modules/fast-stable-stringify/test/escape-short.js new file mode 100644 index 00000000..1720719e --- /dev/null +++ b/node_modules/fast-stable-stringify/test/escape-short.js @@ -0,0 +1,147 @@ +var assert = require('assert'); +var stringTest = "Aa1 Bb2 Cc3 \u0000\u001F\u0020\uFFFF☃\"\\\/\f\n\r\t\b"; +var stringResult = JSON.stringify(stringTest); + +var strReg = /[\u0000-\u001f"\\]/g; + +function strReplace(str) { + var code = str.charCodeAt(0); + switch (code) { + case 34: return '\\"'; + case 92: return '\\\\'; + case 12: return "\\f"; + case 10: return "\\n"; + case 13: return "\\r"; + case 9: return "\\t"; + case 8: return "\\b"; + default: + if (code > 15) { + return "\\u00" + code.toString(16); + } else { + return "\\u000" + code.toString(16); + } + } +} + +function strEscapeIf(str){ + var length = str.length; + var buffer = ''; + var code = 0; + var i = 0; + + for (; i < length; i++) { + code = str.charCodeAt(i); + + if (code === 34) buffer += '\\"'; + else if (code === 92) buffer += '\\\\'; + else if (code > 31) buffer += str[i]; + else if (code > 15) buffer += "\\u00" + code.toString(16); + else if (code === 12) buffer += "\\f"; + else if (code === 10) buffer += "\\n"; + else if (code === 13) buffer += "\\r"; + else if (code === 9) buffer += "\\t"; + else if (code === 8) buffer += "\\b"; + else buffer += "\\u000" + code.toString(16); + } + + return buffer; +} + +function strEscapeIfReverse(str){ + var buffer = ''; + var code = 0; + var i = str.length - 1; + + for (; i >= 0; i--) { + code = str.charCodeAt(i); + + if (code === 34) buffer = '\\"' + buffer; + else if (code === 92) buffer = '\\\\' + buffer; + else if (code > 31) buffer = str[i] + buffer; + else if (code > 15) buffer = "\\u00" + code.toString(16) + buffer; + else if (code === 12) buffer = "\\f" + buffer; + else if (code === 10) buffer = "\\n" + buffer; + else if (code === 13) buffer = "\\r" + buffer; + else if (code === 9) buffer = "\\t" + buffer; + else if (code === 8) buffer = "\\b" + buffer; + else buffer = "\\u000" + code.toString(16) + buffer; + } + + return buffer; +} + +var escape31 = { + '31': "\\u001f", + '30': "\\u001e", + '29': "\\u001d", + '28': "\\u001c", + '27': "\\u001b", + '26': "\\u001a", + '25': "\\u0019", + '24': "\\u0018", + '23': "\\u0017", + '22': "\\u0016", + '21': "\\u0015", + '20': "\\u0014", + '19': "\\u0013", + '18': "\\u0012", + '17': "\\u0011", + '16': "\\u0010", + '15': "\\u000f", + '14': "\\u000e", + '13': "\\r", + '12': "\\f", + '11': "\\u000b", + '10': "\\n", + '9': "\\t", + '8': "\\b", + '7': "\\u0007", + '6': "\\u0006", + '5': "\\u0005", + '4': "\\u0004", + '3': "\\u0003", + '2': "\\u0002", + '1': "\\u0001", + '0': "\\u0000" +}; + +function stringEscapeObj(str) { + var i = 0; + var max = str.length; + var buffer = ''; + var code = 0; + for (; i < max; i++) { + code = str.charCodeAt(i); + + if (code <= 31) buffer += escape31[code]; + else if (code === 34) buffer += '\\"'; + else if (code === 92) buffer += '\\\\'; + else buffer += str[i]; + } + return buffer; +} + +suite("escape-short", function() { + + var minSamples = 120; + + benchmark("reg", function() { + assert.equal('"'+stringTest.replace(strReg, strReplace)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("fn if", function() { + assert.equal('"'+strEscapeIf(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("fn if reverse", function() { + assert.equal('"'+strEscapeIfReverse(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("escape31", function() { + assert.equal('"'+stringEscapeObj(stringTest)+'"', stringResult); + }, { minSamples: minSamples }); + + benchmark("native", function() { + assert.equal(JSON.stringify(stringTest), stringResult); + }, { minSamples: minSamples }) +}); \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/index.js b/node_modules/fast-stable-stringify/test/index.js new file mode 100644 index 00000000..7e04ba50 --- /dev/null +++ b/node_modules/fast-stable-stringify/test/index.js @@ -0,0 +1,6 @@ +require('./libs'); +//require('./escape-short'); +//require('./escape-long'); +//require('./itar-short'); +//require('./itar-long'); +//require('./iter'); diff --git a/node_modules/fast-stable-stringify/test/itar-long.js b/node_modules/fast-stable-stringify/test/itar-long.js new file mode 100644 index 00000000..146bec07 --- /dev/null +++ b/node_modules/fast-stable-stringify/test/itar-long.js @@ -0,0 +1,52 @@ +var assert = require('assert'); +var arrTest = []; +var arrExpected; + +for (var i = 0; i < 100; i++) { arrTest[i] = i; } +arrExpected = JSON.stringify(arrTest); + +var arrReuse = []; + +suite('itar-long', function() { + + var minSamples = 160; + + benchmark("for + if", function() { + var val = arrTest.slice(); + var str = '['; + var max = val.length - 1; + var i; + for (i = 0; i < max; i++) { + str += JSON.stringify(val[i]) + ','; + } + if (max > -1) { + str += JSON.stringify(val[i]); + } + assert.equal(str + ']', arrExpected); + }, { minSamples: minSamples }); + + benchmark("while + if", function() { + var val = arrTest.slice(); + var str = '['; + var max = val.length - 1; + var i = 0; + while (i < max) { + str += JSON.stringify(val[i++]) + ','; + } + if (max > -1) { + str += JSON.stringify(val[i]); + } + assert.equal(str + ']', arrExpected); + }, { minSamples: minSamples }); + + benchmark("array join", function() { + arrReuse.length = 0; + var val = arrTest.slice(); + var max = val.length; + var i; + for (i = 0; i < max; i++) { + arrReuse[i] = JSON.stringify(val[i]); + } + assert.equal('[' + arrReuse.join(',') + ']', arrExpected); + }, { minSamples: minSamples }); +}); \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/itar-short.js b/node_modules/fast-stable-stringify/test/itar-short.js new file mode 100644 index 00000000..a80bbbe5 --- /dev/null +++ b/node_modules/fast-stable-stringify/test/itar-short.js @@ -0,0 +1,52 @@ +var assert = require('assert'); +var arrTest = []; +var arrExpected; + +for (var i = 0; i < 10; i++) { arrTest[i] = i; } +arrExpected = JSON.stringify(arrTest); + +var arrReuse = []; + +suite('itar-short', function() { + + var minSamples = 160; + + benchmark("for + if", function() { + var val = arrTest.slice(); + var str = '['; + var max = val.length - 1; + var i; + for (i = 0; i < max; i++) { + str += JSON.stringify(val[i]) + ','; + } + if (max > -1) { + str += JSON.stringify(val[i]); + } + assert.equal(str + ']', arrExpected); + }, { minSamples: minSamples }); + + benchmark("while + if", function() { + var val = arrTest.slice(); + var str = '['; + var max = val.length - 1; + var i = 0; + while (i < max) { + str += JSON.stringify(val[i++]) + ','; + } + if (max > -1) { + str += JSON.stringify(val[i]); + } + assert.equal(str + ']', arrExpected); + }, { minSamples: minSamples }); + + benchmark("array join", function() { + arrReuse.length = 0; + var val = arrTest.slice(); + var max = val.length; + var i; + for (i = 0; i < max; i++) { + arrReuse[i] = JSON.stringify(val[i]); + } + assert.equal('[' + arrReuse.join(',') + ']', arrExpected); + }, { minSamples: minSamples }); +}); \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/iter.js b/node_modules/fast-stable-stringify/test/iter.js new file mode 100644 index 00000000..68122daa --- /dev/null +++ b/node_modules/fast-stable-stringify/test/iter.js @@ -0,0 +1,84 @@ +var assert = require('assert'); +var stringify = require('json-stable-stringify'); + +var objectTest = {}; +for (var i = 35; i < 91; i++) { + objectTest[String.fromCharCode(i)] = i; +} +var objectExpected = stringify(objectTest); + +var names = []; +var values = []; + +var objKeys = Object.keys || function(obj) { + var keys = []; + for (var name in obj) { + if (obj[name] !== undefined) { + keys.push(name); + } + } + return keys; + }; + +suite('iter', function() { + + var minSamples = 120; + + benchmark('keys-while', function() { + // only object is left + var val = objectTest; + var key; + var keys = objKeys(val).sort(); + var max = keys.length; + var str = ""; + var i = 0; + while (i < max) { + key = keys[i++]; + if (val[key] !== undefined) { + if (str) { + str += ','; + } + str += '"' + key + '":' + val[key]; + } + } + assert.equal('{' + str + '}', objectExpected); + }, { minSamples: minSamples }); + + benchmark('keys-for', function() { + // only object is left + var val = objectTest; + var key; + var keys = objKeys(val).sort(); + var max = keys.length; + var str = ""; + var i = 0; + for (; i < max; i++) { + key = keys[i]; + if (val[key] !== undefined) { + if (str) { + str += ','; + } + str += '"' + key + '":' + val[key]; + } + } + assert.equal('{' + str + '}', objectExpected); + }, { minSamples: minSamples }); + + benchmark('incr-for', function() { + names.length = 0; + values.length = 0; + var val = objectTest; + var name; + var i; + var max = -1; + for (name in val) { + i = max; + while (names[i] > name) i--; + names.splice(i + 1, 0, name); + values.splice(i + 1, 0, '"' + name + '":' + JSON.stringify(val[name])); + max++; + } + assert.equal('{' + values.join(',') + '}', objectExpected); + }, { minSamples: minSamples }); + +}); \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/test/libs.js b/node_modules/fast-stable-stringify/test/libs.js new file mode 100644 index 00000000..8638e67f --- /dev/null +++ b/node_modules/fast-stable-stringify/test/libs.js @@ -0,0 +1,57 @@ +var assert = require("assert"); +var indexStringify = require('../index'); +var jsonStableStringify = require('json-stable-stringify'); +var fasterStableStringify = require('faster-stable-stringify'); + +var validateLibOutput = require('./validate'); + +var data = require("../fixtures/index").input; +var dataLength = JSON.stringify(data).length; + +suite("libs", function() { + + var minSamples = 120; + + // This needs to be true before anything else + console.log('Checking index validity...'); + validateLibOutput(indexStringify); + console.log('Checking index validity success'); + + benchmark('native', function () { + var result = JSON.stringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); + + benchmark('index', function () { + var result = indexStringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); + + benchmark('json-stable-stringify', function () { + var result = jsonStableStringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); + + benchmark('faster-stable-stringify', function () { + var result = fasterStableStringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); +}, { + onComplete: function() { + var namesFastest = this + .filter(function(bench) { + return bench.name !== 'native'; + }) + .filter('fastest') + .map('name'); + assert.notEqual(namesFastest.indexOf('index'), -1, "index should be among the fastest"); + } +}); diff --git a/node_modules/fast-stable-stringify/test/travis.js b/node_modules/fast-stable-stringify/test/travis.js new file mode 100644 index 00000000..615a192b --- /dev/null +++ b/node_modules/fast-stable-stringify/test/travis.js @@ -0,0 +1,43 @@ +var assert = require("assert"); +var indexStringify = require('../index'); +var jsonStableStringify = require('json-stable-stringify'); + +var validateLibOutput = require('./validate'); + +var data = require("../fixtures/index").input; +var dataLength = JSON.stringify(data).length; + +suite("libs", function() { + + var minSamples = 120; + + // This needs to be true before anything else + console.log('Checking index validity...'); + validateLibOutput(indexStringify); + console.log('Checking index validity success'); + + benchmark('index', function () { + var result = indexStringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); + + benchmark('json-stable-stringify', function () { + var result = jsonStableStringify(data); + assert.equal(result.length, dataLength); + }, { + minSamples: minSamples + }); + +}, { + onComplete: function() { + var namesFastest = this + .filter(function(bench) { + return bench.name !== 'native'; + }) + .filter('fastest') + .map('name'); + assert.notEqual(namesFastest.indexOf('index'), -1, "index should be among the fastest"); + } +}); diff --git a/node_modules/fast-stable-stringify/test/validate.js b/node_modules/fast-stable-stringify/test/validate.js new file mode 100644 index 00000000..8049062c --- /dev/null +++ b/node_modules/fast-stable-stringify/test/validate.js @@ -0,0 +1,24 @@ +var assert = require('assert'); +var eachRecursive = require('../util/eachRecursive'); +var jsonStableStringify = require('json-stable-stringify'); +var input = require('../fixtures').input; + +/** + * Assumes json-stable-stringify is always right. + * @param {function(*):string} stringify + */ +module.exports = function validateLibOutput(stringify) { + var numComparisons = 0; + eachRecursive(input, function (val, path) { + var mine = stringify(val); + var expectedVal = jsonStableStringify(val); + if (mine !== expectedVal) { + console.log('expected', expectedVal); + console.log('actual', mine); + global.value = val; + } + assert.equal(mine, expectedVal); + numComparisons++; + }); + assert.equal(numComparisons, 569); +}; diff --git a/node_modules/fast-stable-stringify/util/eachRecursive.js b/node_modules/fast-stable-stringify/util/eachRecursive.js new file mode 100644 index 00000000..a24eadc9 --- /dev/null +++ b/node_modules/fast-stable-stringify/util/eachRecursive.js @@ -0,0 +1,9 @@ +module.exports = function eachRecursive(obj, fn, path) { + path = path ? path + '.' : ''; + for (var name in obj) { + if (typeof obj === "object" && obj !== null) { + eachRecursive(obj[name], fn, path + name); + } + fn(obj[name], path + name); + } +}; \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/util/get-git-hash-sync.js b/node_modules/fast-stable-stringify/util/get-git-hash-sync.js new file mode 100644 index 00000000..2fc7c7cc --- /dev/null +++ b/node_modules/fast-stable-stringify/util/get-git-hash-sync.js @@ -0,0 +1,21 @@ +var cp = require('child_process'); + +/** + * Returns the version string of the current working directory. + * It is the git short hash of the last commit that changed filePath + * If there are uncommitted changes to this filePath, this method will throw. + * @returns {string} + */ +module.exports = function getGitHashSync(filePath) { + var commandResult; + try { + cp.execSync('git diff-index --quiet HEAD -- ' + filePath, { encoding: 'utf-8' }); + } catch (err) { + //throw new Error('Cannot resolve git hash of file ' + filePath + ': There are uncommitted changes to file ' + filePath); + } + commandResult = cp.execSync('git log -n1 --pretty=format:%h -- ' + filePath, { encoding: 'utf-8' }); + if (!commandResult) { + throw new Error("Could not get hash: file " + filePath + " does not exist"); + } + return commandResult; +}; diff --git a/node_modules/fast-stable-stringify/util/get-lib-info.js b/node_modules/fast-stable-stringify/util/get-lib-info.js new file mode 100644 index 00000000..59fb9546 --- /dev/null +++ b/node_modules/fast-stable-stringify/util/get-lib-info.js @@ -0,0 +1,22 @@ +var getGitHashSync = require('./get-git-hash-sync'); +var path = require('path'); + +module.exports = function(libName) { + var pkg; + var version; + if (libName == 'index') { + pkg = require('../package.json'); + version = getGitHashSync(require.resolve('../index')); + } else if (libName == 'native') { + pkg = { name: 'JSON.stringify', url: 'n/a' }; + version = 'native'; + } else { + pkg = require(libName + '/package.json'); + version = pkg.version; + } + return { + name: pkg.name, + url: pkg.url, + version: version + } +}; diff --git a/node_modules/fast-stable-stringify/util/object-path.js b/node_modules/fast-stable-stringify/util/object-path.js new file mode 100644 index 00000000..7216aac1 --- /dev/null +++ b/node_modules/fast-stable-stringify/util/object-path.js @@ -0,0 +1,47 @@ +/** + * Returns the element within root under the path given by pathSegments. + * @param {Object} root + * @param {string[]} pathSegments + * @param {boolean} [appendIfMissing=false] - all objects are created if they do not exist + * @returns {Object} - the object under the path. If appendIsMissing is false and the path does not exist, returns null + */ +module.exports.getObject = function getObject(root, pathSegments, appendIfMissing) { + var target = root; + var pathSeg; + var i; + for (i = 0; i < pathSegments.length; i++) { + pathSeg = pathSegments[i]; + if (!target.hasOwnProperty(pathSeg)) { + if (appendIfMissing) { + target[pathSeg] = {}; + } else { + return null; + } + } + target = target[pathSeg]; + } + return target; +}; + +/** + * Writes the object to the path in root. Overwrites if an object exists. + * Note: root is edited in place! + * @param {Object} root + * @param {string[]} pathSegments + * @param {Object} obj + */ +module.exports.setObject = function setObject(root, pathSegments, obj) { + var target = root; + var pathSeg; + var i; + var max = pathSegments.length; + for (i = 0; i < max; i++) { + pathSeg = pathSegments[i]; + if (i === max - 1) { + target[pathSeg] = obj; + } else if (!target.hasOwnProperty(pathSeg)) { + target[pathSeg] = {}; + } + target = target[pathSeg]; + } +}; \ No newline at end of file diff --git a/node_modules/fast-stable-stringify/v8-profile/bench.js b/node_modules/fast-stable-stringify/v8-profile/bench.js new file mode 100644 index 00000000..424395fa --- /dev/null +++ b/node_modules/fast-stable-stringify/v8-profile/bench.js @@ -0,0 +1,8 @@ +var myStringify = require('../index'); +var data = require("../fixtures/index").input; +var result = 0; + +for (var i = 0; i < 1000; i++) { + result += myStringify(data).length; +} +console.log('Finished running (cumulative string length: ' + result + ")"); diff --git a/node_modules/fast-stable-stringify/v8-profile/run.sh b/node_modules/fast-stable-stringify/v8-profile/run.sh new file mode 100755 index 00000000..5b27a1ca --- /dev/null +++ b/node_modules/fast-stable-stringify/v8-profile/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +time node --allow-natives-syntax --trace_opt --trace_deopt --code_comments --print_code bench.js | less diff --git a/node_modules/fast-stable-stringify/zuul-local.sh b/node_modules/fast-stable-stringify/zuul-local.sh new file mode 100755 index 00000000..b307fd44 --- /dev/null +++ b/node_modules/fast-stable-stringify/zuul-local.sh @@ -0,0 +1,2 @@ +#zuul --local 8080 --no-coverage -- test/index.js +zuul --local 8080 --no-coverage -- test/fastest.js diff --git a/node_modules/figures/index.js b/node_modules/figures/index.js index 857636d5..18ff3198 100644 --- a/node_modules/figures/index.js +++ b/node_modules/figures/index.js @@ -216,7 +216,7 @@ export const mainSymbols = { tick: '✔', info: 'ℹ', warning: '⚠', - cross: '✖', + cross: '✘', squareSmall: '◻', squareSmallFilled: '◼', circle: '◯', diff --git a/node_modules/figures/package.json b/node_modules/figures/package.json index 012a958a..0f9adf2d 100644 --- a/node_modules/figures/package.json +++ b/node_modules/figures/package.json @@ -1,6 +1,6 @@ { "name": "figures", - "version": "4.0.1", + "version": "5.0.0", "description": "Unicode symbols with fallbacks for older terminals", "license": "MIT", "repository": "sindresorhus/figures", @@ -13,7 +13,7 @@ "type": "module", "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=14" }, "scripts": { "test": "xo && ava && tsd" @@ -39,9 +39,8 @@ "is-unicode-supported": "^1.2.0" }, "devDependencies": { - "ava": "^4.1.0", - "tsd": "^0.19.1", - "typescript": "^4.6.3", - "xo": "^0.48.0" + "ava": "^4.3.1", + "tsd": "^0.22.0", + "xo": "^0.51.0" } } diff --git a/node_modules/figures/readme.md b/node_modules/figures/readme.md index 7e483ed8..bd06267a 100644 --- a/node_modules/figures/readme.md +++ b/node_modules/figures/readme.md @@ -10,8 +10,8 @@ Terminals such as Windows Console Host (and CMD) only support a [limited charact ## Install -``` -$ npm install figures +```sh +npm install figures ``` ## Usage @@ -62,7 +62,6 @@ Type: `string` String where the Unicode symbols will be replaced with fallback symbols depending on the terminal. - ## Figures `Fallback` characters are only shown when they differ from the `Main` ones. @@ -72,7 +71,7 @@ String where the Unicode symbols will be replaced with fallback symbols dependin | tick | `✔` | `√` | | info | `ℹ` | `i` | | warning | `⚠` | `‼` | -| cross | `✖` | `×` | +| cross | `✘` | `×` | | square | `█` | | | squareSmall | `◻` | `□` | | squareSmallFilled | `◼` | `■` | diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md index ff391722..1bb52d38 100644 --- a/node_modules/get-intrinsic/CHANGELOG.md +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + ## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 ### Fixed diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js index 81ad8fca..3c3d93eb 100644 --- a/node_modules/get-intrinsic/index.js +++ b/node_modules/get-intrinsic/index.js @@ -258,7 +258,7 @@ module.exports = function GetIntrinsic(name, allowMissing) { throw new $TypeError('"allowMissing" argument must be a boolean'); } - if ($exec(/^%?[^%]*%?$/g, name) === null) { + if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); } var parts = stringToPath(name); diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json index e8dc0377..dfde0329 100644 --- a/node_modules/get-intrinsic/package.json +++ b/node_modules/get-intrinsic/package.json @@ -1,6 +1,6 @@ { "name": "get-intrinsic", - "version": "1.1.2", + "version": "1.1.3", "description": "Get and robustly cache all JS language-level intrinsics at first require time", "main": "index.js", "exports": { @@ -52,8 +52,8 @@ "aud": "^2.0.0", "auto-changelog": "^2.4.0", "call-bind": "^1.0.2", - "es-abstract": "^1.20.1", - "es-value-fixtures": "^1.4.1", + "es-abstract": "^1.20.2", + "es-value-fixtures": "^1.4.2", "eslint": "=8.8.0", "evalmd": "^0.0.19", "for-each": "^0.3.3", @@ -65,7 +65,7 @@ "nyc": "^10.3.2", "object-inspect": "^1.12.2", "safe-publish-latest": "^2.0.0", - "tape": "^5.5.3" + "tape": "^5.6.0" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -80,6 +80,9 @@ "has": "^1.0.3", "has-symbols": "^1.0.3" }, + "testling": { + "files": "test/GetIntrinsic.js" + }, "publishConfig": { "ignore": [ ".github/workflows" diff --git a/node_modules/inquirer/README.md b/node_modules/inquirer/README.md index 9002c776..8f8a3712 100644 --- a/node_modules/inquirer/README.md +++ b/node_modules/inquirer/README.md @@ -151,6 +151,7 @@ A question object is a `hash` containing question related values: - **suffix**: (String) Change the default _suffix_ message. - **askAnswered**: (Boolean) Force to prompt the question if the answer already exists. - **loop**: (Boolean) Enable list looping. Defaults: `true` +- **waitUserInput**: (Boolean) Flag to enable/disable wait for user input before opening system editor - Defaults: `true` `default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronously. Either return a promise or use `this.async()` to get a callback you'll call with the final value. @@ -300,7 +301,7 @@ Note that `mask` is required to hide the actual user input. #### Editor - `{type: 'editor'}` -Take `type`, `name`, `message`[, `default`, `filter`, `validate`, `postfix`] properties +Take `type`, `name`, `message`[, `default`, `filter`, `validate`, `postfix`, `waitUserInput`] properties Launches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the contents of the temporary file are read in as the result. The editor to use is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used. diff --git a/node_modules/inquirer/lib/prompts/editor.js b/node_modules/inquirer/lib/prompts/editor.js index 84030d9f..c370ecde 100644 --- a/node_modules/inquirer/lib/prompts/editor.js +++ b/node_modules/inquirer/lib/prompts/editor.js @@ -23,6 +23,12 @@ export default class EditorPrompt extends Base { // Open Editor on "line" (Enter Key) const events = observe(this.rl); this.lineSubscription = events.line.subscribe(this.startExternalEditor.bind(this)); + const waitUserInput = + this.opt.waitUserInput === undefined ? true : this.opt.waitUserInput; + + if (!waitUserInput) { + this.startExternalEditor(); + } // Trigger Validation when editor closes const validation = this.handleSubmitEvents(this.editorResult); diff --git a/node_modules/inquirer/package.json b/node_modules/inquirer/package.json index 05138a2d..a4615e8c 100644 --- a/node_modules/inquirer/package.json +++ b/node_modules/inquirer/package.json @@ -1,7 +1,7 @@ { "name": "inquirer", "type": "module", - "version": "9.0.2", + "version": "9.1.1", "description": "A collection of common interactive command line user interfaces.", "author": "Simon Boudrias ", "files": [ @@ -44,7 +44,7 @@ "cli-cursor": "^4.0.0", "cli-width": "^4.0.0", "external-editor": "^3.0.3", - "figures": "^4.0.1", + "figures": "^5.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", "ora": "^6.1.2", @@ -55,5 +55,5 @@ "through": "^2.3.6", "wrap-ansi": "^8.0.1" }, - "gitHead": "945e20a09bc305573ca82eb204008e2e38f041cd" + "gitHead": "6e0a7e28b5ac9fc526cf787e0b6c53cb44bd7ae3" } diff --git a/node_modules/ioredis/README.md b/node_modules/ioredis/README.md index 8263e6e1..a44b5095 100644 --- a/node_modules/ioredis/README.md +++ b/node_modules/ioredis/README.md @@ -116,7 +116,9 @@ npm install --save-dev @types/node ```javascript // Import ioredis. // You can also use `import Redis from "ioredis"` -// if your project is an ESM module or a TypeScript project. +// if your project is a TypeScript project, +// or `import { default as Redis } from "ioredis"` +// if it is an ESM module. const Redis = require("ioredis"); // Create a Redis instance. @@ -894,6 +896,9 @@ const redis = new Redis("rediss://redis.my-service.com"); ### TLS Profiles +> **Warning** +> TLS profiles described in this section are going to be deprecated in the next major version. Please provide TLS options explicitly. + To make it easier to configure we provide a few pre-configured TLS profiles that can be specified by setting the `tls` option to the profile's name or specifying a `tls.profile` option in case you need to customize some values of the profile. Profiles: diff --git a/node_modules/ioredis/built/constants/TLSProfiles.d.ts b/node_modules/ioredis/built/constants/TLSProfiles.d.ts index af97e14f..7547966d 100644 --- a/node_modules/ioredis/built/constants/TLSProfiles.d.ts +++ b/node_modules/ioredis/built/constants/TLSProfiles.d.ts @@ -1,15 +1,9 @@ declare const TLSProfiles: { - /** - * TLS settings for Redis.com Cloud Fixed plan. Updated on 2021-10-06. - */ readonly RedisCloudFixed: { - readonly ca: string; + readonly ca: "-----BEGIN CERTIFICATE-----\nMIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP\nJnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz\nrmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E\nQwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2\nBDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfhyCzRWMQ7Hn71u1eolRxwVxgi3\nTMn+/vTaFSqxKjgck6zuAYjBRPaHe7qLxHNr1So/Mc9nPy+3wHebFwbIcnUojwbp\n4nctkWbjb2cCAwEAAaNQME4wHQYDVR0OBBYEFP1whtcrydmW3ZJeuSoKZIKjze3w\nMB8GA1UdIwQYMBaAFP1whtcrydmW3ZJeuSoKZIKjze3wMAwGA1UdEwQFMAMBAf8w\nDQYJKoZIhvcNAQEFBQADggEBAG2erXhwRAa7+ZOBs0B6X57Hwyd1R4kfmXcs0rta\nlbPpvgULSiB+TCbf3EbhJnHGyvdCY1tvlffLjdA7HJ0PCOn+YYLBA0pTU/dyvrN6\nSu8NuS5yubnt9mb13nDGY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4\nMTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG\nA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8\nRgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT\ngHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm\nKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd\nQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ\nXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw\nDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o\nLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU\nRUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp\njjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK\n6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX\nmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs\nMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH\nWD9f\n-----END CERTIFICATE-----"; }; - /** - * TLS settings for Redis.com Cloud Flexible plan. Updated on 2021-10-06. - */ readonly RedisCloudFlexible: { -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ETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8\nRgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT\ngHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm\nKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd\nQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ\nXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw\nDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o\nLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU\nRUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp\njjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK\n6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX\nmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs\nMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH\nWD9f\n-----END CERTIFICATE-----"; }; }; export default TLSProfiles; diff --git a/node_modules/ioredis/built/constants/TLSProfiles.js b/node_modules/ioredis/built/constants/TLSProfiles.js index b7c6a0d0..f90760d5 100644 --- a/node_modules/ioredis/built/constants/TLSProfiles.js +++ b/node_modules/ioredis/built/constants/TLSProfiles.js @@ -1,104 +1,149 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +/** + * TLS settings for Redis Cloud. Updated on 2022-08-19. + */ +const RedisCloudCA = `-----BEGIN CERTIFICATE----- +MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP +JnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz +rmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E +QwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2 +BDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfhyCzRWMQ7Hn71u1eolRxwVxgi3 +TMn+/vTaFSqxKjgck6zuAYjBRPaHe7qLxHNr1So/Mc9nPy+3wHebFwbIcnUojwbp +4nctkWbjb2cCAwEAAaNQME4wHQYDVR0OBBYEFP1whtcrydmW3ZJeuSoKZIKjze3w +MB8GA1UdIwQYMBaAFP1whtcrydmW3ZJeuSoKZIKjze3wMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQEFBQADggEBAG2erXhwRAa7+ZOBs0B6X57Hwyd1R4kfmXcs0rta +lbPpvgULSiB+TCbf3EbhJnHGyvdCY1tvlffLjdA7HJ0PCOn+YYLBA0pTU/dyvrN6 +Su8NuS5yubnt9mb13nDGYo1rnt0YRfxN+8DM3fXIVr038A30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YmFsU2lnbjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 +RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT +gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm +KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd +QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ +XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw +DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o +LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU +RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp +jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK +6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE-----`; const TLSProfiles = { - /** - * TLS settings for Redis.com Cloud Fixed plan. Updated on 2021-10-06. - */ - RedisCloudFixed: { - ca: "-----BEGIN CERTIFICATE-----\n" + - "MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV\n" + - "BAoMDUdhcmFudGlhIER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32JjOfu6vEgoEAwfPP+3oGp\n" + - "Z4m3ewACcWOAenqflb+cQYC4PsF7qbXDmRaWrbKntOlZ3n0=\n" + - "-----END CERTIFICATE-----\n", - }, - /** - * TLS settings for Redis.com Cloud Flexible plan. Updated on 2021-10-06. - */ - RedisCloudFlexible: { - ca: "-----BEGIN CERTIFICATE-----\n" + - "MIIGMTCCBBmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwajELMAkGA1UEBhMCVVMx\n" + - "CzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJzMS0w\n" + - "KwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN\n" + - "MTgwMjI1MTUzNzM3WhcNMjgwMjIzMTUzNzM3WjBfMQswCQYDVQQGEwJVUzELMAkG\n" + - "A1UECAwCQ0ExEjAQBgNVBAoMCVJlZGlzTGFiczEvMC0GA1UEAwwmUkNQIEludGVy\n" + - "bWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA\n" + - "A4ICDwAwggIKAoICAQDf9dqbxc8Bq7Ctq9rWcxrGNKKHivqLAFpPq02yLPx6fsOv\n" + - "Tq7GsDChAYBBc4v7Y2Ap9RD5Vs3dIhEANcnolf27QwrG9RMnnvzk8pCvp1o6zSU4\n" + - "VuOE1W66/O1/7e2rVxyrnTcP7UgK43zNIXu7+tiAqWsO92uSnuMoGPGpeaUm1jym\n" + - "hjWKtkAwDFSqvHY+XL5qDVBEjeUe+WHkYUg40cAXjusAqgm2hZt29c2wnVrxW25W\n" + - "P0meNlzHGFdA2AC5z54iRiqj57dTfBTkHoBczQxcyw6hhzxZQ4e5I5zOKjXXEhZN\n" + - "r0tA3YC14CTabKRus/JmZieyZzRgEy2oti64tmLYTqSlAD78pRL40VNoaSYetXLw\n" + - "hhNsXCHgWaY6d5bLOc/aIQMAV5oLvZQKvu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duDDJBLZi+MjheUDaZ1\n" + - "jQRHYevI2tlqeSBqdPKG4zBY5lS0GiAlmuze5oENt0P3XboHoZPHiqcK3VECgTVh\n" + - "/BkJcuudETSJcZDmQ8YfoKfBzRQNg2sv/hwvUv73Ss51Sco8GEt2lD8uEdib1Q6z\n" + - "zDT5lXJowSzOD5ZA9OGDjnSRL+2riNtKWKEqvtEG3VBJoBzu9GoxbAc7wIZLxmli\n" + - "iF5a/Zf5X+UXD3s4TMmy6C4QZJpAA2egsSQCnraWO2ULhh7iXMysSkF/nzVfZn43\n" + - "iqpaB8++9a37hWq14ZmOv0TJIDz//b2+KC4VFXWQ5W5QC6whsjT+OlG4p5ZYG0jo\n" + - "616pxqo=\n" + - "-----END CERTIFICATE-----\n" + - "-----BEGIN CERTIFICATE-----\n" + - "MIIFujCCA6KgAwIBAgIJAJ1aTT1lu2ScMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV\n" + - "BAYTAlVTMQswCQYDVQQIDAJDQTELMAkGA1UEBwwCQ0ExEjAQBgNVBAoMCVJlZGlz\n" + - "TGFiczEtMCsGA1UEAwwkUmVkaXNMYWJzIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9y\n" + - "aXR5MB4XDTE4MDIyNTE1MjA0MloXDTM4MDIyMDE1MjA0MlowajELMAkGA1UEBhMC\n" + - "VVMxCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJz\n" + - "MS0wKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw\n" + - "ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDLEjXy7YrbN5Waau5cd6g1\n" + - "G5C2tMmeTpZ0duFAPxNU4oE3RHS5gGiok346fUXuUxbZ6QkuzeN2/2Z+RmRcJhQY\n" + - "Dm0ZgdG4x59An1TJfnzKKoWj8ISmoHS/TGNBdFzXV7FYNLBuqZouqePI6ReC6Qh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DUFNFdeW0js7fHdsvCR7O3tJy5zIgEV/o/BCkmJVtuwPYOrw/yOlKj\n" + - "TY/U7ATAx9VFF6/vYEOMYSmrZlFX+98L6nJtwDqfLB5VTltqZ4H/KBxGE3IRSt9l\n" + - "FXy40U+LnXzhhW+7VBAvyYX8GEXhHkKU8Gqk1xitrqfBXY74xKgyUSTolFSfFVgj\n" + - "mcM/X4K45bka+qpkj7Kfv/8D4j6aZekwhN2ly6hhC1SmQ8qjMjpG/mrWOSSHZFmf\n" + - "ybu9iD2AYHeIOkshIl6xYIa++Q/00/vs46IzAbQyriOi0XxlSMMVtPx0Q3isp+ji\n" + - "n8Mq9eOuxYOEQ4of8twUkUDd528iwGtEdwf0Q01UyT84S62N8AySl1ZBKXJz6W4F\n" + - "UhWfa/HQYOAPDdEjNgnVwLI23b8t0TozyCWw7q8h\n" + - "-----END CERTIFICATE-----\n", - }, + RedisCloudFixed: { ca: RedisCloudCA }, + RedisCloudFlexible: { ca: RedisCloudCA }, }; exports.default = TLSProfiles; diff --git a/node_modules/ioredis/built/utils/RedisCommander.d.ts b/node_modules/ioredis/built/utils/RedisCommander.d.ts index bca0faf9..dc7d757f 100644 --- a/node_modules/ioredis/built/utils/RedisCommander.d.ts +++ b/node_modules/ioredis/built/utils/RedisCommander.d.ts @@ -7876,8 +7876,8 @@ interface RedisCommander): Result; - zscoreBuffer(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; + zscore(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; + zscoreBuffer(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; /** * Add multiple sorted sets * - _group_: sorted-set diff --git a/node_modules/ioredis/package.json b/node_modules/ioredis/package.json index defef4d9..68b9cce3 100644 --- a/node_modules/ioredis/package.json +++ b/node_modules/ioredis/package.json @@ -1,6 +1,6 @@ { "name": "ioredis", - "version": "5.2.2", + "version": "5.2.3", "description": "A robust, performance-focused and full-featured Redis client for Node.js.", "main": "./built/index.js", "types": "./built/index.d.ts", diff --git a/node_modules/is-callable/.editorconfig b/node_modules/is-callable/.editorconfig index 87f2333d..f5f56790 100644 --- a/node_modules/is-callable/.editorconfig +++ b/node_modules/is-callable/.editorconfig @@ -14,6 +14,11 @@ indent_style = space indent_size = 2 max_line_length = off +[README.md] +indent_style = off +indent_size = off +max_line_length = off + [*.json] max_line_length = off diff --git a/node_modules/is-callable/.eslintignore b/node_modules/is-callable/.eslintignore deleted file mode 100644 index 404abb22..00000000 --- a/node_modules/is-callable/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/is-callable/.eslintrc b/node_modules/is-callable/.eslintrc index 631b8f36..ce033bfe 100644 --- a/node_modules/is-callable/.eslintrc +++ b/node_modules/is-callable/.eslintrc @@ -5,17 +5,6 @@ "rules": { "id-length": 0, - "max-statements": [2, 14], "max-statements-per-line": [2, { "max": 2 }], - "operator-linebreak": [2, "before"], }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "no-throw-literal": 0, - }, - }, - ], } diff --git a/node_modules/is-callable/.istanbul.yml b/node_modules/is-callable/.istanbul.yml deleted file mode 100644 index 9affe0bc..00000000 --- a/node_modules/is-callable/.istanbul.yml +++ /dev/null @@ -1,47 +0,0 @@ -verbose: false -instrumentation: - root: . - extensions: - - .js - - .jsx - default-excludes: true - excludes: [] - variable: __coverage__ - compact: true - preserve-comments: false - complete-copy: false - save-baseline: false - baseline-file: ./coverage/coverage-baseline.raw.json - include-all-sources: false - include-pid: false - es-modules: false - auto-wrap: false -reporting: - print: summary - reports: - - html - dir: ./coverage - summarizer: pkg - report-config: {} - watermarks: - statements: [50, 80] - functions: [50, 80] - branches: [50, 80] - lines: [50, 80] -hooks: - hook-run-in-context: false - post-require-hook: null - handle-sigint: false -check: - global: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] - each: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] diff --git a/node_modules/is-callable/CHANGELOG.md b/node_modules/is-callable/CHANGELOG.md index 0427308e..0875ebbd 100644 --- a/node_modules/is-callable/CHANGELOG.md +++ b/node_modules/is-callable/CHANGELOG.md @@ -1,3 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.6](https://github.com/inspect-js/is-callable/compare/v1.2.5...v1.2.6) - 2022-09-14 + +### Commits + +- [Fix] work for `document.all` in Firefox 3 and IE 6-8 [`015132a`](https://github.com/inspect-js/is-callable/commit/015132aaef886ec777b5b3593ef4ce461dd0c7d4) +- [Test] skip function toString check for nullish values [`8698116`](https://github.com/inspect-js/is-callable/commit/8698116f95eb59df8b48ec8e4585fc1cdd8cae9f) +- [readme] add "supported engines" section [`0442207`](https://github.com/inspect-js/is-callable/commit/0442207a89a1554d41ba36daf21862ef7ccbd500) +- [Tests] skip one of the fixture objects in FF 3.6 [`a501141`](https://github.com/inspect-js/is-callable/commit/a5011410bc6edb276c6ec8b47ce5c5d83c4bee15) +- [Tests] allow `class` constructor tests to fail in FF v45 - v54, which has undetectable classes [`b12e4a4`](https://github.com/inspect-js/is-callable/commit/b12e4a4d8c438678bd7710f9f896680150766b51) +- [Fix] Safari 4: regexes should not be considered callable [`4b732ff`](https://github.com/inspect-js/is-callable/commit/4b732ffa34346db3f0193ea4e46b7d4e637e6c82) +- [Fix] properly recognize `document.all` in Safari 4 [`3193735`](https://github.com/inspect-js/is-callable/commit/319373525dc4603346661641840cd9a3e0613136) + +## [v1.2.5](https://github.com/inspect-js/is-callable/compare/v1.2.4...v1.2.5) - 2022-09-11 + +### Commits + +- [actions] reuse common workflows [`5bb4b32`](https://github.com/inspect-js/is-callable/commit/5bb4b32dc93987328ab4f396601f751c4a7abd62) +- [meta] better `eccheck` command [`b9bd597`](https://github.com/inspect-js/is-callable/commit/b9bd597322b6e3a24c74c09881ca73e1d9f9f485) +- [meta] use `npmignore` to autogenerate an npmignore file [`3192d38`](https://github.com/inspect-js/is-callable/commit/3192d38527c7fc461d05d5aa93d47628e658bc45) +- [Fix] for HTML constructors, always use `tryFunctionObject` even in pre-toStringTag browsers [`3076ea2`](https://github.com/inspect-js/is-callable/commit/3076ea21d1f6ecc1cb711dcf1da08f257892c72b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `available-typed-arrays`, `object-inspect`, `safe-publish-latest`, `tape` [`8986746`](https://github.com/inspect-js/is-callable/commit/89867464c42adc5cd375ee074a4574b0295442cb) +- [meta] add `auto-changelog` [`7dda9d0`](https://github.com/inspect-js/is-callable/commit/7dda9d04e670a69ae566c8fa596da4ff4371e615) +- [Fix] properly report `document.all` [`da90b2b`](https://github.com/inspect-js/is-callable/commit/da90b2b68dc4f33702c2e01ad07b4f89bcb60984) +- [actions] update codecov uploader [`c8f847c`](https://github.com/inspect-js/is-callable/commit/c8f847c90e04e54ff73c7cfae86e96e94990e324) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`899ae00`](https://github.com/inspect-js/is-callable/commit/899ae00b6abd10d81fc8bc7f02b345fd885d5f56) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-value-fixtures`, `object-inspect`, `tape` [`344e913`](https://github.com/inspect-js/is-callable/commit/344e913b149609bf741aa7345fa32dc0b90d8893) +- [meta] remove greenkeeper config [`737dce5`](https://github.com/inspect-js/is-callable/commit/737dce5590b1abb16183a63cb9d7d26920b3b394) +- [meta] npmignore coverage output [`680a883`](https://github.com/inspect-js/is-callable/commit/680a8839071bf36a419fe66e1ced7a3303c27b28) + + 1.2.4 / 2021-08-05 ================= * [Fix] use `has-tostringtag` approach to behave correctly in the presence of symbol shams diff --git a/node_modules/is-callable/README.md b/node_modules/is-callable/README.md index 8f3dcedc..48f36bf0 100644 --- a/node_modules/is-callable/README.md +++ b/node_modules/is-callable/README.md @@ -11,6 +11,19 @@ Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. +## Supported engines +Automatically tested in every minor version of node. + +Manually tested in: + - Safari: v4 - v15 (4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1) + - Note: Safari 9 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Chrome: v15 - v81, v83 - v106(every integer version) + - Note: This includes Edge v80+ and Opera v15+, which matches Chrome + - Firefox: v3, v3.6, v4 - v105 (every integer version) + - Note: Firefox v45 - v54 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - IE: v6 - v11(every integer version + - Opera: v11.1, v11.5, v11.6, 12?, v12.1, v12.12?, v12.14, v12.15, v12.16, v15+ v15+ matches Chrome + ## Example ```js diff --git a/node_modules/is-callable/index.js b/node_modules/is-callable/index.js index 86c9771c..7baaba40 100644 --- a/node_modules/is-callable/index.js +++ b/node_modules/is-callable/index.js @@ -43,15 +43,37 @@ var tryFunctionObject = function tryFunctionToStr(value) { } }; var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; var fnClass = '[object Function]'; var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` -/* globals document: false */ -var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {}; + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalized DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + // IE 6-8 uses `objectClass` + return (str === ddaClass || str === objectClass) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} module.exports = reflectApply ? function isCallable(value) { - if (value === documentDotAll) { return true; } + if (isDDA(value)) { return true; } if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (typeof value === 'function' && !value.prototype) { return true; } @@ -63,12 +85,11 @@ module.exports = reflectApply return !isES6ClassFn(value); } : function isCallable(value) { - if (value === documentDotAll) { return true; } + if (isDDA(value)) { return true; } if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; + return strClass === fnClass || strClass === genClass || tryFunctionObject(value); }; diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json index 57224472..39b967c8 100644 --- a/node_modules/is-callable/package.json +++ b/node_modules/is-callable/package.json @@ -1,6 +1,6 @@ { "name": "is-callable", - "version": "1.2.4", + "version": "1.2.6", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -20,14 +20,17 @@ "license": "MIT", "main": "index.js", "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", "prepublishOnly": "safe-publish-latest", "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run --silent lint", "test": "npm run tests-only --", "posttest": "aud --production", "tests-only": "nyc tape 'test/**/*.js'", - "prelint": "eclint check *", - "lint": "eslint ." + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs ." }, "repository": { "type": "git", @@ -46,22 +49,24 @@ "@@toStringTag" ], "devDependencies": { - "@ljharb/eslint-config": "^17.6.0", - "aud": "^1.1.5", - "available-typed-arrays": "^1.0.4", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", "eclint": "^2.8.1", - "es-value-fixtures": "^1.2.1", - "eslint": "^7.32.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", "for-each": "^0.3.3", "has-tostringtag": "^1.0.0", "make-arrow-function": "^1.2.0", "make-async-function": "^1.0.0", "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "object-inspect": "^1.11.0", + "object-inspect": "^1.12.2", "rimraf": "^2.7.1", - "safe-publish-latest": "^1.1.4", - "tape": "^5.3.0" + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" }, "testling": { "files": "test/index.js", @@ -84,9 +89,18 @@ "engines": { "node": ">= 0.4" }, - "greenkeeper": { + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "v1.2.5" + }, + "publishConfig": { "ignore": [ - "rimraf" + ".github/workflows" ] } } diff --git a/node_modules/is-callable/test/index.js b/node_modules/is-callable/test/index.js index a3c348c2..22295a17 100644 --- a/node_modules/is-callable/test/index.js +++ b/node_modules/is-callable/test/index.js @@ -1,6 +1,5 @@ 'use strict'; -/* globals Proxy */ /* eslint no-magic-numbers: 1 */ var test = require('tape'); @@ -20,6 +19,16 @@ try { /* eslint-enable no-new-func */ } catch (e) { /**/ } +var isIE68 = !(0 in [undefined]); +var isFirefox = typeof window !== 'undefined' && ('netscape' in window) && (/ rv:/).test(navigator.userAgent); +var fnToStringCoerces; +try { + Function.prototype.toString.call(v.uncoercibleFnObject); + fnToStringCoerces = true; +} catch (e) { + fnToStringCoerces = false; +} + var noop = function () {}; var classFake = function classFake() { }; // eslint-disable-line func-name-matching var returnClass = function () { return ' class '; }; @@ -59,6 +68,7 @@ var invokeFunction = function invokeFunctionString(str) { }; var classConstructor = invokeFunction('"use strict"; return class Foo {}'); +var hasDetectableClasses = classConstructor && Function.prototype.toString.call(classConstructor) === 'class Foo {}'; var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); @@ -77,6 +87,25 @@ test('not callables', function (t) { new RegExp('a', 'g'), new Date() ]), function (nonFunction) { + if (fnToStringCoerces && nonFunction === v.coercibleFnObject) { + t.comment('FF 3.6 has a Function toString that coerces its receiver, so this test is skipped'); + return; + } + if (nonFunction != null) { // eslint-disable-line eqeqeq + if (isFirefox) { + // Firefox 3 throws some kind of *object* here instead of a proper error + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } else { + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + TypeError, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } + } t.equal(isCallable(nonFunction), false, inspect(nonFunction) + ' is not callable'); }); @@ -133,7 +162,12 @@ test('Arrow functions', { skip: arrows.length === 0 }, function (t) { t.end(); }); -test('"Class" constructors', { skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous }, function (t) { +test('"Class" constructors', { + skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous, todo: !hasDetectableClasses +}, function (t) { + if (!hasDetectableClasses) { + t.comment('WARNING: This engine does not support detectable classes'); + } t.notOk(isCallable(classConstructor), 'class constructors are not callable'); t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); @@ -161,10 +195,33 @@ test('throwing functions', function (t) { t.ok(isCallable(thrower), 'a function that throws is callable'); }); -/* globals document: false */ -test('document.all', { skip: typeof document !== 'object' }, function (t) { - t.notOk(isCallable(document), 'document is not callable'); - t.ok(isCallable(document.all), 'document.all is callable'); +test('DOM', function (t) { + /* eslint-env browser */ + + t.test('document.all', { skip: typeof document !== 'object' }, function (st) { + st.notOk(isCallable(document), 'document is not callable'); + + var all = document.all; + var isFF3 = Object.prototype.toString(all) === Object.prototype.toString.call(document.all); + st.equal(isCallable(document.all), isFF3, 'document.all is ' + (isFF3 ? 'not ' : '') + 'callable'); + + st.end(); + }); + + forEach([ + 'HTMLElement', + 'HTMLAnchorElement' + ], function (name) { + var constructor = global[name]; + + t.test(name, { skip: !constructor }, function (st) { + st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or object'); + + st.equal(isCallable(constructor), typeof constructor === 'function', name + ' is ' + (isIE68 ? 'not ' : '') + 'callable'); + + st.end(); + }); + }); t.end(); }); diff --git a/node_modules/is-unicode-supported/index.js b/node_modules/is-unicode-supported/index.js index e2e17361..d3938c58 100644 --- a/node_modules/is-unicode-supported/index.js +++ b/node_modules/is-unicode-supported/index.js @@ -7,7 +7,9 @@ export default function isUnicodeSupported() { return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) // Windows Terminal + || Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27) || process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder + || process.env.TERM_PROGRAM === 'Terminus-Sublime' || process.env.TERM_PROGRAM === 'vscode' || process.env.TERM === 'xterm-256color' || process.env.TERM === 'alacritty' diff --git a/node_modules/is-unicode-supported/package.json b/node_modules/is-unicode-supported/package.json index 58cebe5f..072651f4 100644 --- a/node_modules/is-unicode-supported/package.json +++ b/node_modules/is-unicode-supported/package.json @@ -1,6 +1,6 @@ { "name": "is-unicode-supported", - "version": "1.2.0", + "version": "1.3.0", "description": "Detect whether the terminal supports Unicode", "license": "MIT", "repository": "sindresorhus/is-unicode-supported", diff --git a/node_modules/nodemailer/CHANGELOG.md b/node_modules/nodemailer/CHANGELOG.md index 70108bfd..60cbbb6e 100644 --- a/node_modules/nodemailer/CHANGELOG.md +++ b/node_modules/nodemailer/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 6.7.8 2022-08-11 + +- Allow to use multiple Reply-To addresses + ## 6.7.7 2022-07-06 - Resolver fixes diff --git a/node_modules/nodemailer/README.md b/node_modules/nodemailer/README.md index 531815c2..4f5d739f 100644 --- a/node_modules/nodemailer/README.md +++ b/node_modules/nodemailer/README.md @@ -16,6 +16,10 @@ See [nodemailer.com](https://nodemailer.com/) for documentation and terms. --- +This project is supported by [Forward Email](https://forwardemail.net) – the 100% open-source and privacy-focused email service. + +--- + ## Having an issue? #### First review the docs diff --git a/node_modules/nodemailer/lib/mailer/mail-message.js b/node_modules/nodemailer/lib/mailer/mail-message.js index 16adb7ce..24d492bd 100644 --- a/node_modules/nodemailer/lib/mailer/mail-message.js +++ b/node_modules/nodemailer/lib/mailer/mail-message.js @@ -96,7 +96,7 @@ class MailMessage { } }); - let singleKeys = ['from', 'sender', 'replyTo']; + let singleKeys = ['from', 'sender']; singleKeys.forEach(address => { if (this.data[address]) { this.data[address] = this.data[address].shift(); diff --git a/node_modules/nodemailer/package.json b/node_modules/nodemailer/package.json index 735828c7..784a68ee 100644 --- a/node_modules/nodemailer/package.json +++ b/node_modules/nodemailer/package.json @@ -1,6 +1,6 @@ { "name": "nodemailer", - "version": "6.7.7", + "version": "6.7.8", "description": "Easy as cake e-mail sending from your Node.js applications", "main": "lib/nodemailer.js", "scripts": { @@ -20,8 +20,8 @@ }, "homepage": "https://nodemailer.com/", "devDependencies": { - "@aws-sdk/client-ses": "3.121.0", - "aws-sdk": "2.1168.0", + "@aws-sdk/client-ses": "3.145.0", + "aws-sdk": "2.1193.0", "bunyan": "1.8.15", "chai": "4.3.6", "eslint-config-nodemailer": "1.2.0", @@ -34,7 +34,7 @@ "libmime": "5.1.0", "libqp": "1.1.0", "mocha": "10.0.0", - "nodemailer-ntlm-auth": "1.0.1", + "nodemailer-ntlm-auth": "1.0.3", "proxy": "1.0.2", "proxy-test-server": "1.0.0", "sinon": "14.0.0", diff --git a/node_modules/object.assign/.eslintignore b/node_modules/object.assign/.eslintignore deleted file mode 100644 index 849ddff3..00000000 --- a/node_modules/object.assign/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist/ diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc index 6d4cafd9..13185169 100644 --- a/node_modules/object.assign/.eslintrc +++ b/node_modules/object.assign/.eslintrc @@ -3,8 +3,10 @@ "extends": "@ljharb", + "ignorePatterns": ["dist/"], + "rules": { - "complexity": [2, 19], + "eqeqeq": [2, "allow-null"], "id-length": [2, { "min": 1, "max": 30 }], "max-statements": [2, 33], "max-statements-per-line": [2, { "max": 2 }], diff --git a/node_modules/object.assign/.github/workflows/rebase.yml b/node_modules/object.assign/.github/workflows/rebase.yml deleted file mode 100644 index 0c2ad39b..00000000 --- a/node_modules/object.assign/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request_target] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.github/workflows/require-allow-edits.yml b/node_modules/object.assign/.github/workflows/require-allow-edits.yml deleted file mode 100644 index aac42d3e..00000000 --- a/node_modules/object.assign/.github/workflows/require-allow-edits.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Require “Allow Edits” - -on: [pull_request_target] - -jobs: - _: - name: "Require “Allow Edits”" - - runs-on: ubuntu-latest - - steps: - - uses: ljharb/require-allow-edits@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc index d316b4db..bdd626ce 100644 --- a/node_modules/object.assign/.nycrc +++ b/node_modules/object.assign/.nycrc @@ -2,13 +2,8 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", - "operations", "test" ] } diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md index ac543d52..426c5b70 100644 --- a/node_modules/object.assign/CHANGELOG.md +++ b/node_modules/object.assign/CHANGELOG.md @@ -1,3 +1,27 @@ +4.1.4 / 2022-08-16 +================== + * [meta] fix `npmignore` integration (#83) + +4.1.3 / 2022-08-05 +================== + * [Refactor] make steps closer to actual spec + * [Refactor] simplify object coercible check + * [readme] remove defunct badges, add coverage and actions badges + * [eslint] ignore coverage output + * [meta] use `npmignore` to autogenerate an npmignore file + * [meta] remove audit-level + * [Deps] update `call-bind`, `define-properties`, `has-symbols` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Tests] add implementation tests + * [Tests] use `mock-property` + * [Tests] disable posttest pending `aud` handling `file:` deps + * [Tests] migrate remaining tests to Github Actions (#81) + * [Tests] gitignore coverage output + * [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80) + 4.1.2 / 2020-10-30 ================== * [Refactor] use extracted `call-bind` instead of full `es-abstract` diff --git a/node_modules/object.assign/README.md b/node_modules/object.assign/README.md index 70b6ac44..8e933fee 100644 --- a/node_modules/object.assign/README.md +++ b/node_modules/object.assign/README.md @@ -1,6 +1,7 @@ -#object.assign [![Version Badge][npm-version-svg]][npm-url] +# object.assign [![Version Badge][npm-version-svg]][npm-url] -[![Build Status][travis-svg]][travis-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -8,8 +9,6 @@ [![npm badge][npm-badge-png]][npm-url] -[![browser support][testling-png]][testling-url] - An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. @@ -126,10 +125,12 @@ Simply clone the repo, `npm install`, and run `npm test` [deps-url]: https://david-dm.org/ljharb/object.assign [dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io [dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies -[testling-png]: https://ci.testling.com/ljharb/object.assign.png -[testling-url]: https://ci.testling.com/ljharb/object.assign [npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true [license-image]: http://img.shields.io/npm/l/object.assign.svg [license-url]: LICENSE [downloads-image]: http://img.shields.io/npm/dm/object.assign.svg [downloads-url]: http://npm-stat.com/charts.html?package=object.assign +[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign +[actions-url]: https://github.com/ljharb/object.assign/actions diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js index 15f0e20a..115a4579 100644 --- a/node_modules/object.assign/dist/browser.js +++ b/node_modules/object.assign/dist/browser.js @@ -10,14 +10,11 @@ module.exports = assign.shim(); delete assign.shim; -},{"./":3,"object-keys":14}],2:[function(require,module,exports){ +},{"./":3,"object-keys":15}],2:[function(require,module,exports){ 'use strict'; // modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; +var objectKeys = require('object-keys'); var hasSymbols = require('has-symbols/shams')(); var callBound = require('call-bind/callBound'); var toObject = Object; @@ -27,34 +24,41 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; // eslint-disable-next-line no-unused-vars module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); } } } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b } } } - return objTarget; + + return to; // step 4 }; -},{"call-bind/callBound":4,"has-symbols/shams":11,"object-keys":14}],3:[function(require,module,exports){ +},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){ 'use strict'; var defineProperties = require('define-properties'); @@ -78,7 +82,7 @@ defineProperties(bound, { module.exports = bound; -},{"./implementation":2,"./polyfill":16,"./shim":17,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){ +},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -105,7 +109,9 @@ var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); if ($defineProperty) { try { @@ -116,8 +122,20 @@ if ($defineProperty) { } } -module.exports = function callBind() { - return $reflectApply(bind, $call, arguments); +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; }; var applyBind = function applyBind() { @@ -144,20 +162,9 @@ var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { @@ -171,7 +178,7 @@ var defineProperty = function (object, name, value, predicate) { writable: true }); } else { - object[name] = value; + object[name] = value; // eslint-disable-line no-param-reassign } }; @@ -190,7 +197,7 @@ defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; -},{"object-keys":14}],7:[function(require,module,exports){ +},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){ 'use strict'; /* eslint no-invalid-this: 1 */ @@ -254,14 +261,6 @@ module.exports = Function.prototype.bind || implementation; },{"./implementation":7}],9:[function(require,module,exports){ 'use strict'; -/* globals - AggregateError, - Atomics, - FinalizationRegistry, - SharedArrayBuffer, - WeakRef, -*/ - var undefined; var $SyntaxError = SyntaxError; @@ -271,8 +270,7 @@ var $TypeError = TypeError; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { - // eslint-disable-next-line no-new-func - return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; @@ -309,9 +307,7 @@ var hasSymbols = require('has-symbols')(); var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto -var asyncGenFunction = getEvalledConstructor('async function* () {}'); -var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; -var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; +var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); @@ -321,10 +317,10 @@ var INTRINSICS = { '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': getEvalledConstructor('async function () {}'), - '%AsyncGenerator%': asyncGenFunctionPrototype, - '%AsyncGeneratorFunction%': asyncGenFunction, - '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%Boolean%': Boolean, @@ -341,7 +337,7 @@ var INTRINSICS = { '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, - '%GeneratorFunction%': getEvalledConstructor('function* () {}'), + '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, @@ -382,6 +378,31 @@ var INTRINSICS = { '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + var LEGACY_ALIASES = { '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], @@ -441,11 +462,19 @@ var hasOwn = require('has'); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; @@ -464,6 +493,9 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } @@ -502,6 +534,17 @@ module.exports = function GetIntrinsic(name, allowMissing) { for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } @@ -512,13 +555,16 @@ module.exports = function GetIntrinsic(name, allowMissing) { if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; - if (!allowMissing && !(part in value)) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with @@ -544,11 +590,45 @@ module.exports = function GetIntrinsic(name, allowMissing) { return value; }; -},{"function-bind":8,"has":12,"has-symbols":10}],10:[function(require,module,exports){ -(function (global){(function (){ +},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"get-intrinsic":9}],11:[function(require,module,exports){ 'use strict'; -var origSymbol = global.Symbol; +var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = require('./shams'); module.exports = function hasNativeSymbols() { @@ -560,8 +640,7 @@ module.exports = function hasNativeSymbols() { return hasSymbolSham(); }; -}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./shams":11}],11:[function(require,module,exports){ +},{"./shams":12}],12:[function(require,module,exports){ 'use strict'; /* eslint complexity: [2, 18], max-statements: [2, 33] */ @@ -587,7 +666,7 @@ module.exports = function hasSymbols() { var symVal = 42; obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } @@ -605,14 +684,14 @@ module.exports = function hasSymbols() { return true; }; -},{}],12:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ 'use strict'; var bind = require('function-bind'); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); -},{"function-bind":8}],13:[function(require,module,exports){ +},{"function-bind":8}],14:[function(require,module,exports){ 'use strict'; var keysShim; @@ -736,7 +815,7 @@ if (!Object.keys) { } module.exports = keysShim; -},{"./isArguments":15}],14:[function(require,module,exports){ +},{"./isArguments":16}],15:[function(require,module,exports){ 'use strict'; var slice = Array.prototype.slice; @@ -770,7 +849,7 @@ keysShim.shim = function shimObjectKeys() { module.exports = keysShim; -},{"./implementation":13,"./isArguments":15}],15:[function(require,module,exports){ +},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -789,7 +868,7 @@ module.exports = function isArguments(value) { return isArgs; }; -},{}],16:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -846,7 +925,7 @@ module.exports = function getPolyfill() { return Object.assign; }; -},{"./implementation":2}],17:[function(require,module,exports){ +},{"./implementation":2}],18:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -862,4 +941,4 @@ module.exports = function shimAssign() { return polyfill; }; -},{"./polyfill":16,"define-properties":6}]},{},[1]); +},{"./polyfill":17,"define-properties":6}]},{},[1]); diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js index 567efe90..7a85167a 100644 --- a/node_modules/object.assign/implementation.js +++ b/node_modules/object.assign/implementation.js @@ -1,10 +1,7 @@ 'use strict'; // modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; +var objectKeys = require('object-keys'); var hasSymbols = require('has-symbols/shams')(); var callBound = require('call-bind/callBound'); var toObject = Object; @@ -14,29 +11,36 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; // eslint-disable-next-line no-unused-vars module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); } } } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b } } } - return objTarget; + + return to; // step 4 }; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json index 25247a87..c3e413e7 100644 --- a/node_modules/object.assign/package.json +++ b/node_modules/object.assign/package.json @@ -1,6 +1,6 @@ { "name": "object.assign", - "version": "4.1.2", + "version": "4.1.4", "author": "Jordan Harband", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9,6 +9,7 @@ "license": "MIT", "main": "index.js", "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "pretest": "npm run lint && es-shim-api --bound", "test": "npm run tests-only && npm run test:ses", "posttest": "aud --production", @@ -19,7 +20,8 @@ "test:ses": "node test/ses-compat", "lint": "eslint .", "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", - "prepublish": "safe-publish-latest && npm run build" + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly" }, "repository": { "type": "git", @@ -39,25 +41,28 @@ "shim" ], "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.2.0", - "aud": "^1.1.2", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", "browserify": "^16.5.2", - "eslint": "^7.12.1", + "eslint": "=8.8.0", "for-each": "^0.3.3", - "functions-have-names": "^1.2.1", + "functions-have-names": "^1.2.3", "has": "^1.0.3", + "has-strict-mode": "^1.0.1", "is": "^3.3.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "ses": "^0.10.4", - "tape": "^5.0.1" + "safe-publish-latest": "^2.0.0", + "ses": "^0.11.1", + "tape": "^5.5.3" }, "testling": { "files": "test/index.js", @@ -79,5 +84,13 @@ }, "engines": { "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "bower.json", + "browserShim.js", + "!dist/" + ] } } diff --git a/node_modules/object.assign/test.html b/node_modules/object.assign/test.html new file mode 100644 index 00000000..c4efa6d1 --- /dev/null +++ b/node_modules/object.assign/test.html @@ -0,0 +1,18458 @@ +

diff --git a/node_modules/object.assign/test/implementation.js b/node_modules/object.assign/test/implementation.js
new file mode 100644
index 00000000..05d7d7ad
--- /dev/null
+++ b/node_modules/object.assign/test/implementation.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var implementation = require('../implementation');
+var callBind = require('call-bind');
+var test = require('tape');
+var hasStrictMode = require('has-strict-mode')();
+var runTests = require('./tests');
+
+test('as a function', function (t) {
+	t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
+		st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	runTests(callBind(implementation, Object), t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js
index 81b13263..40b0b80f 100644
--- a/node_modules/object.assign/test/tests.js
+++ b/node_modules/object.assign/test/tests.js
@@ -3,6 +3,7 @@
 var hasSymbols = require('has-symbols/shams')();
 var forEach = require('for-each');
 var has = require('has');
+var mockProperty = require('mock-property');
 
 module.exports = function (assign, t) {
 	t.test('error cases', function (st) {
@@ -160,11 +161,7 @@ module.exports = function (assign, t) {
 	});
 
 	t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
-		var getSyms;
-		if (hasSymbols) {
-			getSyms = Object.getOwnPropertySymbols;
-			delete Object.getOwnPropertySymbols;
-		}
+		st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
 
 		var visited = [];
 		var obj = {};
@@ -184,8 +181,6 @@ module.exports = function (assign, t) {
 
 		if (hasSymbols) {
 			st.equal(target[symbol], Infinity);
-
-			Object.getOwnPropertySymbols = getSyms;
 		}
 		st.end();
 	});
diff --git a/node_modules/slow-json-stringify/CHANGELOG.md b/node_modules/slow-json-stringify/CHANGELOG.md
new file mode 100644
index 00000000..50f0160d
--- /dev/null
+++ b/node_modules/slow-json-stringify/CHANGELOG.md
@@ -0,0 +1,9 @@
+# CHANGELOG
+
+## 2.0
+
+**BREAKING CHANGES:** The API of schema definition is changed in favor of the usage `attr` helper.
+
+## 1.0.1
+
+**FEATURE:** Added support for skipping the serialization of `undefined` properties.
diff --git a/node_modules/slow-json-stringify/LICENSE b/node_modules/slow-json-stringify/LICENSE
new file mode 100644
index 00000000..dcd2c240
--- /dev/null
+++ b/node_modules/slow-json-stringify/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Luca Gesmundo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/slow-json-stringify/README.md b/node_modules/slow-json-stringify/README.md
new file mode 100644
index 00000000..385b2c3e
--- /dev/null
+++ b/node_modules/slow-json-stringify/README.md
@@ -0,0 +1,365 @@
+

+ slow-json-stringify logo +
+ travis + npm + MIT + gzip size +

+ +# SJS + +The slowest stringifier in the known universe. Just kidding, it's the fastest (: + +## TOC + + - [TL;DR](#tldr) + - [Installation](#installation) + - [How it works](#how-it-works) + - [Caveats](#caveats) + - [Benchmarks](#benchmarks) + - [Running the benchmarks](#running-the-benchmarks) + - [Test machine](#test-machine) + - [Some numbers](#some-numbers) + - [Usage](#usage) + - [Supported types](#supported-types) + - [Defining a schema](#defining-a-schema) + - [Defining schema with simple array](#defining-schema-with-simple-array) + - [Defining schema with complex array](#defining-schema-with-complex-array) + - [Defining schema with nested objects](#defining-schema-with-nested-objects) + - [Serializers](#serializers) + - [API](#api) + - [sjs](#sjs) + - [escape](#escape) + - [License](#license) + + + +## TL;DR + +`SJS` shows a significant increase in performance over both native `JSON.stringify` and `fast-json-stringify`. +For some use cases (dealing with long text), it performs **21000%** faster than both native and `fast-json-stringify`. + +**NOTE:** Support for undefined properties has been added from **1.0.1**. `SJS` is now production ready. + +Checkout [benchmarks](benchmark.md). + +## Installation + +`SJS` is fully compatible with both Node.js and the browser 🎉🎉 + +Node: +```bash +npm install slow-json-stringify +``` + +On the browser: +```html + +``` + +## How it works + +Why `SJS` is the fastest stringifier? +The traditional approach consists in serializing every property taken singularly. +`SJS` uses a different approach to serialization. + +**Preparation:** +- A schema is provided +- The schema is stringified +- A templated string is built with the provided schema. + +**Serialization:** +- Object values are inserted in the already built template. + +It is faster simply because it performs a lot less work. + +## Caveats + +`SJS` require some setup work if compared to native `JSON.stringify`. +But, if you are dealing with json with a fixed structure `SJS` will save you a ton of time. +Especially when the payload grows. And incredibly when serializing json with long text inside (think of a blog article or a product description. +Moreover, `SJS` makes possible the serialization of types that are not natively supported by `JSON.stringify` thanks to [custom serializers](#serializers). + +**note:** `SJS` won't perform any escaping as you usually won't need it in small payloads. If you are working with big text, it could be of very little effort to store in your db an already escaped text. + +However, `SJS` provides a little utility for your escaping needs. +`escape` uses a default regex if no additional regex is provided. + +**default regex string:** +```javascript +/\n|\r|\t|\"|\\/gm +``` + +You can use `escape` like the following: + +```javascript +const { escape } = require('slow-json-stringify'); + +// If you don't pass any additional regex, a default one will be used. +const escaper = escape(); + +escaper('This is "funny"'); // This is \"funny\" + +// You can pass any regex you want for your escaping strategy. +const customEscaper = escape(/\"/gm); + +customEscaper('This is "funny"'); // This is \"funny\" + +``` + +## Benchmarks + +We all know that there are three kinds of lies.. + +Lies, damned lies.. and benchmarks. + +Remember to test if `SJS` could be a real improvement for your use case. +Because there are times when the performance advantages with the added drawbacks could not be worth it. + +#### Running the benchmarks + +Every benchmark is replicable on your own machine. +To run your tests: +- Clone this repo. +- Install dependencies. +- `cd benchmark`. +- Grant executable rights to `run.sh` script `chmod +x ./run.sh`. +- Save benchmark results to file `./run.sh >> benchmark.md` + +#### Test machine + +The benchmarks were performed on a Dell Xps 15 9550. +- **cpu:** intel i7 6700HQ +- **ram:** 16gb +- **os:** Ubuntu 18.04 + +#### Some numbers + +Checkout benchmarks [here](benchmark.md) + +## Usage + +#### Supported types + +The schema creation happens thanks to the `attr` helper exported from the main bundle. + +```js +const { attr } = require('sjs'); +``` + +```bash +attr(type, serializer?) +``` + +The `attr` helper natively supports the following types: +- `string` +- `number` +- `boolean` +- `null` +- `array`, dynamic array with simple structure, in this scenario native `JSON.stringify` will be used. As there are no real performance advantages. + +The serialization of any other type is possible thanks to [custom serializers](#serializers). + +#### Defining a schema + +For a correct stringification of your json payload, a correct schema is mandatory. +Defining a schema is pretty handy and not verbose at all. + +```javascript +const { sjs } = require('slow-json-stringify'); + +// schema definition +const stringify = sjs({ + a: attr('string'), + b: attr('number'), + c: attr('boolean'), +}); + +// then you can stringify anything with that structure. +stringify({ + a: 'world', + b: 42, + c: true, +}); + +// {"a":"world","b":42,"c":true} + +``` + +#### Defining schema with simple array + +When stringifying simple array `JSON.stringify` will be internally used. + +```javascript +const { sjs } = require('slow-json-stringify'); + +// schema definition +const stringify = sjs({ + a: attr('array'), +}); + +// then you can stringify anything with that structure. +stringify({ + a: [1, 2, 3, true, 'world'], +}); + +// {"a":[1,2,3,true,"world"]} + +``` + +#### Defining schema with complex array + +The `attr` helper accepts an additional `sjs` schema for `array` properties. + +```javascript +const { sjs } = require('slow-json-stringify'); + +// schema definition +const stringify = sjs({ + a: attr('array', sjs({ + b: array('string'), + c: array('number'), + })) +}); + +// then you can stringify anything with that structure. +stringify({ + a: [{ + b: 'ciao1', + c: 1, + }, { + b: 'ciao2', + c: 2, + }, { + b: 'ciao3', + c: 3, + }, { + b: 'ciao4', + c: 4, + }], +}); + +// {"a":[{"b":"ciao1","c":1},{"b":"ciao2","c":2},{"b":"ciao3","c":3},{"b":"ciao4","c":4}]} + +``` + +#### Defining schema with nested objects + +Defining schemas with nested objects is pretty straightforward. + +```javascript +const { sjs } = require('slow-json-stringify'); + +// schema definition +const stringify = sjs({ + a: { + b: { + c: attr('string'), + }, + }, + d: { + e: attr('number'), + }, +}); + +stringify({ + a: { + b: { + c: 'hello', + }, + }, + d: { + e: 42, + }, +}); + +// {"a":{"b":{"c":"hello"}},"d":{"e":42}} + +``` + +## Serializers + +The `attr` helper accepts a serializer function. The serializer function gets invoked with the real value that should be stringified. + +```bash +serializer(rawValue) +``` + +Property serializers are useful to perform custom serialization on any provide type not natively supported even by `JSON.stringify` (Dates, regular expressions). +They can be used also to skip property serializarion when returning `undefined`. + +```javascript +const { sjs } = require('slow-json-stringify'); + +// schema definition +const stringify = sjs({ + a: attr('number', (value) => { + if (value > 10) { + return value; + } + + return undefined; + }) +}); + +stringify({ a: 20 }); +// {"a":20} + +stringify({ a: 5 }); +// {} + +``` + +**use case:** Serialization of any type. + +```js +// DATES +const stringify = sjs({ + date: attr('string', (value) => value.toLocaleString()), +}); + +// REGEXP +const stringify = sjs({ + regexp: attr('string', (value) => value.toString()), +}); +``` + +**use case:** Customize payloads based on access rights. + +```js +const stringify = sjs({ + publicProp: attr('string'), + restrictedProp: attr('string', (value) => isAdmin ? value : undefined), +}); +``` + +**use case:** Value formatting + +```js +const stringify = sjs({ + prop: attr('string', (value) => value.toUpperCase()), +}); +``` + +## API + +#### sjs +| param | type | required | default | spec | +|--------|---------|------------------------------------|-----------|-----------------------------------------------------| +| schema | object | yes | undefined | Schema that defines the stringification behavior. | + +#### attr +| param | type | required | default | spec | +|------------|----------|------------------------------------|-----------|--------------------------------------------------------| +| type | string | yes | undefined | Type of the property. | +| serializer | function | no | identity | Function used for serializing / validating properties. | + +#### escape +| param | type | required | default | spec | +|-------|--------------------|------------------------------------|---------------------------|-----------------------------------------------------| +| regex | Regular Expression | no | default regex | regex used to escape text | + +## License + +MIT. diff --git a/node_modules/slow-json-stringify/benchmark_before_find_optimization.md b/node_modules/slow-json-stringify/benchmark_before_find_optimization.md new file mode 100644 index 00000000..52c37584 --- /dev/null +++ b/node_modules/slow-json-stringify/benchmark_before_find_optimization.md @@ -0,0 +1,105 @@ + +# Benchmarks + +Benchmarks performed on: +- native **JSON.stringify** +- **fast-json-stringify** +- **slow-json-stringify** + + +## small-object + +```bash +native x 3,010,761 ops/sec ±2.32% (84 runs sampled) +fast-json-stringify x 14,816,139 ops/sec ±3.18% (78 runs sampled) +slow-json-stringify x 40,887,073 ops/sec ±2.45% (81 runs sampled) + +# slow-json-stringify is +175.96% faster + +``` + +## small-array + +```bash +native x 299,066 ops/sec ±2.16% (86 runs sampled) +fast-json-stringify x 373,466 ops/sec ±1.40% (87 runs sampled) +slow-json-stringify x 521,940 ops/sec ±1.69% (89 runs sampled) + +# slow-json-stringify is +39.76% faster + +``` + +## nested-props-short-text + +```bash +native x 809,232 ops/sec ±1.81% (89 runs sampled) +fast-json-stringify x 3,316,635 ops/sec ±1.22% (90 runs sampled) +slow-json-stringify x 6,659,674 ops/sec ±0.99% (89 runs sampled) + +# slow-json-stringify is +100.80% faster + +``` + +## much-props-short-text + +```bash +native x 680,489 ops/sec ±1.63% (88 runs sampled) +fast-json-stringify x 809,106 ops/sec ±2.52% (79 runs sampled) +slow-json-stringify x 1,816,320 ops/sec ±2.14% (87 runs sampled) + +# slow-json-stringify is +124.48% faster + +``` + +## much-props-big-text + +```bash +native x 15,345 ops/sec ±1.51% (83 runs sampled) +fast-json-stringify x 15,534 ops/sec ±1.76% (84 runs sampled) +slow-json-stringify x 1,979,565 ops/sec ±2.81% (82 runs sampled) + +# slow-json-stringify is +12643.43% faster + +``` + +## big-text + +```bash +native x 190,580 ops/sec ±1.92% (85 runs sampled) +fast-json-stringify x 216,715 ops/sec ±1.76% (84 runs sampled) +slow-json-stringify x 42,176,195 ops/sec ±2.12% (86 runs sampled) + +# slow-json-stringify is +19361.68% faster + +``` + +## big-array-short-text + +```bash +native x 2,951 ops/sec ±2.05% (82 runs sampled) +slow-json-stringify x 5,012 ops/sec ±1.75% (88 runs sampled) + +# slow-json-stringify is +69.86% faster + +``` + +## big-array-long-text + +```bash +native x 86.12 ops/sec ±1.40% (74 runs sampled) +slow-json-stringify x 335 ops/sec ±1.47% (83 runs sampled) + +# slow-json-stringify is +288.37% faster + +``` + +## big-array-long-number + +```bash +native x 916 ops/sec ±1.06% (93 runs sampled) +slow-json-stringify x 2,421 ops/sec ±1.83% (89 runs sampled) + +# slow-json-stringify is +164.30% faster + +``` + diff --git a/node_modules/slow-json-stringify/dist/sjs.js b/node_modules/slow-json-stringify/dist/sjs.js new file mode 100644 index 00000000..b4908cb6 --- /dev/null +++ b/node_modules/slow-json-stringify/dist/sjs.js @@ -0,0 +1,2 @@ +var _prepare=function(e){var r=JSON.stringify(e,function(e,r){return r.isSJS?r.type+"__sjs":r});return{preparedString:r,preparedSchema:JSON.parse(r)}},_find=function(path){for(var length=path.length,str="obj",i=0;i "+str+")")},_makeArraySerializer=function(e){return e instanceof Function?function(r){for(var n="",t=r.length,a=0;a {\n const preparedString = JSON.stringify(schema, (_, value) => {\n if (!value.isSJS) return value;\n return `${value.type}__sjs`;\n });\n\n const preparedSchema = JSON.parse(preparedString);\n\n return {\n preparedString,\n preparedSchema,\n };\n};\n\nexport default _prepare;\n","\n/**\n * `_find` is a super fast deep property finder.\n * It dynamically build the function needed to reach the desired\n * property.\n *\n * e.g.\n * obj = {a: {b: {c: 1}}}\n * _find(['a','b','c']) => (obj) => (((obj || {}).a || {}).b || {}).c\n *\n * @param {array} path - path to reach object property.\n */\nconst _find = (path) => {\n const { length } = path;\n\n let str = 'obj';\n\n for (let i = 0; i < length; i++) {\n str = str.replace(/^/, '(');\n str += ` || {}).${path[i]}`;\n }\n\n return eval(`((obj) => ${str})`);\n};\n\n/**\n * `_makeArraySerializer` is simply a wrapper of another `sjs` schema\n * used for the serialization of arrais.\n *\n * @param {array} array - Array to serialize.\n * @param {any} method - `sjs` serializer.\n */\nconst _makeArraySerializer = (serializer) => {\n if (serializer instanceof Function) {\n return (array) => {\n // Stringifying more complex array using the provided sjs schema\n let acc = '';\n const { length } = array;\n for (let i = 0; i < length - 1; i++) {\n acc += `${serializer(array[i])},`;\n }\n\n // Prevent slice for removing unnecessary comma.\n acc += serializer(array[length - 1]);\n return `[${acc}]`;\n };\n }\n\n return array => JSON.stringify(array);\n};\n\nconst TYPES = [\n 'number',\n 'string',\n 'boolean',\n 'array',\n 'null',\n];\n\nconst attr = (type, serializer) => {\n if (!TYPES.includes(type)) {\n throw new Error(`Expected one of: \"number\", \"string\", \"boolean\", \"null\". received \"${type}\" instead`);\n }\n\n const usedSerializer = serializer || (value => value);\n\n return {\n isSJS: true,\n type,\n serializer: type === 'array'\n ? _makeArraySerializer(serializer)\n : usedSerializer,\n };\n};\n\n// Little utility for escaping convenience.\n// => if no regex is provided, a default one will be used.\nconst defaultRegex = new RegExp('\\\\n|\\\\r|\\\\t|\\\\\"|\\\\\\\\', 'gm');\nconst escape = (regex = defaultRegex) => str => str.replace(regex, char => '\\\\' + char);\n\nexport {\n _find,\n escape,\n attr,\n};\n","import { _find } from './_utils';\n\n/**\n * @param {object} preparedSchema - schema already validated\n * with modified prop values to avoid clashes.\n * @param {object} originalSchema - User provided schema\n * => contains array stringification serializers that are lost during preparation.\n */\nexport default (preparedSchema, originalSchema) => {\n const queue = [];\n\n // Defining a function inside an other function is slow.\n // However it's OK for this use case as the queue creation is not time critical.\n (function scoped(obj, acc = []) {\n if (/__sjs/.test(obj)) {\n const usedAcc = Array.from(acc);\n const find = _find(usedAcc);\n const { serializer } = find(originalSchema);\n\n queue.push({\n serializer,\n find,\n name: acc[acc.length - 1],\n });\n return;\n }\n\n // Recursively going deeper.\n // NOTE: While going deeper, the current prop is pushed into the accumulator\n // to keep track of the position inside of the object.\n return Object\n .keys(obj)\n .map(prop => scoped(obj[prop], [...acc, prop]));\n })(preparedSchema);\n\n return queue;\n};\n","/**\n * @param {string} str - prepared string already validated.\n * @param {array} queue - queue containing the property name to match\n * (used for building dynamic regex) needed for the preparation of\n * chunks used in different scenarios.\n */\nexport default (str, queue) => str\n // Matching prepared properties and replacing with target with or without\n // double quotes.\n // => Avoiding unnecessary concatenation of doublequotes during serialization.\n .replace(/\"\\w+__sjs\"/gm, type => (/string/.test(type) ? '\"__par__\"' : '__par__'))\n .split('__par__')\n .map((chunk, index, chunks) => {\n // Using dynamic regex to ensure that only the correct property\n // at the end of the string it's actually selected.\n // => e.g. ,\"a\":{\"a\": => ,\"a\":{\n const matchProp = `(\"${(queue[index] || {}).name}\":(\\\"?))$`;\n const matchWhenLast = `(\\,?)${matchProp}`;\n\n // Check if current chunk is the last one inside a nested property\n const isLast = /^(\"}|})/.test(chunks[index + 1] || '');\n\n // If the chunk is the last one the `isUndef` case should match\n // the preceding comma too.\n const matchPropRe = new RegExp(isLast ? matchWhenLast : matchProp);\n\n // 3 possibilities after arbitrary property:\n // - \", => non-last string property\n // - , => non-last non-string property\n // - \" => last string property\n const matchStartRe = /^(\\\"\\,|\\,|\\\")/;\n\n return {\n // notify that the chunk preceding the current one has not\n // its corresponding property undefined.\n // => This is a V8 optimization as it's way faster writing\n // the value of a property than writing the entire property.\n flag: false,\n pure: chunk,\n // Without initial part\n prevUndef: chunk.replace(matchStartRe, ''),\n // Without property chars\n isUndef: chunk.replace(matchPropRe, ''),\n // Only remaining chars (can be zero chars)\n bothUndef: chunk\n .replace(matchStartRe, '')\n .replace(matchPropRe, ''),\n };\n });\n","/**\n * `select` function takes all the possible chunks from the\n * current index and set the more appropriate one in relation\n * to the current `value` and the `flag` state.\n *\n * => This approach avoids the use of Regex during serialization.\n *\n * @param {any} value - value to serialize.\n * @param {number} index - position inside the queue.\n */\nconst _select = chunks => (value, index) => {\n const chunk = chunks[index];\n\n if (typeof value !== 'undefined') {\n if (chunk.flag) {\n return chunk.prevUndef + value;\n }\n return chunk.pure + value;\n }\n\n // If the current value is undefined set a flag on the next\n // chunk stating that the previous prop is undefined.\n chunks[index + 1].flag = true;\n\n if (chunk.flag) {\n return chunk.bothUndef;\n }\n return chunk.isUndef;\n};\n\nexport default _select;\n","import _prepare from './_prepare';\nimport _makeQueue from './_makeQueue';\nimport _makeChunks from './_makeChunks';\nimport _select from './_select';\nimport { attr, escape } from './_utils';\n\n// Doing a lot of preparation work before returning the final function responsible for\n// the stringification.\nconst sjs = (schema) => {\n const { preparedString, preparedSchema } = _prepare(schema);\n\n // Providing preparedSchema for univocal correspondence between created queue and chunks.\n // Provided original schema to keep track of the original properties that gets destroied\n // during schema preparation => e.g. array stringification method.\n const queue = _makeQueue(preparedSchema, schema);\n const chunks = _makeChunks(preparedString, queue);\n const selectChunk = _select(chunks);\n\n const { length } = queue;\n\n // Exposed function\n return (obj) => {\n let temp = '';\n\n // Ditching old implementation for a **MUCH** faster while\n let i = 0;\n while (true) {\n if (i === length) break;\n const { serializer, find } = queue[i];\n const raw = find(obj);\n\n temp += selectChunk(serializer(raw), i);\n\n i += 1;\n }\n\n const { flag, pure, prevUndef } = chunks[chunks.length - 1];\n\n return temp + (flag ? prevUndef : pure);\n };\n};\n\nexport {\n sjs,\n attr,\n escape,\n};\n"],"names":["const","_prepare","schema","preparedString","JSON","stringify","_","value","isSJS","parse","_find","path","length","str","i","replace","eval","_makeArraySerializer","serializer","Function","array","acc","TYPES","attr","type","includes","Error","usedSerializer","defaultRegex","RegExp","escape","regex","char","preparedSchema","originalSchema","queue","scoped","obj","test","Object","keys","map","prop","usedAcc","Array","from","find","push","name","split","chunk","index","chunks","matchProp","matchWhenLast","isLast","matchPropRe","matchStartRe","flag","pure","prevUndef","isUndef","bothUndef","_select","sjs","_makeQueue","_makeChunks","selectChunk","temp","raw"],"mappings":"AAOAA,IAAMC,kBAAYC,OACVC,EAAiBC,KAAKC,UAAUH,WAASI,EAAGC,UAC3CA,EAAMC,MACDD,eADeA,UAMpB,gBACLJ,iBAHqBC,KAAKK,MAAMN,KCD9BO,eAASC,UACLC,uBAEJC,IAAM,MAEDC,EAAI,EAAGA,EAAIF,OAAQE,IAC1BD,IAAMA,IAAIE,QAAQ,IAAK,KACvBF,KAAQ,WAAUF,KAAKG,UAGlBE,kBAAkBH,UAUrBI,8BAAwBC,UACxBA,aAAsBC,kBAChBC,WAEFC,EAAM,cAEDP,EAAI,EAAGA,EAAIF,EAAS,EAAGE,IAC9BO,GAAUH,EAAWE,EAAMN,mBAI7BO,GAAOH,EAAWE,EAAMR,EAAS,mBAK9BQ,UAAShB,KAAKC,UAAUe,K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KtB6C,EAAOD,EAAQ,GAAGO,MAAO,EAErBR,EAAMQ,KACDR,EAAMY,UAERZ,EAAMW,WCnBTG,aAAO9D,SACgCD,SAASC,sBAK9CiC,EAAQ8B,4BAA2B/D,GACnCkD,EAASc,YAAY/D,EAAgBgC,GACrCgC,EAAcJ,QAAQX,8BAKpBf,WACF+B,EAAO,GAGPtD,EAAI,EAEFA,IAAMF,GADC,OAEkBuB,EAAMrB,kBAC7BuD,GAAMvB,UAAKT,GAEjB+B,GAAQD,EAAYjD,EAAWmD,GAAMvD,GAErCA,GAAK,QAG2BsC,EAAOA,EAAOxC,OAAS,UAElDwD"} \ No newline at end of file diff --git a/node_modules/slow-json-stringify/dist/sjs.mjs b/node_modules/slow-json-stringify/dist/sjs.mjs new file mode 100644 index 00000000..aabdd1bf --- /dev/null +++ b/node_modules/slow-json-stringify/dist/sjs.mjs @@ -0,0 +1,2 @@ +var _prepare=function(e){var r=JSON.stringify(e,function(e,r){return r.isSJS?r.type+"__sjs":r});return{preparedString:r,preparedSchema:JSON.parse(r)}},_find=function(path){for(var length=path.length,str="obj",i=0;i "+str+")")},_makeArraySerializer=function(e){return e instanceof Function?function(r){for(var n="",t=r.length,a=0;a {\n const preparedString = JSON.stringify(schema, (_, value) => {\n if (!value.isSJS) return value;\n return `${value.type}__sjs`;\n });\n\n const preparedSchema = JSON.parse(preparedString);\n\n return {\n preparedString,\n preparedSchema,\n };\n};\n\nexport default _prepare;\n","\n/**\n * `_find` is a super fast deep property finder.\n * It dynamically build the function needed to reach the desired\n * property.\n *\n * e.g.\n * obj = {a: {b: {c: 1}}}\n * _find(['a','b','c']) => (obj) => (((obj || {}).a || {}).b || {}).c\n *\n * @param {array} path - path to reach object property.\n */\nconst _find = (path) => {\n const { length } = path;\n\n let str = 'obj';\n\n for (let i = 0; i < length; i++) {\n str = str.replace(/^/, '(');\n str += ` || {}).${path[i]}`;\n }\n\n return eval(`((obj) => ${str})`);\n};\n\n/**\n * `_makeArraySerializer` is simply a wrapper of another `sjs` schema\n * used for the serialization of arrais.\n *\n * @param {array} array - Array to serialize.\n * @param {any} method - `sjs` serializer.\n */\nconst _makeArraySerializer = (serializer) => {\n if (serializer instanceof Function) {\n return (array) => {\n // Stringifying more complex array using the provided sjs schema\n let acc = '';\n const { length } = array;\n for (let i = 0; i < length - 1; i++) {\n acc += `${serializer(array[i])},`;\n }\n\n // Prevent slice for removing unnecessary comma.\n acc += serializer(array[length - 1]);\n return `[${acc}]`;\n };\n }\n\n return array => JSON.stringify(array);\n};\n\nconst TYPES = [\n 'number',\n 'string',\n 'boolean',\n 'array',\n 'null',\n];\n\nconst attr = (type, serializer) => {\n if (!TYPES.includes(type)) {\n throw new Error(`Expected one of: \"number\", \"string\", \"boolean\", \"null\". received \"${type}\" instead`);\n }\n\n const usedSerializer = serializer || (value => value);\n\n return {\n isSJS: true,\n type,\n serializer: type === 'array'\n ? _makeArraySerializer(serializer)\n : usedSerializer,\n };\n};\n\n// Little utility for escaping convenience.\n// => if no regex is provided, a default one will be used.\nconst defaultRegex = new RegExp('\\\\n|\\\\r|\\\\t|\\\\\"|\\\\\\\\', 'gm');\nconst escape = (regex = defaultRegex) => str => str.replace(regex, char => '\\\\' + char);\n\nexport {\n _find,\n escape,\n attr,\n};\n","import { _find } from './_utils';\n\n/**\n * @param {object} preparedSchema - schema already validated\n * with modified prop values to avoid clashes.\n * @param {object} originalSchema - User provided schema\n * => contains array stringification serializers that are lost during preparation.\n */\nexport default (preparedSchema, originalSchema) => {\n const queue = [];\n\n // Defining a function inside an other function is slow.\n // However it's OK for this use case as the queue creation is not time critical.\n (function scoped(obj, acc = []) {\n if (/__sjs/.test(obj)) {\n const usedAcc = Array.from(acc);\n const find = _find(usedAcc);\n const { serializer } = find(originalSchema);\n\n queue.push({\n serializer,\n find,\n name: acc[acc.length - 1],\n });\n return;\n }\n\n // Recursively going deeper.\n // NOTE: While going deeper, the current prop is pushed into the accumulator\n // to keep track of the position inside of the object.\n return Object\n .keys(obj)\n .map(prop => scoped(obj[prop], [...acc, prop]));\n })(preparedSchema);\n\n return queue;\n};\n","/**\n * @param {string} str - prepared string already validated.\n * @param {array} queue - queue containing the property name to match\n * (used for building dynamic regex) needed for the preparation of\n * chunks used in different scenarios.\n */\nexport default (str, queue) => str\n // Matching prepared properties and replacing with target with or without\n // double quotes.\n // => Avoiding unnecessary concatenation of doublequotes during serialization.\n .replace(/\"\\w+__sjs\"/gm, type => (/string/.test(type) ? '\"__par__\"' : '__par__'))\n .split('__par__')\n .map((chunk, index, chunks) => {\n // Using dynamic regex to ensure that only the correct property\n // at the end of the string it's actually selected.\n // => e.g. ,\"a\":{\"a\": => ,\"a\":{\n const matchProp = `(\"${(queue[index] || {}).name}\":(\\\"?))$`;\n const matchWhenLast = `(\\,?)${matchProp}`;\n\n // Check if current chunk is the last one inside a nested property\n const isLast = /^(\"}|})/.test(chunks[index + 1] || '');\n\n // If the chunk is the last one the `isUndef` case should match\n // the preceding comma too.\n const matchPropRe = new RegExp(isLast ? matchWhenLast : matchProp);\n\n // 3 possibilities after arbitrary property:\n // - \", => non-last string property\n // - , => non-last non-string property\n // - \" => last string property\n const matchStartRe = /^(\\\"\\,|\\,|\\\")/;\n\n return {\n // notify that the chunk preceding the current one has not\n // its corresponding property undefined.\n // => This is a V8 optimization as it's way faster writing\n // the value of a property than writing the entire property.\n flag: false,\n pure: chunk,\n // Without initial part\n prevUndef: chunk.replace(matchStartRe, ''),\n // Without property chars\n isUndef: chunk.replace(matchPropRe, ''),\n // Only remaining chars (can be zero chars)\n bothUndef: chunk\n .replace(matchStartRe, '')\n .replace(matchPropRe, ''),\n };\n });\n","/**\n * `select` function takes all the possible chunks from the\n * current index and set the more appropriate one in relation\n * to the current `value` and the `flag` state.\n *\n * => This approach avoids the use of Regex during serialization.\n *\n * @param {any} value - value to serialize.\n * @param {number} index - position inside the queue.\n */\nconst _select = chunks => (value, index) => {\n const chunk = chunks[index];\n\n if (typeof value !== 'undefined') {\n if (chunk.flag) {\n return chunk.prevUndef + value;\n }\n return chunk.pure + value;\n }\n\n // If the current value is undefined set a flag on the next\n // chunk stating that the previous prop is undefined.\n chunks[index + 1].flag = true;\n\n if (chunk.flag) {\n return chunk.bothUndef;\n }\n return chunk.isUndef;\n};\n\nexport default _select;\n","import _prepare from './_prepare';\nimport _makeQueue from './_makeQueue';\nimport _makeChunks from './_makeChunks';\nimport _select from './_select';\nimport { attr, escape } from './_utils';\n\n// Doing a lot of preparation work before returning the final function responsible for\n// the stringification.\nconst sjs = (schema) => {\n const { preparedString, preparedSchema } = _prepare(schema);\n\n // Providing preparedSchema for univocal correspondence between created queue and chunks.\n // Provided original schema to keep track of the original properties that gets destroied\n // during schema preparation => e.g. array stringification method.\n const queue = _makeQueue(preparedSchema, schema);\n const chunks = _makeChunks(preparedString, queue);\n const selectChunk = _select(chunks);\n\n const { length } = queue;\n\n // Exposed function\n return (obj) => {\n let temp = '';\n\n // Ditching old implementation for a **MUCH** faster while\n let i = 0;\n while (true) {\n if (i === length) break;\n const { serializer, find } = queue[i];\n const raw = find(obj);\n\n temp += selectChunk(serializer(raw), i);\n\n i += 1;\n }\n\n const { flag, pure, prevUndef } = chunks[chunks.length - 1];\n\n return temp + (flag ? prevUndef : pure);\n };\n};\n\nexport {\n sjs,\n attr,\n escape,\n};\n"],"names":["const","_prepare","schema","preparedString","JSON","stringify","_","value","isSJS","parse","_find","path","length","str","i","replace","eval","_makeArraySerializer","serializer","Function","array","acc","TYPES","attr","type","includes","Error","usedSerializer","defaultRegex","RegExp","escape","regex","char","preparedSchema","originalSchema","queue","scoped","obj","test","Object","keys","map","prop","usedAcc","Array","from","find","push","name","split","chunk","index","chunks","matchProp","matchWhenLast","isLast","matchPropRe","matchStartRe","flag","pure","prevUndef","isUndef","bothUndef","_select","sjs","_makeQueue","_makeChunks","selectChunk","temp","raw"],"mappings":"AAOAA,IAAMC,kBAAYC,OACVC,EAAiBC,KAAKC,UAAUH,WAASI,EAAGC,UAC3CA,EAAMC,MACDD,eADeA,UAMpB,g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AAQ,IAAM,IAI7CK,EAAc,IAAI3B,OAAO0B,EAASD,EAAgBD,GAMlDI,EAAe,sBAEd,CAKLC,MAAM,EACNC,KAAMT,EAENU,UAAWV,EAAMnC,QAAQ0C,EAAc,IAEvCI,QAASX,EAAMnC,QAAQyC,EAAa,IAEpCM,UAAWZ,EACRnC,QAAQ0C,EAAc,IACtB1C,QAAQyC,EAAa,QCpCxBO,iBAAUX,mBAAW7C,EAAO4C,OAC1BD,EAAQE,EAAOD,eAEA,IAAV5C,EACL2C,EAAMQ,KACDR,EAAMU,UAAYrD,EAEpB2C,EAAMS,KAAOpD,GAKtB6C,EAAOD,EAAQ,GAAGO,MAAO,EAErBR,EAAMQ,KACDR,EAAMY,UAERZ,EAAMW,WCnBTG,aAAO9D,SACgCD,SAASC,sBAK9CiC,EAAQ8B,4BAA2B/D,GACnCkD,EAASc,YAAY/D,EAAgBgC,GACrCgC,EAAcJ,QAAQX,8BAKpBf,WACF+B,EAAO,GAGPtD,EAAI,EAEFA,IAAMF,GADC,OAEkBuB,EAAMrB,kBAC7BuD,GAAMvB,UAAKT,GAEjB+B,GAAQD,EAAYjD,EAAWmD,GAAMvD,GAErCA,GAAK,QAG2BsC,EAAOA,EAAOxC,OAAS,UAElDwD"} \ No newline at end of file diff --git a/node_modules/slow-json-stringify/dist/sjs.umd.js b/node_modules/slow-json-stringify/dist/sjs.umd.js new file mode 100644 index 00000000..5a2bd581 --- /dev/null +++ b/node_modules/slow-json-stringify/dist/sjs.umd.js @@ -0,0 +1,2 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.slowJsonStringify={})}(this,function(exports){var _prepare=function(e){var r=JSON.stringify(e,function(e,r){return r.isSJS?r.type+"__sjs":r});return{preparedString:r,preparedSchema:JSON.parse(r)}},_find=function(path){for(var length=path.length,str="obj",i=0;i "+str+")")},_makeArraySerializer=function(e){return e instanceof Function?function(r){for(var n="",t=r.length,a=0;a {\n const preparedString = JSON.stringify(schema, (_, value) => {\n if (!value.isSJS) return value;\n return `${value.type}__sjs`;\n });\n\n const preparedSchema = JSON.parse(preparedString);\n\n return {\n preparedString,\n preparedSchema,\n };\n};\n\nexport default _prepare;\n","\n/**\n * `_find` is a super fast deep property finder.\n * It dynamically build the function needed to reach the desired\n * property.\n *\n * e.g.\n * obj = {a: {b: {c: 1}}}\n * _find(['a','b','c']) => (obj) => (((obj || {}).a || {}).b || {}).c\n *\n * @param {array} path - path to reach object property.\n */\nconst _find = (path) => {\n const { length } = path;\n\n let str = 'obj';\n\n for (let i = 0; i < length; i++) {\n str = str.replace(/^/, '(');\n str += ` || {}).${path[i]}`;\n }\n\n return eval(`((obj) => ${str})`);\n};\n\n/**\n * `_makeArraySerializer` is simply a wrapper of another `sjs` schema\n * used for the serialization of arrais.\n *\n * @param {array} array - Array to serialize.\n * @param {any} method - `sjs` serializer.\n */\nconst _makeArraySerializer = (serializer) => {\n if (serializer instanceof Function) {\n return (array) => {\n // Stringifying more complex array using the provided sjs schema\n let acc = '';\n const { length } = array;\n for (let i = 0; i < length - 1; i++) {\n acc += `${serializer(array[i])},`;\n }\n\n // Prevent slice for removing unnecessary comma.\n acc += serializer(array[length - 1]);\n return `[${acc}]`;\n };\n }\n\n return array => JSON.stringify(array);\n};\n\nconst TYPES = [\n 'number',\n 'string',\n 'boolean',\n 'array',\n 'null',\n];\n\nconst attr = (type, serializer) => {\n if (!TYPES.includes(type)) {\n throw new Error(`Expected one of: \"number\", \"string\", \"boolean\", \"null\". received \"${type}\" instead`);\n }\n\n const usedSerializer = serializer || (value => value);\n\n return {\n isSJS: true,\n type,\n serializer: type === 'array'\n ? _makeArraySerializer(serializer)\n : usedSerializer,\n };\n};\n\n// Little utility for escaping convenience.\n// => if no regex is provided, a default one will be used.\nconst defaultRegex = new RegExp('\\\\n|\\\\r|\\\\t|\\\\\"|\\\\\\\\', 'gm');\nconst escape = (regex = defaultRegex) => str => str.replace(regex, char => '\\\\' + char);\n\nexport {\n _find,\n escape,\n attr,\n};\n","import { _find } from './_utils';\n\n/**\n * @param {object} preparedSchema - schema already validated\n * with modified prop values to avoid clashes.\n * @param {object} originalSchema - User provided schema\n * => contains array stringification serializers that are lost during preparation.\n */\nexport default (preparedSchema, originalSchema) => {\n const queue = [];\n\n // Defining a function inside an other function is slow.\n // However it's OK for this use case as the queue creation is not time critical.\n (function scoped(obj, acc = []) {\n if (/__sjs/.test(obj)) {\n const usedAcc = Array.from(acc);\n const find = _find(usedAcc);\n const { serializer } = find(originalSchema);\n\n queue.push({\n serializer,\n find,\n name: acc[acc.length - 1],\n });\n return;\n }\n\n // Recursively going deeper.\n // NOTE: While going deeper, the current prop is pushed into the accumulator\n // to keep track of the position inside of the object.\n return Object\n .keys(obj)\n .map(prop => scoped(obj[prop], [...acc, prop]));\n })(preparedSchema);\n\n return queue;\n};\n","/**\n * @param {string} str - prepared string already validated.\n * @param {array} queue - queue containing the property name to match\n * (used for building dynamic regex) needed for the preparation of\n * chunks used in different scenarios.\n */\nexport default (str, queue) => str\n // Matching prepared properties and replacing with target with or without\n // double quotes.\n // => Avoiding unnecessary concatenation of doublequotes during serialization.\n .replace(/\"\\w+__sjs\"/gm, type => (/string/.test(type) ? '\"__par__\"' : '__par__'))\n .split('__par__')\n .map((chunk, index, chunks) => {\n // Using dynamic regex to ensure that only the correct property\n // at the end of the string it's actually selected.\n // => e.g. ,\"a\":{\"a\": => ,\"a\":{\n const matchProp = `(\"${(queue[index] || {}).name}\":(\\\"?))$`;\n const matchWhenLast = `(\\,?)${matchProp}`;\n\n // Check if current chunk is the last one inside a nested property\n const isLast = /^(\"}|})/.test(chunks[index + 1] || '');\n\n // If the chunk is the last one the `isUndef` case should match\n // the preceding comma too.\n const matchPropRe = new RegExp(isLast ? matchWhenLast : matchProp);\n\n // 3 possibilities after arbitrary property:\n // - \", => non-last string property\n // - , => non-last non-string property\n // - \" => last string property\n const matchStartRe = /^(\\\"\\,|\\,|\\\")/;\n\n return {\n // notify that the chunk preceding the current one has not\n // its corresponding property undefined.\n // => This is a V8 optimization as it's way faster writing\n // the value of a property than writing the entire property.\n flag: false,\n pure: chunk,\n // Without initial part\n prevUndef: chunk.replace(matchStartRe, ''),\n // Without property chars\n isUndef: chunk.replace(matchPropRe, ''),\n // Only remaining chars (can be zero chars)\n bothUndef: chunk\n .replace(matchStartRe, '')\n .replace(matchPropRe, ''),\n };\n });\n","/**\n * `select` function takes all the possible chunks from the\n * current index and set the more appropriate one in relation\n * to the current `value` and the `flag` state.\n *\n * => This approach avoids the use of Regex during serialization.\n *\n * @param {any} value - value to serialize.\n * @param {number} index - position inside the queue.\n */\nconst _select = chunks => (value, index) => {\n const chunk = chunks[index];\n\n if (typeof value !== 'undefined') {\n if (chunk.flag) {\n return chunk.prevUndef + value;\n }\n return chunk.pure + value;\n }\n\n // If the current value is undefined set a flag on the next\n // chunk stating that the previous prop is undefined.\n chunks[index + 1].flag = true;\n\n if (chunk.flag) {\n return chunk.bothUndef;\n }\n return chunk.isUndef;\n};\n\nexport default _select;\n","import _prepare from './_prepare';\nimport _makeQueue from './_makeQueue';\nimport _makeChunks from './_makeChunks';\nimport _select from './_select';\nimport { attr, escape } from './_utils';\n\n// Doing a lot of preparation work before returning the final function responsible for\n// the stringification.\nconst sjs = (schema) => {\n const { preparedString, preparedSchema } = _prepare(schema);\n\n // Providing preparedSchema for univocal correspondence between created queue and chunks.\n // Provided original schema to keep track of the original properties that gets destroied\n // during schema preparation => e.g. array stringification method.\n const queue = _makeQueue(preparedSchema, schema);\n const chunks = _makeChunks(preparedString, queue);\n const selectChunk = _select(chunks);\n\n const { length } = queue;\n\n // Exposed function\n return (obj) => {\n let temp = '';\n\n // Ditching old implementation for a **MUCH** faster while\n let i = 0;\n while (true) {\n if (i === length) break;\n const { serializer, find } = queue[i];\n const raw = find(obj);\n\n temp += selectChunk(serializer(raw), i);\n\n i += 1;\n }\n\n const { flag, pure, prevUndef } = chunks[chunks.length - 1];\n\n return temp + (flag ? prevUndef : pure);\n };\n};\n\nexport {\n sjs,\n attr,\n escape,\n};\n"],"names":["const","_prepare","schema","preparedString","JSON","stringify","_","value","isSJS","parse","_find","path","length","str","i","replace","eval","_makeArraySerializer","serializer","Function","array","acc","TYPES","attr","type","includes","Error","usedSerializer","defaultRegex","RegExp","escape","regex","char","preparedSchema","originalSchema","queue","scoped","obj","test","Object","keys","map","prop","usedAcc","Array","from","find","push","name","split","chunk","index","chunks","matchProp","matchWhenLast","isLast","matchPropRe","matchStartRe","flag","pure","prevUndef","isUndef","bothUndef","_select","sjs","_makeQueue","_makeChunks","selectChunk","temp","raw"],"mappings":"6LAOAA,IAAMC,kBAAYC,OACVC,EAAiBC,KAAKC,UAAUH,WAASI,EAAGC,UAC3CA,EAAMC,MACDD,eADeA,UAMpB,gBACLJ,iBAHqBC,KAAKK,MAAMN,KCD9BO,eAASC,UACLC,uBAEJC,IAAM,MAEDC,EAAI,EAAGA,EAAIF,OAAQE,IAC1BD,IAAMA,IAAIE,QAAQ,IAAK,KACvBF,KAAQ,WAAUF,KAAKG,UAGlBE,kBAAkBH,UAUrBI,8BAAwBC,UACxBA,aAAsBC,kBAChBC,WAEFC,EAAM,cAEDP,EAAI,EAAGA,EAAIF,EAAS,EAAGE,IAC9BO,GAAUH,EAAWE,EAAMN,mBAI7BO,GAAOH,EAAWE,EAAMR,EAAS,mBAK9BQ,UAAShB,KAAKC,UAAUe,KAG3BE,MAAQ,CACZ,SACA,SACA,UACA,QACA,QAGIC,cAAQC,EAAMN,OACbI,MAAMG,SAASD,SACZ,IAAIE,2EAA2EF,mBAGjFG,EAAiBT,YAAeX,UAASA,SAExC,CACLC,OAAO,OACPgB,EACAN,WAAqB,UAATM,EACRP,qBAAqBC,GACrBS,IAMFC,aAAe,IAAIC,OAAO,uBAAwB,MAClDC,gBAAUC,yBAAQH,uBAAiBf,UAAOA,EAAIE,QAAQgB,WAAOC,SAAQ,KAAOA,0BCtElEC,EAAgBC,OACxBC,EAAQ,mBAIJC,EAAOC,EA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OA,EAAOxC,OAAS,UAElDwD"} \ No newline at end of file diff --git a/node_modules/slow-json-stringify/index.d.ts b/node_modules/slow-json-stringify/index.d.ts new file mode 100644 index 00000000..29d22dfb --- /dev/null +++ b/node_modules/slow-json-stringify/index.d.ts @@ -0,0 +1,78 @@ +export as namespace SlowJsonStringify; + +export type JSONPrimitive = + string + | number + | boolean + | null; + +export type AttrType = + 'string' + | 'number' + | 'boolean' + | 'array' + | 'null'; + +/** + * SjsSchema + * + * Schema that describe the structure of your data. + * + * Usage: https://github.com/lucagez/slow-json-stringify#usage + */ +export type SjsSchema = { [prop: string]: AttrExecutable | SjsSchema }; + +/** + * SjsSerializer + * + * Serialize any object enforcing the provided schema. + */ +export type SjsSerializer = (obj: unknown) => string; + +/** + * SjsEscaper + * + * Escape any string against the previously provided regex. + */ +export type SjsEscaper = (str: string) => string; + +/** + * AttrExecutable + * + * Object that should be used only inside sjs schemas. + */ +export type AttrExecutable = object; + +/** + * Mapping between AttrType and JSONPrimitive?? + * + * The resulting JSONPrimitive should be of the same + * type of AttrType. As the created template has a spot + * to host the requested type. + */ +export type Serializer = (raw: any) => JSONPrimitive; + +/** + * attr + * + * Utility used to define how sjs should handle the + * provided raw data. + */ +export function attr(type: 'array', serializer?: SjsSerializer): AttrExecutable; +export function attr(type: AttrType, serializer?: Serializer): AttrExecutable; + +/** + * escape + * + * Provides basic escaping facilities. + * @default regex - \\n|\\r|\\t|\\"|\\\\ + */ +export function escape(regex?: RegExp): (str: string) => string; + +/** + * sjs + * + * compile the provided schema and exports a function + * that serialize objects enforcing the schema. + */ +export function sjs(schema: SjsSchema): SjsSerializer; diff --git a/node_modules/slow-json-stringify/messages-for-my-future-self.md b/node_modules/slow-json-stringify/messages-for-my-future-self.md new file mode 100644 index 00000000..a2f2a339 --- /dev/null +++ b/node_modules/slow-json-stringify/messages-for-my-future-self.md @@ -0,0 +1,28 @@ +# MESSAGES FOR MY FUTURE SELF + +> Last Update: Sat 19 Oct 2019 10:20:27 CEST + +Added JSON compliant schema capability. +Improved by a long margin readability and useability of SJS. + +# TODO + +- [ ] Examples + - [ ] NULL +- [x] new benchmarks +- [ ] update README + - [ ] Add TYPES section + - [ ] Description of JSON schema compliant +- [ ] CHANGELOG +- [ ] Publish new npm version (breaking) + +# Features + +The main point of this library is the extreme speed. +So, the following features are currently triaged to see if there could be to much negative performance impact. + +- [ ] default values +- [x] serializer support (HOC function => not to penalize performance) +- [ ] auto schema generation -> caching? + +keys equality???? \ No newline at end of file diff --git a/node_modules/slow-json-stringify/package.json b/node_modules/slow-json-stringify/package.json new file mode 100644 index 00000000..549b135c --- /dev/null +++ b/node_modules/slow-json-stringify/package.json @@ -0,0 +1,50 @@ +{ + "name": "slow-json-stringify", + "version": "2.0.1", + "description": "The slowest JSON stringifier in the galaxy (:", + "source": "src/sjs.mjs", + "main": "dist/sjs.js", + "module": "dist/sjs.mjs", + "unpkg": "dist/sjs.umd.js", + "types": "index.d.ts", + "scripts": { + "build": "microbundle", + "build:dev": "microbundle watch", + "lint": "eslint src/*.mjs test/*.js", + "lint:fix": "eslint src/*.mjs test/*.js --fix", + "test": "npm run build && mocha --timeout 10000 --recursive test", + "ship": "rm -r dist && npm run build && npm publish", + "benchmark": "cd benchmark && sh run.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/lucagez/slow-json-stringify.git" + }, + "devDependencies": { + "benchmark": "^2.1.4", + "chai": "^4.2.0", + "chai-spies": "^1.0.0", + "eslint": "^5.16.0", + "eslint-config-airbnb-base": "^13.2.0", + "eslint-plugin-import": "^2.18.0", + "fast-json-stringify": "^1.17.0", + "microbundle": "^0.11.0", + "mocha": "^6.1.4" + }, + "keywords": [ + "stringify", + "json", + "deterministic", + "safe", + "serialize", + "hash", + "stringification", + "fast" + ], + "author": "Luca Gesmundo ", + "license": "MIT", + "bugs": { + "url": "https://github.com/lucagez/slow-json-stringify/issues" + }, + "homepage": "https://github.com/lucagez/slow-json-stringify#readme" +} diff --git a/node_modules/slow-json-stringify/src/_makeChunks.mjs b/node_modules/slow-json-stringify/src/_makeChunks.mjs new file mode 100644 index 00000000..2a7a2be0 --- /dev/null +++ b/node_modules/slow-json-stringify/src/_makeChunks.mjs @@ -0,0 +1,49 @@ +/** + * @param {string} str - prepared string already validated. + * @param {array} queue - queue containing the property name to match + * (used for building dynamic regex) needed for the preparation of + * chunks used in different scenarios. + */ +export default (str, queue) => str + // Matching prepared properties and replacing with target with or without + // double quotes. + // => Avoiding unnecessary concatenation of doublequotes during serialization. + .replace(/"\w+__sjs"/gm, type => (/string/.test(type) ? '"__par__"' : '__par__')) + .split('__par__') + .map((chunk, index, chunks) => { + // Using dynamic regex to ensure that only the correct property + // at the end of the string it's actually selected. + // => e.g. ,"a":{"a": => ,"a":{ + const matchProp = `("${(queue[index] || {}).name}":(\"?))$`; + const matchWhenLast = `(\,?)${matchProp}`; + + // Check if current chunk is the last one inside a nested property + const isLast = /^("}|})/.test(chunks[index + 1] || ''); + + // If the chunk is the last one the `isUndef` case should match + // the preceding comma too. + const matchPropRe = new RegExp(isLast ? matchWhenLast : matchProp); + + // 3 possibilities after arbitrary property: + // - ", => non-last string property + // - , => non-last non-string property + // - " => last string property + const matchStartRe = /^(\"\,|\,|\")/; + + return { + // notify that the chunk preceding the current one has not + // its corresponding property undefined. + // => This is a V8 optimization as it's way faster writing + // the value of a property than writing the entire property. + flag: false, + pure: chunk, + // Without initial part + prevUndef: chunk.replace(matchStartRe, ''), + // Without property chars + isUndef: chunk.replace(matchPropRe, ''), + // Only remaining chars (can be zero chars) + bothUndef: chunk + .replace(matchStartRe, '') + .replace(matchPropRe, ''), + }; + }); diff --git a/node_modules/slow-json-stringify/src/_makeQueue.mjs b/node_modules/slow-json-stringify/src/_makeQueue.mjs new file mode 100644 index 00000000..68796fb4 --- /dev/null +++ b/node_modules/slow-json-stringify/src/_makeQueue.mjs @@ -0,0 +1,37 @@ +import { _find } from './_utils'; + +/** + * @param {object} preparedSchema - schema already validated + * with modified prop values to avoid clashes. + * @param {object} originalSchema - User provided schema + * => contains array stringification serializers that are lost during preparation. + */ +export default (preparedSchema, originalSchema) => { + const queue = []; + + // Defining a function inside an other function is slow. + // However it's OK for this use case as the queue creation is not time critical. + (function scoped(obj, acc = []) { + if (/__sjs/.test(obj)) { + const usedAcc = Array.from(acc); + const find = _find(usedAcc); + const { serializer } = find(originalSchema); + + queue.push({ + serializer, + find, + name: acc[acc.length - 1], + }); + return; + } + + // Recursively going deeper. + // NOTE: While going deeper, the current prop is pushed into the accumulator + // to keep track of the position inside of the object. + return Object + .keys(obj) + .map(prop => scoped(obj[prop], [...acc, prop])); + })(preparedSchema); + + return queue; +}; diff --git a/node_modules/slow-json-stringify/src/_prepare.js b/node_modules/slow-json-stringify/src/_prepare.js new file mode 100644 index 00000000..409cb2bb --- /dev/null +++ b/node_modules/slow-json-stringify/src/_prepare.js @@ -0,0 +1,22 @@ + +/** + * `_prepare` - aims to normalize the schema provided by the user. + * It will convert the schema in both a parseable string and an object + * useable for making the chunks needed for the serialization part. + * @param {object} schema - user provided schema + */ +const _prepare = (schema) => { + const preparedString = JSON.stringify(schema, (_, value) => { + if (!value.isSJS) return value; + return `${value.type}__sjs`; + }); + + const preparedSchema = JSON.parse(preparedString); + + return { + preparedString, + preparedSchema, + }; +}; + +export default _prepare; diff --git a/node_modules/slow-json-stringify/src/_select.js b/node_modules/slow-json-stringify/src/_select.js new file mode 100644 index 00000000..07dac09e --- /dev/null +++ b/node_modules/slow-json-stringify/src/_select.js @@ -0,0 +1,31 @@ +/** + * `select` function takes all the possible chunks from the + * current index and set the more appropriate one in relation + * to the current `value` and the `flag` state. + * + * => This approach avoids the use of Regex during serialization. + * + * @param {any} value - value to serialize. + * @param {number} index - position inside the queue. + */ +const _select = chunks => (value, index) => { + const chunk = chunks[index]; + + if (typeof value !== 'undefined') { + if (chunk.flag) { + return chunk.prevUndef + value; + } + return chunk.pure + value; + } + + // If the current value is undefined set a flag on the next + // chunk stating that the previous prop is undefined. + chunks[index + 1].flag = true; + + if (chunk.flag) { + return chunk.bothUndef; + } + return chunk.isUndef; +}; + +export default _select; diff --git a/node_modules/slow-json-stringify/src/_utils.mjs b/node_modules/slow-json-stringify/src/_utils.mjs new file mode 100644 index 00000000..67e6e659 --- /dev/null +++ b/node_modules/slow-json-stringify/src/_utils.mjs @@ -0,0 +1,85 @@ + +/** + * `_find` is a super fast deep property finder. + * It dynamically build the function needed to reach the desired + * property. + * + * e.g. + * obj = {a: {b: {c: 1}}} + * _find(['a','b','c']) => (obj) => (((obj || {}).a || {}).b || {}).c + * + * @param {array} path - path to reach object property. + */ +const _find = (path) => { + const { length } = path; + + let str = 'obj'; + + for (let i = 0; i < length; i++) { + str = str.replace(/^/, '('); + str += ` || {}).${path[i]}`; + } + + return eval(`((obj) => ${str})`); +}; + +/** + * `_makeArraySerializer` is simply a wrapper of another `sjs` schema + * used for the serialization of arrais. + * + * @param {array} array - Array to serialize. + * @param {any} method - `sjs` serializer. + */ +const _makeArraySerializer = (serializer) => { + if (serializer instanceof Function) { + return (array) => { + // Stringifying more complex array using the provided sjs schema + let acc = ''; + const { length } = array; + for (let i = 0; i < length - 1; i++) { + acc += `${serializer(array[i])},`; + } + + // Prevent slice for removing unnecessary comma. + acc += serializer(array[length - 1]); + return `[${acc}]`; + }; + } + + return array => JSON.stringify(array); +}; + +const TYPES = [ + 'number', + 'string', + 'boolean', + 'array', + 'null', +]; + +const attr = (type, serializer) => { + if (!TYPES.includes(type)) { + throw new Error(`Expected one of: "number", "string", "boolean", "null". received "${type}" instead`); + } + + const usedSerializer = serializer || (value => value); + + return { + isSJS: true, + type, + serializer: type === 'array' + ? _makeArraySerializer(serializer) + : usedSerializer, + }; +}; + +// Little utility for escaping convenience. +// => if no regex is provided, a default one will be used. +const defaultRegex = new RegExp('\\n|\\r|\\t|\\"|\\\\', 'gm'); +const escape = (regex = defaultRegex) => str => str.replace(regex, char => '\\' + char); + +export { + _find, + escape, + attr, +}; diff --git a/node_modules/slow-json-stringify/src/sjs.mjs b/node_modules/slow-json-stringify/src/sjs.mjs new file mode 100644 index 00000000..3781a235 --- /dev/null +++ b/node_modules/slow-json-stringify/src/sjs.mjs @@ -0,0 +1,47 @@ +import _prepare from './_prepare'; +import _makeQueue from './_makeQueue'; +import _makeChunks from './_makeChunks'; +import _select from './_select'; +import { attr, escape } from './_utils'; + +// Doing a lot of preparation work before returning the final function responsible for +// the stringification. +const sjs = (schema) => { + const { preparedString, preparedSchema } = _prepare(schema); + + // Providing preparedSchema for univocal correspondence between created queue and chunks. + // Provided original schema to keep track of the original properties that gets destroied + // during schema preparation => e.g. array stringification method. + const queue = _makeQueue(preparedSchema, schema); + const chunks = _makeChunks(preparedString, queue); + const selectChunk = _select(chunks); + + const { length } = queue; + + // Exposed function + return (obj) => { + let temp = ''; + + // Ditching old implementation for a **MUCH** faster while + let i = 0; + while (true) { + if (i === length) break; + const { serializer, find } = queue[i]; + const raw = find(obj); + + temp += selectChunk(serializer(raw), i); + + i += 1; + } + + const { flag, pure, prevUndef } = chunks[chunks.length - 1]; + + return temp + (flag ? prevUndef : pure); + }; +}; + +export { + sjs, + attr, + escape, +}; diff --git a/node_modules/test/.github/workflows/ci.yml b/node_modules/test/.github/workflows/ci.yml index 6a74c226..1dd3faa6 100644 --- a/node_modules/test/.github/workflows/ci.yml +++ b/node_modules/test/.github/workflows/ci.yml @@ -16,3 +16,7 @@ jobs: node-version: ${{ matrix.node }} - run: npm ci - run: npm test + - name: Run test with experimental flag + run: npm test + env: + NODE_OPTIONS: --experimental-abortcontroller --no-warnings diff --git a/node_modules/test/CHANGELOG.md b/node_modules/test/CHANGELOG.md index 2378b496..d11598a2 100644 --- a/node_modules/test/CHANGELOG.md +++ b/node_modules/test/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## [3.2.1](https://github.com/nodejs/node-core-test/compare/v3.2.0...v3.2.1) (2022-08-03) + + +### Bug Fixes + +* make test runner work even if there is no `AbortSignal` support ([#36](https://github.com/nodejs/node-core-test/issues/36)) ([cb2e4fd](https://github.com/nodejs/node-core-test/commit/cb2e4fd52e782de13dfae3ac3a371aa7e0e94c29)) + +## [3.2.0](https://github.com/nodejs/node-core-test/compare/v3.1.0...v3.2.0) (2022-08-01) + + +### Features + +* add before/after/each hooks ([4ed5d1f](https://github.com/nodejs/node-core-test/commit/4ed5d1fe91d4491889cdfe09f44804b1e7442dad)) +* add support for boolean values for `concurrency` option ([ba8fd71](https://github.com/nodejs/node-core-test/commit/ba8fd7183db7df0a72b2cab2a37ef1e1e6077185)) +* graceful termination on `--test` only ([4071052](https://github.com/nodejs/node-core-test/commit/40710523a76bf6cc182120e82763ddbdb3ceb1be)) +* pass signal on timeout ([3814bf0](https://github.com/nodejs/node-core-test/commit/3814bf04a3b2adea7dda1cf462c03b575eedf46f)) +* recieve and pass AbortSignal ([558abfc](https://github.com/nodejs/node-core-test/commit/558abfc9a691e02f191c61ba16b976c9d5604da1)) +* validate `concurrency` option ([f875da2](https://github.com/nodejs/node-core-test/commit/f875da2bd834f710d4bde40f77bf848f8700de20)) +* validate `timeout` option ([cf78656](https://github.com/nodejs/node-core-test/commit/cf78656f4293253a69d04a1fd4cdc6324d49ee4d)) + + +### Bug Fixes + +* do not report an error when tests are passing ([10146fa](https://github.com/nodejs/node-core-test/commit/10146fa81daa5b808710519b6d458e5d5180f7ba)) +* **doc:** add missing test runner option ([b8bc3be](https://github.com/nodejs/node-core-test/commit/b8bc3be6155c7546b619869948d3b0506eeaca36)) +* **doc:** copyedit `README.md` ([1401584](https://github.com/nodejs/node-core-test/commit/1401584d141b73bab022995f09245436f10727f4)) +* **doc:** fix typos in `test.md` ([8c95f07](https://github.com/nodejs/node-core-test/commit/8c95f07f186f23ba47750d3f1ec5468a6581c96b)) +* empty pending tests queue post running ([2f02171](https://github.com/nodejs/node-core-test/commit/2f02171b589e19aaf427f9a1ea2efda719ef11b7)) +* fix top level `describe` queuing ([c6f554c](https://github.com/nodejs/node-core-test/commit/c6f554c8b7e64bcb45bfde254d493fd199a712dd)) +* **test:** ensure all tests are run and fix failing ones ([#33](https://github.com/nodejs/node-core-test/issues/33)) ([215621e](https://github.com/nodejs/node-core-test/commit/215621e8de2bb98cf940a0eef40adf8c33a1d9b7)) + ## [3.1.0](https://github.com/nodejs/node-core-test/compare/v3.0.1...v3.1.0) (2022-07-20) diff --git a/node_modules/test/README.md b/node_modules/test/README.md index a85ecd9c..66bc7f52 100644 --- a/node_modules/test/README.md +++ b/node_modules/test/README.md @@ -11,6 +11,10 @@ Minimal dependencies, with full test suite. Differences from the core implementation: - Doesn't hide its own stack frames. +- Some features require the use of `--experimental-abortcontroller` CLI flag to + work on Node.js v14.x. It's recommended to pass + `NODE_OPTIONS='--experimental-abortcontroller --no-warnings'` in your env if + you are testing on v14.x. ## Docs @@ -158,7 +162,7 @@ Running tests can also be done using `describe` to declare a suite and `it` to declare a test. A suite is used to organize and group related tests together. `it` is an alias for `test`, except there is no test context passed, -since nesting is done using suites, as demonstrated in this example +since nesting is done using suites. ```js describe('A thing', () => { @@ -178,7 +182,7 @@ describe('A thing', () => { }); ``` -`describe` and `it` are imported from the `test` module +`describe` and `it` are imported from the `test` module. ```mjs import { describe, it } from 'test'; @@ -327,12 +331,18 @@ internally. does not have a name. - `options` {Object} Configuration options for the test. The following properties are supported: - - `concurrency` {number} The number of tests that can be run at the same time. + - `concurrency` {number|boolean} If a number is provided, + then that many tests would run in parallel. + If truthy, it would run (number of cpu cores - 1) + tests in parallel. + For subtests, it will be `Infinity` tests in parallel. + If falsy, it would only run one test at a time. If unspecified, subtests inherit this value from their parent. - **Default:** `1`. + **Default:** `false`. - `only` {boolean} If truthy, and the test context is configured to run `only` tests, then this test will be run. Otherwise, the test is skipped. **Default:** `false`. + - `signal` {AbortSignal} Allows aborting an in-progress test. - `skip` {boolean|string} If truthy, the test is skipped. If a string is provided, that string is displayed in the test results as the reason for skipping the test. **Default:** `false`. @@ -385,9 +395,10 @@ thus prevent the scheduled cancellation. results. **Default:** The `name` property of `fn`, or `''` if `fn` does not have a name. * `options` {Object} Configuration options for the suite. - supports the same options as `test([name][, options][, fn])` -* `fn` {Function} The function under suite. - a synchronous function declaring all subtests and subsuites. + supports the same options as `test([name][, options][, fn])`. +* `fn` {Function|AsyncFunction} The function under suite + declaring all subtests and subsuites. + The first argument to this function is a [`SuiteContext`][] object. **Default:** A no-op function. * Returns: `undefined`. @@ -395,7 +406,7 @@ The `describe()` function imported from the `test` module. Each invocation of this function results in the creation of a Subtest and a test point in the TAP output. After invocation of top level `describe` functions, -all top level tests and suites will execute +all top level tests and suites will execute. ## `describe.skip([name][, options][, fn])` @@ -432,12 +443,166 @@ same as [`it([name], { skip: true }[, fn])`][it options]. Shorthand for marking a test as `TODO`, same as [`it([name], { todo: true }[, fn])`][it options]. +### `before([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. + If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running before running a suite. + +```js +describe('tests', async () => { + before(() => console.log('about to run some test')); + it('is a subtest', () => { + assert.ok('some relevant assertion here'); + }); +}); +``` + +### `after([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. + If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running after running a suite. + +```js +describe('tests', async () => { + after(() => console.log('finished running tests')); + it('is a subtest', () => { + assert.ok('some relevant assertion here'); + }); +}); +``` + +### `beforeEach([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. + If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running +before each subtest of the current suite. + +```js +describe('tests', async () => { + beforeEach(() => t.diagnostics('about to run a test')); + it('is a subtest', () => { + assert.ok('some relevant assertion here'); + }); +}); +``` + +### `afterEach([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. + If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running +after each subtest of the current test. + +```js +describe('tests', async () => { + afterEach(() => t.diagnostics('about to run a test')); + it('is a subtest', () => { + assert.ok('some relevant assertion here'); + }); +}); +``` + ## Class: `TestContext` An instance of `TestContext` is passed to each test function in order to interact with the test runner. However, the `TestContext` constructor is not exposed as part of the API. +### `context.beforeEach([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. The first argument + to this function is a [`TestContext`][] object. If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running +before each subtest of the current test. + +```js +test('top level test', async (t) => { + t.beforeEach((t) => t.diagnostics(`about to run ${t.name}`)); + await t.test( + 'This is a subtest', + (t) => { + assert.ok('some relevant assertion here'); + } + ); +}); +``` + +### `context.afterEach([, fn][, options])` + +* `fn` {Function|AsyncFunction} The hook function. The first argument + to this function is a [`TestContext`][] object. If the hook uses callbacks, + the callback function is passed as the second argument. **Default:** A no-op + function. +* `options` {Object} Configuration options for the hook. The following + properties are supported: + * `signal` {AbortSignal} Allows aborting an in-progress hook. + * `timeout` {number} A number of milliseconds the hook will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. + +This function is used to create a hook running +after each subtest of the current test. + +```js +test('top level test', async (t) => { + t.afterEach((t) => t.diagnostics(`finished running ${t.name}`)); + await t.test( + 'This is a subtest', + (t) => { + assert.ok('some relevant assertion here'); + } + ); +}); +``` + ### `context.diagnostic(message)` - `message` {string} Message to be displayed as a TAP diagnostic. @@ -446,6 +611,10 @@ This function is used to write TAP diagnostics to the output. Any diagnostic information is included at the end of the test's results. This function does not return a value. + `context.name` + +The name of the test. + ### `context.runOnly(shouldRunOnlyTests)` - `shouldRunOnlyTests` {boolean} Whether or not to run `only` tests. @@ -455,6 +624,21 @@ have the `only` option set. Otherwise, all tests are run. If Node.js was not started with the [`--test-only`][] command-line option, this function is a no-op. +### `context.signal` + +* [`AbortSignal`][] Can be used to abort test subtasks when the test has been aborted. + +> **Warning** +> On Node.js v14.x, this feature won't be available unless you pass the +> `--experimental-abortcontroller` CLI flag or added an external global polyfill +> for `AbortController`. + +```js +test('top level test', async (t) => { + await fetch('some/uri', { signal: t.signal }); +}); +``` + ### `context.skip([message])` - `message` {string} Optional skip message to be displayed in TAP output. @@ -488,6 +672,7 @@ execution of the test function. This function does not return a value. - `skip` {boolean|string} If truthy, the test is skipped. If a string is provided, that string is displayed in the test results as the reason for skipping the test. **Default:** `false`. + - `signal` {AbortSignal} Allows aborting an in-progress test. - `todo` {boolean|string} If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in the test results as the reason why the test is `TODO`. **Default:** `false`. @@ -503,8 +688,30 @@ execution of the test function. This function does not return a value. This function is used to create subtests under the current test. This function behaves in the same fashion as the top level [`test()`][] function. -[tap]: https://testanything.org/ -[`testcontext`]: #class-testcontext +## Class: `SuiteContext` + +An instance of `SuiteContext` is passed to each suite function in order to +interact with the test runner. However, the `SuiteContext` constructor is not +exposed as part of the API. + +### `context.name` + +The name of the suite. + +### `context.signal` + +* [`AbortSignal`][] Can be used to abort test subtasks when the test has been aborted. + +> **Warning** +> On Node.js v14.x, this feature won't be available unless you pass the +> `--experimental-abortcontroller` CLI flag or added an external global polyfill +> for `AbortController`. + + +[`AbortSignal`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal +[TAP]: https://testanything.org/ +[`SuiteContext`]: #class-suitecontext +[`TestContext`]: #class-testcontext [`test()`]: #testname-options-fn [describe options]: #describename-options-fn [it options]: #testname-options-fn diff --git a/node_modules/test/lib/internal/abort_controller.js b/node_modules/test/lib/internal/abort_controller.js new file mode 100644 index 00000000..36ce226e --- /dev/null +++ b/node_modules/test/lib/internal/abort_controller.js @@ -0,0 +1,30 @@ +'use strict' + +if (typeof AbortController === 'undefined') { + // Node.js AbortController implementation is behind a CLI flag. + // This is a minimal mock to make the code work if the native + // implementation in not available. + module.exports = { + AbortController: class AbortController { + #eventListeners = new Set() + signal = { + aborted: false, + addEventListener: (_, listener) => { + this.#eventListeners.add(listener) + }, + removeEventListener: (_, listener) => { + this.#eventListeners.delete(listener) + } + } + + abort () { + this.signal.aborted = true + this.#eventListeners.forEach(listener => listener()) + } + } + } +} else { + module.exports = { + AbortController + } +} diff --git a/node_modules/test/lib/internal/errors.js b/node_modules/test/lib/internal/errors.js index b223d01a..8f3a07e9 100644 --- a/node_modules/test/lib/internal/errors.js +++ b/node_modules/test/lib/internal/errors.js @@ -16,8 +16,10 @@ const { ReflectApply, SafeMap, SafeWeakMap, + StringPrototypeIncludes, StringPrototypeMatch, StringPrototypeStartsWith, + StringPrototypeSlice, Symbol, SymbolFor } = require('#internal/per_context/primordials') @@ -329,7 +331,16 @@ function hideInternalStackFrames (error) { }) } +class AbortError extends Error { + constructor (message = 'The operation was aborted', options = undefined) { + super(message, options) + this.code = 'ABORT_ERR' + this.name = 'AbortError' + } +} + module.exports = { + AbortError, codes, inspectWithNoCustomRetry, kIsNodeError @@ -350,3 +361,22 @@ E('ERR_TEST_FAILURE', function (error, failureType) { this.cause = error return msg }, Error) +E('ERR_INVALID_ARG_TYPE', + (name, expected, actual) => `Expected ${name} to be ${expected}, got type ${typeof actual}`, + TypeError) +E('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { + let inspected + try { + inspected = String(value) + } catch { + inspected = `type ${typeof value}` + } + if (inspected.length > 128) { + inspected = `${StringPrototypeSlice(inspected, 0, 128)}...` + } + const type = StringPrototypeIncludes(name, '.') ? 'property' : 'argument' + return `The ${type} '${name}' ${reason}. Received ${inspected}` +}, TypeError, RangeError) +E('ERR_OUT_OF_RANGE', + (name, expected, actual) => `Expected ${name} to be ${expected}, got ${actual}`, + RangeError) diff --git a/node_modules/test/lib/internal/main/test_runner.js b/node_modules/test/lib/internal/main/test_runner.js index 3955d786..db41695c 100644 --- a/node_modules/test/lib/internal/main/test_runner.js +++ b/node_modules/test/lib/internal/main/test_runner.js @@ -1,15 +1,14 @@ -// https://github.com/nodejs/node/blob/e2225ba8e1c00995c0f8bd56e607ea7c5b463ab9/lib/internal/main/test_runner.js +// https://github.com/nodejs/node/blob/2fd4c013c221653da2a7921d08fe1aa96aaba504/lib/internal/main/test_runner.js 'use strict' const { ArrayFrom, ArrayPrototypeFilter, ArrayPrototypeIncludes, + ArrayPrototypeJoin, ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSort, - Promise, - PromiseAll, - SafeArrayIterator, + SafePromiseAll, SafeSet } = require('#internal/per_context/primordials') const { @@ -17,13 +16,12 @@ const { } = require('#internal/bootstrap/pre_execution') const { spawn } = require('child_process') const { readdirSync, statSync } = require('fs') -const { finished } = require('#internal/streams/end-of-stream') -const console = require('#internal/console/global') const { codes: { ERR_TEST_FAILURE } } = require('#internal/errors') +const { toArray } = require('#internal/streams/operators').promiseReturningOperators const { test } = require('#internal/test_runner/harness') const { kSubtestsFailed } = require('#internal/test_runner/test') const { @@ -31,6 +29,7 @@ const { doesPathMatchFilter } = require('#internal/test_runner/utils') const { basename, join, resolve } = require('path') +const { once } = require('events') const kFilterArgs = ['--test'] prepareMainThreadExecution(false) @@ -104,53 +103,39 @@ function filterExecArgv (arg) { } function runTestFile (path) { - return test(path, () => { - return new Promise((resolve, reject) => { - const args = ArrayPrototypeFilter(process.execArgv, filterExecArgv) - ArrayPrototypePush(args, path) - - const child = spawn(process.execPath, args) - // TODO(cjihrig): Implement a TAP parser to read the child's stdout - // instead of just displaying it all if the child fails. - let stdout = '' - let stderr = '' - let err - - child.on('error', (error) => { - err = error - }) - - child.stdout.setEncoding('utf8') - child.stderr.setEncoding('utf8') - - child.stdout.on('data', (chunk) => { - stdout += chunk - }) - - child.stderr.on('data', (chunk) => { - stderr += chunk - }) - - child.once('exit', async (code, signal) => { - if (code !== 0 || signal !== null) { - if (!err) { - await PromiseAll(new SafeArrayIterator([finished(child.stderr), finished(child.stdout)])) - err = new ERR_TEST_FAILURE('test failed', kSubtestsFailed) - err.exitCode = code - err.signal = signal - err.stdout = stdout - err.stderr = stderr - // The stack will not be useful since the failures came from tests - // in a child process. - err.stack = undefined - } - - return reject(err) - } - - resolve() - }) + return test(path, async (t) => { + const args = ArrayPrototypeFilter(process.execArgv, filterExecArgv) + ArrayPrototypePush(args, path) + + const child = spawn(process.execPath, args, { signal: t.signal, encoding: 'utf8' }) + // TODO(cjihrig): Implement a TAP parser to read the child's stdout + // instead of just displaying it all if the child fails. + let err + + child.on('error', (error) => { + err = error }) + + const { 0: { 0: code, 1: signal }, 1: stdout, 2: stderr } = await SafePromiseAll([ + once(child, 'exit', { signal: t.signal }), + toArray.call(child.stdout, { signal: t.signal }), + toArray.call(child.stderr, { signal: t.signal }) + ]) + + if (code !== 0 || signal !== null) { + if (!err) { + err = new ERR_TEST_FAILURE('test failed', kSubtestsFailed) + err.exitCode = code + err.signal = signal + err.stdout = ArrayPrototypeJoin(stdout, '') + err.stderr = ArrayPrototypeJoin(stderr, '') + // The stack will not be useful since the failures came from tests + // in a child process. + err.stack = undefined + } + + throw err + } }) } diff --git a/node_modules/test/lib/internal/per_context/primordials.js b/node_modules/test/lib/internal/per_context/primordials.js index 98a3f3b9..e599da92 100644 --- a/node_modules/test/lib/internal/per_context/primordials.js +++ b/node_modules/test/lib/internal/per_context/primordials.js @@ -7,6 +7,7 @@ exports.ArrayPrototypeFilter = (arr, fn) => arr.filter(fn) exports.ArrayPrototypeForEach = (arr, fn, thisArg) => arr.forEach(fn, thisArg) exports.ArrayPrototypeIncludes = (arr, el, fromIndex) => arr.includes(el, fromIndex) exports.ArrayPrototypeJoin = (arr, str) => arr.join(str) +exports.ArrayPrototypeMap = (arr, mapFn) => arr.map(mapFn) exports.ArrayPrototypePush = (arr, ...el) => arr.push(...el) exports.ArrayPrototypeReduce = (arr, fn, originalVal) => arr.reduce(fn, originalVal) exports.ArrayPrototypeShift = arr => arr.shift() @@ -17,6 +18,7 @@ exports.Error = Error exports.ErrorCaptureStackTrace = (...args) => Error.captureStackTrace(...args) exports.FunctionPrototype = Function.prototype exports.FunctionPrototypeBind = (fn, obj, ...args) => fn.bind(obj, ...args) +exports.MathMax = (...args) => Math.max(...args) exports.Number = Number exports.ObjectCreate = obj => Object.create(obj) exports.ObjectDefineProperties = (obj, props) => Object.defineProperties(obj, props) @@ -26,21 +28,26 @@ exports.ObjectFreeze = obj => Object.freeze(obj) exports.ObjectGetOwnPropertyDescriptor = (obj, key) => Object.getOwnPropertyDescriptor(obj, key) exports.ObjectIsExtensible = obj => Object.isExtensible(obj) exports.ObjectPrototypeHasOwnProperty = (obj, property) => Object.prototype.hasOwnProperty.call(obj, property) +exports.ObjectSeal = (obj) => Object.seal(obj) exports.ReflectApply = (target, self, args) => Reflect.apply(target, self, args) exports.Promise = Promise exports.PromiseAll = iterator => Promise.all(iterator) +exports.PromisePrototypeThen = (promise, thenFn, catchFn) => promise.then(thenFn, catchFn) exports.PromiseResolve = val => Promise.resolve(val) exports.PromiseRace = val => Promise.race(val) exports.SafeArrayIterator = class ArrayIterator {constructor (array) { this.array = array }[Symbol.iterator] () { return this.array.values() }} exports.SafeMap = Map -exports.SafePromiseAll = (array, mapFn) => Promise.all(array.map(mapFn)) +exports.SafePromiseAll = (array, mapFn) => Promise.all(mapFn ? array.map(mapFn) : array) +exports.SafePromiseRace = (array, mapFn) => Promise.race(mapFn ? array.map(mapFn) : array) exports.SafeSet = Set exports.SafeWeakMap = WeakMap +exports.StringPrototypeIncludes = (str, needle) => str.includes(needle) exports.StringPrototypeMatch = (str, reg) => str.match(reg) exports.StringPrototypeReplace = (str, search, replacement) => str.replace(search, replacement) exports.StringPrototypeReplaceAll = replaceAll exports.StringPrototypeStartsWith = (haystack, needle, index) => haystack.startsWith(needle, index) +exports.StringPrototypeSlice = (str, ...args) => str.slice(...args) exports.StringPrototypeSplit = (str, search, limit) => str.split(search, limit) exports.Symbol = Symbol exports.SymbolFor = repr => Symbol.for(repr) diff --git a/node_modules/test/lib/internal/streams/operators.js b/node_modules/test/lib/internal/streams/operators.js new file mode 100644 index 00000000..a29662b6 --- /dev/null +++ b/node_modules/test/lib/internal/streams/operators.js @@ -0,0 +1,24 @@ +const { + ArrayPrototypePush +} = require('#internal/per_context/primordials') +const { validateAbortSignal } = require('#internal/validators') +const { AbortError } = require('#internal/errors') + +async function toArray (options) { + if (options?.signal != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + const result = [] + for await (const val of this) { + if (options?.signal?.aborted) { + throw new AbortError(undefined, { cause: options.signal.reason }) + } + ArrayPrototypePush(result, val) + } + return result +} + +module.exports.promiseReturningOperators = { + toArray +} diff --git a/node_modules/test/lib/internal/test_runner/harness.js b/node_modules/test/lib/internal/test_runner/harness.js index 8c5dcc95..4d6e9c42 100644 --- a/node_modules/test/lib/internal/test_runner/harness.js +++ b/node_modules/test/lib/internal/test_runner/harness.js @@ -1,4 +1,4 @@ -// https://github.com/nodejs/node/blob/1523a1817ed9b06fb51c0149451f9ea31bd2756e/lib/internal/test_runner/harness.js +// https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac/lib/internal/test_runner/harness.js 'use strict' const { ArrayPrototypeForEach, @@ -14,8 +14,10 @@ const { ERR_TEST_FAILURE } } = require('#internal/errors') +const { getOptionValue } = require('#internal/options') const { Test, ItTest, Suite } = require('#internal/test_runner/test') +const isTestRunner = getOptionValue('--test') const testResources = new SafeMap() const root = new Test({ __proto__: null, name: '' }) let wasRootSetup = false @@ -136,8 +138,11 @@ function setup (root) { process.on('uncaughtException', exceptionHandler) process.on('unhandledRejection', rejectionHandler) process.on('beforeExit', exitHandler) - process.on('SIGINT', terminationHandler) - process.on('SIGTERM', terminationHandler) + // TODO(MoLow): Make it configurable to hook when isTestRunner === false. + if (isTestRunner) { + process.on('SIGINT', terminationHandler) + process.on('SIGTERM', terminationHandler) + } root.reporter.pipe(process.stdout) root.reporter.version() @@ -172,8 +177,19 @@ function runInParentContext (Factory) { return cb } +function hook (hook) { + return (fn, options) => { + const parent = testResources.get(executionAsyncId()) || setup(root) + parent.createHook(hook, fn, options) + } +} + module.exports = { test: FunctionPrototypeBind(test, root), describe: runInParentContext(Suite), - it: runInParentContext(ItTest) + it: runInParentContext(ItTest), + before: hook('before'), + after: hook('after'), + beforeEach: hook('beforeEach'), + afterEach: hook('afterEach') } diff --git a/node_modules/test/lib/internal/test_runner/test.js b/node_modules/test/lib/internal/test_runner/test.js index f3169a7d..9b8ce59c 100644 --- a/node_modules/test/lib/internal/test_runner/test.js +++ b/node_modules/test/lib/internal/test_runner/test.js @@ -1,35 +1,51 @@ -// https://github.com/nodejs/node/blob/e2225ba8e1c00995c0f8bd56e607ea7c5b463ab9/lib/internal/test_runner/test.js +// https://github.com/nodejs/node/blob/5ec2d7bc5deed26ac640feff279800e39dacc9c0/lib/internal/test_runner/test.js 'use strict' const { ArrayPrototypePush, + ArrayPrototypeReduce, ArrayPrototypeShift, + ArrayPrototypeSlice, ArrayPrototypeUnshift, FunctionPrototype, + MathMax, Number, + ObjectSeal, + PromisePrototypeThen, + PromiseResolve, ReflectApply, SafeMap, - PromiseRace, - SafePromiseAll + SafePromiseAll, + SafePromiseRace, + Symbol } = require('#internal/per_context/primordials') const { AsyncResource } = require('async_hooks') +const { once } = require('events') +const { AbortController } = require('#internal/abort_controller') const { codes: { + ERR_INVALID_ARG_TYPE, ERR_TEST_FAILURE }, - kIsNodeError + AbortError } = require('#internal/errors') const { getOptionValue } = require('#internal/options') const { TapStream } = require('#internal/test_runner/tap_stream') -const { createDeferredCallback } = require('#internal/test_runner/utils') +const { createDeferredCallback, isTestFailureError } = require('#internal/test_runner/utils') const { createDeferredPromise, kEmptyObject } = require('#internal/util') const { isPromise } = require('#internal/util/types') -const { isUint32 } = require('#internal/validators') +const { + validateAbortSignal, + validateNumber, + validateOneOf, + validateUint32 +} = require('#internal/validators') const { setTimeout } = require('#timers/promises') +const { TIMEOUT_MAX } = require('#internal/timers') const { cpus } = require('os') const { bigint: hrtime } = process.hrtime const kCallbackAndPromisePresent = 'callbackAndPromisePresent' @@ -38,27 +54,28 @@ const kParentAlreadyFinished = 'parentAlreadyFinished' const kSubtestsFailed = 'subtestsFailed' const kTestCodeFailure = 'testCodeFailure' const kTestTimeoutFailure = 'testTimeoutFailure' +const kHookFailure = 'hookFailed' const kDefaultIndent = ' ' const kDefaultTimeout = null const noop = FunctionPrototype const isTestRunner = getOptionValue('--test') const testOnlyFlag = !isTestRunner && getOptionValue('--test-only') // TODO(cjihrig): Use uv_available_parallelism() once it lands. -const rootConcurrency = isTestRunner ? cpus().length : 1 +const rootConcurrency = isTestRunner ? MathMax(cpus().length - 1, 1) : 1 +const kShouldAbort = Symbol('kShouldAbort') +const kRunHook = Symbol('kRunHook') +const kHookNames = ObjectSeal(['before', 'after', 'beforeEach', 'afterEach']) -function testTimeout (promise, timeout) { +function stopTest (timeout, signal) { if (timeout === kDefaultTimeout) { - return promise - } - return PromiseRace([ - promise, - setTimeout(timeout, null, { ref: false }).then(() => { - throw new ERR_TEST_FAILURE( - `test timed out after ${timeout}ms`, - kTestTimeoutFailure - ) - }) - ]) + return once(signal, 'abort') + } + return PromisePrototypeThen(setTimeout(timeout, null, { ref: false, signal }), () => { + throw new ERR_TEST_FAILURE( + `test timed out after ${timeout}ms`, + kTestTimeoutFailure + ) + }) } class TestContext { @@ -68,6 +85,14 @@ class TestContext { this.#test = test } + get signal () { + return this.#test.signal + } + + get name () { + return this.#test.name + } + diagnostic (message) { this.#test.diagnostic(message) } @@ -90,14 +115,25 @@ class TestContext { return subtest.start() } + + beforeEach (fn, options) { + this.#test.createHook('beforeEach', fn, options) + } + + afterEach (fn, options) { + this.#test.createHook('afterEach', fn, options) + } } class Test extends AsyncResource { + #abortController + #outerSignal + constructor (options) { super('Test') let { fn, name, parent, skip } = options - const { concurrency, only, timeout, todo } = options + const { concurrency, only, timeout, todo, signal } = options if (typeof fn !== 'function') { fn = noop @@ -135,11 +171,26 @@ class Test extends AsyncResource { this.timeout = parent.timeout } - if (isUint32(concurrency) && concurrency !== 0) { - this.concurrency = concurrency + switch (typeof concurrency) { + case 'number': + validateUint32(concurrency, 'options.concurrency', 1) + this.concurrency = concurrency + break + + case 'boolean': + if (concurrency) { + this.concurrency = isTestRunner ? MathMax(cpus().length - 1, 1) : Infinity + } else { + this.concurrency = 1 + } + break + + default: + if (concurrency != null) throw new ERR_INVALID_ARG_TYPE('options.concurrency', 'a number or boolean', concurrency) } - if (isUint32(timeout)) { + if (timeout != null && timeout !== Infinity) { + validateNumber(timeout, 'options.timeout', 0, TIMEOUT_MAX) this.timeout = timeout } @@ -151,6 +202,13 @@ class Test extends AsyncResource { fn = noop } + this.#abortController = new AbortController() + this.#outerSignal = signal + this.signal = this.#abortController.signal + + validateAbortSignal(signal, 'options.signal') + this.#outerSignal?.addEventListener('abort', this.#abortHandler) + this.fn = fn this.name = name this.parent = parent @@ -169,6 +227,12 @@ class Test extends AsyncResource { this.pendingSubtests = [] this.readySubtests = new SafeMap() this.subtests = [] + this.hooks = { + before: [], + after: [], + beforeEach: [], + afterEach: [] + } this.waitingOn = 0 this.finished = false } @@ -245,7 +309,8 @@ class Test extends AsyncResource { // If this test has already ended, attach this test to the root test so // that the error can be properly reported. - if (this.finished) { + const preventAddingSubtests = this.finished || this.buildPhaseFinished + if (preventAddingSubtests) { while (parent.parent !== null) { parent = parent.parent } @@ -257,7 +322,7 @@ class Test extends AsyncResource { parent.waitingOn = test.testNumber } - if (this.finished) { + if (preventAddingSubtests) { test.startTime = test.startTime || hrtime() test.fail( new ERR_TEST_FAILURE( @@ -271,18 +336,32 @@ class Test extends AsyncResource { return test } - cancel () { + #abortHandler = () => { + this.cancel(this.#outerSignal?.reason || new AbortError('The test was aborted')) + } + + cancel (error) { if (this.endTime !== null) { return } - this.fail( + this.fail(error || new ERR_TEST_FAILURE( 'test did not finish before its parent and was cancelled', kCancelledByParent ) ) + this.startTime = this.startTime || this.endTime // If a test was canceled before it was started, e.g inside a hook this.cancelled = true + this.#abortController.abort() + } + + createHook (name, fn, options) { + validateOneOf(name, 'hook name', kHookNames) + // eslint-disable-next-line no-use-before-define + const hook = new TestHook(fn, options) + ArrayPrototypePush(this.hooks[name], hook) + return hook } fail (err) { @@ -333,44 +412,97 @@ class Test extends AsyncResource { return this.run() } + [kShouldAbort] () { + if (this.signal.aborted) { + return true + } + if (this.#outerSignal?.aborted) { + this.cancel(this.#outerSignal.reason || new AbortError('The test was aborted')) + return true + } + } + getRunArgs () { const ctx = new TestContext(this) return { ctx, args: [ctx] } } + async [kRunHook] (hook, args) { + validateOneOf(hook, 'hook name', kHookNames) + try { + await ArrayPrototypeReduce(this.hooks[hook], async (prev, hook) => { + await prev + await hook.run(args) + if (hook.error) { + throw hook.error + } + }, PromiseResolve()) + } catch (err) { + const error = new ERR_TEST_FAILURE(`failed running ${hook} hook`, kHookFailure) + error.cause = isTestFailureError(err) ? err.cause : err + throw error + } + } + async run () { - this.parent.activeSubtests++ + if (this.parent !== null) { + this.parent.activeSubtests++ + } this.startTime = hrtime() + if (this[kShouldAbort]()) { + this.postRun() + return + } + try { const { args, ctx } = this.getRunArgs() - ArrayPrototypeUnshift(args, this.fn, ctx) // Note that if it's not OK to mutate args, we need to first clone it. + if (this.parent?.hooks.beforeEach.length > 0) { + await this.parent[kRunHook]('beforeEach', { args, ctx }) + } + const stopPromise = stopTest(this.timeout, this.signal) + const runArgs = ArrayPrototypeSlice(args) + ArrayPrototypeUnshift(runArgs, this.fn, ctx) - if (this.fn.length === args.length - 1) { + if (this.fn.length === runArgs.length - 1) { // This test is using legacy Node.js error first callbacks. const { promise, cb } = createDeferredCallback() - ArrayPrototypePush(args, cb) - const ret = ReflectApply(this.runInAsyncScope, this, args) + ArrayPrototypePush(runArgs, cb) + const ret = ReflectApply(this.runInAsyncScope, this, runArgs) if (isPromise(ret)) { this.fail(new ERR_TEST_FAILURE( 'passed a callback but also returned a Promise', kCallbackAndPromisePresent )) - await testTimeout(ret, this.timeout) + await SafePromiseRace([ret, stopPromise]) } else { - await testTimeout(promise, this.timeout) + await SafePromiseRace([PromiseResolve(promise), stopPromise]) } } else { // This test is synchronous or using Promises. - await testTimeout(ReflectApply(this.runInAsyncScope, this, args), this.timeout) + const promise = ReflectApply(this.runInAsyncScope, this, runArgs) + await SafePromiseRace([PromiseResolve(promise), stopPromise]) + } + + if (this[kShouldAbort]()) { + this.postRun() + return + } + + if (this.parent?.hooks.afterEach.length > 0) { + await this.parent[kRunHook]('afterEach', { args, ctx }) } this.pass() } catch (err) { - if (err?.code === 'ERR_TEST_FAILURE' && kIsNodeError in err) { - this.fail(err) + if (isTestFailureError(err)) { + if (err.failureType === kTestTimeoutFailure) { + this.cancel(err) + } else { + this.fail(err) + } } else { this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)) } @@ -393,6 +525,7 @@ class Test extends AsyncResource { // The test has run, so recursively cancel any outstanding subtests and // mark this test as failed if any subtests failed. + this.pendingSubtests = [] for (let i = 0; i < this.subtests.length; i++) { const subtest = this.subtests[i] @@ -413,6 +546,8 @@ class Test extends AsyncResource { this.fail(new ERR_TEST_FAILURE(msg, kSubtestsFailed)) } + this.#outerSignal?.removeEventListener('abort', this.#abortHandler) + if (this.parent !== null) { this.parent.activeSubtests-- this.parent.addReadySubtest(this) @@ -477,10 +612,30 @@ class Test extends AsyncResource { } } +class TestHook extends Test { + #args + constructor (fn, options) { + if (options === null || typeof options !== 'object') { + options = kEmptyObject + } + const { timeout, signal } = options + super({ __proto__: null, fn, timeout, signal }) + } + + run (args) { + this.#args = args + return super.run() + } + + getRunArgs () { + return this.#args + } +} + class ItTest extends Test { constructor (opt) { super(opt) } // eslint-disable-line no-useless-constructor getRunArgs () { - return { ctx: {}, args: [] } + return { ctx: { signal: this.signal, name: this.name }, args: [] } } } class Suite extends Test { @@ -488,29 +643,53 @@ class Suite extends Test { super(options) try { - this.buildSuite = this.runInAsyncScope(this.fn) + const { ctx, args } = this.getRunArgs() + this.buildSuite = PromisePrototypeThen( + PromiseResolve(this.runInAsyncScope(this.fn, ctx, args)), + undefined, + (err) => { + this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)) + }) } catch (err) { this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)) } this.fn = () => {} - this.finished = true // Forbid adding subtests to this suite + this.buildPhaseFinished = true } - start () { - return this.run() + getRunArgs () { + return { ctx: { signal: this.signal, name: this.name }, args: [] } } async run () { try { + this.parent.activeSubtests++ await this.buildSuite + this.startTime = hrtime() + + if (this[kShouldAbort]()) { + this.subtests = [] + this.postRun() + return + } + + const hookArgs = this.getRunArgs() + await this[kRunHook]('before', hookArgs) + const stopPromise = stopTest(this.timeout, this.signal) + const subtests = this.skipped || this.error ? [] : this.subtests + const promise = SafePromiseAll(subtests, (subtests) => subtests.start()) + + await SafePromiseRace([promise, stopPromise]) + await this[kRunHook]('after', hookArgs) + this.pass() } catch (err) { - this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)) + if (isTestFailureError(err)) { + this.fail(err) + } else { + this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)) + } } - this.parent.activeSubtests++ - this.startTime = hrtime() - const subtests = this.skipped || this.error ? [] : this.subtests - await SafePromiseAll(subtests, (subtests) => subtests.start()) - this.pass() + this.postRun() } } diff --git a/node_modules/test/lib/internal/test_runner/utils.js b/node_modules/test/lib/internal/test_runner/utils.js index 647ec75f..595431e5 100644 --- a/node_modules/test/lib/internal/test_runner/utils.js +++ b/node_modules/test/lib/internal/test_runner/utils.js @@ -1,4 +1,4 @@ -// https://github.com/nodejs/node/blob/e2225ba8e1c00995c0f8bd56e607ea7c5b463ab9/lib/internal/test_runner/utils.js +// https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac/lib/internal/test_runner/utils.js 'use strict' const { RegExpPrototypeExec } = require('#internal/per_context/primordials') const { basename } = require('path') @@ -6,7 +6,8 @@ const { createDeferredPromise } = require('#internal/util') const { codes: { ERR_TEST_FAILURE - } + }, + kIsNodeError } = require('#internal/errors') const kMultipleCallbackInvocations = 'multipleCallbackInvocations' @@ -50,8 +51,13 @@ function createDeferredCallback () { return { promise, cb } } +function isTestFailureError (err) { + return err?.code === 'ERR_TEST_FAILURE' && kIsNodeError in err +} + module.exports = { createDeferredCallback, doesPathMatchFilter, - isSupportedFileType + isSupportedFileType, + isTestFailureError } diff --git a/node_modules/test/lib/internal/timers.js b/node_modules/test/lib/internal/timers.js new file mode 100644 index 00000000..482fdb44 --- /dev/null +++ b/node_modules/test/lib/internal/timers.js @@ -0,0 +1,7 @@ +'use strict' + +const TIMEOUT_MAX = 2 ** 31 - 1 + +module.exports = { + TIMEOUT_MAX +} diff --git a/node_modules/test/lib/internal/validators.js b/node_modules/test/lib/internal/validators.js index 453b865c..511e61bf 100644 --- a/node_modules/test/lib/internal/validators.js +++ b/node_modules/test/lib/internal/validators.js @@ -1,8 +1,73 @@ -// https://github.com/nodejs/node/blob/1aab13cad9c800f4121c1d35b554b78c1b17bdbd/lib/internal/validators.js +// https://github.com/nodejs/node/blob/60da0a1b364efdd84870269d23b39faa12fb46d8/lib/internal/validators.js +const { + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypeMap +} = require('#internal/per_context/primordials') +const { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_ARG_VALUE, + ERR_OUT_OF_RANGE +} = require('#internal/errors').codes + function isUint32 (value) { return value === (value >>> 0) } +function validateNumber (value, name, min = undefined, max) { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE(name, 'a number', value) + } + + if ((min != null && value < min) || (max != null && value > max) || + ((min != null || max != null) && Number.isNaN(value))) { + throw new ERR_OUT_OF_RANGE( + name, + `${min != null ? `>= ${min}` : ''}${min != null && max != null ? ' && ' : ''}${max != null ? `<= ${max}` : ''}`, + value + ) + } +} + +const validateAbortSignal = (signal, name) => { + if (signal !== undefined && + (signal === null || + typeof signal !== 'object' || + !('aborted' in signal))) { + throw new ERR_INVALID_ARG_TYPE(name, 'an AbortSignal', signal) + } +} + +const validateUint32 = (value, name, positive) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE(name, 'a number', value) + } + if (!Number.isInteger(value)) { + throw new ERR_OUT_OF_RANGE(name, 'an integer', value) + } + const min = positive ? 1 : 0 + // 2 ** 32 === 4294967296 + const max = 4_294_967_295 + if (value < min || value > max) { + throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value) + } +} + +const validateOneOf = (value, name, oneOf) => { + if (!ArrayPrototypeIncludes(oneOf, value)) { + const allowed = ArrayPrototypeJoin( + ArrayPrototypeMap(oneOf, (v) => + (typeof v === 'string' ? `'${v}'` : String(v))), + ', ') + const reason = 'must be one of: ' + allowed + throw new ERR_INVALID_ARG_VALUE(name, value, reason) + } +} + module.exports = { - isUint32 + isUint32, + validateAbortSignal, + validateNumber, + validateOneOf, + validateUint32 } diff --git a/node_modules/test/lib/test.d.ts b/node_modules/test/lib/test.d.ts index 35f22fa2..29e794bb 100644 --- a/node_modules/test/lib/test.d.ts +++ b/node_modules/test/lib/test.d.ts @@ -3,43 +3,54 @@ interface TestOptions { * The number of tests that can be run at the same time. If unspecified, subtests inherit this value from their parent. * Default: 1. */ - concurrency?: number + concurrency?: boolean | number; /** * If truthy, the test is skipped. If a string is provided, that string is displayed in the test results as the reason for skipping the test. * Default: false. */ - skip?: boolean | string + skip?: boolean | string; /** * If truthy, the test marked as TODO. If a string is provided, that string is displayed in the test results as the reason why the test is TODO. * Default: false. */ - todo?: boolean | string + todo?: boolean | string; + + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this value from their parent. + * Default: Infinity + */ + timeout?: number; + + /** + * Allows aborting an in-progress test + */ + signal?: AbortSignal; } -type TestFn = (t: TestContext) => any | Promise +type TestFn = (t: TestContext) => any | Promise; -export default test +export default test; -export function test (name: string, options: TestOptions, fn: TestFn): void -export function test (name: string, fn: TestFn): void -export function test (options: TestOptions, fn: TestFn): void -export function test (fn: TestFn): void +export function test(name: string, options: TestOptions, fn: TestFn): void; +export function test(name: string, fn: TestFn): void; +export function test(options: TestOptions, fn: TestFn): void; +export function test(fn: TestFn): void; -type SuiteFn = () => void; +type SuiteFn = (t: SuiteContext) => void; -export function describe (name: string, options: TestOptions, fn: SuiteFn): void -export function describe (name: string, fn: SuiteFn): void -export function describe (options: TestOptions, fn: SuiteFn): void -export function describe (fn: SuiteFn): void +export function describe(name: string, options: TestOptions, fn: SuiteFn): void; +export function describe(name: string, fn: SuiteFn): void; +export function describe(options: TestOptions, fn: SuiteFn): void; +export function describe(fn: SuiteFn): void; -type ItFn = () => any | Promise +type ItFn = (t: ItContext) => any | Promise; -export function it (name: string, options: TestOptions, fn: ItFn): void -export function it (name: string, fn: ItFn): void -export function it (options: TestOptions, fn: ItFn): void -export function it (fn: ItFn): void +export function it(name: string, options: TestOptions, fn: ItFn): void; +export function it(name: string, fn: ItFn): void; +export function it(options: TestOptions, fn: ItFn): void; +export function it(fn: ItFn): void; /** * An instance of TestContext is passed to each test function in order to interact with the test runner. @@ -49,9 +60,9 @@ declare class TestContext { /** * This function is used to create subtests under the current test. This function behaves in the same fashion as the top level test() function. */ - public test (name: string, options: TestOptions, fn: TestFn): Promise - public test (name: string, fn: TestFn): Promise - public test (fn: TestFn): Promise + public test(name: string, options: TestOptions, fn: TestFn): Promise; + public test(name: string, fn: TestFn): Promise; + public test(fn: TestFn): Promise; /** * This function is used to write TAP diagnostics to the output. @@ -59,7 +70,7 @@ declare class TestContext { * * @param message Message to be displayed as a TAP diagnostic. */ - public diagnostic (message: string): void + public diagnostic(message: string): void; /** * This function causes the test's output to indicate the test as skipped. @@ -68,7 +79,7 @@ declare class TestContext { * * @param message Optional skip message to be displayed in TAP output. */ - public skip (message?: string): void + public skip(message?: string): void; /** * This function adds a TODO directive to the test's output. @@ -77,5 +88,32 @@ declare class TestContext { * * @param message Optional TODO message to be displayed in TAP output. */ - public todo (message?: string): void + public todo(message?: string): void; + + /** + * Can be used to abort test subtasks when the test has been aborted. + */ + public signal: AbortSignal; +} + +/** + * An instance of SuiteContext is passed to each suite function in order to interact with the test runner. + * However, the SuiteContext constructor is not exposed as part of the API. + */ +declare class SuiteContext { + /** + * Can be used to abort test subtasks when the test has been aborted. + */ + public signal: AbortSignal; +} + +/** + * An instance of ItContext is passed to each suite function in order to interact with the test runner. + * However, the ItContext constructor is not exposed as part of the API. + */ +declare class ItContext { + /** + * Can be used to abort test subtasks when the test has been aborted. + */ + public signal: AbortSignal; } diff --git a/node_modules/test/lib/test.js b/node_modules/test/lib/test.js index 964c97d1..a65fb3cb 100644 --- a/node_modules/test/lib/test.js +++ b/node_modules/test/lib/test.js @@ -1,10 +1,12 @@ -// https://github.com/nodejs/node/blob/e2225ba8e1c00995c0f8bd56e607ea7c5b463ab9/lib/test.js - +// https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac/lib/test.js 'use strict' - -const { test, describe, it } = require('#internal/test_runner/harness') +const { test, describe, it, before, after, beforeEach, afterEach } = require('#internal/test_runner/harness') module.exports = test module.exports.test = test module.exports.describe = describe module.exports.it = it +module.exports.before = before +module.exports.after = after +module.exports.beforeEach = beforeEach +module.exports.afterEach = afterEach diff --git a/node_modules/test/package.json b/node_modules/test/package.json index 67cba385..8d787e10 100644 --- a/node_modules/test/package.json +++ b/node_modules/test/package.json @@ -1,6 +1,6 @@ { "name": "test", - "version": "3.1.0", + "version": "3.2.1", "description": "Node.js 18's node:test, as an npm package", "license": "MIT", "repository": "nodejs/node-core-test", @@ -20,7 +20,7 @@ "test": "npm run test:lint && npm run test:unit", "test:lint": "standard", "test:lint:fix": "standard --fix", - "test:unit": "node test/parallel/* && node test/message && node test/node-core-test.js" + "test:unit": "node test/parallel.mjs && node test/message.js && node test/node-core-test.js" }, "devDependencies": { "standard": "^17.0.0" diff --git a/node_modules/test/test/common/index.js b/node_modules/test/test/common/index.js index 584d3457..91fcd412 100644 --- a/node_modules/test/test/common/index.js +++ b/node_modules/test/test/common/index.js @@ -102,6 +102,48 @@ function expectsError (validator, exact) { }, exact) } +if (typeof AbortSignal !== 'undefined' && typeof AbortSignal.timeout !== 'function') { + // `AbortSignal.timeout` is not available on Node.js 14.x, we need to polyfill + // it because some tests are using it. End-users don't need to it. + + class AbortError extends Error { + constructor (message = 'The operation was aborted', options = undefined) { + super(message, options) + this.code = 23 + } + } + + AbortSignal.timeout = function timeout (delay) { + const ac = new AbortController() + setTimeout(() => ac.abort(new AbortError( + 'The operation was aborted due to timeout')), delay).unref() + return ac.signal + } +} + +if (typeof AbortSignal !== 'undefined' && (process.version.startsWith('v14.') || process.version.startsWith('v16.'))) { + // Implementation of AbortSignal and AbortController differ slightly with the + // v18.x one, creating some difference on the TAP output which makes the tests + // fail. We are overriding the built-ins to make the test pass, however that's + // not necessary to do for the library to work (i.e. end-users don't need it). + + const defaultAbortError = new Error('This operation was aborted') + defaultAbortError.code = 20 + + AbortSignal.abort = function abort (reason = defaultAbortError) { + const controller = new AbortController() + controller.abort(reason) + return controller.signal + } + const nativeAbort = AbortController.prototype.abort + AbortController.prototype.abort = function abort (reason = defaultAbortError) { + this.signal.reason = reason + nativeAbort.call(this, reason) + } +} + module.exports = { - expectsError + expectsError, + isWindow: process.platform === 'win32', + mustCall } diff --git a/node_modules/test/test/fixtures/test-runner/never_ending_async.js b/node_modules/test/test/fixtures/test-runner/never_ending_async.js new file mode 100644 index 00000000..a47e8b9c --- /dev/null +++ b/node_modules/test/test/fixtures/test-runner/never_ending_async.js @@ -0,0 +1,7 @@ +// https://github.com/nodejs/node/blob/26e27424ad91c60a44d3d4c58b62a39b555ba75d/test/fixtures/test-runner/never_ending_async.js +const test = require('#node:test') +const { setTimeout } = require('#timers/promises') + +// We are using a very large timeout value to ensure that the parent process +// will have time to send a SIGINT signal to cancel the test. +test('never ending test', () => setTimeout(100_000_000)) diff --git a/node_modules/test/test/fixtures/test-runner/never_ending_sync.js b/node_modules/test/test/fixtures/test-runner/never_ending_sync.js new file mode 100644 index 00000000..2bc80a5f --- /dev/null +++ b/node_modules/test/test/fixtures/test-runner/never_ending_sync.js @@ -0,0 +1,6 @@ +// https://github.com/nodejs/node/blob/26e27424ad91c60a44d3d4c58b62a39b555ba75d/test/fixtures/test-runner/never_ending_sync.js +const test = require('#node:test') + +test('never ending test', () => { + while (true); +}) diff --git a/node_modules/test/test/message.js b/node_modules/test/test/message.js old mode 100644 new mode 100755 index 4833163c..45204482 --- a/node_modules/test/test/message.js +++ b/node_modules/test/test/message.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node 'use strict' const { createReadStream, promises: fs } = require('node:fs') @@ -60,9 +61,10 @@ async function IsFailureOutput (self, output) { let waitingForEllipsis = false for (let i = 0; i < outlines.length; i++) { + let regex if (patterns[i] === WAIT_FOR_ELLIPSIS) { waitingForEllipsis = true - } else if (!new RegExp(patterns[i]).test(outlines[i].trimEnd())) { + } else if (!(regex = new RegExp(patterns[i])).test(outlines[i]) && !regex.test(outlines[i].trimEnd())) { if (waitingForEllipsis) { patterns.splice(i, 0, WAIT_FOR_ELLIPSIS) continue @@ -82,6 +84,10 @@ const main = async () => { for await (const dirent of dir) { const ext = extname(dirent.name) if (ext === '.js' || ext === '.mjs') { + if (typeof AbortSignal === 'undefined' && dirent.name.startsWith('test_runner_abort')) { + console.log('no AbortSignal support, skipping', dirent.name) + continue + } const filePath = join(MESSAGE_FOLDER, dirent.name) const expected = filePath.replace(/\.m?js$/, '.out') const testFile = await fs.open(filePath) diff --git a/node_modules/test/test/message/test_runner_abort.js b/node_modules/test/test/message/test_runner_abort.js new file mode 100644 index 00000000..5e1c768c --- /dev/null +++ b/node_modules/test/test/message/test_runner_abort.js @@ -0,0 +1,48 @@ +// https://github.com/nodejs/node/blob/389b7e138e89a339fabe4ad628bf09cd9748f957/test/message/test_runner_abort.js +// Flags: --no-warnings +'use strict' +require('../common') +const test = require('#node:test') + +test('promise timeout signal', { signal: AbortSignal.timeout(1) }, async (t) => { + await Promise.all([ + t.test('ok 1', async () => {}), + t.test('ok 2', () => {}), + t.test('ok 3', { signal: t.signal }, async () => {}), + t.test('ok 4', { signal: t.signal }, () => {}), + t.test('not ok 1', () => new Promise(() => {})), + t.test('not ok 2', (t, done) => {}), + t.test('not ok 3', { signal: t.signal }, () => new Promise(() => {})), + t.test('not ok 4', { signal: t.signal }, (t, done) => {}), + t.test('not ok 5', { signal: t.signal }, (t, done) => { + t.signal.addEventListener('abort', done) + }) + ]) +}) + +test('promise abort signal', { signal: AbortSignal.abort() }, async (t) => { + await t.test('should not appear', () => {}) +}) + +test('callback timeout signal', { signal: AbortSignal.timeout(1) }, (t, done) => { + t.test('ok 1', async () => {}) + t.test('ok 2', () => {}) + t.test('ok 3', { signal: t.signal }, async () => {}) + t.test('ok 4', { signal: t.signal }, () => {}) + t.test('not ok 1', () => new Promise(() => {})) + t.test('not ok 2', (t, done) => {}) + t.test('not ok 3', { signal: t.signal }, () => new Promise(() => {})) + t.test('not ok 4', { signal: t.signal }, (t, done) => {}) + t.test('not ok 5', { signal: t.signal }, (t, done) => { + t.signal.addEventListener('abort', done) + }) +}) + +test('callback abort signal', { signal: AbortSignal.abort() }, (t, done) => { + t.test('should not appear', done) +}) + +// AbortSignal.timeout(1) doesn't prevent process from closing +// thus we have to keep the process open to prevent cancelation +// of the entire test tree +setTimeout(() => {}, 1000) diff --git a/node_modules/test/test/message/test_runner_abort.out b/node_modules/test/test/message/test_runner_abort.out new file mode 100644 index 00000000..26f89a29 --- /dev/null +++ b/node_modules/test/test/message/test_runner_abort.out @@ -0,0 +1,249 @@ +TAP version 13 +# Subtest: promise timeout signal + # Subtest: ok 1 + ok 1 - ok 1 + --- + duration_ms: * + ... + # Subtest: ok 2 + ok 2 - ok 2 + --- + duration_ms: * + ... + # Subtest: ok 3 + ok 3 - ok 3 + --- + duration_ms: * + ... + # Subtest: ok 4 + ok 4 - ok 4 + --- + duration_ms: * + ... + # Subtest: not ok 1 + not ok 5 - not ok 1 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 2 + not ok 6 - not ok 2 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 3 + not ok 7 - not ok 3 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + # Subtest: not ok 4 + not ok 8 - not ok 4 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + # Subtest: not ok 5 + not ok 9 - not ok 5 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + 1..9 +not ok 1 - promise timeout signal + --- + duration_ms: * + error: 'The operation was aborted due to timeout' + code: 23 + stack: |- + * + * + * + * + ... +# Subtest: promise abort signal +not ok 2 - promise abort signal + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + ... +# Subtest: callback timeout signal + # Subtest: ok 1 + ok 1 - ok 1 + --- + duration_ms: * + ... + # Subtest: ok 2 + ok 2 - ok 2 + --- + duration_ms: * + ... + # Subtest: ok 3 + ok 3 - ok 3 + --- + duration_ms: * + ... + # Subtest: ok 4 + ok 4 - ok 4 + --- + duration_ms: * + ... + # Subtest: not ok 1 + not ok 5 - not ok 1 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 2 + not ok 6 - not ok 2 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 3 + not ok 7 - not ok 3 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + # Subtest: not ok 4 + not ok 8 - not ok 4 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + # Subtest: not ok 5 + not ok 9 - not ok 5 + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + * + ... + 1..9 +not ok 3 - callback timeout signal + --- + duration_ms: * + error: 'The operation was aborted due to timeout' + code: 23 + stack: |- + * + * + * + * + ... +# Subtest: callback abort signal +not ok 4 - callback abort signal + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + ... +1..4 +# tests 4 +# pass 0 +# fail 0 +# cancelled 4 +# skipped 0 +# todo 0 +# duration_ms * diff --git a/node_modules/test/test/message/test_runner_abort_suite.js b/node_modules/test/test/message/test_runner_abort_suite.js new file mode 100644 index 00000000..39c30660 --- /dev/null +++ b/node_modules/test/test/message/test_runner_abort_suite.js @@ -0,0 +1,28 @@ +// https://github.com/nodejs/node/blob/389b7e138e89a339fabe4ad628bf09cd9748f957/test/message/test_runner_abort_suite.js +// Flags: --no-warnings +'use strict' +require('../common') +const { describe, it } = require('#node:test') + +describe('describe timeout signal', { signal: AbortSignal.timeout(1) }, (t) => { + it('ok 1', async () => {}) + it('ok 2', () => {}) + it('ok 3', { signal: t.signal }, async () => {}) + it('ok 4', { signal: t.signal }, () => {}) + it('not ok 1', () => new Promise(() => {})) + it('not ok 2', (done) => {}) + it('not ok 3', { signal: t.signal }, () => new Promise(() => {})) + it('not ok 4', { signal: t.signal }, (done) => {}) + it('not ok 5', { signal: t.signal }, function (done) { + this.signal.addEventListener('abort', done) + }) +}) + +describe('describe abort signal', { signal: AbortSignal.abort() }, () => { + it('should not appear', () => {}) +}) + +// AbortSignal.timeout(1) doesn't prevent process from closing +// thus we have to keep the process open to prevent cancelation +// of the entire test tree +setTimeout(() => {}, 1000) diff --git a/node_modules/test/test/message/test_runner_abort_suite.out b/node_modules/test/test/message/test_runner_abort_suite.out new file mode 100644 index 00000000..38669978 --- /dev/null +++ b/node_modules/test/test/message/test_runner_abort_suite.out @@ -0,0 +1,99 @@ +TAP version 13 +# Subtest: describe timeout signal + # Subtest: ok 1 + ok 1 - ok 1 + --- + duration_ms: * + ... + # Subtest: ok 2 + ok 2 - ok 2 + --- + duration_ms: * + ... + # Subtest: ok 3 + ok 3 - ok 3 + --- + duration_ms: * + ... + # Subtest: ok 4 + ok 4 - ok 4 + --- + duration_ms: * + ... + # Subtest: not ok 1 + not ok 5 - not ok 1 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 2 + not ok 6 - not ok 2 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 3 + not ok 7 - not ok 3 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 4 + not ok 8 - not ok 4 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: not ok 5 + not ok 9 - not ok 5 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + 1..9 +not ok 1 - describe timeout signal + --- + duration_ms: * + error: 'The operation was aborted due to timeout' + code: 23 + stack: |- + * + * + * + * + ... +# Subtest: describe abort signal +not ok 2 - describe abort signal + --- + duration_ms: * + error: 'This operation was aborted' + code: 20 + stack: |- + * + * + * + * + * + * + * + * + * + ... +1..2 +# tests 2 +# pass 0 +# fail 0 +# cancelled 2 +# skipped 0 +# todo 0 +# duration_ms * diff --git a/node_modules/test/test/message/test_runner_desctibe_it.js b/node_modules/test/test/message/test_runner_desctibe_it.js index 4e556473..d8c1bb34 100644 --- a/node_modules/test/test/message/test_runner_desctibe_it.js +++ b/node_modules/test/test/message/test_runner_desctibe_it.js @@ -1,4 +1,4 @@ -// https://github.com/nodejs/node/blob/e2225ba8e1c00995c0f8bd56e607ea7c5b463ab9/test/message/test_runner_desctibe_it.js +// https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac/test/message/test_runner_desctibe_it.js // Flags: --no-warnings 'use strict' require('../common') @@ -149,18 +149,6 @@ describe('level 0a', { concurrency: 4 }, () => { return p0a }) -describe('top level', { concurrency: 2 }, () => { - it('+long running', async () => { - return new Promise((resolve, reject) => { - setTimeout(resolve, 3000).unref() - }) - }) - - describe('+short running', async () => { - it('++short running', async () => {}) - }) -}) - describe('invalid subtest - pass but subtest fails', () => { setImmediate(() => { it('invalid subtest fail', () => { @@ -225,15 +213,15 @@ it('callback fail', (done) => { }) it('sync t is this in test', function () { - assert.deepStrictEqual(this, {}) + assert.deepStrictEqual(this, { signal: this.signal, name: this.name }) }) it('async t is this in test', async function () { - assert.deepStrictEqual(this, {}) + assert.deepStrictEqual(this, { signal: this.signal, name: this.name }) }) it('callback t is this in test', function (done) { - assert.deepStrictEqual(this, {}) + assert.deepStrictEqual(this, { signal: this.signal, name: this.name }) done() }) @@ -338,3 +326,47 @@ describe('timeouts', () => { setTimeout(done, 10) }) }) + +describe('successful thenable', () => { + it('successful thenable', () => { + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (successHandler) => successHandler() + } + } + }) + + it('rejected thenable', () => { + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (_, errorHandler) => errorHandler(new Error('custom error')) + } + } + }) + + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (successHandler) => successHandler() + } + } +}) + +describe('rejected thenable', () => { + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (_, errorHandler) => errorHandler(new Error('custom error')) + } + } +}) diff --git a/node_modules/test/test/message/test_runner_desctibe_it.out b/node_modules/test/test/message/test_runner_desctibe_it.out index 9c6af005..2d582153 100644 --- a/node_modules/test/test/message/test_runner_desctibe_it.out +++ b/node_modules/test/test/message/test_runner_desctibe_it.out @@ -23,6 +23,8 @@ not ok 3 - sync fail todo # TODO * * * + * + * ... # Subtest: sync fail todo with message not ok 4 - sync fail todo with message # TODO this is a failing todo @@ -41,6 +43,7 @@ not ok 4 - sync fail todo with message # TODO this is a failing todo * * * + * ... # Subtest: sync skip pass ok 5 - sync skip pass # SKIP @@ -72,6 +75,7 @@ not ok 8 - sync throw fail * * * + * ... # Subtest: async skip pass ok 9 - async skip pass # SKIP @@ -98,6 +102,7 @@ not ok 11 - async throw fail * * * + * ... # Subtest: async skip fail not ok 12 - async skip fail @@ -126,6 +131,7 @@ not ok 13 - async assertion fail * * * + * ... # Subtest: resolve pass ok 14 - resolve pass @@ -147,6 +153,7 @@ not ok 15 - reject fail * * * + * ... # Subtest: unhandled rejection - passes but warns ok 16 - unhandled rejection - passes but warns @@ -237,45 +244,23 @@ ok 23 - level 0a --- duration_ms: * ... -# Subtest: top level - # Subtest: +long running - ok 1 - +long running - --- - duration_ms: * - ... - # Subtest: +short running - # Subtest: ++short running - ok 1 - ++short running - --- - duration_ms: * - ... - 1..1 - ok 2 - +short running - --- - duration_ms: * - ... - 1..2 -ok 24 - top level - --- - duration_ms: * - ... # Subtest: invalid subtest - pass but subtest fails -ok 25 - invalid subtest - pass but subtest fails +ok 24 - invalid subtest - pass but subtest fails --- duration_ms: * ... # Subtest: sync skip option -ok 26 - sync skip option # SKIP +ok 25 - sync skip option # SKIP --- duration_ms: * ... # Subtest: sync skip option with message -ok 27 - sync skip option with message # SKIP this is skipped +ok 26 - sync skip option with message # SKIP this is skipped --- duration_ms: * ... # Subtest: sync skip option is false fail -not ok 28 - sync skip option is false fail +not ok 27 - sync skip option is false fail --- duration_ms: * failureType: 'testCodeFailure' @@ -291,67 +276,67 @@ not ok 28 - sync skip option is false fail * ... # Subtest: -ok 29 - +ok 28 - --- duration_ms: * ... # Subtest: functionOnly -ok 30 - functionOnly +ok 29 - functionOnly --- duration_ms: * ... # Subtest: -ok 31 - +ok 30 - --- duration_ms: * ... # Subtest: test with only a name provided -ok 32 - test with only a name provided +ok 31 - test with only a name provided --- duration_ms: * ... # Subtest: -ok 33 - +ok 32 - --- duration_ms: * ... # Subtest: -ok 34 - # SKIP +ok 33 - # SKIP --- duration_ms: * ... # Subtest: test with a name and options provided -ok 35 - test with a name and options provided # SKIP +ok 34 - test with a name and options provided # SKIP --- duration_ms: * ... # Subtest: functionAndOptions -ok 36 - functionAndOptions # SKIP +ok 35 - functionAndOptions # SKIP --- duration_ms: * ... # Subtest: escaped description \\ \# \\\#\\ -ok 37 - escaped description \\ \# \\\#\\ +ok 36 - escaped description \\ \# \\\#\\ --- duration_ms: * ... # Subtest: escaped skip message -ok 38 - escaped skip message # SKIP \#skip +ok 37 - escaped skip message # SKIP \#skip --- duration_ms: * ... # Subtest: escaped todo message -ok 39 - escaped todo message # TODO \#todo +ok 38 - escaped todo message # TODO \#todo --- duration_ms: * ... # Subtest: callback pass -ok 40 - callback pass +ok 39 - callback pass --- duration_ms: * ... # Subtest: callback fail -not ok 41 - callback fail +not ok 40 - callback fail --- duration_ms: * failureType: 'testCodeFailure' @@ -362,22 +347,22 @@ not ok 41 - callback fail * ... # Subtest: sync t is this in test -ok 42 - sync t is this in test +ok 41 - sync t is this in test --- duration_ms: * ... # Subtest: async t is this in test -ok 43 - async t is this in test +ok 42 - async t is this in test --- duration_ms: * ... # Subtest: callback t is this in test -ok 44 - callback t is this in test +ok 43 - callback t is this in test --- duration_ms: * ... # Subtest: callback also returns a Promise -not ok 45 - callback also returns a Promise +not ok 44 - callback also returns a Promise --- duration_ms: * failureType: 'callbackAndPromisePresent' @@ -386,7 +371,7 @@ not ok 45 - callback also returns a Promise stack: |- ... # Subtest: callback throw -not ok 46 - callback throw +not ok 45 - callback throw --- duration_ms: * failureType: 'testCodeFailure' @@ -402,7 +387,7 @@ not ok 46 - callback throw * ... # Subtest: callback called twice -not ok 47 - callback called twice +not ok 46 - callback called twice --- duration_ms: * failureType: 'multipleCallbackInvocations' @@ -413,12 +398,12 @@ not ok 47 - callback called twice * ... # Subtest: callback called twice in different ticks -ok 48 - callback called twice in different ticks +ok 47 - callback called twice in different ticks --- duration_ms: * ... # Subtest: callback called twice in future tick -not ok 49 - callback called twice in future tick +not ok 48 - callback called twice in future tick --- duration_ms: * failureType: 'uncaughtException' @@ -428,7 +413,7 @@ not ok 49 - callback called twice in future tick * ... # Subtest: callback async throw -not ok 50 - callback async throw +not ok 49 - callback async throw --- duration_ms: * failureType: 'uncaughtException' @@ -438,12 +423,12 @@ not ok 50 - callback async throw * ... # Subtest: callback async throw after done -ok 51 - callback async throw after done +ok 50 - callback async throw after done --- duration_ms: * ... # Subtest: custom inspect symbol fail -not ok 52 - custom inspect symbol fail +not ok 51 - custom inspect symbol fail --- duration_ms: * failureType: 'testCodeFailure' @@ -452,7 +437,7 @@ not ok 52 - custom inspect symbol fail stack: |- ... # Subtest: custom inspect symbol that throws fail -not ok 53 - custom inspect symbol that throws fail +not ok 52 - custom inspect symbol that throws fail --- duration_ms: * failureType: 'testCodeFailure' @@ -504,7 +489,7 @@ not ok 53 - custom inspect symbol that throws fail * ... 1..2 -not ok 54 - subtest sync throw fails +not ok 53 - subtest sync throw fails --- duration_ms: * failureType: 'subtestsFailed' @@ -522,7 +507,7 @@ not ok 54 - subtest sync throw fails code: 'ERR_TEST_FAILURE' ... 1..1 -not ok 55 - describe sync throw fails +not ok 54 - describe sync throw fails --- duration_ms: * failureType: 'testCodeFailure' @@ -550,7 +535,7 @@ not ok 55 - describe sync throw fails code: 'ERR_TEST_FAILURE' ... 1..1 -not ok 56 - describe async throw fails +not ok 55 - describe async throw fails --- duration_ms: * failureType: 'testCodeFailure' @@ -577,7 +562,7 @@ not ok 56 - describe async throw fails error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' stack: |- - * + async Promise.all (index 0) ... # Subtest: timed out callback test not ok 2 - timed out callback test @@ -598,15 +583,51 @@ not ok 56 - describe async throw fails duration_ms: * ... 1..4 -not ok 57 - timeouts +not ok 56 - timeouts --- duration_ms: * failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' ... +# Subtest: successful thenable + # Subtest: successful thenable + ok 1 - successful thenable + --- + duration_ms: * + ... + # Subtest: rejected thenable + not ok 2 - rejected thenable + --- + duration_ms: * + failureType: 'testCodeFailure' + error: 'custom error' + code: 'ERR_TEST_FAILURE' + stack: |- + * + * + ... + 1..2 +not ok 57 - successful thenable + --- + duration_ms: * + failureType: 'subtestsFailed' + error: '1 subtest failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: rejected thenable +not ok 58 - rejected thenable + --- + duration_ms: * + failureType: 'testCodeFailure' + error: 'custom error' + code: 'ERR_TEST_FAILURE' + stack: |- + * + * + ... # Subtest: invalid subtest fail -not ok 58 - invalid subtest fail +not ok 59 - invalid subtest fail --- duration_ms: * failureType: 'parentAlreadyFinished' @@ -615,16 +636,16 @@ not ok 58 - invalid subtest fail stack: |- * ... -1..58 +1..59 # Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. # Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. # Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -# tests 58 -# pass 23 -# fail 21 +# tests 59 +# pass 22 +# fail 23 # cancelled 0 # skipped 9 # todo 5 diff --git a/node_modules/test/test/message/test_runner_hooks.js b/node_modules/test/test/message/test_runner_hooks.js new file mode 100644 index 00000000..836ef0ec --- /dev/null +++ b/node_modules/test/test/message/test_runner_hooks.js @@ -0,0 +1,112 @@ +// https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac/test/message/test_runner_hooks.js +// Flags: --no-warnings +'use strict' +require('../common') +const assert = require('assert') +const { test, describe, it, before, after, beforeEach, afterEach } = require('#node:test') + +describe('describe hooks', () => { + const testArr = [] + before(function () { + testArr.push('before ' + this.name) + }) + after(function () { + testArr.push('after ' + this.name) + assert.deepStrictEqual(testArr, [ + 'before describe hooks', + 'beforeEach 1', '1', 'afterEach 1', + 'beforeEach 2', '2', 'afterEach 2', + 'before nested', + 'beforeEach nested 1', 'nested 1', 'afterEach nested 1', + 'beforeEach nested 2', 'nested 2', 'afterEach nested 2', + 'after nested', + 'after describe hooks' + ]) + }) + beforeEach(function () { + testArr.push('beforeEach ' + this.name) + }) + afterEach(function () { + testArr.push('afterEach ' + this.name) + }) + + it('1', () => testArr.push('1')) + it('2', () => testArr.push('2')) + + describe('nested', () => { + before(function () { + testArr.push('before ' + this.name) + }) + after(function () { + testArr.push('after ' + this.name) + }) + beforeEach(function () { + testArr.push('beforeEach ' + this.name) + }) + afterEach(function () { + testArr.push('afterEach ' + this.name) + }) + it('nested 1', () => testArr.push('nested 1')) + it('nested 2', () => testArr.push('nested 2')) + }) +}) + +describe('before throws', () => { + before(() => { throw new Error('before') }) + it('1', () => {}) + it('2', () => {}) +}) + +describe('after throws', () => { + after(() => { throw new Error('after') }) + it('1', () => {}) + it('2', () => {}) +}) + +describe('beforeEach throws', () => { + beforeEach(() => { throw new Error('beforeEach') }) + it('1', () => {}) + it('2', () => {}) +}) + +describe('afterEach throws', () => { + afterEach(() => { throw new Error('afterEach') }) + it('1', () => {}) + it('2', () => {}) +}) + +test('test hooks', async (t) => { + const testArr = [] + t.beforeEach((t) => testArr.push('beforeEach ' + t.name)) + t.afterEach((t) => testArr.push('afterEach ' + t.name)) + await t.test('1', () => testArr.push('1')) + await t.test('2', () => testArr.push('2')) + + await t.test('nested', async (t) => { + t.beforeEach((t) => testArr.push('nested beforeEach ' + t.name)) + t.afterEach((t) => testArr.push('nested afterEach ' + t.name)) + await t.test('nested 1', () => testArr.push('nested1')) + await t.test('nested 2', () => testArr.push('nested 2')) + }) + + assert.deepStrictEqual(testArr, [ + 'beforeEach 1', '1', 'afterEach 1', + 'beforeEach 2', '2', 'afterEach 2', + 'beforeEach nested', + 'nested beforeEach nested 1', 'nested1', 'nested afterEach nested 1', + 'nested beforeEach nested 2', 'nested 2', 'nested afterEach nested 2', + 'afterEach nested' + ]) +}) + +test('t.beforeEach throws', async (t) => { + t.beforeEach(() => { throw new Error('beforeEach') }) + await t.test('1', () => {}) + await t.test('2', () => {}) +}) + +test('t.afterEach throws', async (t) => { + t.afterEach(() => { throw new Error('afterEach') }) + await t.test('1', () => {}) + await t.test('2', () => {}) +}) diff --git a/node_modules/test/test/message/test_runner_hooks.out b/node_modules/test/test/message/test_runner_hooks.out new file mode 100644 index 00000000..cd85fe97 --- /dev/null +++ b/node_modules/test/test/message/test_runner_hooks.out @@ -0,0 +1,229 @@ +TAP version 13 +# Subtest: describe hooks + # Subtest: 1 + ok 1 - 1 + --- + duration_ms: * + ... + # Subtest: 2 + ok 2 - 2 + --- + duration_ms: * + ... + # Subtest: nested + # Subtest: nested 1 + ok 1 - nested 1 + --- + duration_ms: * + ... + # Subtest: nested 2 + ok 2 - nested 2 + --- + duration_ms: * + ... + 1..2 + ok 3 - nested + --- + duration_ms: * + ... + 1..3 +ok 1 - describe hooks + --- + duration_ms: * + ... +# Subtest: before throws + # Subtest: 1 + not ok 1 - 1 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: 2 + not ok 2 - 2 + --- + duration_ms: * + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + 1..2 +not ok 2 - before throws + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running before hook' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: after throws + # Subtest: 1 + ok 1 - 1 + --- + duration_ms: * + ... + # Subtest: 2 + ok 2 - 2 + --- + duration_ms: * + ... + 1..2 +not ok 3 - after throws + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running after hook' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: beforeEach throws + # Subtest: 1 + not ok 1 - 1 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running beforeEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + # Subtest: 2 + not ok 2 - 2 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running beforeEach hook' + code: 'ERR_TEST_FAILURE' + ... + 1..2 +not ok 4 - beforeEach throws + --- + duration_ms: * + failureType: 'subtestsFailed' + error: '2 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: afterEach throws + # Subtest: 1 + not ok 1 - 1 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running afterEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + # Subtest: 2 + not ok 2 - 2 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running afterEach hook' + code: 'ERR_TEST_FAILURE' + ... + 1..2 +not ok 5 - afterEach throws + --- + duration_ms: * + failureType: 'subtestsFailed' + error: '2 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: test hooks + # Subtest: 1 + ok 1 - 1 + --- + duration_ms: * + ... + # Subtest: 2 + ok 2 - 2 + --- + duration_ms: * + ... + # Subtest: nested + # Subtest: nested 1 + ok 1 - nested 1 + --- + duration_ms: * + ... + # Subtest: nested 2 + ok 2 - nested 2 + --- + duration_ms: * + ... + 1..2 + ok 3 - nested + --- + duration_ms: * + ... + 1..3 +ok 6 - test hooks + --- + duration_ms: * + ... +# Subtest: t.beforeEach throws + # Subtest: 1 + not ok 1 - 1 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running beforeEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + # Subtest: 2 + not ok 2 - 2 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running beforeEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + 1..2 +not ok 7 - t.beforeEach throws + --- + duration_ms: * + failureType: 'subtestsFailed' + error: '2 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: t.afterEach throws + # Subtest: 1 + not ok 1 - 1 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running afterEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + # Subtest: 2 + not ok 2 - 2 + --- + duration_ms: * + failureType: 'hookFailed' + error: 'failed running afterEach hook' + code: 'ERR_TEST_FAILURE' + stack: |- + * + ... + 1..2 +not ok 8 - t.afterEach throws + --- + duration_ms: * + failureType: 'subtestsFailed' + error: '2 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +1..8 +# tests 8 +# pass 2 +# fail 6 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms * diff --git a/node_modules/test/test/message/test_runner_output.js b/node_modules/test/test/message/test_runner_output.js index 583a650d..e4edf0a4 100644 --- a/node_modules/test/test/message/test_runner_output.js +++ b/node_modules/test/test/message/test_runner_output.js @@ -1,4 +1,4 @@ -// https://github.com/nodejs/node/blob/8cbc39068cd102e3bbdb6c5a1d14ce450e6ef093/test/message/test_runner_output.js +// https://github.com/nodejs/node/blob/a3e110820ff98702e1761831e7beaf0f5f1f75e7/test/message/test_runner_output.js // Flags: --no-warnings 'use strict' require('../common') @@ -349,3 +349,25 @@ test('large timeout async test is ok', { timeout: 30_000_000 }, async (t) => { test('large timeout callback test is ok', { timeout: 30_000_000 }, (t, done) => { setTimeout(done, 10) }) + +test('successful thenable', () => { + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (successHandler) => successHandler() + } + } +}) + +test('rejected thenable', () => { + let thenCalled = false + return { + get then () { + if (thenCalled) throw new Error() + thenCalled = true + return (_, errorHandler) => errorHandler('custom error') + } + } +}) diff --git a/node_modules/test/test/message/test_runner_output.out b/node_modules/test/test/message/test_runner_output.out index 22d97940..49a19fe3 100644 --- a/node_modules/test/test/message/test_runner_output.out +++ b/node_modules/test/test/message/test_runner_output.out @@ -129,9 +129,9 @@ not ok 13 - async assertion fail failureType: 'testCodeFailure' error: |- Expected values to be strictly equal: - + true !== false - + code: 'ERR_ASSERTION' stack: |- * @@ -588,8 +588,21 @@ ok 60 - large timeout callback test is ok --- duration_ms: * ... +# Subtest: successful thenable +ok 61 - successful thenable + --- + duration_ms: * + ... +# Subtest: rejected thenable +not ok 62 - rejected thenable + --- + duration_ms: * + failureType: 'testCodeFailure' + error: 'custom error' + code: 'ERR_TEST_FAILURE' + ... # Subtest: invalid subtest fail -not ok 61 - invalid subtest fail +not ok 63 - invalid subtest fail --- duration_ms: * failureType: 'parentAlreadyFinished' @@ -598,17 +611,17 @@ not ok 61 - invalid subtest fail stack: |- * ... -1..61 +1..63 # Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. # Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. # Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -# tests 61 -# pass 26 -# fail 20 -# cancelled 0 +# tests 63 +# pass 27 +# fail 19 +# cancelled 2 # skipped 10 # todo 5 # duration_ms * diff --git a/node_modules/test/test/message/test_runner_unresolved_promise.js b/node_modules/test/test/message/test_runner_unresolved_promise.js index 03b62a15..842ec5b0 100644 --- a/node_modules/test/test/message/test_runner_unresolved_promise.js +++ b/node_modules/test/test/message/test_runner_unresolved_promise.js @@ -1,4 +1,4 @@ -// https://github.com/nodejs/node/blob/1aab13cad9c800f4121c1d35b554b78c1b17bdbd/test/message/test_runner_unresolved_promise.js +// https://github.com/nodejs/node/blob/5ec2d7bc5deed26ac640feff279800e39dacc9c0/test/message/test_runner_unresolved_promise.js // Flags: --no-warnings 'use strict' require('../common') @@ -6,4 +6,4 @@ const test = require('#node:test') test('pass') test('never resolving promise', () => new Promise(() => {})) -test('fail') +test('fail', () => console.log('this should not appear')) diff --git a/node_modules/test/test/message/test_runner_unresolved_promise.out b/node_modules/test/test/message/test_runner_unresolved_promise.out index d4e868cc..2bb543cd 100644 --- a/node_modules/test/test/message/test_runner_unresolved_promise.out +++ b/node_modules/test/test/message/test_runner_unresolved_promise.out @@ -17,7 +17,7 @@ not ok 2 - never resolving promise # Subtest: fail not ok 3 - fail --- - duration_ms: * + duration_ms: 0 failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' diff --git a/node_modules/test/test/parallel.mjs b/node_modules/test/test/parallel.mjs new file mode 100755 index 00000000..48e0f618 --- /dev/null +++ b/node_modules/test/test/parallel.mjs @@ -0,0 +1,21 @@ +#!/usr/bin/env node + +import { once } from 'node:events' +import { spawn } from 'node:child_process' +import fs from 'node:fs/promises' +import process from 'node:process' +import { fileURLToPath } from 'node:url' + +const PARALLEL_DIR = new URL('./parallel/', import.meta.url) +const dir = await fs.opendir(PARALLEL_DIR) + +for await (const { name } of dir) { + if (!name.endsWith('.js')) continue + const cp = spawn( + process.execPath, + [fileURLToPath(new URL(name, PARALLEL_DIR))], + { stdio: 'inherit' } + ) + const [code] = await once(cp, 'exit') + if (code) process.exit(code) +} diff --git a/node_modules/test/test/parallel/test-runner-concurrency.js b/node_modules/test/test/parallel/test-runner-concurrency.js new file mode 100644 index 00000000..763be406 --- /dev/null +++ b/node_modules/test/test/parallel/test-runner-concurrency.js @@ -0,0 +1,66 @@ +// https://github.com/nodejs/node/blob/a3e110820ff98702e1761831e7beaf0f5f1f75e7/test/parallel/test-runner-concurrency.js + +'use strict' +const common = require('../common') +const { describe, it, test } = require('#node:test') +const assert = require('assert') + +describe('Concurrency option (boolean) = true ', { concurrency: true }, () => { + let isFirstTestOver = false + it('should start the first test', () => new Promise((resolve) => { + setImmediate(() => { isFirstTestOver = true; resolve() }) + })) + it('should start before the previous test ends', () => { + // Should work even on single core CPUs + assert.strictEqual(isFirstTestOver, false) + }) +}) + +describe( + 'Concurrency option (boolean) = false ', + { concurrency: false }, + () => { + let isFirstTestOver = false + it('should start the first test', () => new Promise((resolve) => { + setImmediate(() => { isFirstTestOver = true; resolve() }) + })) + it('should start after the previous test ends', () => { + assert.strictEqual(isFirstTestOver, true) + }) + } +) + +{ + // Make sure tests run in order when root concurrency is 1 (default) + const tree = [] + const expectedTestTree = common.mustCall(() => { + assert.deepStrictEqual(tree, [ + 'suite 1', 'nested', 'suite 2', + '1', '2', 'nested 1', 'nested 2', + 'test', 'test 1', 'test 2' + ]) + }) + + describe('suite 1', () => { + tree.push('suite 1') + it('1', () => tree.push('1')) + it('2', () => tree.push('2')) + + describe('nested', () => { + tree.push('nested') + it('nested 1', () => tree.push('nested 1')) + it('nested 2', () => tree.push('nested 2')) + }) + }) + + test('test', async (t) => { + tree.push('test') + await t.test('test1', () => tree.push('test 1')) + await t.test('test 2', () => tree.push('test 2')) + }) + + describe('suite 2', () => { + tree.push('suite 2') + it('should run after other suites', expectedTestTree) + }) +} diff --git a/node_modules/test/test/parallel/test-runner-exit-code.js b/node_modules/test/test/parallel/test-runner-exit-code.js index 0d7b65a4..014d3812 100644 --- a/node_modules/test/test/parallel/test-runner-exit-code.js +++ b/node_modules/test/test/parallel/test-runner-exit-code.js @@ -1,12 +1,31 @@ -// https://github.com/nodejs/node/blob/1523a1817ed9b06fb51c0149451f9ea31bd2756e/test/parallel/test-runner-exit-code.js - +// https://github.com/nodejs/node/blob/26e27424ad91c60a44d3d4c58b62a39b555ba75d/test/parallel/test-runner-exit-code.js 'use strict' - const common = require('../common') +const fixtures = require('../common/fixtures') const assert = require('assert') -const { spawnSync } = require('child_process') -const { promisify } = require('util') -const setTimeout = promisify(require('timers').setTimeout) +const { spawnSync, spawn } = require('child_process') +const { once } = require('events') +const finished = require('util').promisify(require('stream').finished) + +async function runAndKill (file) { + if (common.isWindows) { + common.printSkipMessage(`signals are not supported in windows, skipping ${file}`) + return + } + let stdout = '' + const child = spawn(process.execPath, ['--test', file]) + child.stdout.setEncoding('utf8') + child.stdout.on('data', (chunk) => { + if (!stdout.length) child.kill('SIGINT') + stdout += chunk + }) + const [code, signal] = await once(child, 'exit') + await finished(child.stdout) + assert.match(stdout, /not ok 1/) + assert.match(stdout, /# cancelled 1\n/) + assert.strictEqual(signal, null) + assert.strictEqual(code, 1) +} if (process.argv[2] === 'child') { const test = require('#node:test') @@ -20,30 +39,20 @@ if (process.argv[2] === 'child') { test('failing test', () => { assert.strictEqual(true, false) }) - } else if (process.argv[3] === 'never_ends') { - assert.strictEqual(process.argv[3], 'never_ends') - test('never ending test', () => { - return setTimeout(100_000_000) - }) - process.kill(process.pid, 'SIGINT') } else assert.fail('unreachable') } else { let child = spawnSync(process.execPath, [__filename, 'child', 'pass']) assert.strictEqual(child.status, 0) assert.strictEqual(child.signal, null) - child = spawnSync(process.execPath, [__filename, 'child', 'fail']) - assert.strictEqual(child.status, 1) + child = spawnSync(process.execPath, ['--test', fixtures.path('test-runner', 'subdir', 'subdir_test.js')]) + assert.strictEqual(child.status, 0) assert.strictEqual(child.signal, null) - child = spawnSync(process.execPath, [__filename, 'child', 'never_ends']) + child = spawnSync(process.execPath, [__filename, 'child', 'fail']) assert.strictEqual(child.status, 1) assert.strictEqual(child.signal, null) - if (common.isWindows) { - common.printSkipMessage('signals are not supported in windows') - } else { - const stdout = child.stdout.toString() - assert.match(stdout, /not ok 1 - never ending test/) - assert.match(stdout, /# cancelled 1/) - } + + runAndKill(fixtures.path('test-runner', 'never_ending_sync.js')).then(common.mustCall()) + runAndKill(fixtures.path('test-runner', 'never_ending_async.js')).then(common.mustCall()) } diff --git a/node_modules/test/test/parallel/test-runner-misc.js b/node_modules/test/test/parallel/test-runner-misc.js new file mode 100644 index 00000000..6c629075 --- /dev/null +++ b/node_modules/test/test/parallel/test-runner-misc.js @@ -0,0 +1,35 @@ +// https://github.com/nodejs/node/blob/2e682f10b6104373fded64b0e364984b85ae2243/test/parallel/test-runner-misc.js + +'use strict' +const common = require('../common') +const assert = require('assert') +const { spawnSync } = require('child_process') +const { setTimeout } = require('#timers/promises') + +if (process.argv[2] === 'child') { + const test = require('#node:test') + + if (process.argv[3] === 'abortSignal') { + assert.throws(() => test({ signal: {} }), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }) + + let testSignal + test({ timeout: 10 }, common.mustCall(async ({ signal }) => { + assert.strictEqual(signal.aborted, false) + testSignal = signal + await setTimeout(50) + })).finally(common.mustCall(() => { + test(() => assert.strictEqual(testSignal.aborted, true)) + })) + } else assert.fail('unreachable') +} else { + const child = spawnSync(process.execPath, [__filename, 'child', 'abortSignal']) + const stdout = child.stdout.toString() + assert.match(stdout, /^# pass 1$/m) + assert.match(stdout, /^# fail 0$/m) + assert.match(stdout, /^# cancelled 1$/m) + assert.strictEqual(child.status, 1) + assert.strictEqual(child.signal, null) +} diff --git a/node_modules/test/test/parallel/test-runner-option-validation.js b/node_modules/test/test/parallel/test-runner-option-validation.js new file mode 100644 index 00000000..79590e9f --- /dev/null +++ b/node_modules/test/test/parallel/test-runner-option-validation.js @@ -0,0 +1,30 @@ +// https://github.com/nodejs/node/blob/60da0a1b364efdd84870269d23b39faa12fb46d8/test/parallel/test-runner-option-validation.js + +'use strict' +require('../common') +const assert = require('assert') +const test = require('#node:test'); + +// eslint-disable-next-line symbol-description +[Symbol(), {}, [], () => {}, 1n, true, '1'].forEach((timeout) => { + assert.throws(() => test({ timeout }), { code: 'ERR_INVALID_ARG_TYPE' }) +}); +[-1, -Infinity, NaN, 2 ** 33, Number.MAX_SAFE_INTEGER].forEach((timeout) => { + assert.throws(() => test({ timeout }), { code: 'ERR_OUT_OF_RANGE' }) +}); +[null, undefined, Infinity, 0, 1, 1.1].forEach((timeout) => { + // Valid values should not throw. + test({ timeout }) +}); + +// eslint-disable-next-line symbol-description +[Symbol(), {}, [], () => {}, 1n, '1'].forEach((concurrency) => { + assert.throws(() => test({ concurrency }), { code: 'ERR_INVALID_ARG_TYPE' }) +}); +[-1, 0, 1.1, -Infinity, NaN, 2 ** 33, Number.MAX_SAFE_INTEGER].forEach((concurrency) => { + assert.throws(() => test({ concurrency }), { code: 'ERR_OUT_OF_RANGE' }) +}); +[null, undefined, 1, 2 ** 31, true, false].forEach((concurrency) => { + // Valid values should not throw. + test({ concurrency }) +}) diff --git a/package-lock.json b/package-lock.json index 6c3aa485..a3f3f804 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,11 +16,13 @@ "commonjs": "^0.0.1", "express": "^4.18.1", "express-fileupload": "^1.4.0", + "fast-stable-stringify": "^1.0.0", "inquirer": "^9.0.0", "ioredis": "^5.1.0", "json5": "^2.2.1", "mysql2": "^2.3.3", "nodemailer": "^6.7.7", + "slow-json-stringify": "^2.0.1", "uuid": "^8.3.2" } }, @@ -67,9 +69,9 @@ } }, "node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz", + "integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==", "engines": { "node": ">=12" }, @@ -391,15 +393,15 @@ } }, "node_modules/es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", + "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -411,9 +413,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -531,16 +533,21 @@ "node": ">=4" } }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "node_modules/figures": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz", - "integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", "dependencies": { "escape-string-regexp": "^5.0.0", "is-unicode-supported": "^1.2.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -618,9 +625,9 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -751,16 +758,16 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/inquirer": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.2.tgz", - "integrity": "sha512-AqmDHmz3bIe573OiM4svTZzajBzff1xpuzYAimW8gjzW5ncuPllWB8t/GKl+NSuKRJaKyIF2bU2RCx8H1dwqyQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.1.tgz", + "integrity": "sha512-hfS9EJ1pVkGNbYKqzdGwMj0Dqosd36Qvxd5pFy4657QT23gmtFTSqoYBisZR75DReeSMWPNa8J0Lf6TQCz8PvA==", "dependencies": { "ansi-escapes": "^5.0.0", "chalk": "^5.0.1", "cli-cursor": "^4.0.0", "cli-width": "^4.0.0", "external-editor": "^3.0.3", - "figures": "^4.0.1", + "figures": "^5.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", "ora": "^6.1.2", @@ -789,9 +796,9 @@ } }, "node_modules/ioredis": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.2.tgz", - "integrity": "sha512-wryKc1ur8PcCmNwfcGkw5evouzpbDXxxkMkzPK8wl4xQfQf7lHe11Jotell5ikMVAtikXJEu/OJVaoV51BggRQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.3.tgz", + "integrity": "sha512-gQNcMF23/NpvjCaa1b5YycUyQJ9rBNH2xP94LWinNpodMWVUPP5Ai/xXANn/SM7gfIvI62B5CCvZxhg5pOgyMw==", "dependencies": { "@ioredis/commands": "^1.1.1", "cluster-key-slot": "^1.1.0", @@ -867,9 +874,9 @@ } }, "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.6.tgz", + "integrity": "sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==", "engines": { "node": ">= 0.4" }, @@ -987,9 +994,9 @@ } }, "node_modules/is-unicode-supported": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz", - "integrity": "sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "engines": { "node": ">=12" }, @@ -1202,9 +1209,9 @@ } }, "node_modules/nodemailer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.7.tgz", - "integrity": "sha512-pOLC/s+2I1EXuSqO5Wa34i3kXZG3gugDssH+ZNCevHad65tc8vQlCQpOLaUjopvkRQKm2Cki2aME7fEOPRy3bA==", + "version": "6.7.8", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.8.tgz", + "integrity": "sha512-2zaTFGqZixVmTxpJRCFC+Vk5eGRd/fYtvIR+dl5u9QXLTQWGIf48x/JXvo58g9sa0bU6To04XUv554Paykum3g==", "engines": { "node": ">=6.0.0" } @@ -1226,13 +1233,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -1536,6 +1543,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/slow-json-stringify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/slow-json-stringify/-/slow-json-stringify-2.0.1.tgz", + "integrity": "sha512-jqyzIqTaSkRGcWdWqjmOLKHZgOGUT71ZCTsvQu1xGu9Mqaod7O26y5FJJEmaUQhaTWh0bkXv2qqN0i+EQsD1jQ==" + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -1654,9 +1666,9 @@ } }, "node_modules/test": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/test/-/test-3.1.0.tgz", - "integrity": "sha512-3lO5M33Y4JoWYNzhJeKBSaZCcyFf2LJS5EsRwI5J//keVINQAWBybLZXoXZNHm8fFe2kcASb2EfjEodDY4kqRg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/test/-/test-3.2.1.tgz", + "integrity": "sha512-D9eN4OxdhyYS3xHSsAh5A0e+UhaOPxeREwBHTknZHoVFd4TqnPtkVrQ7lIUATPgpO9vvGg1D+TyMckVmUyaEig==", "dependencies": { "minimist": "^1.2.6", "string.prototype.replaceall": "^1.0.6" @@ -1844,9 +1856,9 @@ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" }, "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==" + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz", + "integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==" }, "array-flatten": { "version": "1.1.1", @@ -2059,15 +2071,15 @@ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, "es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", + "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -2079,9 +2091,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -2169,10 +2181,15 @@ "tmp": "^0.0.33" } }, + "fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "figures": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz", - "integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", "requires": { "escape-string-regexp": "^5.0.0", "is-unicode-supported": "^1.2.0" @@ -2232,9 +2249,9 @@ } }, "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -2315,16 +2332,16 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "inquirer": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.2.tgz", - "integrity": "sha512-AqmDHmz3bIe573OiM4svTZzajBzff1xpuzYAimW8gjzW5ncuPllWB8t/GKl+NSuKRJaKyIF2bU2RCx8H1dwqyQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.1.tgz", + "integrity": "sha512-hfS9EJ1pVkGNbYKqzdGwMj0Dqosd36Qvxd5pFy4657QT23gmtFTSqoYBisZR75DReeSMWPNa8J0Lf6TQCz8PvA==", "requires": { "ansi-escapes": "^5.0.0", "chalk": "^5.0.1", "cli-cursor": "^4.0.0", "cli-width": "^4.0.0", "external-editor": "^3.0.3", - "figures": "^4.0.1", + "figures": "^5.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", "ora": "^6.1.2", @@ -2347,9 +2364,9 @@ } }, "ioredis": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.2.tgz", - "integrity": "sha512-wryKc1ur8PcCmNwfcGkw5evouzpbDXxxkMkzPK8wl4xQfQf7lHe11Jotell5ikMVAtikXJEu/OJVaoV51BggRQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.3.tgz", + "integrity": "sha512-gQNcMF23/NpvjCaa1b5YycUyQJ9rBNH2xP94LWinNpodMWVUPP5Ai/xXANn/SM7gfIvI62B5CCvZxhg5pOgyMw==", "requires": { "@ioredis/commands": "^1.1.1", "cluster-key-slot": "^1.1.0", @@ -2400,9 +2417,9 @@ } }, "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.6.tgz", + "integrity": "sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==" }, "is-date-object": { "version": "1.0.5", @@ -2469,9 +2486,9 @@ } }, "is-unicode-supported": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz", - "integrity": "sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==" }, "is-weakref": { "version": "1.0.2", @@ -2631,9 +2648,9 @@ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, "nodemailer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.7.tgz", - "integrity": "sha512-pOLC/s+2I1EXuSqO5Wa34i3kXZG3gugDssH+ZNCevHad65tc8vQlCQpOLaUjopvkRQKm2Cki2aME7fEOPRy3bA==" + "version": "6.7.8", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.8.tgz", + "integrity": "sha512-2zaTFGqZixVmTxpJRCFC+Vk5eGRd/fYtvIR+dl5u9QXLTQWGIf48x/JXvo58g9sa0bU6To04XUv554Paykum3g==" }, "object-inspect": { "version": "1.12.2", @@ -2646,13 +2663,13 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, @@ -2869,6 +2886,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "slow-json-stringify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/slow-json-stringify/-/slow-json-stringify-2.0.1.tgz", + "integrity": "sha512-jqyzIqTaSkRGcWdWqjmOLKHZgOGUT71ZCTsvQu1xGu9Mqaod7O26y5FJJEmaUQhaTWh0bkXv2qqN0i+EQsD1jQ==" + }, "sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -2954,9 +2976,9 @@ "integrity": "sha512-BwSUSa8LMHZouGadZ34ck3TsrH5s3oMmTKPK+xHdbBnTCZOZMJ38fHGKLAHkBl0PXru1Z4BsymQU4qqvTxWzdQ==" }, "test": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/test/-/test-3.1.0.tgz", - "integrity": "sha512-3lO5M33Y4JoWYNzhJeKBSaZCcyFf2LJS5EsRwI5J//keVINQAWBybLZXoXZNHm8fFe2kcASb2EfjEodDY4kqRg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/test/-/test-3.2.1.tgz", + "integrity": "sha512-D9eN4OxdhyYS3xHSsAh5A0e+UhaOPxeREwBHTknZHoVFd4TqnPtkVrQ7lIUATPgpO9vvGg1D+TyMckVmUyaEig==", "requires": { "minimist": "^1.2.6", "string.prototype.replaceall": "^1.0.6" diff --git a/package.json b/package.json index 77c9e7e0..5da750e8 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,13 @@ "commonjs": "^0.0.1", "express": "^4.18.1", "express-fileupload": "^1.4.0", + "fast-stable-stringify": "^1.0.0", "inquirer": "^9.0.0", "ioredis": "^5.1.0", "json5": "^2.2.1", "mysql2": "^2.3.3", "nodemailer": "^6.7.7", + "slow-json-stringify": "^2.0.1", "uuid": "^8.3.2" } }