ncu-config-nick2bad4u 0.1.0 → 0.2.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/.ncurc.json +3 -0
- package/.ncurc.workspaces.json +3 -0
- package/README.md +32 -5
- package/dist/ncu-config.d.ts +1 -1
- package/dist/ncu-config.d.ts.map +1 -1
- package/dist/ncu-config.js +1 -1
- package/dist/ncu-config.js.map +1 -1
- package/package.json +1 -1
- package/src/ncu-config.ts +1 -1
package/.ncurc.json
CHANGED
package/.ncurc.workspaces.json
CHANGED
package/README.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# ncu-config-nick2bad4u
|
|
2
2
|
|
|
3
|
-
[](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/blob/main/LICENSE) [](https://www.npmjs.com/package/ncu-config-nick2bad4u) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/releases) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/stargazers) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/forks) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/issues) [](https://codecov.io/gh/Nick2bad4u/ncu-config-nick2bad4u) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/actions)
|
|
3
|
+
[](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/blob/main/LICENSE) [](https://www.npmjs.com/package/ncu-config-nick2bad4u) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/releases) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/stargazers) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/forks) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/issues) [](https://codecov.io/gh/Nick2bad4u/ncu-config-nick2bad4u) [](https://sonarcloud.io/summary/new_code?id=Nick2bad4u_ncu-config-nick2bad4u) [](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/actions)
|
|
4
4
|
|
|
5
5
|
Shared [npm-check-updates](https://github.com/raineorshine/npm-check-updates) configurations for Nick2bad4u npm repositories.
|
|
6
6
|
|
|
7
|
+
The package keeps dependency-update policy in one published place and provides separate presets for ordinary packages and npm workspaces. TypeScript is temporarily held back in both presets so repositories do not move to TypeScript 7 before the shared toolchain is ready.
|
|
8
|
+
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
12
|
npm install --save-dev npm-check-updates ncu-config-nick2bad4u
|
|
11
13
|
```
|
|
12
14
|
|
|
15
|
+
The typed helper is ESM-only and supports Node.js `^22.22.3 || ^24.16.0 || >=26.3.0`. The presets support npm-check-updates `^22.2.9`.
|
|
16
|
+
|
|
13
17
|
## Non-workspace repositories
|
|
14
18
|
|
|
15
19
|
Point NCU at the standard config from a package script:
|
|
@@ -34,11 +38,25 @@ Use the workspace preset when the root `package.json` declares npm workspaces:
|
|
|
34
38
|
}
|
|
35
39
|
```
|
|
36
40
|
|
|
37
|
-
The workspace preset checks the root package and every declared workspace.
|
|
41
|
+
The workspace preset sets `workspaces: true` and `root: true`, so it checks the root package and every declared workspace. It keeps `deep: false`; npm workspace traversal and arbitrary nested `package.json` discovery are different NCU modes and cannot be enabled together.
|
|
42
|
+
|
|
43
|
+
Both presets enable NCU's interactive upgrade flow. `npm run update-deps` prompts for selections and writes the selected version ranges to matching manifests, but `install: "never"` prevents NCU from running `npm install`. Command-line options take precedence for one-off behavior.
|
|
44
|
+
|
|
45
|
+
## Temporary TypeScript holdback
|
|
46
|
+
|
|
47
|
+
Both presets currently publish this shared exclusion:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"reject": ["typescript"]
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This freezes TypeScript at the version already declared by each consumer while allowing other dependencies to update. NCU's JSON configuration cannot reject only TypeScript versions `>=7` by package name: a JSON `rejectVersion` pattern would apply to every dependency, while package-aware predicates require a JavaScript config. Remove `typescript` from the shared `reject` list once the shared TypeScript/ESLint/testing stack supports TypeScript 7.
|
|
38
56
|
|
|
39
57
|
## Programmatic access
|
|
40
58
|
|
|
41
|
-
The package exports stable file names, absolute paths, and a
|
|
59
|
+
The package exports stable file names, absolute paths, and a typed loader that verifies the selected workspace mode:
|
|
42
60
|
|
|
43
61
|
```ts
|
|
44
62
|
import {
|
|
@@ -54,6 +72,14 @@ console.log(ncuConfigPath, ncuWorkspacesConfigPath);
|
|
|
54
72
|
console.log(standardConfig.workspaces, workspaceConfig.workspaces);
|
|
55
73
|
```
|
|
56
74
|
|
|
75
|
+
The public helper surface is:
|
|
76
|
+
|
|
77
|
+
- `ncuConfigFileName` and `ncuWorkspacesConfigFileName` for stable published filenames.
|
|
78
|
+
- `ncuConfigPath` and `ncuWorkspacesConfigPath` for absolute installed paths.
|
|
79
|
+
- `loadNcuConfig` to read a preset and verify its workspace mode.
|
|
80
|
+
- `parseNcuConfig` to mode-check an already parsed object.
|
|
81
|
+
- `NcuConfig` and `NcuConfigMode` for TypeScript consumers.
|
|
82
|
+
|
|
57
83
|
The raw JSON files are also exported for JSON-module consumers:
|
|
58
84
|
|
|
59
85
|
```ts
|
|
@@ -68,7 +94,8 @@ import workspaceConfig from "ncu-config-nick2bad4u/.ncurc.workspaces.json" with
|
|
|
68
94
|
- Requires versions to be at least one minute old and caches registry results for 60 minutes.
|
|
69
95
|
- Groups interactive results by dependency type, version impact, ownership changes, publication time, and homepage.
|
|
70
96
|
- Excludes prereleases by default, preserves version ranges, and never installs dependencies automatically.
|
|
71
|
-
-
|
|
97
|
+
- Temporarily excludes the `typescript` package, preventing an automatic TypeScript 7 upgrade.
|
|
98
|
+
- Enables NCU's root-config merging when consumers explicitly use deep or package-file discovery.
|
|
72
99
|
- Keeps the standard and workspace behaviors separate through `workspaces: false` and `workspaces: true`.
|
|
73
100
|
|
|
74
101
|
The config-location flags intentionally stay in the consuming command. NCU uses `configFileName` and `configFilePath` to find an rc file, so embedding either selector inside the file it already loaded is ineffective and non-portable.
|
|
@@ -80,4 +107,4 @@ npm run release:verify
|
|
|
80
107
|
npm pack --dry-run
|
|
81
108
|
```
|
|
82
109
|
|
|
83
|
-
See [the maintenance checklist](docs/UPDATE_CHECKLIST.md) when updating NCU or changing the published policy.
|
|
110
|
+
See [the configuration policy](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/blob/main/docs/CONFIGURATION.md) for the complete contract and [the maintenance checklist](https://github.com/Nick2bad4u/ncu-config-nick2bad4u/blob/main/docs/UPDATE_CHECKLIST.md) when updating NCU or changing the published policy.
|
package/dist/ncu-config.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const ncuWorkspacesConfigFileName: ".ncurc.workspaces.json";
|
|
|
11
11
|
export declare const ncuConfigPath: string;
|
|
12
12
|
/** Absolute path to the bundled npm-workspaces preset. */
|
|
13
13
|
export declare const ncuWorkspacesConfigPath: string;
|
|
14
|
-
/** Load
|
|
14
|
+
/** Load a bundled NCU preset and verify its workspace mode. */
|
|
15
15
|
export declare function loadNcuConfig(mode?: NcuConfigMode): Promise<NcuConfig>;
|
|
16
16
|
/**
|
|
17
17
|
* Validate a bundled NCU configuration object and its workspace mode.
|
package/dist/ncu-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ncu-config.d.ts","sourceRoot":"","sources":["../src/ncu-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,sEAAsE;AACtE,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAE5C,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC;AAMtD,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,EAAG,aAAsB,CAAC;AAExD,8CAA8C;AAC9C,eAAO,MAAM,2BAA2B,EAAG,wBAAiC,CAAC;AAE7E,mEAAmE;AACnE,eAAO,MAAM,aAAa,EAAE,MAE3B,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,EAAE,MAErC,CAAC;AAKF
|
|
1
|
+
{"version":3,"file":"ncu-config.d.ts","sourceRoot":"","sources":["../src/ncu-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,sEAAsE;AACtE,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAE5C,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC;AAMtD,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,EAAG,aAAsB,CAAC;AAExD,8CAA8C;AAC9C,eAAO,MAAM,2BAA2B,EAAG,wBAAiC,CAAC;AAE7E,mEAAmE;AACnE,eAAO,MAAM,aAAa,EAAE,MAE3B,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,EAAE,MAErC,CAAC;AAKF,+DAA+D;AAC/D,wBAAsB,aAAa,CAC/B,IAAI,GAAE,aAA0B,GACjC,OAAO,CAAC,SAAS,CAAC,CASpB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,aAAa,GACpB,SAAS,CAcX"}
|
package/dist/ncu-config.js
CHANGED
|
@@ -9,7 +9,7 @@ export const ncuConfigPath = fileURLToPath(new URL(`../${ncuConfigFileName}`, im
|
|
|
9
9
|
/** Absolute path to the bundled npm-workspaces preset. */
|
|
10
10
|
export const ncuWorkspacesConfigPath = fileURLToPath(new URL(`../${ncuWorkspacesConfigFileName}`, import.meta.url));
|
|
11
11
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12
|
-
/** Load
|
|
12
|
+
/** Load a bundled NCU preset and verify its workspace mode. */
|
|
13
13
|
export async function loadNcuConfig(mode = "standard") {
|
|
14
14
|
const configPath = mode === "workspaces" ? ncuWorkspacesConfigPath : ncuConfigPath;
|
|
15
15
|
const parsedConfig = JSON.parse(
|
package/dist/ncu-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ncu-config.js","sourceRoot":"","sources":["../src/ncu-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAYzC,uDAAuD;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAsB,CAAC;AAExD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,wBAAiC,CAAC;AAE7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAW,aAAa,CAC9C,IAAI,GAAG,CAAC,MAAM,iBAAiB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACtD,CAAC;AAEF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,uBAAuB,GAAW,aAAa,CACxD,IAAI,GAAG,CAAC,MAAM,2BAA2B,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAChE,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAA4B,EAAE,CAC1D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEzE
|
|
1
|
+
{"version":3,"file":"ncu-config.js","sourceRoot":"","sources":["../src/ncu-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAYzC,uDAAuD;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAsB,CAAC;AAExD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,wBAAiC,CAAC;AAE7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GA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
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
3
|
"name": "ncu-config-nick2bad4u",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Shared npm-check-updates configurations for Nick2bad4u npm repositories.",
|
|
7
7
|
"keywords": [
|
package/src/ncu-config.ts
CHANGED
|
@@ -32,7 +32,7 @@ export const ncuWorkspacesConfigPath: string = fileURLToPath(
|
|
|
32
32
|
const isRecord = (value: unknown): value is NcuConfigRecord =>
|
|
33
33
|
typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34
34
|
|
|
35
|
-
/** Load
|
|
35
|
+
/** Load a bundled NCU preset and verify its workspace mode. */
|
|
36
36
|
export async function loadNcuConfig(
|
|
37
37
|
mode: NcuConfigMode = "standard"
|
|
38
38
|
): Promise<NcuConfig> {
|