refactor: move sources from ts/ to src/ - #252
Merged
Merged
Conversation
`ts/` is not a convention anyone else follows. The ecosystem standard is
`src/`, and shared tooling assumes it — `@repobuddy/vitest`'s presets glob
`{src,source,code}/**`, which matched nothing here.
Renamed with `git mv` so history follows the files, and updated every
reference: tsconfig `include`/`rootDir`/typedoc entry points, package.json
`files`, jsr.json exports and publish globs, the tsdown entry, the vitest
include/coverage globs, and turbo's task inputs.
Closes #251
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zwSon8Goytv7sZrXLoays
With sources under `src/`, the shared preset's globs finally match, so the hand-written include and coverage globs can go. `includeGeneralTests` opts in to the plain `*.spec.ts` names this package uses; the preset only matches the platform-suffixed `*.spec.node.ts` form by default. The 100% coverage thresholds stay local — they are this package's gate, not something the shared preset sets. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zwSon8Goytv7sZrXLoays
🦋 Changeset detectedLatest commit: d54fa3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Closes #251
packages/path-equal/ts/andpackages/uni-path/ts/held this repo's TypeScript sources.ts/is not a convention anyone else follows, and the concrete cost was that@repobuddy/vitest's presets glob{src,source,code}/**— importing one here matched nothing, so the repo hand-wrote its test config instead.What changed
Both source directories renamed with
git mv, so history follows the files (GitHub shows them as pure renames). Every reference that named the old path was updated:packages/*/tsconfig.jsoninclude,rootDir, typedocentryPointspackages/*/package.jsonfilespackages/path-equal/jsr.jsonexports, publishinclude/excludepackages/path-equal/tsdown.config.tspackages/*/vitest.config.tsinclude, coverageinclude/excludeturbo.jsoninputsfor build, coverage, size, test, typecheckNo workflow paths filters, README, or doc references named
ts/.The second commit takes the payoff the issue describes:
packages/path-equal/vitest.config.tsnow importsnodeTestPresetfrom@repobuddy/vitest/config/nodeinstead of hand-writing globs. It passesincludeGeneralTests: true, because the preset matches only the platform-suffixed*.spec.node.tsform by default and this package uses plain*.spec.ts. The 100% coverage thresholds stay local — they are this package's gate, not something the shared preset sets.Verification
pnpm verify(biome ci, build, typecheck, coverage, depcheck, size) is green. Coverage still reports 100% on all four counters with the thresholds enforced, and the resolved config was checked to confirm the preset does not clobberthresholds,provider, orreporter.pnpm packconfirms the published tarball layout —package/src/index.tsin place ofpackage/ts/index.ts, spec files still excluded,cjs/andesm/untouched. Theexportsmap is unchanged, soimport 'path-equal'andrequire('path-equal')resolve exactly as before; a patch changeset covers the tarball layout change.Note
packages/uni-pathis excluded from the pnpm workspace (!packages/uni-pathinpnpm-workspace.yaml), so neither CI norpnpm verifybuilds or tests it. Its rename and config updates are mechanical and were made for consistency, but they are unverified by any run. It also keeps its hand-written vitest config rather than adopting the preset — adding a dependency to a package that cannot be installed or exercised here would be untested change.🤖 Generated with Claude Code
https://claude.ai/code/session_018zwSon8Goytv7sZrXLoays