@mnci/cli 4.53.0 → 4.54.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 +19 -18
- package/dist/cli.js +361 -258
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1689,7 +1689,7 @@ release version --dry-run`), which wins over the workspace's default
|
|
|
1689
1689
|
every Python project workspace-wide (the workspace-wide install above) —
|
|
1690
1690
|
both skipped cleanly when the workspace has no Python projects.
|
|
1691
1691
|
|
|
1692
|
-
## Go (`@nx-go/nx-go` —
|
|
1692
|
+
## Go (`@nx-go/nx-go` — a `go.mod` per project, a root `go.work`, golangci-lint + `go test`)
|
|
1693
1693
|
|
|
1694
1694
|
Requires **Go 1.21+** on the machine and on the build agent; `mnci add go-*`
|
|
1695
1695
|
fails fast with an install link when `go` is not on the `PATH`. The generated
|
|
@@ -1702,14 +1702,14 @@ pipeline installs `golangci-lint` itself (see below).
|
|
|
1702
1702
|
| `go-lib` | `packages/<name>` | publishable **by git tag** — see below; lint + test targets only |
|
|
1703
1703
|
| `go-internal-lib` | `libs/<name>` | private shared code, lint + test only — a non-`main` package produces no binary |
|
|
1704
1704
|
|
|
1705
|
-
- **One
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1705
|
+
- **One `go.mod` per project, and a root `go.work` mnci owns** (#289), so a Go
|
|
1706
|
+
project's dependencies are declared in that project, like every other
|
|
1707
|
+
language's. `project-scaffolding/go.use-case.ts` bootstraps the workspace on
|
|
1708
|
+
the first Go `add` with the plugin's `init` (no `convert-to-one-mod`); each
|
|
1709
|
+
generator then writes its own `go.mod`, whose module line mnci rewrites to
|
|
1710
|
+
`<host>/<org>/<repo>/<dir>` from the git origin. Siblings import each other
|
|
1711
|
+
by that path, and `go.work` resolves them locally, with no `replace`
|
|
1712
|
+
directives.
|
|
1713
1713
|
- **A Go library is a capability of slice packages.** The plugin's library
|
|
1714
1714
|
generator writes `<name>.go` at the project root, which makes the root
|
|
1715
1715
|
package the whole library. mnci replaces it with a root `doc.go` and moves
|
|
@@ -1723,16 +1723,17 @@ pipeline installs `golangci-lint` itself (see below).
|
|
|
1723
1723
|
plants a failing test and a lint finding in a nested package and asserts
|
|
1724
1724
|
both fail the project target, so a plugin change that stopped recursing
|
|
1725
1725
|
would surface there rather than as a silently green lib.
|
|
1726
|
-
- **The `go.work` multi-module layout was rejected
|
|
1727
|
-
|
|
1728
|
-
single stale `use` entry — a project directory removed by hand —
|
|
1729
|
-
`go list -m -json` fail, and that breaks the **entire** Nx project
|
|
1730
|
-
not just the Go projects.
|
|
1726
|
+
- **The `go.work` multi-module layout was first rejected and then adopted**
|
|
1727
|
+
(#289), because per-project dependencies are the point. Its one hazard is
|
|
1728
|
+
real: a single stale `use` entry — a project directory removed by hand —
|
|
1729
|
+
makes `go list -m -json` fail, and that breaks the **entire** Nx project
|
|
1730
|
+
graph, not just the Go projects. `mnci doctor` fails on one and names the
|
|
1731
|
+
line to remove.
|
|
1731
1732
|
- **Targets are written explicitly** rather than inferred. `@nx-go/nx-go`
|
|
1732
|
-
supplies `build`/`test`/`lint` by inference, but
|
|
1733
|
-
|
|
1734
|
-
is
|
|
1735
|
-
|
|
1733
|
+
supplies `build`/`test`/`lint` by inference, but mnci writes them into
|
|
1734
|
+
`project.json` explicitly so lint is pinned to `golangci-lint` (the plugin's
|
|
1735
|
+
default is `go fmt`, which only reformats), as it already does for most
|
|
1736
|
+
kinds.
|
|
1736
1737
|
- **The project graph is still inferred, so `affected` is correct.** What the
|
|
1737
1738
|
plugin does not infer is targets; it still derives the _graph_ from imports.
|
|
1738
1739
|
An app that imports `libs/<name>/<slice>` depends on that lib, transitively,
|