Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a729071
chore: bump minimum Node.js version to v20
tasshi-me Oct 6, 2025
3e7b037
build: bump node version in mise
tasshi-me Oct 16, 2025
dc7e82f
build: add script to build SEA
tasshi-me Oct 16, 2025
768d84d
Revert "build: add script to build SEA"
tasshi-me Oct 16, 2025
98915df
build: replace vercel/pkg with yao-pkg/pkg
tasshi-me Oct 16, 2025
ffce295
chore: remove polyfill for node18 test codes
tasshi-me Oct 16, 2025
a0b942b
Merge remote-tracking branch 'origin/main' into chore/bump-nodejs-ver…
tasshi-me Oct 16, 2025
a8ce3b3
chore: use import attributes instead of import assertion
tasshi-me Oct 16, 2025
a80f409
test: remove incorrect import
tasshi-me Oct 16, 2025
ceaae5c
ci: change allure result asset name
tasshi-me Oct 16, 2025
7f203c4
ci: refactor node-version matrix
tasshi-me Oct 16, 2025
4e55db2
test: fix E2E test expected value
tasshi-me Oct 16, 2025
27cf4f3
Merge remote-tracking branch 'origin/main' into chore/bump-nodejs-ver…
tasshi-me Oct 17, 2025
89188da
ci: refactor node-version
tasshi-me Oct 17, 2025
d48faff
ci: fix a ci syntax error
tasshi-me Oct 17, 2025
16b9c7f
ci: add test for executables
tasshi-me Oct 17, 2025
e0a32fd
build: disable build compression
tasshi-me Oct 17, 2025
8e59356
debug: change build platform
tasshi-me Oct 17, 2025
599f990
Revert "debug: change build platform"
tasshi-me Oct 17, 2025
7408bd9
build: set build target arch explicitly
tasshi-me Oct 17, 2025
8f6246f
Reapply "debug: change build platform"
tasshi-me Oct 17, 2025
4e0e2fb
build: use macos runner to build executables
tasshi-me Oct 17, 2025
d7210e2
test: fix executable file path
tasshi-me Oct 17, 2025
0119907
ci: fix test-executables workflow
tasshi-me Oct 17, 2025
308d198
test: fix e2e test
tasshi-me Oct 17, 2025
ec1bfda
Merge remote-tracking branch 'origin/main' into chore/bump-nodejs-ver…
tasshi-me Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:

jobs:
build:
name: Node.js ubuntu-latest 18.x
runs-on: ubuntu-latest
name: Build
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubuntu上でビルドしたmacOS向けの実行ファイルが正常に動作しない不具合がある。
そのため、当面の間はmacOSランナー上で実行ファイルをビルドする。
ref. yao-pkg/pkg#183

# ubuntu上でビルドしたmacOS向けの実行ファイルが正常に動作しないため、
# macOSランナー上でビルドする
# ref. https://github.com/yao-pkg/pkg/issues/183
runs-on: macos-latest
steps:
- uses: Kesin11/actions-timeline@3046833d9aacfd7745c5264b7f3af851c3e2a619 # v2

Expand All @@ -19,7 +22,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"

- name: Install dependencies
Expand All @@ -42,7 +45,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"

- name: Install dependencies
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:

- uses: pnpm/action-setup@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v6
- uses: actions/setup-node@v6
with:
node-version: 18.x
node-version: "24"
cache: "pnpm"

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
lint:
name: Node.js ubuntu-latest 18.x
name: Lint
runs-on: ubuntu-latest
steps:
- uses: Kesin11/actions-timeline@3046833d9aacfd7745c5264b7f3af851c3e2a619 # v2
Expand All @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"

