chore: adopt the patricktree-stack monorepo baseline - #5
Merged
Conversation
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>
Uh oh!
There was an error while loading. Please reload this page.
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>
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 freeto 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.
Problem
This monorepo carries its own tooling stack while the other patricktree monorepos have moved to the shared
.patricktree-stackbaseline. That divergence has real costs: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.superturbo, a bespoke Node wrapper aroundturbo, exists only to pass CLI defaults that Turborepo 2 either applies itself or exposes asturbo.jsoncsettings..nvmrcis read by a repo-local CI action, while the other repos derive the runtime frompackage.json#devEngines.runtime.@types/nodeandtypescriptare pinned per package, so versions drift between workspace projects.Solution
Adopt the shared baseline: register
.patricktree-stackas 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-typescriptstays as-is (target ES2018, module node16, real JS emit todist/) 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
eslintand@typescript-eslint/*as their own product dependencies; only the way this repository lints itself changes.Details
chore: add.patricktree-stackgit submodule— pinned at9af373a, branchmain; CI checks out submoduleschore(node): manage Node.js viapackage.json#devEngines.runtime`` — replaces.nvmrc(`^24.18.0`, `onFail: download`)ci: use.patricktree-stack/.github/actions/bootstrap-repo`` — drops the repo-localbootstrap-monorepoaction; the stricter `permissions: {}` of this repo is preservedbuild(deps): add pnpm catalogs—@types/node,typescript,@typescript/native,oxfmt,oxlint,oxlint-tsgolint,vitest,@vitest/coverage-v8build(typescript): resolvetypescriptto@typescript/typescript6and add@typescript/native(TypeScript 7)build(turbo): extend@patricktree-stack/config-turbo-typescript; removeplatform/config-turbo``build(turbo)!: removeplatform/superturbo`` — its defaults move intoturbo.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 frameworksstyle(format)!: replace Prettier with oxfmt— removesplatform/config-prettier,.prettierrc.js,.prettierignorebuild(lint)!: replace ESLint with oxlint— removesplatform/eslint-configand every.eslintrc.cjs; each project gets anoxlint.config.tsextending the shared base and lints withoxlint --type-aware --max-warnings 0build(knip): add knip plusdeclutter,fixandvalidatescriptsfix(pkg-consumption-test): write a valid base64_authvalue— pnpm 11 validates it and rejected the previous literal placeholder with[ERROR] Invalid character, which broke every package consumption scenariofix(commons-ecma): drop theanycasts innumbers.convertand the type assertion inisValueInEnum``fix(fetch-favicon): stop asserting thehrefproperty value toPromise``fix(pk-cli): derive the output-file timestamp fromTemporalinstead ofDate`` — addstemporal-polyfill, matching the shared lint rulefix(pkg-management): return a value on every path inadd-all-tsconfigs-as-project-references``refactor: rename locals that shadowed outer bindings—path,__dirname,_checkImportbuild!: remove the roottsconfig.json`` — its referenced leaf projects are notcomposite, which type-aware oxlint rejects; no build ever used itbuild: replace the brokendevscripts withbuild:watch`` —turbo run … --watchis not a valid flag; `turbo watch` ischore(deps): remove the unused@patricktree/commons-ecmadependency of the codemod— reported by knipchore(scripts): renamenuke*toclean, addfix/validate/format:check/declutter``docs(agents): rewrite AGENTS.md for the new toolchainchore(vscode): recommend and configureoxc.oxc-vscode``Changesets
patricktree-stack-baseline-public.mdbumps all 10 published packages atpatch: 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.mdcovers the_authfix.@patricktree/pk-cliand@patricktree/webpage-observerare 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, resolvingtypescriptto@typescript/typescript6 6.0.2and@typescript/nativetotypescript 7.0.2pnpm run fix— 16/16 taskspnpm run validate— 26/26 tasks (build, lint, test) plusknip, all cleanpnpm run format:check— 230 files, all correctly formattedsh .husky/pre-commit— passes against the final treeAlso verified that every change to
packages/codemod-rewrite-module-specifiers-to-full-paths/srcis quote/wrapping only: each changed non-comment line has an exact counterpart on the other side of the diff.Notes for the reviewer
main; this branch touches tooling only.@types/nodemoves from^20to the catalog's^24, which matches the Node.js version the repo now pins viadevEngines.runtime.@patricktree/pkg-management'sadd-all-tsconfigs-as-project-referencesshells out toprettier, 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 viaignoreBinariesinknip.ts. Worth a follow-up.packages/codemod-rewrite-module-specifiers-to-full-pathsdeliberately keepstypescript@~5.9.3as a runtime dependency: it consumes the compiler API and types itself againstts-expose-internals, which tracks TypeScript 5.x internals.binshims that loaddist/on purpose carry a targetedoxlint-disable-next-linewith the reason stated inline.Written by @patricktree's agent (Claude Code, Opus 5).