fix: regenerate complete dependency lock for CI installs

This commit is contained in:
root committed 2026-10-28 14:18:19 +09:00
1 parent 0755155368
commit 172c3a5a0e
3 files changed
+1062 -211

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
test -n "$ABC_API_KEY" || { echo "ABC_API_KEY is missing"; exit 1; }
- name: Install dependencies
run: npm install --no-fund --no-audit
run: npm ci --no-fund --no-audit
- name: Check source
run: npm run check && npm test
+1044 -210
View File
File diff suppressed because it is too large. Load diff
+17
View File
@@ -0,0 +1,17 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
test('dependency lock contains complete package versions for a clean CI installation', () => {
const lock = JSON.parse(readFileSync(new URL('../package-lock.json', import.meta.url), 'utf8'));
const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
assert.equal(lock.lockfileVersion, 3);
assert.equal(lock.packages['node_modules/wrangler'].version, manifest.devDependencies.wrangler);
for (const [name, entry] of Object.entries(lock.packages)) {
if (!name || entry.link) continue;
assert.equal(typeof entry.version, 'string', name + ' is missing its version');
assert.match(entry.version, /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/, name + ' has an invalid version');
assert.ok(entry.resolved, name + ' is missing its package location');
assert.ok(entry.integrity, name + ' is missing its package integrity');
}
});