diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f6f586d..c601019 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,18 +15,23 @@ jobs: strategy: matrix: - node-version: [22.x, 24.x, 26.x] + node-version: [20.x, 22.x, 24.x, 26.x] shiki-version: ["1.29.2", "2.5.0", "3.23.0", "4.5.0"] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Use Node.js ${{ matrix.node-version }} + # Development tools require a newer Node.js than the package runtime. + - name: Use development Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: ".node-version" cache: "npm" - run: npm ci - run: npm install shiki@${{ matrix.shiki-version }} --no-save --ignore-scripts - run: npm run build + - name: Use runtime Node.js ${{ matrix.node-version }} + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: ${{ matrix.node-version }} - run: npm test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5401c58..8a5080b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version-file: '.node-version' registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm test diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..8207117 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +v26.13.0 diff --git a/.npmrc b/.npmrc index c1dac10..ef2a751 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,6 @@ +engine-strict=true min-release-age=7 registry=https://npm.flatt.tech +strict-allow-scripts=true +allow-git=none +allow-remote=none diff --git a/package.json b/package.json index 78618f4..477514c 100644 --- a/package.json +++ b/package.json @@ -62,5 +62,10 @@ }, "publishConfig": { "registry": "https://registry.npmjs.org" + }, + "allowScripts": { + "esbuild@0.27.7": true, + "fsevents": false, + "esbuild@0.21.5": true } }