@codependix/nx 0.0.2 → 0.0.3
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/CHANGELOG.md +10 -0
- package/README.md +209 -98
- package/dist/{plugin-context.utilities-Bre57JBa.js → plugin-context.utilities-BR1ONpzC.js} +79 -36
- package/dist/src/executors/gate/executor.js +1 -1
- package/dist/src/executors/gate/hasher.d.ts +25 -0
- package/dist/src/executors/gate/hasher.js +10 -0
- package/dist/src/index.d.ts +57 -5
- package/dist/src/index.js +186 -50
- package/executors.json +2 -1
- package/package.json +9 -3
- package/src/executors/gate/loader.mjs +20 -0
- package/src/executors/gate/schema.json +28 -0
package/executors.json
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"executors": {
|
|
4
4
|
"gate": {
|
|
5
5
|
"description": "Fail a project whose dependency graphs break a codependix boundary rule charged to it, built over the project and its Nx dependencies.",
|
|
6
|
-
"
|
|
6
|
+
"hasher": "@codependix/nx/src/executors/gate/hasher",
|
|
7
|
+
"implementation": "@codependix/nx/src/executors/gate/executor",
|
|
7
8
|
"schema": "./src/executors/gate/schema.json"
|
|
8
9
|
}
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codependix/cli": "0.0.
|
|
7
|
+
"@codependix/cli": "0.0.18",
|
|
8
8
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
9
9
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
10
10
|
"@nx/devkit": "^23.0.0",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"default": "./dist/src/index.js"
|
|
31
31
|
},
|
|
32
32
|
"./executors.json": "./executors.json",
|
|
33
|
+
"./loader": "./src/executors/gate/loader.mjs",
|
|
33
34
|
"./package.json": "./package.json",
|
|
34
35
|
"./src/executors/*": "./dist/src/executors/*.js"
|
|
35
36
|
},
|
|
@@ -38,7 +39,9 @@
|
|
|
38
39
|
"dist",
|
|
39
40
|
"executors.json",
|
|
40
41
|
"LICENSE",
|
|
41
|
-
"README.md"
|
|
42
|
+
"README.md",
|
|
43
|
+
"src/executors/*/schema.json",
|
|
44
|
+
"src/executors/gate/loader.mjs"
|
|
42
45
|
],
|
|
43
46
|
"homepage": "https://github.com/organizzolini/codebase/tree/main/packages/ic-suite/codependix/codependix-nx#readme",
|
|
44
47
|
"keywords": [
|
|
@@ -55,6 +58,9 @@
|
|
|
55
58
|
"nx": {
|
|
56
59
|
"executors": "./executors.json"
|
|
57
60
|
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"typescript": "^6.0.3"
|
|
63
|
+
},
|
|
58
64
|
"publishConfig": {
|
|
59
65
|
"access": "public",
|
|
60
66
|
"registry": "https://registry.npmjs.org"
|
|
@@ -70,5 +76,5 @@
|
|
|
70
76
|
"strict": true
|
|
71
77
|
},
|
|
72
78
|
"types": "./dist/src/index.d.ts",
|
|
73
|
-
"version": "0.0.
|
|
79
|
+
"version": "0.0.3"
|
|
74
80
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Registers the `@swc-node/register` hooks the codependix command line runs
|
|
2
|
+
// under, resolved from this plugin's own dependencies. The gate hands
|
|
3
|
+
// `node --import` this module's file URL.
|
|
4
|
+
|
|
5
|
+
// The hook's own `@swc-node/register/esm-register` cannot stand in for it:
|
|
6
|
+
// that registers `@swc-node/register/esm` relative to the working directory —
|
|
7
|
+
// the consumer's workspace root, which need not have the hook installed, and
|
|
8
|
+
// under pnpm cannot see this plugin's copy of it. Resolving from this module's
|
|
9
|
+
// URL reaches the copy this plugin depends on wherever it is installed. The
|
|
10
|
+
// hooks still read `tsconfig.json` from the working directory.
|
|
11
|
+
|
|
12
|
+
// `module.register` is deprecated (DEP0205) in favor of `module.registerHooks`,
|
|
13
|
+
// which runs synchronous hooks in-thread and so cannot run swc's asynchronous
|
|
14
|
+
// ones: there is no replacement to move to. This file is JavaScript, shipped
|
|
15
|
+
// as written, so the type-aware `no-deprecated` lint never reads the call. If
|
|
16
|
+
// a Node release removes `register`, every gate fails loudly rather than
|
|
17
|
+
// passing. Node 26 prints DEP0205 on each gate's child process.
|
|
18
|
+
import { register } from "node:module";
|
|
19
|
+
|
|
20
|
+
register("@swc-node/register/esm", import.meta.url);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"description": "Fail a project whose dependency graphs break a codependix boundary rule charged to it, built over the project and its Nx dependencies.",
|
|
4
|
+
"properties": {
|
|
5
|
+
"configurationPath": {
|
|
6
|
+
"description": "Path to the codependix configuration file, relative to the workspace root. The path this plugin is registered with in nx.json when omitted.",
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"default": true,
|
|
11
|
+
"description": "Build the graphs over the judged projects' Nx dependency closure. False builds over the judged projects alone.",
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"projects": {
|
|
15
|
+
"description": "Nx project names to judge, replacing the project this target belongs to.",
|
|
16
|
+
"items": { "type": "string" },
|
|
17
|
+
"type": "array"
|
|
18
|
+
},
|
|
19
|
+
"tags": {
|
|
20
|
+
"description": "Nx project tags to judge, selecting every project carrying ANY of them.",
|
|
21
|
+
"items": { "type": "string" },
|
|
22
|
+
"type": "array"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [],
|
|
26
|
+
"title": "Codependix gate",
|
|
27
|
+
"type": "object"
|
|
28
|
+
}
|