diff --git a/.github/workflows/test-old-typescript.yml b/.github/workflows/test-old-typescript.yml index 10efce91ed..5f687708a3 100644 --- a/.github/workflows/test-old-typescript.yml +++ b/.github/workflows/test-old-typescript.yml @@ -34,6 +34,9 @@ jobs: cache-dependency-path: '**/pnpm-lock.yaml' - run: pnpm install --frozen-lockfile - run: pnpm build + - name: Patch for all TS + run: | + sed -i~ 's/"isolatedDeclarations": true,//' tsconfig.json - name: Patch for v4/v3 TS if: ${{ startsWith(matrix.typescript, '4.') || startsWith(matrix.typescript, '3.') }} run: | diff --git a/package.json b/package.json index 5912589e13..1dc2ee2115 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "rollup-plugin-esbuild": "^6.1.1", "shelljs": "^0.8.5", "shx": "^0.3.4", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "use-sync-external-store": "^1.2.2", "vitest": "^2.0.5" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f14287ebe1..65bd04bf86 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ devDependencies: version: 5.0.7(rollup@4.21.1) '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.21.1)(typescript@5.5.4) + version: 11.1.6(rollup@4.21.1)(typescript@5.6.2) '@testing-library/react': specifier: ^16.0.0 version: 16.0.0(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@19.0.0-rc.0)(react@19.0.0-rc.0) @@ -37,10 +37,10 @@ devDependencies: version: 0.0.6 '@typescript-eslint/eslint-plugin': specifier: ^8.3.0 - version: 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.5.4) + version: 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/parser': specifier: ^8.3.0 - version: 8.3.0(eslint@8.57.0)(typescript@5.5.4) + version: 8.3.0(eslint@8.57.0)(typescript@5.6.2) '@vitest/coverage-v8': specifier: ^2.0.5 version: 2.0.5(vitest@2.0.5) @@ -76,7 +76,7 @@ devDependencies: version: 4.6.2(eslint@8.57.0) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.3.0)(eslint@8.57.0)(typescript@5.5.4)(vitest@2.0.5) + version: 0.5.4(@typescript-eslint/eslint-plugin@8.3.0)(eslint@8.57.0)(typescript@5.6.2)(vitest@2.0.5) immer: specifier: ^10.1.1 version: 10.1.1 @@ -111,8 +111,8 @@ devDependencies: specifier: ^0.3.4 version: 0.3.4 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 use-sync-external-store: specifier: ^1.2.2 version: 1.2.2(react@19.0.0-rc.0) @@ -1016,7 +1016,7 @@ packages: rollup: 4.21.1 dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.21.1)(typescript@5.5.4): + /@rollup/plugin-typescript@11.1.6(rollup@4.21.1)(typescript@5.6.2): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1032,7 +1032,7 @@ packages: '@rollup/pluginutils': 5.1.0(rollup@4.21.1) resolve: 1.22.8 rollup: 4.21.1 - typescript: 5.5.4 + typescript: 5.6.2 dev: true /@rollup/pluginutils@5.1.0(rollup@4.21.1): @@ -1258,7 +1258,7 @@ packages: resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} dev: true - /@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.6.2): resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1270,22 +1270,22 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.3.0 - '@typescript-eslint/type-utils': 8.3.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.3.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.3.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.3.0(typescript@5.6.2) + typescript: 5.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.6.2): resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1297,11 +1297,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 8.3.0 '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.3.0 debug: 4.3.6 eslint: 8.57.0 - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color dev: true @@ -1322,7 +1322,7 @@ packages: '@typescript-eslint/visitor-keys': 8.3.0 dev: true - /@typescript-eslint/type-utils@8.3.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/type-utils@8.3.0(eslint@8.57.0)(typescript@5.6.2): resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1331,11 +1331,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.6.2) debug: 4.3.6 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.3.0(typescript@5.6.2) + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color @@ -1351,7 +1351,7 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4): + /@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2): resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1367,13 +1367,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.3.0(typescript@5.6.2) + typescript: 5.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@8.3.0(typescript@5.5.4): + /@typescript-eslint/typescript-estree@8.3.0(typescript@5.6.2): resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1389,13 +1389,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.3.0(typescript@5.6.2) + typescript: 5.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.18.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/utils@7.18.0(eslint@8.57.0)(typescript@5.6.2): resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1404,14 +1404,14 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.3.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/utils@8.3.0(eslint@8.57.0)(typescript@5.6.2): resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1420,7 +1420,7 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.3.0 '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.6.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -2277,7 +2277,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.6.2) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -2295,7 +2295,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.6.2) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -2394,7 +2394,7 @@ packages: string.prototype.repeat: 1.0.0 dev: true - /eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.3.0)(eslint@8.57.0)(typescript@5.5.4)(vitest@2.0.5): + /eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.3.0)(eslint@8.57.0)(typescript@5.6.2)(vitest@2.0.5): resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -2407,8 +2407,8 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 vitest: 2.0.5(@types/node@22.5.0)(@vitest/ui@2.0.5)(jsdom@25.0.0) transitivePeerDependencies: @@ -4188,13 +4188,13 @@ packages: punycode: 2.3.1 dev: true - /ts-api-utils@1.3.0(typescript@5.5.4): + /ts-api-utils@1.3.0(typescript@5.6.2): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.5.4 + typescript: 5.6.2 dev: true /tsconfig-paths@3.15.0: @@ -4266,8 +4266,8 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + /typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/tests/test-utils.ts b/tests/test-utils.ts index d840b47aed..caafa85557 100644 --- a/tests/test-utils.ts +++ b/tests/test-utils.ts @@ -17,7 +17,7 @@ export const replacer = ( } } -export const reviver = (key: string, value: ReplacedMap | unknown) => { +export const reviver = (key: string, value: ReplacedMap | unknown): unknown => { if (isReplacedMap(value)) { return new Map(value.value) } diff --git a/tsconfig.json b/tsconfig.json index 79af697f28..b430476d47 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,8 @@ "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, "verbatimModuleSyntax": true, + "declaration": true, + "isolatedDeclarations": true, "noEmit": true, "baseUrl": ".", "paths": {