@nx/plugin 23.2.0-beta.7 → 23.2.0-beta.8
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/dist/src/generators/create-package/files/create-framework-package/bin/index.ts__tmpl__
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createWorkspace } from 'create-nx-workspace';
|
|
4
4
|
|
|
5
5
|
async function main() {
|
|
6
|
-
const name = process.argv[2]; // TODO: use libraries like yargs
|
|
6
|
+
const name = process.argv[2]; // TODO: use libraries like yargs, <%= unitTestRunner === 'jest' ? 'enquirer' : '@clack/prompts' %>, or another prompting library to set your workspace name
|
|
7
7
|
if (!name) {
|
|
8
8
|
throw new Error('Please provide a name for the workspace');
|
|
9
9
|
}
|
|
@@ -6,7 +6,6 @@ exports.runPackageManagerInstall = runPackageManagerInstall;
|
|
|
6
6
|
exports.newNxProject = newNxProject;
|
|
7
7
|
exports.ensureNxProject = ensureNxProject;
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const devkit_2 = require("@nx/devkit");
|
|
10
9
|
const child_process_1 = require("child_process");
|
|
11
10
|
const node_fs_1 = require("node:fs");
|
|
12
11
|
const path_1 = require("path");
|
|
@@ -22,9 +21,9 @@ function runNxNewCommand(args, silent) {
|
|
|
22
21
|
}
|
|
23
22
|
function patchPackageJsonForPlugin(npmPackageName, distPath) {
|
|
24
23
|
const path = (0, paths_1.tmpProjPath)('package.json');
|
|
25
|
-
const json = (0,
|
|
24
|
+
const json = (0, devkit_1.readJsonFile)(path);
|
|
26
25
|
json.devDependencies[npmPackageName] = `file:${devkit_1.workspaceRoot}/${distPath}`;
|
|
27
|
-
(0,
|
|
26
|
+
(0, devkit_1.writeJsonFile)(path, json);
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
29
|
* Generate a unique name for running CLI commands
|
|
@@ -41,7 +40,7 @@ function uniq(prefix) {
|
|
|
41
40
|
*/
|
|
42
41
|
function runPackageManagerInstall(silent = true) {
|
|
43
42
|
const cwd = (0, paths_1.tmpProjPath)();
|
|
44
|
-
const pmc = (0,
|
|
43
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(cwd));
|
|
45
44
|
const install = (0, child_process_1.execSync)(pmc.install, {
|
|
46
45
|
cwd,
|
|
47
46
|
...(silent ? { stdio: ['ignore', 'ignore', 'ignore'] } : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/plugin",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.8",
|
|
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": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/
|
|
40
|
-
"@nx/
|
|
41
|
-
"@nx/
|
|
42
|
-
"@nx/eslint": "23.2.0-beta.
|
|
39
|
+
"@nx/jest": "23.2.0-beta.8",
|
|
40
|
+
"@nx/js": "23.2.0-beta.8",
|
|
41
|
+
"@nx/devkit": "23.2.0-beta.8",
|
|
42
|
+
"@nx/eslint": "23.2.0-beta.8"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "23.2.0-beta.
|
|
45
|
+
"nx": "23.2.0-beta.8"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@nx/vitest": "23.2.0-beta.
|
|
48
|
+
"@nx/vitest": "23.2.0-beta.8"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@nx/vitest": {
|