You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,10 @@ npm ci
158
158
159
159
The command keeps the consumer repository's root package and resolved
160
160
`@oai/build-infra` commit, then syncs the transitive dependency entries from the
161
-
installed build-infra package lockfile.
161
+
installed build-infra package lockfile snapshot. npm does not include a package's
162
+
root `package-lock.json` when it installs a Git dependency, so build-infra keeps
163
+
a packaged copy at `src/lockfile/build-infra-package-lock.json`. The test suite
164
+
checks that this snapshot matches the repository's root `package-lock.json`.
162
165
163
166
## `spec.config.json`
164
167
@@ -301,6 +304,14 @@ npm ci
301
304
npm test
302
305
```
303
306
307
+
When `package-lock.json` changes, refresh the packaged lockfile snapshot before
308
+
committing. `npm test` runs the snapshot check automatically.
309
+
310
+
```sh
311
+
npm run sync-lockfile-snapshot
312
+
npm run check-lockfile-snapshot
313
+
```
314
+
304
315
`npm test` runs self-contained tests. Some tests create temporary fixture
305
316
specification repositories and local Git remotes so release-command behavior can
306
317
be checked without a separate consumer repository.
@@ -316,7 +327,7 @@ regressions. Useful examples:
316
327
|`tests/shell/bin-resolution.test.mjs`| How Markdown validation and formatting choose configs, when linkspector runs, and how command wrappers resolve hoisted binaries. |
317
328
|`tests/release/release-commands.test.mjs`| The expected branch model for release commands, including clean-worktree and remote-branch guardrails. |
318
329
|`tests/schema/schema-publish.test.mjs`| Schema publication behavior for source previews, versioned development branches, dated schema files, and Jekyll lander markdown. |
319
-
|`tests/package/package-lock.test.mjs`| Lockfile entries that must exist for `npm ci` on GitHub-hosted Linux runners. |
330
+
|`tests/package/package-lock.test.mjs`| Lockfile invariants, including keeping the packaged lockfile snapshot in sync with the root `package-lock.json`. |
320
331
|`tests/lockfile/sync-consumer-lockfile.test.mjs`| How `oai-spec-sync-lockfile` repairs a consumer lockfile while preserving the resolved build-infra commit. |
321
332
|`tests/package/exports.test.mjs`| Public helper modules that consumer test suites can import. |
0 commit comments