@williamthorsen/nmr 0.13.0 → 0.14.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/AGENTS.md +15 -3
- package/README.md +6 -24
- package/dist/esm/.cache +1 -1
- package/dist/esm/default-scripts.js +2 -2
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@ source: '@williamthorsen/nmr@0.0.0-source'
|
|
|
4
4
|
|
|
5
5
|
# nmr: agent guidance
|
|
6
6
|
|
|
7
|
-
This file is managed by `@williamthorsen/nmr`. Do not edit — re-run `
|
|
7
|
+
This file is managed by `@williamthorsen/nmr`. Do not edit — re-run `nmr sync-agent-files` after an nmr upgrade to refresh it.
|
|
8
8
|
|
|
9
9
|
## Discover scripts by running nmr
|
|
10
10
|
|
|
@@ -13,8 +13,20 @@ Run `nmr` with no command (from the monorepo root or any workspace package) to l
|
|
|
13
13
|
## Invocation rules
|
|
14
14
|
|
|
15
15
|
- Use `nmr <command>` for anything nmr provides. Do not use `pnpm run <command>`.
|
|
16
|
-
-
|
|
17
|
-
|
|
16
|
+
- You can invoke nmr from the monorepo root or any workspace package.
|
|
17
|
+
|
|
18
|
+
### How to make `nmr` resolvable
|
|
19
|
+
|
|
20
|
+
`nmr` ships as a workspace bin. The bare `nmr` command works only when your shell can find `<root>/node_modules/.bin/nmr`. Choose one:
|
|
21
|
+
|
|
22
|
+
- **direnv** (recommended for contributors). With [direnv](https://direnv.net/) installed, the repo's `.envrc` adds `node_modules/.bin` to your `PATH` automatically. From any subdirectory, bare `nmr` works.
|
|
23
|
+
- **`pnpm exec nmr <command>`** — works without setup. pnpm resolves the bin from the workspace root.
|
|
24
|
+
|
|
25
|
+
Avoid `npx nmr`. Inside git worktrees, `npx` can resolve a different nmr binary from outside the working tree.
|
|
26
|
+
|
|
27
|
+
### Bootstrap fallback
|
|
28
|
+
|
|
29
|
+
If `nmr` itself fails to run (fresh clone, missing build output), run `pnpm run bootstrap` from the repo root first.
|
|
18
30
|
|
|
19
31
|
## Root vs. workspace context
|
|
20
32
|
|
package/README.md
CHANGED
|
@@ -2,25 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Context-aware script runner for PNPM monorepos. Ships an `nmr` (node-monorepo run) binary that provides centralized, consistent script execution across workspace packages and the monorepo root.
|
|
4
4
|
|
|
5
|
-
<!-- section:release-notes -->
|
|
6
|
-
## Release notes — v0.13.0 (2026-05-04)
|
|
7
|
-
|
|
8
|
-
### 🎉 Features
|
|
9
|
-
|
|
10
|
-
- Add :pre and :post hook conventions to nmr commands (#339)
|
|
11
|
-
|
|
12
|
-
Adds `:pre` and `:post` hook conventions to nmr's command runner. Consumers can declare `X:pre` or `X:post` scripts that nmr runs automatically before and after script `X`. The hook commands are optional and ignored if missing. Hooks fire even when the main command is overridden, and direct invocations like `nmr build:pre` are treated as leaf operations rather than recursively cascading into `build:pre:pre` lookups.
|
|
13
|
-
|
|
14
|
-
- Filter `nmr --help` to nmr commands (#348)
|
|
15
|
-
|
|
16
|
-
Restricts `nmr --help` to nmr commands only. Hook scripts (names ending in `:pre` or `:post`) are now hidden from help, and generic `package.json` lifecycle scripts (`prepare`, `postinstall`, `bootstrap`) no longer appear. When a `package.json` script overrides a built-in nmr command, the override is shown inline alongside the command name with a `*` marker, and a single `* Overridden by package.json` footnote is appended whenever any marker is rendered. Help also now reflects the active resolution context: invoked from a subpackage you see workspace-level overrides; invoked from the repo root (or with `-w`) you see root-level overrides.
|
|
17
|
-
|
|
18
|
-
### 🐛 Bug fixes
|
|
19
|
-
|
|
20
|
-
- Honor -w flag in composite-script step subprocesses (#346)
|
|
21
|
-
|
|
22
|
-
Fixes an issue where invoking `nmr -w <command>` from inside a workspace package, with `<command>` resolving to a composite (multi-step) script defined at the root level, failed with `Unknown command` for any step that was reachable only via the root script registry. The `-w` flag is now propagated to every step's subprocess invocation, so composite scripts run end-to-end regardless of which directory they are invoked from.
|
|
23
|
-
<!-- /section:release-notes -->
|
|
5
|
+
<!-- section:release-notes --><!-- /section:release-notes -->
|
|
24
6
|
|
|
25
7
|
## Installation
|
|
26
8
|
|
|
@@ -238,11 +220,11 @@ Packages with a `vitest.integration.config.ts` file get different test commands.
|
|
|
238
220
|
|
|
239
221
|
#### Audit
|
|
240
222
|
|
|
241
|
-
| Command | Runs
|
|
242
|
-
| ------------ |
|
|
243
|
-
| `audit` | `audit:prod`, `audit:dev`
|
|
244
|
-
| `audit:dev` | `pnpm exec
|
|
245
|
-
| `audit:prod` | `pnpm exec
|
|
223
|
+
| Command | Runs |
|
|
224
|
+
| ------------ | ------------------------- |
|
|
225
|
+
| `audit` | `audit:prod`, `audit:dev` |
|
|
226
|
+
| `audit:dev` | `pnpm exec v11y --dev` |
|
|
227
|
+
| `audit:prod` | `pnpm exec v11y --prod` |
|
|
246
228
|
|
|
247
229
|
#### Dependencies
|
|
248
230
|
|
package/dist/esm/.cache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2d3864d638817ab1f6e49b7d20cb118260518782ce8c8c372346c837f72edadc
|
|
@@ -28,8 +28,8 @@ const standardTestScripts = {
|
|
|
28
28
|
};
|
|
29
29
|
const rootScripts = {
|
|
30
30
|
audit: ["audit:prod", "audit:dev"],
|
|
31
|
-
"audit:dev": "pnpm exec
|
|
32
|
-
"audit:prod": "pnpm exec
|
|
31
|
+
"audit:dev": "pnpm exec v11y --dev",
|
|
32
|
+
"audit:prod": "pnpm exec v11y --prod",
|
|
33
33
|
build: "pnpm --recursive exec nmr build",
|
|
34
34
|
check: ["typecheck", "fmt:check", "lint:check", "test"],
|
|
35
35
|
"check:agent-files": "nmr-sync-agent-files --check",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/nmr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Context-aware script runner for PNPM monorepos",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"jiti": "2.
|
|
42
|
+
"jiti": "2.7.0",
|
|
43
43
|
"js-yaml": "4.1.1",
|
|
44
44
|
"zod": "4.4.3",
|
|
45
45
|
"@williamthorsen/nmr-core": "0.3.1"
|