Compare commits

...

2 commits

Author SHA1 Message Date
Jeffrey (Dongkyu) Kim
e960afda0a Add workflow_dispatch to release workflow and document changeset test anti-pattern
- Add workflow_dispatch trigger to release-npm.yml so releases can be
  manually re-triggered when the automatic path-based trigger misses.
- Document in CLAUDE.md and AGENTS.md that tests must never assert
  .changeset file existence, since changeset version consumes them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:00:40 +09:00
Jeffrey (Dongkyu) Kim
116c145152 Remove consumed changeset assertion that breaks CI after version bump
The test asserted a changeset file exists for used-car-price-search,
but changesets consumes these files during `changeset version`. Since
the package has already been published at 0.1.0, the guard is no
longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:55:02 +09:00
4 changed files with 10 additions and 13 deletions

View file

@ -1,6 +1,7 @@
name: Release npm packages
on:
workflow_dispatch:
push:
branches:
- main

View file

@ -17,6 +17,10 @@ These rules are repo-specific and apply to everything under this directory.
- For release or packaging changes, run `npm run ci`.
- Keep release docs, workflow files, and package metadata aligned in the same change.
## Testing anti-patterns
- **Never write tests that assert `.changeset/*.md` files exist.** Changesets are consumed (deleted) by `changeset version` during the release flow. Any test guarding changeset file presence will break CI on the version-bump commit and block the release pipeline.
## Development skill install rules
- When testing or developing skills from this repository, install or sync the current skill directories into the user's home-directory global skill locations first.

5
CLAUDE.md Normal file
View file

@ -0,0 +1,5 @@
# k-skill
## Testing anti-patterns
- **Never write tests that assert `.changeset/*.md` files exist.** Changesets are consumed (deleted) by `changeset version` during the release flow. Any test guarding changeset file presence will break CI on the version-bump commit and block the release pipeline.

View file

@ -998,19 +998,6 @@ test("pack:dry-run includes the toss-securities workspace", () => {
assert.match(packageJson.scripts["pack:dry-run"], /workspace used-car-price-search/);
});
test("used-car-price-search ships with a changeset for release automation", () => {
const changesetDir = path.join(repoRoot, ".changeset");
const changesetFiles = fs
.readdirSync(changesetDir)
.filter((name) => name.endsWith(".md"))
.map((name) => read(path.join(".changeset", name)));
assert.ok(
changesetFiles.some((doc) => /["']used-car-price-search["']:\s*(patch|minor|major)/.test(doc)),
"expected a changeset entry that releases used-car-price-search",
);
});
test("package-lock captures the toss-securities workspace metadata for npm ci", () => {
const packageLock = readJson("package-lock.json");