-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: --diff support for take_snapshot #1206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d177419
test: ensure snapshot files are copied to build directory
natorion 8dd62bd
feat: add session-based snapshot diffing to take_snapshot (--diff)
natorion e2f3142
fix: update CLI to use generated definitions and bundle dependencies …
natorion 9ca68f7
docs: update skills with snapshot diff information
natorion 4d66519
removed unneccesary tracking file
natorion 9e60e14
fix: improve ID stability and add diff reset notification
natorion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ function main(): void { | |
|
|
||
| // Create i18n mock | ||
| const i18nDir = path.join(BUILD_DIR, devtoolsFrontEndCorePath, 'i18n'); | ||
| fs.mkdirSync(i18nDir, {recursive: true}); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert? |
||
| const localesFile = path.join(i18nDir, 'locales.js'); | ||
| const localesContent = ` | ||
| export const LOCALES = [ | ||
|
|
@@ -94,6 +95,45 @@ export const ExperimentName = { | |
| writeFile(runtimeFile, runtimeContent); | ||
|
|
||
| copyDevToolsDescriptionFiles(); | ||
| copySnapshotFiles(); | ||
| } | ||
|
|
||
| function copySnapshotFiles() { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert? |
||
| const testsDir = path.join(process.cwd(), 'tests'); | ||
| const buildTestsDir = path.join(BUILD_DIR, 'tests'); | ||
|
|
||
| if (!fs.existsSync(buildTestsDir)) { | ||
| fs.mkdirSync(buildTestsDir, {recursive: true}); | ||
| } | ||
|
|
||
| const files = fs.readdirSync(testsDir); | ||
| for (const file of files) { | ||
| if (file.endsWith('.snapshot')) { | ||
| fs.copyFileSync( | ||
| path.join(testsDir, file), | ||
| path.join(buildTestsDir, file), | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| // Also handle subdirectories if needed, but for now we only have snapshots in the root of tests/ | ||
| // Wait, let's check tools/ | ||
| const toolsTestsDir = path.join(testsDir, 'tools'); | ||
| const buildToolsTestsDir = path.join(buildTestsDir, 'tools'); | ||
| if (fs.existsSync(toolsTestsDir)) { | ||
| if (!fs.existsSync(buildToolsTestsDir)) { | ||
| fs.mkdirSync(buildToolsTestsDir, {recursive: true}); | ||
| } | ||
| const toolsFiles = fs.readdirSync(toolsTestsDir); | ||
| for (const file of toolsFiles) { | ||
| if (file.endsWith('.snapshot')) { | ||
| fs.copyFileSync( | ||
| path.join(toolsTestsDir, file), | ||
| path.join(buildToolsTestsDir, file), | ||
| ); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| function copyDevToolsDescriptionFiles() { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert