diff --git a/package-lock.json b/package-lock.json index 0ada11bf..c19b29b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,7 +75,7 @@ "smoldash": "0.11.0", "svelte": "3.59.1", "svelte-preprocess": "5.0.4", - "typescript": "5.1.6", + "typescript": "5.5.3", "vue": "3.3.4" }, "engines": { @@ -16862,10 +16862,11 @@ "dev": true }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index b7cb0bf2..fc5289d0 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "smoldash": "0.11.0", "svelte": "3.59.1", "svelte-preprocess": "5.0.4", - "typescript": "5.1.6", + "typescript": "5.5.3", "vue": "3.3.4" }, "dependencies": { diff --git a/src/extend-expect.ts b/src/extend-expect.ts index c96ac92a..683608d9 100644 --- a/src/extend-expect.ts +++ b/src/extend-expect.ts @@ -225,7 +225,7 @@ const runJestUtilsInNode = (message: string, context: jest.MatcherContext) => { const closeRegex = /\$END_JEST_UTILS\$/g; let jestUtilsCall; while ((jestUtilsCall = jestUtilsCalls.pop())) { - const start = jestUtilsCall.index!; + const start = jestUtilsCall.index; const methodName = jestUtilsCall[1]; closeRegex.lastIndex = start; const closeIndex = closeRegex.exec(message)?.index; diff --git a/tests/utils/runJS.test.tsx b/tests/utils/runJS.test.tsx index cd5bc5bc..32a3951c 100644 --- a/tests/utils/runJS.test.tsx +++ b/tests/utils/runJS.test.tsx @@ -494,8 +494,12 @@ describe('Ecosystem interoperability', () => { plugins: [ sveltePlugin({ preprocess: sveltePreprocess({ - // Does not work with module set to nodenext, works with either commonjs or esnext - typescript: { compilerOptions: { module: 'commonjs' } }, + typescript: { + compilerOptions: { + module: 'preserve', + moduleResolution: 'bundler', + }, + }, }), }), ],