@mnci/cli 4.43.0 → 4.45.0
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/README.md +28 -0
- package/dist/cli.js +504 -226
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,6 +513,9 @@ packages under mnci (the plan is #383). So far it is **report mode only and chan
|
|
|
513
513
|
```bash
|
|
514
514
|
mnci adopt # what was found, what blocks, what clears each
|
|
515
515
|
mnci adopt --json # the same, as one document
|
|
516
|
+
mnci adopt --tags # step (#379): create the baseline release tags, locally
|
|
517
|
+
mnci adopt --toolchain [--nx <version>] # step (#380): retire old tooling, align Nx, pass the audit
|
|
518
|
+
mnci adopt --overlay --scope @org --registry npm --agent ubuntu-latest # step (#381): the overlay and pipeline
|
|
516
519
|
```
|
|
517
520
|
|
|
518
521
|
It reads git and the filesystem (no Nx, no install, no network) and reports the package manager, the
|
|
@@ -522,6 +525,31 @@ and the root files that are yours (`CLAUDE.md`, `AGENTS.md`). A **blocker** (not
|
|
|
522
525
|
uncommitted changes, a package manager other than npm, no projects) makes it exit non-zero; a **warning**
|
|
523
526
|
names the later adoption step that clears it. Each later step is its own issue under #383.
|
|
524
527
|
|
|
528
|
+
**`--tags`** keeps a release from restarting below what was already published. When a project's name changed
|
|
529
|
+
(for example `mysql` became `@auto/mysql`), `nx release` finds no tag under the new name and versions from the
|
|
530
|
+
disk version. `mnci adopt --tags` creates, for each such project, a lightweight tag under the new name on the
|
|
531
|
+
commit of the old one (`@auto/mysql@1.12.11` on `mysql@1.12.11`). It is local and idempotent, never moves a tag,
|
|
532
|
+
and prints the `git push` for you to run: publishing tags changes the remote, so that stays your decision.
|
|
533
|
+
|
|
534
|
+
**`--toolchain`** brings the root toolchain to what mnci supports, as one diff to review. It refuses a directory
|
|
535
|
+
that is not a clean git work tree and leaves its changes uncommitted, as `mnci upgrade` does. It removes the
|
|
536
|
+
retired formatter configs and dependencies (Prettier, oxfmt, oxlint), the root scripts that call them (a
|
|
537
|
+
`format:check` running `oxfmt` fails once the dependency is gone), and the local-registry scaffolding
|
|
538
|
+
(`.verdaccio`, `verdaccio`, the `local-registry` target); pins `nx` and every `@nx/*` to one exact version, by
|
|
539
|
+
default the newest published in the major already in use (`--nx <version>` overrides it); installs; and runs
|
|
540
|
+
`npm audit fix` (never `--force`) until `mnci ci audit` passes, up to four passes. Run on a copy of a real
|
|
541
|
+
hand-built workspace it moved Nx 23.1.1 to 23.3.0 and the audit gate passed after one pass.
|
|
542
|
+
|
|
543
|
+
**`--overlay`** applies the mnci overlay (release config, `.npmrc`, commitlint, the curated root scripts and the
|
|
544
|
+
CI pipeline) to a repository that has an `nx.json`. It is `mnci upgrade` behind adoption's guard rails: it
|
|
545
|
+
refuses an unclean git tree, takes the same flags (`--scope`, `--registry`, `--organization`, `--project`,
|
|
546
|
+
`--artifacts-feed`, `--agent`, `--variable-group`, `--npm-auth`, `--ci`, `--test-runner`) and fills `--ci` and
|
|
547
|
+
`--test-runner` from what the repository already has (its pipeline files, `jest` or `vitest` in the root
|
|
548
|
+
manifest). The existing pipeline goes through the legacy migration: steps mnci does not recognise are kept in
|
|
549
|
+
the three `# mnci:slot` blocks, the ones it does are replaced by `mnci ci <phase>`, and what cannot be carried
|
|
550
|
+
over is listed. Scope, registry and agent have no safe guess, so they are asked for by flag. Adopt does not
|
|
551
|
+
install Nx: a repository with no `nx.json` is told to run `npx nx@latest init` first.
|
|
552
|
+
|
|
525
553
|
## `mnci upgrade`: re-applying the overlay to an existing workspace
|
|
526
554
|
|
|
527
555
|
Every fix to `workspace-overlay/overlay.use-case.ts` — a release-config correction, a CI guard rewritten,
|