3.2 KiB
3.2 KiB
name, description
| name | description |
|---|---|
| migrate-deno-repo | Checklist for moving a Deno repo (or a leftover Deno part of one) to Node 22+ + Vite+ with npm, same behavior, full lint parity, one PR |
Template: cunarist/eslint-plugin-explicit-types on main. Read its
AGENTS.md, vite.config.ts, scripts/project-lint.ts, package.json, and
CI before starting, and copy their shape. Never ask the user mid-way when
they're away: decide by the memories, record the choice in the PR.
Branch node-migration (apps) or initial-port (new plugin repos); one PR
with everything.
Inventory first
- List every
deno.jsontask, import-map entry, lint rule (tags, includes,@hugoalh, custom plugins), test,Deno.*call, JSON/CSS/SVG import, and every place the output is consumed (Rust, HTML, Containerfile, CI).
Toolchain
package.jsonin the required key order,engines.node ">=22", nopackageManager, nopeerDependencies;npm install; commitpackage-lock.json.tsconfig.jsonfrom the template;vite.config.tswithfmt: { sortPackageJson: false }and the category-basedlintblock.- Delete
deno.json,deno.lock, and Deno-only files.mod.ts→index.ts;deno.jsonimports →package.jsonimports(#x/*patterns for trailing-slash mappings; aliases may target only direct subfolders ofsrc/, anything else becomes a relative import);jsr:/npm:→ npm packages.
Code
- Only
.tsfiles; no non-.tsimports: CSS via<link>, JSON and SVG as.tsmodules, icons in memona's style. Deno.*→node:*/process. Generated JS written as.ts, built, gitignored.- Decorators stay standard with
accessor; addscripts/decorators.tsif the repo has any. Lit repos:scripts/lit-check.ts+npm run lit-check. scripts/is flat: no subfolders, noindex.ts(barrels live only insrc/);vite.config.tsimports./scripts/<name>.tsdirectly. A scripts subfolder that is really an app moves undersrc/.
Lint
scripts/project-lint.tscopied; old local Deno lint rules ported into it; parity mapping for every former rule;id-match; no disable comments; no sourceoverrides; refactor size-rule hits.
Tests
Deno.test→ Vitest (codemod, then finish TODOs); unit tests next to code, integration intests/; no case dropped.
Build, ship, CI
vp buildin app mode with the same output paths, orvp packfor packages. Containerfile node stage onnode:24-alpine. CI withsetup-vp:vp check, build,vp test(+ lit-check). Packages: release-triggeredpublish.yml.AGENTS.mdwith the damem header,.agents/notes from the damem kit, README updated (Node.js 22+, no Deno instructions).damem doctorclean.
Finish
vp check,vp test, build all pass locally; the app runs.- Commit in plain imperative sentences; open the PR (summary, changes, parity mapping, deviations/risks, "CI fails until @cunarist/eslint-plugin-* are published" if relevant, verification, footer line).
- Run
review-cycle. Never merge, publish, or archive.