Repository navigation
Add a changelog, changesets and contributor docs - #23
Merged
Merged
Conversation
Reconstruct CHANGELOG.md for 0.1.0 to 0.4.0 from the GitHub releases and pull requests, and ship it in the package. Set up Changesets, with @changesets/cli and @changesets/changelog-github pinned like the other dev dependencies, so that a release pull request made with `changeset version` raises the version and writes the changelog. The manual "Publish to npm" workflow is unchanged and still publishes. Add CONTRIBUTING.md (commands, layout, changesets, releases, dependencies), SECURITY.md, an issue form for wrong scan results, a pull request template and AGENTS.md for coding agents.
3 of 4 tasks
Huldoser
added a commit
that referenced
this pull request
Dec 2, 2026
## What changed The package now supports Node.js 22.12 and newer instead of 26 and newer, and matches globs with [picomatch](https://github.com/micromatch/picomatch) instead of Node's `path.matchesGlob`, so neither the CLI nor the library prints an `ExperimentalWarning` on Node.js versions before 22.20 and 24.8. ### Node.js 22.12 - `engines.node` is `>=22.12`, and `@types/node` is 22.12.0 (exact, like the other pins) so that type checking catches Node.js APIs newer than the oldest supported version. `.node-version` (26.13.1) stays the development version, used by the full `npm run check` job and the release workflow. - CI adds a `test` job for the latest Node.js 22, 24 and 26 (typecheck, build, tests) and an `oldest-node` job that builds and packs with the development version, then runs the test suite and the packed CLI and library on Node.js 22.12.0, failing if either writes anything to stderr. The library step now passes glob options, so it would catch the warning. ESLint 10 needs Node.js 22.13+, so lint stays in the development-version job. The `ci` job now needs the new jobs; the ruleset's required check is unchanged. ### picomatch instead of `path.matchesGlob` - `picomatch` 4.0.7 is a new runtime dependency (MIT, no dependencies of its own), pinned exactly, with `@types/picomatch` 4.0.3 as a dev dependency. Both are listed in `THIRD_PARTY.md`. The CLI's filter for the experimental-glob warning is removed. - **Glob options** (`--exclude`, `--test`, `--tooling`, `--production`, `--entry-glob` and the library's `exclude`, `scopes` and `entryGlobs`) go through one matcher, `src/globs.ts`, that keeps their syntax: `*` and `**` skip dot files and folders unless the pattern names them, braces, extglobs and character classes work, a backslash separates segments like a slash, `.`/`..` segments and repeated slashes are normalized, a leading `!` is part of the name, and parentheses, `|` and `"` are literal outside extglobs (picomatch would otherwise read `app/(marketing)/**` as a regex group and miss Next.js route groups). - **Workspace patterns** (`--workspace-entries`, `workspaceEntries()`) now select member folders the way npm does in `@npmcli/map-workspaces`: an odd number of leading `!` makes an exclusion, a later including pattern cancels earlier exclusions that match its text, other exclusions apply wherever they are listed, including patterns skip dot folders unless they name them, and exclusions also cover dot folders (npm's `glob` ignore list matches with `dot: true`). The previous last-match-wins reading differed from npm for patterns such as `['!packages/b', 'packages/*']` or `['packages/**', '!packages/b/**']`. - The reference page describes the glob syntax and the workspace selection. A separate `minor` changeset, `.changeset/picomatch-globs.md`, lists the differences users can see: npm's workspace selection; case-sensitive matching on every platform (on macOS and Windows, `path.matchesGlob` ignored case in segments with wildcards); a leading `./` now accepted by `--exclude` and the scope options; a pattern also matching a path spelled exactly like it and `dir/**` matching `dir`; and picomatch's reading of `!(…)` extglobs. The Node.js changeset now only states the new minimum. `.changeset/config.json` and `CONTRIBUTING.md` arrive with #23; merge that first so these changesets are picked up. #23's `CONTRIBUTING.md` and `AGENTS.md` say that the TypeScript compiler is the only runtime dependency; after #23 is merged, this branch needs those lines updated to mention picomatch. Verification: - New tests in `test/globs.test.ts` and `test/entry-discovery.test.ts` cover dot files and folders, `**`, braces, extglobs, character classes, literal parentheses, backslashes, a leading `!`, empty patterns, scopes, entry globs, npm workspace exclusions, and an empty stderr from the library and the CLI. Against the previous implementation, they pass except for the intended changes: the workspace exclusions, the leading `./` and, on macOS, case sensitivity. On Node.js 22.12.0 the stderr test also fails there, on the `ExperimentalWarning`. - Workspace selection was compared with npm 12.2.3's own `@npmcli/map-workspaces` 6.0.0 on 34 pattern lists. All match, except that npm on macOS ignores case. - Node.js 26.14.0: `npm ci --ignore-scripts --no-audit`, `npm run check` (58 tests), `npm pack --dry-run` and `npm audit` (0 vulnerabilities) pass. - Node.js 22.12.0 and 24.23.0: typecheck, build and all 58 tests pass. - The `oldest-node` steps, run by hand on Node.js 22.12.0 against the packed tarball, report a complete scan with one direct call, and neither the CLI nor the library writes to stderr. - actionlint 1.7.12 reports no findings. zizmor was not rerun for this change, which adds one shell line to an existing step. ## Checklist - [x] `npm run check` passes, and tests cover the change. - [x] The docs describe the change: the README, or the guide or reference pages in `docs/`. - [ ] No docs change is needed. - [x] A changeset describes the change for users (`npx changeset`), or the change does not affect them.
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.
What changed
Project docs and a changesets-based release process.
CHANGELOG.mdfor 0.1.0 to 0.4.0, reconstructed from the GitHub releases, tags and pull requests and kept to what users see. 0.2.0 has no GitHub release; its entry comes from feat: trace package entry paths for inventory consumers #11 and feat: prepare code-inventory 0.2.0 with package and handler entry selection #12. The file is added to the package'sfiles..changeset/config.json(GitHub changelog links, public access,main),.changeset/README.md, achangesetscript, and@changesets/cli3.1.0 and@changesets/changelog-github2.0.0 as exact-pinned dev dependencies, listed inTHIRD_PARTY.md(all 37 new packages are MIT or ISC, dev only).CONTRIBUTING.md: setup, commands, layout, tests, docs, changesets, releases, dependencies and pull requests.SECURITY.md(private vulnerability reporting is on), an issue form for wrong scan results, a contact link for vulnerabilities and a pull request template.AGENTS.mdfor coding agents, and links to the new files from the README.The release process: a release pull request made with
GITHUB_TOKEN=$(gh auth token) npx changeset versionraises the version and writes the changelog; after it is merged, the manual "Publish to npm" workflow publishes as before.release.ymlandci.ymlare unchanged, and merging this publishes nothing.Verification:
npm ci --ignore-scripts --no-auditandnpm run checkpass (51 tests);npm pack --dry-runlists 36 files, CHANGELOG.md included;npm auditreports 0 vulnerabilities. In a throwaway copy, a trial changeset andchangeset versionproduced 0.5.0 with a correctly formatted entry above 0.4.0 that passes Prettier.Checklist
npm run checkpasses, and tests cover the change.docs/.npx changeset), or the change does not affect them.