nx-lifecycle 1.2.2 → 1.3.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 +1 -1
- package/dist/plugin/lifecycle-plugin.js +1 -1
- package/dist/plugin/schema.d.ts +1 -0
- package/dist/plugin/schema.js +6 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -292,7 +292,7 @@ Multiple targets from different languages or toolchains can bind to the same hoo
|
|
|
292
292
|
}
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
A binding applies to every project that defines the target, through `targetDefaults` or its own `project.json`. A project opts in by defining it (e.g. `"tsc": {}`). A warning is logged for a binding that no `project.json` declares, since it is usually a typo. Targets inferred by Nx plugins are not declared in `project.json`, so they trigger the warning too.
|
|
295
|
+
A binding applies to every project that defines the target, through `targetDefaults` or its own `project.json`. A project opts in by defining it (e.g. `"tsc": {}`). A warning is logged for a binding that no `project.json` declares, since it is usually a typo. Targets inferred by Nx plugins are not declared in `project.json`, so they trigger the warning too. The plugin's `"warnUnusedBindings": false` turns it off, for bindings that cover targets projects add later.
|
|
296
296
|
|
|
297
297
|
#### Project-specific dependencies
|
|
298
298
|
|
|
@@ -132,7 +132,7 @@ export const createDependencies = (options, context)=>{
|
|
|
132
132
|
].join('\n'));
|
|
133
133
|
}
|
|
134
134
|
for (const targetName of lifecyclePlan.registeredTargets.keys()){
|
|
135
|
-
if (!definedTargets.has(targetName)) {
|
|
135
|
+
if (options?.warnUnusedBindings !== false && !definedTargets.has(targetName)) {
|
|
136
136
|
logger.warn(`Bound target ${targetName} is not defined in any project. Is it a typo?`);
|
|
137
137
|
}
|
|
138
138
|
}
|
package/dist/plugin/schema.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ declare const lifecyclePluginOptionsSchema: import("juniper").ObjectSchema<{
|
|
|
36
36
|
hooks: import("juniper").ArraySchema<string, [], never, unknown, false, 0>;
|
|
37
37
|
}, never, boolean, import("juniper").EmptyIndex, unknown, false>, import("juniper").EmptyIndex, unknown, false>;
|
|
38
38
|
bindings: import("juniper").ObjectSchema<{}, never, import("juniper").StringSchema<string, false>, import("juniper").EmptyIndex, unknown, false>;
|
|
39
|
+
warnUnusedBindings: import("juniper").BooleanSchema<false>;
|
|
39
40
|
}, "bindings" | "stages", false, import("juniper").EmptyIndex, unknown, false>;
|
|
40
41
|
export type LifecyclePluginOptions = SchemaType<typeof lifecyclePluginOptionsSchema>;
|
|
41
42
|
export declare const assertLifecyclePluginOptions: JuniperValidator<LifecyclePluginOptions>['assert'];
|
package/dist/plugin/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { objectSchema } from 'juniper';
|
|
1
|
+
import { booleanSchema, objectSchema } from 'juniper';
|
|
2
2
|
import { makeValidator } from 'juniper-validator';
|
|
3
3
|
import { bindingsSchema, stagesSchema } from '../lifecycle/schema.js';
|
|
4
4
|
const lifecyclePluginOptionsSchema = objectSchema({
|
|
@@ -6,7 +6,11 @@ const lifecyclePluginOptionsSchema = objectSchema({
|
|
|
6
6
|
description: 'Infer Nx targets as high level workflows',
|
|
7
7
|
properties: {
|
|
8
8
|
stages: stagesSchema,
|
|
9
|
-
bindings: bindingsSchema
|
|
9
|
+
bindings: bindingsSchema,
|
|
10
|
+
warnUnusedBindings: booleanSchema({
|
|
11
|
+
description: 'Warn about a binding no project defines the target of, which is usually a typo. Turn it off when bindings are written for targets projects add later.',
|
|
12
|
+
default: true
|
|
13
|
+
})
|
|
10
14
|
},
|
|
11
15
|
required: [
|
|
12
16
|
'stages',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx-lifecycle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Nx plugin that derives every dependsOn from declared lifecycle stages (build, test, …) and the targets bound to them.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24"
|
|
@@ -76,8 +76,9 @@
|
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@biomejs/biome": "^2.6.4",
|
|
79
|
-
"@leyman/
|
|
80
|
-
"@leyman/
|
|
79
|
+
"@leyman/configs": "^0.1.0",
|
|
80
|
+
"@leyman/eslint-config": "^0.1.1",
|
|
81
|
+
"@leyman/expect": "^0.1.0",
|
|
81
82
|
"@swc/cli": "^0.8.1",
|
|
82
83
|
"@swc/core": "^1.16.20",
|
|
83
84
|
"@types/mocha": "^10.0.10",
|