Skip to content

chore(tokens): expose v2 migration bin#775

Merged
netchampfaris merged 4 commits into
mainfrom
chore/tokens-v2-bin
Jun 11, 2026
Merged

chore(tokens): expose v2 migration bin#775
netchampfaris merged 4 commits into
mainfrom
chore/tokens-v2-bin

Conversation

@netchampfaris

@netchampfaris netchampfaris commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose the espresso v2 token migration codemod as the tokens-v2 package bin
  • add a shebang, help output, and symlink-safe CLI detection for package-manager execution

Testing

  • node tailwind/migrate-tokens-v2.js --help
  • npm pkg get bin

Coverage: 56.48% (±0.00% vs main)

Docs preview: https://ui.frappe.io/pr-preview/pr-775/

@barista-for-frappe

Copy link
Copy Markdown

Looks good — exposes the v2 token codemod as the tokens-v2 bin; pure tooling, no component API surface.

  • tailwind/migrate-tokens-v2.js:401 — resolving symlinks on both sides is the right call: the old path.resolve wouldn't follow the package-manager bin symlink, so isCLI would never fire when run as tokens-v2.
  • Minor: fs.realpathSync(invokedPath) throws if process.argv[1] isn't a real on-disk path (some loaders). The invokedPath && guard covers the undefined case but not a non-existent path. Edge-case only; wrap in try/catch if you want to be safe.

@netchampfaris netchampfaris added the beta-release Auto-publish a beta to npm when the PR is merged label Jun 11, 2026
@netchampfaris netchampfaris merged commit 8ff6418 into main Jun 11, 2026
5 checks passed
@netchampfaris netchampfaris deleted the chore/tokens-v2-bin branch June 11, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-release Auto-publish a beta to npm when the PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant