diff --git a/.github/workflows/check-published-scheduled.yml b/.github/workflows/check-published-scheduled.yml index cb79156..fa720b6 100644 --- a/.github/workflows/check-published-scheduled.yml +++ b/.github/workflows/check-published-scheduled.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest name: Check Published steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Check Published diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2fe7b7..3aa26ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,16 +13,14 @@ jobs: matrix: node-version: [20.x, 21.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install dependencies run: npm ci --ignore-scripts - - name: Audit Signatures - run: npm audit signatures - name: Compile run: npm run ci:compile - name: Check Code Style @@ -39,18 +37,16 @@ jobs: matrix: node-version: [20.x, 21.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install dependencies run: npm ci --ignore-scripts - - name: Audit Signatures - run: npm audit signatures - name: Compile run: npm run ci:compile - name: Check Code Style diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 8bc547f..c0bbe66 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -10,11 +10,12 @@ jobs: runs-on: ubuntu-latest name: Publish Beta steps: - - uses: actions/checkout@v3 + - name: Checkout Code + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' @@ -22,12 +23,14 @@ jobs: uses: checkdigit/github-actions/check-label@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies + - name: Install latest npm + run: npm install -g npm@latest + - name: Install Dependencies run: npm ci --ignore-scripts - name: Audit Signatures run: npm audit signatures - name: Run Test - run: npm run test + run: npm run ci:test - name: Prepare Beta id: prepare-beta uses: checkdigit/github-actions/prepare-beta@main @@ -35,7 +38,7 @@ jobs: run: npm publish --tag beta env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH }} - - name: Comment + - name: Comment npm publish result uses: checkdigit/github-actions/comment-npm-publish@main with: betaPackage: ${{ steps.prepare-beta.outputs.betaPackage }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff98920..1908f34 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,17 +12,17 @@ jobs: id-token: write name: Publish to NPM steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' + - name: Install latest npm + run: npm install -g npm@latest - name: Install dependencies run: npm ci --ignore-scripts - name: Audit Signatures run: npm audit signatures - - name: Run Test - run: npm run test - name: Publish run: npm publish --provenance env: diff --git a/.gitignore b/.gitignore index 229a65c..9b2011b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +.DS_Store .idea coverage build-* +dist-* node_modules bin diff --git a/LICENSE.txt b/LICENSE.txt index 2774175..9ccb5f9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2021-2023 Check Digit, LLC +Copyright (c) 2021-2024 Check Digit, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 93acccf..53b3a33 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![MIT License](https://img.shields.io/github/license/checkdigit/typescript-config)](https://github.com/checkdigit/typescript-config/blob/master/LICENSE.txt) -Copyright (c) 2022-2023 [Check Digit, LLC](https://checkdigit.com) +Copyright (c) 2022–2024 [Check Digit, LLC](https://checkdigit.com) ### Introduction @@ -10,25 +10,25 @@ This module contains the standard Check Digit Typescript configuration, along wi ### Typescript Configuration -- currently requires Node 20 or above. +- currently requires Node 20.11 or above. - emits `esnext`, with the default libraries, to avoid down-leveling. It is intended that application spec tests pick - up any issues with using newer features unavailable in a particular environment. Browsers and NodeJS are fast moving + up any issues with using newer features unavailable in a particular environment. Browsers and NodeJS are fast-moving targets, and can add language features at any time. -- uses the `module` type of `commonjs`. +- uses the `module` type of `esnext`. - all compiler options set for maximum strictness. ### Builder -`builder` is a command line tool that generates either CommonJS or ESM modules, from Typescript source. It is intended -to be used when publishing a package to NPM, or to bundle a package for deployment. It uses `tsc` for generating -types, and `esbuild` for generating code. +`builder` is a command line tool that generates ESM modules from the Typescript source. +It is intended to be used when publishing a package to NPM, or to bundle a package for deployment. +It uses `tsc` for generating types, and `esbuild` for generating code. -**Note:** if building an ESM bundle, the `require` function will be defined as a global variable, to allow +**Note:** the `require` function will be defined as a global variable, to allow dynamic `require`s by CommonJS submodules. This is not a problem for NodeJS, but will cause issues in a browser environment. #### Options -- `--type` the type of output to generate. Defaults to `module` (ESM). Valid values are `commonjs`, `module` or `types`. +- `--type` the type of output to generate. Defaults to `module` (ESM). Valid values are `module` or `types`. - `--entryPoint` the entry point for the bundle, relative to the inDir. if not provided, the files in the inDir will be processed as individual unbundled files. - `--inDir` the input source code directory. @@ -42,12 +42,6 @@ dynamic `require`s by CommonJS submodules. This is not a problem for NodeJS, but #### Examples ``` -# build commonjs .cjs files from Typescript source -npx builder --type=commonjs --outDir=build-cjs - -# build single-file commonjs .cjs bundle from Typescript source -npx builder --type=commonjs --entryPoint=index.ts --outDir=build-cjs-bundle --outFile=index.cjs - # build ESM .mjs files from Typescript source npx builder --type=module --outDir=build-esm @@ -75,10 +69,10 @@ the new version of Typescript, and/or without emitting warnings during these tes Strict semver is a little complicated, as Typescript itself does not adhere to semver. So our "best effort" policy is: -- Each update to the minimum Node target (e.g. Node 18 to Node 20), or a change to a major compiler output option +- Each update to the minimum Node target (e.g., Node 18 to Node 20), or a change to a major compiler output option (e.g. `module`, `target` or `moduleResolution`) will result in a new major version of this module. - We coordinate this with whatever the latest LTS version of Node is currently supported by Amazon Lambda, Google Cloud Functions - and Azure Functions. + We coordinate this with whatever the latest LTS version of Node is currently supported by Amazon Lambda, + Google Cloud Functions, and Azure Functions. - Each new "major" version of Typescript (e.g. `4.2.x` to `4.3.x`) will result in a new minor version of this module. - A new minor update of Typescript (e.g. `4.3.1` to `4.3.2`) _may_ result in a patch, in a situation where a specific need or issue requires setting a new minimum version of Typescript. diff --git a/SECURITY.md b/SECURITY.md index 369e44e..5cfec1e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,8 +6,8 @@ These versions of `@checkdigit/typescript-config` are currently being supported | Version | Supported | | ------- | ------------------ | -| \>= 5.x | :white_check_mark: | -| \< 5.0 | :x: | +| \>= 7.x | :white_check_mark: | +| \< 7.0 | :x: | ## Reporting a Vulnerability diff --git a/package-lock.json b/package-lock.json index ee5529d..279ab53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,42 +1,37 @@ { "name": "@checkdigit/typescript-config", - "version": "6.0.0", + "version": "7.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@checkdigit/typescript-config", - "version": "6.0.0", + "version": "7.0.0", "license": "MIT", "bin": { "builder": "bin/builder.mjs" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^11.1.0", - "@checkdigit/prettier-config": "^5.0.0", - "@types/debug": "^4.1.12", - "@types/jest": "^29.5.10", - "@types/uuid": "^9.0.7", - "@typescript-eslint/eslint-plugin": "^6.13.0", - "@typescript-eslint/parser": "^6.13.0", - "debug": "^4.3.4", - "eslint": "^8.54.0", - "eslint-config-prettier": "^9.0.0", - "get-port": "^7.0.0", - "got": "^11.8.6", + "@apidevtools/json-schema-ref-parser": "^11.5.4", + "@checkdigit/prettier-config": "^5.3.0", + "@jest/globals": "^29.7.0", + "@types/uuid": "^9.0.8", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "jest": "^29.7.0", - "node-fetch": "^3.3.2", "rimraf": "^5.0.5", - "ts-jest": "^29.1.1", + "ts-jest": "^29.1.2", "uuid": "^9.0.1" }, "engines": { - "node": ">=20.9" + "node": ">=20.11" }, "peerDependencies": { - "@types/node": ">=20.9", - "esbuild": "0.19.8", - "typescript": ">=5.3.2 <5.4.0" + "@types/node": ">=20.11", + "esbuild": "0.20.1", + "typescript": ">=5.4.2 <5.5.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -49,29 +44,27 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.1.0.tgz", - "integrity": "sha512-g/VW9ZQEFJAOwAyUb8JFf7MLiLy2uEB4rU270rGzDwICxnxMlPy0O11KVePSgS36K1NI29gSlK84n5INGhd4Ag==", + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.4.tgz", + "integrity": "sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==", "dev": true, "dependencies": { "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.13", - "@types/lodash.clonedeep": "^4.5.7", - "js-yaml": "^4.1.0", - "lodash.clonedeep": "^4.5.0" + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" }, "engines": { "node": ">= 16" @@ -81,9 +74,9 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.4.tgz", - "integrity": "sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { "@babel/highlight": "^7.23.4", @@ -165,30 +158,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", - "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", - "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.3", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -213,12 +206,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.4.tgz", - "integrity": "sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dev": true, "dependencies": { - "@babel/types": "^7.23.4", + "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -228,14 +221,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -318,9 +311,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -369,23 +362,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.4.tgz", - "integrity": "sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.4", - "@babel/types": "^7.23.4" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -477,9 +470,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.4.tgz", - "integrity": "sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -666,34 +659,34 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.4.tgz", - "integrity": "sha512-IYM8wSUwunWTB6tFC2dkKZhxbIjHoWemdK+3f8/wq8aKhbUscxD5MX72ubd90fxvFknaLPeGw5ycU84V1obHJg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.4", - "@babel/generator": "^7.23.4", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.4", - "@babel/types": "^7.23.4", - "debug": "^4.1.0", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -710,9 +703,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.4.tgz", - "integrity": "sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -730,21 +723,37 @@ "dev": true }, "node_modules/@checkdigit/prettier-config": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@checkdigit/prettier-config/-/prettier-config-5.0.0.tgz", - "integrity": "sha512-Az3ViqnMZ/TmHkHDE6zguOYlXNlImVxmZfD+JWX4/ewBUWJbRPpqpBglGMuWP5OVZ06RixXM0lg44oV8rXZlog==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@checkdigit/prettier-config/-/prettier-config-5.3.0.tgz", + "integrity": "sha512-S2Q/v8aLiH3ROxvgAawhhZkt3t0a2S7fmF+E+GCWOiYXkSXm02+8QvNZVIMyx7xgwK2MpRQv0bdJuyWjsLe7MQ==", "dev": true, "engines": { - "node": ">=20.9" + "node": ">=20.11" }, "peerDependencies": { - "prettier": "3.1.0" + "prettier": "3.2.5" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz", + "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=12" } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz", - "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz", + "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==", "cpu": [ "arm" ], @@ -758,9 +767,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz", - "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz", + "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==", "cpu": [ "arm64" ], @@ -774,9 +783,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz", - "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz", + "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==", "cpu": [ "x64" ], @@ -790,9 +799,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz", - "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz", + "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==", "cpu": [ "arm64" ], @@ -806,9 +815,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz", - "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz", + "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==", "cpu": [ "x64" ], @@ -822,9 +831,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz", - "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz", + "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==", "cpu": [ "arm64" ], @@ -838,9 +847,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz", - "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz", + "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==", "cpu": [ "x64" ], @@ -854,9 +863,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz", - "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz", + "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==", "cpu": [ "arm" ], @@ -870,9 +879,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz", - "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz", + "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==", "cpu": [ "arm64" ], @@ -886,9 +895,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz", - "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz", + "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==", "cpu": [ "ia32" ], @@ -902,9 +911,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz", - "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz", + "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==", "cpu": [ "loong64" ], @@ -918,9 +927,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz", - "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz", + "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==", "cpu": [ "mips64el" ], @@ -934,9 +943,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz", - "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz", + "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==", "cpu": [ "ppc64" ], @@ -950,9 +959,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz", - "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz", + "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==", "cpu": [ "riscv64" ], @@ -966,9 +975,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz", - "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz", + "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==", "cpu": [ "s390x" ], @@ -982,9 +991,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz", - "integrity": "sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz", + "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==", "cpu": [ "x64" ], @@ -998,9 +1007,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz", - "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz", + "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==", "cpu": [ "x64" ], @@ -1014,9 +1023,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz", - "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz", + "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==", "cpu": [ "x64" ], @@ -1030,9 +1039,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz", - "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz", + "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==", "cpu": [ "x64" ], @@ -1046,9 +1055,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz", - "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz", + "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==", "cpu": [ "arm64" ], @@ -1062,9 +1071,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz", - "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz", + "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==", "cpu": [ "ia32" ], @@ -1078,9 +1087,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz", - "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz", + "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==", "cpu": [ "x64" ], @@ -1118,9 +1127,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1140,29 +1149,73 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "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==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1177,9 +1230,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -1665,32 +1718,32 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1703,9 +1756,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1769,22 +1822,10 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -1799,18 +1840,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1825,9 +1854,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.7", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", - "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" @@ -1844,35 +1873,14 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", - "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, - "dependencies": { - "@types/ms": "*" - } - }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -1882,12 +1890,6 @@ "@types/node": "*" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "dev": true - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1912,73 +1914,24 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "29.5.10", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz", - "integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==", - "dev": true, - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", - "dev": true - }, - "node_modules/@types/lodash.clonedeep": { - "version": "4.5.9", - "resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz", - "integrity": "sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==", - "dev": true, - "dependencies": { - "@types/lodash": "*" - } - }, - "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", - "dev": true - }, "node_modules/@types/node": { - "version": "20.10.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", - "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "dependencies": { "undici-types": "~5.26.4" } }, - "node_modules/@types/responselike": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", - "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/stack-utils": { @@ -1988,9 +1941,9 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, "node_modules/@types/yargs": { @@ -2009,16 +1962,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.0.tgz", - "integrity": "sha512-HTvbSd0JceI2GW5DHS3R9zbarOqjkM9XDR7zL8eCsBUO/eSiHcoNE7kSL5sjGXmVa9fjH5LCfHDXNnH4QLp7tQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/type-utils": "6.13.0", - "@typescript-eslint/utils": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2034,8 +1987,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2044,15 +1997,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.0.tgz", - "integrity": "sha512-VpG+M7GNhHLI/aTDctqAV0XbzB16vf+qDX9DXuMZSe/0bahzDA9AKZB15NDbd+D9M4cDsJvfkbGOA7qiZ/bWJw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/typescript-estree": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4" }, "engines": { @@ -2063,7 +2016,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2072,13 +2025,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.0.tgz", - "integrity": "sha512-2x0K2/CujsokIv+LN2T0l5FVDMtsCjkUyYtlcY4xxnxLAW+x41LXr16duoicHpGtLhmtN7kqvuFJ3zbz00Ikhw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2089,13 +2042,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.0.tgz", - "integrity": "sha512-YHufAmZd/yP2XdoD3YeFEjq+/Tl+myhzv+GJHSOz+ro/NFGS84mIIuLU3pVwUcauSmwlCrVXbBclkn1HfjY0qQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.0", - "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2107,7 +2060,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2116,9 +2069,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.0.tgz", - "integrity": "sha512-oXg7DFxx/GmTrKXKKLSoR2rwiutOC7jCQ5nDH5p5VS6cmHE1TcPTaYQ0VPSSUvj7BnNqCgQ/NXcTBxn59pfPTQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2129,16 +2082,17 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.0.tgz", - "integrity": "sha512-IT4O/YKJDoiy/mPEDsfOfp+473A9GVqXlBKckfrAOuVbTqM8xbc0LuqyFCcgeFWpqu3WjQexolgqN2CuWBYbog==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -2156,17 +2110,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.0.tgz", - "integrity": "sha512-V+txaxARI8yznDkcQ6FNRXxG+T37qT3+2NsDTZ/nKLxv6VfGrRhTnuvxPUxpVuWWr+eVeIxU53PioOXbz8ratQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/typescript-estree": "6.13.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" }, "engines": { @@ -2177,16 +2131,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.0.tgz", - "integrity": "sha512-UQklteCEMCRoq/1UhKFZsHv5E4dN1wQSzJoxTfABasWk1HgJRdg1xNUve/Kv/Sdymt4x+iEzpESOqRFlQr/9Aw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2204,9 +2158,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2442,13 +2396,12 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -2464,9 +2417,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2483,9 +2436,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, "bin": { @@ -2522,33 +2475,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true, - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2568,9 +2494,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001565", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", - "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", + "version": "1.0.30001597", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", + "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", "dev": true, "funding": [ { @@ -2647,18 +2573,6 @@ "node": ">=12" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2740,15 +2654,6 @@ "node": ">= 8" } }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2766,33 +2671,6 @@ } } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -2822,15 +2700,6 @@ "node": ">=0.10.0" } }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2880,9 +2749,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.595", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.595.tgz", - "integrity": "sha512-+ozvXuamBhDOKvMNUQvecxfbyICmIAwS4GpLmR0bsiSBlGnLaOcs2Cj7J8XSbW+YEaN3Xl3ffgpm+srTUWFwFQ==", + "version": "1.4.699", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.699.tgz", + "integrity": "sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==", "dev": true }, "node_modules/emittery": { @@ -2903,15 +2772,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2922,9 +2782,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz", - "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", "hasInstallScript": true, "peer": true, "bin": { @@ -2934,34 +2794,35 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.8", - "@esbuild/android-arm64": "0.19.8", - "@esbuild/android-x64": "0.19.8", - "@esbuild/darwin-arm64": "0.19.8", - "@esbuild/darwin-x64": "0.19.8", - "@esbuild/freebsd-arm64": "0.19.8", - "@esbuild/freebsd-x64": "0.19.8", - "@esbuild/linux-arm": "0.19.8", - "@esbuild/linux-arm64": "0.19.8", - "@esbuild/linux-ia32": "0.19.8", - "@esbuild/linux-loong64": "0.19.8", - "@esbuild/linux-mips64el": "0.19.8", - "@esbuild/linux-ppc64": "0.19.8", - "@esbuild/linux-riscv64": "0.19.8", - "@esbuild/linux-s390x": "0.19.8", - "@esbuild/linux-x64": "0.19.8", - "@esbuild/netbsd-x64": "0.19.8", - "@esbuild/openbsd-x64": "0.19.8", - "@esbuild/sunos-x64": "0.19.8", - "@esbuild/win32-arm64": "0.19.8", - "@esbuild/win32-ia32": "0.19.8", - "@esbuild/win32-x64": "0.19.8" + "@esbuild/aix-ppc64": "0.20.1", + "@esbuild/android-arm": "0.20.1", + "@esbuild/android-arm64": "0.20.1", + "@esbuild/android-x64": "0.20.1", + "@esbuild/darwin-arm64": "0.20.1", + "@esbuild/darwin-x64": "0.20.1", + "@esbuild/freebsd-arm64": "0.20.1", + "@esbuild/freebsd-x64": "0.20.1", + "@esbuild/linux-arm": "0.20.1", + "@esbuild/linux-arm64": "0.20.1", + "@esbuild/linux-ia32": "0.20.1", + "@esbuild/linux-loong64": "0.20.1", + "@esbuild/linux-mips64el": "0.20.1", + "@esbuild/linux-ppc64": "0.20.1", + "@esbuild/linux-riscv64": "0.20.1", + "@esbuild/linux-s390x": "0.20.1", + "@esbuild/linux-x64": "0.20.1", + "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-x64": "0.20.1", + "@esbuild/sunos-x64": "0.20.1", + "@esbuild/win32-arm64": "0.20.1", + "@esbuild/win32-ia32": "0.20.1", + "@esbuild/win32-x64": "0.20.1" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -2980,16 +2841,16 @@ } }, "node_modules/eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "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", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -3035,9 +2896,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -3074,6 +2935,28 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -3169,18 +3052,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/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/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -3253,9 +3124,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -3270,29 +3141,6 @@ "bser": "2.1.1" } }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3363,9 +3211,9 @@ } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/foreground-child": { @@ -3396,18 +3244,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3464,28 +3300,13 @@ "node": ">=8.0.0" } }, - "node_modules/get-port": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.0.0.tgz", - "integrity": "sha512-mDHFgApoQd+azgMdwylJrv2DX47ywGq1i5VFJE7fZ0dttNq3iQMfsU4IvEgBHojA3KqEudyu7Vq+oN8kNaNkWw==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "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, - "dependencies": { - "pump": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3523,10 +3344,32 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3558,31 +3401,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -3605,9 +3423,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -3622,25 +3440,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3651,9 +3450,9 @@ } }, "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==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -3822,14 +3621,14 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", - "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", "semver": "^7.5.4" }, @@ -3866,9 +3665,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4578,12 +4377,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": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -4596,15 +4389,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4681,25 +4465,19 @@ "node": ">=6" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minipass": { @@ -4723,43 +4501,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4767,9 +4508,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -4781,18 +4522,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -4846,15 +4575,6 @@ "node": ">= 0.8.0" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4974,9 +4694,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -5092,9 +4812,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "peer": true, "bin": { @@ -5146,16 +4866,6 @@ "node": ">= 6" } }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5201,18 +4911,6 @@ } ] }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -5245,12 +4943,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -5290,18 +4982,6 @@ "node": ">=10" } }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -5330,15 +5010,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/rimraf/node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -5361,21 +5032,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5400,9 +5056,9 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5655,6 +5311,28 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5689,21 +5367,21 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" } }, "node_modules/ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -5719,7 +5397,7 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", @@ -5777,9 +5455,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "peer": true, "bin": { "tsc": "bin/tsc", @@ -5869,15 +5547,6 @@ "makeerror": "1.0.12" } }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index e81a672..9ae77f4 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,26 @@ { "name": "@checkdigit/typescript-config", - "version": "6.0.0", + "version": "7.0.0", "description": "Check Digit standard Typescript configuration", "prettier": "@checkdigit/prettier-config", "engines": { - "node": ">=20.9" + "node": ">=20.11" + }, + "type": "module", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-mjs/index.mjs", + "default": "./tsconfig.json" + } }, "bin": { "builder": "./bin/builder.mjs" }, "peerDependencies": { - "@types/node": ">=20.9", - "esbuild": "0.19.8", - "typescript": ">=5.3.2 <5.4.0" + "@types/node": ">=20.11", + "esbuild": "0.20.1", + "typescript": ">=5.4.2 <5.5.0" }, "repository": { "type": "git", @@ -25,54 +33,43 @@ }, "homepage": "https://github.com/checkdigit/typescript-config#readme", "scripts": { - "prepublishOnly": "npm run build-builder", + "prepublishOnly": "npm run build:builder && npm run build:dist-types && npm run build:dist-mjs", "lint:fix": "eslint --ignore-path .gitignore . --fix", "lint": "eslint --max-warnings 0 --ignore-path .gitignore .", "prettier": "prettier --ignore-path .gitignore --list-different .", "prettier:fix": "prettier --ignore-path .gitignore --write .", "test": "npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style", - "build-builder": "esbuild src/builder/index.mts --bundle --platform=node --format=esm --external:typescript --external:esbuild --outfile=build-builder/builder.mjs && mkdir -p bin && { echo '#!/usr/bin/env node'; cat build-builder/builder.mjs; } > bin/builder.mjs && chmod +x bin/builder.mjs", - "build-types": "rimraf build-types && bin/builder.mjs --type=types --outDir=build-types", - "build-cjs": "rimraf build-cjs && bin/builder.mjs --type=commonjs --outDir=build-cjs", - "build-cjs-bundle": "rimraf build-cjs-bundle && bin/builder.mjs --type=commonjs --entryPoint=test/index.test.ts --outDir=build-cjs-bundle --outFile=test/index.test.cjs --sourceMap", - "build-cjs-bundle-minify": "rimraf build-cjs-bundle-minify && bin/builder.mjs --type=commonjs --entryPoint=test/index.test.ts --outDir=build-cjs-bundle-minify --outFile=test/index.test.cjs --minify --sourceMap", - "build-cjs-bundle-no-external": "rimraf build-cjs-bundle-no-external && bin/builder.mjs --type=commonjs --external=./node_modules/* --entryPoint=test/index.test.ts --outDir=build-cjs-bundle-no-external --outFile=test/index.test.cjs", - "build-mjs": "rimraf build-mjs && bin/builder.mjs --type=module --outDir=build-mjs", - "build-mjs-bundle": "rimraf build-mjs-bundle && bin/builder.mjs --type=module --outDir=build-mjs-bundle --entryPoint=test/index.test.ts --outFile=test/index.test.mjs", - "build-mjs-bundle-minify": "rimraf build-mjs-bundle-minify && bin/builder.mjs --type=module --minify --outDir=build-mjs-bundle-minify --entryPoint=test/index.test.ts --outFile=test/index.test.mjs", - "build-mjs-bundle-no-external": "rimraf build-mjs-bundle-no-external && bin/builder.mjs --type=module --external=./node_modules/* --outDir=build-mjs-bundle-no-external --entryPoint=test/index.test.ts --outFile=test/index.test.mjs --minify", - "test-jest-mjs": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage=false src/*.mts src/*/*.mts src/*/*/*.mts", - "test-jest-cjs": "jest --coverage=false src/*.ts src/*/*.ts src/*/*/*.ts", - "test-cjs": "node --test build-cjs/test/index.test.cjs", - "test-cjs-bundle": "node --test build-cjs-bundle/test/index.test.cjs", - "test-cjs-bundle-minify": "node --test build-cjs-bundle-minify/test/index.test.cjs", - "test-cjs-bundle-no-external": "node --test build-cjs-bundle-no-external/test/index.test.cjs", - "test-mjs": "node --test build-mjs/test/index.test.mjs", - "test-mjs-bundle": "node --test build-mjs-bundle/test/index.test.mjs", - "test-mjs-bundle-minify": "node --test build-mjs-bundle-minify/test/index.test.mjs", - "test-mjs-bundle-no-external": "node --test build-mjs-bundle-no-external/test/index.test.mjs", - "ci:test": "npm run test-jest-cjs && npm run test-jest-mjs && npm run test-cjs && npm run test-cjs-bundle && npm run test-cjs-bundle-no-external && npm run test-mjs && npm run test-mjs-bundle && npm run test-mjs-bundle-no-external", - "ci:compile": "tsc --noEmit && npm run build-builder && npm run build-types && npm run build-cjs && npm run build-cjs-bundle && npm run build-cjs-bundle-minify && npm run build-cjs-bundle-no-external && npm run build-mjs && npm run build-mjs-bundle && npm run build-mjs-bundle-minify && npm run build-mjs-bundle-no-external", + "build": "npm run build:builder && npm run build:types && npm run build:mjs && npm run build:mjs-bundle && npm run build:mjs-bundle-minify && npm run build:mjs-bundle-no-external", + "build:dist-types": "rimraf dist-types && npx builder --type=types --outDir=dist-types", + "build:dist-mjs": "rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs", + "build:builder": "esbuild src/builder.ts --bundle --platform=node --format=esm --external:typescript --external:esbuild --outfile=build-builder/builder.mjs && mkdir -p bin && { echo '#!/usr/bin/env node'; cat build-builder/builder.mjs; } > bin/builder.mjs && chmod +x bin/builder.mjs", + "build:types": "rimraf build-types && bin/builder.mjs --type=types --outDir=build-types", + "build:mjs": "rimraf build-mjs && bin/builder.mjs --type=module --outDir=build-mjs", + "build:mjs-bundle": "rimraf build-mjs-bundle && bin/builder.mjs --type=module --outDir=build-mjs-bundle --entryPoint=test/index.ts --outFile=test/index.mjs", + "build:mjs-bundle-minify": "rimraf build-mjs-bundle-minify && bin/builder.mjs --type=module --minify --outDir=build-mjs-bundle-minify --entryPoint=test/index.ts --outFile=test/index.mjs", + "build:mjs-bundle-no-external": "rimraf build-mjs-bundle-no-external && bin/builder.mjs --type=module --external=./node_modules/* --outDir=build-mjs-bundle-no-external --entryPoint=test/index.ts --outFile=test/index.mjs --minify", + "test:jest-mjs": "NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false", + "test:mjs": "node --test build-mjs/test/index.mjs", + "test:mjs-bundle": "node --test build-mjs-bundle/test/index.mjs", + "test:mjs-bundle-minify": "node --test build-mjs-bundle-minify/test/index.mjs", + "test:mjs-bundle-no-external": "node --test build-mjs-bundle-no-external/test/index.mjs", + "ci:test": "npm run build && npm run test:jest-mjs && npm run test:mjs && npm run test:mjs-bundle && npm run test:mjs-bundle-no-external", + "ci:compile": "tsc --noEmit", "ci:lint": "npm run lint", "ci:style": "npm run prettier" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^11.1.0", - "@checkdigit/prettier-config": "^5.0.0", - "@types/debug": "^4.1.12", - "@types/jest": "^29.5.10", - "@types/uuid": "^9.0.7", - "@typescript-eslint/eslint-plugin": "^6.13.0", - "@typescript-eslint/parser": "^6.13.0", - "debug": "^4.3.4", - "eslint": "^8.54.0", - "eslint-config-prettier": "^9.0.0", - "get-port": "^7.0.0", - "got": "^11.8.6", + "@apidevtools/json-schema-ref-parser": "^11.5.4", + "@checkdigit/prettier-config": "^5.3.0", + "@jest/globals": "^29.7.0", + "@types/uuid": "^9.0.8", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "jest": "^29.7.0", - "node-fetch": "^3.3.2", "rimraf": "^5.0.5", - "ts-jest": "^29.1.1", + "ts-jest": "^29.1.2", "uuid": "^9.0.1" }, "eslintConfig": { @@ -94,6 +91,7 @@ "@typescript-eslint/non-nullable-type-assertion-style": "error", "capitalized-comments": "off", "one-var": "off", + "func-names": "off", "sort-keys": "off", "sort-imports": "off", "max-lines": [ @@ -127,8 +125,6 @@ "overrides": [ { "files": [ - "*.spec.mts", - "*.test.mts", "*.spec.ts", "*.test.ts" ], @@ -148,7 +144,6 @@ "no-param-reassign": "off", "id-length": "off", "no-magic-numbers": "off", - "func-names": "off", "no-duplicate-imports": "off", "symbol-description": "off", "no-invalid-this": "off", @@ -166,28 +161,19 @@ "mjs", "cjs", "ts", - "mts", "json", "node" ], "extensionsToTreatAsEsm": [ - ".mts" + ".ts" ], "transform": { - "^.+\\.mts$": [ - "ts-jest", - { - "isolatedModules": true, - "diagnostics": false, - "useESM": true - } - ], "^.+\\.ts$": [ "ts-jest", { "isolatedModules": true, "diagnostics": false, - "useESM": false + "useESM": true } ] }, @@ -195,13 +181,24 @@ "/src/**" ], "testMatch": [ - "/src/**/*.spec.ts", - "/src/**/*.spec.mts" + "/src/**/*.spec.ts" ] }, "files": [ "bin", "tsconfig.json", + "src", + "dist-types", + "dist-mjs", + "!src/**/test/**", + "!src/**/*.test.ts", + "!src/**/*.spec.ts", + "!dist-types/**/test/**", + "!dist-types/**/*.test.d.ts", + "!dist-types/**/*.spec.d.ts", + "!dist-mjs/**/test/**", + "!dist-mjs/**/*.test.mjs", + "!dist-mjs/**/*.spec.mjs", "SECURITY.md" ] } diff --git a/src/builder/analyze.spec.mts b/src/analyze.spec.ts similarity index 88% rename from src/builder/analyze.spec.mts rename to src/analyze.spec.ts index a91d8f3..6bbf141 100644 --- a/src/builder/analyze.spec.mts +++ b/src/analyze.spec.ts @@ -1,24 +1,15 @@ -// builder/analyze.spec.mts +// analyze.spec.ts import { strict as assert } from 'node:assert'; import { promises as fs } from 'node:fs'; import os from 'node:os'; import path from 'node:path'; +import { describe, it } from '@jest/globals'; import { v4 as uuid } from 'uuid'; -/* - * The below imports work, but tsc complains: - * TS5097: An import path can only end with a .mts extension when allowImportingTsExtensions is enabled - * - * This will be fixed once this library can be 100% ESM and all the .mts files are converted to .ts. - */ - -// @ts-expect-error -import builder from './builder.mts'; - -// @ts-expect-error -import analyze from './analyze.mts'; +import compile from './compile'; +import analyze from './analyze'; const twoModules = { [`index.ts`]: `import { hello } from './thing';\nexport default hello + 'world';\n`, @@ -86,7 +77,7 @@ describe('analyze', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, twoModules); - const result = await builder({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir }); + const result = await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir }); assert.ok(result.metafile !== undefined); const analysis = analyze(result.metafile); assert.ok(analysis.moduleBytes === 0); @@ -101,7 +92,7 @@ describe('analyze', () => { const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, importExternalModule); await writeNodeModules(moduleDir, testNodeModules); - const result = await builder({ + const result = await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', @@ -123,7 +114,7 @@ describe('analyze', () => { const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, importExternalModule); await writeNodeModules(moduleDir, testNodeModules); - const result = await builder({ + const result = await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', diff --git a/src/builder/analyze.mts b/src/analyze.ts similarity index 97% rename from src/builder/analyze.mts rename to src/analyze.ts index ef7cb60..554ea82 100644 --- a/src/builder/analyze.mts +++ b/src/analyze.ts @@ -1,4 +1,4 @@ -// builder/analyze.mts +// analyze.ts import { strict as assert } from 'node:assert'; diff --git a/src/builder/index.mts b/src/builder.ts similarity index 63% rename from src/builder/index.mts rename to src/builder.ts index 8b397a8..107dd27 100644 --- a/src/builder/index.mts +++ b/src/builder.ts @@ -1,24 +1,11 @@ -// builder/index.mts +// builder.ts import { strict as assert } from 'node:assert'; import { promises as fs } from 'node:fs'; import path from 'node:path'; import { parseArgs } from 'node:util'; -/* - * The below imports work, but tsc complains: - * TS5097: An import path can only end with a .mts extension when allowImportingTsExtensions is enabled - * - * This will be fixed once this library can be 100% ESM and all the .mts files are converted to .ts. - */ - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-expect-error -import builder from './builder.mts'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-expect-error -import analyze from './analyze.mts'; +import { compile, analyze } from './index'; const { values: { type, inDir, outDir, entryPoint, outFile, external, minify, sourceMap }, @@ -35,11 +22,11 @@ const { }, }); -assert.ok(type === 'module' || type === 'commonjs' || type === 'types', 'type must be types, module or commonjs'); +assert.ok(type === 'module' || type === 'types', 'type must be types or module'); assert.ok(inDir !== undefined, 'inDir is required'); assert.ok(outDir !== undefined, 'outDir is required'); -const buildResult = await builder({ +const compileResult = await compile({ type, inDir: path.join(process.cwd(), inDir), outDir: path.join(process.cwd(), outDir), @@ -52,16 +39,16 @@ const buildResult = await builder({ // write output files await Promise.all( - buildResult.outputFiles.map(async (file) => { + compileResult.outputFiles.map(async (file) => { await fs.mkdir(path.join(path.dirname(file.path)), { recursive: true }); await fs.writeFile(file.path, file.text); }), ); // write metafile.json -if (buildResult.metafile !== undefined) { - const analysis = analyze(buildResult.metafile); - await fs.writeFile(path.join(outDir, 'metafile.json'), JSON.stringify(buildResult.metafile, undefined, 2)); +if (compileResult.metafile !== undefined) { + const analysis = analyze(compileResult.metafile); + await fs.writeFile(path.join(outDir, 'metafile.json'), JSON.stringify(compileResult.metafile, undefined, 2)); // eslint-disable-next-line no-console console.log( diff --git a/src/builder/builder.spec.mts b/src/compile.spec.ts similarity index 55% rename from src/builder/builder.spec.mts rename to src/compile.spec.ts index b1d0af4..60ef2cd 100644 --- a/src/builder/builder.spec.mts +++ b/src/compile.spec.ts @@ -1,17 +1,14 @@ -// builder/builder.spec.mts +// compile.spec.ts import { strict as assert } from 'node:assert'; import { promises as fs } from 'node:fs'; -import { createRequire } from 'node:module'; import os from 'node:os'; import path from 'node:path'; +import { describe, it } from '@jest/globals'; import { v4 as uuid } from 'uuid'; -// @ts-expect-error -import builder from './builder.mts'; - -const require = createRequire(import.meta.url); +import compile from './compile'; const commonJsCompatabilityBanner = `import { createRequire as __createRequire } from "node:module"; import { fileURLToPath as __fileURLToPath } from "node:url"; @@ -126,13 +123,13 @@ function convert(outputFiles: Array<{ path: string; text: string }>) { ); } -describe('test builder', () => { +describe('compile', () => { it('should not build bad code', async () => { const id = uuid(); const inDir = path.join(os.tmpdir(), `in-dir-${id}`); const outDir = path.join(os.tmpdir(), `out-dir-${id}`); await writeInput(inDir, { 'index.ts': 'bad code' }); - await assert.rejects(builder({ type: 'module', inDir, outDir }), { + await assert.rejects(compile({ type: 'module', inDir, outDir }), { message: `tsc failed ${JSON.stringify([ `tsc: ${inDir}/index.ts (1,1): Unexpected keyword or identifier.`, `tsc: ${inDir}/index.ts (1,1): Cannot find name 'bad'.`, @@ -148,7 +145,7 @@ describe('test builder', () => { const id = uuid(); const inDir = path.join(os.tmpdir(), `in-dir-${id}`); const outDir = path.join(os.tmpdir(), `out-dir-${id}`); - await assert.rejects(builder({ type: 'module', inDir, outDir }), { + await assert.rejects(compile({ type: 'module', inDir, outDir }), { message: `ENOENT: no such file or directory, scandir '${inDir}'`, }); await assert.rejects(read(outDir), { @@ -161,7 +158,7 @@ describe('test builder', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`); const outDir = path.join(os.tmpdir(), `out-dir-${id}`); await writeInput(inDir, {}); - await writeOutput(await builder({ type: 'module', inDir, outDir })); + await writeOutput(await compile({ type: 'module', inDir, outDir })); await assert.rejects(read(outDir), { message: `ENOENT: no such file or directory, scandir '${outDir}'`, }); @@ -172,7 +169,7 @@ describe('test builder', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, singleModule); - const result = await builder({ type: 'types', inDir, outDir }); + const result = await compile({ type: 'types', inDir, outDir }); assert.deepEqual(convert(result.outputFiles), { 'index.d.ts': 'export declare const hello = "world";\n', }); @@ -183,7 +180,7 @@ describe('test builder', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, singleModule); - await writeOutput(await builder({ type: 'module', inDir, outDir })); + await writeOutput(await compile({ type: 'module', inDir, outDir })); assert.deepEqual(await read(outDir), { 'index.mjs': 'var hello = "world";\nexport {\n hello\n};\n', }); @@ -198,7 +195,7 @@ describe('test builder', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, singleModule); - await writeOutput(await builder({ type: 'module', inDir, outDir, minify: true })); + await writeOutput(await compile({ type: 'module', inDir, outDir, minify: true })); assert.deepEqual(await read(outDir), { 'index.mjs': 'var o="world";export{o as hello};\n', }); @@ -213,7 +210,7 @@ describe('test builder', () => { const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, exportDefaultFunctionModule); - await writeOutput(await builder({ type: 'module', inDir, outDir })); + await writeOutput(await compile({ type: 'module', inDir, outDir })); assert.deepEqual(await read(outDir), { 'index.mjs': 'function src_default() {\n' + @@ -230,54 +227,12 @@ describe('test builder', () => { assert.equal(output.default(), 'hello world'); }); - it('should build a single CJS module that exports function as default', async () => { - const id = uuid(); - const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); - const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); - await writeInput(inDir, exportDefaultFunctionModule); - await writeOutput(await builder({ type: 'commonjs', inDir, outDir })); - assert.deepEqual(await read(outDir), { - 'index.cjs': - 'var __defProp = Object.defineProperty;\n' + - 'var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n' + - 'var __getOwnPropNames = Object.getOwnPropertyNames;\n' + - 'var __hasOwnProp = Object.prototype.hasOwnProperty;\n' + - 'var __export = (target, all) => {\n' + - ' for (var name in all)\n' + - ' __defProp(target, name, { get: all[name], enumerable: true });\n' + - '};\n' + - 'var __copyProps = (to, from, except, desc) => {\n' + - ' if (from && typeof from === "object" || typeof from === "function") {\n' + - ' for (let key of __getOwnPropNames(from))\n' + - ' if (!__hasOwnProp.call(to, key) && key !== except)\n' + - ' __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n' + - ' }\n' + - ' return to;\n' + - '};\n' + - 'var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n' + - '\n' + - 'var src_exports = {};\n' + - '__export(src_exports, {\n' + - ' default: () => src_default\n' + - '});\n' + - 'module.exports = __toCommonJS(src_exports);\n' + - 'function src_default() {\n' + - ' return "hello world";\n' + - '}\n', - }); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const output = require(path.join(outDir, 'index.cjs')); - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - assert.equal(output.default(), 'hello world'); - }); - it('should build an ESM module that imports a second ESM module', async () => { const id = uuid(); const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, twoModules); - await writeOutput(await builder({ type: 'module', inDir, outDir })); + await writeOutput(await compile({ type: 'module', inDir, outDir })); assert.deepEqual(await read(outDir), { 'index.mjs': 'import { hello } from "./thing.mjs";\n' + @@ -292,122 +247,12 @@ describe('test builder', () => { assert.equal(output.default, 'worldworld'); }); - it('should build a single CJS module', async () => { - const id = uuid(); - const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); - const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); - await writeInput(inDir, singleModule); - const result = await builder({ type: 'commonjs', inDir, outDir }); - assert.deepEqual(convert(result.outputFiles), { - 'index.cjs': - 'var __defProp = Object.defineProperty;\n' + - 'var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n' + - 'var __getOwnPropNames = Object.getOwnPropertyNames;\n' + - 'var __hasOwnProp = Object.prototype.hasOwnProperty;\n' + - 'var __export = (target, all) => {\n' + - ' for (var name in all)\n' + - ' __defProp(target, name, { get: all[name], enumerable: true });\n' + - '};\n' + - 'var __copyProps = (to, from, except, desc) => {\n' + - ' if (from && typeof from === "object" || typeof from === "function") {\n' + - ' for (let key of __getOwnPropNames(from))\n' + - ' if (!__hasOwnProp.call(to, key) && key !== except)\n' + - ' __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n' + - ' }\n' + - ' return to;\n' + - '};\n' + - 'var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n' + - '\n' + - 'var src_exports = {};\n' + - '__export(src_exports, {\n' + - ' hello: () => hello\n' + - '});\n' + - 'module.exports = __toCommonJS(src_exports);\n' + - 'var hello = "world";\n' + - '0 && (module.exports = {\n' + - ' hello\n' + - '});\n', - }); - }); - - it('should build a CJS module that requires a second CJS module', async () => { - const id = uuid(); - const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); - const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); - await writeInput(inDir, twoModules); - await writeOutput(await builder({ type: 'commonjs', inDir, outDir })); - assert.deepEqual(await read(outDir), { - 'index.cjs': - 'var __defProp = Object.defineProperty;\n' + - 'var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n' + - 'var __getOwnPropNames = Object.getOwnPropertyNames;\n' + - 'var __hasOwnProp = Object.prototype.hasOwnProperty;\n' + - 'var __export = (target, all) => {\n' + - ' for (var name in all)\n' + - ' __defProp(target, name, { get: all[name], enumerable: true });\n' + - '};\n' + - 'var __copyProps = (to, from, except, desc) => {\n' + - ' if (from && typeof from === "object" || typeof from === "function") {\n' + - ' for (let key of __getOwnPropNames(from))\n' + - ' if (!__hasOwnProp.call(to, key) && key !== except)\n' + - ' __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n' + - ' }\n' + - ' return to;\n' + - '};\n' + - 'var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n' + - '\n' + - 'var src_exports = {};\n' + - '__export(src_exports, {\n' + - ' default: () => src_default\n' + - '});\n' + - 'module.exports = __toCommonJS(src_exports);\n' + - 'var import_thing = require("./thing.cjs");\n' + - 'var src_default = import_thing.hello + "world";\n', - 'thing.cjs': - 'var __defProp = Object.defineProperty;\n' + - 'var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n' + - 'var __getOwnPropNames = Object.getOwnPropertyNames;\n' + - 'var __hasOwnProp = Object.prototype.hasOwnProperty;\n' + - 'var __export = (target, all) => {\n' + - ' for (var name in all)\n' + - ' __defProp(target, name, { get: all[name], enumerable: true });\n' + - '};\n' + - 'var __copyProps = (to, from, except, desc) => {\n' + - ' if (from && typeof from === "object" || typeof from === "function") {\n' + - ' for (let key of __getOwnPropNames(from))\n' + - ' if (!__hasOwnProp.call(to, key) && key !== except)\n' + - ' __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n' + - ' }\n' + - ' return to;\n' + - '};\n' + - 'var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n' + - '\n' + - 'var thing_exports = {};\n' + - '__export(thing_exports, {\n' + - ' hello: () => hello\n' + - '});\n' + - 'module.exports = __toCommonJS(thing_exports);\n' + - 'var hello = "world";\n' + - '0 && (module.exports = {\n' + - ' hello\n' + - '});\n', - }); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const output1 = require(path.join(outDir, 'index.cjs')); - assert.equal(output1.default, 'worldworld'); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const output2 = await import(path.join(outDir, 'index.cjs')); - assert.equal(output2.default.default, 'worldworld'); - }); - it('should bundle an ESM module that imports a second ESM module', async () => { const id = uuid(); const inDir = path.join(os.tmpdir(), `in-dir-${id}`, 'src'); const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, twoModules); - await writeOutput(await builder({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir })); + await writeOutput(await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir })); assert.deepEqual(await read(outDir), { 'index.mjs': `${commonJsCompatabilityBanner}\n\n` + @@ -430,7 +275,7 @@ describe('test builder', () => { const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, importExternalModule); await writeNodeModules(moduleDir, testNodeModules); - await writeOutput(await builder({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir })); + await writeOutput(await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', inDir, outDir })); assert.deepEqual(await read(outDir), { 'index.mjs': `${commonJsCompatabilityBanner}\n\n` + @@ -457,7 +302,7 @@ describe('test builder', () => { const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); await writeInput(inDir, importExternalModule); await writeNodeModules(moduleDir, testNodeModules); - const result = await builder({ + const result = await compile({ type: 'module', entryPoint: 'index.ts', outFile: 'index.mjs', @@ -476,28 +321,4 @@ describe('test builder', () => { `};\n`, }); }); - - it('should bundle a commonjs module that imports external ESM modules', async () => { - const id = uuid(); - const moduleDir = path.join(os.tmpdir(), `in-dir-${id}`); - const inDir = path.join(moduleDir, 'src'); - const outDir = path.join(os.tmpdir(), `out-dir-${id}`, 'build'); - await writeInput(inDir, importExternalModule); - await writeNodeModules(moduleDir, testNodeModules); - await writeOutput( - await builder({ - type: 'commonjs', - entryPoint: 'index.ts', - outFile: 'index.cjs', - inDir, - outDir, - }), - ); - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const output = require(path.join(outDir, 'index.cjs')); - assert.deepEqual(output.hello, { - message: 'hello world', - test: 'world', - }); - }); }); diff --git a/src/builder/builder.mts b/src/compile.ts similarity index 92% rename from src/builder/builder.mts rename to src/compile.ts index 3a72bcd..47773d3 100644 --- a/src/builder/builder.mts +++ b/src/compile.ts @@ -1,10 +1,10 @@ -// builder/builder.mts +// compile.ts import { strict as assert } from 'node:assert'; import { promises as fs } from 'node:fs'; import path from 'node:path'; -import typescript from 'typescript'; +import typescript from 'typescript'; import { type PluginBuild, build } from 'esbuild'; const commonJsCompatabilityBanner = `import { createRequire as __createRequire } from "node:module"; @@ -62,16 +62,16 @@ export interface OutputFile { text: string; } -export interface BuildResult { +export interface CompileResult { metafile?: Metafile | undefined; outputFiles: OutputFile[]; } -export interface BuilderOptions { +export interface CompileOptions { /** - * whether to produce Typescript types, ESM or CommonJS code + * whether to produce Typescript types or ESM code */ - type: 'module' | 'commonjs' | 'types'; + type: 'module' | 'types'; /** * the entry point for the bundle, relative to the inDir. if not provided, the files in the inDir will be processed @@ -135,7 +135,7 @@ function excludeSourceMaps(filter: RegExp) { return (pluginBuild: PluginBuild) => { // ignore source maps for any Javascript file that matches filter pluginBuild.onLoad({ filter }, async (args) => { - if (args.path.endsWith('.js') || args.path.endsWith('.mjs') || args.path.endsWith('.cjs')) { + if (args.path.endsWith('.js') || args.path.endsWith('.mjs')) { return { contents: `${await fs.readFile( args.path, @@ -149,8 +149,7 @@ function excludeSourceMaps(filter: RegExp) { }; } -function resolveTypescriptPaths(type: 'module' | 'commonjs') { - const extension = type === 'module' ? 'mjs' : 'cjs'; +function resolveTypescriptPaths() { return (pluginBuild: PluginBuild) => { // rewrite paths based on standard node resolution pluginBuild.onResolve({ filter: /.*/u }, async (resolved) => { @@ -170,7 +169,7 @@ function resolveTypescriptPaths(type: 'module' | 'commonjs') { // do nothing } let newPath = resolved.path; - newPath += isDirectory ? `/index.${extension}` : `.${extension}`; + newPath += isDirectory ? `/index.mjs` : `.mjs`; return { path: newPath, external: true }; }); }; @@ -187,7 +186,7 @@ export default async function ({ minify = false, sourceMap, workingDirectory = process.cwd(), -}: BuilderOptions): Promise { +}: CompileOptions): Promise { const messages: string[] = []; assert.ok( @@ -273,7 +272,7 @@ export default async function ({ minify, absWorkingDir: workingDirectory, platform: 'node', - format: type === 'module' ? 'esm' : 'cjs', + format: 'esm', treeShaking: type === 'module', write: false, metafile: outFile !== undefined, @@ -289,11 +288,11 @@ export default async function ({ ? { // individual files outdir: outDir, - outExtension: { '.js': type === 'module' ? '.mjs' : '.cjs' }, + outExtension: { '.js': '.mjs' }, plugins: [ { name: 'resolve-typescript-paths', - setup: resolveTypescriptPaths(type), + setup: resolveTypescriptPaths(), }, ], } diff --git a/src/describe-it.test.ts b/src/describe-it.test.ts deleted file mode 100644 index e140743..0000000 --- a/src/describe-it.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -// describe-it.ts - -import { describe as nodeDescribe, it as nodeIt } from 'node:test'; - -/** - * If we're running inside a Jest environment, "describe" and "it" will be defined globally. If not, we fall back to - * the built-in node.js test runner. - */ - -export const describe = globalThis.describe ?? nodeDescribe; -export const it = globalThis.it ?? nodeIt; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..33ccc5c --- /dev/null +++ b/src/index.ts @@ -0,0 +1,7 @@ +// index.ts + +export * from './analyze'; +export * from './compile'; + +export { default as analyze } from './analyze'; +export { default as compile } from './compile'; diff --git a/src/test/commonjs.spec.ts b/src/test/commonjs.spec.ts index 3c41446..983bb1c 100644 --- a/src/test/commonjs.spec.ts +++ b/src/test/commonjs.spec.ts @@ -1,18 +1,12 @@ -// commonjs.spec.ts +// test/commonjs.spec.ts import { strict as assert } from 'node:assert'; -import got from 'got'; import jsonSchemaRefParser from '@apidevtools/json-schema-ref-parser'; -import { describe, it } from '../describe-it.test'; +import { describe, it } from './describe-it'; describe('commonjs', () => { - it('should work with CJS version of got', async () => { - assert.equal(typeof got, 'function'); - assert.equal(typeof got.put, 'function'); - }); - it('should work with CJS module that uses __dirname', async () => { assert.equal(typeof jsonSchemaRefParser.parse, 'function'); }); diff --git a/src/test/describe-it.ts b/src/test/describe-it.ts new file mode 100644 index 0000000..98f5361 --- /dev/null +++ b/src/test/describe-it.ts @@ -0,0 +1,13 @@ +// test/describe-it.ts + +import type { describe as jestDescribe, it as jestIt } from '@jest/globals'; +import { describe as nodeDescribe, it as nodeIt } from 'node:test'; + +/** + * If we're running inside a Jest environment, "describe" and "it" will be defined globally. If not, we fall back to + * the built-in node.js test runner. + */ + +export const describe: typeof jestDescribe = + (globalThis as unknown as { describe: typeof jestDescribe }).describe ?? nodeDescribe; +export const it: typeof jestIt = (globalThis as unknown as { it: typeof jestIt }).it ?? nodeIt; diff --git a/src/test/index.test.ts b/src/test/index.ts similarity index 81% rename from src/test/index.test.ts rename to src/test/index.ts index d46a68d..f2b2ad4 100644 --- a/src/test/index.test.ts +++ b/src/test/index.ts @@ -1,9 +1,10 @@ -// index.ts +// test/index.ts import './lib/es2023.spec'; -import './lib/esnext.full.spec'; +import './lib/es2024.spec'; import './commonjs.spec'; +import './module.spec'; import './typescript/typescript-4.4.spec'; import './typescript/typescript-4.5.spec'; @@ -15,3 +16,4 @@ import './typescript/typescript-5.0.spec'; import './typescript/typescript-5.1.spec'; import './typescript/typescript-5.2.spec'; import './typescript/typescript-5.3.spec'; +import './typescript/typescript-5.4.spec'; diff --git a/src/test/lib/es2023.spec.ts b/src/test/lib/es2023.spec.ts index 2e5985a..e7ad8fb 100644 --- a/src/test/lib/es2023.spec.ts +++ b/src/test/lib/es2023.spec.ts @@ -1,8 +1,8 @@ -// lib/es2023.spec.ts +// test/lib/es2023.spec.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('supports es2023', () => { it('supports Array.findLastIndex (from es2023.array)', async () => { diff --git a/src/test/lib/es2024.spec.ts b/src/test/lib/es2024.spec.ts new file mode 100644 index 0000000..e9fd453 --- /dev/null +++ b/src/test/lib/es2024.spec.ts @@ -0,0 +1,66 @@ +// test/lib/es2024.spec.ts + +import { strict as assert } from 'node:assert'; + +import { describe, it } from '../describe-it'; + +(process.version < 'v21' ? describe.skip : describe)('supports es2024', () => { + // https://github.com/tc39/proposal-array-grouping + it('supports array grouping', async () => { + const objectGroupBy = Object.groupBy([0, 1, 2, 3, 4, 5], (num) => (num % 2 === 0 ? 'even' : 'odd')); + assert.deepEqual( + { ...objectGroupBy }, + { + even: [0, 2, 4], + odd: [1, 3, 5], + }, + ); + + const mapGroupBy = Map.groupBy([0, 1, 2, 3, 4, 5], (num) => (num % 2 === 0 ? 'even' : 'odd')); + assert.deepEqual(Object.fromEntries(mapGroupBy), { + even: [0, 2, 4], + odd: [1, 3, 5], + }); + }); + + // https://github.com/tc39/proposal-atomics-wait-async + it('supports Atomics.waitAsync', async () => { + assert.equal(typeof Atomics.waitAsync, 'function'); + }); + + // https://github.com/tc39/proposal-resizablearraybuffer + it('supports resizable ArrayBuffer', async () => { + // @ts-expect-error + const resizableArrayBuffer = new ArrayBuffer(1024, { maxByteLength: 1024 ** 2 }); + // @ts-expect-error + assert.equal(typeof resizableArrayBuffer.resize, 'function'); + }); + + // https://github.com/tc39/proposal-arraybuffer-transfer + it('supports ArrayBuffer.transfer', async () => { + const resizableArrayBuffer = new ArrayBuffer(1024); + // @ts-expect-error + assert.equal(typeof resizableArrayBuffer.transfer, 'function'); + }); + + // https://github.com/tc39/proposal-promise-with-resolvers + it.skip('supports Promise.withResolvers', async () => { + assert.equal(typeof Promise.withResolvers, 'function'); + }); + + // https://github.com/tc39/proposal-regexp-v-flag + it('support RegExp v flag', async () => { + // Typescript does not yet support this syntax + /* + * assert.equal(/[\p{Decimal_Number}--[0-9]]/v.test('𑜹'), true); + * assert.equal(/[\p{Decimal_Number}--[0-9]]/v.test('4'), false); + */ + }); + + it('supports well-formed Unicode strings', async () => { + // @ts-expect-error + assert.equal(typeof ''.isWellFormed, 'function'); + // @ts-expect-error + assert.equal(typeof ''.toWellFormed, 'function'); + }); +}); diff --git a/src/test/lib/esnext.full.spec.ts b/src/test/lib/esnext.full.spec.ts deleted file mode 100644 index 067173a..0000000 --- a/src/test/lib/esnext.full.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -// lib/esnext.full.spec.ts - -import { strict as assert } from 'node:assert'; - -import { describe, it } from '../../describe-it.test'; - -describe('supports esnext.full', () => { - it('should allow Headers to be iterable (from dom.iterable)', async () => { - for (const [key, value] of new Headers({ hello: 'world' })) { - assert.equal(key, 'hello'); - assert.equal(value, 'world'); - } - }); -}); diff --git a/src/test/typescript/module-directory/index.ts b/src/test/module-directory/index.ts similarity index 58% rename from src/test/typescript/module-directory/index.ts rename to src/test/module-directory/index.ts index 4b9d047..0b4aca7 100644 --- a/src/test/typescript/module-directory/index.ts +++ b/src/test/module-directory/index.ts @@ -1,3 +1,3 @@ -// module-directory/index.ts +// test/module-directory/index.ts export default () => 'module-directory-index'; diff --git a/src/test/module.spec.ts b/src/test/module.spec.ts new file mode 100644 index 0000000..944f55b --- /dev/null +++ b/src/test/module.spec.ts @@ -0,0 +1,21 @@ +// test/module.spec.ts + +import { strict as assert } from 'node:assert'; + +import { describe, it } from './describe-it'; +import moduleDefault, { test } from './module'; +import moduleDirectory from './module-directory'; + +describe('module', () => { + it('should export default correctly', () => { + assert.equal(moduleDefault(), 'export default function'); + }); + + it('should export test function correctly', () => { + assert.equal(test(), 'export function test'); + }); + + it('should work with module directories', () => { + assert.equal(moduleDirectory(), 'module-directory-index'); + }); +}); diff --git a/src/test/typescript/module.test.ts b/src/test/module.ts similarity index 87% rename from src/test/typescript/module.test.ts rename to src/test/module.ts index 969a3f5..1236586 100644 --- a/src/test/typescript/module.test.ts +++ b/src/test/module.ts @@ -1,4 +1,4 @@ -// module.ts +// test/module.ts export function test() { return 'export function test'; diff --git a/src/test/typescript/typescript-4.4.spec.ts b/src/test/typescript/typescript-4.4.spec.ts index 5f6310a..2d8e387 100644 --- a/src/test/typescript/typescript-4.4.spec.ts +++ b/src/test/typescript/typescript-4.4.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.4.ts +// test/typescript/typescript-4.4.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-4.4', () => { it('has typescript 4.4 features', () => { diff --git a/src/test/typescript/typescript-4.5.spec.ts b/src/test/typescript/typescript-4.5.spec.ts index 0d21c2b..0559fcf 100644 --- a/src/test/typescript/typescript-4.5.spec.ts +++ b/src/test/typescript/typescript-4.5.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.5.ts +// test/typescript/typescript-4.5.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; // 4.5 introduces type modifiers on import names import { ok, type AssertPredicate } from 'node:assert'; diff --git a/src/test/typescript/typescript-4.6.spec.ts b/src/test/typescript/typescript-4.6.spec.ts index d0b8361..db0e201 100644 --- a/src/test/typescript/typescript-4.6.spec.ts +++ b/src/test/typescript/typescript-4.6.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.6.ts +// test/typescript/typescript-4.6.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-4.6', () => { it('has typescript 4.6 features', () => { diff --git a/src/test/typescript/typescript-4.7.spec.ts b/src/test/typescript/typescript-4.7.spec.ts index d52d69a..a93b469 100644 --- a/src/test/typescript/typescript-4.7.spec.ts +++ b/src/test/typescript/typescript-4.7.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.7.ts +// test/typescript/typescript-4.7.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-4.7', () => { it('has typescript 4.7 features', () => { diff --git a/src/test/typescript/typescript-4.8.spec.ts b/src/test/typescript/typescript-4.8.spec.ts index 4d5e2ce..666117d 100644 --- a/src/test/typescript/typescript-4.8.spec.ts +++ b/src/test/typescript/typescript-4.8.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.8.ts +// test/typescript/typescript-4.8.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-4.8', () => { it('has typescript 4.8 features', () => { diff --git a/src/test/typescript/typescript-4.9.spec.ts b/src/test/typescript/typescript-4.9.spec.ts index f222f11..8cef60d 100644 --- a/src/test/typescript/typescript-4.9.spec.ts +++ b/src/test/typescript/typescript-4.9.spec.ts @@ -1,8 +1,8 @@ -// typescript-4.9.ts +// test/typescript/typescript-4.9.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-4.9', () => { it('has typescript 4.9 features', () => { diff --git a/src/test/typescript/typescript-5.0-esm.spec.mts b/src/test/typescript/typescript-5.0-esm.spec.mts deleted file mode 100644 index fe2864e..0000000 --- a/src/test/typescript/typescript-5.0-esm.spec.mts +++ /dev/null @@ -1,27 +0,0 @@ -// typescript-5.0-esm.spec.mts - -import { strict as assert } from 'node:assert'; - -import getPort from 'get-port'; // ESM version of get-port -import debug from 'debug'; - -describe('typescript-5.0 ESM', () => { - it('"this" is undefined', () => { - assert.ok(typeof this === 'undefined'); - }); - - it('works with CJS modules', async () => { - assert.ok(typeof debug === 'function'); - const log = debug('typescript-5.0-esm.spec.mts:test'); - assert.ok(typeof log === 'function'); - log.enabled = true; - log('hello'); - debug.enable('typescript-5.0-esm.spec.mts:test'); - assert.ok(!debug.enabled('test')); - assert.ok(debug.enabled('typescript-5.0-esm.spec.mts:test')); - }); - - it('works with ESM modules', async () => { - assert.equal(typeof (await getPort()), 'number'); - }); -}); diff --git a/src/test/typescript/typescript-5.0.spec.ts b/src/test/typescript/typescript-5.0.spec.ts index b9311bc..13d20f1 100644 --- a/src/test/typescript/typescript-5.0.spec.ts +++ b/src/test/typescript/typescript-5.0.spec.ts @@ -1,29 +1,10 @@ -// typescript-5.0.spec.ts +// test/typescript/typescript-5.0.spec.ts import { strict as assert } from 'node:assert'; -import moduleDefault, { test } from './module.test'; -import moduleDirectory from './module-directory'; - -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-5.0', () => { - it('"this" is an object', () => { - assert.ok(typeof this === 'object'); - }); - - it('should export default correctly', () => { - assert.equal(moduleDefault(), 'export default function'); - }); - - it('should export test function correctly', () => { - assert.equal(test(), 'export function test'); - }); - - it('should work with module directories', () => { - assert.equal(moduleDirectory(), 'module-directory-index'); - }); - it('supports const type parameters', async () => { type HasNames = { names: readonly string[] }; diff --git a/src/test/typescript/typescript-5.1.spec.ts b/src/test/typescript/typescript-5.1.spec.ts index 3f9252f..c01b6ff 100644 --- a/src/test/typescript/typescript-5.1.spec.ts +++ b/src/test/typescript/typescript-5.1.spec.ts @@ -1,8 +1,8 @@ -// typescript-5.1.ts +// test/typescript/typescript-5.1.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-5.1', () => { it('has easier implicit returns', () => { diff --git a/src/test/typescript/typescript-5.2.spec.ts b/src/test/typescript/typescript-5.2.spec.ts index 579ad97..0cee300 100644 --- a/src/test/typescript/typescript-5.2.spec.ts +++ b/src/test/typescript/typescript-5.2.spec.ts @@ -1,8 +1,8 @@ -// typescript-5.2.ts +// test/typescript/typescript-5.2.ts import { strict as assert } from 'node:assert'; -import { describe, it } from '../../describe-it.test'; +import { describe, it } from '../describe-it'; describe('typescript-5.2', () => { it('has explicit resource management (but not testing "using" keyword)', () => { diff --git a/src/test/typescript/typescript-5.3.spec.ts b/src/test/typescript/typescript-5.3.spec.ts index dea6a16..3f0bb9d 100644 --- a/src/test/typescript/typescript-5.3.spec.ts +++ b/src/test/typescript/typescript-5.3.spec.ts @@ -2,19 +2,14 @@ import { strict as assert } from 'node:assert'; -// This import works, but prettier does not support import assertions yet +import { describe, it } from '../describe-it'; -// import packageJson from '../../../package.json' with { type: 'json' }; - -import { describe, it } from '../../describe-it.test'; +import packageJson from '../../../package.json' with { type: 'json' }; describe('typescript-5.3', () => { it('supports import attributes', async () => { - const dynamicPackageJson = - process.version < 'v21' - ? await import('../../../package.json', { assert: { type: 'json' } }) - : await import('../../../package.json', { with: { type: 'json' } }); - // assert.deepEqual(dynamicPackageJson.default, packageJson); + const dynamicPackageJson = await import('../../../package.json', { with: { type: 'json' } }); + assert.deepEqual(dynamicPackageJson.default, packageJson); assert.equal(dynamicPackageJson.default.description, 'Check Digit standard Typescript configuration'); assert.equal(dynamicPackageJson.default.name, '@checkdigit/typescript-config'); }); diff --git a/src/test/typescript/typescript-5.4.spec.ts b/src/test/typescript/typescript-5.4.spec.ts new file mode 100644 index 0000000..90c2f25 --- /dev/null +++ b/src/test/typescript/typescript-5.4.spec.ts @@ -0,0 +1,51 @@ +// typescript/typescript-5.4.spec.ts + +import { strict as assert } from 'node:assert'; + +import { describe, it } from '../describe-it'; + +describe('typescript-5.4', () => { + it('preserved narrowing in closures following last assignments', () => { + function getUrls(url: string | URL, names: string[]) { + if (typeof url === 'string') { + url = new URL(url); + } + return names.map((name) => { + url.searchParams.set('name', name); // this is an error pre-5.4 + return url.toString(); + }); + } + assert.deepEqual(getUrls('https://example.com', ['foo', 'bar']), [ + 'https://example.com/?name=foo', + 'https://example.com/?name=bar', + ]); + }); + + it('NoInfer utility type', () => { + function createStreetLight(colors: C[], defaultColor?: NoInfer) { + return defaultColor === undefined ? undefined : colors.indexOf(defaultColor); + } + // @ts-expect-error + assert.equal(createStreetLight(['red', 'yellow', 'green'], 'blue'), -1); + }); + + it('more accurate conditional type constraints', () => { + type IsArray = T extends unknown[] ? true : false; + function foo(x: IsArray) { + // @ts-expect-error + const first: true = x; // this has been an error + // @ts-expect-error + const second: false = x; // this was not an error pre-5.4 + assert.equal(first, second); + } + foo(false); + }); + + it('improved checking against template strings with interpolations', () => { + function a() { + const x: `-${keyof T & string}` = '-id'; // this was an error pre-5.4 + return x; + } + assert.equal(a(), '-id'); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 711e8ac..32e77e3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,8 @@ "removeComments": false, "noLib": false, "noEmitOnError": false, - "skipLibCheck": true, + "skipLibCheck": false, + "types": ["node"], "strict": true, "preserveConstEnums": true, "noImplicitReturns": true,