From b108ece707458bc066a0c206dd96df250f8f557d Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 14 Jan 2026 17:17:45 +0000 Subject: [PATCH] ci: update algolia synonym updater to use node directly rather than tsx With new version of node we can import ts files directly in our scripts rather than using tsx (cherry picked from commit 3f13db87e27f6ffc207fc642979776606a71fcec) --- .github/workflows/ci.yml | 2 +- adev/scripts/synonyms/algolia-synonyms.mts | 2 +- adev/scripts/synonyms/tsconfig.json | 22 ++++++++++++++++++++++ adev/scripts/synonyms/update-synonyms.mts | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 adev/scripts/synonyms/tsconfig.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04ff82f5512..d1be1578cc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,6 +224,6 @@ jobs: configPath: 'adev/firebase.json' distDir: 'dist/bin/adev/dist' - name: Update Algolia synonym record - run: pnpm tsx adev/scripts/synonyms/update-synonyms.mts + run: node adev/scripts/synonyms/update-synonyms.mts env: ALGOLIA_KEY: ${{ secrets.ALGOLIA_SYNONYM_MANAGER }} diff --git a/adev/scripts/synonyms/algolia-synonyms.mts b/adev/scripts/synonyms/algolia-synonyms.mts index e50c8d281f7..78fe68c4e80 100644 --- a/adev/scripts/synonyms/algolia-synonyms.mts +++ b/adev/scripts/synonyms/algolia-synonyms.mts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {SynonymHit} from 'algoliasearch'; +import {type SynonymHit} from 'algoliasearch'; /** * List of synonyms to upload to algolia. diff --git a/adev/scripts/synonyms/tsconfig.json b/adev/scripts/synonyms/tsconfig.json new file mode 100644 index 00000000000..7f56507bc27 --- /dev/null +++ b/adev/scripts/synonyms/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "moduleResolution": "bundler", + "preserveSymlinks": true, + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "allowImportingTsExtensions": true, + "lib": ["ES2022"], + "types": [], + "skipLibCheck": true + } +} diff --git a/adev/scripts/synonyms/update-synonyms.mts b/adev/scripts/synonyms/update-synonyms.mts index c0277df8be5..ee28ec30f31 100644 --- a/adev/scripts/synonyms/update-synonyms.mts +++ b/adev/scripts/synonyms/update-synonyms.mts @@ -7,7 +7,7 @@ */ import {algoliasearch} from 'algoliasearch'; -import synonyms from './algolia-synonyms.mjs'; +import synonyms from './algolia-synonyms.mts'; /** The name of the index being updated. */ const INDEX_NAME = 'angular_v17';