styleproof 4.4.1 → 4.4.2
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 +8 -0
- package/dist/map-store.js +21 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Map-store uploads from Git hooks no longer inherit the caller repository's
|
|
13
|
+
Git location variables.** A cold `styleproof-maps` upload could otherwise run
|
|
14
|
+
its temporary `git init` against the consumer repository, set
|
|
15
|
+
`core.bare=true`, and reject the push after a successful capture. StyleProof
|
|
16
|
+
now isolates every child Git process from hook-exported repository paths.
|
|
17
|
+
|
|
10
18
|
## [4.4.1] - 2026-07-13
|
|
11
19
|
|
|
12
20
|
### Changed
|
package/dist/map-store.js
CHANGED
|
@@ -16,6 +16,19 @@ export const MAP_MANIFEST = 'styleproof-manifest.json';
|
|
|
16
16
|
* has exited — no browser — so it reads the build back from here. Not a surface map. */
|
|
17
17
|
export const BROWSER_BUILD_SIDECAR = 'styleproof-browser.json';
|
|
18
18
|
const GENERATED_DIRTY_ALLOWLIST = new Set(['next-env.d.ts']);
|
|
19
|
+
const GIT_REPOSITORY_ENVIRONMENT_VARIABLES = [
|
|
20
|
+
'GIT_ALTERNATE_OBJECT_DIRECTORIES',
|
|
21
|
+
'GIT_COMMON_DIR',
|
|
22
|
+
'GIT_DIR',
|
|
23
|
+
'GIT_GRAFT_FILE',
|
|
24
|
+
'GIT_INDEX_FILE',
|
|
25
|
+
'GIT_INTERNAL_SUPER_PREFIX',
|
|
26
|
+
'GIT_OBJECT_DIRECTORY',
|
|
27
|
+
'GIT_PREFIX',
|
|
28
|
+
'GIT_REPLACE_REF_BASE',
|
|
29
|
+
'GIT_SHALLOW_FILE',
|
|
30
|
+
'GIT_WORK_TREE',
|
|
31
|
+
];
|
|
19
32
|
/** Bundle files that sit alongside the maps but are NOT surfaces (manifest, coverage
|
|
20
33
|
* ledger, and any future sidecar). Every place that enumerates surface maps must skip
|
|
21
34
|
* these, or a sidecar reads as a phantom "new surface". */
|
|
@@ -30,8 +43,14 @@ export function isMapFile(name) {
|
|
|
30
43
|
}
|
|
31
44
|
export class MapStoreError extends Error {
|
|
32
45
|
}
|
|
46
|
+
function gitProcessEnvironment() {
|
|
47
|
+
const environment = { ...process.env };
|
|
48
|
+
for (const variableName of GIT_REPOSITORY_ENVIRONMENT_VARIABLES)
|
|
49
|
+
delete environment[variableName];
|
|
50
|
+
return environment;
|
|
51
|
+
}
|
|
33
52
|
function runGit(cwd, args, maxBuffer = 1 << 28) {
|
|
34
|
-
return spawnSync('git', args, { cwd, encoding: 'utf8', maxBuffer });
|
|
53
|
+
return spawnSync('git', args, { cwd, encoding: 'utf8', maxBuffer, env: gitProcessEnvironment() });
|
|
35
54
|
}
|
|
36
55
|
function gitOutput(cwd, args) {
|
|
37
56
|
const r = runGit(cwd, args);
|
|
@@ -385,6 +404,7 @@ function checkoutMapStore(cwd, remote, branch) {
|
|
|
385
404
|
const clone = spawnSync('git', ['clone', '-q', '--depth', '1', '--branch', branch, remoteUrl, tmp], {
|
|
386
405
|
encoding: 'utf8',
|
|
387
406
|
maxBuffer: 1 << 20,
|
|
407
|
+
env: gitProcessEnvironment(),
|
|
388
408
|
});
|
|
389
409
|
if (clone.status !== 0) {
|
|
390
410
|
fs.rmSync(tmp, { recursive: true, force: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styleproof",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
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",
|