@elliemae/pui-cli 9.0.0-alpha.10 → 9.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/docs/404.html +2 -2
- package/build/docs/api/functions/loadRoutes/index.html +2 -2
- package/build/docs/api/index.html +2 -2
- package/build/docs/api/type-aliases/LIB_NAME/index.html +2 -2
- package/build/docs/api/variables/babelConfig/index.html +2 -2
- package/build/docs/api/variables/commitlintConfig/index.html +2 -2
- package/build/docs/api/variables/eslintBaseConfig/index.html +2 -2
- package/build/docs/api/variables/eslintConfig/index.html +2 -2
- package/build/docs/api/variables/eslintFlatBaseConfig/index.html +2 -2
- package/build/docs/api/variables/eslintFlatBaseConfigStrict/index.html +2 -2
- package/build/docs/api/variables/eslintFlatConfig/index.html +2 -2
- package/build/docs/api/variables/eslintFlatConfigStrict/index.html +2 -2
- package/build/docs/api/variables/jestConfig/index.html +2 -2
- package/build/docs/api/variables/jestNodeConfig/index.html +2 -2
- package/build/docs/api/variables/lintStagedConfig/index.html +2 -2
- package/build/docs/api/variables/prettierConfig/index.html +2 -2
- package/build/docs/api/variables/stylelintConfig/index.html +2 -2
- package/build/docs/api/variables/vitestConfig/index.html +2 -2
- package/build/docs/assets/js/13097d8d.af480dfd.js +1 -0
- package/build/docs/assets/js/{main.00e13c37.js → main.7f815b7e.js} +2 -2
- package/build/docs/assets/js/{runtime~main.cb214d1a.js → runtime~main.f7c5bef0.js} +1 -1
- package/build/docs/eslint-rules-migration/index.html +2 -2
- package/build/docs/index.html +2 -2
- package/build/docs/pui-cli-9-migration/index.html +34 -4
- package/build/docs/ssl-certificate-setup/index.html +2 -2
- package/build/docs/stylelint-migration/index.html +2 -2
- package/build/docs/usage-guide/index.html +2 -2
- package/dist/cjs/skills/migrate-to-pui-cli-9/SKILL.md +43 -5
- package/dist/esm/skills/migrate-to-pui-cli-9/SKILL.md +43 -5
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/skills/migrate-to-pui-cli-9/SKILL.md +43 -5
- package/package.json +4 -5
- package/build/docs/assets/js/13097d8d.c1821d28.js +0 -1
- /package/build/docs/assets/js/{main.00e13c37.js.LICENSE.txt → main.7f815b7e.js.LICENSE.txt} +0 -0
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
name: migrate-to-pui-cli-9
|
|
3
3
|
description: >-
|
|
4
4
|
Migrate a PUI app or library to pui-cli 9 (Node 24, pnpm 11, ESLint 10 flat config, Stylelint 17,
|
|
5
|
-
Husky 9, Vitest 4, semantic-release 25). Use when upgrading @elliemae/pui-cli,
|
|
6
|
-
.eslintrc.cjs to eslint.config.mjs, release.config.cjs to release.config.mjs,
|
|
7
|
-
hooks, fixing Vitest 4 / coverage-v8 breakages,
|
|
8
|
-
App/library production builds
|
|
5
|
+
Husky 9, Vitest 4, semantic-release 25, Lerna 9, Nx 22). Use when upgrading @elliemae/pui-cli,
|
|
6
|
+
migrating from .eslintrc.cjs to eslint.config.mjs, release.config.cjs to release.config.mjs,
|
|
7
|
+
upgrading Husky 8 hooks, fixing Vitest 4 / coverage-v8 breakages, migrating monorepo nx.json from
|
|
8
|
+
@nrwl/workspace to nx 22, or adopting shared configs from pui-cli. App/library production builds
|
|
9
|
+
stay on Webpack.
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Migrate to pui-cli 9
|
|
@@ -221,13 +222,47 @@ export default {
|
|
|
221
222
|
|
|
222
223
|
5. Dry-run: `pnpm exec semantic-release --dry-run`
|
|
223
224
|
|
|
224
|
-
### Phase 9 —
|
|
225
|
+
### Phase 9 — Lerna 9 and Nx 22 (monorepos only)
|
|
226
|
+
|
|
227
|
+
Skip for single-package apps/libs. Applies to repos with `lerna.json`, `nx.json`, and `libs/*` workspaces.
|
|
228
|
+
|
|
229
|
+
1. After `@elliemae/pui-cli@9` is installed, confirm CLIs:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pnpm install
|
|
233
|
+
pnpm exec nx --version # 22.x
|
|
234
|
+
pnpm exec lerna --version # 9.x
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
2. Remove legacy pins if present (`@nrwl/cli`, `@nrwl/tao`, `@nrwl/workspace`, direct `lerna`/`nx`).
|
|
238
|
+
|
|
239
|
+
3. Migrate `nx.json`:
|
|
240
|
+
- `extends`: `@nrwl/workspace/presets/npm.json` → `nx/presets/npm.json`
|
|
241
|
+
- Add `$schema`: `./node_modules/nx/schemas/nx-schema.json`
|
|
242
|
+
- Replace `targetDependencies` with `targetDefaults.<target>.dependsOn` (use `^target` for dependency projects)
|
|
243
|
+
- Remove `tasksRunnerOptions`; move cacheable targets to `"cache": true` in `targetDefaults`
|
|
244
|
+
- Optional: `pnpm exec nx migrate latest && pnpm exec nx migrate --run-migrations`
|
|
245
|
+
|
|
246
|
+
4. Lerna 9: stop using `lerna bootstrap` / `lerna add` / `lerna link` — use pnpm workspaces. Keep existing `lerna.json` unless it referenced removed commands. `pui-cli version` unchanged.
|
|
247
|
+
|
|
248
|
+
5. Smoke-test:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
pnpm exec nx run-many --target=build --all --parallel
|
|
252
|
+
pnpm exec nx affected --target=lint --uncommitted
|
|
253
|
+
pnpm exec pui-cli lint
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
See [pui-cli 9 migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/pui-cli-9-migration) — **Lerna 9 and Nx 22** section for the full `nx.json` template.
|
|
257
|
+
|
|
258
|
+
### Phase 10 — Verify
|
|
225
259
|
|
|
226
260
|
- [ ] `pnpm exec pui-cli lint` — 0 errors
|
|
227
261
|
- [ ] `pnpm exec pui-cli tscheck --files`
|
|
228
262
|
- [ ] `pnpm test` (or `pui-cli vitest` if applicable)
|
|
229
263
|
- [ ] `pnpm run build` (or `pui-cli build`) — Webpack, unchanged
|
|
230
264
|
- [ ] Pre-commit / lint-staged passes (after Husky 9 migration if applicable)
|
|
265
|
+
- [ ] Monorepos: `nx run-many --target=build --all` and `pui-cli version --help`
|
|
231
266
|
- [ ] CI green on the target branch
|
|
232
267
|
|
|
233
268
|
## Common lint fixes after upgrade
|
|
@@ -244,6 +279,9 @@ export default {
|
|
|
244
279
|
| Vitest `optimizer.web` unknown | Rename to `test.deps.optimizer.client` (Vitest 4) |
|
|
245
280
|
| Coverage fails after upgrade | Remove `@vitest/coverage-c8`; use `@vitest/coverage-v8@4` |
|
|
246
281
|
| `release.config.cjs` extends fails | Migrate to `release.config.mjs`; requires semantic-release 22+ (pui-cli 9 ships 25) |
|
|
282
|
+
| `nx` fails after pui-cli 9 bump | Migrate `nx.json` off `@nrwl/*`; use `targetDefaults` not `targetDependencies` |
|
|
283
|
+
| `lerna bootstrap` / `add` / `link` | Removed in lerna 9 — use `pnpm` workspaces and `pnpm add --filter` |
|
|
284
|
+
| Stale `@nrwl/workspace` in lockfile | Remove direct `@nrwl/*` pins; rely on pui-cli's `nx` + `@nx/workspace` |
|
|
247
285
|
|
|
248
286
|
Full rule comparison: [eslint-rules-migration.md](https://docs.pui.mortgagetech.q1.ice.com/cli/eslint-rules-migration) (also at `docs/eslint-rules-migration.md` in pui-cli).
|
|
249
287
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.11",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -94,9 +94,8 @@
|
|
|
94
94
|
"@eslint/compat": "~2.1.0",
|
|
95
95
|
"@eslint/js": "~10.0.1",
|
|
96
96
|
"@faker-js/faker": "~7.6.0",
|
|
97
|
-
"@
|
|
98
|
-
"
|
|
99
|
-
"@nrwl/workspace": "~15.9.7",
|
|
97
|
+
"@nx/workspace": "~22.7.5",
|
|
98
|
+
"nx": "~22.7.5",
|
|
100
99
|
"@pmmmwh/react-refresh-webpack-plugin": "~0.6.2",
|
|
101
100
|
"@semantic-release/changelog": "~6.0.3",
|
|
102
101
|
"@semantic-release/exec": "~7.1.0",
|
|
@@ -219,7 +218,7 @@
|
|
|
219
218
|
"jest-watch-typeahead": "~2.2.2",
|
|
220
219
|
"jscodeshift": "~0.16.1",
|
|
221
220
|
"jsdoc": "~4.0.5",
|
|
222
|
-
"lerna": "~
|
|
221
|
+
"lerna": "~9.0.7",
|
|
223
222
|
"lint-staged": "~17.0.7",
|
|
224
223
|
"lodash": "~4.18.1",
|
|
225
224
|
"mini-css-extract-plugin": "~2.10.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[5455],{2668(e,i,n){n.r(i),n.d(i,{assets:()=>d,contentTitle:()=>t,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"pui-cli-9-migration","title":"pui-cli 9 migration guide","description":"This guide helps PUI consumers upgrade apps and libraries from pui-cli 8 to pui-cli 9.","source":"@site/docs/pui-cli-9-migration.md","sourceDirName":".","slug":"/pui-cli-9-migration","permalink":"/cli/pui-cli-9-migration","draft":false,"unlisted":false,"editUrl":"https://git.elliemae.io/platform-ui/pui-cli.git/docs/pui-cli-9-migration.md","tags":[],"version":"current","frontMatter":{},"sidebar":"docsSidebar","previous":{"title":"PUI CLI Documentation","permalink":"/cli/"},"next":{"title":"Trust SSL Certificate Guide","permalink":"/cli/ssl-certificate-setup"}}');var l=n(6070),r=n(6607);const c={},t="pui-cli 9 migration guide",d={},o=[{value:"At a glance",id:"at-a-glance",level:2},{value:"Recommended rollout",id:"recommended-rollout",level:2},{value:"Step-by-step",id:"step-by-step",level:2},{value:"1. Upgrade toolchain",id:"1-upgrade-toolchain",level:3},{value:"2. Upgrade pui-cli",id:"2-upgrade-pui-cli",level:3},{value:"3. Add flat ESLint config",id:"3-add-flat-eslint-config",level:3},{value:"4. Update Stylelint config",id:"4-update-stylelint-config",level:3},{value:"5. Fix lint",id:"5-fix-lint",level:3},{value:"6. Install the migration skill (optional)",id:"6-install-the-migration-skill-optional",level:3},{value:"Temporary overrides",id:"temporary-overrides",level:2},{value:"Strict config (after cleanup)",id:"strict-config-after-cleanup",level:2},{value:"Husky 9",id:"husky-9",level:2},{value:"Vitest 4",id:"vitest-4",level:2},{value:"semantic-release 25",id:"semantic-release-25",level:2},{value:"1. Upgrade semantic-release (if pinned locally)",id:"1-upgrade-semantic-release-if-pinned-locally",level:3},{value:"2. Migrate release config to ESM",id:"2-migrate-release-config-to-esm",level:3},{value:"3. Custom plugins or overrides",id:"3-custom-plugins-or-overrides",level:3},{value:"4. Verify locally",id:"4-verify-locally",level:3},{value:"Agent-assisted migration",id:"agent-assisted-migration",level:3},{value:"CI checklist",id:"ci-checklist",level:2},{value:"Getting help",id:"getting-help",level:2}];function a(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",input:"input",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.header,{children:(0,l.jsx)(i.h1,{id:"pui-cli-9-migration-guide",children:"pui-cli 9 migration guide"})}),"\n",(0,l.jsxs)(i.p,{children:["This guide helps PUI consumers upgrade apps and libraries from ",(0,l.jsx)(i.strong,{children:"pui-cli 8"})," to ",(0,l.jsx)(i.strong,{children:"pui-cli 9"}),".\nFor ESLint rule-level detail, see ",(0,l.jsx)(i.a,{href:"/cli/eslint-rules-migration",children:"ESLint rules migration guide"}),"."]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"at-a-glance",children:"At a glance"}),"\n",(0,l.jsxs)(i.table,{children:[(0,l.jsx)(i.thead,{children:(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.th,{children:"Topic"}),(0,l.jsx)(i.th,{children:"pui-cli 8"}),(0,l.jsx)(i.th,{children:"pui-cli 9"})]})}),(0,l.jsxs)(i.tbody,{children:[(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Node.js"}),(0,l.jsx)(i.td,{children:"20"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.strong,{children:"24"})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"pnpm"}),(0,l.jsx)(i.td,{children:"8\u201310"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.strong,{children:"11"})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"App/library bundler"}),(0,l.jsx)(i.td,{children:"Webpack"}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.strong,{children:"Webpack"})," (unchanged)"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"ESLint"}),(0,l.jsxs)(i.td,{children:["8.x + ",(0,l.jsx)(i.code,{children:".eslintrc.cjs"})]}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.strong,{children:"10.x"})," + ",(0,l.jsx)(i.code,{children:"eslint.config.mjs"})]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Stylelint"}),(0,l.jsxs)(i.td,{children:["15.x + ",(0,l.jsx)(i.code,{children:"stylelint-config-styled-components"})]}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.strong,{children:"17.x"})," + ",(0,l.jsx)(i.code,{children:"postcss-styled-syntax"})," (styled-components rules inlined)"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsxs)(i.td,{children:["Vitest (via ",(0,l.jsx)(i.code,{children:"pui-cli vitest"}),")"]}),(0,l.jsx)(i.td,{children:"1.x"}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.strong,{children:"4.x"})," (uses Vite internally; not the app bundler)"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"TypeScript lint"}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.code,{children:"@typescript-eslint"})," v5"]}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.code,{children:"typescript-eslint"})," v8"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Exported tsconfig"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:'moduleResolution: "node"'})}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.strong,{children:(0,l.jsx)(i.code,{children:'moduleResolution: "bundler"'})})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Shared config import"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"require('@elliemae/pui-cli').eslintConfig"})}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"import { eslintFlatConfig } from '@elliemae/pui-cli/eslint'"})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Stylelint import"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"require('@elliemae/pui-cli').stylelintConfig"})}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.code,{children:"import { stylelintConfig } from '@elliemae/pui-cli/stylelint'"})," (or keep CJS re-export)"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"semantic-release"}),(0,l.jsxs)(i.td,{children:["21.x + ",(0,l.jsx)(i.code,{children:"release.config.cjs"})]}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.strong,{children:"25.x"})," + ",(0,l.jsx)(i.code,{children:"release.config.mjs"})," (ESM ",(0,l.jsx)(i.code,{children:"extends"})," for shareable config)"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Husky"}),(0,l.jsx)(i.td,{children:"8.x"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.strong,{children:"9.x"})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:"Cursor skill"}),(0,l.jsx)(i.td,{children:"\u2014"}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"pui-cli skills install migrate-to-pui-cli-9 --target all"})})]})]})]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"recommended-rollout",children:"Recommended rollout"}),"\n",(0,l.jsxs)(i.p,{children:["Ship in ",(0,l.jsx)(i.strong,{children:"small PRs"})," to reduce regression risk:"]}),"\n",(0,l.jsxs)(i.ol,{children:["\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Toolchain"})," \u2014 Node 24 + pnpm 11 + CI image updates"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Dependency bump"})," \u2014 ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli@9"})," without ESLint config change"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"ESLint flat config"})," \u2014 add ",(0,l.jsx)(i.code,{children:"eslint.config.mjs"}),", delete legacy ESLint files, fix lint"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Stylelint 17"})," \u2014 simplify ",(0,l.jsx)(i.code,{children:"stylelint.config.cjs"})," (remove ",(0,l.jsx)(i.code,{children:"stylelint-config-styled-components"})," overrides); optional ",(0,l.jsx)(i.code,{children:"stylelint.config.mjs"})]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Husky 9"})," \u2014 update ",(0,l.jsx)(i.code,{children:"prepare"})," script and hook files (if ",(0,l.jsx)(i.code,{children:".husky/"})," exists)"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Vitest 4"})," \u2014 only if the repo uses ",(0,l.jsx)(i.code,{children:"pui-cli vitest"})," (see below)"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"semantic-release 25"})," \u2014 migrate ",(0,l.jsx)(i.code,{children:"release.config.cjs"})," \u2192 ",(0,l.jsx)(i.code,{children:"release.config.mjs"})," (libraries that publish to npm)"]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Debt (optional)"})," \u2014 remove temporary rule overrides, adopt strict config"]}),"\n"]}),"\n",(0,l.jsxs)(i.p,{children:["Each PR should pass: ",(0,l.jsx)(i.code,{children:"lint"}),", ",(0,l.jsx)(i.code,{children:"tscheck"}),", ",(0,l.jsx)(i.code,{children:"test"}),", ",(0,l.jsx)(i.code,{children:"build"}),"."]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"step-by-step",children:"Step-by-step"}),"\n",(0,l.jsx)(i.h3,{id:"1-upgrade-toolchain",children:"1. Upgrade toolchain"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"# .node-version\n24\n"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-json",children:'// package.json (root monorepos)\n"packageManager": "pnpm@11.x.x"\n'})}),"\n",(0,l.jsx)(i.p,{children:"Update Jenkins/docker Node images before merging."}),"\n",(0,l.jsx)(i.h3,{id:"2-upgrade-pui-cli",children:"2. Upgrade pui-cli"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm add -D @elliemae/pui-cli@9\n"})}),"\n",(0,l.jsx)(i.h3,{id:"3-add-flat-eslint-config",children:"3. Add flat ESLint config"}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"React app or library:"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-js",children:"// eslint.config.mjs\nimport { eslintFlatConfig } from '@elliemae/pui-cli/eslint';\n\nexport default eslintFlatConfig;\n"})}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"Node / TS service:"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-js",children:"// eslint.config.mjs\nimport { eslintFlatBaseConfig } from '@elliemae/pui-cli/eslint';\n\nexport default eslintFlatBaseConfig;\n"})}),"\n",(0,l.jsx)(i.p,{children:"Remove:"}),"\n",(0,l.jsxs)(i.ul,{children:["\n",(0,l.jsx)(i.li,{children:(0,l.jsx)(i.code,{children:".eslintrc.cjs"})}),"\n",(0,l.jsx)(i.li,{children:(0,l.jsx)(i.code,{children:".eslintignore"})}),"\n"]}),"\n",(0,l.jsx)(i.h3,{id:"4-update-stylelint-config",children:"4. Update Stylelint config"}),"\n",(0,l.jsxs)(i.p,{children:["pui-cli 9 ships ",(0,l.jsx)(i.strong,{children:"Stylelint 17"})," with ",(0,l.jsx)(i.code,{children:"stylelint-config-recommended@18"})," and ",(0,l.jsx)(i.code,{children:"postcss-styled-syntax"}),". The unmaintained ",(0,l.jsx)(i.code,{children:"stylelint-config-styled-components"})," package is removed; its rules are inlined in the shared config."]}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"Minimal (CJS \u2014 still supported):"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-javascript",children:"// stylelint.config.cjs\nconst { stylelintConfig } = require('@elliemae/pui-cli');\nmodule.exports = stylelintConfig;\n"})}),"\n",(0,l.jsxs)(i.p,{children:["If your repo previously filtered out ",(0,l.jsx)(i.code,{children:"stylelint-config-styled-components"})," from ",(0,l.jsx)(i.code,{children:"extends"}),", delete that workaround \u2014 the base config no longer extends it."]}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"Recommended (ESM):"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-javascript",children:"// stylelint.config.mjs\nimport { stylelintConfig } from '@elliemae/pui-cli/stylelint';\n\nexport default stylelintConfig;\n"})}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsx)(i.code,{children:"pui-cli lint"})," prefers ",(0,l.jsx)(i.code,{children:"stylelint.config.mjs"})," when present, otherwise falls back to ",(0,l.jsx)(i.code,{children:"stylelint.config.cjs"}),"."]}),"\n",(0,l.jsxs)(i.p,{children:["See ",(0,l.jsx)(i.a,{href:"/cli/stylelint-migration",children:"Stylelint migration guide"})," for version and rule changes."]}),"\n",(0,l.jsx)(i.h3,{id:"5-fix-lint",children:"5. Fix lint"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm exec pui-cli lint --fix\npnpm exec pui-cli lint\npnpm exec pui-cli tscheck --files\npnpm test\npnpm run build\n"})}),"\n",(0,l.jsx)(i.h3,{id:"6-install-the-migration-skill-optional",children:"6. Install the migration skill (optional)"}),"\n",(0,l.jsx)(i.p,{children:"Gives Cursor, Claude Code, and GitHub Copilot agents a step-by-step playbook in the repo:"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm exec pui-cli skills list\npnpm exec pui-cli skills install migrate-to-pui-cli-9 --target all\n"})}),"\n",(0,l.jsxs)(i.p,{children:["Skills are copied to ",(0,l.jsx)(i.code,{children:".cursor/skills/"}),", ",(0,l.jsx)(i.code,{children:".claude/skills/"}),", and ",(0,l.jsx)(i.code,{children:".github/skills/"})," (commit them if you want the whole team to share the same agent guidance)."]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"temporary-overrides",children:"Temporary overrides"}),"\n",(0,l.jsxs)(i.p,{children:["Large repos may have pre-existing ",(0,l.jsx)(i.code,{children:"any"})," usage. Legacy ESLint reported these as ",(0,l.jsx)(i.strong,{children:"warnings"}),"; flat config defaults them to ",(0,l.jsx)(i.strong,{children:"error"}),"."]}),"\n",(0,l.jsx)(i.p,{children:"Short-term override (remove in a follow-up):"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-js",children:"import { eslintFlatConfig } from '@elliemae/pui-cli/eslint';\n\nexport default [\n ...eslintFlatConfig,\n {\n rules: {\n '@typescript-eslint/no-explicit-any': 'warn',\n },\n },\n];\n"})}),"\n",(0,l.jsx)(i.p,{children:"Libraries with heavy decorator/micro-frontend typings may need additional one-off overrides \u2014 keep them minimal and tracked."}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"strict-config-after-cleanup",children:"Strict config (after cleanup)"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-js",children:"import { eslintFlatConfigStrict } from '@elliemae/pui-cli/eslint';\n\nexport default eslintFlatConfigStrict;\n"})}),"\n",(0,l.jsxs)(i.p,{children:["Strict mode elevates ",(0,l.jsx)(i.code,{children:"no-unsafe-*"})," and ",(0,l.jsx)(i.code,{children:"exhaustive-deps"})," to error."]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"husky-9",children:"Husky 9"}),"\n",(0,l.jsx)(i.p,{children:"If your repo uses Husky 8 hooks from pui-cli boilerplate:"}),"\n",(0,l.jsxs)(i.ol,{children:["\n",(0,l.jsxs)(i.li,{children:["Upgrade: ",(0,l.jsx)(i.code,{children:"pnpm add -D husky@9"})]}),"\n",(0,l.jsxs)(i.li,{children:["Update ",(0,l.jsx)(i.code,{children:"package.json"}),":","\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-diff",children:'- "prepare": "[ -n \\"$CI\\" ] || husky install"\n+ "prepare": "[ -n \\"$CI\\" ] || husky"\n'})}),"\n"]}),"\n",(0,l.jsxs)(i.li,{children:["Remove the shebang and ",(0,l.jsx)(i.code,{children:"husky.sh"})," source from each hook in ",(0,l.jsx)(i.code,{children:".husky/"}),":","\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-diff",children:'- #!/bin/sh\n- . "$(dirname "$0")/_/husky.sh"\n\npnpm -s dlx lint-staged\n'})}),"\n"]}),"\n",(0,l.jsxs)(i.li,{children:["Delete ",(0,l.jsx)(i.code,{children:".husky/.gitignore"})," if present (v9 regenerates ",(0,l.jsx)(i.code,{children:".husky/_"})," on install)."]}),"\n",(0,l.jsxs)(i.li,{children:["Remove ",(0,l.jsx)(i.code,{children:"husky-init"})," from devDependencies (use ",(0,l.jsx)(i.code,{children:"pnpm exec husky init"})," for new projects)."]}),"\n",(0,l.jsxs)(i.li,{children:["Run ",(0,l.jsx)(i.code,{children:"pnpm prepare"})," and verify with a test commit."]}),"\n"]}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsx)(i.strong,{children:"Environment variable changes:"})," ",(0,l.jsx)(i.code,{children:"HUSKY_SKIP_HOOKS"})," / ",(0,l.jsx)(i.code,{children:"HUSKY_SKIP_INSTALL"})," \u2192 ",(0,l.jsx)(i.code,{children:"HUSKY=0"}),"; ",(0,l.jsx)(i.code,{children:"HUSKY_GIT_PARAMS"})," \u2192 use ",(0,l.jsx)(i.code,{children:"$1"})," in hook scripts."]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"vitest-4",children:"Vitest 4"}),"\n",(0,l.jsxs)(i.p,{children:["Skip this section if the repo uses Jest (",(0,l.jsx)(i.code,{children:"pui-cli test"}),") only. ",(0,l.jsx)(i.strong,{children:"pui-cli 9 still builds apps and libraries with Webpack"}),"; Vite is used by Vitest (and optional ",(0,l.jsx)(i.code,{children:"pui-cli buildCDN"}),"), not for production bundling."]}),"\n",(0,l.jsxs)(i.p,{children:["After bumping ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli@9"}),", align local test dependencies with the versions pui-cli ships:"]}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm add -D vitest@4 @vitest/coverage-v8@4 vite@8 @vitejs/plugin-react@6 vite-tsconfig-paths@6\npnpm remove @vitest/coverage-c8 @types/uuid # if present; uuid 14+ includes types\n"})}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsx)(i.strong,{children:"Extend the shared config"})," (recommended):"]}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-typescript",children:"// vitest.config.ts\nimport { defineConfig, mergeConfig } from 'vitest/config';\nimport { vitestConfig } from '@elliemae/pui-cli/vitest';\n\nexport default mergeConfig(vitestConfig, defineConfig({\n test: {\n // repo-specific overrides\n },\n}));\n"})}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsxs)(i.strong,{children:["If you spread ",(0,l.jsx)(i.code,{children:"vitestConfig"})," manually"]}),", update any Vitest 1.x options:"]}),"\n",(0,l.jsxs)(i.table,{children:[(0,l.jsx)(i.thead,{children:(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.th,{children:"pui-cli 8 / Vitest 1"}),(0,l.jsx)(i.th,{children:"pui-cli 9 / Vitest 4"})]})}),(0,l.jsxs)(i.tbody,{children:[(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"test.deps.optimizer.web"})}),(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"test.deps.optimizer.client"})})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"@vitest/coverage-c8"})}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.code,{children:"@vitest/coverage-v8"})," (coverage provider ",(0,l.jsx)(i.code,{children:"v8"}),")"]})]}),(0,l.jsxs)(i.tr,{children:[(0,l.jsx)(i.td,{children:(0,l.jsx)(i.code,{children:"import { PluginOption } from 'vite'"})}),(0,l.jsxs)(i.td,{children:[(0,l.jsx)(i.code,{children:"import type { PluginOption } from 'vite'"})," (Vite 8)"]})]})]})]}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsx)(i.strong,{children:"TypeScript:"})," exported ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli/app.tsconfig.json"})," and ",(0,l.jsx)(i.code,{children:"library.tsconfig.json"})," use ",(0,l.jsx)(i.code,{children:'moduleResolution: "bundler"'}),". If your ",(0,l.jsx)(i.code,{children:"tsconfig.json"})," extends them, reinstall pui-cli and re-run ",(0,l.jsx)(i.code,{children:"tscheck"}),". Custom tsconfigs that import ",(0,l.jsx)(i.code,{children:"vitest/config"})," or ",(0,l.jsx)(i.code,{children:"vite"})," may need the same setting."]}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsx)(i.strong,{children:"Vitest config import:"})," use ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli/vitest"})," (not the package root). pui-cli 9 publishes ",(0,l.jsx)(i.code,{children:"types"})," on each ",(0,l.jsx)(i.code,{children:"package.json"})," ",(0,l.jsx)(i.code,{children:"exports"})," entry so ",(0,l.jsx)(i.code,{children:"tsc"})," resolves declarations under ",(0,l.jsx)(i.code,{children:'moduleResolution: "bundler"'})," \u2014 no ",(0,l.jsx)(i.code,{children:"tsconfig"})," ",(0,l.jsx)(i.code,{children:"paths"})," workaround."]}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm exec pui-cli vitest --passWithNoTests\npnpm exec pui-cli tscheck --files\n"})}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"semantic-release-25",children:"semantic-release 25"}),"\n",(0,l.jsxs)(i.p,{children:["pui-cli 9 ships ",(0,l.jsx)(i.strong,{children:"semantic-release 25"})," with an ESM shareable config at ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli/releaseConfig"}),". semantic-release 22+ loads ESM ",(0,l.jsx)(i.code,{children:"extends"})," targets via dynamic ",(0,l.jsx)(i.code,{children:"import()"})," \u2014 the old ",(0,l.jsx)(i.code,{children:"release.config.cjs"})," + ",(0,l.jsx)(i.code,{children:"require()"})," path no longer works for the shared config."]}),"\n",(0,l.jsxs)(i.p,{children:[(0,l.jsxs)(i.strong,{children:["Libraries that run ",(0,l.jsx)(i.code,{children:"semantic-release"})," in CI"]})," should migrate in the same PR as the pui-cli 9 bump (or immediately after)."]}),"\n",(0,l.jsx)(i.h3,{id:"1-upgrade-semantic-release-if-pinned-locally",children:"1. Upgrade semantic-release (if pinned locally)"}),"\n",(0,l.jsxs)(i.p,{children:["Most PUI libraries inherit semantic-release from ",(0,l.jsx)(i.code,{children:"@elliemae/pui-cli"}),". If your ",(0,l.jsx)(i.code,{children:"package.json"})," pins ",(0,l.jsx)(i.code,{children:"semantic-release"})," or ",(0,l.jsx)(i.code,{children:"@semantic-release/*"})," plugins directly, align with pui-cli 9:"]}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm add -D semantic-release@25 @semantic-release/changelog@6 @semantic-release/exec@7 @semantic-release/git@10\n"})}),"\n",(0,l.jsxs)(i.p,{children:["Remove explicit pins if the repo only uses ",(0,l.jsx)(i.code,{children:"pnpm release"})," and relies on pui-cli's dependency tree."]}),"\n",(0,l.jsx)(i.h3,{id:"2-migrate-release-config-to-esm",children:"2. Migrate release config to ESM"}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"Before:"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-javascript",children:"// release.config.cjs\nmodule.exports = {\n extends: '@elliemae/pui-cli/releaseConfig',\n};\n"})}),"\n",(0,l.jsx)(i.p,{children:(0,l.jsx)(i.strong,{children:"After:"})}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-javascript",children:"// release.config.mjs\n/** @type {import('semantic-release').GlobalConfig} */\nexport default {\n extends: '@elliemae/pui-cli/releaseConfig',\n};\n"})}),"\n",(0,l.jsxs)(i.p,{children:["Delete ",(0,l.jsx)(i.code,{children:"release.config.cjs"})," after adding ",(0,l.jsx)(i.code,{children:"release.config.mjs"}),"."]}),"\n",(0,l.jsx)(i.h3,{id:"3-custom-plugins-or-overrides",children:"3. Custom plugins or overrides"}),"\n",(0,l.jsxs)(i.p,{children:["Keep repo-specific plugins as relative paths from the config file. ESM plugins use ",(0,l.jsx)(i.code,{children:"export default"}),":"]}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-javascript",children:"// release.config.mjs\nexport default {\n extends: '@elliemae/pui-cli/releaseConfig',\n plugins: [\n '@semantic-release/commit-analyzer',\n // ...other plugins from the shared config if replacing extends entirely\n './my-custom-plugin.mjs',\n ],\n};\n"})}),"\n",(0,l.jsxs)(i.p,{children:["CJS plugins (",(0,l.jsx)(i.code,{children:".cjs"}),") still work when referenced by path."]}),"\n",(0,l.jsx)(i.h3,{id:"4-verify-locally",children:"4. Verify locally"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm exec semantic-release --dry-run\n"})}),"\n",(0,l.jsx)(i.h3,{id:"agent-assisted-migration",children:"Agent-assisted migration"}),"\n",(0,l.jsx)(i.p,{children:"Install the pui-cli 9 skill so Cursor / Copilot agents follow the full config migration playbook (ESLint, Stylelint, Vitest, Husky, and semantic-release):"}),"\n",(0,l.jsx)(i.pre,{children:(0,l.jsx)(i.code,{className:"language-bash",children:"pnpm exec pui-cli skills install migrate-to-pui-cli-9 --target all\n"})}),"\n",(0,l.jsx)(i.p,{children:"Then ask the agent to migrate configuration files for pui-cli 9."}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"ci-checklist",children:"CI checklist"}),"\n",(0,l.jsxs)(i.ul,{className:"contains-task-list",children:["\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ","Node 24 in pipeline"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ","pnpm 11 in pipeline"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ",(0,l.jsx)(i.code,{children:"pui-cli lint"})," (0 errors)"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ",(0,l.jsx)(i.code,{children:"pui-cli tscheck --files"})]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ","Unit tests"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ","Production build"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ","lint-staged / husky hooks pass locally"]}),"\n",(0,l.jsxs)(i.li,{className:"task-list-item",children:[(0,l.jsx)(i.input,{type:"checkbox",disabled:!0})," ",(0,l.jsx)(i.code,{children:"semantic-release --dry-run"})," (libraries that publish to npm)"]}),"\n"]}),"\n",(0,l.jsx)(i.hr,{}),"\n",(0,l.jsx)(i.h2,{id:"getting-help",children:"Getting help"}),"\n",(0,l.jsxs)(i.ul,{children:["\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Rule changes:"})," ",(0,l.jsx)(i.a,{href:"/cli/eslint-rules-migration",children:"eslint-rules-migration.md"})]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Stylelint changes:"})," ",(0,l.jsx)(i.a,{href:"/cli/stylelint-migration",children:"stylelint-migration.md"})]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Commands:"})," ",(0,l.jsx)(i.a,{href:"/cli/usage-guide",children:"usage guide"})]}),"\n",(0,l.jsxs)(i.li,{children:[(0,l.jsx)(i.strong,{children:"Platform team:"})," ",(0,l.jsx)(i.code,{children:"#pui-platform"})," or your team's platform-ui channel"]}),"\n"]})]})}function h(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,l.jsx)(i,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},6607(e,i,n){n.d(i,{R:()=>c,x:()=>t});var s=n(758);const l={},r=s.createContext(l);function c(e){const i=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function t(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:c(e.components),s.createElement(r.Provider,{value:i},e.children)}}}]);
|
|
File without changes
|