@nx/js 0.0.0-pr-29993-9a92505 → 0.0.0-pr-3-c6ccd0d

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/js",
3
- "version": "0.0.0-pr-29993-9a92505",
3
+ "version": "0.0.0-pr-3-c6ccd0d",
4
4
  "private": false,
5
5
  "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "@babel/preset-env": "^7.23.2",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nx/devkit": "0.0.0-pr-29993-9a92505",
43
- "@nx/workspace": "0.0.0-pr-29993-9a92505",
42
+ "@nx/devkit": "0.0.0-pr-3-c6ccd0d",
43
+ "@nx/workspace": "0.0.0-pr-3-c6ccd0d",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^3.1.0",
@@ -52,10 +52,10 @@
52
52
  "ignore": "^5.0.4",
53
53
  "js-tokens": "^4.0.0",
54
54
  "jsonc-parser": "3.2.0",
55
+ "minimatch": "9.0.3",
55
56
  "npm-package-arg": "11.0.1",
56
57
  "npm-run-path": "^4.0.1",
57
58
  "ora": "5.3.0",
58
- "picomatch": "4.0.2",
59
59
  "semver": "^7.5.3",
60
60
  "source-map-support": "0.5.19",
61
61
  "tinyglobby": "^0.2.10",
@@ -298,7 +298,7 @@ function getFileToRun(context, project, buildOptions, buildTargetExecutor) {
298
298
  const outputFilePath = (0, utils_1.interpolate)(outputPath, {
299
299
  projectName: project.name,
300
300
  projectRoot: project.data.root,
301
- workspaceRoot: context.root,
301
+ workspaceRoot: '',
302
302
  });
303
303
  return path.join(outputFilePath, 'main.js');
304
304
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodes = exports.createNodesV2 = exports.PLUGIN_NAME = exports.createDependencies = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
6
- const picomatch = require("picomatch");
6
+ const minimatch_1 = require("minimatch");
7
7
  const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = require("node:path");
9
9
  const posix = require("node:path/posix");
@@ -276,8 +276,8 @@ function getInputs(namedInputs, configFilePath, tsConfig, internalProjectReferen
276
276
  });
277
277
  const normalize = (p) => (p.startsWith('./') ? p.slice(2) : p);
278
278
  config.raw.exclude.forEach((excludePath) => {
279
- if (!otherFilesInclude.some((includePath) => picomatch(normalize(excludePath))(normalize(includePath)) ||
280
- picomatch(normalize(includePath))(normalize(excludePath)))) {
279
+ if (!otherFilesInclude.some((includePath) => (0, minimatch_1.minimatch)(normalize(includePath), normalize(excludePath)) ||
280
+ (0, minimatch_1.minimatch)(normalize(excludePath), normalize(includePath)))) {
281
281
  excludePaths.add(excludePath);
282
282
  }
283
283
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CopyAssetsHandler = exports.defaultFileEventHandler = void 0;
4
- const picomatch = require("picomatch");
4
+ const minimatch_1 = require("minimatch");
5
5
  const node_fs_1 = require("node:fs");
6
6
  const pathPosix = require("node:path/posix");
7
7
  const path = require("node:path");
@@ -117,8 +117,8 @@ class CopyAssetsHandler {
117
117
  for (const event of events) {
118
118
  const pathFromRoot = path.relative(this.rootDir, event.path);
119
119
  for (const ag of this.assetGlobs) {
120
- if (picomatch(ag.pattern)(pathFromRoot) &&
121
- !ag.ignore?.some((ig) => picomatch(ig)(pathFromRoot)) &&
120
+ if ((0, minimatch_1.minimatch)(pathFromRoot, ag.pattern) &&
121
+ !ag.ignore?.some((ig) => (0, minimatch_1.minimatch)(pathFromRoot, ig)) &&
122
122
  !this.ignore.ignores(pathFromRoot)) {
123
123
  const relPath = path.relative(ag.input, pathFromRoot);
124
124
  const destPath = relPath.startsWith('..') ? pathFromRoot : relPath;
@@ -137,7 +137,7 @@ class CopyAssetsHandler {
137
137
  }
138
138
  filesToEvent(files, assetGlob) {
139
139
  return files.reduce((acc, src) => {
140
- if (!assetGlob.ignore?.some((ig) => picomatch(ig)(src)) &&
140
+ if (!assetGlob.ignore?.some((ig) => (0, minimatch_1.minimatch)(src, ig)) &&
141
141
  !this.ignore.ignores(src)) {
142
142
  const relPath = path.relative(assetGlob.input, src);
143
143
  const dest = relPath.startsWith('..') ? src : relPath;
@@ -16,7 +16,6 @@ const fileutils_1 = require("nx/src/utils/fileutils");
16
16
  const output_1 = require("nx/src/utils/output");
17
17
  const path_1 = require("path");
18
18
  const ts_config_1 = require("./typescript/ts-config");
19
- const crypto_1 = require("crypto");
20
19
  function isBuildable(target, node) {
21
20
  return (node.data.targets &&
22
21
  node.data.targets[target] &&
@@ -230,7 +229,7 @@ function computeCompilerOptionsPaths(tsConfig, dependencies) {
230
229
  return paths;
231
230
  }
232
231
  function createTmpTsConfig(tsconfigPath, workspaceRoot, projectRoot, dependencies, useWorkspaceAsBaseUrl = false) {
233
- const tmpTsConfigPath = (0, path_1.join)(workspaceRoot, 'tmp', projectRoot, process.env.NX_TASK_TARGET_TARGET ?? 'build', `tsconfig.generated.${(0, crypto_1.randomUUID)()}.json`);
232
+ const tmpTsConfigPath = (0, path_1.join)(workspaceRoot, 'tmp', projectRoot, process.env.NX_TASK_TARGET_TARGET ?? 'build', 'tsconfig.generated.json');
234
233
  if (tsconfigPath === tmpTsConfigPath) {
235
234
  return tsconfigPath;
236
235
  }
@@ -5,7 +5,7 @@ exports.isUsingPackageManagerWorkspaces = isUsingPackageManagerWorkspaces;
5
5
  exports.isWorkspacesEnabled = isWorkspacesEnabled;
6
6
  exports.getProjectPackageManagerWorkspaceStateWarningTask = getProjectPackageManagerWorkspaceStateWarningTask;
7
7
  const devkit_1 = require("@nx/devkit");
8
- const picomatch = require("picomatch");
8
+ const minimatch_1 = require("minimatch");
9
9
  const posix_1 = require("node:path/posix");
10
10
  const package_json_1 = require("nx/src/plugins/package-json");
11
11
  const semver_1 = require("semver");
@@ -14,7 +14,7 @@ function getProjectPackageManagerWorkspaceState(tree, projectRoot) {
14
14
  return 'no-workspaces';
15
15
  }
16
16
  const patterns = (0, package_json_1.getGlobPatternsFromPackageManagerWorkspaces)(tree.root, (path) => (0, devkit_1.readJson)(tree, path, { expectComments: true }));
17
- const isIncluded = patterns.some((p) => picomatch(p)((0, posix_1.join)(projectRoot, 'package.json')));
17
+ const isIncluded = patterns.some((p) => (0, minimatch_1.minimatch)((0, posix_1.join)(projectRoot, 'package.json'), p));
18
18
  return isIncluded ? 'included' : 'excluded';
19
19
  }
20
20
  function isUsingPackageManagerWorkspaces(tree) {