@nx/plugin 17.2.0-beta.4 → 17.2.0-beta.6

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": "17.2.0-beta.4",
3
+ "version": "17.2.0-beta.6",
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": {
@@ -31,11 +31,11 @@
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "fs-extra": "^11.1.0",
33
33
  "tslib": "^2.3.0",
34
- "@nx/devkit": "17.2.0-beta.4",
35
- "@nx/jest": "17.2.0-beta.4",
36
- "@nx/js": "17.2.0-beta.4",
37
- "@nx/eslint": "17.2.0-beta.4",
38
- "@nrwl/nx-plugin": "17.2.0-beta.4"
34
+ "@nx/devkit": "17.2.0-beta.6",
35
+ "@nx/jest": "17.2.0-beta.6",
36
+ "@nx/js": "17.2.0-beta.6",
37
+ "@nx/eslint": "17.2.0-beta.6",
38
+ "@nrwl/nx-plugin": "17.2.0-beta.6"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -35,8 +35,9 @@ exports.runCommandAsync = runCommandAsync;
35
35
  function runNxCommandAsync(command, opts = {
36
36
  silenceError: false,
37
37
  }) {
38
+ const cwd = opts.cwd ?? (0, paths_1.tmpProjPath)();
38
39
  if ((0, utils_1.fileExists)((0, paths_1.tmpProjPath)('package.json'))) {
39
- const pmc = (0, devkit_1.getPackageManagerCommand)();
40
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(cwd));
40
41
  return runCommandAsync(`${pmc.exec} nx ${command}`, opts);
41
42
  }
42
43
  else if (process.platform === 'win32') {
@@ -16,12 +16,13 @@ function runNxCommand(command, opts = {
16
16
  silenceError: false,
17
17
  }) {
18
18
  function _runNxCommand(c) {
19
+ const cwd = opts.cwd ?? (0, paths_1.tmpProjPath)();
19
20
  const execSyncOptions = {
20
- cwd: opts.cwd ?? (0, paths_1.tmpProjPath)(),
21
+ cwd,
21
22
  env: { ...process.env, ...opts.env },
22
23
  };
23
24
  if ((0, utils_1.fileExists)((0, paths_1.tmpProjPath)('package.json'))) {
24
- const pmc = (0, devkit_1.getPackageManagerCommand)();
25
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(cwd));
25
26
  return (0, child_process_1.execSync)(`${pmc.exec} nx ${command}`, execSyncOptions);
26
27
  }
27
28
  else if (process.platform === 'win32') {
@@ -37,9 +37,10 @@ exports.uniq = uniq;
37
37
  * @param silent silent output from the install
38
38
  */
39
39
  function runPackageManagerInstall(silent = true) {
40
- const pmc = (0, devkit_2.getPackageManagerCommand)();
40
+ const cwd = (0, paths_1.tmpProjPath)();
41
+ const pmc = (0, devkit_2.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(cwd));
41
42
  const install = (0, child_process_1.execSync)(pmc.install, {
42
- cwd: (0, paths_1.tmpProjPath)(),
43
+ cwd,
43
44
  ...(silent ? { stdio: ['ignore', 'ignore', 'ignore'] } : {}),
44
45
  });
45
46
  return install ? install.toString() : '';