Make validation script self-contained with directory discovery#1
Closed
magicmark wants to merge 2 commits intoadd-validation-scriptfrom
Closed
Make validation script self-contained with directory discovery#1magicmark wants to merge 2 commits intoadd-validation-scriptfrom
magicmark wants to merge 2 commits intoadd-validation-scriptfrom
Conversation
The find command now uses -maxdepth 1 to restrict the search to the top-level directory only, preventing unintended matches in subdirectories like node_modules. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The script now handles directory discovery internally using Node.js's built-in readdirSync, eliminating the need for find in the npm script. When invoked without arguments, it automatically discovers and validates all GAP-* directories in the repository root. A single directory can still be passed for targeted validation. This keeps all logic self-contained in the script and simplifies the npm task. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3d5499c to
852bbb9
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements Benjie's suggestion from graphql#3 (comment) to make the validation script self-contained by handling GAP directory discovery internally.
Changes
scripts/validate-structure.jsto discover GAP-* directories using Node.js's built-inreaddirSyncpackage.jsontest:structure script to just invoke the script directlyBenefits
🤖 Generated with Claude Code