From 51b85e5a663e24ff29bbe91457cfde983b0e4223 Mon Sep 17 00:00:00 2001 From: Kasumi Hanazuki Date: Sat, 9 May 2026 20:54:05 +0000 Subject: [PATCH 1/2] ci: github-script@9 --- .github/workflows/ci.yml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58932bd4..b0e1df6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,7 +188,7 @@ jobs: path: pkg/ - id: release name: Upload to GitHub releases - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: await require("./.github/scripts/release.cjs")({ github, context, core }); - name: Publish to npmjs diff --git a/package-lock.json b/package-lock.json index 5ad2eed3..e418f2a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "node-addon-api": "^8.5.0" }, "devDependencies": { - "@actions/github-script": "github:actions/github-script#v8.0.0", + "@actions/github-script": "github:actions/github-script#v9.0.0", "@types/node": "20", "glob": "^13.0.0", "jasmine": "^6.0.0", @@ -1485,7 +1485,7 @@ "@actions/github-script": { "version": "git+ssh://git@github.com/actions/github-script.git#450193c5abd4cdb17ba9f3ffcfe8f635c4bb6c2a", "dev": true, - "from": "@actions/github-script@github:actions/github-script#v8.0.0", + "from": "@actions/github-script@github:actions/github-script#v9.0.0", "requires": { "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", diff --git a/package.json b/package.json index d8e28a63..783a243f 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "node-addon-api": "^8.5.0" }, "devDependencies": { - "@actions/github-script": "github:actions/github-script#v8.0.0", + "@actions/github-script": "github:actions/github-script#v9.0.0", "@types/node": "20", "glob": "^13.0.0", "jasmine": "^6.0.0", From 71503e61a65239d108d52a831b6ca5ae37be8600 Mon Sep 17 00:00:00 2001 From: Kasumi Hanazuki Date: Sat, 9 May 2026 21:15:34 +0000 Subject: [PATCH 2/2] ci: typecheck .github/scripts --- .github/scripts/package.json | 13 ++++++++ .github/scripts/tsconfig.json | 13 ++++++++ .github/workflows/ci.yml | 2 ++ .gitignore | 2 +- package-lock.json | 59 ++++++++++++++++++++++++++++++++++- package.json | 6 ++-- 6 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 .github/scripts/package.json create mode 100644 .github/scripts/tsconfig.json diff --git a/.github/scripts/package.json b/.github/scripts/package.json new file mode 100644 index 00000000..6b5f0cd9 --- /dev/null +++ b/.github/scripts/package.json @@ -0,0 +1,13 @@ +{ + "name": "github-scripts", + "version": "0.0.0", + "private": true, + "scripts": { + "typecheck": "tsc" + }, + "devDependencies": { + "@actions/github-script": "github:actions/github-script#v9.0.0", + "@types/node": "24", + "typescript": "^6.0.2" + } +} diff --git a/.github/scripts/tsconfig.json b/.github/scripts/tsconfig.json new file mode 100644 index 00000000..f2519503 --- /dev/null +++ b/.github/scripts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2022", "ESNext.Disposable"], + "module": "node16", + "moduleResolution": "node16", + "checkJs": true, + "allowJs": true, + "noEmit": true, + "strict": true + }, + "include": ["./*.cjs"] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0e1df6b..5652ccc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,6 +147,8 @@ jobs: run: npm install --ignore-scripts - name: Test run: npm run typetest + - name: Typecheck scripts + run: npm run typecheck -w .github/scripts docs: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 07ce84cf..25adbb48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ /build /docs /coverage -/node_modules +node_modules /*.log .cache/ /pkg diff --git a/package-lock.json b/package-lock.json index e418f2a7..b3cdb0e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,15 @@ "version": "3.1.1", "hasInstallScript": true, "license": "MIT AND Apache-2.0", + "workspaces": [ + ".github/scripts" + ], "dependencies": { "bindings": "^1.5.0", "cmake-js": "^8.0.0", "node-addon-api": "^8.5.0" }, "devDependencies": { - "@actions/github-script": "github:actions/github-script#v9.0.0", "@types/node": "20", "glob": "^13.0.0", "jasmine": "^6.0.0", @@ -28,6 +30,32 @@ "node": ">=14" } }, + ".github/scripts": { + "name": "github-scripts", + "version": "0.0.0", + "devDependencies": { + "@actions/github-script": "github:actions/github-script#v9.0.0", + "@types/node": "24", + "typescript": "^6.0.2" + } + }, + ".github/scripts/node_modules/@types/node": { + "version": "24.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.3.tgz", + "integrity": "sha512-8oljBDGun9cIsZRJR6fkihn0TSXJI0UDOOhncYaERq6M0JMDoPLxyscwruJcb4GKS6dvK/d8xebYBg27h/duaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + ".github/scripts/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, "node_modules/@actions/core": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", @@ -826,6 +854,10 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/github-scripts": { + "resolved": ".github/scripts", + "link": true + }, "node_modules/glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", @@ -2075,6 +2107,31 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "github-scripts": { + "version": "file:.github/scripts", + "requires": { + "@actions/github-script": "github:actions/github-script#v9.0.0", + "@types/node": "24", + "typescript": "^6.0.2" + }, + "dependencies": { + "@types/node": { + "version": "24.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.3.tgz", + "integrity": "sha512-8oljBDGun9cIsZRJR6fkihn0TSXJI0UDOOhncYaERq6M0JMDoPLxyscwruJcb4GKS6dvK/d8xebYBg27h/duaQ==", + "dev": true, + "requires": { + "undici-types": "~7.16.0" + } + }, + "undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true + } + } + }, "glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", diff --git a/package.json b/package.json index 783a243f..650605ce 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "node-addon-api": "^8.5.0" }, "devDependencies": { - "@actions/github-script": "github:actions/github-script#v9.0.0", "@types/node": "20", "glob": "^13.0.0", "jasmine": "^6.0.0", @@ -93,5 +92,8 @@ "tstyche": "^7.0.0", "typedoc": "^0.28.1", "typescript": "^6.0.2" - } + }, + "workspaces": [ + ".github/scripts" + ] }