Skip to content

refactor: scope the runtime package as @tskm/core - #4

Merged
ushironoko merged 1 commit into
mainfrom
chore/scope-main-package
Jun 3, 2026
Merged

refactor: scope the runtime package as @tskm/core#4
ushironoko merged 1 commit into
mainfrom
chore/scope-main-package

Conversation

@ushironoko

Copy link
Copy Markdown
Owner

Why

npm rejects the unscoped name tskm with E403 — "too similar to existing packages (tsm, tsx, tsc, …)" (typosquat protection). So the runtime library is renamed to @tskm/core, consistent with the @tskm/compiler / @tskm/vite family.

What changed

  • packages/tskm package name → @tskm/core (directory kept as packages/tskm).
  • @tskm/compiler: RUNTIME_MODULE and the generated import now target @tskm/core; the compiler discovers schemas imported from the runtime module, so this is load-bearing. Bumped to 0.0.2 (the already-published 0.0.1 still targets the old name).
  • README, examples/basic, compiler test fixtures (the from "@tskm/core" and import("@tskm/core").Infer* forms), and the publish/smoke scripts updated to match.
  • Intentionally unchanged: the tskm CLI command (the @tskm/compiler bin) and the Standard Schema vendor: "tskm" string — these are not the package import name.

Versions after this PR

@tskm/core@0.0.1, @tskm/compiler@0.0.2, @tskm/vite@0.0.1.

Verification (local)

build, the full test suite (560), lint, tsgo typecheck, publint, attw, the publish dry-run (order @tskm/compiler → @tskm/core → @tskm/vite), and the clean-room install+run smoke all pass.

Follow-up

After merge, re-run the bootstrap publish for the three packages, then configure Trusted Publishers; @tskm/compiler@0.0.1 can be deprecated once 0.0.2 is up. See docs/RELEASING.md.

🤖 Generated with Claude Code

npm rejects the unscoped name `tskm` as too similar to existing packages
(tsm/tsx/tsc/...), so rename the runtime library to @tskm/core, matching
the @tskm/compiler and @tskm/vite family.

The compiler discovers schemas imported from the runtime module and emits
imports for it, so update its RUNTIME_MODULE constant and generated import
to @tskm/core, and bump @tskm/compiler to 0.0.2 (the already-published
0.0.1 still targets the old name). README, examples, compiler test
fixtures, and the publish/smoke scripts are updated to match. The `tskm`
CLI command (the @tskm/compiler bin) and the Standard Schema vendor string
are intentionally left unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ushironoko
ushironoko merged commit f93bc15 into main Jun 3, 2026
1 of 3 checks passed
@ushironoko
ushironoko deleted the chore/scope-main-package branch June 3, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant