styleproof 4.4.11 → 4.4.13

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,24 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.13] - 2026-07-13
11
+
12
+ ### Fixed
13
+
14
+ - **Workflow-token publication now retries through Git askpass.** When GitHub
15
+ rejects the temporary checkout's explicit HTTP header, StyleProof clears that
16
+ header and supplies the token through Git's credential prompt protocol without
17
+ placing the secret in the remote URL or command arguments.
18
+
19
+ ## [4.4.12] - 2026-07-13
20
+
21
+ ### Fixed
22
+
23
+ - **Map-store publication now survives an isolated push losing Actions
24
+ authentication.** If the sparse temporary checkout is rejected, StyleProof
25
+ imports its generated commit into the original checkout and retries the push
26
+ through checkout-v7's authenticated Git context.
27
+
10
28
  ## [4.4.11] - 2026-07-13
11
29
 
12
30
  ### Fixed
package/dist/map-store.js CHANGED
@@ -480,6 +480,46 @@ function checkoutMapStore(cwd, remote, branch, sparseSegment) {
480
480
  checkoutSparseSegment(tmp, branch, sparseSegment);
481
481
  return tmp;
482
482
  }
483
+ function pushMapStoreCommit(cwd, temporaryCheckout, remote, branch, authenticationArguments) {
484
+ const isolatedPush = runGit(temporaryCheckout, [...authenticationArguments, 'push', '-q', 'origin', `HEAD:${branch}`], 1 << 20);
485
+ if (isolatedPush.status === 0)
486
+ return isolatedPush;
487
+ const mapStoreToken = process.env.STYLEPROOF_MAP_STORE_TOKEN;
488
+ if (mapStoreToken) {
489
+ const askpassDirectory = fs.mkdtempSync(path.join(os.tmpdir(), 'styleproof-map-store-askpass-'));
490
+ const askpassScript = path.join(askpassDirectory, 'askpass.sh');
491
+ fs.writeFileSync(askpassScript, '#!/bin/sh\ncase "$1" in *Username*) printf "%s\\n" x-access-token ;; *) printf "%s\\n" "$STYLEPROOF_MAP_STORE_TOKEN" ;; esac\n', { mode: 0o700 });
492
+ try {
493
+ const askpassPush = spawnSync('git', [
494
+ '-c',
495
+ `${['http.https:', '', 'github.com', '.extraheader'].join('/')}=`,
496
+ 'push',
497
+ '-q',
498
+ 'origin',
499
+ `HEAD:${branch}`,
500
+ ], {
501
+ cwd: temporaryCheckout,
502
+ encoding: 'utf8',
503
+ maxBuffer: 1 << 20,
504
+ env: {
505
+ ...gitProcessEnvironment(),
506
+ GIT_ASKPASS: askpassScript,
507
+ GIT_TERMINAL_PROMPT: '0',
508
+ },
509
+ });
510
+ if (askpassPush.status === 0)
511
+ return askpassPush;
512
+ }
513
+ finally {
514
+ fs.rmSync(askpassDirectory, { recursive: true, force: true });
515
+ }
516
+ }
517
+ const mapStoreCommit = gitOutput(temporaryCheckout, ['rev-parse', 'HEAD']);
518
+ const importCommit = runGit(cwd, ['fetch', '-q', '--no-write-fetch-head', temporaryCheckout, mapStoreCommit], 1 << 20);
519
+ if (importCommit.status !== 0)
520
+ return isolatedPush;
521
+ return runGit(cwd, ['push', '-q', remote, `${mapStoreCommit}:${branch}`], 1 << 20);
522
+ }
483
523
  export function publishMapBundle(options) {
484
524
  const cwd = options.cwd ?? process.cwd();
485
525
  const branch = options.branch ?? DEFAULT_MAP_STORE_BRANCH;
@@ -514,7 +554,7 @@ export function publishMapBundle(options) {
514
554
  }
515
555
  runGit(tmp, ['add', '-A', '--sparse', '--', 'README.md', target]);
516
556
  runGit(tmp, ['commit', '-q', '-m', `StyleProof map ${sha.slice(0, 12)} ${compatibilityKey}`], 1 << 20);
517
- const push = runGit(tmp, [...pushAuthenticationArguments, 'push', '-q', 'origin', `HEAD:${branch}`], 1 << 20);
557
+ const push = pushMapStoreCommit(cwd, tmp, remote, branch, pushAuthenticationArguments);
518
558
  if (push.status === 0) {
519
559
  ok = true;
520
560
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "4.4.11",
3
+ "version": "4.4.13",
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",