styleproof 4.4.4 → 4.4.6

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
@@ -11,8 +11,9 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
11
11
 
12
12
  - **Map-store uploads now reuse credentials from `actions/checkout@v7`.**
13
13
  Checkout v7 keeps its HTTP header in an included temporary config rather than
14
- directly in `.git/config`; StyleProof now reads the effective Git config before
15
- carrying that header into its isolated clone and push.
14
+ directly in `.git/config`; StyleProof now explicitly enables Git config includes
15
+ and falls back to its locally registered checkout config before carrying that
16
+ header into the isolated clone and push.
16
17
  - **Map-store uploads now reuse the HTTP authentication persisted by
17
18
  `actions/checkout`.** The isolated `styleproof-maps` clone carries the
18
19
  checkout's URL-scoped extra header through clone and push, so cache-miss
package/dist/map-store.js CHANGED
@@ -52,23 +52,33 @@ 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
- function effectiveGitHttpExtraHeaders(cwd) {
56
- const configuredHeaders = runGit(cwd, ['config', '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
57
- if (configuredHeaders.status !== 0)
58
- return [];
59
- return configuredHeaders.stdout
55
+ function parseGitHttpExtraHeaders(configuredHeaders) {
56
+ return configuredHeaders
60
57
  .split('\n')
61
58
  .filter(Boolean)
62
59
  .flatMap((configuredHeader) => {
63
60
  const separatorIndex = configuredHeader.indexOf(' ');
64
61
  if (separatorIndex === -1)
65
62
  return [];
66
- return [
67
- {
68
- key: configuredHeader.slice(0, separatorIndex),
69
- value: configuredHeader.slice(separatorIndex + 1),
70
- },
71
- ];
63
+ return [{ key: configuredHeader.slice(0, separatorIndex), value: configuredHeader.slice(separatorIndex + 1) }];
64
+ });
65
+ }
66
+ function effectiveGitHttpExtraHeaders(cwd) {
67
+ const configuredHeaders = runGit(cwd, ['config', '--includes', '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
68
+ const effectiveHeaders = parseGitHttpExtraHeaders(configuredHeaders.stdout);
69
+ if (effectiveHeaders.length > 0)
70
+ return effectiveHeaders;
71
+ const registeredIncludes = runGit(cwd, ['config', '--local', '--get-regexp', '^includeIf\\..*\\.path$'], 1 << 20);
72
+ return registeredIncludes.stdout
73
+ .split('\n')
74
+ .filter(Boolean)
75
+ .flatMap((registeredInclude) => {
76
+ const separatorIndex = registeredInclude.indexOf(' ');
77
+ if (separatorIndex === -1)
78
+ return [];
79
+ const includedConfigPath = registeredInclude.slice(separatorIndex + 1);
80
+ const includedHeaders = runGit(cwd, ['config', '--file', includedConfigPath, '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
81
+ return parseGitHttpExtraHeaders(includedHeaders.stdout);
72
82
  });
73
83
  }
74
84
  function gitOutput(cwd, args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "4.4.4",
3
+ "version": "4.4.6",
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",