- name: Install dependencies
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ jobs:
name: Upload executables
permissions:
contents: write
runs-on: ubuntu-latest
# ubuntu上でビルドしたmacOS向けの実行ファイルが正常に動作しないため、
# macOSランナー上でビルドする
# ref. https://github.com/yao-pkg/pkg/issues/183
runs-on: macos-latest
needs: release
if: ${{ needs.release.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -92,7 +95,7 @@ jobs:
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
# Ensure npm 11.5.1 or later is installed
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/test-executables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: test-executables
on:
push:
branches:
- main
- "renovate/**"
pull_request:

jobs:
build-executables:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ビルドした実行ファイルが各プラットフォーム上で正常に動作するかのテストを追加した。

name: Build executables
# ubuntu上でビルドしたmacOS向けの実行ファイルが正常に動作しないため、
# macOSランナー上でビルドする
# ref. https://github.com/yao-pkg/pkg/issues/183
runs-on: macos-latest
steps:
- uses: Kesin11/actions-timeline@3046833d9aacfd7745c5264b7f3af851c3e2a619 # v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- run: pnpm build:executables
- run: jq -r '.version' ./package.json > bin/EXPECTED_VERSION
- uses: actions/upload-artifact@v4
with:
name: executables
path: bin/*
retention-days: 1day

test-executables:
name: Test executables - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build-executables

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/download-artifact@v5
with:
name: executables
- run: chmod +x ./cli-kintone-*
- run: ./cli-kintone-linux-x64 --version | tee ACTUAL
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: ./cli-kintone-win-x64.exe --version | tee ACTUAL
if: ${{ matrix.os == 'windows-latest' }}
- run: ./cli-kintone-macos-arm64 --version | tee ACTUAL
if: ${{ matrix.os == 'macos-latest' }}
- run: diff EXPECTED_VERSION ACTUAL_VERSION
6 changes: 3 additions & 3 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"

- run: pnpm install --frozen-lockfile
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 20.x, 18.x]
node-version: [20, 22, 24]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/setup-node@v6
Expand All @@ -52,7 +52,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 20.x, 18.x]
node-version: [20, 22, 24]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/setup-node@v6
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20, 22, 24]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand All @@ -40,7 +40,7 @@ jobs:
if: ${{ env.platform == 'ubuntu' && !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: allure_results_unit_${{ env.platform }}
name: allure_results_unit_${{ env.platform }}_node${{ matrix.node-version }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

artifactの名前が重複してエラーになるため、Nodeバージョンをつけるようにしました。
(これまでは1つのNodeバージョンで実行していたので問題になっていませんでした)

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

https://github.com/kintone/cli-kintone/actions/runs/18568267797/job/52935195146

path: allure-results
if-no-files-found: ignore
outputs:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
node-version: [18.x]
node-version: [24]
os: ${{ fromJSON(needs.get-running-os-for-test-e2e.outputs.os) }}
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/yamory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: "18"
node-version: "24"
cache: "pnpm"

- name: download and validate Yamory script
working-directory: /tmp
Expand Down
2 changes: 1 addition & 1 deletion features/record/common.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: record common
Scenario: Invalid URL format
When I run the command with args "record export --base-url foo --app 1 --api-token abc"
Then I should get the exit code is non-zero
And The output error message should match with the pattern: "ERROR: TypeError \[ERR_INVALID_URL]: Invalid URL"
And The output error message should match with the pattern: "ERROR: TypeError: Invalid URL"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node v18とv24でnew URL(url)のエラーのフォーマットが変わったようで、期待出力の修正が必要でした。

  • v18: TypeError [ERR_INVALID_URL]: Invalid URL
  • v24: TypeError: Invalid URL

v18

$ node -e 'new URL("foo")'
node:internal/url:676
      throw new ERR_INVALID_URL(input);
      ^

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:405:5)
    at new URL (node:internal/url:676:13)
    at [eval]:1:1
    at runScriptInThisContext (node:internal/vm:143:10)
    at node:internal/process/execution:100:14
    at [eval]-wrapper:6:24
    at runScript (node:internal/process/execution:83:62)
    at evalScript (node:internal/process/execution:114:10)
    at node:internal/main/eval_string:30:3 {
  input: 'foo',
  code: 'ERR_INVALID_URL'
}

Node.js v18.20.8

v24

$ node -e 'new URL("foo")'
node:internal/url:826
      href = bindingUrl.parse(input, base, true);
                        ^

TypeError: Invalid URL
    at new URL (node:internal/url:826:25)
    at [eval]:1:1
    at runScriptInThisContext (node:internal/vm:219:10)
    at node:internal/process/execution:451:12
    at [eval]-wrapper:6:24
    at runScriptInContext (node:internal/process/execution:449:60)
    at evalFunction (node:internal/process/execution:283:30)
    at evalTypeScript (node:internal/process/execution:295:3)
    at node:internal/main/eval_string:71:3 {
  code: 'ERR_INVALID_URL',
  input: 'foo'
}

Node.js v24.5.0


Scenario: No app option
When I run the command with args "record export --base-url http://example.com"
Expand Down
3 changes: 0 additions & 3 deletions features/supports/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import polyfill for undici with Node.js 18
import "./undici-polyfill";

import { AfterAll, BeforeAll, Status } from "@cucumber/cucumber";
import fs from "fs";
import path from "path";
Expand Down
14 changes: 0 additions & 14 deletions features/supports/undici-polyfill.ts

This file was deleted.

6 changes: 3 additions & 3 deletions features/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export const getCliKintoneBinary = (): string => {
const dir = path.join(__dirname, "..", "..", "bin");
switch (process.platform) {
case "darwin":
return path.join(dir, "cli-kintone-macos");
return path.join(dir, "cli-kintone-macos-arm64");
case "linux":
return path.join(dir, "cli-kintone-linux");
return path.join(dir, "cli-kintone-linux-x64");
case "win32":
return path.join(dir, "cli-kintone-win.exe");
return path.join(dir, "cli-kintone-win-x64.exe");
default:
throw new Error(`Unsupported platform ${process.platform}`);
}
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
pnpm = "10.17.1"
node = "18"
node = "24"
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build:executables": "run-s build:ncc package",
"build:tsc": "tsc --build ./tsconfig.build.json",
"build:ncc": "ncc build ./src/cli/main.ts -m",
"package": "pkg ./dist/index.js --compress Brotli -o bin/cli-kintone -t linux,macos,win",
"package": "mkdirp ./bin && pkg --sea ./dist/index.js -o ./bin/cli-kintone -t linux-x64,macos-arm64,win-x64",
"license:analyze": "license-manager analyze -c license-manager.config.js",
"license:extract": "license-manager extract -c license-manager.config.js -w .",
"compress": "zx ./scripts/compress-to-zip-file.mjs",
Expand Down Expand Up @@ -65,7 +65,7 @@
},
"homepage": "https://github.com/kintone/cli-kintone/#readme",
"engines": {
"node": ">=18"
"node": ">=20"
},
"devDependencies": {
"@actions/core": "^1.11.1",
Expand All @@ -84,6 +84,7 @@
"@types/yauzl": "^2.10.3",
"@types/yazl": "^2.4.6",
"@vercel/ncc": "^0.38.4",
"@yao-pkg/pkg": "^6.8.0",
"ajv": "^8.17.1",
"allure-commandline": "^2.34.1",
"allure-cucumberjs": "^2.15.1",
Expand All @@ -94,9 +95,9 @@
"eslint": "^9.36.0",
"glob": "^10.4.5",
"jest": "^29.7.0",
"mkdirp": "^3.0.1",
"npm": "^11.6.1",
"npm-run-all": "^4.1.5",
"pkg": "^5.8.1",
"prettier": "^3.6.2",
"rimraf": "^5.0.10",
"ts-node": "^10.9.2",
Expand Down
Loading
Loading