From a609e4c6855aec339e248c1c891e003d83bd879e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=AA?= Date: Sat, 7 Dec 2024 16:29:31 +1100 Subject: [PATCH] site up typescript --- site/app/[locale]/playground/page.tsx | 6 ++- site/package.json | 2 +- site/pnpm-lock.yaml | 78 +++++++++++++-------------- 3 files changed, 45 insertions(+), 41 deletions(-) diff --git a/site/app/[locale]/playground/page.tsx b/site/app/[locale]/playground/page.tsx index c4f84ffe6..05b0a946e 100644 --- a/site/app/[locale]/playground/page.tsx +++ b/site/app/[locale]/playground/page.tsx @@ -27,7 +27,11 @@ x`); const updateUrlHash = (code: string) => { if (typeof window !== 'undefined') { const compressed = deflate(code); - const encodedCode = base64Encode(compressed.buffer); + // Create a new ArrayBuffer with the compressed data + const arrayBuffer = new ArrayBuffer(compressed.length); + const view = new Uint8Array(arrayBuffer); + view.set(compressed); + const encodedCode = base64Encode(arrayBuffer); window.location.hash = encodedCode; } }; diff --git a/site/package.json b/site/package.json index d5fd8e365..e450ed332 100644 --- a/site/package.json +++ b/site/package.json @@ -56,6 +56,6 @@ "postcss": "^8.4.49", "prettier": "^3.4.2", "tailwindcss": "^3.4.16", - "typescript": "5.6.3" + "typescript": "^5.7.2" } } diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index 57ab78273..dd6c88f1e 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -99,7 +99,7 @@ importers: version: 9.16.0(jiti@1.21.6) eslint-config-next: specifier: 15.0.3 - version: 15.0.3(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + version: 15.0.3(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.16.0(jiti@1.21.6)) @@ -116,8 +116,8 @@ importers: specifier: ^3.4.16 version: 3.4.16 typescript: - specifier: 5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 packages: @@ -1906,8 +1906,8 @@ packages: types-react@19.0.0-rc.1: resolution: {integrity: sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==} - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true @@ -2286,34 +2286,34 @@ snapshots: '@types/unist@2.0.11': {} - '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.17.0 - '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.17.0 eslint: 9.16.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.6.3) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3)': + '@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.17.0 '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.17.0 debug: 4.4.0 eslint: 9.16.0(jiti@1.21.6) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -2322,21 +2322,21 @@ snapshots: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 - '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) debug: 4.4.0 eslint: 9.16.0(jiti@1.21.6) - ts-api-utils: 1.4.3(typescript@5.6.3) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.17.0': {} - '@typescript-eslint/typescript-estree@8.17.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 @@ -2345,21 +2345,21 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@5.6.3) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3)': + '@typescript-eslint/utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@1.21.6)) '@typescript-eslint/scope-manager': 8.17.0 '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) eslint: 9.16.0(jiti@1.21.6) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -2781,21 +2781,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-next@15.0.3(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3): + eslint-config-next@15.0.3(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2): dependencies: '@next/eslint-plugin-next': 15.0.3 '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) eslint: 9.16.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0(jiti@1.21.6)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.16.0(jiti@1.21.6)) eslint-plugin-react: 7.37.2(eslint@9.16.0(jiti@1.21.6)) eslint-plugin-react-hooks: 5.1.0(eslint@9.16.0(jiti@1.21.6)) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - eslint-import-resolver-webpack - eslint-plugin-import-x @@ -2825,22 +2825,22 @@ snapshots: is-glob: 4.0.3 stable-hash: 0.0.4 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) eslint: 9.16.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -2851,7 +2851,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.16.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0(jiti@1.21.6)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -2863,7 +2863,7 @@ snapshots: string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -3919,9 +3919,9 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.4.3(typescript@5.6.3): + ts-api-utils@1.4.3(typescript@5.7.2): dependencies: - typescript: 5.6.3 + typescript: 5.7.2 ts-interface-checker@0.1.13: {} @@ -3979,7 +3979,7 @@ snapshots: dependencies: csstype: 3.1.3 - typescript@5.6.3: {} + typescript@5.7.2: {} unbox-primitive@1.0.2: dependencies: