Skip to content

chore: adopt the patricktree-stack monorepo baseline - #5

Merged
patricktree merged 2 commits into
mainfrom
chore/patricktree-stack-baseline-public
Jul 29, 2026
Merged

chore: adopt the patricktree-stack monorepo baseline#5
patricktree merged 2 commits into
mainfrom
chore/patricktree-stack-baseline-public

Conversation

@patricktree

Copy link
Copy Markdown
Owner

Problem

This monorepo carries its own tooling stack while the other patricktree monorepos have moved to the shared .patricktree-stack baseline. That divergence has real costs:

  • Tooling drift: local platform/* packages duplicate turbo, ESLint and Prettier configuration that the shared stack already owns, so every upstream improvement has to be re-implemented here by hand.
  • Maintenance: superturbo, a bespoke Node wrapper around turbo, exists only to pass CLI defaults that Turborepo 2 either applies itself or exposes as turbo.jsonc settings.
  • Node.js version handling: .nvmrc is read by a repo-local CI action, while the other repos derive the runtime from package.json#devEngines.runtime.
  • Dependency skew: @types/node and typescript are pinned per package, so versions drift between workspace projects.
  • Speed: Prettier and ESLint are the slowest steps in the pre-commit hook and in CI.

Solution

Adopt the shared baseline: register .patricktree-stack as a git submodule and consume its tooling packages and GitHub Actions, so this repo tracks the same stack as the other monorepos.

The published packages keep their existing build contract on purpose. platform/config-typescript stays as-is (target ES2018, module node16, real JS emit to dist/) because the shared stack's TypeScript presets are built for source-only private libraries and would change the emitted output of packages published to npm.

The two ESLint packages this repo publishes keep eslint and @typescript-eslint/* as their own product dependencies; only the way this repository lints itself changes.

Details

  • chore: add .patricktree-stack git submodule — pinned at 9af373a, branch main; CI checks out submodules
  • chore(node): manage Node.js via package.json#devEngines.runtime`` — replaces .nvmrc (`^24.18.0`, `onFail: download`)
  • ci: use .patricktree-stack/.github/actions/bootstrap-repo`` — drops the repo-local bootstrap-monorepo action; the stricter `permissions: {}` of this repo is preserved
  • build(deps): add pnpm catalogs@types/node, typescript, @typescript/native, oxfmt, oxlint, oxlint-tsgolint, vitest, @vitest/coverage-v8
  • build(typescript): resolve typescriptto@typescript/typescript6and add@typescript/native (TypeScript 7)
  • build(turbo): extend @patricktree-stack/config-turbo-typescript; remove platform/config-turbo``
  • build(turbo)!: remove platform/superturbo`` — its defaults move into turbo.jsonc (`concurrency: "100%"`, `noUpdateNotifier: true`); `--env-mode=strict` is Turborepo 2's default and `--framework-inference=false` is a no-op in a workspace without frontend frameworks
  • style(format)!: replace Prettier with oxfmt — removes platform/config-prettier, .prettierrc.js, .prettierignore
  • build(lint)!: replace ESLint with oxlint — removes platform/eslint-config and every .eslintrc.cjs; each project gets an oxlint.config.ts extending the shared base and lints with oxlint --type-aware --max-warnings 0
  • build(knip): add knip plus declutter, fixandvalidate scripts
  • fix(pkg-consumption-test): write a valid base64 _auth value — pnpm 11 validates it and rejected the previous literal placeholder with [ERROR] Invalid character, which broke every package consumption scenario
  • fix(commons-ecma): drop the anycasts innumbers.convertand the type assertion inisValueInEnum``
  • fix(fetch-favicon): stop asserting the hrefproperty value toPromise``
  • fix(pk-cli): derive the output-file timestamp from Temporalinstead ofDate`` — adds temporal-polyfill, matching the shared lint rule
  • fix(pkg-management): return a value on every path in add-all-tsconfigs-as-project-references``
  • refactor: rename locals that shadowed outer bindingspath, __dirname, _checkImport
  • build!: remove the root tsconfig.json`` — its referenced leaf projects are not composite, which type-aware oxlint rejects; no build ever used it
  • build: replace the broken devscripts withbuild:watch`` — turbo run … --watch is not a valid flag; `turbo watch` is
  • chore(deps): remove the unused @patricktree/commons-ecma dependency of the codemod — reported by knip
  • chore(scripts): rename nuke*toclean, add fix/validate/format:check/declutter``
  • docs(agents): rewrite AGENTS.md for the new toolchain
  • chore(vscode): recommend and configure oxc.oxc-vscode``

Changesets

  • patricktree-stack-baseline-public.md bumps all 10 published packages at patch: they are now compiled by TypeScript 6 instead of 5.9. Compiler options and the ES2018 target are unchanged, so the emitted API is the same.
  • pkg-consumption-test-base64-auth.md covers the _auth fix.

@patricktree/pk-cli and @patricktree/webpage-observer are private and correctly excluded.

Validation

No test files changed; the existing suites (Vitest for the codemod, the verdaccio-backed package-consumption scenarios) cover the touched packages and were used to confirm the toolchain swap is behavior-preserving.

Ran:

  • pnpm install --frozen-lockfile — clean install from scratch, resolving typescript to @typescript/typescript6 6.0.2 and @typescript/native to typescript 7.0.2
  • pnpm run fix — 16/16 tasks
  • pnpm run validate — 26/26 tasks (build, lint, test) plus knip, all clean
  • pnpm run format:check — 230 files, all correctly formatted
  • sh .husky/pre-commit — passes against the final tree

Also verified that every change to packages/codemod-rewrite-module-specifiers-to-full-paths/src is quote/wrapping only: each changed non-comment line has an exact counterpart on the other side of the diff.

Notes for the reviewer

  • Every package version is unchanged from main; this branch touches tooling only.
  • @types/node moves from ^20 to the catalog's ^24, which matches the Node.js version the repo now pins via devEngines.runtime.
  • @patricktree/pkg-management's add-all-tsconfigs-as-project-references shells out to prettier, so it fails in any repo on this baseline. Left as-is because it is published and switching it to oxfmt is a breaking change deserving its own changeset; it is recorded via ignoreBinaries in knip.ts. Worth a follow-up.
  • packages/codemod-rewrite-module-specifiers-to-full-paths deliberately keeps typescript@~5.9.3 as a runtime dependency: it consumes the compiler API and types itself against ts-expose-internals, which tracks TypeScript 5.x internals.
  • The unavoidable type assertions and the bin shims that load dist/ on purpose carry a targeted oxlint-disable-next-line with the reason stated inline.

Written by @patricktree's agent (Claude Code, Opus 5).

patricktreeand others added 2 commits July 28, 2026 18:51
Add the shared patricktree-stack baseline as a git submodule so this monorepo
can consume the shared tooling packages (config-oxfmt, config-oxlint,
config-turbo-typescript, ...) and the shared GitHub Actions.
Co-authored-by: patricktree-agents[bot] <2968297+patricktree-agents[bot]@users.noreply.github.com>
Migrate this monorepo's tooling onto the shared `.patricktree-stack` baseline, so
it tracks the same stack as the other patricktree monorepos.
- manage Node.js via `package.json#devEngines.runtime` instead of `.nvmrc`, and
bootstrap CI with `.patricktree-stack/.github/actions/bootstrap-repo`
- add pnpm catalogs for `@types/node`, `typescript`, `@typescript/native`,
`oxfmt`, `oxlint`, `oxlint-tsgolint`, `vitest` and `@vitest/coverage-v8`
- resolve `typescript` to `@typescript/typescript6` and add `@typescript/native`
(TypeScript 7) alongside it
- extend `@patricktree-stack/config-turbo-typescript`; drop the local
`@patricktree/config-turbo` and the `superturbo` wrapper, whose defaults now
live in `turbo.jsonc`
- replace Prettier with oxfmt and ESLint with oxlint, removing the local
`config-prettier` and `eslint-config` packages and every `.eslintrc.cjs`
- add knip plus `declutter`, `fix` and `validate` scripts
- reformat the workspace and resolve the findings the shared oxlint config
surfaces; unavoidable assertions and the `bin` shims that load `dist/` on
purpose carry a targeted `oxlint-disable-next-line` with the reason inline
- fix `@patricktree/pkg-consumption-test` to write a valid base64 `_auth` value,
which pnpm 11 requires
`platform/config-typescript` stays as-is: the shared TypeScript presets target
source-only private libraries and would change the emitted output of packages
published to npm.
Co-authored-by: patricktree-agents[bot] <2968297+patricktree-agents[bot]@users.noreply.github.com>
@patricktree
patricktree merged commit 9183e69 into mainJul 29, 2026
2 checks passed
@patricktree
patricktree deleted the chore/patricktree-stack-baseline-public branch July 29, 2026 06:09
patricktree added a commit that referenced this pull request Jul 29, 2026
AGENTS.md still documented Prettier, ESLint, `superturbo` and `.nvmrc`, none of
which exist after the patricktree-stack migration in #5. Describe the current
commands and conventions instead, and drop the stale `patches/` entry for a
directory this repository does not have.
Co-authored-by: patricktree-agents[bot] <2968297+patricktree-agents[bot]@users.noreply.github.com>
Sign up for freeto 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

@patricktree