Skip to content

build: use node type transform #93036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/openapi-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading