@nx/plugin 23.0.0-beta.17 → 23.0.0-beta.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/plugin",
3
- "version": "23.0.0-beta.17",
3
+ "version": "23.0.0-beta.19",
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": {
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "tslib": "^2.3.0",
32
- "@nx/devkit": "23.0.0-beta.17",
33
- "@nx/jest": "23.0.0-beta.17",
34
- "@nx/js": "23.0.0-beta.17",
35
- "@nx/eslint": "23.0.0-beta.17"
32
+ "@nx/devkit": "23.0.0-beta.19",
33
+ "@nx/jest": "23.0.0-beta.19",
34
+ "@nx/js": "23.0.0-beta.19",
35
+ "@nx/eslint": "23.0.0-beta.19"
36
36
  },
37
37
  "devDependencies": {
38
- "nx": "23.0.0-beta.17"
38
+ "nx": "23.0.0-beta.19"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -15,7 +15,8 @@ describe('<%=propertyName%>Hasher', () => {
15
15
  },
16
16
  overrides: {},
17
17
  outputs: [],
18
- parallelism: true
18
+ parallelism: true,
19
+ cache: false
19
20
  }, {
20
21
  hasher: mockHasher
21
22
  } as unknown as HasherContext)
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/lint-checks/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,oBAAoB,EAGpB,mBAAmB,EACnB,IAAI,EAIL,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAuB,MAAM,2BAA2B,CAAC;AAU7E,wBAA8B,wBAAwB,CACpD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,iBA2BzC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,WAAW,QAyDzB;AAmLD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,oBAAoB,GAC5B,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC,CAO7E"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/lint-checks/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,oBAAoB,EAGpB,mBAAmB,EACnB,IAAI,EAIL,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAuB,MAAM,2BAA2B,CAAC;AAU7E,wBAA8B,wBAAwB,CACpD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,iBA2BzC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,WAAW,QAyDzB;AA2MD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,oBAAoB,GAC5B,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC,CAO7E"}
@@ -96,6 +96,25 @@ function updateProjectTarget(host, options, packageJson) {
96
96
  opts.lintFilePatterns.push(`${project.root}/package.json`);
97
97
  opts.lintFilePatterns = [...new Set(opts.lintFilePatterns)];
98
98
  project.targets[target].options = opts;
99
+ // Plugin checks read schema/implementation files which may live in the
100
+ // project's build outputs (and migration prompt files copied as assets).
101
+ // Ensure lint runs after build and includes the relevant build outputs
102
+ // as inputs so the sandbox allows the reads and the cache invalidates
103
+ // when those outputs change.
104
+ const targetConfig = project.targets[target];
105
+ const dependsOn = new Set(targetConfig.dependsOn ?? []);
106
+ dependsOn.add('build');
107
+ targetConfig.dependsOn = Array.from(dependsOn);
108
+ const inputs = targetConfig.inputs ?? ['...'];
109
+ const hasDependentOutputs = inputs.some((input) => typeof input === 'object' &&
110
+ input !== null &&
111
+ 'dependentTasksOutputFiles' in input);
112
+ if (!hasDependentOutputs) {
113
+ inputs.push({
114
+ dependentTasksOutputFiles: '**/*.{json,d.ts,js,md}',
115
+ });
116
+ }
117
+ targetConfig.inputs = inputs;
99
118
  }
100
119
  }
101
120
  (0, devkit_1.updateProjectConfiguration)(host, options.projectName, project);