@nx/js 23.0.0-beta.21 → 23.0.0-beta.22
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.
|
@@ -21,6 +21,23 @@ function processEnv(color) {
|
|
|
21
21
|
}
|
|
22
22
|
return env;
|
|
23
23
|
}
|
|
24
|
+
function isAlreadyPublishedPublishError(stdoutData, stderr = '', stdout = '') {
|
|
25
|
+
const error = stdoutData?.error;
|
|
26
|
+
const errorMessage = [
|
|
27
|
+
error?.summary,
|
|
28
|
+
error?.detail,
|
|
29
|
+
error?.message,
|
|
30
|
+
error?.body?.error,
|
|
31
|
+
stderr,
|
|
32
|
+
stdout,
|
|
33
|
+
]
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.join('\n');
|
|
36
|
+
return (error?.code === 'EPUBLISHCONFLICT' ||
|
|
37
|
+
errorMessage.includes('You cannot publish over the previously published versions') ||
|
|
38
|
+
(error?.code === 'E409' &&
|
|
39
|
+
errorMessage.includes('this package is already present')));
|
|
40
|
+
}
|
|
24
41
|
async function runExecutor(options, context) {
|
|
25
42
|
const pm = (0, devkit_1.detectPackageManager)();
|
|
26
43
|
// Check if npm is installed (needed for dist-tag management and as fallback for view command)
|
|
@@ -278,10 +295,11 @@ Please update the local dependency on "${depName}" to be a valid semantic versio
|
|
|
278
295
|
tag,
|
|
279
296
|
isDryRun,
|
|
280
297
|
isNpmInstalled,
|
|
298
|
+
packageTxt,
|
|
281
299
|
});
|
|
282
300
|
}
|
|
283
301
|
function runPublish(ctx) {
|
|
284
|
-
const { pm, options, context, packageRoot, packageJson, registry, registryConfigKey, tag, isDryRun, isNpmInstalled, } = ctx;
|
|
302
|
+
const { pm, options, context, packageRoot, packageJson, registry, registryConfigKey, tag, isDryRun, isNpmInstalled, packageTxt, } = ctx;
|
|
285
303
|
const pmCommand = (0, devkit_1.getPackageManagerCommand)(pm);
|
|
286
304
|
const publishCommandSegments = [
|
|
287
305
|
pmCommand.publish(packageRoot, registry, registryConfigKey, tag),
|
|
@@ -382,12 +400,26 @@ function runPublish(ctx) {
|
|
|
382
400
|
stdoutData = JSON.parse(err.stdout?.toString() || '{}');
|
|
383
401
|
}
|
|
384
402
|
catch {
|
|
403
|
+
const stderr = err.stderr?.toString() || '';
|
|
404
|
+
const stdout = err.stdout?.toString() || '';
|
|
405
|
+
if (isAlreadyPublishedPublishError(undefined, stderr, stdout)) {
|
|
406
|
+
console.warn(`Skipped ${packageTxt}, as v${packageJson.version} has already been published to ${registry} with tag "${tag}"`);
|
|
407
|
+
return {
|
|
408
|
+
success: true,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
385
411
|
console.error(err.stderr?.toString() || '');
|
|
386
412
|
console.error(err.stdout?.toString() || '');
|
|
387
413
|
return {
|
|
388
414
|
success: false,
|
|
389
415
|
};
|
|
390
416
|
}
|
|
417
|
+
if (isAlreadyPublishedPublishError(stdoutData, err.stderr?.toString() || '', err.stdout?.toString() || '')) {
|
|
418
|
+
console.warn(`Skipped ${packageTxt}, as v${packageJson.version} has already been published to ${registry} with tag "${tag}"`);
|
|
419
|
+
return {
|
|
420
|
+
success: true,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
391
423
|
console.error(`${pm} publish error:`);
|
|
392
424
|
// npm returns error.summary and error.detail
|
|
393
425
|
if (stdoutData.error?.summary) {
|
package/migrations.json
CHANGED
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
"migrate-development-custom-condition": {
|
|
4
4
|
"version": "21.5.0-beta.2",
|
|
5
5
|
"description": "Migrate the legacy 'development' custom condition to a workspace-unique custom condition name.",
|
|
6
|
-
"factory": "./dist/src/migrations/update-21-5-0/migrate-development-custom-condition"
|
|
6
|
+
"factory": "./dist/src/migrations/update-21-5-0/migrate-development-custom-condition",
|
|
7
|
+
"documentation": "./dist/src/migrations/update-21-5-0/migrate-development-custom-condition.md"
|
|
7
8
|
},
|
|
8
9
|
"remove-external-options-from-js-executors": {
|
|
9
10
|
"version": "22.0.0-beta.0",
|
|
10
11
|
"description": "Remove the deprecated `external` and `externalBuildTargets` options from the `@nx/js:swc` and `@nx/js:tsc` executors.",
|
|
11
|
-
"factory": "./dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors"
|
|
12
|
+
"factory": "./dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors",
|
|
13
|
+
"documentation": "./dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors.md"
|
|
12
14
|
},
|
|
13
15
|
"remove-redundant-ts-project-references": {
|
|
14
16
|
"version": "22.1.0-rc.1",
|
|
15
17
|
"description": "Removes redundant TypeScript project references from project's tsconfig.json files when runtime tsconfig files (e.g., tsconfig.lib.json, tsconfig.app.json) exist.",
|
|
16
|
-
"factory": "./dist/src/migrations/update-22-1-0/remove-redundant-ts-project-references"
|
|
18
|
+
"factory": "./dist/src/migrations/update-22-1-0/remove-redundant-ts-project-references",
|
|
19
|
+
"documentation": "./dist/src/migrations/update-22-1-0/remove-redundant-ts-project-references.md"
|
|
17
20
|
},
|
|
18
21
|
"23-0-0-rewrite-internal-subpath-imports": {
|
|
19
22
|
"version": "23.0.0-beta.14",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.22",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -144,11 +144,11 @@
|
|
|
144
144
|
"source-map-support": "0.5.19",
|
|
145
145
|
"tinyglobby": "^0.2.12",
|
|
146
146
|
"tslib": "^2.3.0",
|
|
147
|
-
"@nx/
|
|
148
|
-
"@nx/
|
|
147
|
+
"@nx/devkit": "23.0.0-beta.22",
|
|
148
|
+
"@nx/workspace": "23.0.0-beta.22"
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
|
-
"nx": "23.0.0-beta.
|
|
151
|
+
"nx": "23.0.0-beta.22"
|
|
152
152
|
},
|
|
153
153
|
"peerDependencies": {
|
|
154
154
|
"@swc/cli": ">=0.6.0 <0.9.0",
|