From d709740a196247115467fc433db87a9a2d31c643 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 4 Jul 2025 10:38:26 -0700 Subject: [PATCH 1/4] build: test/build in CI --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..668199c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test + +on: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: + contents: read + +jobs: + test: + name: Test + strategy: + matrix: + node-version: + - 20.19.x + - 22.17.x + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: "${{ matrix.os }}" + steps: + - run: git config --global core.autocrlf input + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: "${{ matrix.node-version }}" + cache: "yarn" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build + run: yarn build + - name: Test + run: yarn lint && yarn test From 154201f1652018fc2c99e843e8b00260ea585bd3 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 4 Jul 2025 10:52:52 -0700 Subject: [PATCH 2/4] fix: make schema script node 20 compat --- package.json | 2 +- scripts/build-dxt-schema.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8417f07..3771938 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "scripts": { "build": "yarn run build:code && yarn run build:schema", "build:code": "tsc", - "build:schema": "node --experimental-strip-types ./scripts/build-dxt-schema.js", + "build:schema": "node ./scripts/build-dxt-schema.js", "dev": "tsc --watch", "test": "jest", "test:watch": "jest --watch", diff --git a/scripts/build-dxt-schema.js b/scripts/build-dxt-schema.js index fd6604d..9c4efe7 100644 --- a/scripts/build-dxt-schema.js +++ b/scripts/build-dxt-schema.js @@ -1,4 +1,4 @@ -import { DxtManifestSchema, DxtSignatureInfoSchema } from "../src/schemas.ts"; +import { DxtManifestSchema, DxtSignatureInfoSchema } from "../dist/schemas.js"; import * as z from "zod/v4"; import fs from "node:fs/promises"; import path from "node:path"; From 79b73b613c37d4fdf50825ef1b51ca53cfa8c0d0 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 4 Jul 2025 11:13:37 -0700 Subject: [PATCH 3/4] test: ensure no-access test is windows compatible --- .vscode/settings.json | 2 +- test/dxtignore.test.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 42a20bc..14ac857 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,6 @@ }, "eslint.validate": ["typescript"], "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "dbaeumer.vscode-eslint" } } diff --git a/test/dxtignore.test.ts b/test/dxtignore.test.ts index 6e33a50..c75be76 100644 --- a/test/dxtignore.test.ts +++ b/test/dxtignore.test.ts @@ -73,15 +73,10 @@ temp/`; }); it("should return empty array if file cannot be read", () => { - const content = "*.log"; - fs.writeFileSync(dxtIgnorePath, content); - fs.chmodSync(dxtIgnorePath, 0); // Make file unreadable + fs.mkdirSync(dxtIgnorePath); // Make a dir so readFile fails const patterns = readDxtIgnorePatterns(tempDir); expect(patterns).toEqual([]); - - // Restore permissions for cleanup - fs.chmodSync(dxtIgnorePath, 0o644); }); }); From dcf38bdddcb3d1bd2fe46eef6203a79b8b6e0b1a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 6 Jul 2025 16:38:16 -0700 Subject: [PATCH 4/4] fix: remote internal registry usage --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index c13b924..fa4ff4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2359,7 +2359,7 @@ ignore@^5.2.0: ignore@^7.0.5: version "7.0.5" - resolved "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== import-fresh@^3.2.1: