diff --git a/README.md b/README.md index 2815448..14a1591 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,21 @@ The libraries tested are: | [json-query](https://www.npmjs.com/package/json-query) | [![npm](https://img.shields.io/npm/dw/json-query.svg)](https://www.npmjs.com/package/json-query) | ![GitHub last commit](https://img.shields.io/github/last-commit/mmckegg/json-query.svg) | | [jsonpath-plus](https://www.npmjs.com/package/jsonpath-plus) | [![npm](https://img.shields.io/npm/dw/jsonpath-plus.svg)](https://www.npmjs.com/package/jsonpath-plus) | ![GitHub last commit](https://img.shields.io/github/last-commit/s3u/JSONPath.svg) | | [jsonpath](https://www.npmjs.com/package/jsonpath) | [![npm](https://img.shields.io/npm/dw/jsonpath.svg)](https://www.npmjs.com/package/jsonpath) | ![GitHub last commit](https://img.shields.io/github/last-commit/dchester/jsonpath.svg) | +| [json-p3](https://www.npmjs.com/package/json-p3) | [![npm](https://img.shields.io/npm/dw/json-p3.svg)](https://www.npmjs.com/package/json-p3) | ![GitHub last commit](https://img.shields.io/github/last-commit/jg-rp/json-p3.svg) | +| [js-json-go](https://www.npmjs.com/package/js-json-go) | [![npm](https://img.shields.io/npm/dw/js-json-go.svg)](https://www.npmjs.com/package/jg-json-go) | ![GitHub last commit](https://img.shields.io/github/last-commit/JG-1202/js-json-go.svg) | +| [json-power-query](https://www.npmjs.com/package/json-power-query) | [![npm](https://img.shields.io/npm/dw/json-power-query.svg)](https://www.npmjs.com/package/json-power-query) | ![GitHub last commit](https://img.shields.io/github/last-commit/TotalTechGeek/json-power-query.svg) | | [JSONStream](https://www.npmjs.com/package/JSONStream) | [![npm](https://img.shields.io/npm/dw/JSONStream.svg)](https://www.npmjs.com/package/JSONStream) | ![GitHub last commit](https://img.shields.io/github/last-commit/dominictarr/JSONStream.svg) | | [oboe](https://www.npmjs.com/package/oboe) | [![npm](https://img.shields.io/npm/dw/oboe.svg)](https://www.npmjs.com/package/oboe) | ![GitHub last commit](https://img.shields.io/github/last-commit/jimhigson/oboe.js.svg) | -| [map-filter-reduce](https://www.npmjs.com/package/map-filter-reduce) | [![npm](https://img.shields.io/npm/dw/map-filter-reduce.svg)](https://www.npmjs.com/package/map-filter-reduce) | ![GitHub last commit](https://img.shields.io/github/last-commit/dominictarr/map-filter-reduce.svg) | +| [map-filter-reduce](https://www.npmjs.com/package/map-filter-reduce) | [![npm](https://img.shields.io/npm/dw/map-filter-reduce.svg)](https://www.npmjs.com/package/map-filter-reduce) | ![GitHub last commit](https://img.shields.io/github/last-commit/jg-rp/json-p3.svg) | `jsonpath-plus` and `jsonpath` use the [XPath for Json Specification](https://goessner.net/articles/JsonPath). -`json-query` has its own custom DSL. `JSONStream`, `oboe`, and `map-filter-reduce` are streaming libraries, though I've had varying success in making them anywhere near as performant. +`json-query`, `json-p3` and `json-js-go` has its own custom DSL. `JSONStream`, `oboe`, and `map-filter-reduce` are streaming libraries, though I've had varying success in making them anywhere near as performant. ## How to run ``` -npm install -npm run perf +pnpm install +pnpm run perf ``` ### Method Explaination @@ -34,13 +37,13 @@ The performance test runs three queries on each of the libraries. All three quer ### Results -Ran using Macbook Pro, 2.2 GHz Intel Core i7, 16 GB 2400 MHz DDR4 +Ran using Macbook Pro, Apple M2 Max 12c, 32GB RAM, Node v21.4.0 ``` -$ npm run perf +$ pnpm run perf -> perf-json-querying@1.0.0 perf /Users/andrew/Code/scratchwork/perf-json-querying -> node --max-old-space-size=4096 src +> perf-json-querying@1.0.0 perf /Users/jbergstroem/wrk/oss/json-querying-performance-testing +> node --max-old-space-size=4096 --expose-gc src smallCityLots 49998 items. mediumCityLots 99998 items. @@ -48,44 +51,68 @@ largeCityLots 206560 items. smallCityLots: - json-query: - - shallow took 0.0176 seconds. - - deep took 0.0502 seconds. - - conditional took 0.0408 seconds. + - shallow took 0.0047 seconds. + - deep took 0.0048 seconds. + - conditional took 0.0062 seconds. - jsonpath-plus: - - shallow took 0.4146 seconds. - - deep took 0.4239 seconds. - - conditional took 0.326 seconds. + - shallow took 0.1355 seconds. + - deep took 0.1339 seconds. + - conditional took 0.0342 seconds. - jsonpath: - - shallow took 1.1165 seconds. - - deep took 4.4373 seconds. - - conditional took 0.1387 seconds. + - shallow took 0.3711 seconds. + - deep took 2.3432 seconds. + - conditional took 0.0116 seconds. +- json-p3: + - shallow took 0.6913 seconds. + - deep took 0.5962 seconds. + - conditional took 0.029 seconds. +- js-json-go: + - shallow took 0.0434 seconds. + - deep took 0.0399 seconds. + - conditional took 0.0616 seconds. +- json-power-query: + - shallow took 0.0029 seconds. + - deep took 0.0028 seconds. + - conditional took 0.0037 seconds. - JSONStream: - - shallow took 20.5 seconds. - - deep took 23.5372 seconds. + - shallow took 0.9522 seconds. + - deep took 0.9774 seconds. - oboe: - - shallow took 25.0891 seconds. - - deep took 32.5883 seconds. + - shallow took 1.1483 seconds. + - deep took 1.1847 seconds. - map-filter-reduce: mediumCityLots: - json-query: - - shallow took 0.0489 seconds. - - deep took 0.0732 seconds. - - conditional took 0.0488 seconds. + - shallow took 0.0055 seconds. + - deep took 0.0091 seconds. + - conditional took 0.0083 seconds. - jsonpath-plus: - - shallow took 0.8285 seconds. - - deep took 0.8567 seconds. - - conditional took 0.6074 seconds. + - shallow took 0.2546 seconds. + - deep took 0.272 seconds. + - conditional took 0.0593 seconds. - jsonpath: - - shallow took 2.2047 seconds. - - deep took 37.187 seconds. - - conditional took 0.2852 seconds. + - shallow took 0.7684 seconds. + - deep took 8.2911 seconds. + - conditional took 0.0192 seconds. +- json-p3: + - shallow took 1.4808 seconds. + - deep took 1.2317 seconds. + - conditional took 0.0475 seconds. +- js-json-go: + - shallow took 0.0712 seconds. + - deep took 0.0634 seconds. + - conditional took 0.1034 seconds. +- json-power-query: + - shallow took 0.0051 seconds. + - deep took 0.0044 seconds. + - conditional took 0.0038 seconds. - JSONStream: - - shallow took 199.4793 seconds. - - deep took 5.0332 seconds. + - shallow took 2.0166 seconds. + - deep took 2.048 seconds. - oboe: - - shallow took 27.819 seconds. - - deep took 77.9259 seconds. + - shallow took 2.4415 seconds. + - deep took 2.4524 seconds. - map-filter-reduce: largeCityLots: @@ -94,19 +121,31 @@ json-query shallow failed, RangeError: Maximum call stack size exceeded. json-query deep failed, RangeError: Maximum call stack size exceeded. json-query conditional failed, RangeError: Maximum call stack size exceeded. - jsonpath-plus: - - shallow took 2.3345 seconds. - - deep took 2.472 seconds. - - conditional took 3.1351 seconds. + - shallow took 0.7001 seconds. + - deep took 0.7331 seconds. + - conditional took 0.1226 seconds. - jsonpath: - - shallow took 8.509 seconds. - - deep took 252.9623 seconds. - - conditional took 0.7586 seconds. + - shallow took 2.1981 seconds. + - deep took 33.633 seconds. + - conditional took 0.0452 seconds. +- json-p3: + - shallow took 5.3844 seconds. + - deep took 5.3054 seconds. + - conditional took 0.1007 seconds. +- js-json-go: + - shallow took 0.1173 seconds. + - deep took 0.12 seconds. + - conditional took 0.2242 seconds. +- json-power-query: + - shallow took 0.0117 seconds. + - deep took 0.0113 seconds. + - conditional took 0.0093 seconds. - JSONStream: - - shallow took 54.8295 seconds. - - deep took 146.2962 seconds. + - shallow took 6.0252 seconds. + - deep took 6.0345 seconds. - oboe: - - shallow took 148.8824 seconds. - - deep took 216.7555 seconds. + - shallow took 7.341 seconds. + - deep took 7.2204 seconds. - map-filter-reduce: @@ -115,35 +154,44 @@ summary: smallCityLots ┌───────────────────┬───────────────────┬───────────────────┬───────────────────┐ -│ (index) │ shallow │ deep │ conditional │ +│ (index) │ shallow │ deep │ conditional │ ├───────────────────┼───────────────────┼───────────────────┼───────────────────┤ -│ json-query │ 0.0176 │ 0.0502 │ 0.0408 │ -│ jsonpath-plus │ 0.4146 │ 0.4239 │ 0.326 │ -│ jsonpath │ 1.1165 │ 4.4373 │ 0.1387 │ -│ JSONStream │ 20.5 │ 23.5372 │ 'not possible' │ -│ oboe │ 25.0891 │ 32.5883 │ 'not possible' │ +│ json-query │ 0.0047 │ 0.0048 │ 0.0062 │ +│ jsonpath-plus │ 0.1355 │ 0.1339 │ 0.0342 │ +│ jsonpath │ 0.3711 │ 2.3432 │ 0.0116 │ +│ json-p3 │ 0.6913 │ 0.5962 │ 0.029 │ +│ js-json-go │ 0.0434 │ 0.0399 │ 0.0616 │ +│ json-power-query │ 0.0029 │ 0.0028 │ 0.0037 │ +│ JSONStream │ 0.9522 │ 0.9774 │ 'not possible' │ +│ oboe │ 1.1483 │ 1.1847 │ 'not possible' │ │ map-filter-reduce │ 'not implemented' │ 'not implemented' │ 'not implemented' │ └───────────────────┴───────────────────┴───────────────────┴───────────────────┘ mediumCityLots ┌───────────────────┬───────────────────┬───────────────────┬───────────────────┐ -│ (index) │ shallow │ deep │ conditional │ +│ (index) │ shallow │ deep │ conditional │ ├───────────────────┼───────────────────┼───────────────────┼───────────────────┤ -│ json-query │ 0.0489 │ 0.0732 │ 0.0488 │ -│ jsonpath-plus │ 0.8285 │ 0.8567 │ 0.6074 │ -│ jsonpath │ 2.2047 │ 37.187 │ 0.2852 │ -│ JSONStream │ 199.4793 │ 5.0332 │ 'not possible' │ -│ oboe │ 27.819 │ 77.9259 │ 'not possible' │ +│ json-query │ 0.0055 │ 0.0091 │ 0.0083 │ +│ jsonpath-plus │ 0.2546 │ 0.272 │ 0.0593 │ +│ jsonpath │ 0.7684 │ 8.2911 │ 0.0192 │ +│ json-p3 │ 1.4808 │ 1.2317 │ 0.0475 │ +│ js-json-go │ 0.0712 │ 0.0634 │ 0.1034 │ +│ json-power-query │ 0.0051 │ 0.0044 │ 0.0038 │ +│ JSONStream │ 2.0166 │ 2.048 │ 'not possible' │ +│ oboe │ 2.4415 │ 2.4524 │ 'not possible' │ │ map-filter-reduce │ 'not implemented' │ 'not implemented' │ 'not implemented' │ └───────────────────┴───────────────────┴───────────────────┴───────────────────┘ largeCityLots ┌───────────────────┬───────────────────┬───────────────────┬───────────────────┐ -│ (index) │ shallow │ deep │ conditional │ +│ (index) │ shallow │ deep │ conditional │ ├───────────────────┼───────────────────┼───────────────────┼───────────────────┤ -│ json-query │ 'failed' │ 'failed' │ 'failed' │ -│ jsonpath-plus │ 2.3345 │ 2.472 │ 3.1351 │ -│ jsonpath │ 8.509 │ 252.9623 │ 0.7586 │ -│ JSONStream │ 54.8295 │ 146.2962 │ 'not possible' │ -│ oboe │ 148.8824 │ 216.7555 │ 'not possible' │ +│ json-query │ 'failed' │ 'failed' │ 'failed' │ +│ jsonpath-plus │ 0.7001 │ 0.7331 │ 0.1226 │ +│ jsonpath │ 2.1981 │ 33.633 │ 0.0452 │ +│ json-p3 │ 5.3844 │ 5.3054 │ 0.1007 │ +│ js-json-go │ 0.1173 │ 0.12 │ 0.2242 │ +│ json-power-query │ 0.0117 │ 0.0113 │ 0.0093 │ +│ JSONStream │ 6.0252 │ 6.0345 │ 'not possible' │ +│ oboe │ 7.341 │ 7.2204 │ 'not possible' │ │ map-filter-reduce │ 'not implemented' │ 'not implemented' │ 'not implemented' │ └───────────────────┴───────────────────┴───────────────────┴───────────────────┘ ``` diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..70f5a91 --- /dev/null +++ b/biome.json @@ -0,0 +1,55 @@ +{ + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "correctness": { + "all": false, + "noUnusedVariables": "error", + "noPrecisionLoss": "error" + }, + "suspicious": { + "all": false, + "noControlCharactersInRegex": "error" + } + }, + "ignore": ["datasets"] + }, + "files": { + "ignoreUnknown": true + }, + "formatter": { + "enabled": true, + "formatWithErrors": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 120, + "ignore": ["datasets"] + }, + "javascript": { + "formatter": { + "enabled": true, + "quoteStyle": "single", + "arrowParentheses": "asNeeded", + "trailingComma": "all", + "lineEnding": "lf" + }, + "parser": { + "unsafeParameterDecoratorsEnabled": true + } + }, + "json": { + "formatter": { + "enabled": true + } + } +} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 16c2866..0000000 --- a/package-lock.json +++ /dev/null @@ -1,598 +0,0 @@ -{ - "name": "perf-json-querying", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "JSONSelect": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz", - "integrity": "sha1-oI7cxn6z/L6Z7WMIVTRKDPKCu40=" - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "binary-search": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.5.tgz", - "integrity": "sha512-RHFP0AdU6KAB0CCZsRMU2CJTk2EpL8GLURT+4gilpjr1f/7M91FgUMnXuQLmf3OKLet34gjuNFwO7e4agdX5pw==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "cjson": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.2.1.tgz", - "integrity": "sha1-c82KrWXZ4VBfmvF0TTt5wVJ2gqU=" - }, - "colors": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/colors/-/colors-0.5.1.tgz", - "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=" - }, - "compare-at-paths": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/compare-at-paths/-/compare-at-paths-1.0.0.tgz", - "integrity": "sha512-Ke1ejo/RZ+Hzku4gcW34uPMOR4Cpq87MAotELgV9mwiAzDN726cu+eWo0zWg1vRIfyf6yK5bW9uIW+c/SksQ5w==", - "requires": { - "libnested": "^1.3.2", - "tape": "^4.9.1", - "typewiselite": "^1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, - "ebnf-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/ebnf-parser/-/ebnf-parser-0.1.10.tgz", - "integrity": "sha1-zR9rpHfFY4xAyX7ZtXLbW6tdgzE=" - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escodegen": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.21.tgz", - "integrity": "sha1-U9ZSz6EDA4gnlFilJmxf/HCcY8M=", - "requires": { - "esprima": "~1.0.2", - "estraverse": "~0.0.4", - "source-map": ">= 0.1.2" - }, - "dependencies": { - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" - } - } - }, - "esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=" - }, - "estraverse": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-0.0.4.tgz", - "integrity": "sha1-AaCTLf7ldGhKWYr1pnw7+bZCjbI=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "requires": { - "is-callable": "^1.1.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "requires": { - "has-symbols": "^1.0.0" - } - }, - "jison": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/jison/-/jison-0.4.13.tgz", - "integrity": "sha1-kEFwfWIkE2f1iDRTK58ZwsNvrHg=", - "requires": { - "JSONSelect": "0.4.0", - "cjson": "~0.2.1", - "ebnf-parser": "~0.1.9", - "escodegen": "0.0.21", - "esprima": "1.0.x", - "jison-lex": "0.2.x", - "lex-parser": "~0.1.3", - "nomnom": "1.5.2" - }, - "dependencies": { - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" - } - } - }, - "jison-lex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/jison-lex/-/jison-lex-0.2.1.tgz", - "integrity": "sha1-rEuBXozOUTLrErXfz+jXB7iETf4=", - "requires": { - "lex-parser": "0.1.x", - "nomnom": "1.5.2" - } - }, - "json-query": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/json-query/-/json-query-2.2.2.tgz", - "integrity": "sha1-tlWLijeUzNIXkmqjgCQyS3e0irE=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "jsonpath": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.0.1.tgz", - "integrity": "sha512-HY5kSg82LHIs0r0h9gYBwpNc1w1qGY0qJ7al01W1bJltsN2lp+mjjA/a79gXWuvD6Xf8oPkD2d5uKMZQXTGzqA==", - "requires": { - "esprima": "1.2.2", - "jison": "0.4.13", - "static-eval": "2.0.2", - "underscore": "1.7.0" - } - }, - "jsonpath-plus": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-0.18.1.tgz", - "integrity": "sha512-4yQiuV641HROc4z9YGvnsr8yAdmzbu8JjdAen8WfiXsXewKvTG4ie2bSygF2maek9PcbtROmS6aLQs31BD+oNQ==" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lex-parser": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/lex-parser/-/lex-parser-0.1.4.tgz", - "integrity": "sha1-ZMTwJfF/1Tv7RXY/rrFvAVp0dVA=" - }, - "libnested": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/libnested/-/libnested-1.4.1.tgz", - "integrity": "sha512-7fvNHrU8QTep71gIJuz7z6iBAQULEHJOcIA0MKUlwFrSnntvOvnke+/tnR7ZxyRAQQ303UJXNZBSRz3r0N5tqw==" - }, - "map-filter-reduce": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/map-filter-reduce/-/map-filter-reduce-3.2.2.tgz", - "integrity": "sha512-p+NIGQbEBxlw/qWwG+NME98G/9kjOQI70hmaH8QEZtIWfTmfMYLKQW4PJChP4izPHNAxlOfv/qefP0+2ZXn84A==", - "requires": { - "binary-search": "^1.2.0", - "compare-at-paths": "^1.0.0", - "pull-sink-through": "0.0.0", - "pull-sort": "^1.0.1", - "pull-stream": "^3.4.3", - "typewiselite": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "nomnom": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.5.2.tgz", - "integrity": "sha1-9DRUSKhTz71cDSYyDyR3qwUm/i8=", - "requires": { - "colors": "0.5.x", - "underscore": "1.1.x" - }, - "dependencies": { - "underscore": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz", - "integrity": "sha1-QLq4S60Z0jAJbo1u9ii/8FXYPbA=" - } - } - }, - "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", - "requires": { - "http-https": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "pull-defer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", - "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==" - }, - "pull-sink-through": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/pull-sink-through/-/pull-sink-through-0.0.0.tgz", - "integrity": "sha1-08BJLzqAtO0gSvZ8S0+TVoD8Wx8=" - }, - "pull-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pull-sort/-/pull-sort-1.0.2.tgz", - "integrity": "sha512-jGcAHMP+0Le+bEIhSODlbNNd3jW+S6XrXOlhVzfcKU5HQZjP92OzQSgHHSlwvWRsiTWi+UGgbFpL/5gGgmFoVQ==", - "requires": { - "pull-defer": "^0.2.3", - "pull-stream": "^3.6.9" - } - }, - "pull-stream": { - "version": "3.6.11", - "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.11.tgz", - "integrity": "sha512-43brwtqO0OSltctKbW1mgzzKH4TNE8egkW+Y4BFzlDWiG2Ayl7VKr4SeuoKacfgPfUWcSwcPlHsf40BEqNR32A==" - }, - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", - "requires": { - "path-parse": "^1.0.6" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "~2.3.4" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "optional": true - }, - "split2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz", - "integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==", - "requires": { - "readable-stream": "^3.0.0" - } - }, - "static-eval": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", - "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", - "requires": { - "escodegen": "^1.8.1" - }, - "dependencies": { - "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - } - } - }, - "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.0", - "function-bind": "^1.0.2" - } - }, - "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "tape": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.10.1.tgz", - "integrity": "sha512-G0DywYV1jQeY3axeYnXUOt6ktnxS9OPJh97FGR3nrua8lhWi1zPflLxcAHavZ7Jf3qUfY7cxcVIVFa4mY2IY1w==", - "requires": { - "deep-equal": "~1.0.1", - "defined": "~1.0.0", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.3", - "has": "~1.0.3", - "inherits": "~2.0.3", - "minimist": "~1.2.0", - "object-inspect": "~1.6.0", - "resolve": "~1.10.0", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.1.2", - "through": "~2.3.8" - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "typewiselite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typewiselite/-/typewiselite-1.0.0.tgz", - "integrity": "sha1-yIgvobsQksBgBal/NO9chQjjZk4=" - }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/package.json b/package.json index be1883e..b002b53 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,27 @@ "description": "", "main": "index.js", "scripts": { - "perf": "node --max-old-space-size=4096 src" + "lint": "biome check .", + "lint:fix": "biome check --apply .", + "perf": "node --max-old-space-size=4096 --expose-gc src" }, "keywords": [], "author": "Andrew Kaiser", "license": "MIT", "dependencies": { "JSONStream": "^1.3.5", + "js-json-go": "^1.2.2", + "json-p3": "^0.3.0", + "json-power-query": "^1.1.20", "json-query": "^2.2.2", - "jsonpath": "^1.0.1", - "jsonpath-plus": "^0.18.1", + "jsonpath": "^1.1.1", + "jsonpath-plus": "^7.2.0", "map-filter-reduce": "^3.2.2", - "oboe": "^2.1.4", - "pull-stream": "^3.6.11", - "split2": "^3.1.1" + "oboe": "^2.1.5", + "pull-stream": "^3.7.0", + "split2": "^4.2.0" + }, + "devDependencies": { + "@biomejs/biome": "^1.4.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..cd4ac59 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,973 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + JSONStream: + specifier: ^1.3.5 + version: 1.3.5 + js-json-go: + specifier: ^1.2.2 + version: 1.2.2 + json-p3: + specifier: ^0.3.0 + version: 0.3.0 + json-power-query: + specifier: ^1.1.20 + version: 1.1.20 + json-query: + specifier: ^2.2.2 + version: 2.2.2 + jsonpath: + specifier: ^1.1.1 + version: 1.1.1 + jsonpath-plus: + specifier: ^7.2.0 + version: 7.2.0 + map-filter-reduce: + specifier: ^3.2.2 + version: 3.2.2 + oboe: + specifier: ^2.1.5 + version: 2.1.5 + pull-stream: + specifier: ^3.7.0 + version: 3.7.0 + split2: + specifier: ^4.2.0 + version: 4.2.0 + +devDependencies: + '@biomejs/biome': + specifier: ^1.4.1 + version: 1.4.1 + +packages: + + /@biomejs/biome@1.4.1: + resolution: {integrity: sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg==} + engines: {node: '>=14.*'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.4.1 + '@biomejs/cli-darwin-x64': 1.4.1 + '@biomejs/cli-linux-arm64': 1.4.1 + '@biomejs/cli-linux-x64': 1.4.1 + '@biomejs/cli-win32-arm64': 1.4.1 + '@biomejs/cli-win32-x64': 1.4.1 + dev: true + + /@biomejs/cli-darwin-arm64@1.4.1: + resolution: {integrity: sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-darwin-x64@1.4.1: + resolution: {integrity: sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64@1.4.1: + resolution: {integrity: sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64@1.4.1: + resolution: {integrity: sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-arm64@1.4.1: + resolution: {integrity: sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-x64@1.4.1: + resolution: {integrity: sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@ljharb/resumer@0.0.1: + resolution: {integrity: sha512-skQiAOrCfO7vRTq53cxznMpks7wS1va95UCidALlOVWqvBAzwPVErwizDwoMqNVMEn1mDq0utxZd02eIrvF1lw==} + engines: {node: '>= 0.4'} + dependencies: + '@ljharb/through': 2.3.11 + dev: false + + /@ljharb/through@2.3.11: + resolution: {integrity: sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + dev: false + + /JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + dev: false + + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 + dev: false + + /arraybuffer.prototype.slice@1.0.1: + resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.1 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 + dev: false + + /available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + dev: false + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: false + + /binary-search@1.3.6: + resolution: {integrity: sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==} + dev: false + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: false + + /call-bind@1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + dev: false + + /compare-at-paths@1.0.0: + resolution: {integrity: sha512-Ke1ejo/RZ+Hzku4gcW34uPMOR4Cpq87MAotELgV9mwiAzDN726cu+eWo0zWg1vRIfyf6yK5bW9uIW+c/SksQ5w==} + dependencies: + libnested: 1.5.2 + tape: 4.17.0 + typewiselite: 1.0.0 + dev: false + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: false + + /deep-equal@1.1.1: + resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==} + dependencies: + is-arguments: 1.1.1 + is-date-object: 1.0.5 + is-regex: 1.1.4 + object-is: 1.1.5 + object-keys: 1.1.1 + regexp.prototype.flags: 1.5.0 + dev: false + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: false + + /define-data-property@1.1.0: + resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + dev: false + + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + dev: false + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.0 + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: false + + /defined@1.0.1: + resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} + dev: false + + /dotignore@0.1.2: + resolution: {integrity: sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==} + hasBin: true + dependencies: + minimatch: 3.1.2 + dev: false + + /es-abstract@1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.1 + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.2.1 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.12 + is-weakref: 1.0.2 + object-inspect: 1.12.3 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.5.0 + safe-array-concat: 1.0.1 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.11 + dev: false + + /es-set-tostringtag@2.0.1: + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + has-tostringtag: 1.0.0 + dev: false + + /es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: false + + /escodegen@1.14.3: + resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==} + engines: {node: '>=4.0'} + hasBin: true + dependencies: + esprima: 4.0.1 + estraverse: 4.3.0 + esutils: 2.0.3 + optionator: 0.8.3 + optionalDependencies: + source-map: 0.6.1 + dev: false + + /esprima@1.2.2: + resolution: {integrity: sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: false + + /esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: false + + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: false + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: false + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: false + + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: false + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: false + + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: false + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: false + + /function.prototype.name@1.1.5: + resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 + functions-have-names: 1.2.3 + dev: false + + /functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: false + + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: false + + /get-symbol-description@1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + dev: false + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: false + + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + dev: false + + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.1 + dev: false + + /has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: false + + /has-property-descriptors@1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + dependencies: + get-intrinsic: 1.2.1 + dev: false + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: false + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: false + + /has-tostringtag@1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: false + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: false + + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: false + + /http-https@1.0.0: + resolution: {integrity: sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==} + dev: false + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: false + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: false + + /internal-slot@1.0.5: + resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + side-channel: 1.0.4 + dev: false + + /is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: false + + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: false + + /is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: false + + /is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: false + + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: false + + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + dependencies: + has: 1.0.3 + dev: false + + /is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + + /is-negative-zero@2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: false + + /is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: false + + /is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: false + + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: false + + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.11 + dev: false + + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: false + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: false + + /js-json-go@1.2.2: + resolution: {integrity: sha512-I7y4NdRhFJjkOd1xkNTyWM1OdjFk2E2C3gL6NIpxID5uuAOBzcNwn2m9ZKg8GgzuSPDiidtAU9LrjGESPBeb9w==} + dev: false + + /json-logic-engine@1.3.1: + resolution: {integrity: sha512-ek2rHlbzVjsWG/5HM8P/ljYrYS5nDFYtSHk2r/U4oaUGKRWyZo7bDyDiLmYSfEmZp2LJMgnjVo2b0tHc+cqVHQ==} + engines: {node: '>=12.22.7'} + dev: false + + /json-p3@0.3.0: + resolution: {integrity: sha512-j5hrsL0exeUB9t+9M106vY21tLts/UVsBHsekQNpI0apiGHG0Cxnf000xLNZSVZScQZ302gtD5TG2E0Hno10IA==} + dev: false + + /json-power-query@1.1.20: + resolution: {integrity: sha512-j1R6iSuM/9lSJJYvJXg5294wQQw9VkSmZ6iEe0VGXHmh3Z4eVEFWRW+9dXalTjoYybS1GkpyUiJ02suDJ6FbRw==} + dependencies: + json-logic-engine: 1.3.1 + dev: false + + /json-query@2.2.2: + resolution: {integrity: sha512-y+IcVZSdqNmS4fO8t1uZF6RMMs0xh3SrTjJr9bp1X3+v0Q13+7Cyv12dSmKwDswp/H427BVtpkLWhGxYu3ZWRA==} + dev: false + + /jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + dev: false + + /jsonpath-plus@7.2.0: + resolution: {integrity: sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==} + engines: {node: '>=12.0.0'} + dev: false + + /jsonpath@1.1.1: + resolution: {integrity: sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==} + dependencies: + esprima: 1.2.2 + static-eval: 2.0.2 + underscore: 1.12.1 + dev: false + + /levn@0.3.0: + resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + dev: false + + /libnested@1.5.2: + resolution: {integrity: sha512-DbiwHL8454goYRp5Xn9vUA5XU6x8rNh8BmZ7ywSTUhVBIiDS7ev/FT6+AwU2/ZKW2jEOC7WKhpkJfExaQwosRA==} + dev: false + + /map-filter-reduce@3.2.2: + resolution: {integrity: sha512-p+NIGQbEBxlw/qWwG+NME98G/9kjOQI70hmaH8QEZtIWfTmfMYLKQW4PJChP4izPHNAxlOfv/qefP0+2ZXn84A==} + dependencies: + binary-search: 1.3.6 + compare-at-paths: 1.0.0 + pull-sink-through: 0.0.0 + pull-sort: 1.0.2 + pull-stream: 3.7.0 + typewiselite: 1.0.0 + dev: false + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: false + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: false + + /mock-property@1.0.3: + resolution: {integrity: sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + functions-have-names: 1.2.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + hasown: 2.0.0 + isarray: 2.0.5 + dev: false + + /object-inspect@1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: false + + /object-is@1.1.5: + resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + dev: false + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: false + + /object.assign@4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: false + + /oboe@2.1.5: + resolution: {integrity: sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==} + dependencies: + http-https: 1.0.0 + dev: false + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: false + + /optionator@0.8.3: + resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + word-wrap: 1.2.5 + dev: false + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: false + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: false + + /prelude-ls@1.1.2: + resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} + engines: {node: '>= 0.8.0'} + dev: false + + /pull-defer@0.2.3: + resolution: {integrity: sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==} + dev: false + + /pull-sink-through@0.0.0: + resolution: {integrity: sha512-XjpF/3+WRsWfw+XhPgj3I/6WO15VYOKLsXAtWt1sRKOqA6N7bnarut5zuE2GcxbAzspaQxKmMcbUYZ8QorPxcQ==} + dev: false + + /pull-sort@1.0.2: + resolution: {integrity: sha512-jGcAHMP+0Le+bEIhSODlbNNd3jW+S6XrXOlhVzfcKU5HQZjP92OzQSgHHSlwvWRsiTWi+UGgbFpL/5gGgmFoVQ==} + dependencies: + pull-defer: 0.2.3 + pull-stream: 3.7.0 + dev: false + + /pull-stream@3.7.0: + resolution: {integrity: sha512-Eco+/R004UaCK2qEDE8vGklcTG2OeZSVm1kTUQNrykEjDwcFXDZhygFDsW49DbXyJMEhHeRL3z5cRVqPAhXlIw==} + dev: false + + /regexp.prototype.flags@1.5.0: + resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + functions-have-names: 1.2.3 + dev: false + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: false + + /safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: false + + /safe-regex-test@1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-regex: 1.1.4 + dev: false + + /side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 + dev: false + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + requiresBuild: true + dev: false + optional: true + + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: false + + /static-eval@2.0.2: + resolution: {integrity: sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==} + dependencies: + escodegen: 1.14.3 + dev: false + + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 + dev: false + + /string.prototype.trimend@1.0.6: + resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 + dev: false + + /string.prototype.trimstart@1.0.6: + resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.1 + dev: false + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: false + + /tape@4.17.0: + resolution: {integrity: sha512-KCuXjYxCZ3ru40dmND+oCLsXyuA8hoseu2SS404Px5ouyS0A99v8X/mdiLqsR5MTAyamMBN7PRwt2Dv3+xGIxw==} + hasBin: true + dependencies: + '@ljharb/resumer': 0.0.1 + '@ljharb/through': 2.3.11 + call-bind: 1.0.2 + deep-equal: 1.1.1 + defined: 1.0.1 + dotignore: 0.1.2 + for-each: 0.3.3 + glob: 7.2.3 + has: 1.0.3 + inherits: 2.0.4 + is-regex: 1.1.4 + minimist: 1.2.8 + mock-property: 1.0.3 + object-inspect: 1.12.3 + resolve: 1.22.8 + string.prototype.trim: 1.2.8 + dev: false + + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: false + + /type-check@0.3.2: + resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.1.2 + dev: false + + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + is-typed-array: 1.1.12 + dev: false + + /typewiselite@1.0.0: + resolution: {integrity: sha512-J9alhjVHupW3Wfz6qFRGgQw0N3gr8hOkw6zm7FZ6UR1Cse/oD9/JVok7DNE9TT9IbciDHX2Ex9+ksE6cRmtymw==} + dev: false + + /unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.2 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: false + + /underscore@1.12.1: + resolution: {integrity: sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==} + dev: false + + /which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: false + + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: false + + /word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + dev: false + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: false diff --git a/src/errors.js b/src/errors.js index d01894f..420091b 100644 --- a/src/errors.js +++ b/src/errors.js @@ -4,5 +4,5 @@ class UnImplementedError extends Error {} module.exports = { NotPossibleError, - UnImplementedError -} + UnImplementedError, +}; diff --git a/src/index.js b/src/index.js index 23c5275..9c35e5a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,131 +1,116 @@ -const { performance } = require('perf_hooks') -const { NotPossibleError, UnImplementedError } = require('./errors') +const { performance } = require('perf_hooks'); +const { NotPossibleError, UnImplementedError } = require('./errors'); const performanceClasses = { 'json-query': require('./queriers/json-query'), 'jsonpath-plus': require('./queriers/jsonpath-plus'), jsonpath: require('./queriers/jsonpath'), JSONStream: require('./queriers/JSONStream'), oboe: require('./queriers/oboe'), - 'map-filter-reduce': require('./queriers/map-filter-reduce') -} + 'json-p3': require('./queriers/json-p3'), + 'js-json-go': require('./queriers/js-json-go'), + 'json-power-query': require('./queriers/json-power-query'), + 'map-filter-reduce': require('./queriers/map-filter-reduce'), +}; const datasets = { smallCityLots: { dataset: require('../datasets/small-citylots.json'), methodResults: { shallow: 49998, deep: 49998, - conditional: 643 - } + conditional: 643, + }, }, mediumCityLots: { dataset: require('../datasets/medium-citylots.json'), methodResults: { shallow: 99998, deep: 99998, - conditional: 824 - } + conditional: 824, + }, }, largeCityLots: { dataset: require('../datasets/citylots.json'), methodResults: { shallow: 206560, deep: 206560, - conditional: 2843 - } - } -} + conditional: 2843, + }, + }, +}; -const perf = (perfClasses, datasets) => async ( - testLibraries, - testDatasets, - testMethods -) => { - const datasetPerf = {} +const perf = (perfClasses, datasets) => async (testLibraries, testDatasets, testMethods) => { + const datasetPerf = {}; for (const datasetName of testDatasets) { // for (const [name, { dataset, methodResults }] of Object.entries(datasets)) { - const { dataset, methodResults } = datasets[datasetName] - datasetPerf[datasetName] = {} - console.log(`${datasetName}:`) + const { dataset, methodResults } = datasets[datasetName]; + datasetPerf[datasetName] = {}; + console.log(`${datasetName}:`); for (const libName of testLibraries) { // for (const classKey of Object.keys(perfClasses)) { - datasetPerf[datasetName][libName] = {} - console.log(`- ${libName}:`) - const accessClass = new perfClasses[libName](dataset) + datasetPerf[datasetName][libName] = {}; + console.log(`- ${libName}:`); + const accessClass = new perfClasses[libName](dataset); for (const method of testMethods) { try { - await accessClass.setup() - const start = performance.now() - const result = await accessClass[method]() - const stop = performance.now() - accessClass.cleanup() - const seconds = (stop - start) / 1e3 - datasetPerf[datasetName][libName][method] = Number(seconds.toFixed(4)) - console.log( - ` - ${method} took ${ - datasetPerf[datasetName][libName][method] - } seconds.` - ) + await accessClass.setup(); + global.gc(); + const start = performance.now(); + const result = await accessClass[method](); + const stop = performance.now(); + accessClass.cleanup(); + const seconds = (stop - start) / 1e3; + datasetPerf[datasetName][libName][method] = Number(seconds.toFixed(4)); + console.log(` - ${method} took ${datasetPerf[datasetName][libName][method]} seconds.`); if (result.length !== methodResults[method]) { - e = new Error( - `result should have length ${ - methodResults[method] - } but instead is ${result.length}` - ) - e.name = 'AssertError' - throw e + e = new Error(`result should have length ${methodResults[method]} but instead is ${result.length}`); + e.name = 'AssertError'; + throw e; } } catch (e) { if (e instanceof NotPossibleError) { - datasetPerf[datasetName][libName][method] = 'not possible' - } - else if (e instanceof UnImplementedError) { - datasetPerf[datasetName][libName][method] = 'not implemented' - } - else if (e.name === 'AssertError') { - console.error(`${libName} ${method} ${e}`) - datasetPerf[datasetName][libName][method] = 'incorrect' + datasetPerf[datasetName][libName][method] = 'not possible'; + } else if (e instanceof UnImplementedError) { + datasetPerf[datasetName][libName][method] = 'not implemented'; + } else if (e.name === 'AssertError') { + console.error(`${libName} ${method} ${e}`); + datasetPerf[datasetName][libName][method] = 'incorrect'; } else { - console.error(`${libName} ${method} failed, ${e}.`) + console.error(`${libName} ${method} failed, ${e}.`); // console.error(e) - datasetPerf[datasetName][libName][method] = 'failed' + datasetPerf[datasetName][libName][method] = 'failed'; } } } } - console.log() + console.log(); } - return datasetPerf -} + return datasetPerf; +}; const logPerf = datasetPerf => { - console.log('\n\nsummary:\n') + console.log('\n\nsummary:\n'); for (const [datasetName, dataset] of Object.entries(datasetPerf)) { - console.log(datasetName) - console.table(dataset) + console.log(datasetName); + console.table(dataset); } -} +}; Object.entries(datasets).forEach(([name, { dataset }]) => { - console.log(name, dataset.features.length, 'items.') -}) -console.log() + console.log(name, dataset.features.length, 'items.'); +}); +console.log(); const testLibraries = [ 'json-query', 'jsonpath-plus', 'jsonpath', + 'json-p3', + 'js-json-go', + 'json-power-query', 'JSONStream', 'oboe', - 'map-filter-reduce' -] -const testDatasets = [ - 'smallCityLots', - 'mediumCityLots', - 'largeCityLots' -] -const testMethods = ['shallow', 'deep', 'conditional'] -perf(performanceClasses, datasets)( - testLibraries, - testDatasets, - testMethods -).then(logPerf) + 'map-filter-reduce', +]; +const testDatasets = ['smallCityLots', 'mediumCityLots', 'largeCityLots']; +const testMethods = ['shallow', 'deep', 'conditional']; +perf(performanceClasses, datasets)(testLibraries, testDatasets, testMethods).then(logPerf); diff --git a/src/object-to-stream.js b/src/object-to-stream.js index 82a3c29..5ea4f97 100644 --- a/src/object-to-stream.js +++ b/src/object-to-stream.js @@ -1,16 +1,16 @@ -const stream = require('stream') -const util = require('util') -const split2 = require('split2') +const stream = require('stream'); +const util = require('util'); +const split2 = require('split2'); module.exports = (object, { chunks = false } = {}) => { - const rs = new stream.Readable() + const rs = new stream.Readable(); if (chunks) { - rs.push(JSON.stringify(object, null, 2)) - rs.push(null) - return rs.pipe(split2()) + rs.push(JSON.stringify(object, null, 2)); + rs.push(null); + return rs.pipe(split2()); } else { - rs.push(JSON.stringify(object)) - rs.push(null) - return rs + rs.push(JSON.stringify(object)); + rs.push(null); + return rs; } -} +}; diff --git a/src/queriers/JSONStream.js b/src/queriers/JSONStream.js index f4d0e35..17fc904 100644 --- a/src/queriers/JSONStream.js +++ b/src/queriers/JSONStream.js @@ -1,36 +1,36 @@ -const JSONStream = require('JSONStream') -const CityLotsORM = require('./base-class') -const objectToStream = require('../object-to-stream') -const { NotPossibleError } = require('../errors') +const JSONStream = require('JSONStream'); +const CityLotsORM = require('./base-class'); +const objectToStream = require('../object-to-stream'); +const { NotPossibleError } = require('../errors'); class JSONStreamCity extends CityLotsORM { setup() { - this.jsonStream = objectToStream(this.data) + this.jsonStream = objectToStream(this.data); } cleanup() { - this.jsonStream = null + this.jsonStream = null; } execute(query) { return new Promise((resolve, reject) => { - const result = [] + const result = []; this.jsonStream .pipe(JSONStream.parse(query)) .on('data', data => { - result.push(data) + result.push(data); }) .on('close', () => resolve(result)) - .on('error', reject) - }) + .on('error', reject); + }); } shallow() { - return this.execute('features..properties') + return this.execute('features..properties'); } deep() { - return this.execute('features..properties.BLOCK_NUM') + return this.execute('features..properties.BLOCK_NUM'); } conditional() { - throw new NotPossibleError() + throw new NotPossibleError(); } } -module.exports = JSONStreamCity +module.exports = JSONStreamCity; diff --git a/src/queriers/base-class.js b/src/queriers/base-class.js index cfdf7c2..a244a77 100644 --- a/src/queriers/base-class.js +++ b/src/queriers/base-class.js @@ -1,20 +1,20 @@ -const { UnImplementedError } = require('../errors') +const { UnImplementedError } = require('../errors'); class CityLotsORM { constructor(data) { - this.data = data + this.data = data; } setup() {} cleanup() {} shallow() { - throw new UnImplementedError() + throw new UnImplementedError(); } deep() { - throw new UnImplementedError() + throw new UnImplementedError(); } conditional() { - throw new UnImplementedError() + throw new UnImplementedError(); } } -module.exports = CityLotsORM +module.exports = CityLotsORM; diff --git a/src/queriers/js-json-go.js b/src/queriers/js-json-go.js new file mode 100644 index 0000000..d0b8ff4 --- /dev/null +++ b/src/queriers/js-json-go.js @@ -0,0 +1,19 @@ +const jg = require('js-json-go'); +const CityLotsORM = require('./base-class'); + +class JsonPathCity extends CityLotsORM { + execute(query) { + return jg.getAll(this.data, query); + } + shallow() { + return this.execute('features[*].properties'); + } + deep() { + return this.execute('features[*].properties.BLOCK_NUM'); + } + conditional() { + return this.execute('features[{$.properties.STREET = UNKNOWN}].properties.BLOCK_NUM'); + } +} + +module.exports = JsonPathCity; diff --git a/src/queriers/json-p3.js b/src/queriers/json-p3.js new file mode 100644 index 0000000..9384990 --- /dev/null +++ b/src/queriers/json-p3.js @@ -0,0 +1,19 @@ +const jsonpath = require('json-p3'); +const CityLotsORM = require('./base-class'); + +class JsonP3City extends CityLotsORM { + execute(query) { + return jsonpath.query(query, this.data); + } + shallow() { + return this.execute('$.features..properties'); + } + deep() { + return this.execute('$.features..properties.BLOCK_NUM'); + } + conditional() { + return this.execute(`$.features[?(@.properties.STREET=='UNKNOWN')].properties.BLOCK_NUM`); + } +} + +module.exports = JsonP3City; diff --git a/src/queriers/json-power-query.js b/src/queriers/json-power-query.js new file mode 100644 index 0000000..3d950c9 --- /dev/null +++ b/src/queriers/json-power-query.js @@ -0,0 +1,20 @@ +const { queryBuilder } = require('json-power-query'); +const CityLotsORM = require('./base-class'); + +class JsonPowerQueryCity extends CityLotsORM { + execute(query) { + const f = queryBuilder(query); + return f(this.data); + } + shallow() { + return this.execute('$.features.*.properties'); + } + deep() { + return this.execute('$.features.*.properties.BLOCK_NUM'); + } + conditional() { + return this.execute(`$.features.[?(@.properties.STREET === 'UNKNOWN')].properties.BLOCK_NUM`); + } +} + +module.exports = JsonPowerQueryCity; diff --git a/src/queriers/json-query.js b/src/queriers/json-query.js index 689661b..10de96f 100644 --- a/src/queriers/json-query.js +++ b/src/queriers/json-query.js @@ -1,19 +1,19 @@ -const jsonQuery = require('json-query') -const CityLotsORM = require('./base-class') +const jsonQuery = require('json-query'); +const CityLotsORM = require('./base-class'); class JsonQueryCity extends CityLotsORM { execute(query) { - return jsonQuery(query, { data: this.data }).value + return jsonQuery(query, { data: this.data }).value; } shallow() { - return this.execute('features.properties') + return this.execute('features.properties'); } deep() { - return this.execute('features.properties.BLOCK_NUM') + return this.execute('features.properties.BLOCK_NUM'); } conditional() { - return this.execute('features.properties[*STREET=UNKNOWN].BLOCK_NUM') + return this.execute('features.properties[*STREET=UNKNOWN].BLOCK_NUM'); } } -module.exports = JsonQueryCity +module.exports = JsonQueryCity; diff --git a/src/queriers/jsonpath-plus.js b/src/queriers/jsonpath-plus.js index 275edfb..e60851d 100644 --- a/src/queriers/jsonpath-plus.js +++ b/src/queriers/jsonpath-plus.js @@ -1,24 +1,22 @@ -const { JSONPath } = require('jsonpath-plus') -const CityLotsORM = require('./base-class') +const { JSONPath } = require('jsonpath-plus'); +const CityLotsORM = require('./base-class'); class JsonPathPlusCity extends CityLotsORM { execute(query) { return JSONPath({ path: query, - json: this.data - }) + json: this.data, + }); } shallow() { - return this.execute('$.features..properties') + return this.execute('$.features..properties'); } deep() { - return this.execute('$.features..properties.BLOCK_NUM') + return this.execute('$.features..properties.BLOCK_NUM'); } conditional() { - return this.execute( - `$.features[?(@.properties.STREET == 'UNKNOWN')].properties.BLOCK_NUM` - ) + return this.execute(`$.features[?(@.properties.STREET == 'UNKNOWN')].properties.BLOCK_NUM`); } } -module.exports = JsonPathPlusCity +module.exports = JsonPathPlusCity; diff --git a/src/queriers/jsonpath.js b/src/queriers/jsonpath.js index 99565ab..f35aad9 100644 --- a/src/queriers/jsonpath.js +++ b/src/queriers/jsonpath.js @@ -1,21 +1,19 @@ -const jp = require('jsonpath') -const CityLotsORM = require('./base-class') +const jp = require('jsonpath'); +const CityLotsORM = require('./base-class'); class JsonPathCity extends CityLotsORM { execute(query) { - return jp.query(this.data, query) + return jp.query(this.data, query); } shallow() { - return this.execute('$.features..properties') + return this.execute('$.features..properties'); } deep() { - return this.execute('$.features..properties.BLOCK_NUM') + return this.execute('$.features..properties.BLOCK_NUM'); } conditional() { - return this.execute( - `$.features[?(@.properties.STREET=='UNKNOWN')].properties.BLOCK_NUM` - ) + return this.execute(`$.features[?(@.properties.STREET=='UNKNOWN')].properties.BLOCK_NUM`); } } -module.exports = JsonPathCity +module.exports = JsonPathCity; diff --git a/src/queriers/map-filter-reduce.js b/src/queriers/map-filter-reduce.js index 0d38e7c..aefabba 100644 --- a/src/queriers/map-filter-reduce.js +++ b/src/queriers/map-filter-reduce.js @@ -1,27 +1,27 @@ -const mfr = require('map-filter-reduce') -const CityLotsORM = require('./base-class') -const objectToStream = require('../object-to-stream') -const pull = require('pull-stream') +const mfr = require('map-filter-reduce'); +const CityLotsORM = require('./base-class'); +const objectToStream = require('../object-to-stream'); +const pull = require('pull-stream'); class MapFilterReduceCity extends CityLotsORM { setup() { - this.jsonStream = objectToStream(this.data) + this.jsonStream = objectToStream(this.data); } cleanup() { - this.jsonStream = null + this.jsonStream = null; } execute(query) { return new Promise((resolve, reject) => { - const result = [] + const result = []; pull( pull.values([this.data]), // pull must except an array (the same is probably true for mfr) mfr(query), pull.collect((error, results) => { - if (error) reject(error) - else resolve(results) - }) - ) - }) + if (error) reject(error); + else resolve(results); + }), + ); + }); } // shallow() { // return this.execute([ @@ -37,4 +37,4 @@ class MapFilterReduceCity extends CityLotsORM { // } } -module.exports = MapFilterReduceCity +module.exports = MapFilterReduceCity; diff --git a/src/queriers/oboe.js b/src/queriers/oboe.js index cf766d6..f0a9138 100644 --- a/src/queriers/oboe.js +++ b/src/queriers/oboe.js @@ -1,37 +1,37 @@ -const oboe = require('oboe') -const CityLotsORM = require('./base-class') -const { NotPossibleError } = require('../errors') -const objectToStream = require('../object-to-stream') +const oboe = require('oboe'); +const CityLotsORM = require('./base-class'); +const { NotPossibleError } = require('../errors'); +const objectToStream = require('../object-to-stream'); -const { performance } = require('perf_hooks') +const { performance } = require('perf_hooks'); class OboeCity extends CityLotsORM { setup() { - this.jsonStream = objectToStream(this.data) + this.jsonStream = objectToStream(this.data); } cleanup() { - this.jsonStream = null + this.jsonStream = null; } execute(query) { return new Promise((resolve, reject) => { - const result = [] + const result = []; oboe(this.jsonStream) .node(query, data => { - result.push(data) + result.push(data); }) .on('done', () => resolve(result)) - .on('fail', reject) - }) + .on('fail', reject); + }); } shallow() { - return this.execute('features.*.properties') + return this.execute('features.*.properties'); } deep() { - return this.execute('features.*.properties.BLOCK_NUM') + return this.execute('features.*.properties.BLOCK_NUM'); } conditional() { // oboe does not support conditionals - throw new NotPossibleError() + throw new NotPossibleError(); } } -module.exports = OboeCity +module.exports = OboeCity;