@nx/workspace 0.0.0-pr-28808-eac89e6 → 0.0.0-pr-29122-4727ac1

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/workspace",
3
- "version": "0.0.0-pr-28808-eac89e6",
3
+ "version": "0.0.0-pr-29122-4727ac1",
4
4
  "private": false,
5
5
  "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
6
6
  "repository": {
@@ -38,12 +38,12 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@nx/devkit": "0.0.0-pr-28808-eac89e6",
41
+ "@nx/devkit": "0.0.0-pr-29122-4727ac1",
42
42
  "chalk": "^4.1.0",
43
43
  "enquirer": "~2.3.6",
44
44
  "tslib": "^2.3.0",
45
45
  "yargs-parser": "21.1.1",
46
- "nx": "0.0.0-pr-28808-eac89e6"
46
+ "nx": "0.0.0-pr-29122-4727ac1"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -20,17 +20,18 @@ function generatePreset(host, opts) {
20
20
  interactive: true,
21
21
  },
22
22
  });
23
+ const newWorkspaceRoot = (0, path_1.join)(host.root, opts.directory);
23
24
  const spawnOptions = {
24
25
  stdio: 'inherit',
25
- shell: true,
26
- cwd: (0, path_1.join)(host.root, opts.directory),
27
- windowsHide: false,
26
+ cwd: newWorkspaceRoot,
28
27
  };
29
28
  const pmc = (0, devkit_1.getPackageManagerCommand)();
30
- const executable = `${pmc.exec} nx`;
29
+ const nxBinForNewWorkspaceRoot = require.resolve('nx/bin/nx', {
30
+ paths: [(0, path_1.join)(newWorkspaceRoot, 'node_modules')],
31
+ });
31
32
  const args = getPresetArgs(opts);
32
33
  return new Promise((resolve, reject) => {
33
- (0, child_process_1.spawn)(executable, args, spawnOptions).on('close', (code) => {
34
+ (0, child_process_1.fork)(nxBinForNewWorkspaceRoot, args, spawnOptions).on('close', (code) => {
34
35
  if (code === 0) {
35
36
  resolve();
36
37
  }
@@ -332,7 +332,7 @@ function setUpWorkspacesInPackageJson(tree, options) {
332
332
  options.preset === presets_1.Preset.ReactNative ||
333
333
  options.preset === presets_1.Preset.RemixMonorepo) &&
334
334
  options.workspaces)) {
335
- const workspaces = options.workspaceGlobs ?? ['packages/*'];
335
+ const workspaces = options.workspaceGlobs ?? ['packages/**'];
336
336
  if (options.packageManager === 'pnpm') {
337
337
  tree.write((0, path_1.join)(options.directory, 'pnpm-workspace.yaml'), `packages:
338
338
  - ${workspaces.join('\n - ')}