Repository navigation
Conversation
…eset Adds @skillsoft/gamut-codemods: the CLI (clean-tree guard, --dry, --only, --no-report, --force), the runner for ast, splice, and file migrations, the shared helpers (module-string finder, leftovers report, version-range checks, flat ESLint config detection), the preset registry, and the fixture harness. The scope-swap preset has its package map but no migrations yet, so a run only reports the lines that still name an old package. Each breaking change lands its migration in its own PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
@skillsoft/eslint-plugin-gamut
@skillsoft/gamut
@skillsoft/gamut-agent-tools
@skillsoft/gamut-codemods
@skillsoft/gamut-icons
@skillsoft/gamut-illustrations
@skillsoft/gamut-patterns
@skillsoft/gamut-styles
@skillsoft/gamut-tests
@skillsoft/variance
commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage ? 80.96%
=======================================
Files ? 11
Lines ? 331
Branches ? 94
=======================================
Hits ? 268
Misses ? 63
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| const files = fs.statSync(root).isDirectory() ? walk(root) : [root]; | ||
| for (const file of files) { | ||
| for (const migration of active) { | ||
| if (!migration.match(file)) continue; |
CodeQL read `migration.match(file)` in cli.ts as String.prototype.match on a command-line argument and flagged js/regex-injection. Nothing builds a regex from the path; the method just had the same name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dreamwasp
marked this pull request as ready for review
October 20, 2026 15:21
This branch has not been deployed
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.
Overview
First PR in the split of #28. Adds the
@skillsoft/gamut-codemodspackage with an emptyscope-swappreset. Each breaking change brings its own migration in a stacked PR.Stack (split from #28, merge in order):
main👈 this PRmainnpx @skillsoft/gamut-codemods <preset> <path...>, pluslist. Supports--dry,--only=a,b,--no-report, and--force. It refuses to write outside git or into a dirty tree, sogit checkout .always undoes a run.ast(recast reprints),splice(offset edits on the original text), andfile(raw text forpackage.json, configs,.mdx).validatePresetenforces that everyastmigration comes before anyspliceone.scope-swapmanifest has the package rename map and the ESLint plugin prefix, but no migrations. A run reports every line that still names an old package and prints next steps.<case>.input/.output/.warnings.json, plus an idempotence check), CLI tests, andmanifest.test.ts.manifest.test.tstype-checks manifest rows against the built packages.gamut-codemods,gamut-illustrations, andgamut-testsjoin the changesetsfixedgroup.PR Checklist
Testing Instructions
yarn nx test gamut-codemods. Expect 48 tests to pass.Build the CLI and run it on a throwaway repo:
Nothing is rewritten. The leftovers list should show
a.tsx:1andpackage.json:1, followed by the three standing next steps.Edit
a.tsxwithout committing, then rerun. It should refuse and mention--force.node <repo>/packages/gamut-codemods/dist/bin.js listprintsscope-swap.PR Links and Envs
🤖 Generated with Claude Code