@nx/plugin 0.0.0-pr-29720-6055188 → 0.0.0-pr-29705-bc2a0dd

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": "0.0.0-pr-29720-6055188",
3
+ "version": "0.0.0-pr-29705-bc2a0dd",
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
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.3.0",
31
- "@nx/devkit": "0.0.0-pr-29720-6055188",
32
- "@nx/jest": "0.0.0-pr-29720-6055188",
33
- "@nx/js": "0.0.0-pr-29720-6055188",
34
- "@nx/eslint": "0.0.0-pr-29720-6055188"
31
+ "@nx/devkit": "0.0.0-pr-29705-bc2a0dd",
32
+ "@nx/jest": "0.0.0-pr-29705-bc2a0dd",
33
+ "@nx/js": "0.0.0-pr-29705-bc2a0dd",
34
+ "@nx/eslint": "0.0.0-pr-29705-bc2a0dd"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -20,7 +20,7 @@ async function addFiles(host, options) {
20
20
  });
21
21
  }
22
22
  function updatePluginConfig(host, options) {
23
- const project = (0, devkit_1.readProjectConfiguration)(host, options.name);
23
+ const project = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
24
24
  if (project.targets.build) {
25
25
  if (options.isTsSolutionSetup && options.bundler === 'tsc') {
26
26
  project.targets.build.options.rootDir = project.sourceRoot;
@@ -36,7 +36,7 @@ function updatePluginConfig(host, options) {
36
36
  else {
37
37
  project.targets.build.options.assets.push({ input: `${root}/src`, glob: '**/!(*.ts)', output: './src' }, { input: `${root}/src`, glob: '**/*.d.ts', output: './src' }, { input: root, glob: 'generators.json', output: '.' }, { input: root, glob: 'executors.json', output: '.' });
38
38
  }
39
- (0, devkit_1.updateProjectConfiguration)(host, options.name, project);
39
+ (0, devkit_1.updateProjectConfiguration)(host, options.projectName, project);
40
40
  }
41
41
  }
42
42
  async function pluginGenerator(tree, schema) {
@@ -82,7 +82,7 @@ async function pluginGeneratorInternal(host, schema) {
82
82
  updatePluginConfig(host, options);
83
83
  if (options.e2eTestRunner !== 'none') {
84
84
  tasks.push(await (0, e2e_1.e2eProjectGenerator)(host, {
85
- pluginName: options.name,
85
+ pluginName: options.projectName,
86
86
  projectDirectory: options.projectDirectory,
87
87
  pluginOutputPath: (0, devkit_1.joinPathFragments)('dist', options.rootProject ? options.name : options.projectRoot),
88
88
  npmPackageName: options.npmPackageName,
@@ -94,7 +94,7 @@ async function pluginGeneratorInternal(host, schema) {
94
94
  }));
95
95
  }
96
96
  if (options.linter === eslint_1.Linter.EsLint && !options.skipLintChecks) {
97
- await (0, generator_1.default)(host, { projectName: options.name });
97
+ await (0, generator_1.default)(host, { projectName: options.projectName });
98
98
  }
99
99
  if (!options.skipFormat) {
100
100
  await (0, devkit_1.formatFiles)(host);
@@ -3,6 +3,7 @@ import type { LinterType } from '@nx/eslint';
3
3
  import type { Schema } from '../schema';
4
4
  export interface NormalizedSchema extends Schema {
5
5
  name: string;
6
+ projectName: string;
6
7
  fileName: string;
7
8
  projectRoot: string;
8
9
  projectDirectory: string;
@@ -5,6 +5,7 @@ const devkit_1 = require("@nx/devkit");
5
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
6
  const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
8
9
  async function normalizeOptions(host, options) {
9
10
  const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, options.linter);
10
11
  const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest', 'vitest']);
@@ -32,6 +33,9 @@ async function normalizeOptions(host, options) {
32
33
  bundler: options.compiler ?? 'tsc',
33
34
  fileName: projectName,
34
35
  name: projectName,
36
+ projectName: isTsSolutionSetup
37
+ ? (0, get_import_path_1.getImportPath)(host, projectName)
38
+ : projectName,
35
39
  projectRoot,
36
40
  projectDirectory,
37
41
  parsedTags,