From f9b7199897c6d1f62519a22d055cf1397cd4b888 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:53:03 +1100 Subject: [PATCH 1/2] ci: Use publish function from @tanstack/config --- .gitignore | 1 - package.json | 16 +- pnpm-lock.yaml | 588 ++++++++++++++++++++++++++++++++++++--------- scripts/publish.js | 484 +------------------------------------ scripts/types.d.ts | 36 --- 5 files changed, 478 insertions(+), 647 deletions(-) diff --git a/.gitignore b/.gitignore index d466ff61cd..b2461810f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ node_modules package-lock.json yarn.lock -pnpm-lock.yaml # builds types diff --git a/package.json b/package.json index b463ffcd74..fec2f464c7 100644 --- a/package.json +++ b/package.json @@ -37,28 +37,19 @@ }, "namespace": "@tanstack", "devDependencies": { - "@commitlint/parse": "^18.4.3", "@solidjs/testing-library": "^0.8.5", + "@tanstack/config": "^0.1.6", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^14.1.2", - "@types/current-git-branch": "^1.1.6", "@types/eslint": "^8.56.0", - "@types/git-log-parser": "^1.2.3", - "@types/jsonfile": "^6.1.4", - "@types/luxon": "^3.3.7", "@types/node": "^18.19.3", "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", - "@types/semver": "^7.5.6", - "@types/stream-to-array": "^2.3.3", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "@vitest/coverage-istanbul": "^1.1.0", - "axios": "^1.6.2", - "chalk": "^5.3.0", "cpy-cli": "^5.0.0", "cross-env": "^7.0.3", - "current-git-branch": "^1.1.0", "esbuild-plugin-file-path-extensions": "^2.0.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", @@ -66,11 +57,8 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "git-log-parser": "^1.2.0", "jsdom": "^23.0.1", - "jsonfile": "^6.1.0", "knip": "^3.3.1", - "luxon": "^3.4.4", "nx": "^17.2.7", "prettier": "^4.0.0-alpha.8", "prettier-plugin-svelte": "^3.1.2", @@ -78,10 +66,8 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "rimraf": "^5.0.5", - "semver": "^7.5.4", "sherif": "^0.7.0", "solid-js": "^1.8.7", - "stream-to-array": "^2.3.0", "tsup": "^8.0.1", "type-fest": "^4.8.3", "typescript": "5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7cde94e829..42dfadf433 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,33 +13,21 @@ importers: .: devDependencies: - '@commitlint/parse': - specifier: ^18.4.3 - version: 18.4.3 '@solidjs/testing-library': specifier: ^0.8.5 version: 0.8.5(@solidjs/router@0.10.5)(solid-js@1.8.7) + '@tanstack/config': + specifier: ^0.1.6 + version: 0.1.6(@types/node@18.19.3)(esbuild@0.19.10)(typescript@5.2.2)(vite@5.0.10) '@testing-library/jest-dom': specifier: ^6.1.5 version: 6.1.5(vitest@1.1.0) '@testing-library/react': specifier: ^14.1.2 version: 14.1.2(react-dom@18.2.0)(react@18.2.0) - '@types/current-git-branch': - specifier: ^1.1.6 - version: 1.1.6 '@types/eslint': specifier: ^8.56.0 version: 8.56.0 - '@types/git-log-parser': - specifier: ^1.2.3 - version: 1.2.3 - '@types/jsonfile': - specifier: ^6.1.4 - version: 6.1.4 - '@types/luxon': - specifier: ^3.3.7 - version: 3.3.7 '@types/node': specifier: ^18.19.3 version: 18.19.3 @@ -49,12 +37,6 @@ importers: '@types/react-dom': specifier: ^18.2.18 version: 18.2.18 - '@types/semver': - specifier: ^7.5.6 - version: 7.5.6 - '@types/stream-to-array': - specifier: ^2.3.3 - version: 2.3.3 '@typescript-eslint/eslint-plugin': specifier: ^5.62.0 version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.56.0)(typescript@5.2.2) @@ -64,21 +46,12 @@ importers: '@vitest/coverage-istanbul': specifier: ^1.1.0 version: 1.1.0(vitest@1.1.0) - axios: - specifier: ^1.6.2 - version: 1.6.2 - chalk: - specifier: ^5.3.0 - version: 5.3.0 cpy-cli: specifier: ^5.0.0 version: 5.0.0 cross-env: specifier: ^7.0.3 version: 7.0.3 - current-git-branch: - specifier: ^1.1.0 - version: 1.1.0 esbuild-plugin-file-path-extensions: specifier: ^2.0.0 version: 2.0.0 @@ -100,21 +73,12 @@ importers: eslint-plugin-react-hooks: specifier: ^4.6.0 version: 4.6.0(eslint@8.56.0) - git-log-parser: - specifier: ^1.2.0 - version: 1.2.0 jsdom: specifier: ^23.0.1 version: 23.0.1 - jsonfile: - specifier: ^6.1.0 - version: 6.1.0 knip: specifier: ^3.3.1 version: 3.3.1(typescript@5.2.2) - luxon: - specifier: ^3.4.4 - version: 3.4.4 nx: specifier: ^17.2.7 version: 17.2.7 @@ -136,18 +100,12 @@ importers: rimraf: specifier: ^5.0.5 version: 5.0.5 - semver: - specifier: ^7.5.4 - version: 7.5.4 sherif: specifier: ^0.7.0 version: 0.7.0 solid-js: specifier: ^1.8.7 version: 1.8.7 - stream-to-array: - specifier: ^2.3.0 - version: 2.3.0 tsup: specifier: ^8.0.1 version: 8.0.1(typescript@5.2.2) @@ -1508,7 +1466,7 @@ importers: version: 18.2.0(react@18.2.0) react-scripts: specifier: ^5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.5)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2) + version: 5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2) integrations/react-next: dependencies: @@ -2307,7 +2265,7 @@ packages: typescript: 5.2.2 undici: 5.27.2 vite: 4.5.1(@types/node@18.19.3)(less@4.2.0)(sass@1.69.5)(terser@5.24.0) - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-dev-middleware: 6.1.1(webpack@5.89.0) webpack-dev-server: 4.15.1(webpack@5.89.0) webpack-merge: 5.10.0 @@ -2342,7 +2300,7 @@ packages: dependencies: '@angular-devkit/architect': 0.1700.8(chokidar@3.5.3) rxjs: 7.8.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-dev-server: 4.15.1(webpack@5.89.0) transitivePeerDependencies: - chokidar @@ -7225,6 +7183,49 @@ packages: - supports-color dev: false + /@microsoft/api-extractor-model@7.28.3(@types/node@18.19.3): + resolution: {integrity: sha512-wT/kB2oDbdZXITyDh2SQLzaWwTOFbV326fP0pUwNW00WeliARs0qjmXBWmGWardEzp2U3/axkO3Lboqun6vrig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.62.0(@types/node@18.19.3) + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/api-extractor@7.39.0(@types/node@18.19.3): + resolution: {integrity: sha512-PuXxzadgnvp+wdeZFPonssRAj/EW4Gm4s75TXzPk09h3wJ8RS3x7typf95B4vwZRrPTQBGopdUl+/vHvlPdAcg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.3(@types/node@18.19.3) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.62.0(@types/node@18.19.3) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.17.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.3.3 + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/tsdoc-config@0.16.2: + resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + ajv: 6.12.6 + jju: 1.4.0 + resolve: 1.19.0 + dev: true + + /@microsoft/tsdoc@0.14.2: + resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + dev: true + /@mswjs/cookies@0.2.2: resolution: {integrity: sha512-mlN83YSrcFgk7Dm1Mys40DLssI1KdJji2CMKN8eOlBqsTADYzj2+jWzsANsUTFbxDMWPD5e9bfA1RGqBpS3O1g==} engines: {node: '>=14'} @@ -7547,7 +7548,7 @@ packages: dependencies: '@angular/compiler-cli': 17.0.8(@angular/compiler@17.0.8)(typescript@5.2.2) typescript: 5.2.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1: @@ -8004,7 +8005,7 @@ packages: schema-utils: 3.3.0 source-map: 0.7.4 type-fest: 4.8.3 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-dev-server: 4.15.1(webpack@5.89.0) dev: false @@ -8710,7 +8711,6 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 rollup: 4.6.0 - dev: false /@rollup/rollup-android-arm-eabi@4.6.0: resolution: {integrity: sha512-keHkkWAe7OtdALGoutLY3utvthkGF+Y17ws9LYT8pxMBYXaCoH/8dXS2uzo6e8+sEhY7y/zi5RFo22Dy2lFpDw==} @@ -8808,6 +8808,40 @@ packages: resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==} dev: false + /@rushstack/node-core-library@3.62.0(@types/node@18.19.3): + resolution: {integrity: sha512-88aJn2h8UpSvdwuDXBv1/v1heM6GnBf3RjEy6ZPP7UnzHNCqOHA2Ut+ScYUbXcqIdfew9JlTAe3g+cnX9xQ/Aw==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 18.19.3 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + z-schema: 5.0.5 + dev: true + + /@rushstack/rig-package@0.5.1: + resolution: {integrity: sha512-pXRYSe29TjRw7rqxD4WS3HN/sRSbfr+tJs4a9uuaSIBAITbUggygdhuG0VrO0EO+QqH91GhYMN4S6KRtOEmGVA==} + dependencies: + resolve: 1.22.8 + strip-json-comments: 3.1.1 + dev: true + + /@rushstack/ts-command-line@4.17.1: + resolution: {integrity: sha512-2jweO1O57BYP5qdBGl6apJLB+aRIn5ccIRTPDyULh0KMwVzFqWtw6IZWt1qtUoZD/pD2RNkIOosH6Cq45rIYeg==} + dependencies: + '@types/argparse': 1.0.38 + argparse: 1.0.10 + colors: 1.2.5 + string-argv: 0.3.2 + dev: true + /@schematics/angular@17.0.8: resolution: {integrity: sha512-1h5mwKFv1B/L5JWZ0mxnC4ms06iwnSi/w+GgRZPeM3P5BpuZuvAkFiClNnM55iLlQJXRQioPNLM3sOsz7spR6w==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -9314,6 +9348,36 @@ packages: tslib: 2.6.2 dev: true + /@tanstack/config@0.1.6(@types/node@18.19.3)(esbuild@0.19.10)(typescript@5.2.2)(vite@5.0.10): + resolution: {integrity: sha512-QNyg/wawvs/idXFdECbHfyDC3TZ8nznrM/Zz75J41+YU1TUcBy7QZvjVw2NT97SPsKvnoXxWJjg/YPzxn9p1ZQ==} + engines: {node: '>=18'} + hasBin: true + dependencies: + '@commitlint/parse': 18.4.3 + chalk: 5.3.0 + commander: 11.1.0 + current-git-branch: 1.1.0 + esbuild-register: 3.5.0(esbuild@0.19.10) + git-log-parser: 1.2.0 + interpret: 3.1.1 + jsonfile: 6.1.0 + liftoff: 4.0.0 + luxon: 3.4.4 + minimist: 1.2.8 + semver: 7.5.4 + stream-to-array: 2.3.0 + v8flags: 4.0.1 + vite-plugin-dts: 3.7.0(@types/node@18.19.3)(typescript@5.2.2)(vite@5.0.10) + vite-plugin-externalize-deps: 0.8.0(vite@5.0.10) + transitivePeerDependencies: + - '@types/node' + - esbuild + - rollup + - supports-color + - typescript + - vite + dev: true + /@tanstack/match-sorter-utils@8.8.4: resolution: {integrity: sha512-rKH8LjZiszWEvmi01NR72QWZ8m4xmXre0OOwlRGnjU01Eqz/QnN+cqpty2PJ0efHblq09+KilvyR7lsbzmXVEw==} engines: {node: '>=12'} @@ -9427,6 +9491,10 @@ packages: minimatch: 9.0.3 dev: true + /@types/argparse@1.0.38: + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + dev: true + /@types/aria-query@5.0.3: resolution: {integrity: sha512-0Z6Tr7wjKJIk4OUEjVUQMtyunLDy339vcMaj38Kpj6jM2OE1p3S4kXExKZ7a3uXQAPCoy3sbrP1wibDKaf39oA==} dev: true @@ -9495,10 +9563,6 @@ packages: '@types/node': 18.19.3 dev: true - /@types/current-git-branch@1.1.6: - resolution: {integrity: sha512-zXG02ZIQ98r/+ARpow/yx54GYie7yeDKPJUJq5eFe6FwiYjR3TK5To08zuZgcF90QjG0Z5sdD5hxHBVB93b5Kg==} - dev: true - /@types/debug@4.1.10: resolution: {integrity: sha512-tOSCru6s732pofZ+sMv9o4o3Zc+Sa8l3bxd/tweTQudFn06vAzb13ZX46Zi6m6EJ+RUbRTHvgQJ1gBtSgkaUYA==} dependencies: @@ -9547,12 +9611,6 @@ packages: '@types/qs': 6.9.9 '@types/serve-static': 1.15.4 - /@types/git-log-parser@1.2.3: - resolution: {integrity: sha512-T+qpPYiSfsDhldenqLNL17bNluhAJr+3zgXeuGHys1XYeKja/sr33TRNXhfoQDLL3DbWxXLe5F/Uj2ViLjp5Lw==} - dependencies: - '@types/node': 18.19.3 - dev: true - /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: @@ -9622,16 +9680,6 @@ packages: /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - /@types/jsonfile@6.1.4: - resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - dependencies: - '@types/node': 18.19.3 - dev: true - - /@types/luxon@3.3.7: - resolution: {integrity: sha512-gKc9P2d4g5uYwmy4s/MO/yOVPmvHyvzka1YH6i5dM03UrFofHSmgc0D0ymbDRStFWHusk6cwwF6nhLm/ckBbbQ==} - dev: true - /@types/micromatch@4.0.6: resolution: {integrity: sha512-2eulCHWqjEpk9/vyic4tBhI8a9qQEl6DaK2n/sF7TweX9YESlypgKyhXMDGt4DAOy/jhLPvVrZc8pTDAMsplJA==} dependencies: @@ -9778,12 +9826,6 @@ packages: /@types/stack-utils@2.0.2: resolution: {integrity: sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==} - /@types/stream-to-array@2.3.3: - resolution: {integrity: sha512-fWXKc6enNlT2l0nXZcxHNQvNSg9IIBgHQR1bHfAVjcJD+zlx9F0o6W+qGWerB1eGBszV4+dsge3id4PEp6SptA==} - dependencies: - '@types/node': 18.19.3 - dev: true - /@types/tapable@1.0.10: resolution: {integrity: sha512-q8F20SdXG5fdVJQ5yxsVlH+f+oekP42QeHv4s5KlrxTMT0eopXn7ol1rhxMcksf8ph7XNv811iVDE2hOpUvEPg==} dev: false @@ -11163,6 +11205,11 @@ packages: call-bind: 1.0.2 is-array-buffer: 3.0.2 + /array-each@1.0.1: + resolution: {integrity: sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==} + engines: {node: '>=0.10.0'} + dev: true + /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} @@ -11190,6 +11237,11 @@ packages: is-number: 4.0.0 dev: true + /array-slice@1.1.0: + resolution: {integrity: sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==} + engines: {node: '>=0.10.0'} + dev: true + /array-union@1.0.2: resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} engines: {node: '>=0.10.0'} @@ -11596,7 +11648,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /babel-loader@9.1.3(@babel/core@7.23.2)(webpack@5.89.0): @@ -11609,7 +11661,7 @@ packages: '@babel/core': 7.23.2 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /babel-plugin-add-module-exports@0.2.1: @@ -13043,6 +13095,11 @@ packages: /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + /colors@1.2.5: + resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} + engines: {node: '>=0.1.90'} + dev: true + /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -13318,7 +13375,7 @@ packages: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /core-js-compat@3.33.0: @@ -13659,9 +13716,9 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.32) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) - /css-minimizer-webpack-plugin@3.4.1(esbuild@0.19.5)(webpack@5.89.0): + /css-minimizer-webpack-plugin@3.4.1(esbuild@0.19.10)(webpack@5.89.0): resolution: {integrity: sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -13681,13 +13738,13 @@ packages: optional: true dependencies: cssnano: 5.1.15(postcss@8.4.32) - esbuild: 0.19.5 + esbuild: 0.19.10 jest-worker: 27.5.1 postcss: 8.4.32 schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /css-prefers-color-scheme@3.1.1: @@ -14339,6 +14396,11 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + /detect-file@1.0.0: + resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} + engines: {node: '>=0.10.0'} + dev: true + /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -15021,6 +15083,17 @@ packages: - supports-color dev: true + /esbuild-register@3.5.0(esbuild@0.19.10): + resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + debug: 4.3.4(supports-color@6.1.0) + esbuild: 0.19.10 + transitivePeerDependencies: + - supports-color + dev: true + /esbuild-wasm@0.19.5: resolution: {integrity: sha512-7zmLLn2QCj93XfMmHtzrDJ1UBuOHB2CZz1ghoCEZiRajxjUvHsF40PnbzFIY/pmesqPRaEtEWii0uzsTbnAgrA==} engines: {node: '>=12'} @@ -15616,7 +15689,7 @@ packages: micromatch: 4.0.5 normalize-path: 3.0.0 schema-utils: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /eslint@8.56.0: @@ -15870,6 +15943,13 @@ packages: - supports-color dev: false + /expand-tilde@2.0.2: + resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} + engines: {node: '>=0.10.0'} + dependencies: + homedir-polyfill: 1.0.3 + dev: true + /expect@26.6.2: resolution: {integrity: sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==} engines: {node: '>= 10.14.2'} @@ -16074,6 +16154,10 @@ packages: is-extendable: 1.0.1 dev: false + /extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + dev: true + /external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -16259,7 +16343,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /file-uri-to-path@1.0.0: @@ -16424,6 +16508,32 @@ packages: micromatch: 4.0.5 dev: false + /findup-sync@5.0.0: + resolution: {integrity: sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==} + engines: {node: '>= 10.13.0'} + dependencies: + detect-file: 1.0.0 + is-glob: 4.0.3 + micromatch: 4.0.5 + resolve-dir: 1.0.1 + dev: true + + /fined@2.0.0: + resolution: {integrity: sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==} + engines: {node: '>= 10.13.0'} + dependencies: + expand-tilde: 2.0.2 + is-plain-object: 5.0.0 + object.defaults: 1.1.0 + object.pick: 1.3.0 + parse-filepath: 1.0.2 + dev: true + + /flagged-respawn@2.0.0: + resolution: {integrity: sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==} + engines: {node: '>= 10.13.0'} + dev: true + /flat-cache@3.1.1: resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} engines: {node: '>=12.0.0'} @@ -16502,7 +16612,13 @@ packages: /for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} - dev: false + + /for-own@1.0.0: + resolution: {integrity: sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==} + engines: {node: '>=0.10.0'} + dependencies: + for-in: 1.0.2 + dev: true /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} @@ -16569,7 +16685,7 @@ packages: semver: 7.5.4 tapable: 1.1.3 typescript: 5.2.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /form-data@3.0.1: @@ -16670,7 +16786,6 @@ packages: graceful-fs: 4.2.11 jsonfile: 4.0.0 universalify: 0.1.2 - dev: false /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} @@ -16985,6 +17100,15 @@ packages: minimatch: 5.1.6 once: 1.4.0 + /global-modules@1.0.0: + resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} + engines: {node: '>=0.10.0'} + dependencies: + global-prefix: 1.0.2 + is-windows: 1.0.2 + resolve-dir: 1.0.1 + dev: true + /global-modules@2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} engines: {node: '>=6'} @@ -16992,6 +17116,17 @@ packages: global-prefix: 3.0.0 dev: false + /global-prefix@1.0.2: + resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} + engines: {node: '>=0.10.0'} + dependencies: + expand-tilde: 2.0.2 + homedir-polyfill: 1.0.3 + ini: 1.3.8 + is-windows: 1.0.2 + which: 1.3.1 + dev: true + /global-prefix@3.0.0: resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} engines: {node: '>=6'} @@ -17334,6 +17469,13 @@ packages: react-is: 16.13.1 dev: false + /homedir-polyfill@1.0.3: + resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} + engines: {node: '>=0.10.0'} + dependencies: + parse-passwd: 1.0.0 + dev: true + /hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} dev: false @@ -17468,7 +17610,7 @@ packages: lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /htmlparser2@6.1.0: @@ -17772,6 +17914,11 @@ packages: resolve-from: 3.0.0 dev: false + /import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + dev: true + /import-local@2.0.0: resolution: {integrity: sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==} engines: {node: '>=6'} @@ -17837,7 +17984,6 @@ packages: /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - dev: false /ini@4.1.1: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} @@ -17915,6 +18061,11 @@ packages: has: 1.0.4 side-channel: 1.0.4 + /interpret@3.1.1: + resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} + engines: {node: '>=10.13.0'} + dev: true + /intl-messageformat@10.5.4: resolution: {integrity: sha512-z+hrFdiJ/heRYlzegrdFYqU1m/KOMOVMqNilIArj+PbsuU8TNE7v4TWdQgSoxlxbT4AcZH3Op3/Fu15QTp+W1w==} dependencies: @@ -17984,6 +18135,14 @@ packages: engines: {node: '>=8'} dev: false + /is-absolute@1.0.0: + resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==} + engines: {node: '>=0.10.0'} + dependencies: + is-relative: 1.0.0 + is-windows: 1.0.2 + dev: true + /is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} @@ -18345,6 +18504,11 @@ packages: dependencies: isobject: 3.0.1 + /is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + dev: true + /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -18381,6 +18545,13 @@ packages: engines: {node: '>=0.10.0'} dev: false + /is-relative@1.0.0: + resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==} + engines: {node: '>=0.10.0'} + dependencies: + is-unc-path: 1.0.0 + dev: true + /is-resolvable@1.1.0: resolution: {integrity: sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==} dev: false @@ -18439,6 +18610,13 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: false + /is-unc-path@1.0.0: + resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} + engines: {node: '>=0.10.0'} + dependencies: + unc-path-regex: 0.1.2 + dev: true + /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} @@ -18479,7 +18657,6 @@ packages: /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} - dev: false /is-wsl@1.1.0: resolution: {integrity: sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==} @@ -19755,6 +19932,10 @@ packages: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true + /jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + dev: true + /joi@17.11.0: resolution: {integrity: sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==} dependencies: @@ -20216,6 +20397,10 @@ packages: resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==} dev: true + /kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + dev: true + /ky@1.1.3: resolution: {integrity: sha512-t7q8sJfazzHbfYxiCtuLIH4P+pWoCgunDll17O/GBZBqMt2vHjGSx5HzSxhOc2BDEg3YN/EmeA7VKrHnwuWDag==} engines: {node: '>=18'} @@ -20260,7 +20445,7 @@ packages: dependencies: klona: 2.0.6 less: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /less@4.2.0: @@ -20311,7 +20496,7 @@ packages: webpack-sources: optional: true dependencies: - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-sources: 3.2.3 dev: true @@ -20321,6 +20506,20 @@ packages: immediate: 3.0.6 dev: false + /liftoff@4.0.0: + resolution: {integrity: sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==} + engines: {node: '>=10.13.0'} + dependencies: + extend: 3.0.2 + findup-sync: 5.0.0 + fined: 2.0.0 + flagged-respawn: 2.0.0 + is-plain-object: 5.0.0 + object.map: 1.0.1 + rechoir: 0.8.0 + resolve: 1.22.8 + dev: true + /lightningcss-darwin-arm64@1.19.0: resolution: {integrity: sha512-wIJmFtYX0rXHsXHSr4+sC5clwblEMji7HHQ4Ub1/CznVRxtCFha6JIt5JZaNf8vQrfdZnBxLLC6R8pC818jXqg==} engines: {node: '>= 12.0.0'} @@ -20572,10 +20771,18 @@ packages: resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} dev: false + /lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + dev: true + /lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} dev: false + /lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + dev: true + /lodash.isfinite@3.3.2: resolution: {integrity: sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==} dev: true @@ -20767,6 +20974,13 @@ packages: - supports-color dev: true + /make-iterator@1.0.1: + resolution: {integrity: sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==} + engines: {node: '>=0.10.0'} + dependencies: + kind-of: 6.0.3 + dev: true + /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} dependencies: @@ -20782,7 +20996,6 @@ packages: /map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} - dev: false /map-obj@2.0.0: resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} @@ -21337,7 +21550,7 @@ packages: webpack: ^5.0.0 dependencies: schema-utils: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -22429,6 +22642,16 @@ packages: has-symbols: 1.0.3 object-keys: 1.1.1 + /object.defaults@1.1.0: + resolution: {integrity: sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==} + engines: {node: '>=0.10.0'} + dependencies: + array-each: 1.0.1 + array-slice: 1.1.0 + for-own: 1.0.0 + isobject: 3.0.1 + dev: true + /object.entries@1.1.7: resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==} engines: {node: '>= 0.4'} @@ -22470,12 +22693,19 @@ packages: define-properties: 1.2.1 es-abstract: 1.22.2 + /object.map@1.0.1: + resolution: {integrity: sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==} + engines: {node: '>=0.10.0'} + dependencies: + for-own: 1.0.0 + make-iterator: 1.0.1 + dev: true + /object.pick@1.3.0: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 - dev: false /object.values@1.1.7: resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} @@ -22900,6 +23130,15 @@ packages: safe-buffer: 5.2.1 dev: false + /parse-filepath@1.0.2: + resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==} + engines: {node: '>=0.8'} + dependencies: + is-absolute: 1.0.0 + map-cache: 0.2.2 + path-root: 0.1.1 + dev: true + /parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -22932,6 +23171,11 @@ packages: semver: 6.3.1 dev: true + /parse-passwd@1.0.0: + resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} + engines: {node: '>=0.10.0'} + dev: true + /parse-png@2.1.0: resolution: {integrity: sha512-Nt/a5SfCLiTnQAjx3fHlqp8hRgTL3z7kTQZzvIMS9uCAepnCyjpdEc6M/sz69WqMBdaDBw9sF1F1UaHROYzGkQ==} engines: {node: '>=10'} @@ -23032,6 +23276,18 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + /path-root-regex@0.1.2: + resolution: {integrity: sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==} + engines: {node: '>=0.10.0'} + dev: true + + /path-root@0.1.1: + resolution: {integrity: sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==} + engines: {node: '>=0.10.0'} + dependencies: + path-root-regex: 0.1.2 + dev: true + /path-scurry@1.10.1: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} @@ -23806,7 +24062,7 @@ packages: klona: 2.0.6 postcss: 8.4.32 semver: 7.5.4 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /postcss-loader@7.3.3(postcss@8.4.31)(typescript@5.2.2)(webpack@5.89.0): @@ -23820,7 +24076,7 @@ packages: jiti: 1.21.0 postcss: 8.4.31 semver: 7.5.4 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) transitivePeerDependencies: - typescript dev: true @@ -25184,7 +25440,7 @@ packages: strip-ansi: 6.0.1 text-table: 0.2.0 typescript: 5.2.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) transitivePeerDependencies: - eslint - supports-color @@ -25558,7 +25814,7 @@ packages: - webpack-plugin-serve dev: false - /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.5)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2): + /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2): resolution: {integrity: sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==} engines: {node: '>=14.0.0'} hasBin: true @@ -25582,7 +25838,7 @@ packages: camelcase: 6.3.0 case-sensitive-paths-webpack-plugin: 2.4.0 css-loader: 6.8.1(webpack@5.89.0) - css-minimizer-webpack-plugin: 3.4.1(esbuild@0.19.5)(webpack@5.89.0) + css-minimizer-webpack-plugin: 3.4.1(esbuild@0.19.10)(webpack@5.89.0) dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.56.0 @@ -25613,9 +25869,9 @@ packages: source-map-loader: 3.0.2(webpack@5.89.0) style-loader: 3.3.3(webpack@5.89.0) tailwindcss: 3.4.0 - terser-webpack-plugin: 5.3.9(esbuild@0.19.5)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(esbuild@0.19.10)(webpack@5.89.0) typescript: 5.2.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-dev-server: 4.15.1(webpack@5.89.0) webpack-manifest-plugin: 4.1.1(webpack@5.89.0) workbox-webpack-plugin: 6.6.0(webpack@5.89.0) @@ -25800,6 +26056,13 @@ packages: source-map: 0.6.1 tslib: 2.6.2 + /rechoir@0.8.0: + resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} + engines: {node: '>= 10.13.0'} + dependencies: + resolve: 1.22.8 + dev: true + /recursive-readdir@2.2.2: resolution: {integrity: sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==} engines: {node: '>=0.10.0'} @@ -26004,6 +26267,14 @@ packages: resolve-from: 5.0.0 dev: false + /resolve-dir@1.0.1: + resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} + engines: {node: '>=0.10.0'} + dependencies: + expand-tilde: 2.0.2 + global-modules: 1.0.0 + dev: true + /resolve-from@3.0.0: resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} engines: {node: '>=4'} @@ -26082,6 +26353,13 @@ packages: path-parse: 1.0.7 dev: false + /resolve@1.19.0: + resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + dev: true + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -26512,7 +26790,7 @@ packages: dependencies: klona: 2.0.6 neo-async: 2.6.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /sass-loader@13.3.2(sass@1.69.5)(webpack@5.89.0): @@ -26536,7 +26814,7 @@ packages: dependencies: neo-async: 2.6.2 sass: 1.69.5 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /sass@1.69.5: @@ -27234,7 +27512,7 @@ packages: abab: 2.0.6 iconv-lite: 0.6.3 source-map-js: 1.0.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /source-map-loader@4.0.1(webpack@5.89.0): @@ -27246,7 +27524,7 @@ packages: abab: 2.0.6 iconv-lite: 0.6.3 source-map-js: 1.0.2 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /source-map-resolve@0.5.3: @@ -27570,6 +27848,11 @@ packages: engines: {node: '>=4'} dev: false + /string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + dev: true + /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -27802,7 +28085,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: false /styled-jsx@5.1.1(@babel/core@7.23.6)(react@18.2.0): @@ -28266,7 +28549,7 @@ packages: - bluebird dev: false - /terser-webpack-plugin@5.3.9(esbuild@0.19.5)(webpack@5.89.0): + /terser-webpack-plugin@5.3.9(esbuild@0.19.10)(webpack@5.89.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -28283,12 +28566,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.20 - esbuild: 0.19.5 + esbuild: 0.19.10 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.24.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) /terser@4.8.1: resolution: {integrity: sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==} @@ -28865,6 +29148,12 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /ua-parser-js@1.0.36: resolution: {integrity: sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==} @@ -28892,6 +29181,11 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + /unc-path-regex@0.1.2: + resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} + engines: {node: '>=0.10.0'} + dev: true + /uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} dev: false @@ -29339,6 +29633,11 @@ packages: source-map: 0.7.4 dev: false + /v8flags@4.0.1: + resolution: {integrity: sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==} + engines: {node: '>= 10.13.0'} + dev: true + /valid-url@1.0.9: resolution: {integrity: sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==} dev: false @@ -29372,6 +29671,11 @@ packages: builtins: 5.0.1 dev: true + /validator@13.11.0: + resolution: {integrity: sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==} + engines: {node: '>= 0.10'} + dev: true + /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -29484,6 +29788,38 @@ packages: - terser dev: true + /vite-plugin-dts@3.7.0(@types/node@18.19.3)(typescript@5.2.2)(vite@5.0.10): + resolution: {integrity: sha512-np1uPaYzu98AtPReB8zkMnbjwcNHOABsLhqVOf81b3ol9b5M2wPcAVs8oqPnOpr6Us+7yDXVauwkxsk5+ldmRA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + typescript: '*' + vite: '*' + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@microsoft/api-extractor': 7.39.0(@types/node@18.19.3) + '@rollup/pluginutils': 5.1.0(rollup@4.6.0) + '@vue/language-core': 1.8.26(typescript@5.2.2) + debug: 4.3.4(supports-color@6.1.0) + kolorist: 1.8.0 + typescript: 5.2.2 + vite: 5.0.10(@types/node@18.19.3) + vue-tsc: 1.8.26(typescript@5.2.2) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + dev: true + + /vite-plugin-externalize-deps@0.8.0(vite@5.0.10): + resolution: {integrity: sha512-MdC8kRNQ1ZjhUicU2HcqGVhL0UUFqv83Zp1JZdHjE82PoPR8wsSWZ3axpot7B6img3sW6g8shYJikE0CKA0chA==} + peerDependencies: + vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + dependencies: + vite: 5.0.10(@types/node@18.19.3) + dev: true + /vite-plugin-inspect@0.7.40(vite@4.5.0): resolution: {integrity: sha512-tsfva6MCg0ch6ckReWHvJ/9xf/zjTuJvakONf2qcMBB/iu9JqiRixfxMa/yLGrlNaBe6fUZHOVhtN2Me3Kthow==} engines: {node: '>=14'} @@ -29951,7 +30287,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) /webpack-dev-middleware@6.1.1(webpack@5.89.0): resolution: {integrity: sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==} @@ -29967,7 +30303,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /webpack-dev-server@3.11.1(webpack@4.44.2): @@ -30061,7 +30397,7 @@ packages: serve-index: 1.9.1(supports-color@6.1.0) sockjs: 0.3.24 spdy: 4.0.2(supports-color@6.1.0) - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-dev-middleware: 5.3.3(webpack@5.89.0) ws: 8.14.2 transitivePeerDependencies: @@ -30098,7 +30434,7 @@ packages: webpack: ^4.44.2 || ^5.47.0 dependencies: tapable: 2.2.1 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-sources: 2.3.1 dev: false @@ -30141,7 +30477,7 @@ packages: optional: true dependencies: typed-assert: 1.0.9 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) dev: true /webpack-virtual-modules@0.6.1: @@ -30188,7 +30524,7 @@ packages: - supports-color dev: false - /webpack@5.89.0(esbuild@0.19.5): + /webpack@5.89.0(esbuild@0.19.10): resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} hasBin: true @@ -30219,7 +30555,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(esbuild@0.19.5)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(esbuild@0.19.10)(webpack@5.89.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -30694,7 +31030,7 @@ packages: fast-json-stable-stringify: 2.1.0 pretty-bytes: 5.6.0 upath: 1.2.0 - webpack: 5.89.0(esbuild@0.19.5) + webpack: 5.89.0(esbuild@0.19.10) webpack-sources: 1.4.3 workbox-build: 6.6.0 transitivePeerDependencies: @@ -31014,6 +31350,18 @@ packages: engines: {node: '>=12.20'} dev: true + /z-schema@5.0.5: + resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + lodash.get: 4.4.2 + lodash.isequal: 4.5.0 + validator: 13.11.0 + optionalDependencies: + commander: 9.5.0 + dev: true + /zeptomatch@1.2.2: resolution: {integrity: sha512-0ETdzEO0hdYmT8aXHHf5aMjpX+FHFE61sG4qKFAoJD2Umt3TWdCmH7ADxn2oUiWTlqBGC+SGr8sYMfr+37J8pQ==} dependencies: diff --git a/scripts/publish.js b/scripts/publish.js index c1c5a2d880..9d3288b65a 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -1,482 +1,16 @@ // @ts-check -// Originally ported to TS from https://github.com/remix-run/react-router/tree/main/scripts/{version,publish}.js -import path from 'node:path' -import { execSync } from 'node:child_process' -import chalk from 'chalk' -import jsonfile from 'jsonfile' -import * as semver from 'semver' -import currentGitBranch from 'current-git-branch' -import { parse as parseCommit } from '@commitlint/parse' -import log from 'git-log-parser' -import streamToArray from 'stream-to-array' -import axios from 'axios' -import { DateTime } from 'luxon' +import { publish } from '@tanstack/config/publish' import { branchConfigs, packages, rootDir } from './config.js' -/** @param {string} version */ -const releaseCommitMsg = (version) => `release: v${version}` - -async function run() { - const branchName = /** @type {string} */ ( - process.env.BRANCH ?? currentGitBranch() - ) - /** @type {import('./types.js').BranchConfig | undefined} */ - const branchConfig = branchConfigs[branchName] - - const isMainBranch = branchName === 'main' - const isPreviousRelease = branchConfig?.previousVersion - const npmTag = isMainBranch ? 'latest' : branchName - - // Get tags - /** @type {string[]} */ - let tags = execSync('git tag').toString().split('\n') - - // Filter tags to our branch/pre-release combo - tags = tags - .filter((tag) => semver.valid(tag)) - .filter((tag) => { - // If this is an older release, filter to only include that version - if (isPreviousRelease) { - return tag.startsWith(branchName) - } - if (semver.prerelease(tag) === null) { - return isMainBranch - } else { - return !isMainBranch - } - }) - // sort by latest - .sort(semver.compare) - - // Get the latest tag - let latestTag = /** @type {string} */ ([...tags].pop()) - - let range = `${latestTag}..HEAD` - // let range = ``; - - // If RELEASE_ALL is set via a commit subject or body, all packages will be - // released regardless if they have changed files matching the package srcDir. - let RELEASE_ALL = false - - if (!latestTag || process.env.TAG) { - if (process.env.TAG) { - if (!process.env.TAG.startsWith('v')) { - throw new Error( - `process.env.TAG must start with "v", eg. v0.0.0. You supplied ${process.env.TAG}`, - ) - } - console.info( - chalk.yellow( - `Tag is set to ${process.env.TAG}. This will force release all packages. Publishing...`, - ), - ) - RELEASE_ALL = true - - // Is it a major version? - if (!semver.patch(process.env.TAG) && !semver.minor(process.env.TAG)) { - range = `origin/main..HEAD` - latestTag = process.env.TAG - } - } else { - throw new Error( - 'Could not find latest tag! To make a release tag of v0.0.1, run with TAG=v0.0.1', - ) - } - } - - console.info(`Git Range: ${range}`) - - /** - * Get the commits since the latest tag - * @type {import('./types.js').Commit[]} - */ - const commitsSinceLatestTag = ( - await new Promise((resolve, reject) => { - /** @type {NodeJS.ReadableStream} */ - const strm = log.parse({ - _: range, - }) - - streamToArray(strm, function (err, arr) { - if (err) return reject(err) - - Promise.all( - arr.map(async (d) => { - const parsed = await parseCommit(d.subject) - - return { ...d, parsed } - }), - ).then((res) => resolve(res.filter(Boolean))) - }) - }) - ).filter((/** @type {import('./types.js').Commit} */ commit) => { - const exclude = [ - commit.subject.startsWith('Merge branch '), // No merge commits - commit.subject.startsWith(releaseCommitMsg('')), // No example update commits - ].some(Boolean) - - return !exclude - }) - - console.info( - `Parsing ${commitsSinceLatestTag.length} commits since ${latestTag}...`, - ) - - /** - * Parses the commit messsages, log them, and determine the type of release needed - * -1 means no release is necessary - * 0 means patch release is necessary - * 1 means minor release is necessary - * 2 means major release is necessary - * @type {number} - */ - let recommendedReleaseLevel = commitsSinceLatestTag.reduce( - (releaseLevel, commit) => { - if (commit.parsed.type) { - if (['fix', 'refactor', 'perf'].includes(commit.parsed.type)) { - releaseLevel = Math.max(releaseLevel, 0) - } - if (['feat'].includes(commit.parsed.type)) { - releaseLevel = Math.max(releaseLevel, 1) - } - if (commit.body.includes('BREAKING CHANGE')) { - releaseLevel = Math.max(releaseLevel, 2) - } - if ( - commit.subject.includes('RELEASE_ALL') || - commit.body.includes('RELEASE_ALL') - ) { - RELEASE_ALL = true - } - } - - return releaseLevel - }, - -1, - ) - - /** - * Uses git diff to determine which files have changed since the latest tag - * @type {string[]} - */ - const changedFiles = process.env.TAG - ? [] - : execSync(`git diff ${latestTag} --name-only`) - .toString() - .split('\n') - .filter(Boolean) - - /** Uses packages and changedFiles to determine which packages have changed */ - const changedPackages = RELEASE_ALL - ? packages - : packages.filter((pkg) => { - const changed = changedFiles.some( - (file) => - file.startsWith(path.join(pkg.packageDir, 'src')) || - file.startsWith(path.join(pkg.packageDir, 'package.json')), - ) - return changed - }) - - // If a package has a dependency that has been updated, we need to update the - // package that depends on it as well. - // run this multiple times so that dependencies of dependencies are also included - // changes to query-core affect query-persist-client-core, which affects react-query-persist-client and then indirectly the sync/async persisters - for (let runs = 0; runs < 3; runs++) { - for (const pkg of packages) { - const packageJson = await readPackageJson( - path.resolve(rootDir, pkg.packageDir, 'package.json'), - ) - const allDependencies = Object.keys( - Object.assign( - {}, - packageJson.dependencies ?? {}, - packageJson.peerDependencies ?? {}, - ), - ) - - if ( - allDependencies.find((dep) => - changedPackages.find((d) => d.name === dep), - ) && - !changedPackages.find((d) => d.name === pkg.name) - ) { - console.info( - 'adding package dependency', - pkg.name, - 'to changed packages', - ) - changedPackages.push(pkg) - } - } - } - - if (!process.env.TAG) { - if (recommendedReleaseLevel === 2) { - console.info( - `Major versions releases must be tagged and released manually.`, - ) - return - } - - if (recommendedReleaseLevel === -1) { - console.info( - `There have been no changes since the release of ${latestTag} that require a new version. You're good!`, - ) - return - } - } - - const changelogCommitsMd = process.env.TAG - ? `Manual Release: ${process.env.TAG}` - : await Promise.all( - Object.entries( - commitsSinceLatestTag.reduce((acc, next) => { - const type = next.parsed.type?.toLowerCase() ?? 'other' - - return { - ...acc, - [type]: [...(acc[type] || []), next], - } - }, /** @type {Record} */ ({})), - ) - .sort( - getSorterFn([ - ([d]) => - [ - 'other', - 'examples', - 'docs', - 'chore', - 'refactor', - 'perf', - 'fix', - 'feat', - ].indexOf(d), - ]), - ) - .reverse() - .map(async ([type, commits]) => { - return Promise.all( - commits.map(async (commit) => { - let username = '' - - if (process.env.GH_TOKEN) { - const query = `${ - commit.author.email || commit.committer.email - }` - - const res = await axios.get( - 'https://api.github.com/search/users', - { - params: { - q: query, - }, - headers: { - Authorization: `token ${process.env.GH_TOKEN}`, - }, - }, - ) - - username = res.data.items[0]?.login - } - - const scope = commit.parsed.scope - ? `${commit.parsed.scope}: ` - : '' - const subject = commit.parsed.subject || commit.subject - - return `- ${scope}${subject} (${commit.commit.short}) ${ - username - ? `by @${username}` - : `by ${commit.author.name || commit.author.email}` - }` - }), - ).then((c) => /** @type {const} */ ([type, c])) - }), - ).then((groups) => { - return groups - .map(([type, commits]) => { - return [`### ${capitalize(type)}`, commits.join('\n')].join('\n\n') - }) - .join('\n\n') - }) - - if (process.env.TAG && recommendedReleaseLevel === -1) { - recommendedReleaseLevel = 0 - } - - if (!branchConfig) { - console.log(`No publish config found for branch: ${branchName}`) - console.log('Exiting...') - process.exit(0) - } - - const releaseType = branchConfig.prerelease - ? 'prerelease' - : /** @type {const} */ ({ 0: 'patch', 1: 'minor', 2: 'major' })[ - recommendedReleaseLevel - ] - - if (!releaseType) { - throw new Error(`Invalid release level: ${recommendedReleaseLevel}`) - } - - const version = process.env.TAG - ? semver.parse(process.env.TAG)?.version - : semver.inc(latestTag, releaseType, npmTag) - - if (!version) { - throw new Error( - `Invalid version increment from semver.inc(${[ - latestTag, - recommendedReleaseLevel, - branchConfig.prerelease, - ].join(', ')}`, - ) - } - - const changelogMd = [ - `Version ${version} - ${DateTime.now().toLocaleString( - DateTime.DATETIME_SHORT, - )}`, - `## Changes`, - changelogCommitsMd, - `## Packages`, - changedPackages.map((d) => `- ${d.name}@${version}`).join('\n'), - ].join('\n\n') - - console.info('Generating changelog...') - console.info() - console.info(changelogMd) - console.info() - - if (changedPackages.length === 0) { - console.info('No packages have been affected.') - return - } - - console.info(`Updating all changed packages to version ${version}...`) - // Update each package to the new version - for (const pkg of changedPackages) { - console.info(` Updating ${pkg.name} version to ${version}...`) - - await updatePackageJson( - path.resolve(rootDir, pkg.packageDir, 'package.json'), - (config) => { - config.version = version - }, - ) - } - - if (!process.env.CI) { - console.warn( - `This is a dry run for version ${version}. Push to CI to publish for real or set CI=true to override!`, - ) - return - } - - console.info() - console.info(`Publishing all packages to npm`) - - // Publish each package - changedPackages.forEach((pkg) => { - const packageDir = path.join(rootDir, pkg.packageDir) - const tagParam = branchConfig.previousVersion ? `` : `--tag ${npmTag}` - - const cmd = `cd ${packageDir} && pnpm publish ${tagParam} --access=public --no-git-checks` - console.info(` Publishing ${pkg.name}@${version} to npm "${tagParam}"...`) - execSync(cmd, { - stdio: [process.stdin, process.stdout, process.stderr], - }) - }) - - console.info() - - console.info(`Committing changes...`) - execSync(`git add -A && git commit -m "${releaseCommitMsg(version)}"`) - console.info() - console.info(` Committed Changes.`) - - console.info(`Pushing changes...`) - execSync(`git push`) - console.info() - console.info(` Changes pushed.`) - - console.info(`Creating new git tag v${version}`) - execSync(`git tag -a -m "v${version}" v${version}`) - - console.info(`Pushing tags...`) - execSync(`git push --tags`) - console.info() - console.info(` Tags pushed.`) - - console.info(`Creating github release...`) - // Stringify the markdown to excape any quotes - execSync( - `gh release create v${version} ${ - branchConfig.prerelease ? '--prerelease' : '' - } --notes '${changelogMd.replace(/'/g, '"')}'`, - ) - console.info(` Github release created.`) - - console.info(`All done!`) -} - -run().catch((err) => { +publish({ + branchConfigs, + packages, + rootDir, + branch: process.env.BRANCH, + tag: process.env.TAG, + ghToken: process.env.GH_TOKEN, +}).catch((err) => { console.info(err) process.exit(1) }) - -/** @param {string} str */ -function capitalize(str) { - return str.slice(0, 1).toUpperCase() + str.slice(1) -} - -/** - * @param {string} pathName - * @returns {Promise} - */ -async function readPackageJson(pathName) { - return await jsonfile.readFile(pathName) -} - -/** - * @param {string} pathName - * @param {(json: import('type-fest').PackageJson) => Promise | void} transform - */ -async function updatePackageJson(pathName, transform) { - const json = await readPackageJson(pathName) - await transform(json) - await jsonfile.writeFile(pathName, json, { - spaces: 2, - }) -} - -/** - * @template TItem - * @param {((d: TItem) => any)[]} sorters - * @returns {(a: TItem, b: TItem) => number} - */ -function getSorterFn(sorters) { - return (a, b) => { - let i = 0 - - sorters.some((sorter) => { - const sortedA = sorter(a) - const sortedB = sorter(b) - if (sortedA > sortedB) { - i = 1 - return true - } - if (sortedA < sortedB) { - i = -1 - return true - } - return false - }) - - return i - } -} diff --git a/scripts/types.d.ts b/scripts/types.d.ts index f30c9cf40a..ac48f9b8ca 100644 --- a/scripts/types.d.ts +++ b/scripts/types.d.ts @@ -1,39 +1,3 @@ -export type Commit = { - commit: CommitOrTree - tree: CommitOrTree - author: AuthorOrCommitter - committer: AuthorOrCommitter - subject: string - body: string - parsed: Parsed -} - -export type CommitOrTree = { - long: string - short: string -} - -export type AuthorOrCommitter = { - name: string - email: string - date: string -} - -export type Parsed = { - type: string | null - scope?: string | null - subject: string - merge?: null - header: string - body?: null - footer?: null - notes?: Array | null - references?: Array | null - mentions?: Array | null - revert?: null - raw: string -} - export type Package = { name: string packageDir: string From 0afe974c3f053c52befb5fe847db77307f33a6bc Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:56:40 +1100 Subject: [PATCH 2/2] Remove type-fest --- package.json | 1 - pnpm-lock.yaml | 25 ++++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index fec2f464c7..a307355f16 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "sherif": "^0.7.0", "solid-js": "^1.8.7", "tsup": "^8.0.1", - "type-fest": "^4.8.3", "typescript": "5.2.2", "vite": "^5.0.10", "vitest": "^1.1.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42dfadf433..92496cd8ff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,9 +109,6 @@ importers: tsup: specifier: ^8.0.1 version: 8.0.1(typescript@5.2.2) - type-fest: - specifier: ^4.8.3 - version: 4.8.3 typescript: specifier: 5.2.2 version: 5.2.2 @@ -1448,7 +1445,7 @@ importers: version: 18.2.0(react@18.2.0) react-scripts: specifier: ^4.0.3 - version: 4.0.3(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2) + version: 4.0.3(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(typescript@5.2.2) integrations/react-cra5: dependencies: @@ -1466,7 +1463,7 @@ importers: version: 18.2.0(react@18.2.0) react-scripts: specifier: ^5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2) + version: 5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(typescript@5.2.2) integrations/react-next: dependencies: @@ -7930,7 +7927,7 @@ packages: requiresBuild: true dev: true - /@pmmmwh/react-refresh-webpack-plugin@0.4.3(react-refresh@0.8.3)(type-fest@4.8.3)(webpack-dev-server@3.11.1)(webpack@4.44.2): + /@pmmmwh/react-refresh-webpack-plugin@0.4.3(react-refresh@0.8.3)(webpack-dev-server@3.11.1)(webpack@4.44.2): resolution: {integrity: sha512-br5Qwvh8D2OQqSXpd1g/xqXKnK0r+Jz6qVKBbWmpUcrbGOxUrf39V5oZ1876084CGn18uMdR5uvPqBv9UqtBjQ==} engines: {node: '>= 10.x'} peerDependencies: @@ -7963,12 +7960,11 @@ packages: react-refresh: 0.8.3 schema-utils: 2.7.1 source-map: 0.7.4 - type-fest: 4.8.3 webpack: 4.44.2 webpack-dev-server: 3.11.1(webpack@4.44.2) dev: false - /@pmmmwh/react-refresh-webpack-plugin@0.5.11(react-refresh@0.11.0)(type-fest@4.8.3)(webpack-dev-server@4.15.1)(webpack@5.89.0): + /@pmmmwh/react-refresh-webpack-plugin@0.5.11(react-refresh@0.11.0)(webpack-dev-server@4.15.1)(webpack@5.89.0): resolution: {integrity: sha512-7j/6vdTym0+qZ6u4XbSAxrWBGYSdCfTzySkj7WAFgDLmSyWlOrWvpyzxlFh5jtw9dn0oL/jtW+06XfFiisN3JQ==} engines: {node: '>= 10.13'} peerDependencies: @@ -8004,7 +8000,6 @@ packages: react-refresh: 0.11.0 schema-utils: 3.3.0 source-map: 0.7.4 - type-fest: 4.8.3 webpack: 5.89.0(esbuild@0.19.10) webpack-dev-server: 4.15.1(webpack@5.89.0) dev: false @@ -25718,7 +25713,7 @@ packages: react: 18.2.0 dev: false - /react-scripts@4.0.3(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2): + /react-scripts@4.0.3(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(typescript@5.2.2): resolution: {integrity: sha512-S5eO4vjUzUisvkIPB7jVsKtuH2HhWcASREYWHAQ1FP5HyCv3xgn+wpILAEWkmy+A+tTNbSZClhxjT3qz6g4L1A==} engines: {node: ^10.12.0 || >=12.0.0} hasBin: true @@ -25731,7 +25726,7 @@ packages: optional: true dependencies: '@babel/core': 7.12.3 - '@pmmmwh/react-refresh-webpack-plugin': 0.4.3(react-refresh@0.8.3)(type-fest@4.8.3)(webpack-dev-server@3.11.1)(webpack@4.44.2) + '@pmmmwh/react-refresh-webpack-plugin': 0.4.3(react-refresh@0.8.3)(webpack-dev-server@3.11.1)(webpack@4.44.2) '@svgr/webpack': 5.5.0 '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.56.0)(typescript@5.2.2) '@typescript-eslint/parser': 5.62.0(eslint@8.56.0)(typescript@5.2.2) @@ -25814,7 +25809,7 @@ packages: - webpack-plugin-serve dev: false - /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(type-fest@4.8.3)(typescript@5.2.2): + /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/plugin-transform-react-jsx@7.22.15)(esbuild@0.19.10)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(react@18.2.0)(typescript@5.2.2): resolution: {integrity: sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==} engines: {node: '>=14.0.0'} hasBin: true @@ -25827,7 +25822,7 @@ packages: optional: true dependencies: '@babel/core': 7.23.6 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(react-refresh@0.11.0)(type-fest@4.8.3)(webpack-dev-server@4.15.1)(webpack@5.89.0) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(react-refresh@0.11.0)(webpack-dev-server@4.15.1)(webpack@5.89.0) '@svgr/webpack': 5.5.0 babel-jest: 27.5.1(@babel/core@7.23.6) babel-loader: 8.3.0(@babel/core@7.23.6)(webpack@5.89.0) @@ -29070,10 +29065,6 @@ packages: engines: {node: '>=14.16'} dev: false - /type-fest@4.8.3: - resolution: {integrity: sha512-//BaTm14Q/gHBn09xlnKNqfI8t6bmdzx2DXYfPBNofN0WUybCEUDcbCWcTa0oF09lzLjZgPphXAsvRiMK0V6Bw==} - engines: {node: '>=16'} - /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'}