commit 042a65518772484f83b60f923fc09474cf7cac26 parent 71436c925392892f8b2c077f6d02113721fac99c Author: Florian Dold <florian@dold.me> Date: Tue, 19 May 2026 16:41:52 +0200 upgrade TypeScript to 6.0.x, fix issues along the way Our codebase used ArrayBuffer in a bad / unidiomatic way that the latest TypeScript compiler doesn't like. This commit uses Uint8Array consistently. Diffstat:
77 files changed, 334 insertions(+), 355 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json @@ -50,5 +50,6 @@ "typescript.preferences.importModuleSpecifier": "project-relative", "javascript.preferences.importModuleSpecifier": "project-relative", "javascript.preferences.importModuleSpecifierEnding": "js", - "makefile.configureOnOpen": false + "makefile.configureOnOpen": false, + "js/ts.tsdk.path": "./node_modules/typescript/lib" } diff --git a/package.json b/package.json @@ -25,7 +25,7 @@ "globals": "^16.0.0", "prettier": "^3.8.3", "typedoc": "^0.28.19", - "typescript": "^5.7.3", + "typescript": "^6.0.3", "typescript-eslint": "^8.24.1" }, "packageManager": "pnpm@11.1.2" diff --git a/packages/aml-backoffice-ui/package.json b/packages/aml-backoffice-ui/package.json @@ -41,7 +41,7 @@ "mocha": "^11.7.5", "postcss": "^8.4.23", "tailwindcss": "3.4.17", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "aml-backoffice" diff --git a/packages/aml-backoffice-ui/src/App.tsx b/packages/aml-backoffice-ui/src/App.tsx @@ -40,7 +40,7 @@ import { revalidateAccountInformation } from "./hooks/account.js"; import { revalidateAccountDecisions } from "./hooks/decisions.js"; import { usePreferences } from "./hooks/preferences.js"; import { strings } from "./i18n/strings.js"; -import "./scss/main.css"; +import "./scss/main.scss"; const WITH_LOCAL_STORAGE_CACHE = false; diff --git a/packages/aml-backoffice-ui/src/scss/main.css b/packages/aml-backoffice-ui/src/scss/main.scss diff --git a/packages/aml-backoffice-ui/src/stories.tsx b/packages/aml-backoffice-ui/src/stories.tsx @@ -30,7 +30,7 @@ import { import { TalerExchangeApi } from "@gnu-taler/taler-util"; import { ComponentChildren, FunctionComponent, VNode, h } from "preact"; -import "./scss/main.css"; +import "./scss/main.scss"; function main(): void { renderStories( diff --git a/packages/aml-backoffice-ui/tsconfig.json b/packages/aml-backoffice-ui/tsconfig.json @@ -2,15 +2,14 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["DOM", "ES2020"], - "allowJs": true /* Allow javascript files to be compiled. */, - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "types": ["mocha"], + "allowJs": true, + "jsx": "react", "jsxFactory": "h", "jsxFragmentFactory": "Fragment", "resolveJsonModule": true, "noEmit": true /* Do not emit outputs. */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "skipLibCheck": true /* Skip type checking of declaration files. */ + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ }, "references": [ { diff --git a/packages/anastasis-cli/package.json b/packages/anastasis-cli/package.json @@ -36,7 +36,7 @@ "c8": "^11.0.0", "prettier": "^3.8.3", "typedoc": "^0.28.19", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@gnu-taler/anastasis-core": "workspace:*", diff --git a/packages/anastasis-cli/tsconfig.json b/packages/anastasis-cli/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "lib": ["ES2020"], "outDir": "lib", - "rootDir": "src" + "rootDir": "src", + "types": ["node"] }, "include": ["src/**/*"], "references": [ diff --git a/packages/anastasis-core/package.json b/packages/anastasis-core/package.json @@ -19,7 +19,7 @@ "devDependencies": { "ava": "^8.0.0", "c8": "^11.0.0", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/anastasis-core/tsconfig.json b/packages/anastasis-core/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "lib": ["ES2020", "DOM"], "outDir": "lib", - "rootDir": "src", - "baseUrl": "./src" + "rootDir": "./src" }, "include": ["src/**/*"], "references": [ diff --git a/packages/anastasis-webui/package.json b/packages/anastasis-webui/package.json @@ -34,6 +34,6 @@ "chai": "^6.2.2", "mocha": "^11.7.5", "sass": "1.56.1", - "typescript": "^5.7.3" + "typescript": "^6.0.3" } } diff --git a/packages/anastasis-webui/src/declaration.d.ts b/packages/anastasis-webui/src/declaration.d.ts @@ -17,6 +17,10 @@ declare module "*.css" { const mapping: Record<string, string>; export default mapping; } +declare module "*.scss" { + const mapping: Record<string, string>; + export default mapping; +} declare module "*.svg" { const content: any; export default content; diff --git a/packages/anastasis-webui/tsconfig.json b/packages/anastasis-webui/tsconfig.json @@ -1,19 +1,14 @@ { "extends": "../../tsconfig.defaults.json", "compilerOptions": { - /* Basic Options */ - "lib": [ - "DOM", - "ES2020" - ], + "lib": ["DOM", "ES2020"], + "types": ["mocha"], "allowJs": true /* Allow javascript files to be compiled. */, "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, "jsxFactory": "h", "jsxFragmentFactory": "Fragment", - "noEmit": true /* Do not emit outputs. */, - /* Module Resolution Options */ + "noEmit": true, "allowSyntheticDefaultImports": true, - "skipLibCheck": true /* Skip type checking of declaration files. */ }, "references": [ { @@ -26,7 +21,5 @@ "path": "../anastasis-core/" } ], - "include": [ - "src/**/*" - ] + "include": ["src/**/*"] } diff --git a/packages/auditor-backoffice-ui/package.json b/packages/auditor-backoffice-ui/package.json @@ -50,7 +50,7 @@ "sass": "1.56.1", "source-map-support": "^0.5.21", "typedoc": "^0.28.19", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "taler-auditor-backoffice" diff --git a/packages/bank-ui/package.json b/packages/bank-ui/package.json @@ -35,7 +35,7 @@ "esbuild": "^0.28.0", "mocha": "11.7.5", "tailwindcss": "3.4.17", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "bank" diff --git a/packages/bank-ui/tsconfig.json b/packages/bank-ui/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["DOM", "ES2020"], - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "types": ["mocha"], + "jsx": "react", "jsxFactory": "h", "jsxFragmentFactory": "Fragment", "noEmit": true /* Do not emit outputs. */, - /* Module Resolution Options */ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, "skipLibCheck": true /* Skip type checking of declaration files. */ }, diff --git a/packages/challenger-ui/package.json b/packages/challenger-ui/package.json @@ -29,7 +29,7 @@ "esbuild": "^0.28.0", "mocha": "11.7.5", "tailwindcss": "3.4.17", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "challenger-ui" diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json @@ -29,7 +29,7 @@ "@types/node": "^20.4.1", "ava": "^8.0.0", "prettier": "^3.8.3", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "tslib": "^2.6.2" diff --git a/packages/idb-bridge/src/util/structuredClone.ts b/packages/idb-bridge/src/util/structuredClone.ts @@ -97,7 +97,7 @@ function isUserObject(val: any): boolean { function copyBuffer(cur: any) { if (cur instanceof Buffer) { - return Buffer.from(cur); + return Buffer.from(cur.buffer, cur.byteOffset, cur.byteLength); } return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length); diff --git a/packages/idb-bridge/src/util/valueToKey.ts b/packages/idb-bridge/src/util/valueToKey.ts @@ -48,7 +48,7 @@ export function valueToKey( if (input instanceof ArrayBuffer) { return new Uint8Array(input).buffer; } - return new Uint8Array(input.buffer).buffer; + return new Uint8Array(input.buffer); } else if (Array.isArray(input)) { if (seen === undefined) { seen = new Set(); diff --git a/packages/idb-bridge/tsconfig.json b/packages/idb-bridge/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["ES2020"], + "types": ["node"], "outDir": "lib", "rootDir": "./src" }, diff --git a/packages/kyc-ui/package.json b/packages/kyc-ui/package.json @@ -29,7 +29,7 @@ "esbuild": "^0.28.0", "mocha": "11.7.5", "tailwindcss": "3.4.17", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "kyc-ui" diff --git a/packages/merchant-backend-ui/package.json b/packages/merchant-backend-ui/package.json @@ -33,7 +33,7 @@ "sirv-cli": "^1.0.11", "ts-node": "^10.9.1", "tslib": "2.6.2", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "taler-merchant-backend-ui" diff --git a/packages/merchant-backend-ui/src/custom.d.ts b/packages/merchant-backend-ui/src/custom.d.ts @@ -13,22 +13,27 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ + declare module '*.po' { const content: any; export default content; } + declare module 'jed' { const x: any; export = x; } + declare module "*.jpeg" { const content: any; export default content; } + declare module "*.png" { const content: any; export default content; } + declare module '*.svg' { const content: any; export default content; @@ -39,6 +44,11 @@ declare module '*.scss' { export default content; } +declare module '*.css' { + const content: Record<string, string>; + export default content; +} + declare module '*.module.css' { const classes: { [key: string]: string }; export default classes; diff --git a/packages/merchant-backend-ui/tsconfig.json b/packages/merchant-backend-ui/tsconfig.json @@ -1,18 +1,12 @@ { "extends": "../../tsconfig.defaults.json", "compilerOptions": { - /* Basic Options */ - // "lib": [], /* Specify library files to be included in the compilation: */ - "allowJs": true /* Allow javascript files to be compiled. */, - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */, - "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories - "noEmit": true /* Do not emit outputs. */, - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - /* Module Resolution Options */ - "esModuleInterop": true /* */, - "skipLibCheck": true /* Skip type checking of declaration files. */ + "allowJs": true, + "types": ["node"], + "jsx": "react", + "jsxFactory": "h", + "jsxFragmentFactory": "Fragment", + "noEmit": true }, "include": ["src/**/*", "tests/**/*"] } diff --git a/packages/merchant-backoffice-ui/package.json b/packages/merchant-backoffice-ui/package.json @@ -48,7 +48,7 @@ "sass": "1.56.1", "source-map-support": "^0.5.21", "typedoc": "^0.28.19", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "taler-merchant-backoffice" diff --git a/packages/merchant-backoffice-ui/src/hooks/testing.tsx b/packages/merchant-backoffice-ui/src/hooks/testing.tsx @@ -141,7 +141,9 @@ export class ApiMockEnvironment extends MockEnvironment { requestMethod: options?.method ?? "GET", json: async () => responsePayload, text: async () => responsePayload as any as string, - bytes: async () => responsePayload as ArrayBuffer, + bytes: async () => { + throw Error("not supported"); + }, }; return resp; } diff --git a/packages/merchant-backoffice-ui/tsconfig.json b/packages/merchant-backoffice-ui/tsconfig.json @@ -1,23 +1,15 @@ { "extends": "../../tsconfig.defaults.json", "compilerOptions": { - /* Basic Options */ - "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */, - "module": "Node16" /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - "lib": [ - "es2020", - "dom" - ] /* Specify library files to be included in the compilation: */, - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */, + "lib": ["es2020", "dom"], + "types": ["mocha", "node"], + "jsx": "react", + "jsxFactory": "h", "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories "paths": { - "@assets/*": ["../../contrib/taler-assets/*"], + "@assets/*": ["../../contrib/taler-assets/*"] }, - "noEmit": true /* Do not emit outputs. */, - /* Module Resolution Options */ - /* Advanced Options */ - "skipLibCheck": true /* Skip type checking of declaration files. */ + "noEmit": true /* Do not emit outputs. */ }, "references": [ { diff --git a/packages/pogen/package.json b/packages/pogen/package.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/gettext-parser": "^4.0.3", "ava": "^8.0.0", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@types/node": "^18.11.17", diff --git a/packages/taler-harness/package.json b/packages/taler-harness/package.json @@ -35,7 +35,7 @@ "@types/node": "^18.11.17", "esbuild": "^0.28.0", "prettier": "^3.8.3", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/taler-harness/src/harness/fake-challenger.ts b/packages/taler-harness/src/harness/fake-challenger.ts @@ -127,7 +127,7 @@ export async function startFakeChallenger(options: { if (req.headers["content-encoding"] === "deflate") { const bodyEnc = await readBodyBytes(req); const td = new TextDecoder(); - reqBody = td.decode(inflateSync(bodyEnc)); + reqBody = td.decode(new Uint8Array(inflateSync(bodyEnc))); } else { reqBody = await readBodyStr(req); } diff --git a/packages/taler-harness/src/harness/faultInjection.ts b/packages/taler-harness/src/harness/faultInjection.ts @@ -76,7 +76,7 @@ export class FaultProxy { start() { const server = http.createServer((req, res) => { - const requestChunks: Buffer[] = []; + const requestChunks: Uint8Array[] = []; const requestUrl = `http://localhost:${this.faultProxyConfig.inboundPort}${req.url}`; console.log("request for", new URL(requestUrl)); req.on("data", (chunk) => { @@ -142,7 +142,7 @@ export class FaultProxy { proxyRequest.end(); proxyRequest.on("response", (proxyResp) => { console.log("gotten response from target", proxyResp.statusCode); - const respChunks: Buffer[] = []; + const respChunks: Uint8Array[] = []; proxyResp.on("data", (proxyRespData) => { respChunks.push(proxyRespData); }); diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts @@ -142,14 +142,14 @@ export async function sh( ): Promise<string> { logger.trace(`running command ${command}`); return new Promise((resolve, reject) => { - const stdoutChunks: Buffer[] = []; + const stdoutChunks: Uint8Array[] = []; const proc = spawn(command, { stdio: ["inherit", "pipe", "pipe"], shell: true, env, }); proc.stdout.on("data", (x) => { - if (x instanceof Buffer) { + if (x instanceof Uint8Array) { stdoutChunks.push(x); } else { throw Error("unexpected data chunk type"); @@ -219,14 +219,14 @@ export async function runCommand( logger.info(`running command ${shellescape([command, ...args])}`); return new Promise((resolve, reject) => { - const stdoutChunks: Buffer[] = []; + const stdoutChunks: Uint8Array[] = []; const proc = spawn(command, args, { stdio: ["inherit", "pipe", "pipe"], shell: false, env: env, }); proc.stdout.on("data", (x) => { - if (x instanceof Buffer) { + if (x instanceof Uint8Array) { stdoutChunks.push(x); } else { throw Error("unexpected data chunk type"); @@ -1356,8 +1356,8 @@ export class ExchangeService implements ExchangeServiceInterface { .required(); const eddsaPriv = fs.readFileSync(privFile); const keyPair: EddsaKeyPair = { - eddsaPriv, - eddsaPub: eddsaGetPublic(eddsaPriv), + eddsaPriv: new Uint8Array(eddsaPriv), + eddsaPub: eddsaGetPublic(new Uint8Array(eddsaPriv)), }; return new ExchangeService(gc, ec, cfgFilename, keyPair); } @@ -1533,7 +1533,7 @@ export class ExchangeService implements ExchangeServiceInterface { "master priv file already exists, can't create new exchange config", ); } - const masterPriv = fs.readFileSync(masterPrivFile); + const masterPriv = new Uint8Array(fs.readFileSync(masterPrivFile)); const masterPub = eddsaGetPublic(masterPriv); exchangeMasterKey = { eddsaPriv: masterPriv, @@ -1542,10 +1542,7 @@ export class ExchangeService implements ExchangeServiceInterface { } else { exchangeMasterKey = createEddsaKeyPair(); fs.mkdirSync(path.dirname(masterPrivFile), { recursive: true }); - fs.writeFileSync( - masterPrivFile, - Buffer.from(exchangeMasterKey.eddsaPriv), - ); + fs.writeFileSync(masterPrivFile, exchangeMasterKey.eddsaPriv); } config.setString( @@ -1951,7 +1948,7 @@ export class ExchangeService implements ExchangeServiceInterface { .required(); fs.unlinkSync(masterPrivFile); const exchangeMasterKey = createEddsaKeyPair(); - fs.writeFileSync(masterPrivFile, Buffer.from(exchangeMasterKey.eddsaPriv)); + fs.writeFileSync(masterPrivFile, exchangeMasterKey.eddsaPriv); cfg.setString( "exchange", "master_public_key", diff --git a/packages/taler-harness/src/harness/http-server.ts b/packages/taler-harness/src/harness/http-server.ts @@ -42,9 +42,9 @@ export function readBodyStr(req: http.IncomingMessage): Promise<string> { export function readBodyBytes(req: http.IncomingMessage): Promise<Uint8Array> { return new Promise((resolve, reject) => { - let chunks: Buffer[] = []; + let chunks: Uint8Array[] = []; req.on("data", (x) => { - chunks.push(Buffer.from(x)); + chunks.push(x); }); req.on("end", () => { diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts @@ -78,8 +78,6 @@ import { topupReserveWithBank, } from "@gnu-taler/taler-wallet-core/dbless"; import { deepStrictEqual } from "assert"; -import { AML_PROGRAM_FAIL_RECOVER } from "integrationtests/test-kyc-fail-recover-simple.js"; -import { AML_PROGRAM_FROM_ATTRIBUTES_TO_CONTEXT } from "integrationtests/test-kyc-skip-expiration.js"; import { execSync } from "node:child_process"; import fs from "node:fs"; import os from "node:os"; @@ -101,7 +99,9 @@ import { runTestWithState, waitMs, } from "./harness/harness.js"; +import { AML_PROGRAM_FAIL_RECOVER } from "./integrationtests/test-kyc-fail-recover-simple.js"; import { AML_PROGRAM_TEST_KYC_NEW_MEASURES_PROG } from "./integrationtests/test-kyc-new-measures-prog.js"; +import { AML_PROGRAM_FROM_ATTRIBUTES_TO_CONTEXT } from "./integrationtests/test-kyc-skip-expiration.js"; import { AML_PROGRAM_NEXT_MEASURE_FORM } from "./integrationtests/test-kyc-two-forms.js"; import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; import { lintExchangeDeployment, lintExchangeUrl } from "./lint.js"; diff --git a/packages/taler-harness/src/integrationtests/test-deposit-fault.ts b/packages/taler-harness/src/integrationtests/test-deposit-fault.ts @@ -157,7 +157,11 @@ export async function runDepositFaultTest(t: GlobalTestState) { } ctx.dropRequest = true; const td = new TextDecoder(); - caughtDeposit.resolve(JSON.parse(td.decode(ctx.requestBody))); + let bRes: Uint8Array | undefined; + if (ctx.requestBody) { + bRes = JSON.parse(td.decode(new Uint8Array(ctx.requestBody))); + } + caughtDeposit.resolve(bRes); } }, async modifyResponse(ctx: FaultInjectionResponseContext) {}, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-reports.ts b/packages/taler-harness/src/integrationtests/test-merchant-reports.ts @@ -74,7 +74,7 @@ export async function runMerchantReportsTest(t: GlobalTestState) { ), ); const f = t.testDir + `/report-0.pdf`; - fs.writeFileSync(f, Buffer.from(reportBytes)); + fs.writeFileSync(f, reportBytes); console.log(`written to ${f}`); } @@ -105,7 +105,7 @@ export async function runMerchantReportsTest(t: GlobalTestState) { ), ); const f = t.testDir + `/report-1.pdf`; - fs.writeFileSync(f, Buffer.from(reportBytes)); + fs.writeFileSync(f, reportBytes); console.log(`written to ${f}`); } @@ -136,7 +136,7 @@ export async function runMerchantReportsTest(t: GlobalTestState) { ), ); const f = t.testDir + `/report-2.pdf`; - fs.writeFileSync(f, Buffer.from(reportBytes)); + fs.writeFileSync(f, reportBytes); console.log(`written to ${f}`); } @@ -180,7 +180,7 @@ export async function runMerchantReportsTest(t: GlobalTestState) { ), ); const f = t.testDir + `/report-3.pdf`; - fs.writeFileSync(f, Buffer.from(reportBytes)); + fs.writeFileSync(f, reportBytes); console.log(`written to ${f}`); } @@ -191,7 +191,7 @@ export async function runMerchantReportsTest(t: GlobalTestState) { }), ); const f = t.testDir + `/report-4.csv`; - fs.writeFileSync(f, Buffer.from(reportBytes)); + fs.writeFileSync(f, reportBytes); console.log(`written to ${f}`); } } diff --git a/packages/taler-harness/src/integrationtests/test-merchant-self-provision-activation-two-bank-account.ts b/packages/taler-harness/src/integrationtests/test-merchant-self-provision-activation-two-bank-account.ts @@ -27,7 +27,7 @@ import { TalerMerchantInstanceHttpClient, TalerMerchantManagementHttpClient, } from "@gnu-taler/taler-util"; -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; import { getTestHarnessPaytoForLabel, GlobalTestState, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-self-provision-activation.ts b/packages/taler-harness/src/integrationtests/test-merchant-self-provision-activation.ts @@ -29,7 +29,7 @@ import { TalerMerchantManagementHttpClient, TanChannel, } from "@gnu-taler/taler-util"; -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; import { configureTestMerchantMfa, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-self-provision-forgot-password.ts b/packages/taler-harness/src/integrationtests/test-merchant-self-provision-forgot-password.ts @@ -27,13 +27,13 @@ import { TalerMerchantInstanceHttpClient, TalerMerchantManagementHttpClient, } from "@gnu-taler/taler-util"; -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; +import { GlobalTestState } from "../harness/harness.js"; import { configureTestMerchantMfa, makeMfaConfigEmailOnly, solveMFA, -} from "harness/tan-helper.js"; -import { GlobalTestState } from "../harness/harness.js"; +} from "../harness/tan-helper.js"; /** * The merchant should get the TAN code on request to be used to activate the account. diff --git a/packages/taler-harness/src/integrationtests/test-merchant-self-provision-inactive-account-permissions.ts b/packages/taler-harness/src/integrationtests/test-merchant-self-provision-inactive-account-permissions.ts @@ -27,13 +27,13 @@ import { TalerMerchantInstanceHttpClient, TalerMerchantManagementHttpClient, } from "@gnu-taler/taler-util"; -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; import { configureTestMerchantMfa, makeMfaConfigEmailOnly, solveMFA, wait2FaCode, -} from "harness/tan-helper.js"; +} from "../harness/tan-helper.js"; import { GlobalTestState } from "../harness/harness.js"; /** diff --git a/packages/taler-harness/src/integrationtests/test-paivana-repurchase.ts b/packages/taler-harness/src/integrationtests/test-paivana-repurchase.ts @@ -22,7 +22,6 @@ import { encodeCrock, getRandomBytes, Logger, - PreparePayResultType, Result, stringToBytes, succeedOrThrow, @@ -55,7 +54,7 @@ export function createPaivanaSessionFor(website: string) { const webArr = stringToBytes(`${website}\0`); const timeArr = timestampRoundedToBuffer(time); const nonceArr = getRandomBytes(16); - const nonce = encodeCrock(nonceArr.buffer); + const nonce = encodeCrock(nonceArr); const binary = new HashSha256() .update(nonceArr) diff --git a/packages/taler-harness/src/integrationtests/test-prepared-transfer.ts b/packages/taler-harness/src/integrationtests/test-prepared-transfer.ts @@ -26,6 +26,7 @@ import { TalerPreparedTransferHttpClient, TalerWireGatewayHttpClient, } from "@gnu-taler/taler-util"; +import { createSyncCryptoApi } from "@gnu-taler/taler-wallet-core"; import { BankService, getTestHarnessPaytoForLabel, @@ -33,8 +34,6 @@ import { LibeufinBankService, setupDb, } from "../harness/harness.js"; -import { createSyncCryptoApi } from "@gnu-taler/taler-wallet-core"; -import { AddMappedRequest } from "../../../taler-util/src/types-taler-wire-gateway.js"; export async function runPreparedTransferTest(t: GlobalTestState) { // Set up test environment @@ -113,7 +112,7 @@ export async function runPreparedTransferTest(t: GlobalTestState) { authorization_pub: auth_keypair.pub, authorization_sig: ( await cryptoApi.eddsaSign({ - msg: encodeCrock(uint8.buffer), + msg: encodeCrock(uint8), priv: auth_keypair.priv, }) ).sig, diff --git a/packages/taler-harness/src/integrationtests/test-tops-aml-pdf.ts b/packages/taler-harness/src/integrationtests/test-tops-aml-pdf.ts @@ -117,7 +117,7 @@ export async function runTopsAmlPdfTest(t: GlobalTestState) { ), ); const f = t.testDir + `/aml-file-initial.pdf`; - fs.writeFileSync(f, Buffer.from(res)); + fs.writeFileSync(f, res); console.log(`written to ${f}`); } @@ -712,7 +712,7 @@ export async function runTopsAmlPdfTest(t: GlobalTestState) { ), ); const f = t.testDir + `/aml-file.pdf`; - fs.writeFileSync(f, Buffer.from(res)); + fs.writeFileSync(f, res); console.log(`written to ${f}`); } @@ -722,7 +722,7 @@ export async function runTopsAmlPdfTest(t: GlobalTestState) { await exchangeClient.getAmlAccountsAsOtherFormat(officerAcc, "text/csv"), ); const f = t.testDir + `/accounts.csv`; - fs.writeFileSync(f, Buffer.from(res)); + fs.writeFileSync(f, res); console.log(`written to ${f}`); } @@ -734,7 +734,7 @@ export async function runTopsAmlPdfTest(t: GlobalTestState) { ), ); const f = t.testDir + `/accounts.json`; - fs.writeFileSync(f, Buffer.from(res)); + fs.writeFileSync(f, res); console.log(`written to ${f}`); } @@ -746,7 +746,7 @@ export async function runTopsAmlPdfTest(t: GlobalTestState) { ), ); const f = t.testDir + `/accounts.xls`; - fs.writeFileSync(f, Buffer.from(res)); + fs.writeFileSync(f, res); console.log(`written to ${f}`); } } diff --git a/packages/taler-harness/src/integrationtests/test-wallet-cli-termination.ts b/packages/taler-harness/src/integrationtests/test-wallet-cli-termination.ts @@ -20,8 +20,8 @@ import { AmountString } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; import { GlobalTestState, setupDb } from "../harness/harness.js"; -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; /** * Test that run-until-done of taler-wallet-cli terminates. diff --git a/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts b/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts @@ -25,18 +25,18 @@ import { TransactionType, } from "@gnu-taler/taler-util"; import { + TaskRunResultType, WalletApiOperation, parseTransactionIdentifier, - TaskRunResultType, } from "@gnu-taler/taler-wallet-core"; import { createSimpleTestkudosEnvironmentV3, withdrawViaBankV3, -} from "harness/environments.js"; +} from "../harness/environments.js"; import { GlobalTestState, getTestHarnessPaytoForLabel, -} from "harness/harness.js"; +} from "../harness/harness.js"; /** * Run test for hintNetworkAvailability in wallet-core diff --git a/packages/taler-harness/src/integrationtests/test-wallet-tokens-discount.ts b/packages/taler-harness/src/integrationtests/test-wallet-tokens-discount.ts @@ -33,11 +33,11 @@ import { TokenFamilyKind, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { defaultCoinConfig } from "../harness/denomStructures.js"; import { createSimpleTestkudosEnvironmentV3, withdrawViaBankV3, -} from "harness/environments.js"; -import { defaultCoinConfig } from "../harness/denomStructures.js"; +} from "../harness/environments.js"; import { GlobalTestState, WalletClient } from "../harness/harness.js"; import { logger } from "./test-tops-challenger-twice.js"; diff --git a/packages/taler-harness/src/integrationtests/test-wallet-tokens.ts b/packages/taler-harness/src/integrationtests/test-wallet-tokens.ts @@ -32,11 +32,11 @@ import { TokenFamilyKind, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { defaultCoinConfig } from "../harness/denomStructures.js"; import { createSimpleTestkudosEnvironmentV3, withdrawViaBankV3, -} from "harness/environments.js"; -import { defaultCoinConfig } from "../harness/denomStructures.js"; +} from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; import { logger } from "./test-tops-challenger-twice.js"; diff --git a/packages/taler-harness/src/integrationtests/test-web-merchant-login.ts b/packages/taler-harness/src/integrationtests/test-web-merchant-login.ts @@ -17,8 +17,8 @@ /** * Imports. */ -import { createSimpleTestkudosEnvironmentV3 } from "harness/environments.js"; import { By } from "selenium-webdriver"; +import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js"; import { GlobalTestState, MERCHANT_DEFAULT_AUTH } from "../harness/harness.js"; /** diff --git a/packages/taler-harness/src/lint.ts b/packages/taler-harness/src/lint.ts @@ -97,22 +97,22 @@ export async function sh( console.log("executing command:", command); } return new Promise((resolve, reject) => { - const stdoutChunks: Buffer[] = []; - const stderrChunks: Buffer[] = []; + const stdoutChunks: Uint8Array[] = []; + const stderrChunks: Uint8Array[] = []; const proc = spawn(command, { stdio: ["inherit", "pipe", "pipe"], shell: true, env: env, }); proc.stdout.on("data", (x) => { - if (x instanceof Buffer) { + if (x instanceof Uint8Array) { stdoutChunks.push(x); } else { throw Error("unexpected data chunk type"); } }); proc.stderr.on("data", (x) => { - if (x instanceof Buffer) { + if (x instanceof Uint8Array) { stderrChunks.push(x); } else { throw Error("unexpected data chunk type"); diff --git a/packages/taler-harness/tsconfig.json b/packages/taler-harness/tsconfig.json @@ -2,11 +2,9 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["ES2020"], + "types": ["node"], "outDir": "lib", - "rootDir": "src", - "baseUrl": "./src", - "skipLibCheck": true /* Skip type checking of declaration files. */ - + "rootDir": "./src" }, "include": ["src/**/*"], "references": [ diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json @@ -74,7 +74,7 @@ "ava": "^8.0.0", "c8": "^11.0.0", "esbuild": "^0.28.0", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "big-integer": "^1.6.52", diff --git a/packages/taler-util/src/base64.ts b/packages/taler-util/src/base64.ts @@ -10,12 +10,23 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export function base64FromArrayBuffer(arrayBuffer: ArrayBuffer): string { +export function base64FromArrayBuffer( + arrayBuffer: ArrayBuffer | ArrayBufferView, +): string { var base64 = ""; var encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var bytes = new Uint8Array(arrayBuffer); + let bytes: Uint8Array; + if (ArrayBuffer.isView(arrayBuffer)) { + bytes = new Uint8Array( + arrayBuffer.buffer, + arrayBuffer.byteOffset, + arrayBuffer.byteLength, + ); + } else { + bytes = new Uint8Array(arrayBuffer); + } var byteLength = bytes.byteLength; var byteRemainder = byteLength % 3; var mainLength = byteLength - byteRemainder; diff --git a/packages/taler-util/src/http-client/exchange-client.ts b/packages/taler-util/src/http-client/exchange-client.ts @@ -1259,7 +1259,7 @@ export class TalerExchangeHttpClient { account: string, params: PaginationParams = {}, ): Promise< - | OperationOk<ArrayBuffer> + | OperationOk<Uint8Array> | OperationFail< | HttpStatusCode.NoContent | HttpStatusCode.Forbidden diff --git a/packages/taler-util/src/http-client/merchant.ts b/packages/taler-util/src/http-client/merchant.ts @@ -4009,7 +4009,7 @@ export class TalerMerchantManagementHttpClient extends TalerMerchantInstanceHttp name: "transactions" | "money-pots" | "taxes" | "sales-funnel", params: TalerMerchantApi.GetStatisticsReportParams = {}, ): Promise< - | OperationOk<ArrayBuffer> + | OperationOk<Uint8Array> | OperationFail<HttpStatusCode.NotFound> | OperationFail<HttpStatusCode.Gone> | OperationFail<HttpStatusCode.Unauthorized> diff --git a/packages/taler-util/src/http-common.ts b/packages/taler-util/src/http-common.ts @@ -39,7 +39,7 @@ export interface HttpResponse { headers: Headers; json(): Promise<any>; text(): Promise<string>; - bytes(): Promise<ArrayBuffer>; + bytes(): Promise<Uint8Array>; } export const DEFAULT_REQUEST_TIMEOUT_MS = 60000; @@ -59,7 +59,7 @@ export interface HttpRequestOptions { */ cancellationToken?: CancellationToken; - body?: string | ArrayBuffer | object; + body?: string | Uint8Array | object; /** * How to handle redirects. @@ -505,22 +505,22 @@ export interface HttpLibArgs { printAsCurl?: boolean; } -export function encodeBody(body: unknown): ArrayBuffer { +export function encodeBody(body: unknown): Uint8Array { if (body == null) { - return new ArrayBuffer(0); + return new Uint8Array(0); } if (typeof body === "string") { - return textEncoder.encode(body).buffer; + return textEncoder.encode(body); } else if (ArrayBuffer.isView(body)) { - return body.buffer; + return new Uint8Array(body.buffer, body.byteOffset, body.byteLength); } else if (body instanceof ArrayBuffer) { - return body; + return new Uint8Array(body); } else if (body instanceof URLSearchParams) { - return textEncoder.encode(body.toString()).buffer; + return textEncoder.encode(body.toString()); } else if (typeof body === "object" && body.constructor.name === "FormData") { - return body as ArrayBuffer; + return new Uint8Array(body as ArrayBuffer); } else if (typeof body === "object") { - return textEncoder.encode(JSON.stringify(body)).buffer; + return textEncoder.encode(JSON.stringify(body)); } throw new TypeError("unsupported request body type"); } diff --git a/packages/taler-util/src/http-impl.node.ts b/packages/taler-util/src/http-impl.node.ts @@ -138,7 +138,7 @@ export class HttpLibImpl implements HttpRequestLibrary { } logger.trace(`request ${rid} timeout ${timeoutMs} ms`); - let reqBody: ArrayBuffer | undefined; + let reqBody: Uint8Array | undefined; if ( opt?.method == "POST" || @@ -149,7 +149,7 @@ export class HttpLibImpl implements HttpRequestLibrary { } if (reqBody && opt?.compress === "deflate") { - reqBody = deflateSync(reqBody); + reqBody = new Uint8Array(deflateSync(reqBody)); requestHeadersMap["Content-Encoding"] = "deflate"; } diff --git a/packages/taler-util/src/http-impl.qtart.ts b/packages/taler-util/src/http-impl.qtart.ts @@ -97,7 +97,7 @@ export class HttpLibImpl implements HttpRequestLibrary { ); } - let data: ArrayBuffer | undefined = undefined; + let data: Uint8Array | undefined = undefined; const requestHeadersMap = getDefaultHeaders(method); if (opt?.headers) { Object.entries(opt?.headers).forEach(([key, value]) => { @@ -216,7 +216,7 @@ export class HttpLibImpl implements HttpRequestLibrary { requestMethod: method, headers, async bytes() { - return res.data; + return new Uint8Array(res.data); }, json() { const text = textDecoder.decode(res.data); diff --git a/packages/taler-util/src/payto.ts b/packages/taler-util/src/payto.ts @@ -228,7 +228,7 @@ export namespace Paytos { export function parseReservePub( reserve: string | undefined, ): - | ResultOk<Uint8Array<ArrayBufferLike>> + | ResultOk<Uint8Array> | ResultError<ReservePubParseError, { message: string } | undefined> { if (!reserve) return Result.error(ReservePubParseError.WRONG_LENGTH); try { diff --git a/packages/taler-util/src/qtart.ts b/packages/taler-util/src/qtart.ts @@ -12,7 +12,7 @@ export interface QjsHttpResp { export interface QjsHttpOptions { method: string; debug?: boolean; - data?: ArrayBuffer; + data?: ArrayBuffer | ArrayBufferView; headers?: string[]; } diff --git a/packages/taler-util/src/rfc3548.ts b/packages/taler-util/src/rfc3548.ts @@ -21,8 +21,13 @@ const encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; /** * base32 RFC 3548 */ -export function encodeRfc3548Base32(data: ArrayBuffer) { - const dataBytes = new Uint8Array(data); +export function encodeRfc3548Base32(data: ArrayBuffer | ArrayBufferView) { + let dataBytes: Uint8Array; + if (ArrayBuffer.isView(data)) { + dataBytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + } else { + dataBytes = new Uint8Array(data); + } let sb = ""; const size = data.byteLength; let bitBuf = 0; diff --git a/packages/taler-util/src/taler-crypto.ts b/packages/taler-util/src/taler-crypto.ts @@ -30,12 +30,9 @@ import { hmacSha256, hmacSha512 } from "./kdf.js"; import { Logger } from "./logging.js"; import * as nacl from "./nacl-fast.js"; import { secretbox } from "./nacl-fast.js"; +import { TalerSignaturePurpose } from "./taler_signatures.js"; import { TalerProtocolDuration, TalerProtocolTimestamp } from "./time.js"; -import { - CoinPublicKeyString, - EcdhePublicKey, - HashCodeString, -} from "./types-taler-common.js"; +import { CoinPublicKeyString, HashCodeString } from "./types-taler-common.js"; import { CoinEnvelope, DenomKeyType, @@ -43,8 +40,6 @@ import { } from "./types-taler-exchange.js"; import { TokenEnvelope, TokenIssuePublicKey } from "./types-taler-merchant.js"; import { PayWalletData } from "./types-taler-wallet.js"; -import { arrayBuffer } from "node:stream/consumers"; -import { TalerSignaturePurpose } from "./taler_signatures.js"; const isEddsaPubP: unique symbol = Symbol("isEddsaPubP"); type FlavorEddsaPubP = { @@ -226,13 +221,18 @@ function getValue(chr: string): number { throw new EncodingError(); } -export function encodeCrock(data: ArrayBuffer): string { +export function encodeCrock(data: ArrayBuffer | ArrayBufferView): string { + let dataBytes: Uint8Array; + if (ArrayBuffer.isView(data)) { + dataBytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + } else { + dataBytes = new Uint8Array(data); + } if (tart) { - return tart.encodeCrock(data); + return tart.encodeCrock(dataBytes); } - const dataBytes = new Uint8Array(data); let sb = ""; - const size = data.byteLength; + const size = dataBytes.byteLength; let bitBuf = 0; let numBits = 0; let pos = 0; diff --git a/packages/taler-util/src/whatwg-url.ts b/packages/taler-util/src/whatwg-url.ts @@ -32,9 +32,7 @@ function utf8Encode(string: string | undefined) { return utf8Encoder.encode(string); } -function utf8DecodeWithoutBOM( - bytes: DataView | ArrayBuffer | null | undefined, -) { +function utf8DecodeWithoutBOM(bytes: Uint8Array) { return utf8Decoder.decode(bytes); } @@ -151,7 +149,7 @@ function percentEncode(c: number) { } // https://url.spec.whatwg.org/#percent-decode -function percentDecodeBytes(input: Uint8Array) { +function percentDecodeBytes(input: Uint8Array): Uint8Array { const output = new Uint8Array(input.byteLength); let outputIndex = 0; for (let i = 0; i < input.byteLength; ++i) { diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json @@ -36,7 +36,7 @@ "c8": "^11.0.0", "prettier": "^3.8.3", "typedoc": "^0.28.19", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/taler-wallet-cli/tsconfig.json b/packages/taler-wallet-cli/tsconfig.json @@ -2,9 +2,9 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["ES2020"], + "types": ["node"], "outDir": "lib", - "rootDir": "src", - "baseUrl": "./src" + "rootDir": "src" }, "include": ["src/**/*"], "references": [ diff --git a/packages/taler-wallet-core/package.json b/packages/taler-wallet-core/package.json @@ -60,7 +60,7 @@ "jed": "^1.1.1", "prettier": "^3.8.3", "typedoc": "^0.28.19", - "typescript": "^5.7.3" + "typescript": "^6.0.3" }, "dependencies": { "@gnu-taler/idb-bridge": "workspace:*", diff --git a/packages/taler-wallet-webextension/package.json b/packages/taler-wallet-webextension/package.json @@ -46,7 +46,7 @@ "esbuild": "^0.28.0", "mocha": "^11.7.5", "polished": "^4.1.4", - "typescript": "5.7.3" + "typescript": "6.0.3" }, "pogen": { "domain": "taler-wallet-webex" diff --git a/packages/taler-wallet-webextension/src/custom.d.ts b/packages/taler-wallet-webextension/src/custom.d.ts @@ -13,26 +13,37 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ + declare module "*.jpeg" { const content: any; export default content; } + declare module "*.jpg" { const content: any; export default content; } + declare module "*.png" { const content: any; export default content; } + declare module "*.svg" { const content: any; export default content; } -declare const __VERSION__: string; -declare const __GIT_HASH__: string; + +declare module "*.css" { + const classes: { [key: string]: string }; + export default classes; +} declare module "*.module.css" { const classes: { [key: string]: string }; export default classes; } + +declare const __VERSION__: string; + +declare const __GIT_HASH__: string; diff --git a/packages/taler-wallet-webextension/tsconfig.json b/packages/taler-wallet-webextension/tsconfig.json @@ -2,13 +2,12 @@ "extends": "../../tsconfig.defaults.json", "compilerOptions": { "lib": ["es2020", "DOM"], - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */, - "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories - "skipLibCheck": true, - "preserveSymlinks": true, + "types": ["mocha", "chrome"], + "jsx": "react", + "jsxFactory": "h", + "jsxFragmentFactory": "Fragment", "paths": { - "@assets/*": ["../../contrib/taler-assets/*"], + "@assets/*": ["../../contrib/taler-assets/*"] }, "outDir": "lib", "rootDir": "./src" diff --git a/packages/web-util/package.json b/packages/web-util/package.json @@ -54,7 +54,7 @@ "sass": "1.56.1", "swr": "2.0.3", "tslib": "^2.6.2", - "typescript": "^5.7.3", + "typescript": "^6.0.3", "ws": "7.4.5" }, "dependencies": { diff --git a/packages/web-util/src/index.build.ts b/packages/web-util/src/index.build.ts @@ -124,49 +124,6 @@ const sassPlugin: esbuild.Plugin = { }, }; -/** - * Problem: - * No loader is configured for ".node" files: ../../node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node - * - * Reference: - * https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487 - */ -const nativeNodeModulesPlugin: esbuild.Plugin = { - name: "native-node-modules", - setup(build) { - // If a ".node" file is imported within a module in the "file" namespace, resolve - // it to an absolute path and put it into the "node-file" virtual namespace. - build.onResolve({ filter: /\.node$/, namespace: "file" }, (args) => ({ - path: require.resolve(args.path, { paths: [args.resolveDir] }), - namespace: "node-file", - })); - - // Files in the "node-file" virtual namespace call "require()" on the - // path from esbuild of the ".node" file in the output directory. - build.onLoad({ filter: /.*/, namespace: "node-file" }, (args) => ({ - contents: ` - import path from ${JSON.stringify(args.path)} - try { module.exports = require(path) } - catch {} - `, - })); - - // If a ".node" file is imported within a module in the "node-file" namespace, put - // it in the "file" namespace where esbuild's default loading behavior will handle - // it. It is already an absolute path since we resolved it to one above. - build.onResolve({ filter: /\.node$/, namespace: "node-file" }, (args) => ({ - path: args.path, - namespace: "file", - })); - - // Tell esbuild's default loading behavior to use the "file" loader for - // these ".node" files. - let opts = build.initialOptions; - opts.loader = opts.loader || {}; - opts.loader[".node"] = "file"; - }, -}; - const postCssPlugin: esbuild.Plugin = { name: "custom-build-postcss", setup(build) { diff --git a/packages/web-util/src/utils/http-impl.browser.ts b/packages/web-util/src/utils/http-impl.browser.ts @@ -87,14 +87,14 @@ export class BrowserHttpLibDepreacted implements HttpRequestLibrary { ); } - const encodedBody: ArrayBuffer | undefined = + const encodedBody: Uint8Array | undefined = requestMethod === "POST" || requestMethod === "PUT" || requestMethod === "PATCH" ? encodeBody(requestBody) : undefined; - const myBody = + const myBody: Uint8Array | undefined = !options?.compress || !encodedBody ? encodedBody : await compress(options.compress, encodedBody); @@ -154,7 +154,7 @@ export class BrowserHttpLibDepreacted implements HttpRequestLibrary { }); myRequest.responseType = "arraybuffer"; - myRequest.send(myBody); + myRequest.send(myBody != null ? new Uint8Array(myBody) : undefined); myRequest.addEventListener("readystatechange", (e) => { if (myRequest.readyState === XMLHttpRequest.DONE) { @@ -264,12 +264,13 @@ export class BrowserHttpLibDepreacted implements HttpRequestLibrary { export async function compress( alg: "gzip" | "deflate" | undefined, - buf: ArrayBuffer, -): Promise<ArrayBuffer> { + buf: Uint8Array, +): Promise<Uint8Array> { if (!alg) return buf; const cs = new CompressionStream(alg); const writer = cs.writable.getWriter(); - writer.write(buf); + writer.write(new Uint8Array(buf)); writer.close(); - return new Response(cs.readable).arrayBuffer(); + const retBuf = await new Response(cs.readable).arrayBuffer(); + return new Uint8Array(retBuf); } diff --git a/packages/web-util/src/utils/http-impl.sw.ts b/packages/web-util/src/utils/http-impl.sw.ts @@ -81,7 +81,7 @@ export class BrowserFetchHttpLib implements HttpRequestLibrary { ); } - const encodedBody: ArrayBuffer | undefined = + const encodedBody: Uint8Array | undefined = requestMethod === "POST" || requestMethod === "PUT" || requestMethod === "PATCH" @@ -131,7 +131,7 @@ export class BrowserFetchHttpLib implements HttpRequestLibrary { try { const response = await fetch(requestUrl, { headers: requestHeadersMap, - body: myBody, + body: myBody != null ? new Uint8Array(myBody) : undefined, method: requestMethod, signal: controller.signal, redirect: requestRedirect, @@ -154,7 +154,11 @@ export class BrowserFetchHttpLib implements HttpRequestLibrary { requestUrl, json, text, - bytes: async () => (await response.blob()).arrayBuffer(), + bytes: async () => { + const blob = await response.blob(); + const buf = await blob.arrayBuffer(); + return new Uint8Array(buf); + }, }; } catch (e: unknown) { if (!(e instanceof Error)) { diff --git a/packages/web-util/src/utils/request.ts b/packages/web-util/src/utils/request.ts @@ -97,7 +97,11 @@ export async function defaultRequestHandler<T>( } else if (requestBody instanceof ArrayBuffer) { payload = requestBody; } else if (ArrayBuffer.isView(requestBody)) { - payload = requestBody; + payload = new Uint8Array( + requestBody.buffer, + requestBody.byteOffset, + requestBody.byteLength, + ) as Uint8Array<ArrayBuffer>; } else if (typeof requestBody === "object") { payload = JSON.stringify(requestBody); } else { diff --git a/packages/web-util/tsconfig.json b/packages/web-util/tsconfig.json @@ -6,15 +6,11 @@ "jsxFragmentFactory": "Fragment", "lib": ["DOM", "ES2020"], "outDir": "lib", - // FIXME: Why is this needed? - "preserveSymlinks": true, - // FIXME: Eventually, code should compile without this. - "skipLibCheck": true, "paths": { "@assets/*": ["../../contrib/taler-assets/*"], }, "rootDir": "./src", - "typeRoots": ["./node_modules/@types"] + "types": ["chrome"], }, "references": [ { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml @@ -28,7 +28,7 @@ importers: version: 3.1.1(eslint@9.39.4(jiti@1.21.7)) eslint-plugin-import: specifier: ^2.31.0 - version: 2.32.0(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint@9.39.4(jiti@1.21.7)) + version: 2.32.0(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint@9.39.4(jiti@1.21.7)) eslint-plugin-jsx-a11y: specifier: ^6.10.2 version: 6.10.2(eslint@9.39.4(jiti@1.21.7)) @@ -46,13 +46,13 @@ importers: version: 3.8.3 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 typescript-eslint: specifier: ^8.24.1 - version: 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + version: 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) packages/aml-backoffice-ui: dependencies: @@ -89,7 +89,7 @@ importers: version: link:../pogen '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3))) + version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3))) '@types/chai': specifier: ^4.3.0 version: 4.3.3 @@ -116,10 +116,10 @@ importers: version: 8.4.49 tailwindcss: specifier: 3.4.17 - version: 3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/anastasis-cli: dependencies: @@ -144,10 +144,10 @@ importers: version: 3.8.3 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/anastasis-core: dependencies: @@ -168,8 +168,8 @@ importers: specifier: ^11.0.0 version: 11.0.0 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/anastasis-webui: dependencies: @@ -229,8 +229,8 @@ importers: specifier: 1.56.1 version: 1.56.1 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/auditor-backoffice-ui: dependencies: @@ -321,10 +321,10 @@ importers: version: 0.5.21 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/bank-ui: dependencies: @@ -352,7 +352,7 @@ importers: version: link:../pogen '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3))) + version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3))) '@types/chai': specifier: ^4.3.0 version: 4.3.3 @@ -379,10 +379,10 @@ importers: version: 11.7.5 tailwindcss: specifier: 3.4.17 - version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/challenger-ui: dependencies: @@ -404,7 +404,7 @@ importers: version: link:../pogen '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3))) + version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3))) '@types/chai': specifier: ^4.3.0 version: 4.3.3 @@ -431,10 +431,10 @@ importers: version: 11.7.5 tailwindcss: specifier: 3.4.17 - version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/idb-bridge: dependencies: @@ -455,8 +455,8 @@ importers: specifier: ^3.8.3 version: 3.8.3 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/kyc-ui: dependencies: @@ -481,7 +481,7 @@ importers: version: link:../pogen '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3))) + version: 0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3))) '@types/chai': specifier: ^4.3.0 version: 4.3.3 @@ -508,10 +508,10 @@ importers: version: 11.7.5 tailwindcss: specifier: 3.4.17 - version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/merchant-backend-ui: dependencies: @@ -551,13 +551,13 @@ importers: version: 1.0.14 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.11.13)(typescript@5.7.3) + version: 10.9.1(@types/node@20.11.13)(typescript@6.0.3) tslib: specifier: 2.6.2 version: 2.6.2 typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/merchant-backoffice-ui: dependencies: @@ -645,10 +645,10 @@ importers: version: 0.5.21 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/pogen: dependencies: @@ -672,8 +672,8 @@ importers: specifier: ^8.0.0 version: 8.0.0(@ava/typescript@4.1.0)(encoding@0.1.13) typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/taler-harness: dependencies: @@ -706,8 +706,8 @@ importers: specifier: ^3.8.3 version: 3.8.3 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/taler-util: dependencies: @@ -746,8 +746,8 @@ importers: specifier: ^0.28.0 version: 0.28.0 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/taler-wallet-cli: dependencies: @@ -772,10 +772,10 @@ importers: version: 3.8.3 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/taler-wallet-core: dependencies: @@ -818,10 +818,10 @@ importers: version: 3.8.3 typedoc: specifier: ^0.28.19 - version: 0.28.19(typescript@5.7.3) + version: 0.28.19(typescript@6.0.3) typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 packages/taler-wallet-embedded: dependencies: @@ -918,8 +918,8 @@ importers: specifier: ^4.1.4 version: 4.2.2 typescript: - specifier: 5.7.3 - version: 5.7.3 + specifier: 6.0.3 + version: 6.0.3 packages/web-util: dependencies: @@ -931,7 +931,7 @@ importers: version: 1.4.4 tailwindcss: specifier: 3.4.17 - version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) devDependencies: '@gnu-taler/pogen': specifier: workspace:* @@ -974,7 +974,7 @@ importers: version: 8.4.49 postcss-load-config: specifier: ^4.0.1 - version: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + version: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) preact: specifier: 10.11.3 version: 10.11.3 @@ -994,8 +994,8 @@ importers: specifier: ^2.6.2 version: 2.8.1 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^6.0.3 + version: 6.0.3 ws: specifier: 7.4.5 version: 7.4.5 @@ -3750,8 +3750,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true @@ -4204,15 +4204,15 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@tailwindcss/forms@0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)))': + '@tailwindcss/forms@0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)))': dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + tailwindcss: 3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) - '@tailwindcss/forms@0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)))': + '@tailwindcss/forms@0.5.3(tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)))': dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)) + tailwindcss: 3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)) '@tsconfig/node10@1.0.9': {} @@ -4328,40 +4328,40 @@ snapshots: dependencies: '@types/node': 20.11.13 - '@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) '@typescript-eslint/scope-manager': 8.59.3 - '@typescript-eslint/type-utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.59.3 eslint: 9.39.4(jiti@1.21.7) ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3)': dependencies: '@typescript-eslint/scope-manager': 8.59.3 '@typescript-eslint/types': 8.59.3 - '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.4(jiti@1.21.7) - typescript: 5.7.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.59.3(typescript@5.7.3)': + '@typescript-eslint/project-service@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@5.7.3) + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) '@typescript-eslint/types': 8.59.3 debug: 4.4.3(supports-color@8.1.1) - typescript: 5.7.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -4370,47 +4370,47 @@ snapshots: '@typescript-eslint/types': 8.59.3 '@typescript-eslint/visitor-keys': 8.59.3 - '@typescript-eslint/tsconfig-utils@8.59.3(typescript@5.7.3)': + '@typescript-eslint/tsconfig-utils@8.59.3(typescript@6.0.3)': dependencies: - typescript: 5.7.3 + typescript: 6.0.3 - '@typescript-eslint/type-utils@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3)': dependencies: '@typescript-eslint/types': 8.59.3 - '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.7.3) - '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) debug: 4.4.3(supports-color@8.1.1) eslint: 9.39.4(jiti@1.21.7) - ts-api-utils: 2.5.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.59.3': {} - '@typescript-eslint/typescript-estree@8.59.3(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.59.3(typescript@5.7.3) - '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@5.7.3) + '@typescript-eslint/project-service': 8.59.3(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) '@typescript-eslint/types': 8.59.3 '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3(supports-color@8.1.1) minimatch: 10.2.5 semver: 7.8.0 tinyglobby: 0.2.16 - ts-api-utils: 2.5.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/utils@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4(jiti@1.21.7)) '@typescript-eslint/scope-manager': 8.59.3 '@typescript-eslint/types': 8.59.3 - '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) eslint: 9.39.4(jiti@1.21.7) - typescript: 5.7.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -5155,11 +5155,11 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4(jiti@1.21.7)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4(jiti@1.21.7)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) eslint: 9.39.4(jiti@1.21.7) eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -5169,7 +5169,7 @@ snapshots: dependencies: eslint: 9.39.4(jiti@1.21.7) - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint@9.39.4(jiti@1.21.7)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint@9.39.4(jiti@1.21.7)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -5180,7 +5180,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.4(jiti@1.21.7) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4(jiti@1.21.7)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4(jiti@1.21.7)) hasown: 2.0.3 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -5192,7 +5192,7 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -6219,21 +6219,21 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.4.49 - postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)): + postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)): dependencies: lilconfig: 3.1.3 yaml: 2.9.0 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.1(@types/node@18.11.17)(typescript@5.7.3) + ts-node: 10.9.1(@types/node@18.11.17)(typescript@6.0.3) - postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)): + postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)): dependencies: lilconfig: 3.1.3 yaml: 2.9.0 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.1(@types/node@20.11.13)(typescript@5.7.3) + ts-node: 10.9.1(@types/node@20.11.13)(typescript@6.0.3) postcss-nested@6.2.0(postcss@8.4.49): dependencies: @@ -6750,7 +6750,7 @@ snapshots: react: 18.3.1 use-sync-external-store: 1.2.0(react@18.3.1) - tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)): + tailwindcss@3.4.17(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -6769,7 +6769,7 @@ snapshots: postcss: 8.4.49 postcss-import: 15.1.0(postcss@8.4.49) postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3)) + postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3)) postcss-nested: 6.2.0(postcss@8.4.49) postcss-selector-parser: 6.1.2 resolve: 1.22.8 @@ -6777,7 +6777,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)): + tailwindcss@3.4.17(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -6796,7 +6796,7 @@ snapshots: postcss: 8.4.49 postcss-import: 15.1.0(postcss@8.4.49) postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3)) + postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3)) postcss-nested: 6.2.0(postcss@8.4.49) postcss-selector-parser: 6.1.2 resolve: 1.22.8 @@ -6853,13 +6853,13 @@ snapshots: tr46@0.0.3: {} - ts-api-utils@2.5.0(typescript@5.7.3): + ts-api-utils@2.5.0(typescript@6.0.3): dependencies: - typescript: 5.7.3 + typescript: 6.0.3 ts-interface-checker@0.1.13: {} - ts-node@10.9.1(@types/node@18.11.17)(typescript@5.7.3): + ts-node@10.9.1(@types/node@18.11.17)(typescript@6.0.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -6873,12 +6873,12 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.3 + typescript: 6.0.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optional: true - ts-node@10.9.1(@types/node@20.11.13)(typescript@5.7.3): + ts-node@10.9.1(@types/node@20.11.13)(typescript@6.0.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -6892,7 +6892,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.3 + typescript: 6.0.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -6952,27 +6952,27 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typedoc@0.28.19(typescript@5.7.3): + typedoc@0.28.19(typescript@6.0.3): dependencies: '@gerrit0/mini-shiki': 3.23.0 lunr: 2.3.9 markdown-it: 14.1.1 minimatch: 10.2.5 - typescript: 5.7.3 + typescript: 6.0.3 yaml: 2.9.0 - typescript-eslint@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3): + typescript-eslint@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3))(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.7.3) - '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3))(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@9.39.4(jiti@1.21.7))(typescript@6.0.3) eslint: 9.39.4(jiti@1.21.7) - typescript: 5.7.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - typescript@5.7.3: {} + typescript@6.0.3: {} uc.micro@2.1.0: {}