Skip to content

Commit 4cc7d88

Browse files
authored
chore(typescript): bump typescript dependency (#7932)
* fix llmobs, prisma, and test optimization tests * Add TODO for follow up changes
1 parent b4bd5c4 commit 4cc7d88

7 files changed

Lines changed: 15 additions & 10 deletions

File tree

integration-tests/cypress/cypress.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ moduleTypes.forEach(({
150150

151151
// cypress-fail-fast is required as an incompatible plugin.
152152
// typescript is required to compile .cy.ts spec files in the pre-compiled JS tests.
153-
useSandbox([`cypress@${version}`, 'cypress-fail-fast@7.1.0', 'typescript'], true)
153+
// typescript@5 is pinned because typescript@6 emits "use strict" on line 1 for
154+
// non-module files, shifting compiled line numbers and breaking source map resolution.
155+
// TODO: Update tests files accordingly and test with different TS versions
156+
useSandbox([`cypress@${version}`, 'cypress-fail-fast@7.1.0', 'typescript@5'], true)
154157

155158
before(async function () {
156159
// Note: Cypress binary is already installed during useSandbox() via the postinstall script

integration-tests/playwright/playwright.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ versions.forEach((version) => {
8484
this.retries(2)
8585
this.timeout(80000)
8686

87-
useSandbox([`@playwright/test@${version}`, '@types/node', 'typescript'], true)
87+
// TODO: Update tests files accordingly and test with different TS versions
88+
useSandbox([`@playwright/test@${version}`, '@types/node', 'typescript@5'], true)
8889

8990
before(function (done) {
9091
// Increase timeout for this hook specifically to account for slow chromium installation in CI

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"semver": "^7.7.2",
203203
"sinon": "^21.0.3",
204204
"tiktoken": "^1.0.21",
205-
"typescript": "^5.9.2",
205+
"typescript": "^6.0.2",
206206
"workerpool": "^10.0.0",
207207
"yaml": "^2.8.3",
208208
"yarn-deduplicate": "^6.0.2"

packages/datadog-plugin-prisma/test/integration-test/client.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ describe('esm', () => {
271271
' --target ES2023' +
272272
' --module ESNext' +
273273
' --strict true' +
274-
' --moduleResolution node' +
274+
' --moduleResolution bundler' +
275275
' --esModuleInterop true'
276276
)
277277
}

packages/dd-trace/test/llmobs/sdk/typescript/index.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const testVersions = [
2727
'^3',
2828
'^4',
2929
'^5',
30+
'^6',
3031
]
3132

3233
const testCases = [
@@ -100,7 +101,7 @@ describe('typescript', () => {
100101

101102
// compile typescript
102103
execSync(
103-
`tsc --target ES6 --experimentalDecorators --module commonjs --sourceMap ${file}.ts`,
104+
`tsc --target ES6 --experimentalDecorators --module commonjs --sourceMap --types node ${file}.ts`,
104105
{ cwd, stdio: 'inherit' }
105106
)
106107

packages/dd-trace/test/plugins/versions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"stripe": "20.1.0",
201201
"tedious": "19.2.0",
202202
"tinypool": "2.1.0",
203-
"typescript": "5.9.3",
203+
"typescript": "6.0.2",
204204
"undici": "7.18.2",
205205
"vitest": "4.1.0",
206206
"when": "3.7.8",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,10 +4372,10 @@ typedarray@^0.0.6:
43724372
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
43734373
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==
43744374

4375-
typescript@^5.9.2:
4376-
version "5.9.3"
4377-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
4378-
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
4375+
typescript@^6.0.2:
4376+
version "6.0.2"
4377+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f"
4378+
integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==
43794379

43804380
unbox-primitive@^1.1.0:
43814381
version "1.1.0"

0 commit comments

Comments
 (0)