@nx/plugin 20.2.1 → 20.3.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/plugin",
3
- "version": "20.2.1",
3
+ "version": "20.3.0-beta.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
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.3.0",
31
- "@nx/devkit": "20.2.1",
32
- "@nx/jest": "20.2.1",
33
- "@nx/js": "20.2.1",
34
- "@nx/eslint": "20.2.1"
31
+ "@nx/devkit": "20.3.0-beta.0",
32
+ "@nx/jest": "20.3.0-beta.0",
33
+ "@nx/js": "20.3.0-beta.0",
34
+ "@nx/eslint": "20.3.0-beta.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -87,6 +87,8 @@ async function normalizeOptions(tree, options) {
87
87
  const { artifactName: name, directory, fileName, project, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
88
88
  path: options.path,
89
89
  name: options.name,
90
+ allowedFileExtensions: ['ts'],
91
+ fileExtension: 'ts',
90
92
  });
91
93
  const { className, propertyName } = (0, devkit_1.names)(name);
92
94
  const { root: projectRoot, sourceRoot: projectSourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, project);
@@ -9,7 +9,7 @@
9
9
  "properties": {
10
10
  "path": {
11
11
  "type": "string",
12
- "description": "The file path to the executor without the file extension. Relative to the current working directory.",
12
+ "description": "The file path to the executor. Relative to the current working directory.",
13
13
  "x-prompt": "What is the executor file path?",
14
14
  "$default": {
15
15
  "$source": "argv",
@@ -14,6 +14,8 @@ async function normalizeOptions(tree, options) {
14
14
  const { artifactName: name, directory, fileName, project, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
15
15
  path: options.path,
16
16
  name: options.name,
17
+ allowedFileExtensions: ['ts'],
18
+ fileExtension: 'ts',
17
19
  });
18
20
  const { className, propertyName } = (0, devkit_1.names)(name);
19
21
  const { root: projectRoot, sourceRoot: projectSourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, project);
@@ -8,6 +8,10 @@
8
8
  "examples": [
9
9
  {
10
10
  "description": "Generate a generator exported with the name matching the file name. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
11
+ "command": "nx g @nx/plugin:generator mylib/src/generators/foo.ts"
12
+ },
13
+ {
14
+ "description": "Generate a generator without providing the file extension. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
11
15
  "command": "nx g @nx/plugin:generator mylib/src/generators/foo"
12
16
  },
13
17
  {
@@ -18,7 +22,7 @@
18
22
  "properties": {
19
23
  "path": {
20
24
  "type": "string",
21
- "description": "The file path to the generator without the file extension. Relative to the current working directory.",
25
+ "description": "The file path to the generator. Relative to the current working directory.",
22
26
  "$default": {
23
27
  "$source": "argv",
24
28
  "index": 0
@@ -13,6 +13,8 @@ async function normalizeOptions(tree, options) {
13
13
  const { artifactName: name, directory, fileName, project, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
14
14
  path: options.path,
15
15
  name: options.name,
16
+ allowedFileExtensions: ['ts'],
17
+ fileExtension: 'ts',
16
18
  });
17
19
  const { root: projectRoot, sourceRoot: projectSourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, project);
18
20
  const description = options.description ?? `Migration for v${options.packageVersion}`;
@@ -8,6 +8,10 @@
8
8
  "examples": [
9
9
  {
10
10
  "description": "Generate a migration exported with the name matching the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
11
+ "command": "nx g @nx/plugin:migration mylib/src/migrations/foo.ts -v=1.0.0"
12
+ },
13
+ {
14
+ "description": "Generate a migration without providing the file extension, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
11
15
  "command": "nx g @nx/plugin:migration mylib/src/migrations/foo -v=1.0.0"
12
16
  },
13
17
  {