diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 3e452717ed41ab..2203fba6356d32 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -61,11 +61,8 @@ jobs: mode: default - name: Run API docs tests - # install ts-node for ts build scripts to execute properly without potentially installing - # conflicting deps when running scripts locally - # see: https://github.com/getsentry/sentry/pull/32328/files run: | - pnpm add ts-node && make test-api-docs + make test-api-docs - name: Inspect failure if: failure() diff --git a/.github/workflows/openapi-diff.yml b/.github/workflows/openapi-diff.yml index 0f8b6a1184237b..d5a33a1e41c291 100644 --- a/.github/workflows/openapi-diff.yml +++ b/.github/workflows/openapi-diff.yml @@ -50,11 +50,8 @@ jobs: - name: Build OpenAPI Derefed JSON if: steps.changes.outputs.api_docs == 'true' - # install ts-node for ts build scripts to execute properly without potentially installing - # conflicting deps when running scripts locally - # see: https://github.com/getsentry/sentry/pull/32328/files run: | - pnpm add ts-node && make build-api-docs + make build-api-docs - name: Compare OpenAPI Derefed JSON if: steps.changes.outputs.api_docs == 'true' diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index a6239f595a1608..98405d156f33a0 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -54,11 +54,8 @@ jobs: - name: Build OpenAPI Derefed JSON if: steps.changes.outputs.api_docs == 'true' - # install ts-node for ts build scripts to execute properly without potentially installing - # conflicting deps when running scripts locally - # see: https://github.com/getsentry/sentry/pull/32328/files run: | - pnpm add ts-node && make build-api-docs + make build-api-docs - name: Build RPC method schema if: steps.changes.outputs.api_docs == 'true' diff --git a/Makefile b/Makefile index c748eec63d1112..0d4efd339b01fd 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ build-api-docs: build-deprecated-docs build-spectacular-docs watch-api-docs: @cd api-docs/ && pnpm install --frozen-lockfile - @cd api-docs/ && ts-node ./watch.ts + @cd api-docs/ && node --experimental-transform-types ./watch.ts diff-api-docs: @echo "--> diffing local api docs against sentry-api-schema/openapi-derefed.json" diff --git a/knip.config.ts b/knip.config.ts index 9d6087c65140ec..0bc6f5a518f5de 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -75,6 +75,8 @@ const config: KnipConfig = { '@babel/preset-react', // Still used in jest '@babel/preset-typescript', // Still used in jest '@emotion/babel-plugin', // Still used in jest + 'ts-node', // Still used implicitly + 'terser', // Still used in a loader ], rules: { binaries: 'off', diff --git a/package.json b/package.json index 5f577b52c95b44..21cc63a36b48f3 100644 --- a/package.json +++ b/package.json @@ -254,14 +254,14 @@ "dev-acceptance": "NO_DEV_SERVER=1 NODE_ENV=development rspack --watch", "webpack-profile": "NO_TS_FORK=1 rspack --profile --json > stats.json", "install-api-docs": "pnpm install --frozen-lockfile --dir ./api-docs", - "build-deprecated-docs": "pnpm run install-api-docs && ts-node api-docs/index.ts api-docs/openapi.json tests/apidocs/openapi-deprecated.json", - "diff-docs": "pnpm run install-api-docs && ts-node api-docs/openapi-diff.ts", - "deref-api-docs": "ts-node api-docs/index.ts tests/apidocs/openapi-spectacular.json tests/apidocs/openapi-derefed.json", + "build-deprecated-docs": "pnpm run install-api-docs && node --experimental-transform-types api-docs/index.ts api-docs/openapi.json tests/apidocs/openapi-deprecated.json", + "diff-docs": "pnpm run install-api-docs && node --experimental-transform-types api-docs/openapi-diff.ts", + "deref-api-docs": "node --experimental-transform-types api-docs/index.ts tests/apidocs/openapi-spectacular.json tests/apidocs/openapi-derefed.json", "build-chartcuterie-config": "node --experimental-strip-types config/build-chartcuterie.ts", "build-acceptance": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production rspack", "build-production": "NODE_ENV=production rspack --mode production", "build": "NODE_OPTIONS=--max-old-space-size=4096 rspack", - "build-js-loader": "ts-node scripts/build-js-loader.ts", + "build-js-loader": "node --experimental-transform-types scripts/build-js-loader.ts", "build-js-po": "node --experimental-strip-types build-utils/ts-extract-gettext.ts", "validate-api-examples": "pnpm run --dir api-docs openapi-examples-validator ../tests/apidocs/openapi-derefed.json --no-additional-properties", "mkcert-localhost": "mkcert -key-file config/localhost-key.pem -cert-file config/localhost.pem localhost 127.0.0.1 dev.getsentry.net *.dev.getsentry.net && mkcert -install",