@mnci/cli 4.46.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 +11 -0
- package/dist/cli.js +265 -85
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -517,6 +517,7 @@ 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
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
|
|
520
521
|
```
|
|
521
522
|
|
|
522
523
|
It reads git and the filesystem (no Nx, no install, no network) and reports the package manager, the
|
|
@@ -550,6 +551,16 @@ guess, and the step exits non-zero until every project has a kind. A project tha
|
|
|
550
551
|
keeps it, even one that is not an mnci kind name. Nothing is regenerated and no target is written: Nx infers an
|
|
551
552
|
npm project's targets from its scripts. Needs a clean git tree.
|
|
552
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
|
+
|
|
553
564
|
**`--overlay`** applies the mnci overlay (release config, `.npmrc`, commitlint, the curated root scripts and the
|
|
554
565
|
CI pipeline) to a repository that has an `nx.json`. It is `mnci upgrade` behind adoption's guard rails: it
|
|
555
566
|
refuses an unclean git tree, takes the same flags (`--scope`, `--registry`, `--organization`, `--project`,
|