diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index ea68209..0000000 --- a/.eslintrc +++ /dev/null @@ -1,37 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:node/recommended", - "plugin:prettier/recommended" - ], - "parserOptions": { - "ecmaVersion": 2018 - }, - "env": { - "node": true, - "es6": true, - "mocha": true - }, - "plugins": [ - "mocha", - "import" - ], - "rules": { - "import/extensions": [ - "error", - "always" - ], - "mocha/no-skipped-tests": "error", - "mocha/no-exclusive-tests": "error", - "node/no-unpublished-import": [ - "error", - { - "allowModules": [ - "slow-stream", - "@rollup/plugin-commonjs" - ] - } - ] - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..d77a7b8 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,55 @@ +{ + "root": true, + "extends": [ + "eslint:recommended", + "plugin:import/recommended", + "plugin:import/typescript", + "plugin:node/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": ["tsconfig.test.json"], + "sourceType": "module" + }, + "settings": { + "import/resolver": { + "typescript": true, + "node": true + } + }, + "plugins": [ + "@typescript-eslint", + "mocha" + ], + "env": { + "node": true, + "es6": true, + "mocha": true + }, + "rules": { + "quote-props": ["error", "consistent"], + "mocha/no-skipped-tests": "error", + "mocha/no-exclusive-tests": "error", + "node/no-unpublished-import": [ + "error", { + "allowModules": ["slow-stream"] + } + ], + "node/no-unsupported-features/es-syntax": [ + "error", + { + "version": ">=13.0.0", + "ignores": ["modules"] + } + ], + "node/no-missing-import": [ + "error", { + "allowModules": [], + "resolvePaths": ["/path/to/a/modules/directory"], + "tryExtensions": [".js", ".ts"] + } + ] + } +} diff --git a/.tools/build.sh b/.tools/build.sh new file mode 100644 index 0000000..dc5eeee --- /dev/null +++ b/.tools/build.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail + +readonly PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." + +rm -rf "${PROJECT_DIR}/dist" + +cd "${PROJECT_DIR}" + +echo "Building oleoduc (esm version)..." +tsc -p tsconfig.json +cat >"./dist/mjs/package.json" <"./dist/cjs/package.json" <"${PROJECT_DIR}/dist/cjs/package.json" <"${PROJECT_DIR}/dist/mjs/package.json" <= 10" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -554,43 +564,86 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -756,6 +809,26 @@ "node": ">= 8" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -855,15 +928,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@typescript-eslint/parser": { "version": "6.12.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", @@ -1030,10 +1094,16 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1283,15 +1353,6 @@ "util": "^0.12.5" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -1310,6 +1371,15 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1319,6 +1389,18 @@ "node": ">=8" } }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1379,6 +1461,21 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -1647,11 +1744,45 @@ } }, "node_modules/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=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/default-require-extensions": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", @@ -1678,6 +1809,18 @@ "node": ">= 0.4" } }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", @@ -1740,16 +1883,17 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "dependencies": { - "ansi-colors": "^4.1.1" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" }, "engines": { - "node": ">=8.6" + "node": ">=10.13.0" } }, "node_modules/es-abstract": { @@ -1861,66 +2005,64 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -1949,6 +2091,31 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, "node_modules/eslint-module-utils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", @@ -2089,16 +2256,16 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz", - "integrity": "sha512-d7knAcQj1jPCzZf3caeBIn3BnW6ikcvfz0kSqQpwPYcVGLoJV5sz0l0OJB2LR8I7dvTDbqq1oV6ylhSgzA10zg==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.2.0.tgz", + "integrity": "sha512-ZhdxzSZnd1P9LqDPF0DBcFLpRIGdh1zkF2JHnQklKQOvrQtT73kdP5K9V2mzvbLR+cCAO9OI48NXK/Ax9/ciCQ==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", - "ramda": "^0.27.1" + "rambda": "^7.4.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "peerDependencies": { "eslint": ">=7.0.0" @@ -2151,15 +2318,6 @@ "eslint": ">=5.16.0" } }, - "node_modules/eslint-plugin-node/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/eslint-plugin-node/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -2170,37 +2328,48 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", - "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", "dev": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" }, "engines": { - "node": ">=6.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-utils": { @@ -2224,14 +2393,11 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", @@ -2245,51 +2411,69 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, "engines": { - "node": ">=4" + "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -2306,9 +2490,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2317,15 +2501,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2338,19 +2513,10 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -2365,12 +2531,47 @@ "node": ">=0.10.0" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, + "node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "node_modules/fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", @@ -2402,7 +2603,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { @@ -2560,12 +2761,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -2617,6 +2812,18 @@ "node": ">=8.0.0" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -2633,6 +2840,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -2666,9 +2885,9 @@ } }, "node_modules/globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2727,15 +2946,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -2869,10 +3079,19 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -3050,6 +3269,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3095,6 +3329,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-nan": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", @@ -3147,6 +3399,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -3277,6 +3538,33 @@ "node": ">=0.10.0" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -3502,12 +3790,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -3520,12 +3802,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -3584,6 +3860,12 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3606,6 +3888,18 @@ "node": ">=8.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3772,6 +4066,33 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -4084,18 +4405,51 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -4332,15 +4686,15 @@ } }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -4375,19 +4729,10 @@ "node": ">=8" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -4413,10 +4758,10 @@ } ] }, - "node_modules/ramda": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==", + "node_modules/rambda": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", + "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", "dev": true }, "node_modules/randombytes": { @@ -4504,15 +4849,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -4545,6 +4881,15 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4570,6 +4915,98 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4745,56 +5182,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/slow-stream": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slow-stream/-/slow-stream-0.0.4.tgz", @@ -4937,6 +5324,18 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4976,44 +5375,30 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", "dev": true, "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" }, "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://opencollective.com/unts" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } }, "node_modules/test-exclude": { "version": "6.0.0", @@ -5035,6 +5420,18 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5111,18 +5508,6 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -5132,6 +5517,12 @@ "node": ">=0.3.1" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5262,6 +5653,15 @@ "dev": true, "peer": true }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -5329,12 +5729,6 @@ "uuid": "bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", - "dev": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -5397,15 +5791,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index 9313901..31fb300 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "transform", "parallel" ], - "type": "module", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", "exports": { @@ -23,13 +22,13 @@ } }, "scripts": { - "build": "tsc && tsc -p tsconfig-cjs.json && bash .tools/create-per-distribution-package-json.sh", + "build": "bash .tools/build.sh", "hooks": "git config core.hooksPath .tools/git-hooks && chmod +x .tools/git-hooks/*", "test": "mocha test/", "coverage": "nyc --temp-dir .coverage/.nyc_output --report-dir .coverage --reporter=lcov --reporter=html npm test", "lint": "eslint src/index.ts test/", "release": "bash .tools/release.sh master", - "clean": "rm -rf dist/" + "ts": "tsc -p tsconfig.test.json --showConfig" }, "repository": { "type": "git", @@ -50,15 +49,16 @@ "@typescript-eslint/eslint-plugin": "6.12.0", "@typescript-eslint/parser": "6.12.0", "assert": "2.1.0", - "eslint": "7.32.0", - "eslint-config-prettier": "8.3.0", + "eslint": "8.54.0", + "eslint-config-prettier": "9.0.0", + "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "2.29.0", - "eslint-plugin-mocha": "9.0.0", + "eslint-plugin-mocha": "10.2.0", "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "4.0.0", + "eslint-plugin-prettier": "5.0.1", "mocha": "10.2.0", "nyc": "15.1.0", - "prettier": "2.6.2", + "prettier": "3.1.0", "slow-stream": "0.0.4", "ts-node": "10.9.1", "typescript": "5.3.2" diff --git a/src/accumulateData.ts b/src/accumulateData.ts index 14150c9..ceeba99 100644 --- a/src/accumulateData.ts +++ b/src/accumulateData.ts @@ -1,6 +1,6 @@ import { Transform } from "stream"; -export function accumulateData(accumulate, options:any = {}) { +export function accumulateData(accumulate, options: any = {}) { const { accumulator, ...rest } = options; let acc = accumulator === undefined ? null : accumulator; let flushed = false; diff --git a/src/groupData.ts b/src/groupData.ts index 1813127..bec5ecf 100644 --- a/src/groupData.ts +++ b/src/groupData.ts @@ -26,6 +26,6 @@ export function groupData(...args) { } else { return group; } - }, options) + }, options), ); } diff --git a/src/oleoduc.ts b/src/oleoduc.ts index db593c9..db0b4dd 100644 --- a/src/oleoduc.ts +++ b/src/oleoduc.ts @@ -59,7 +59,7 @@ export function oleoduc(...args) { wrapper.on("error", (e) => reject(e)); last.on("finish", resolve); // Needed by nodejs 12 and previous last.on("close", resolve); - }) + }), ); } else if (wrapper !== last && wrapper !== first) { last.on("finish", () => wrapper.emit("finish")); // Needed by nodejs 12 and previous diff --git a/src/readLineByLine.ts b/src/readLineByLine.ts index d12affb..ec9db40 100644 --- a/src/readLineByLine.ts +++ b/src/readLineByLine.ts @@ -17,8 +17,8 @@ export function readLineByLine() { return acc + rest; }, - { accumulator: "", readableObjectMode: true, writableObjectMode: false } + { accumulator: "", readableObjectMode: true, writableObjectMode: false }, ), - flattenArray() + flattenArray(), ); } diff --git a/src/transformData.ts b/src/transformData.ts index df10496..9ee8776 100644 --- a/src/transformData.ts +++ b/src/transformData.ts @@ -1,6 +1,6 @@ import transform from "parallel-transform"; -export function transformData(handleChunk, options:any = {}) { +export function transformData(handleChunk, options: any = {}) { const { filter, parallel, ...rest } = options; const filterChunk = (value) => !filter || filter(value); const maxParallel = parallel || 1; diff --git a/src/transformIntoCSV.ts b/src/transformIntoCSV.ts index 7c4f477..7f87cad 100644 --- a/src/transformIntoCSV.ts +++ b/src/transformIntoCSV.ts @@ -1,6 +1,6 @@ import { Transform } from "stream"; -export function transformIntoCSV(options:any = {}) { +export function transformIntoCSV(options: any = {}) { const bom = options.bom; const separator = options.separator || ";"; const mapper = options.mapper || ((v) => v); diff --git a/src/transformIntoJSON.ts b/src/transformIntoJSON.ts index 9251815..acd1ca2 100644 --- a/src/transformIntoJSON.ts +++ b/src/transformIntoJSON.ts @@ -1,6 +1,6 @@ import { Transform } from "stream"; -export function transformIntoJSON(options:any = {}) { +export function transformIntoJSON(options: any = {}) { let chunksSent = 0; return new Transform({ readableObjectMode: false, diff --git a/src/utils/toAsyncIterator.ts b/src/utils/toAsyncIterator.ts index 7a7c858..2640a6d 100644 --- a/src/utils/toAsyncIterator.ts +++ b/src/utils/toAsyncIterator.ts @@ -8,7 +8,7 @@ import { Readable } from "stream"; * @param options * @returns {AsyncGenerator<*, void, *>} */ -export async function* toAsyncIterator(stream, options:any = {}) { +export async function* toAsyncIterator(stream, options: any = {}) { const chunkSize = options.chunkSize || 1; if (typeof stream.read !== "function") { // @ts-ignore diff --git a/src/writeData.ts b/src/writeData.ts index fae0996..efa6370 100644 --- a/src/writeData.ts +++ b/src/writeData.ts @@ -96,7 +96,7 @@ ParallelWrite.prototype._drained = function () { return this._flushed ? !diff : diff < this._maxParallel; }; -export function writeData(handleChunk, options:any = {}) { +export function writeData(handleChunk, options: any = {}) { return ParallelWrite(options.parallel || 1, { objectMode: true }, async (chunk, callback) => { try { const res = await handleChunk(chunk); diff --git a/test/accumulateData-test.ts b/test/accumulateData-test.ts index 7af14ea..3294bc8 100644 --- a/test/accumulateData-test.ts +++ b/test/accumulateData-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual,strictEqual,fail} from "assert"; -import {accumulateData, writeData} from "../src"; -import {createStream} from "./testUtils"; +import { deepStrictEqual, strictEqual, fail } from "assert"; +import { accumulateData, writeData } from "../src/index"; +import { createStream } from "./testUtils"; describe("accumulateData", () => { it("can accumulateData by grouping them (flush)", (done) => { @@ -25,8 +25,8 @@ describe("accumulateData", () => { flush(acc.join(" ")); return []; // Reset accumulator }, - { accumulator: [] } - ) + { accumulator: [] }, + ), ) .pipe(writeData((data) => result.push(data))) .on("finish", () => { diff --git a/test/compose-test.ts b/test/compose-test.ts index f135770..7253fb2 100644 --- a/test/compose-test.ts +++ b/test/compose-test.ts @@ -1,7 +1,7 @@ -import {deepStrictEqual, fail} from "assert"; +import { deepStrictEqual, fail } from "assert"; import SlowStream from "slow-stream"; -import {createStream} from "./testUtils"; -import {compose, flattenArray, oleoduc, transformData, writeData} from "../src"; +import { createStream } from "./testUtils"; +import { compose, flattenArray, oleoduc, transformData, writeData } from "../src"; describe("compose", () => { it("can compose streams", (done) => { @@ -13,7 +13,7 @@ describe("compose", () => { compose( source, transformData((d) => d.substring(0, 1)), - writeData((data) => chunks.push(data)) + writeData((data) => chunks.push(data)), ) .on("finish", () => { deepStrictEqual(chunks, ["f"]); @@ -35,7 +35,7 @@ describe("compose", () => { const stream = compose( source, - transformData((data) => data.substring(0, 1)) + transformData((data) => data.substring(0, 1)), ); for await (const chunk of stream) { @@ -74,8 +74,8 @@ describe("compose", () => { .pipe( compose( transformData((data) => data.substring(0, 1)), - transformData((data) => "_" + data) - ) + transformData((data) => "_" + data), + ), ) .pipe(writeData((data) => chunks.push(data))) .on("finish", () => { @@ -89,7 +89,7 @@ describe("compose", () => { const source = createStream(); const nested = compose( source, - transformData((d) => d.substring(0, 1)) + transformData((d) => d.substring(0, 1)), ); source.push("first"); @@ -97,7 +97,7 @@ describe("compose", () => { compose( nested, - writeData((d) => chunks.push(d)) + writeData((d) => chunks.push(d)), ) .on("finish", () => { deepStrictEqual(chunks, ["f"]); @@ -114,7 +114,7 @@ describe("compose", () => { const source = createStream(); const nested = oleoduc( source, - transformData((d) => d.substring(0, 1)) + transformData((d) => d.substring(0, 1)), ); source.push("first"); @@ -122,7 +122,7 @@ describe("compose", () => { compose( nested, - writeData((d) => chunks.push(d)) + writeData((d) => chunks.push(d)), ) .on("finish", () => { deepStrictEqual(chunks, ["f"]); @@ -146,7 +146,7 @@ describe("compose", () => { new SlowStream({ maxWriteInterval: 10 }), writeData((data) => { result += data; - }) + }), ).on("finish", () => { deepStrictEqual(result, "andrébrunorobert"); done(); @@ -164,7 +164,7 @@ describe("compose", () => { compose(flattenArray({ highWaterMark: 1 }), new SlowStream({ maxWriteInterval: 10 })), writeData((data) => { result += data; - }) + }), ).on("finish", () => { deepStrictEqual(result, "andrébrunorobert"); done(); @@ -176,7 +176,7 @@ describe("compose", () => { compose( source, - writeData(() => ({})) + writeData(() => ({})), ) .on("finish", () => { fail(); @@ -200,7 +200,7 @@ describe("compose", () => { source, writeData(() => { throw new Error("write error"); - }) + }), ) .on("finish", () => { fail(); diff --git a/test/concatStreams-test.ts b/test/concatStreams-test.ts index 325f8c2..58300a8 100644 --- a/test/concatStreams-test.ts +++ b/test/concatStreams-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual} from "assert"; -import {concatStreams, writeData} from "../src"; -import {delay, streamArray} from "./testUtils"; +import { deepStrictEqual } from "assert"; +import { concatStreams, writeData } from "../src/index"; +import { delay, streamArray } from "./testUtils"; describe("concatStreams", () => { it("can concat streams", (done) => { diff --git a/test/filterData-tests.ts b/test/filterData-tests.ts index 02c7b40..f14d13f 100644 --- a/test/filterData-tests.ts +++ b/test/filterData-tests.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual, fail, strictEqual} from "assert"; -import {createStream} from "./testUtils"; -import {filterData} from "../src"; +import { deepStrictEqual, fail, strictEqual } from "assert"; +import { createStream } from "./testUtils"; +import { filterData } from "../src"; describe("filterData", () => { it("should filter (ignore empty)", (done) => { @@ -14,7 +14,7 @@ describe("filterData", () => { .pipe( filterData((value) => { return value !== null && value !== undefined && Object.keys(value).length > 0; - }) + }), ) .on("data", (d) => chunks.push(d)) .on("end", () => { @@ -34,7 +34,7 @@ describe("filterData", () => { .pipe( filterData(() => { return Promise.resolve(false); - }) + }), ) .on("data", (d) => chunks.push(d)) .on("end", () => { diff --git a/test/flattenArray-test.ts b/test/flattenArray-test.ts index 245b6e1..e1ffcda 100644 --- a/test/flattenArray-test.ts +++ b/test/flattenArray-test.ts @@ -1,7 +1,7 @@ -import {deepStrictEqual} from "assert"; +import { deepStrictEqual } from "assert"; import SlowStream from "slow-stream"; -import {accumulateData, flattenArray, writeData} from "../src"; -import {streamArray} from "./testUtils"; +import { accumulateData, flattenArray, writeData } from "../src"; +import { streamArray } from "./testUtils"; describe("flattenArray", () => { it("can flat map an array", (done) => { @@ -13,7 +13,7 @@ describe("flattenArray", () => { .pipe( writeData((data) => { result += data; - }) + }), ) .on("finish", () => { deepStrictEqual(result, "andrébruno"); @@ -34,7 +34,7 @@ describe("flattenArray", () => { .pipe( writeData((data) => { result += data.toUpperCase(); - }) + }), ) .on("finish", () => { deepStrictEqual(result, "AB"); @@ -55,7 +55,7 @@ describe("flattenArray", () => { .pipe( writeData((data) => { result += "_" + data; - }) + }), ) .on("finish", () => { deepStrictEqual(result, "_andré_bruno_robert_john_henri"); diff --git a/test/groupData-test.ts b/test/groupData-test.ts index d6a0a6d..284b8c7 100644 --- a/test/groupData-test.ts +++ b/test/groupData-test.ts @@ -1,4 +1,4 @@ -import {deepStrictEqual,strictEqual,fail} from "assert"; +import { deepStrictEqual } from "assert"; import { createStream } from "./testUtils"; import { groupData, writeData } from "../src"; @@ -16,7 +16,7 @@ describe("groupData", () => { .pipe( writeData((group) => { return results.push(group); - }) + }), ) .on("finish", () => { deepStrictEqual(results, [["abc"], ["def"], ["ghi"]]); @@ -37,7 +37,7 @@ describe("groupData", () => { .pipe( writeData((group) => { return results.push(group); - }) + }), ) .on("finish", () => { deepStrictEqual(results, [["abc", "def"], ["ghi"]]); diff --git a/test/mergeStreams-test.ts b/test/mergeStreams-test.ts index 52f7526..c3f3c41 100644 --- a/test/mergeStreams-test.ts +++ b/test/mergeStreams-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual} from "assert"; -import {mergeStreams, writeData} from "../src"; -import {streamArray} from "./testUtils"; +import { deepStrictEqual } from "assert"; +import { mergeStreams, writeData } from "../src"; +import { streamArray } from "./testUtils"; describe("mergeStreams", () => { it("can merge streams", (done) => { diff --git a/test/oleoduc-test.ts b/test/oleoduc-test.ts index 2aee4f1..61d0959 100644 --- a/test/oleoduc-test.ts +++ b/test/oleoduc-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual, fail, strictEqual} from "assert"; -import {createStream, delay} from "./testUtils"; -import {compose, oleoduc, transformData, writeData} from "../src"; +import { deepStrictEqual, fail, strictEqual } from "assert"; +import { createStream, delay } from "./testUtils"; +import { compose, oleoduc, transformData, writeData } from "../src"; describe("oleoduc", () => { it("can create oleoduc", async () => { @@ -18,7 +18,7 @@ describe("oleoduc", () => { }), writeData((data) => { return delay(() => chunks.push(data), 2); - }) + }), ); deepStrictEqual(chunks, ["a", "b", "r"]); @@ -34,7 +34,7 @@ describe("oleoduc", () => { const stream = oleoduc( source, - transformData((data) => data.substring(0, 1)) + transformData((data) => data.substring(0, 1)), ); for await (const chunk of stream) { @@ -49,7 +49,7 @@ describe("oleoduc", () => { const source = createStream(); const nested = oleoduc( source, - transformData((d) => d.substring(0, 1)) + transformData((d) => d.substring(0, 1)), ); source.push("first"); @@ -58,7 +58,7 @@ describe("oleoduc", () => { try { await oleoduc( nested, - writeData((d) => chunks.push(d)) + writeData((d) => chunks.push(d)), ); deepStrictEqual(chunks, ["f"]); } catch (e) { @@ -79,9 +79,9 @@ describe("oleoduc", () => { source, compose( transformData((data) => data.substring(0, 1)), - transformData((data) => "_" + data) + transformData((data) => "_" + data), ), - writeData((d) => chunks.push(d)) + writeData((d) => chunks.push(d)), ); deepStrictEqual(chunks, ["_a", "_b", "_r"]); } catch (e) { @@ -94,7 +94,7 @@ describe("oleoduc", () => { const source = createStream(); const composed = compose( source, - transformData((d) => d.substring(0, 1)) + transformData((d) => d.substring(0, 1)), ); source.push("first"); @@ -102,7 +102,7 @@ describe("oleoduc", () => { await oleoduc( composed, - writeData((d) => chunks.push(d)) + writeData((d) => chunks.push(d)), ) .then(() => { deepStrictEqual(chunks, ["f"]); @@ -133,7 +133,7 @@ describe("oleoduc", () => { oleoduc( source, - writeData(() => ({})) + writeData(() => ({})), ) .then(() => { fail(); @@ -157,7 +157,7 @@ describe("oleoduc", () => { source, writeData(() => { throw new Error("write error"); - }) + }), ) .then(() => { fail(); diff --git a/test/parallel-test.ts b/test/parallel-test.ts index 56603ec..019209b 100644 --- a/test/parallel-test.ts +++ b/test/parallel-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual, fail, ok} from "assert"; -import {createStream, delay} from "./testUtils"; -import {filterData, transformData, writeData} from "../src"; +import { deepStrictEqual, fail, ok } from "assert"; +import { createStream, delay } from "./testUtils"; +import { filterData, transformData, writeData } from "../src"; describe("parallel", () => { it("can run parallel task with order preserved", (done) => { @@ -19,16 +19,16 @@ describe("parallel", () => { resolve(data.substring(0, 1)); }); }, - { parallel: 2 } - ) + { parallel: 2 }, + ), ) .pipe( writeData( (data) => { return delay(() => chunks.push(data), 10); }, - { parallel: 5 } - ) + { parallel: 5 }, + ), ) .on("finish", () => { deepStrictEqual(chunks, ["a", "b", "r"]); @@ -61,8 +61,8 @@ describe("parallel", () => { (number) => { return delay(() => ({ number, timestamp: Date.now() }), timeoutPerBatch); }, - { parallel: nbParallelTasks } - ) + { parallel: nbParallelTasks }, + ), ) .pipe(writeData((data) => acc.push(data))) .on("error", () => { @@ -72,7 +72,7 @@ describe("parallel", () => { .on("finish", () => { deepStrictEqual( acc.map((v) => v.number), - [1, 2, 3, 4, 5, 6] + [1, 2, 3, 4, 5, 6], ); // 2 tasks per batch with 10ms of timeout @@ -112,13 +112,13 @@ describe("parallel", () => { return number < 5; }, timeoutPerBatch); }, - { parallel: nbParallelTasks } - ) + { parallel: nbParallelTasks }, + ), ) .pipe( transformData((number) => { return { number, timestamp: Date.now() }; - }) + }), ) .pipe(writeData((data) => acc.push(data))) .on("error", () => { @@ -128,7 +128,7 @@ describe("parallel", () => { .on("finish", () => { deepStrictEqual( acc.map((v) => v.number), - [1, 2, 3, 4] + [1, 2, 3, 4], ); // 2 tasks per batch with 10ms of timeout @@ -164,13 +164,13 @@ describe("parallel", () => { (number) => { return delay(() => acc.push({ number, timestamp: Date.now() }), timeoutPerBatch); }, - { parallel: nbParallelTasks } - ) + { parallel: nbParallelTasks }, + ), ) .on("finish", () => { deepStrictEqual( acc.map((v) => v.number), - [1, 2, 3, 4, 5, 6] + [1, 2, 3, 4, 5, 6], ); // 2 tasks per batch with 10ms of timeout diff --git a/test/pipeline-test.ts b/test/pipeline-test.ts index 4f784f5..5d44f1b 100644 --- a/test/pipeline-test.ts +++ b/test/pipeline-test.ts @@ -1,8 +1,8 @@ -import {deepStrictEqual, fail} from "assert"; -import {pipeline} from "stream"; -import {promisify} from "util"; -import {createStream, delay} from "./testUtils"; -import {transformData, writeData} from "../src"; +import { deepStrictEqual, fail } from "assert"; +import { pipeline } from "stream"; +import { promisify } from "util"; +import { createStream, delay } from "./testUtils"; +import { transformData, writeData } from "../src"; describe("pipeline", () => { it("can create pipeline from stream", (done) => { @@ -23,7 +23,7 @@ describe("pipeline", () => { } deepStrictEqual(chunks, ["a", "b", "r"]); return done(); - } + }, ); }); @@ -42,7 +42,7 @@ describe("pipeline", () => { }), writeData((data) => { return delay(() => chunks.push(data), 2); - }) + }), ); deepStrictEqual(chunks, ["a", "b", "r"]); @@ -53,7 +53,7 @@ describe("pipeline", () => { promisify(pipeline)( source, - writeData(() => ({})) + writeData(() => ({})), ) .then(() => { fail(); @@ -76,7 +76,7 @@ describe("pipeline", () => { source, writeData(() => { throw new Error(); - }) + }), ) .then(() => { fail(); diff --git a/test/readLineByLine-test.ts b/test/readLineByLine-test.ts index 4029f74..8d5cb54 100644 --- a/test/readLineByLine-test.ts +++ b/test/readLineByLine-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual} from "assert"; -import {createStream} from "./testUtils"; -import {oleoduc, readLineByLine, writeData} from "../src"; +import { deepStrictEqual } from "assert"; +import { createStream } from "./testUtils"; +import { oleoduc, readLineByLine, writeData } from "../src"; describe("readLineByLine", () => { it("can read a stream line by line", (done) => { @@ -16,7 +16,7 @@ describe("readLineByLine", () => { .pipe( writeData((data) => { return result.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(result, ["abc", "def", "ghi"]); @@ -37,7 +37,7 @@ describe("readLineByLine", () => { .pipe( writeData((data) => { return result.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(result, ["abc", "def", "ghi"]); @@ -57,7 +57,7 @@ describe("readLineByLine", () => { .pipe( writeData((data) => { return result.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(result, ["ab", "hi"]); @@ -81,7 +81,7 @@ describe("readLineByLine", () => { readLineByLine(), writeData((opco) => { array.push(opco); - }) + }), ); deepStrictEqual(array[0], "line-0"); diff --git a/test/testUtils.ts b/test/testUtils.ts index 110ee19..6ea641e 100644 --- a/test/testUtils.ts +++ b/test/testUtils.ts @@ -8,7 +8,7 @@ export function delay(callback, delay) { }); } -export function streamArray(items=[]) { +export function streamArray(items = []) { return new Readable({ objectMode: true, read() { diff --git a/test/toAsyncIterator-test.ts b/test/toAsyncIterator-test.ts index a69959f..5c9d7b2 100644 --- a/test/toAsyncIterator-test.ts +++ b/test/toAsyncIterator-test.ts @@ -1,7 +1,7 @@ -import {deepStrictEqual, fail} from "assert"; -import {createStream} from "./testUtils"; -import {toAsyncIterator} from "../src/utils/toAsyncIterator"; -import {oleoduc, transformData} from "../src"; +import { deepStrictEqual, fail } from "assert"; +import { createStream } from "./testUtils"; +import { toAsyncIterator } from "../src/utils/toAsyncIterator"; +import { oleoduc, transformData } from "../src"; describe("toAsyncIterator", () => { it("can convert a readable stream into an iterator", async () => { @@ -26,7 +26,7 @@ describe("toAsyncIterator", () => { transformData(() => { throw new Error("This is a stream error"); }), - { promisify: false } + { promisify: false }, ); readable.push("a"); readable.push("b"); diff --git a/test/transformData-test.ts b/test/transformData-test.ts index 36b820a..eb9f586 100644 --- a/test/transformData-test.ts +++ b/test/transformData-test.ts @@ -1,4 +1,4 @@ -import {deepStrictEqual,strictEqual,fail} from "assert"; +import { deepStrictEqual, strictEqual, fail } from "assert"; import { createStream } from "./testUtils"; import { transformData, writeData } from "../src"; @@ -32,7 +32,7 @@ describe("transformData", () => { return new Promise((resolve) => { resolve(data.substring(0, 1)); }); - }) + }), ) .pipe( writeData(async (data) => { @@ -40,7 +40,7 @@ describe("transformData", () => { chunks.push(data); resolve(); }); - }) + }), ) .on("finish", () => { deepStrictEqual(chunks, ["a", "b"]); @@ -57,7 +57,7 @@ describe("transformData", () => { .pipe( transformData(() => { throw new Error("An error occurred"); - }) + }), ) .on("data", () => ({})) .on("error", (e) => { @@ -79,7 +79,7 @@ describe("transformData", () => { .pipe( transformData(() => { return Promise.reject(new Error("An error occurred")); - }) + }), ) .on("data", () => ({})) .on("error", (e) => { diff --git a/test/transformIntoCSV-test.ts b/test/transformIntoCSV-test.ts index 5546a29..a80132c 100644 --- a/test/transformIntoCSV-test.ts +++ b/test/transformIntoCSV-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual, fail, strictEqual,ok} from "assert"; -import {createStream, delay} from "./testUtils"; -import {transformIntoCSV, writeData} from "../src"; +import { deepStrictEqual, fail, strictEqual, ok } from "assert"; +import { createStream, delay } from "./testUtils"; +import { transformIntoCSV, writeData } from "../src"; describe("transformIntoCSV", () => { it("should transform object into a csv", (done) => { @@ -14,10 +14,10 @@ describe("transformIntoCSV", () => { .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - deepStrictEqual(csv, ["firstName;lastName\n", "Robert;Hue\n"]); + deepStrictEqual(csv, ["firstName;lastName\n", "Robert;Hue\n"]); done(); }); }); @@ -33,10 +33,10 @@ describe("transformIntoCSV", () => { .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - deepStrictEqual(csv, ['"firstName";"lastName"\n', '"Robert";"Hue"\n']); + deepStrictEqual(csv, ['"firstName";"lastName"\n', '"Robert";"Hue"\n']); done(); }); }); @@ -52,10 +52,10 @@ describe("transformIntoCSV", () => { .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - ok(csv[0].startsWith("\ufeff")); + ok(csv[0].startsWith("\ufeff")); done(); }); }); @@ -71,15 +71,15 @@ describe("transformIntoCSV", () => { .pipe( transformIntoCSV({ separator: "|", - }) + }), ) .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - deepStrictEqual(csv, ["firstName|lastName\n", "Robert|Hue\n", "John|Doe\n"]); + deepStrictEqual(csv, ["firstName|lastName\n", "Robert|Hue\n", "John|Doe\n"]); done(); }); }); @@ -96,15 +96,15 @@ describe("transformIntoCSV", () => { columns: { fullName: (data) => `${data.firstName} ${data.lastName}`, }, - }) + }), ) .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - deepStrictEqual(csv, ["fullName\n", "Robert Hue\n"]); + deepStrictEqual(csv, ["fullName\n", "Robert Hue\n"]); done(); }); }); @@ -122,15 +122,15 @@ describe("transformIntoCSV", () => { fullName: (data) => Promise.resolve(`${data.firstName} ${data.lastName}`), lastName: async (data) => await delay(() => data.lastName, 5), }, - }) + }), ) .pipe( writeData((line) => { csv.push(line); - }) + }), ) .on("finish", () => { - deepStrictEqual(csv, ["fullName;lastName\n", "Robert Hue;Hue\n"]); + deepStrictEqual(csv, ["fullName;lastName\n", "Robert Hue;Hue\n"]); done(); }); }); @@ -152,11 +152,11 @@ describe("transformIntoCSV", () => { .pipe(transformer) .on("data", () => ({})) .on("error", (e) => { - strictEqual(e.message, "Unable to handle data"); + strictEqual(e.message, "Unable to handle data"); done(); }) .on("finish", () => { - fail(); + fail(); done(); }); }); diff --git a/test/transformIntoJSON-test.ts b/test/transformIntoJSON-test.ts index 173c561..d31e1cf 100644 --- a/test/transformIntoJSON-test.ts +++ b/test/transformIntoJSON-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual} from "assert"; -import {createStream} from "./testUtils"; -import {transformIntoJSON} from "../src"; +import { deepStrictEqual } from "assert"; +import { createStream } from "./testUtils"; +import { transformIntoJSON } from "../src"; describe("transformIntoJSON", () => { it("can stream a json array", (done) => { diff --git a/test/transformStream-test.ts b/test/transformStream-test.ts index 6c8b98f..b8d64b7 100644 --- a/test/transformStream-test.ts +++ b/test/transformStream-test.ts @@ -1,7 +1,7 @@ -import {deepStrictEqual} from "assert"; +import { deepStrictEqual } from "assert"; import SlowStream from "slow-stream"; -import {createStream, delay, streamArray} from "./testUtils"; -import {transformStream,writeData} from "../src"; +import { createStream, delay, streamArray } from "./testUtils"; +import { transformStream, writeData } from "../src"; describe("transformStream", () => { it("should transform data into a stream", (done) => { @@ -15,12 +15,12 @@ describe("transformStream", () => { source.push(data + "_transformed"); source.push(null); return source; - }) + }), ) .pipe( writeData((data) => { return chunks.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(chunks, ["andré_transformed", "bruno_transformed"]); @@ -42,12 +42,12 @@ describe("transformStream", () => { source.push(null); return source; }, 20); - }) + }), ) .pipe( writeData((data) => { return chunks.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(chunks, ["andré_transformed", "bruno_transformed"]); @@ -70,14 +70,14 @@ describe("transformStream", () => { source.push(null); return source; }, - { objectMode: true, highWaterMark: 1 } - ) + { objectMode: true, highWaterMark: 1 }, + ), ) .pipe(new SlowStream({ maxWriteInterval: 10 })) // Force up streams to be paused .pipe( writeData((data) => { return chunks.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(chunks, [ diff --git a/test/writeData-test.ts b/test/writeData-test.ts index 043673f..63aefc7 100644 --- a/test/writeData-test.ts +++ b/test/writeData-test.ts @@ -1,6 +1,6 @@ -import {deepStrictEqual, fail, strictEqual} from "assert"; -import {createStream} from "./testUtils"; -import {writeData} from "../src"; +import { deepStrictEqual, fail, strictEqual } from "assert"; +import { createStream } from "./testUtils"; +import { writeData } from "../src"; describe("writeData", () => { it("should writeData", (done) => { @@ -13,7 +13,7 @@ describe("writeData", () => { .pipe( writeData((data) => { acc.push(data); - }) + }), ) .on("finish", () => { deepStrictEqual(acc, ["andré"]); @@ -32,8 +32,8 @@ describe("writeData", () => { () => { throw new Error("sync error"); }, - { parallel: 1 } - ) + { parallel: 1 }, + ), ) .on("error", (e) => { strictEqual(e.message, "sync error"); @@ -54,7 +54,7 @@ describe("writeData", () => { .pipe( writeData(() => { return Promise.reject(new Error("first chunk")); - }) + }), ) .on("error", (e) => { strictEqual(e.message, "first chunk"); @@ -87,8 +87,8 @@ describe("writeData", () => { } }); }, - { parallel: 1 } - ) + { parallel: 1 }, + ), ) .on("error", (e) => { strictEqual(e.message, "async error"); diff --git a/tsconfig-base.json b/tsconfig-base.json deleted file mode 100644 index 01c2703..0000000 --- a/tsconfig-base.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "lib": [ - "esnext" - ], - "allowJs": true, - "strict": false, - "rootDirs": [ - "./src", - "./test" - ] - }, - "include": [ - "./**/*.ts" - ], - "exclude": [ - "./node_modules" - ] -} diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json deleted file mode 100644 index 8ff497c..0000000 --- a/tsconfig-cjs.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig-base.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "./dist/cjs", - "target": "esnext" - } -} diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..adbf054 --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "moduleResolution": "node", + "module": "commonjs", + "target": "es2015", + "outDir": "./dist/cjs" + } +} diff --git a/tsconfig.json b/tsconfig.json index ac03beb..ba17f1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,16 @@ { - "extends": "./tsconfig-base.json", "compilerOptions": { - "module": "esnext", - "outDir": "dist/mjs", + "moduleResolution": "NodeNext", + "module": "NodeNext", + "outDir": "./dist/mjs", + "allowJs": true, + "strict": false, + "sourceMap": true, + "rootDirs": ["src"], "target": "esnext", - "esModuleInterop": true, - "moduleResolution": "node" - } + "lib": ["esnext"], + "types": ["node", "mocha"] + }, + "exclude": ["node_modules", "dist"], + "include": ["src"] } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..3f6c404 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDirs": ["./test"], + "types": ["node", "mocha"] + }, + "include": ["src", "test"] +}