@nx/js 22.0.0-canary.20251006-0149fac → 22.0.0-canary.20251007-01d5f3f
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.0.0-canary.
|
|
3
|
+
"version": "22.0.0-canary.20251007-01d5f3f",
|
|
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": "22.0.0-canary.
|
|
43
|
-
"@nx/workspace": "22.0.0-canary.
|
|
42
|
+
"@nx/devkit": "22.0.0-canary.20251007-01d5f3f",
|
|
43
|
+
"@nx/workspace": "22.0.0-canary.20251007-01d5f3f",
|
|
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",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"tslib": "^2.3.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"nx": "22.0.0-canary.
|
|
63
|
+
"nx": "22.0.0-canary.20251007-01d5f3f"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"verdaccio": "^6.0.5"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CreateDependencies, type
|
|
1
|
+
import { type CreateDependencies, type CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
export interface TscPluginOptions {
|
|
3
3
|
typecheck?: boolean | {
|
|
4
4
|
targetName?: string;
|
|
@@ -18,5 +18,5 @@ export interface TscPluginOptions {
|
|
|
18
18
|
export declare const createDependencies: CreateDependencies;
|
|
19
19
|
export declare const PLUGIN_NAME = "@nx/js/typescript";
|
|
20
20
|
export declare const createNodesV2: CreateNodesV2<TscPluginOptions>;
|
|
21
|
-
export declare const createNodes:
|
|
21
|
+
export declare const createNodes: CreateNodesV2<TscPluginOptions>;
|
|
22
22
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;AAiCpB,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EACN,OAAO,GACP;QACE,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;AAyFD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAI/C,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,gBAAgB,CA6DzD,CAAC;AAEF,eAAO,MAAM,WAAW,iCAAgB,CAAC"}
|
|
@@ -83,7 +83,7 @@ exports.createNodesV2 = [
|
|
|
83
83
|
const projectRoot = projectRoots[idx];
|
|
84
84
|
const hash = hashes[idx];
|
|
85
85
|
const cacheKey = `${hash}_${configFilePath}`;
|
|
86
|
-
targetsCache[cacheKey] ??= buildTscTargets((0, node_path_1.join)(context.workspaceRoot, configFilePath), projectRoot, options, context);
|
|
86
|
+
targetsCache[cacheKey] ??= buildTscTargets((0, node_path_1.join)(context.workspaceRoot, configFilePath), projectRoot, options, context, validConfigFilePaths);
|
|
87
87
|
const { targets } = targetsCache[cacheKey];
|
|
88
88
|
return {
|
|
89
89
|
projects: {
|
|
@@ -100,29 +100,7 @@ exports.createNodesV2 = [
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
];
|
|
103
|
-
exports.createNodes =
|
|
104
|
-
tsConfigGlob,
|
|
105
|
-
async (configFilePath, options, context) => {
|
|
106
|
-
devkit_1.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will change to the createNodesV2 API.');
|
|
107
|
-
const projectRoot = (0, node_path_1.dirname)(configFilePath);
|
|
108
|
-
if (!checkIfConfigFileShouldBeProject(configFilePath, projectRoot, context)) {
|
|
109
|
-
return {};
|
|
110
|
-
}
|
|
111
|
-
const normalizedOptions = normalizePluginOptions(options);
|
|
112
|
-
cache = { fileHashes: {}, rawFiles: {}, isExternalProjectReference: {} };
|
|
113
|
-
initializeTsConfigCache([configFilePath], context.workspaceRoot);
|
|
114
|
-
const { targets } = buildTscTargets((0, node_path_1.join)(context.workspaceRoot, configFilePath), projectRoot, normalizedOptions, context);
|
|
115
|
-
writeTsConfigCache(toRelativePaths(tsConfigCacheData, context.workspaceRoot));
|
|
116
|
-
return {
|
|
117
|
-
projects: {
|
|
118
|
-
[projectRoot]: {
|
|
119
|
-
projectType: 'library',
|
|
120
|
-
targets,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
];
|
|
103
|
+
exports.createNodes = exports.createNodesV2;
|
|
126
104
|
async function resolveValidConfigFilesAndHashes(configFilePaths, optionsHash, context) {
|
|
127
105
|
const lockFileHash = (0, file_hasher_1.hashFile)((0, node_path_1.join)(context.workspaceRoot, (0, lock_file_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)))) ?? '';
|
|
128
106
|
const validConfigFilePaths = [];
|
|
@@ -201,7 +179,7 @@ function checkIfConfigFileShouldBeProject(configFilePath, projectRoot, context)
|
|
|
201
179
|
}
|
|
202
180
|
return true;
|
|
203
181
|
}
|
|
204
|
-
function buildTscTargets(configFilePath, projectRoot, options, context) {
|
|
182
|
+
function buildTscTargets(configFilePath, projectRoot, options, context, configFiles) {
|
|
205
183
|
const targets = {};
|
|
206
184
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
207
185
|
const tsConfig = retrieveTsConfigFromCache(configFilePath, context.workspaceRoot);
|
|
@@ -229,7 +207,7 @@ function buildTscTargets(configFilePath, projectRoot, options, context) {
|
|
|
229
207
|
else if (options.build) {
|
|
230
208
|
// check if the project will have a build target
|
|
231
209
|
const buildConfigPath = (0, devkit_1.joinPathFragments)(projectRoot, options.build.configName);
|
|
232
|
-
if (
|
|
210
|
+
if (configFiles.some((f) => f === buildConfigPath) &&
|
|
233
211
|
(options.build.skipBuildCheck ||
|
|
234
212
|
(0, util_1.isValidPackageJsonBuildConfig)(retrieveTsConfigFromCache(buildConfigPath, context.workspaceRoot), context.workspaceRoot, projectRoot))) {
|
|
235
213
|
dependsOn.unshift(options.build.targetName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-actions.d.ts","sourceRoot":"","sources":["../../../../../packages/js/src/release/version-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,IAAI,EAGL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,C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KF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,sBAAsB,WAAoB;IAEpC,oCAAoC,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;QAC9D,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IAkBI,8BAA8B,CAClC,IAAI,EAAE,IAAI,EACV,8BAA8B,EAAE,6BAA6B,CAAC,gCAAgC,CAAC,GAC9F,OAAO,CAAC;QACT,cAAc,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAkEI,8BAA8B,CAClC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC;QACT,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;KACrC,CAAC;IA+BI,oBAAoB,CACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,EAAE,CAAC;IAcd,yBAAyB,CAC7B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,MAAM,EAAE,CAAC;IAwFpB,OAAO,CAAC,yBAAyB;CAyClC"}
|
|
@@ -136,13 +136,13 @@ class JsVersionActions extends release_1.VersionActions {
|
|
|
136
136
|
'peerDependencies',
|
|
137
137
|
'optionalDependencies',
|
|
138
138
|
];
|
|
139
|
-
// TODO(v22): Flip this to all by default
|
|
140
139
|
const preserveMatchingDependencyRanges = this.finalConfigForProject.preserveMatchingDependencyRanges === true
|
|
141
140
|
? dependencyTypes
|
|
142
141
|
: this.finalConfigForProject.preserveMatchingDependencyRanges ===
|
|
143
142
|
false
|
|
144
143
|
? []
|
|
145
|
-
: this.finalConfigForProject.preserveMatchingDependencyRanges ||
|
|
144
|
+
: this.finalConfigForProject.preserveMatchingDependencyRanges ||
|
|
145
|
+
dependencyTypes;
|
|
146
146
|
for (const depType of dependencyTypes) {
|
|
147
147
|
if (json[depType]) {
|
|
148
148
|
for (const [dep, version] of Object.entries(dependenciesToUpdate)) {
|