@nx/js 22.7.0 → 23.0.0-beta.1

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": "22.7.0",
3
+ "version": "23.0.0-beta.1",
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",
44
- "@nx/workspace": "22.7.0",
43
+ "@nx/devkit": "23.0.0-beta.1",
44
+ "@nx/workspace": "23.0.0-beta.1",
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",
@@ -61,7 +61,7 @@
61
61
  "tslib": "^2.3.0"
62
62
  },
63
63
  "devDependencies": {
64
- "nx": "22.7.0"
64
+ "nx": "23.0.0-beta.1"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "verdaccio": "^6.0.5"
@@ -626,9 +626,9 @@ function resolveShallowExternalProjectReferences(tsConfig, workspaceRoot, projec
626
626
  }
627
627
  /**
628
628
  * Collects unique tsconfig paths (relative to their project root) from the
629
- * project reference chain and returns them as `^{projectRoot}/...` input
630
- * patterns. We only need to discover the full set of distinct relative paths
631
- * from the reference chain.
629
+ * project reference chain including any `extends` chains within those refs —
630
+ * and returns them as `^{projectRoot}/...` input patterns. We only need to
631
+ * discover the full set of distinct relative paths.
632
632
  */
633
633
  function getExternalProjectReferenceTsconfigPatterns(tsConfig, internalProjectReferences, workspaceRoot, project, cache) {
634
634
  const externalRefs = {};
@@ -659,7 +659,34 @@ function getExternalProjectReferenceTsconfigPatterns(tsConfig, internalProjectRe
659
659
  visited.add(configPath);
660
660
  const wsRelPath = posixRelative(workspaceRoot, configPath);
661
661
  const tsConfigData = tsConfigCacheData[wsRelPath]?.data;
662
- if (!tsConfigData?.projectReferences?.length) {
662
+ if (!tsConfigData) {
663
+ continue;
664
+ }
665
+ // Walk `extends` chains for the visited tsconfig. tsc reads extended
666
+ // configs while resolving project references, so the rel paths must be
667
+ // emitted as inputs. Workspace-root files (no owning project) are skipped
668
+ // — those are covered by the local project's own extends walk.
669
+ if (tsConfigData.extendedConfigFiles?.length) {
670
+ for (const extended of tsConfigData.extendedConfigFiles) {
671
+ if (!extended.filePath || visited.has(extended.filePath)) {
672
+ continue;
673
+ }
674
+ const extendedWsRelPath = posixRelative(workspaceRoot, extended.filePath);
675
+ if (!tsConfigCacheData[extendedWsRelPath]) {
676
+ continue;
677
+ }
678
+ const extendedContext = getConfigContext(extended.filePath, workspaceRoot, cache);
679
+ if (extendedContext.project.root &&
680
+ extendedContext.project.root !== '.') {
681
+ uniqueRelPaths.add(posixRelative(extendedContext.project.absolute, extended.filePath));
682
+ worklist.push({
683
+ configPath: extended.filePath,
684
+ ownerProject: extendedContext.project,
685
+ });
686
+ }
687
+ }
688
+ }
689
+ if (!tsConfigData.projectReferences?.length) {
663
690
  continue;
664
691
  }
665
692
  for (const ref of tsConfigData.projectReferences) {