@nx/js 22.7.0 → 22.7.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.
|
|
3
|
+
"version": "22.7.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.
|
|
44
|
-
"@nx/workspace": "22.7.
|
|
43
|
+
"@nx/devkit": "22.7.1",
|
|
44
|
+
"@nx/workspace": "22.7.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.
|
|
64
|
+
"nx": "22.7.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
|
|
630
|
-
* patterns. We only need to
|
|
631
|
-
*
|
|
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
|
|
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) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ProjectConfiguration, type Tree } from '@nx/devkit';
|
|
2
|
+
import type { JsonInput } from 'nx/src/native';
|
|
3
|
+
export declare const TS_SOLUTION_SETUP_TSCONFIG_INPUT: JsonInput;
|
|
2
4
|
export declare function isUsingTypeScriptPlugin(tree: Tree): boolean;
|
|
3
5
|
export declare function shouldConfigureTsSolutionSetup(tree: Tree, addPlugins: boolean, addTsPlugin?: boolean): boolean;
|
|
4
6
|
export declare function isUsingTsSolutionSetup(tree?: Tree): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-solution-setup.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/typescript/ts-solution-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EAGzB,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ts-solution-setup.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/typescript/ts-solution-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EAGzB,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAUpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,gCAAgC,EAAE,SAG9C,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAU3D;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,OAAO,EACnB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAsBT;AAED,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAO3D;AAuDD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,IAAI,CAsBN;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,IAAI,GACV,MAAM,GAAG,IAAI,CAOf;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,uBAAuB,EAAE,MAAM,EAC/B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,EAC5D,OAAO,GAAE,MAAM,EAAO,EACtB,OAAO,SAAQ,QAoFhB;AAED,wBAAsB,+BAA+B,CACnD,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,iBAqDnB;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,SAAS,GAAG,aAAa,GACtC,SAAS,GAAG,aAAa,CAoB3B;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,oBAAoB,EAC7B,IAAI,CAAC,EAAE,IAAI,GACV,MAAM,CAgBR;AAKD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,GAAE;IAAE,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAAO,GAClD,MAAM,CAqCR;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAqCvE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TS_SOLUTION_SETUP_TSCONFIG_INPUT = void 0;
|
|
3
4
|
exports.isUsingTypeScriptPlugin = isUsingTypeScriptPlugin;
|
|
4
5
|
exports.shouldConfigureTsSolutionSetup = shouldConfigureTsSolutionSetup;
|
|
5
6
|
exports.isUsingTsSolutionSetup = isUsingTsSolutionSetup;
|
|
@@ -17,6 +18,10 @@ const posix_1 = require("node:path/posix");
|
|
|
17
18
|
const tree_1 = require("nx/src/generators/tree");
|
|
18
19
|
const package_manager_workspaces_1 = require("../package-manager-workspaces");
|
|
19
20
|
const configuration_1 = require("./configuration");
|
|
21
|
+
exports.TS_SOLUTION_SETUP_TSCONFIG_INPUT = {
|
|
22
|
+
json: '{workspaceRoot}/tsconfig.json',
|
|
23
|
+
fields: ['extends', 'files', 'include'],
|
|
24
|
+
};
|
|
20
25
|
function isUsingTypeScriptPlugin(tree) {
|
|
21
26
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
22
27
|
return (nxJson?.plugins?.some((p) => typeof p === 'string'
|