Skip to content

Align with the Samebase repository standards - #4

Merged
nicu-chiciuc merged 3 commits into
mainfrom
align-standards
Oct 5, 2026
Merged

nicu-chiciuc merged 3 commits into
mainfrom
align-standards

Conversation

@nicu-chiciuc

@nicu-chiciuc nicu-chiciuc commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Aligns the repository with the Samebase base template standards. No behavior change and no version bump, so the release workflow publishes nothing.

Changes

  • Node and pnpm: .node-version is 24. engines is { "node": ">=24.11.0", "pnpm": ">=11.18.0" }. Both workflows already use node-version: 24.
  • Git hooks: prepare runs vp config --no-agent. vite.config.ts has the template staged block ("*": "vp check --fix"). .vite-hooks/pre-commit runs vp staged. The generated .vite-hooks/_/ ignores itself, as in the template.
  • Build: pnpm run build runs vp pack. The pack block in vite.config.ts writes lib/index.js, lib/index.d.ts, and their source maps, then runs publint and attw. attw uses the esm-only profile, because the package is ESM only (the strict profile reports the node10 and node16-cjs modes). failOnWarn makes a publint or attw finding fail the build. fixedExtension: false keeps index.js, the file that exports names. New devDependencies: publint and @arethetypeswrong/core. Deleted tsconfig.build.json and the rewriteRelativeImportExtensions setting.
  • test:live runs node ./scripts/test-live.ts. The script sets ALCHEMY_WORKERS_BUILDS_LIVE=1 in the child environment, starts vp test --run test/live through Node, and forwards the exit code. It works on Windows. tsconfig.json now includes scripts.
  • Docs: SECURITY.md from the template. A short AGENTS.md with the repository rules, including the ownership rule. README: the live test script, the Node and pnpm versions, the pre-commit hook, and the release flow (the old text said to push a v* tag).

Results

  • pnpm run check: pass. Format, lint, and typecheck are clean. Tests: 4 files passed, 3 skipped; 79 tests passed, 3 skipped (the live tests).
  • pnpm run build: pass. lib/index.js 33.06 kB, lib/index.d.ts 13.45 kB, and the maps. attw: no problems found. publint: no issues found.
  • Runtime exports of lib/index.js are the same 9 names as the previous tsc build.
  • A fresh clone with pnpm install --frozen-lockfile installs the hook and passes check and build.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

nicu-chiciuc and others added 3 commits October 5, 2026 17:38
- Pin Node 24 in .node-version and set engines to Node >=24.11.0 and pnpm >=11.18.0.
- Add the prepare script (vp config --no-agent), the staged block, and .vite-hooks/pre-commit.
- Build lib/ with vp pack: declarations and source maps, then publint and attw (esm-only profile).
  A publint or attw finding fails the build. Delete tsconfig.build.json.
- Run the live tests through scripts/test-live.ts, so the env var works on Windows too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SECURITY.md: the Samebase base template text.
- AGENTS.md: the ownership rule, Vite+ commands, test fixtures, live tests, automation, docs,
  and releases.
- README: the live test script, the Node and pnpm versions, the pre-commit hook, and the
  release flow from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributors pin Node 24 through .node-version; consumers on Node 22 and any
pnpm must not get engine warnings from this package.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nicu-chiciuc
nicu-chiciuc merged commit e62e362 into main Oct 5, 2026
1 check passed
@nicu-chiciuc
nicu-chiciuc deleted the align-standards branch October 5, 2026 14:44
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