Skip to content

Add archive snapshots option and separate replay command#2216

Merged
prklm10 merged 10 commits intomasterfrom
pr-2173
May 8, 2026
Merged

Add archive snapshots option and separate replay command#2216
prklm10 merged 10 commits intomasterfrom
pr-2173

Conversation

@prklm10
Copy link
Copy Markdown
Contributor

@prklm10 prklm10 commented May 7, 2026

@prklm10 prklm10 requested a review from a team as a code owner May 7, 2026 05:56
Comment thread packages/core/src/archive.js Fixed
Comment thread packages/core/src/archive.js Fixed
Comment thread packages/core/src/archive.js Fixed
Comment thread packages/core/src/archive.js Fixed
prklm10 added 4 commits May 7, 2026 12:50
Add a spec that spies on Percy.replaySnapshot to throw, exercising the
error-handling branch in replay.js (lines 44-46) so coverage hits 100%.
Drive archiveSnapshot through fs.writeFileSync rather than spying on the
ESM module export (which is a read-only binding under babel ESM), and
silence the unused-expression lint by capturing the spread result.
Add cases for serializeSnapshot with no resources field, readArchivedSnapshots
skipping non-json and directory entries, and Percy honoring an explicit
skipUploads when archiveDir is configured.
archive.js validates the archive dir via validateArchiveDir (resolve +
normalize + '..' rejection) before any join/resolve sinks. The semgrep
rule cannot trace that guard, so suppress at the file level with the
same pattern used for lock.js.
@prklm10 prklm10 merged commit 543eb80 into master May 8, 2026
43 of 45 checks passed
@prklm10 prklm10 deleted the pr-2173 branch May 8, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants