styleproof 4.4.12 → 4.4.14
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 +17 -0
- package/dist/map-store.d.ts +1 -0
- package/dist/map-store.js +28 -0
- package/package.json +1 -1
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.14] - 2026-07-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Workflow-token publication now uses Git's credential protocol for the final retry.**
|
|
15
|
+
The token stays out of remote URLs and process arguments, while real Git credential
|
|
16
|
+
lookup is covered directly instead of relying on an executable askpass script.
|
|
17
|
+
|
|
18
|
+
## [4.4.13] - 2026-07-13
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Workflow-token publication now retries through Git askpass.** When GitHub
|
|
23
|
+
rejects the temporary checkout's explicit HTTP header, StyleProof clears that
|
|
24
|
+
header and supplies the token through Git's credential prompt protocol without
|
|
25
|
+
placing the secret in the remote URL or command arguments.
|
|
26
|
+
|
|
10
27
|
## [4.4.12] - 2026-07-13
|
|
11
28
|
|
|
12
29
|
### Fixed
|
package/dist/map-store.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface CachedCaptureDirs {
|
|
|
47
47
|
compatibilityKey: string;
|
|
48
48
|
tmpRoot: string;
|
|
49
49
|
}
|
|
50
|
+
export declare function workflowTokenCredentialArguments(): string[];
|
|
50
51
|
/** Record the real browser build into the capture dir. Called from a capture run, where a
|
|
51
52
|
* Playwright browser handle is in scope. Write-or-CLEAR semantics: an undefined version
|
|
52
53
|
* REMOVES any existing sidecar rather than leaving it, so a reused capture dir (e.g. the
|
package/dist/map-store.js
CHANGED
|
@@ -52,6 +52,10 @@ function gitProcessEnvironment() {
|
|
|
52
52
|
function runGit(cwd, args, maxBuffer = 1 << 28) {
|
|
53
53
|
return spawnSync('git', args, { cwd, encoding: 'utf8', maxBuffer, env: gitProcessEnvironment() });
|
|
54
54
|
}
|
|
55
|
+
const WORKFLOW_TOKEN_CREDENTIAL_HELPER = '!f() { if [ "$1" = get ]; then printf \'%s\\n\' username=x-access-token "password=$STYLEPROOF_MAP_STORE_TOKEN"; fi; }; f';
|
|
56
|
+
export function workflowTokenCredentialArguments() {
|
|
57
|
+
return ['-c', 'credential.helper=', '-c', `credential.helper=${WORKFLOW_TOKEN_CREDENTIAL_HELPER}`];
|
|
58
|
+
}
|
|
55
59
|
function parseGitHttpExtraHeaders(configuredHeaders) {
|
|
56
60
|
return configuredHeaders
|
|
57
61
|
.split('\n')
|
|
@@ -484,6 +488,30 @@ function pushMapStoreCommit(cwd, temporaryCheckout, remote, branch, authenticati
|
|
|
484
488
|
const isolatedPush = runGit(temporaryCheckout, [...authenticationArguments, 'push', '-q', 'origin', `HEAD:${branch}`], 1 << 20);
|
|
485
489
|
if (isolatedPush.status === 0)
|
|
486
490
|
return isolatedPush;
|
|
491
|
+
const mapStoreToken = process.env.STYLEPROOF_MAP_STORE_TOKEN;
|
|
492
|
+
if (mapStoreToken) {
|
|
493
|
+
const githubExtraHeaderKey = ['http.https:', '', 'github.com', '.extraheader'].join('/');
|
|
494
|
+
runGit(temporaryCheckout, ['config', '--local', '--unset-all', githubExtraHeaderKey], 1 << 20);
|
|
495
|
+
const credentialPush = spawnSync('git', [
|
|
496
|
+
'-c',
|
|
497
|
+
`${githubExtraHeaderKey}=`,
|
|
498
|
+
...workflowTokenCredentialArguments(),
|
|
499
|
+
'push',
|
|
500
|
+
'-q',
|
|
501
|
+
'origin',
|
|
502
|
+
`HEAD:${branch}`,
|
|
503
|
+
], {
|
|
504
|
+
cwd: temporaryCheckout,
|
|
505
|
+
encoding: 'utf8',
|
|
506
|
+
maxBuffer: 1 << 20,
|
|
507
|
+
env: {
|
|
508
|
+
...gitProcessEnvironment(),
|
|
509
|
+
GIT_TERMINAL_PROMPT: '0',
|
|
510
|
+
},
|
|
511
|
+
});
|
|
512
|
+
if (credentialPush.status === 0)
|
|
513
|
+
return credentialPush;
|
|
514
|
+
}
|
|
487
515
|
const mapStoreCommit = gitOutput(temporaryCheckout, ['rev-parse', 'HEAD']);
|
|
488
516
|
const importCommit = runGit(cwd, ['fetch', '-q', '--no-write-fetch-head', temporaryCheckout, mapStoreCommit], 1 << 20);
|
|
489
517
|
if (importCommit.status !== 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styleproof",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.14",
|
|
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",
|