From c75c2985fc291850d6bb223464671fb813354286 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:38:39 +0200 Subject: [PATCH 1/5] Create definitely-typed.yml --- .github/workflows/definitely-typed.yml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/definitely-typed.yml diff --git a/.github/workflows/definitely-typed.yml b/.github/workflows/definitely-typed.yml new file mode 100644 index 000000000..2e72995fd --- /dev/null +++ b/.github/workflows/definitely-typed.yml @@ -0,0 +1,35 @@ +name: Test DefinitelyTyped + +on: + push: + pull_request: + +jobs: + update-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Clone DefinitelyTyped + run: | + git clone https://github.com/DefinitelyTyped/DefinitelyTyped.git + + - name: Install dependencies in DefinitelyTyped + working-directory: ./DefinitelyTyped + run: npm install + + - name: Replace lib.dom.d.ts and lib.dom.iterable.d.ts + run: | + cp ./generated/lib.dom.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + cp ./generated/lib.dom.iterable.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + + - name: Run tests in DefinitelyTyped + working-directory: ./DefinitelyTyped + run: npm test From 5c8f9e070193b60371adc961dc84121b6737a003 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:44:39 +0200 Subject: [PATCH 2/5] Update definitely-typed.yml --- .github/workflows/definitely-typed.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/definitely-typed.yml b/.github/workflows/definitely-typed.yml index 2e72995fd..166eafb89 100644 --- a/.github/workflows/definitely-typed.yml +++ b/.github/workflows/definitely-typed.yml @@ -27,8 +27,8 @@ jobs: - name: Replace lib.dom.d.ts and lib.dom.iterable.d.ts run: | - cp ./generated/lib.dom.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ - cp ./generated/lib.dom.iterable.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + cp ./baselines/lib.dom.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + cp ./baselines/lib.dom.iterable.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ - name: Run tests in DefinitelyTyped working-directory: ./DefinitelyTyped From 2394aab067005ba6de8e8dda2dda5eeb1b4de133 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:48:07 +0200 Subject: [PATCH 3/5] Update definitely-typed.yml --- .github/workflows/definitely-typed.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/definitely-typed.yml b/.github/workflows/definitely-typed.yml index 166eafb89..60f4ff633 100644 --- a/.github/workflows/definitely-typed.yml +++ b/.github/workflows/definitely-typed.yml @@ -25,10 +25,10 @@ jobs: working-directory: ./DefinitelyTyped run: npm install - - name: Replace lib.dom.d.ts and lib.dom.iterable.d.ts + - name: Replace dom.d.ts and dom.iterable.d.ts run: | - cp ./baselines/lib.dom.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ - cp ./baselines/lib.dom.iterable.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + cp ./baselines/dom.generated.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ + cp ./baselines/dom.iterable.generated.d.ts ./DefinitelyTyped/node_modules/typescript/lib/ - name: Run tests in DefinitelyTyped working-directory: ./DefinitelyTyped From a472761f2351cbd3d4c0296775cd96d18be4453f Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:51:49 +0200 Subject: [PATCH 4/5] Update definitely-typed.yml --- .github/workflows/definitely-typed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/definitely-typed.yml b/.github/workflows/definitely-typed.yml index 60f4ff633..0a6e251ba 100644 --- a/.github/workflows/definitely-typed.yml +++ b/.github/workflows/definitely-typed.yml @@ -32,4 +32,4 @@ jobs: - name: Run tests in DefinitelyTyped working-directory: ./DefinitelyTyped - run: npm test + run: npm run test-all From 5630c0cdf3af6e85f0074282e07ca0af684e2691 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:55:06 +0200 Subject: [PATCH 5/5] switch to pnpmp --- .github/workflows/definitely-typed.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/definitely-typed.yml b/.github/workflows/definitely-typed.yml index 0a6e251ba..f9f279b97 100644 --- a/.github/workflows/definitely-typed.yml +++ b/.github/workflows/definitely-typed.yml @@ -17,13 +17,17 @@ jobs: with: node-version: 18 + - name: Install pnpm + run: | + npm install -g pnpm + - name: Clone DefinitelyTyped run: | git clone https://github.com/DefinitelyTyped/DefinitelyTyped.git - - name: Install dependencies in DefinitelyTyped + - name: Install dependencies in DefinitelyTyped using pnpm working-directory: ./DefinitelyTyped - run: npm install + run: pnpm install - name: Replace dom.d.ts and dom.iterable.d.ts run: | @@ -32,4 +36,4 @@ jobs: - name: Run tests in DefinitelyTyped working-directory: ./DefinitelyTyped - run: npm run test-all + run: pnpm run test-all