@nx/js 22.7.0-beta.6 → 22.7.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/migrations.json CHANGED
@@ -107,6 +107,15 @@
107
107
  "alwaysAddToPackageJson": false
108
108
  }
109
109
  }
110
+ },
111
+ "22.6.4": {
112
+ "version": "22.6.4",
113
+ "packages": {
114
+ "verdaccio": {
115
+ "version": "^6.3.2",
116
+ "alwaysAddToPackageJson": false
117
+ }
118
+ }
110
119
  }
111
120
  }
112
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "22.7.0-beta.6",
3
+ "version": "22.7.0-beta.8",
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": {
@@ -40,8 +40,8 @@
40
40
  "@babel/preset-env": "^7.23.2",
41
41
  "@babel/preset-typescript": "^7.22.5",
42
42
  "@babel/runtime": "^7.22.6",
43
- "@nx/devkit": "22.7.0-beta.6",
44
- "@nx/workspace": "22.7.0-beta.6",
43
+ "@nx/devkit": "22.7.0-beta.8",
44
+ "@nx/workspace": "22.7.0-beta.8",
45
45
  "@zkochan/js-yaml": "0.0.7",
46
46
  "babel-plugin-const-enum": "^1.0.1",
47
47
  "babel-plugin-macros": "^3.1.0",
@@ -54,14 +54,14 @@
54
54
  "jsonc-parser": "3.2.0",
55
55
  "npm-run-path": "^4.0.1",
56
56
  "picocolors": "^1.1.0",
57
- "picomatch": "4.0.2",
57
+ "picomatch": "4.0.4",
58
58
  "semver": "^7.6.3",
59
59
  "source-map-support": "0.5.19",
60
60
  "tinyglobby": "^0.2.12",
61
61
  "tslib": "^2.3.0"
62
62
  },
63
63
  "devDependencies": {
64
- "nx": "22.7.0-beta.6"
64
+ "nx": "22.7.0-beta.8"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "verdaccio": "^6.0.5"
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;AA+BpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACN,KAAK,CAAC,EACF,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACN,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2KD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAI/C,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,gBAAgB,CA0FzD,CAAC;AAEF,eAAO,MAAM,WAAW,iCAAgB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;AA8BpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACN,KAAK,CAAC,EACF,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACN,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2KD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAI/C,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,gBAAgB,CA0FzD,CAAC;AAEF,eAAO,MAAM,WAAW,iCAAgB,CAAC"}
@@ -466,7 +466,7 @@ function getInputs(namedInputs, config, tsConfig, internalProjectReferences, wor
466
466
  transitive: true,
467
467
  });
468
468
  inputs.push({
469
- fileset: '**/*.d.ts',
469
+ fileset: '{projectRoot}/**/*.d.ts',
470
470
  dependencies: true,
471
471
  });
472
472
  const externalRefPatterns = getExternalProjectReferenceTsconfigPatterns(tsConfig, internalProjectReferences, workspaceRoot, config.project, cache);
@@ -496,10 +496,6 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
496
496
  outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.js.map`), workspaceRoot, config.project));
497
497
  outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.d.ts`), workspaceRoot, config.project));
498
498
  outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.d.ts.map`), workspaceRoot, config.project));
499
- // https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
500
- outputs.add(tsConfig.options.tsBuildInfoFile
501
- ? pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project)
502
- : pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.tsbuildinfo`), workspaceRoot, config.project));
503
499
  }
504
500
  else if (tsConfig.options.outDir) {
505
501
  if (emitDeclarationOnly) {
@@ -509,23 +505,12 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
509
505
  }
510
506
  }
511
507
  else {
512
- outputs.add(pathToInputOrOutput(tsConfig.options.outDir, workspaceRoot, config.project));
513
- }
514
- if (tsConfig.options.tsBuildInfoFile) {
515
- if (emitDeclarationOnly ||
516
- !(0, node_path_1.normalize)(tsConfig.options.tsBuildInfoFile).startsWith(`${(0, node_path_1.normalize)(tsConfig.options.outDir)}${node_path_1.sep}`)) {
517
- // https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
518
- outputs.add(pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project));
519
- }
520
- }
521
- else if (tsConfig.options.rootDir && tsConfig.options.rootDir !== '.') {
522
- // If rootDir is set, then the tsbuildinfo file will be outside the outDir so we need to add it.
523
- const relativeRootDir = (0, node_path_1.relative)(tsConfig.options.rootDir, (0, node_path_1.join)(workspaceRoot, config.project.root));
524
- outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, relativeRootDir, `*.tsbuildinfo`), workspaceRoot, config.project));
525
- }
526
- else if (emitDeclarationOnly) {
527
- // https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
528
- outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `${configBaseNameNoExt}.tsbuildinfo`), workspaceRoot, config.project));
508
+ // List specific tsc output extensions instead of claiming the
509
+ // entire outDir, so other tasks that write into the same
510
+ // directory (e.g. copy-assets for .node/.wasm files) don't
511
+ // have their outputs captured by the tsc build cache.
512
+ const jsonExt = tsConfig.options.resolveJsonModule ? ',json' : '';
513
+ outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `**/*.{js,cjs,mjs,jsx${jsonExt},d.ts,d.cts,d.mts}{,.map}`), workspaceRoot, config.project));
529
514
  }
