@nx/node 19.8.0 → 20.0.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/node",
3
- "version": "19.8.0",
3
+ "version": "20.0.0-beta.0",
4
4
  "private": false,
5
5
  "description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
6
6
  "repository": {
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.3.0",
35
- "@nx/devkit": "19.8.0",
36
- "@nx/jest": "19.8.0",
37
- "@nx/js": "19.8.0",
38
- "@nx/eslint": "19.8.0",
39
- "@nrwl/node": "19.8.0"
35
+ "@nx/devkit": "20.0.0-beta.0",
36
+ "@nx/jest": "20.0.0-beta.0",
37
+ "@nx/js": "20.0.0-beta.0",
38
+ "@nx/eslint": "20.0.0-beta.0",
39
+ "@nrwl/node": "20.0.0-beta.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -152,9 +152,6 @@ function addAppFiles(tree, options) {
152
152
  if (options.js) {
153
153
  (0, devkit_1.toJS)(tree);
154
154
  }
155
- if (options.pascalCaseFiles) {
156
- devkit_1.logger.warn('NOTE: --pascalCaseFiles is a noop');
157
- }
158
155
  }
159
156
  function addProxy(tree, options) {
160
157
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.frontendProject);
@@ -275,7 +272,6 @@ function updateTsConfigOptions(tree, options) {
275
272
  async function applicationGenerator(tree, schema) {
276
273
  return await applicationGeneratorInternal(tree, {
277
274
  addPlugin: false,
278
- projectNameAndRootFormat: 'derived',
279
275
  ...schema,
280
276
  });
281
277
  }
@@ -400,7 +396,6 @@ async function normalizeOptions(host, options) {
400
396
  directory: options.directory,
401
397
  projectNameAndRootFormat: options.projectNameAndRootFormat,
402
398
  rootProject: options.rootProject,
403
- callingGenerator: '@nx/node:application',
404
399
  });
405
400
  options.rootProject = appProjectRoot === '.';
406
401
  options.projectNameAndRootFormat = projectNameAndRootFormat;
@@ -5,6 +5,5 @@
5
5
  "module": "commonjs",
6
6
  "types": ["node"]
7
7
  },
8
- "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
9
8
  "include": ["src/**/*.ts"]
10
9
  }
@@ -16,7 +16,6 @@ export interface Schema {
16
16
  /** @deprecated use `swcJest` instead */
17
17
  babelJest?: boolean;
18
18
  js?: boolean;
19
- pascalCaseFiles?: boolean;
20
19
  setParserOptionsProject?: boolean;
21
20
  standaloneConfig?: boolean;
22
21
  bundler?: 'esbuild' | 'webpack';
@@ -72,12 +72,6 @@
72
72
  "default": false,
73
73
  "x-deprecated": "Use --swcJest instead for faster compilation"
74
74
  },
75
- "pascalCaseFiles": {
76
- "type": "boolean",
77
- "description": "Use pascal case file names.",
78
- "alias": "P",
79
- "default": false
80
- },
81
75
  "js": {
82
76
  "type": "boolean",
83
77
  "description": "Generate JavaScript files rather than TypeScript files.",
@@ -14,7 +14,6 @@ const config_file_1 = require("@nx/jest/src/utils/config/config-file");
14
14
  async function e2eProjectGenerator(host, options) {
15
15
  return await e2eProjectGeneratorInternal(host, {
16
16
  addPlugin: false,
17
- projectNameAndRootFormat: 'derived',
18
17
  ...options,
19
18
  });
20
19
  }
@@ -134,8 +133,6 @@ async function normalizeOptions(tree, options) {
134
133
  projectNameAndRootFormat: options.rootProject
135
134
  ? 'as-provided'
136
135
  : options.projectNameAndRootFormat,
137
- // this is an internal generator, don't save defaults
138
- callingGenerator: null,
139
136
  });
140
137
  const nxJson = (0, devkit_1.readNxJson)(tree);
141
138
  const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
@@ -14,7 +14,6 @@ const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaul
14
14
  async function libraryGenerator(tree, schema) {
15
15
  return await libraryGeneratorInternal(tree, {
16
16
  addPlugin: false,
17
- projectNameAndRootFormat: 'derived',
18
17
  ...schema,
19
18
  });
20
19
  }
@@ -58,19 +57,15 @@ async function normalizeOptions(tree, options) {
58
57
  directory: options.directory,
59
58
  importPath: options.importPath,
60
59
  projectNameAndRootFormat: options.projectNameAndRootFormat,
61
- callingGenerator: '@nx/node:library',
62
60
  });
63
61
  options.projectNameAndRootFormat = projectNameAndRootFormat;
64
62
  const nxJson = (0, devkit_1.readNxJson)(tree);
65
63
  const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
66
64
  nxJson.useInferencePlugins !== false;
67
65
  options.addPlugin ??= addPluginDefault;
68
- const fileName = getCaseAwareFileName({
69
- fileName: options.simpleModuleName
70
- ? projectNames.projectSimpleName
71
- : projectNames.projectFileName,
72
- pascalCaseFiles: options.pascalCaseFiles,
73
- });
66
+ const fileName = (0, devkit_1.names)(options.simpleModuleName
67
+ ? projectNames.projectSimpleName
68
+ : projectNames.projectFileName).fileName;
74
69
  const parsedTags = options.tags
75
70
  ? options.tags.split(',').map((s) => s.trim())
76
71
  : [];
@@ -83,10 +78,6 @@ async function normalizeOptions(tree, options) {
83
78
  importPath,
84
79
  };
85
80
  }
86
- function getCaseAwareFileName(options) {
87
- const normalized = (0, devkit_1.names)(options.fileName);
88
- return options.pascalCaseFiles ? normalized.className : normalized.fileName;
89
- }
90
81
  function createFiles(tree, options) {
91
82
  const { className, name, propertyName } = (0, devkit_1.names)(options.fileName);
92
83
  (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files/lib'), options.projectRoot, {
@@ -18,7 +18,6 @@ export interface Schema {
18
18
  rootDir?: string;
19
19
  babelJest?: boolean;
20
20
  js?: boolean;
21
- pascalCaseFiles?: boolean;
22
21
  strict?: boolean;
23
22
  standaloneConfig?: boolean;
24
23
  setParserOptionsProject?: boolean;
@@ -104,12 +104,6 @@
104
104
  "description": "Use `babel` instead of `ts-jest`.",
105
105
  "default": false
106
106
  },
107
- "pascalCaseFiles": {
108
- "type": "boolean",
109
- "description": "Use pascal case file names.",
110
- "alias": "P",
111
- "default": false
112
- },
113
107
  "js": {
114
108
  "type": "boolean",
115
109
  "description": "Generate JavaScript files rather than TypeScript files.",