@nrwl/nx-plugin 15.0.0-beta.3 → 15.0.0-rc.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/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [15.0.0-beta.3](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.3) (2022-10-11)
6
+ # [15.0.0-rc.0](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-rc.0) (2022-10-12)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/nx-plugin
package/migrations.json CHANGED
@@ -26,6 +26,12 @@
26
26
  "version": "14.2.3-beta.0",
27
27
  "description": "Adds @swc/core and @swc-node as a dev dep if you are using them (repeated due to bad version on earlier migration)",
28
28
  "factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed"
29
+ },
30
+ "update-15-0-0": {
31
+ "cli": "nx",
32
+ "version": "15.0.0-beta.0",
33
+ "description": "Migrates executor schema files to v2",
34
+ "factory": "./src/migrations/update-15-0-0/specify-output-capture"
29
35
  }
30
36
  }
31
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/nx-plugin",
3
- "version": "15.0.0-beta.3",
3
+ "version": "15.0.0-rc.0",
4
4
  "private": false,
5
5
  "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
6
6
  "repository": {
@@ -28,10 +28,10 @@
28
28
  "migrations": "./migrations.json"
29
29
  },
30
30
  "dependencies": {
31
- "@nrwl/devkit": "15.0.0-beta.3",
32
- "@nrwl/jest": "15.0.0-beta.3",
33
- "@nrwl/js": "15.0.0-beta.3",
34
- "@nrwl/linter": "15.0.0-beta.3",
31
+ "@nrwl/devkit": "15.0.0-rc.0",
32
+ "@nrwl/jest": "15.0.0-rc.0",
33
+ "@nrwl/js": "15.0.0-rc.0",
34
+ "@nrwl/linter": "15.0.0-rc.0",
35
35
  "dotenv": "~10.0.0",
36
36
  "fs-extra": "^10.1.0",
37
37
  "tslib": "^2.3.0"
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "834e2db7cb7bf9e075da45fe0334fc872bd35358"
42
+ "gitHead": "0ff93dd5f197141e15265a6d733f7b4e5e36e98e"
43
43
  }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
2
4
  "title": "Nx Plugin Playground Target",
3
5
  "description": "Creates a playground for a Nx Plugin.",
4
6
  "cli": "nx",
@@ -21,7 +23,6 @@
21
23
  "x-completion-type": "file",
22
24
  "x-completion-glob": "tsconfig.*.json"
23
25
  },
24
-
25
26
  "codeCoverage": {
26
27
  "description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)",
27
28
  "type": "boolean",
@@ -66,7 +67,14 @@
66
67
  "bail": {
67
68
  "alias": "b",
68
69
  "description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)",
69
- "oneOf": [{ "type": "number" }, { "type": "boolean" }]
70
+ "oneOf": [
71
+ {
72
+ "type": "number"
73
+ },
74
+ {
75
+ "type": "boolean"
76
+ }
77
+ ]
70
78
  },
71
79
  "ci": {
72
80
  "description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)",
@@ -88,7 +96,14 @@
88
96
  "maxWorkers": {
89
97
  "alias": "w",
90
98
  "description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)",
91
- "oneOf": [{ "type": "number" }, { "type": "string" }]
99
+ "oneOf": [
100
+ {
101
+ "type": "number"
102
+ },
103
+ {
104
+ "type": "string"
105
+ }
106
+ ]
92
107
  },
93
108
  "onlyChanged": {
94
109
  "alias": "o",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
3
4
  "cli": "nx",
4
5
  "title": "<%= className %> executor",
5
6
  "description": "",
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ function update(tree) {
6
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
7
+ for (const [project, { root }] of (0, devkit_1.getProjects)(tree)) {
8
+ const packageJsonPath = (0, devkit_1.joinPathFragments)(root, 'package.json');
9
+ if (!tree.exists(packageJsonPath)) {
10
+ continue;
11
+ }
12
+ const packageJson = (0, devkit_1.readJson)(tree, packageJsonPath);
13
+ if (!packageJson.executors && !packageJson.builders) {
14
+ continue;
15
+ }
16
+ const paths = [packageJson.executors, packageJson.builders].filter(Boolean);
17
+ for (const collectionPathSegment of paths) {
18
+ const collectionPath = (0, devkit_1.joinPathFragments)(root, collectionPathSegment);
19
+ if (!tree.exists(collectionPath)) {
20
+ continue;
21
+ }
22
+ const collectionFile = (0, devkit_1.readJson)(tree, collectionPath);
23
+ const collections = [
24
+ collectionFile.builders,
25
+ collectionFile.executors,
26
+ ].filter(Boolean);
27
+ for (const collection of collections) {
28
+ if (!collection) {
29
+ continue;
30
+ }
31
+ for (const entry of Object.values(collection)) {
32
+ const schemaPath = (0, devkit_1.joinPathFragments)(root, entry.schema);
33
+ if (tree.exists(schemaPath)) {
34
+ (0, devkit_1.updateJson)(tree, schemaPath, (json) => {
35
+ if (json.version) {
36
+ return json;
37
+ }
38
+ else {
39
+ const newProperties = {
40
+ version: 2,
41
+ };
42
+ if (!json.outputCapture) {
43
+ newProperties.outputCapture = 'direct-nodejs';
44
+ }
45
+ return Object.assign(Object.assign({}, newProperties), json);
46
+ }
47
+ });
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ yield (0, devkit_1.formatFiles)(tree);
54
+ });
55
+ }
56
+ exports.default = update;
57
+ //# sourceMappingURL=specify-output-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specify-output-capture.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/migrations/update-15-0-0/specify-output-capture.ts"],"names":[],"mappings":";;;AAAA,yCAQsB;AAItB,SAA8B,MAAM,CAAC,IAAU;;QAC7C,KAAK,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE;YACnD,MAAM,eAAe,GAAG,IAAA,0BAAiB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;YAChE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACjC,SAAS;aACV;YACD,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAc,IAAI,EAAE,eAAe,CAAC,CAAC;YACjE,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;gBACnD,SAAS;aACV;YACD,MAAM,KAAK,GAAG,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5E,KAAK,MAAM,qBAAqB,IAAI,KAAK,EAAE;gBACzC,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;gBACtE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;oBAChC,SAAS;iBACV;gBACD,MAAM,cAAc,GAAkB,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBAErE,MAAM,WAAW,GAAG;oBAClB,cAAc,CAAC,Q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