styleproof 4.4.6 → 4.4.7
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 +5 -0
- package/bin/styleproof-init.mjs +2 -0
- package/dist/map-store.js +12 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,11 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
9
9
|
|
|
10
10
|
### Fixed
|
|
11
11
|
|
|
12
|
+
- **Generated CI authenticates map publication explicitly.** `styleproof-init`
|
|
13
|
+
passes the workflow's least-privilege `github.token` as
|
|
14
|
+
`STYLEPROOF_MAP_STORE_TOKEN`, so cold-cache uploads do not depend on private
|
|
15
|
+
`actions/checkout` credential-storage details. Local hooks continue to reuse
|
|
16
|
+
normal Git credentials without requiring this variable.
|
|
12
17
|
- **Map-store uploads now reuse credentials from `actions/checkout@v7`.**
|
|
13
18
|
Checkout v7 keeps its HTTP header in an included temporary config rather than
|
|
14
19
|
directly in `.git/config`; StyleProof now explicitly enables Git config includes
|
package/bin/styleproof-init.mjs
CHANGED
package/dist/map-store.js
CHANGED
|
@@ -69,7 +69,7 @@ function effectiveGitHttpExtraHeaders(cwd) {
|
|
|
69
69
|
if (effectiveHeaders.length > 0)
|
|
70
70
|
return effectiveHeaders;
|
|
71
71
|
const registeredIncludes = runGit(cwd, ['config', '--local', '--get-regexp', '^includeIf\\..*\\.path$'], 1 << 20);
|
|
72
|
-
|
|
72
|
+
const includedHeaders = registeredIncludes.stdout
|
|
73
73
|
.split('\n')
|
|
74
74
|
.filter(Boolean)
|
|
75
75
|
.flatMap((registeredInclude) => {
|
|
@@ -80,6 +80,17 @@ function effectiveGitHttpExtraHeaders(cwd) {
|
|
|
80
80
|
const includedHeaders = runGit(cwd, ['config', '--file', includedConfigPath, '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
|
|
81
81
|
return parseGitHttpExtraHeaders(includedHeaders.stdout);
|
|
82
82
|
});
|
|
83
|
+
if (includedHeaders.length > 0)
|
|
84
|
+
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
|
+
];
|
|
83
94
|
}
|
|
84
95
|
function gitOutput(cwd, args) {
|
|
85
96
|
const r = runGit(cwd, args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styleproof",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.7",
|
|
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",
|