Skip to content

chore: automate snippet validation via npm test#51

Merged
EndlessTrax merged 2 commits into
mainfrom
chore/issue-48-snippet-validation-ci
Jul 21, 2026
Merged

chore: automate snippet validation via npm test#51
EndlessTrax merged 2 commits into
mainfrom
chore/issue-48-snippet-validation-ci

Conversation

@EndlessTrax

Copy link
Copy Markdown
Owner

Summary

  • add scripts/validate-snippets.js to validate snippet JSON, required fields, catalog prefix namespaces, and duplicate prefixes
  • add npm test in package.json to run snippet validation from a single command
  • update PR CI workflow to use npm test instead of inline node -e parsing
  • update contributor docs in README.md and .github/copilot-instructions.md to match the new validation flow

Validation

  • npm ci
  • npm test
  • npx vsce package

Closes #48

- add scripts/validate-snippets.js for JSON, required-field, namespace, and duplicate-prefix checks
- add npm test script to run snippet validation
- update PR CI workflow to use npm test
- refresh contributor/internal docs to reference npm test-based validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@EndlessTrax EndlessTrax added documentation Updated docs! javascript Pull requests that update javascript code github_actions Pull requests that update GitHub Actions code labels Jul 21, 2026
@EndlessTrax EndlessTrax self-assigned this Jul 21, 2026
@EndlessTrax
EndlessTrax requested a review from Copilot July 21, 2026 23:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR formalizes snippet-catalog validation as a first-class workflow step by introducing a dedicated Node.js validation script and wiring it into npm test, CI, and contributor documentation for this VS Code snippets extension.

Changes:

  • Add scripts/validate-snippets.js to validate snippet JSON structure, required fields, prefix namespaces, and duplicate prefixes across catalogs.
  • Add npm test in package.json to run the validation script.
  • Update GitHub Actions CI and docs (README + Copilot instructions) to use the new npm test validation flow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/validate-snippets.js New validation script for snippet catalogs and prefix rules.
README.md Updates CI/contribution docs to reference npm test.
package.json Adds scripts.test to run the validator.
.github/workflows/ci.yml Switches snippet validation step to npm test.
.github/copilot-instructions.md Updates documented local/CI validation commands to npm test.

Comment thread scripts/validate-snippets.js
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@EndlessTrax
EndlessTrax merged commit c4d5a61 into main Jul 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updated docs! github_actions Pull requests that update GitHub Actions code javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore: Implement Automated Snippet Validation Script for CI

2 participants