Skip to content

Commit

Permalink
[code-infra] Use tsx instead of ts-node (#40428)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Jan 4, 2024
1 parent 76e8700 commit 055975a
Show file tree
Hide file tree
Showing 3 changed files with 297 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Use Node.js 18.x
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18.18 # ts-node throws error on Node.js 18.19 (https://github.com/TypeStrong/ts-node/issues/2094)
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- run: pnpm install
- run: pnpm release:build
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"release:publish:dry-run": "pnpm publish --recursive --tag latest --registry=\"http://localhost:4873/\"",
"release:tag": "node scripts/releaseTag.mjs",
"docs:api": "rimraf --glob ./docs/pages/**/api-docs ./docs/pages/**/api && pnpm docs:api:build",
"docs:api:build": "ts-node -r tsconfig-paths/register ./scripts/buidApiDocs/index.ts",
"docs:api:build": "tsx ./scripts/buidApiDocs/index.ts",
"docs:build": "pnpm --filter docs build",
"docs:build-sw": "pnpm --filter docs build-sw",
"docs:build-color-preview": "babel-node scripts/buildColorTypes",
Expand All @@ -34,7 +34,7 @@
"docs:typescript:formatted": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/formattedTSDemos",
"docs:mdicons:synonyms": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js,.mjs\" ./docs/scripts/updateIconSynonyms && pnpm prettier",
"extract-error-codes": "cross-env MUI_EXTRACT_ERROR_CODES=true lerna run --concurrency 8 build:modern",
"rsc:build": "ts-node ./packages/rsc-builder/buildRsc.ts",
"rsc:build": "tsx ./packages/rsc-builder/buildRsc.ts",
"template:screenshot": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/generateTemplateScreenshots",
"install:codesandbox": "pnpm install --no-frozen-lockfile",
"jsonlint": "node ./scripts/jsonlint.mjs",
Expand Down Expand Up @@ -71,7 +71,7 @@
"test:argos": "node ./scripts/pushArgos.mjs",
"typescript": "lerna run --no-bail --parallel typescript",
"typescript:ci": "lerna run --concurrency 5 --no-bail --no-sort typescript",
"validate-declarations": "ts-node --esm scripts/validateTypescriptDeclarations.mts",
"validate-declarations": "tsx scripts/validateTypescriptDeclarations.mts",
"generate-codeowners": "node scripts/generateCodeowners.mjs"
},
"dependencies": {
Expand Down Expand Up @@ -176,8 +176,7 @@
"stylelint-config-standard": "^34.0.0",
"stylelint-processor-styled-components": "^1.10.0",
"terser-webpack-plugin": "^5.3.9",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"typescript-to-proptypes": "workspace:^",
"webpack": "^5.89.0",
Expand Down
Loading

0 comments on commit 055975a

Please sign in to comment.