530
515
  }
531
516
  else if (tsConfig.raw?.include?.length ||
@@ -544,14 +529,30 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
544
529
  outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.ts.map'));
545
530
  outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.cts.map'));
546
531
  outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.mts.map'));
547
- // https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
548
- outputs.add(tsConfig.options.tsBuildInfoFile
549
- ? pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project)
550
- : (0, devkit_1.joinPathFragments)('{projectRoot}', `${configBaseNameNoExt}.tsbuildinfo`));
551
532
  }
533
+ // tsc --build always produces a tsbuildinfo file.
534
+ outputs.add(getTsBuildInfoOutputPath(tsConfig, configBaseNameNoExt, workspaceRoot, config.project));
552
535
  });
553
536
  return Array.from(outputs);
554
537
  }
538
+ /**
539
+ * Returns the path to the tsbuildinfo file that tsc --build will produce.
540
+ * tsc always emits this file in build mode (incremental is implicit).
541
+ */
542
+ function getTsBuildInfoOutputPath(tsConfig, configBaseNameNoExt, workspaceRoot, project) {
543
+ if (tsConfig.options.tsBuildInfoFile) {
544
+ return pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, project);
545
+ }
546
+ if (tsConfig.options.outFile) {
547
+ const outFileName = (0, node_path_1.basename)(tsConfig.options.outFile, '.js');
548
+ const outDir = (0, node_path_1.relative)(workspaceRoot, (0, node_path_1.dirname)(tsConfig.options.outFile));
549
+ return pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.tsbuildinfo`), workspaceRoot, project);
550
+ }
551
+ if (tsConfig.options.outDir) {
552
+ return pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `${configBaseNameNoExt}.tsbuildinfo`), workspaceRoot, project);
553
+ }
554
+ return (0, devkit_1.joinPathFragments)('{projectRoot}', `${configBaseNameNoExt}.tsbuildinfo`);
555
+ }
555
556
  function pathToInputOrOutput(path, workspaceRoot, project) {
556
557
  const fullProjectRoot = project.absolute;
557
558
  const fullPath = (0, node_path_1.resolve)(workspaceRoot, path);
@@ -150,7 +150,7 @@ function collectHelperDependencies(workspaceRoot, sourceProject, projectGraph, b
150
150
  }
151
151
  // For inferred targets or manually added run-commands, check if user is using `tsc` in build target.
152
152
  if (target.executor === 'nx:run-commands' &&
153
- /\btsc\b/.test(target.options.command)) {
153
+ /\b(tsc|tsgo)\b/.test(target.options.command)) {
154
154
  const tsConfigFileName = (0, ts_config_1.getRootTsConfigFileName)();
155
155
  if (tsConfigFileName) {
156
156
  const tsConfig = (0, ts_config_1.readTsConfig)((0, path_1.join)(workspaceRoot, tsConfigFileName));
@@ -7,7 +7,7 @@ export declare const swcHelpersVersion = "~0.5.18";
7
7
  export declare const swcNodeVersion = "~1.11.1";
8
8
  export declare const tsLibVersion = "^2.3.0";
9
9
  export declare const typesNodeVersion = "20.19.9";
10
- export declare const verdaccioVersion = "^6.0.5";
10
+ export declare const verdaccioVersion = "^6.3.2";
11
11
  export declare const typescriptVersion = "~5.9.2";
12
12
  /**
13
13
  * The minimum version is currently determined from the lowest version
@@ -10,7 +10,7 @@ exports.swcHelpersVersion = '~0.5.18';
10
10
  exports.swcNodeVersion = '~1.11.1';
11
11
  exports.tsLibVersion = '^2.3.0';
12
12
  exports.typesNodeVersion = '20.19.9';
13
- exports.verdaccioVersion = '^6.0.5';
13
+ exports.verdaccioVersion = '^6.3.2';
14
14
  // Typescript
15
15
  exports.typescriptVersion = '~5.9.2';
16
16
  /**
package/assets.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "outDir": "dist/packages/js",
3
- "assets": [
4
- {
5
- "glob": "**/files/**"
6
- },
7
- {
8
- "glob": "**/files/**/.gitkeep"
9
- },
10
- {
11
- "glob": "**/*.json",
12
- "ignore": ["tsconfig*.json", "project.json", ".eslintrc.json"]
13
- },
14
- {
15
- "glob": "**/*.js",
16
- "ignore": ["**/jest.config.js", "src/index.js"]
17
- },
18
- {
19
- "glob": "**/*.d.ts"
20
- },
21
- "LICENSE"
22
- ]
23
- }