@nx/js 19.3.0-beta.0 → 19.3.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 +4 -4
- package/src/executors/release-publish/release-publish.impl.js +5 -1
- package/src/executors/verdaccio/schema.d.ts +1 -1
- package/src/executors/verdaccio/schema.json +1 -2
- package/src/executors/verdaccio/verdaccio.impl.js +6 -3
- package/src/generators/release-version/release-version.js +6 -1
- package/src/generators/release-version/utils/sort-projects-topologically.js +3 -1
- package/src/utils/typescript/create-ts-config.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "19.3.0-beta.
|
|
3
|
+
"version": "19.3.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": {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"semver": "^7.5.3",
|
|
59
59
|
"source-map-support": "0.5.19",
|
|
60
60
|
"tslib": "^2.3.0",
|
|
61
|
-
"@nx/devkit": "19.3.0-beta.
|
|
62
|
-
"@nx/workspace": "19.3.0-beta.
|
|
63
|
-
"@nrwl/js": "19.3.0-beta.
|
|
61
|
+
"@nx/devkit": "19.3.0-beta.1",
|
|
62
|
+
"@nx/workspace": "19.3.0-beta.1",
|
|
63
|
+
"@nrwl/js": "19.3.0-beta.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"verdaccio": "^5.0.4"
|
|
@@ -80,7 +80,11 @@ async function runExecutor(options, context) {
|
|
|
80
80
|
success: true,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
// If only one version of a package exists in the registry, versions will be a string instead of an array.
|
|
84
|
+
const versions = Array.isArray(resultJson.versions)
|
|
85
|
+
? resultJson.versions
|
|
86
|
+
: [resultJson.versions];
|
|
87
|
+
if (versions.includes(currentVersion)) {
|
|
84
88
|
try {
|
|
85
89
|
if (!isDryRun) {
|
|
86
90
|
(0, child_process_1.execSync)(npmDistTagAddCommandSegments.join(' '), {
|
|
@@ -98,12 +98,15 @@ function startVerdaccio(options, workspaceRoot) {
|
|
|
98
98
|
}
|
|
99
99
|
function createVerdaccioOptions(options, workspaceRoot) {
|
|
100
100
|
const verdaccioArgs = [];
|
|
101
|
-
if (options.port) {
|
|
102
|
-
verdaccioArgs.push('--listen', options.port.toString());
|
|
103
|
-
}
|
|
104
101
|
if (options.config) {
|
|
105
102
|
verdaccioArgs.push('--config', (0, path_1.join)(workspaceRoot, options.config));
|
|
106
103
|
}
|
|
104
|
+
else {
|
|
105
|
+
options.port ??= 4873; // set default port if config is not provided
|
|
106
|
+
}
|
|
107
|
+
if (options.port) {
|
|
108
|
+
verdaccioArgs.push('--listen', options.port.toString());
|
|
109
|
+
}
|
|
107
110
|
return verdaccioArgs;
|
|
108
111
|
}
|
|
109
112
|
function setupNpm(options) {
|
|
@@ -255,7 +255,12 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
255
255
|
log(`📄 Resolved the specifier as "${specifier}" since the current version is a prerelease.`);
|
|
256
256
|
}
|
|
257
257
|
else {
|
|
258
|
-
|
|
258
|
+
let extraText = '';
|
|
259
|
+
if (options.preid && !specifier.startsWith('pre')) {
|
|
260
|
+
specifier = `pre${specifier}`;
|
|
261
|
+
extraText = `, combined with your given preid "${options.preid}"`;
|
|
262
|
+
}
|
|
263
|
+
log(`📄 Resolved the specifier as "${specifier}" using git history and the conventional commits standard${extraText}.`);
|
|
259
264
|
}
|
|
260
265
|
break;
|
|
261
266
|
}
|
|
@@ -24,7 +24,9 @@ function sortProjectsTopologically(projectGraph, projectNodes) {
|
|
|
24
24
|
const node = processQueue.shift();
|
|
25
25
|
sortedProjects.push(node);
|
|
26
26
|
// Process each project that depends on the current node
|
|
27
|
-
filteredDependencies
|
|
27
|
+
filteredDependencies
|
|
28
|
+
.filter((dep) => dep.target === node.name)
|
|
29
|
+
.forEach((dep) => {
|
|
28
30
|
const dependentNode = projectGraph.nodes[dep.source];
|
|
29
31
|
const count = edges.get(dependentNode) - 1;
|
|
30
32
|
edges.set(dependentNode, count);
|
|
@@ -30,6 +30,10 @@ function extractTsConfigBase(host) {
|
|
|
30
30
|
delete tsconfig.compilerOptions[compilerOption];
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
// If we don't set baseDir then builds will fail when more than one projects exist.
|
|
34
|
+
if (typeof baseCompilerOptions.baseUrl === 'undefined') {
|
|
35
|
+
baseCompilerOptions.baseUrl = '.';
|
|
36
|
+
}
|
|
33
37
|
(0, json_1.writeJson)(host, 'tsconfig.base.json', {
|
|
34
38
|
compileOnSave: false,
|
|
35
39
|
compilerOptions: baseCompilerOptions,
|