@mnci/cli 4.45.0 → 4.47.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 +21 -0
- package/dist/cli.js +472 -83
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -516,6 +516,8 @@ mnci adopt --json # the same, as one document
|
|
|
516
516
|
mnci adopt --tags # step (#379): create the baseline release tags, locally
|
|
517
517
|
mnci adopt --toolchain [--nx <version>] # step (#380): retire old tooling, align Nx, pass the audit
|
|
518
518
|
mnci adopt --overlay --scope @org --registry npm --agent ubuntu-latest # step (#381): the overlay and pipeline
|
|
519
|
+
mnci adopt --kinds [--kind apps/api=node-app] # step (#378): record each project's kind
|
|
520
|
+
mnci adopt --dependencies # step (#392): root runtime dependencies into the projects that import them
|
|
519
521
|
```
|
|
520
522
|
|
|
521
523
|
It reads git and the filesystem (no Nx, no install, no network) and reports the package manager, the
|
|
@@ -540,6 +542,25 @@ default the newest published in the major already in use (`--nx <version>` overr
|
|
|
540
542
|
`npm audit fix` (never `--force`) until `mnci ci audit` passes, up to four passes. Run on a copy of a real
|
|
541
543
|
hand-built workspace it moved Nx 23.1.1 to 23.3.0 and the audit gate passed after one pass.
|
|
542
544
|
|
|
545
|
+
**`--kinds`** records each project's mnci kind as a `type:<kind>` tag, in its `project.json` or the `nx.tags` of
|
|
546
|
+
its `package.json` (`mnci projects` shows it). The kind is read from the project itself: an `index.html` next to
|
|
547
|
+
React, an `engines.vscode`, an `OutputType` of `Exe`, a `package main`, `lib/main.dart`. Where two kinds fit (a
|
|
548
|
+
library that is internal or published, a script that is an app or a library) the project is listed with the
|
|
549
|
+
guess and why, and **not** tagged; name it with `--kind <dir>=<kind>` (repeatable) to accept or change the
|
|
550
|
+
guess, and the step exits non-zero until every project has a kind. A project that already has a `type:*` tag
|
|
551
|
+
keeps it, even one that is not an mnci kind name. Nothing is regenerated and no target is written: Nx infers an
|
|
552
|
+
npm project's targets from its scripts. Needs a clean git tree.
|
|
553
|
+
|
|
554
|
+
**`--dependencies`** moves the root `package.json`'s runtime `dependencies` into the npm projects that import
|
|
555
|
+
them. The root is private and never published, and a bundler externalises only what a project's own manifest
|
|
556
|
+
declares, so a runtime dependency kept at the root ships as an inlined private copy (`mnci doctor` reports it).
|
|
557
|
+
For each root dependency it reads the projects' source (not `node_modules` or build output), adds the package to
|
|
558
|
+
every project that imports it from shipped code at the range the root had, to `devDependencies` where only test
|
|
559
|
+
files import it, and removes it from the root; it then reinstalls so the lockfile follows. A project that already
|
|
560
|
+
declares the package keeps its own range (a different one is reported), and a package no project imports stays at
|
|
561
|
+
the root and is listed, because only you know whether it is root tooling or unused. The root's own
|
|
562
|
+
`devDependencies` stay: sharing the toolchain is what the root is for. Needs a clean git tree.
|
|
563
|
+
|
|
543
564
|
**`--overlay`** applies the mnci overlay (release config, `.npmrc`, commitlint, the curated root scripts and the
|
|
544
565
|
CI pipeline) to a repository that has an `nx.json`. It is `mnci upgrade` behind adoption's guard rails: it
|
|
545
566
|
refuses an unclean git tree, takes the same flags (`--scope`, `--registry`, `--organization`, `--project`,
|