styleproof 4.4.8 → 4.4.10

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,16 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.10] - 2026-07-13
11
+
12
+ ### Fixed
13
+
14
+ - **Explicit workflow authentication no longer duplicates the checkout header.**
15
+ StyleProof clears any inherited GitHub HTTP authorization value before adding
16
+ `STYLEPROOF_MAP_STORE_TOKEN`, preventing GitHub from rejecting cold-cache
17
+ clones with `Duplicate header: "Authorization"` while retaining explicit-token
18
+ precedence over stale checkout credentials.
19
+
10
20
  ## [4.4.8] - 2026-07-13
11
21
 
12
22
  ### Fixed
@@ -24,6 +34,10 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
24
34
 
25
35
  ### Fixed
26
36
 
37
+ - **Explicit map-store credentials take precedence over checkout state.** When
38
+ `STYLEPROOF_MAP_STORE_TOKEN` is set, StyleProof now uses it before inspecting
39
+ persisted Git headers, so stale `actions/checkout` credentials cannot break a
40
+ cold-cache map upload.
27
41
  - **Generated CI authenticates map publication explicitly.** `styleproof-init`
28
42
  passes the workflow's least-privilege `github.token` as
29
43
  `STYLEPROOF_MAP_STORE_TOKEN`, so cold-cache uploads do not depend on private
package/dist/map-store.js CHANGED
@@ -64,6 +64,19 @@ function parseGitHttpExtraHeaders(configuredHeaders) {
64
64
  });
65
65
  }
66
66
  function effectiveGitHttpExtraHeaders(cwd) {
67
+ const mapStoreToken = process.env.STYLEPROOF_MAP_STORE_TOKEN;
68
+ if (mapStoreToken) {
69
+ return [
70
+ {
71
+ key: ['http.https:', '', 'github.com', '.extraheader'].join('/'),
72
+ value: '',
73
+ },
74
+ {
75
+ key: ['http.https:', '', 'github.com', '.extraheader'].join('/'),
76
+ value: `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${mapStoreToken}`).toString('base64')}`,
77
+ },
78
+ ];
79
+ }
67
80
  const configuredHeaders = runGit(cwd, ['config', '--includes', '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
68
81
  const effectiveHeaders = parseGitHttpExtraHeaders(configuredHeaders.stdout);
69
82
  if (effectiveHeaders.length > 0)
@@ -82,15 +95,7 @@ function effectiveGitHttpExtraHeaders(cwd) {
82
95
  });
83
96
  if (includedHeaders.length > 0)
84
97
  return includedHeaders;
85
- const mapStoreToken = process.env.STYLEPROOF_MAP_STORE_TOKEN;
86
- if (!mapStoreToken)
87
- return [];
88
- return [
89
- {
90
- key: ['http.https:', '', 'github.com', '.extraheader'].join('/'),
91
- value: `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${mapStoreToken}`).toString('base64')}`,
92
- },
93
- ];
98
+ return [];
94
99
  }
95
100
  function gitOutput(cwd, args) {
96
101
  const r = runGit(cwd, args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "4.4.8",
3
+ "version": "4.4.10",
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",