@nx/js 20.1.0 → 20.1.2

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": "20.1.0",
3
+ "version": "20.1.2",
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": "20.1.0",
43
- "@nx/workspace": "20.1.0",
42
+ "@nx/devkit": "20.1.2",
43
+ "@nx/workspace": "20.1.2",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^2.8.0",
@@ -47,7 +47,14 @@ function generateTaskProjectTsConfig(task, tasksOptions, context, taskInMemoryTs
47
47
  return tsConfigPath;
48
48
  }
49
49
  function getDependencyTasksInOtherProjects(task, project, context) {
50
- return context.taskGraph.dependencies[task].filter((t) => t !== task && (0, devkit_1.parseTargetString)(t, context).project !== project);
50
+ const implicitDependencies = new Set(context.projectGraph.nodes[project].data.implicitDependencies ?? []);
51
+ return context.taskGraph.dependencies[task].filter((t) => {
52
+ const { project: dependencyProject } = (0, devkit_1.parseTargetString)(t, context);
53
+ // Tasks for implicit dependencies are skipped since incremental builds only apply to explicit dependencies
54
+ return (t !== task &&
55
+ dependencyProject !== project &&
56
+ !implicitDependencies.has(dependencyProject));
57
+ });
51
58
  }
52
59
  function getDependencyTasksInSameProject(task, context) {
53
60
  const { project: taskProject } = (0, devkit_1.parseTargetString)(task, context);
@@ -114,7 +114,7 @@ function addMissingDependencies(packageJson, { projectName, targetName, configur
114
114
  function getExports(options) {
115
115
  const outputDir = getOutputDir(options);
116
116
  const mainFile = options.outputFileName
117
- ? options.outputFileName.replace(/\.[tj]s$/, '')
117
+ ? (0, path_1.basename)(options.outputFileName).replace(/\.[tj]s$/, '')
118
118
  : (0, path_1.basename)(options.main).replace(/\.[tj]s$/, '');
119
119
  const exports = {
120
120
  '.': outputDir + mainFile + options.fileExt,
@@ -218,8 +218,8 @@ function getOutputDir(options) {
218
218
  : options.outputPath;
219
219
  const relativeOutputPath = (0, path_1.relative)(packageJsonDir, options.outputPath);
220
220
  const relativeMainDir = options.outputFileName
221
- ? ''
221
+ ? (0, path_1.dirname)(options.outputFileName)
222
222
  : (0, path_1.relative)(options.rootDir ?? options.projectRoot, (0, path_1.dirname)(options.main));
223
- const outputDir = (0, path_1.join)(relativeOutputPath, relativeMainDir);
223
+ const outputDir = (0, devkit_1.joinPathFragments)(relativeOutputPath, relativeMainDir);
224
224
  return outputDir === '.' ? `./` : `./${outputDir}/`;
225
225
  }