styleproof 4.4.17 → 4.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.19] - 2026-07-14
11
+
12
+ ### Fixed
13
+
14
+ - **Generated cache restores now evaluate each map in its own commit context.**
15
+ CI checks out the base before restoring the base bundle and returns to the head
16
+ before restoring the head bundle, so lockfile-changing pull requests reach the
17
+ browserless hot path after their first published pair.
18
+
19
+ ## [4.4.18] - 2026-07-13
20
+
21
+ ### Fixed
22
+
23
+ - **Generated cold-cache workflows now publish from a clean tracked tree.** Yarn,
24
+ pnpm, and Bun restore only the package metadata changed by the temporary exact
25
+ StyleProof install while retaining that release in `node_modules` for capture.
26
+
10
27
  ## [4.4.17] - 2026-07-13
11
28
 
12
29
  ### Fixed
@@ -222,6 +222,7 @@ const PACKAGE_MANAGERS = {
222
222
  exec: (command) => `npx ${command}`,
223
223
  install: 'npm ci',
224
224
  installExactStyleProof: 'npm install --no-save --package-lock=false "styleproof@$STYLEPROOF_VERSION"',
225
+ restorePackageMetadata: 'true # npm exact install leaves package metadata unchanged',
225
226
  setup: ` - uses: actions/setup-node@v4
226
227
  with:
227
228
  node-version: '20'
@@ -233,6 +234,7 @@ const PACKAGE_MANAGERS = {
233
234
  exec: (command) => `npx -y yarn@1.22.22 ${command}`,
234
235
  install: 'npx -y yarn@1.22.22 install --frozen-lockfile --non-interactive',
235
236
  installExactStyleProof: 'npx -y yarn@1.22.22 add --dev --exact "styleproof@$STYLEPROOF_VERSION"',
237
+ restorePackageMetadata: 'git checkout -- package.json yarn.lock',
236
238
  setup: ` - uses: actions/setup-node@v4
237
239
  with:
238
240
  node-version: '20'
@@ -245,6 +247,7 @@ const PACKAGE_MANAGERS = {
245
247
  exec: (command) => `pnpm exec ${command}`,
246
248
  install: 'pnpm install --frozen-lockfile',
247
249
  installExactStyleProof: 'pnpm add --save-dev --save-exact "styleproof@$STYLEPROOF_VERSION"',
250
+ restorePackageMetadata: 'git checkout -- package.json pnpm-lock.yaml',
248
251
  setup: ` - uses: actions/setup-node@v4
249
252
  with:
250
253
  node-version: '20'
@@ -258,6 +261,12 @@ const PACKAGE_MANAGERS = {
258
261
  exec: (command) => `bunx ${command}`,
259
262
  install: 'bun install --frozen-lockfile',
260
263
  installExactStyleProof: 'bun add --dev --exact "styleproof@$STYLEPROOF_VERSION"',
264
+ restorePackageMetadata: `git checkout -- package.json
265
+ for package_metadata_file in bun.lock bun.lockb; do
266
+ if git ls-files --error-unmatch "$package_metadata_file" >/dev/null 2>&1; then
267
+ git checkout -- "$package_metadata_file"
268
+ fi
269
+ done`,
261
270
  setup: ` - uses: actions/setup-node@v4
262
271
  with:
263
272
  node-version: '20'
@@ -406,9 +415,16 @@ ${PM.setup}
406
415
  HEAD_SHA="\${{ github.event.pull_request.head.sha }}"
407
416
  MAP_ROOT="\${{ runner.temp }}/styleproof-maps"
408
417
  rm -rf "$MAP_ROOT"
418
+ # Compatibility keys include the checked-out lockfile. Resolve each
419
+ # exact-SHA bundle in that commit's own dependency context, while
420
+ # reusing the already-installed StyleProof binary from node_modules.
421
+ git checkout --force "$BASE_SHA"
409
422
  set +e
410
423
  PATH="$PWD/node_modules/.bin:$PATH" node node_modules/styleproof/bin/styleproof-map.mjs --restore --sha "$BASE_SHA" --dir base --base-dir "$MAP_ROOT" --spec ${specPath}
411
424
  base_code=$?
425
+ set -e
426
+ git checkout --force "$HEAD_SHA"
427
+ set +e
412
428
  PATH="$PWD/node_modules/.bin:$PATH" node node_modules/styleproof/bin/styleproof-map.mjs --restore --sha "$HEAD_SHA" --dir head --base-dir "$MAP_ROOT" --spec ${specPath}
413
429
  head_code=$?
414
430
  set -e
@@ -439,6 +455,10 @@ ${PM.setup}
439
455
  # exact release, then invoke its binary directly so a later package
440
456
  # manager command cannot silently reconcile node_modules backwards.
441
457
  ${PM.installExactStyleProof}
458
+ # Package managers that record the temporary exact release dirty
459
+ # tracked metadata. Restore only those files: node_modules must
460
+ # retain the exact release for the clean-tree capture below.
461
+ ${PM.restorePackageMetadata}
442
462
  PATH="$PWD/node_modules/.bin:$PATH" playwright install --with-deps chromium
443
463
  if [ -f "${specPath}" ]; then
444
464
  PATH="$PWD/node_modules/.bin:$PATH" node node_modules/styleproof/bin/styleproof-map.mjs --spec ${specPath} --dir base --base-dir "$MAP_ROOT" --keep-har --sha "$BASE_SHA" --upload
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "4.4.17",
3
+ "version": "4.4.19",
4
4
  "description": "Catch every CSS change before it ships — review PRs and certify refactors by the browser's computed styles, not pixels. Works with any styling system.",
5
5
  "keywords": [
6
6
  "playwright",