@nx/js 20.3.0 → 20.3.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 +3 -3
- package/src/generators/release-version/utils/update-lock-file.js +1 -1
- package/src/generators/typescript-sync/typescript-sync.js +2 -2
- package/src/plugins/typescript/plugin.js +10 -4
- package/src/utils/buildable-libs-utils.js +3 -0
- package/src/utils/typescript/ts-solution-setup.js +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.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": {
|
|
@@ -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.3.
|
|
43
|
-
"@nx/workspace": "20.3.
|
|
42
|
+
"@nx/devkit": "20.3.1",
|
|
43
|
+
"@nx/workspace": "20.3.1",
|
|
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",
|
|
@@ -99,7 +99,7 @@ function execLockFileUpdate(command, cwd, env = {}) {
|
|
|
99
99
|
`Verify that '${command}' succeeds when run from the workspace root.`,
|
|
100
100
|
`To configure a string of arguments to be passed to this command, set the 'release.version.generatorOptions.installArgs' property in nx.json.`,
|
|
101
101
|
`To ignore install lifecycle scripts, set 'release.version.generatorOptions.installIgnoreScripts' to true in nx.json.`,
|
|
102
|
-
`To disable this step entirely, set 'release.version.skipLockFileUpdate' to true in nx.json.`,
|
|
102
|
+
`To disable this step entirely, set 'release.version.generatorOptions.skipLockFileUpdate' to true in nx.json.`,
|
|
103
103
|
],
|
|
104
104
|
});
|
|
105
105
|
throw e;
|
|
@@ -260,8 +260,8 @@ function collectProjectDependencies(tree, projectName, projectGraph, collectedDe
|
|
|
260
260
|
collectedDependencies.set(projectName, []);
|
|
261
261
|
for (const dep of projectGraph.dependencies[projectName]) {
|
|
262
262
|
const targetProjectNode = projectGraph.nodes[dep.target];
|
|
263
|
-
if (!targetProjectNode) {
|
|
264
|
-
// It's an npm dependency
|
|
263
|
+
if (!targetProjectNode || dep.type === 'implicit') {
|
|
264
|
+
// It's an npm or an implicit dependency
|
|
265
265
|
continue;
|
|
266
266
|
}
|
|
267
267
|
// Add the target project node to the list of dependencies for the current project
|
|
@@ -274,10 +274,16 @@ function getOutputs(configFilePath, tsConfig, internalProjectReferences, workspa
|
|
|
274
274
|
}
|
|
275
275
|
else if (config.options.outDir) {
|
|
276
276
|
outputs.add(pathToInputOrOutput(config.options.outDir, workspaceRoot, projectRoot));
|
|
277
|
-
if (config.options.tsBuildInfoFile
|
|
278
|
-
!(0, node_path_1.normalize)(config.options.tsBuildInfoFile).startsWith(`${(0, node_path_1.normalize)(config.options.outDir)}${node_path_1.sep}`)) {
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
if (config.options.tsBuildInfoFile) {
|
|
278
|
+
if (!(0, node_path_1.normalize)(config.options.tsBuildInfoFile).startsWith(`${(0, node_path_1.normalize)(config.options.outDir)}${node_path_1.sep}`)) {
|
|
279
|
+
// https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
|
|
280
|
+
outputs.add(pathToInputOrOutput(config.options.tsBuildInfoFile, workspaceRoot, projectRoot));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else if (config.options.rootDir && config.options.rootDir !== '.') {
|
|
284
|
+
// If rootDir is set, then the tsbuildinfo file will be outside the outDir so we need to add it.
|
|
285
|
+
const relativeRootDir = (0, node_path_1.relative)(config.options.rootDir, (0, node_path_1.join)(workspaceRoot, projectRoot));
|
|
286
|
+
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(config.options.outDir, relativeRootDir, `*.tsbuildinfo`), workspaceRoot, projectRoot));
|
|
281
287
|
}
|
|
282
288
|
}
|
|
283
289
|
else if (config.fileNames.length) {
|
|
@@ -230,6 +230,9 @@ function computeCompilerOptionsPaths(tsConfig, dependencies) {
|
|
|
230
230
|
}
|
|
231
231
|
function createTmpTsConfig(tsconfigPath, workspaceRoot, projectRoot, dependencies, useWorkspaceAsBaseUrl = false) {
|
|
232
232
|
const tmpTsConfigPath = (0, path_1.join)(workspaceRoot, 'tmp', projectRoot, process.env.NX_TASK_TARGET_TARGET ?? 'build', 'tsconfig.generated.json');
|
|
233
|
+
if (tsconfigPath === tmpTsConfigPath) {
|
|
234
|
+
return tsconfigPath;
|
|
235
|
+
}
|
|
233
236
|
const parsedTSConfig = readTsConfigWithRemappedPaths(tsconfigPath, tmpTsConfigPath, dependencies, workspaceRoot);
|
|
234
237
|
process.on('exit', () => cleanupTmpTsConfigFile(tmpTsConfigPath));
|
|
235
238
|
if (useWorkspaceAsBaseUrl) {
|
|
@@ -128,16 +128,6 @@ function updateTsconfigFiles(tree, projectRoot, runtimeTsconfigFileName, compile
|
|
|
128
128
|
return json;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
if (tree.exists(tsconfigE2E)) {
|
|
132
|
-
// tsconfig.json for e2e projects need to have references array
|
|
133
|
-
(0, devkit_1.updateJson)(tree, tsconfigE2E, (json) => {
|
|
134
|
-
json.references ??= [];
|
|
135
|
-
const projectPath = (0, posix_1.relative)(e2eRoot, projectRoot);
|
|
136
|
-
if (!json.references.some((x) => x.path === projectPath))
|
|
137
|
-
json.references.push({ path: projectPath });
|
|
138
|
-
return json;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
131
|
if (tree.exists('tsconfig.json')) {
|
|
142
132
|
(0, devkit_1.updateJson)(tree, 'tsconfig.json', (json) => {
|
|
143
133
|
const projectPath = './' + projectRoot;
|