@nx/js 17.2.4 → 17.2.6
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": "17.2.
|
|
3
|
+
"version": "17.2.6",
|
|
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": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"semver": "7.5.3",
|
|
58
58
|
"source-map-support": "0.5.19",
|
|
59
59
|
"tslib": "^2.3.0",
|
|
60
|
-
"@nx/devkit": "17.2.
|
|
61
|
-
"@nx/workspace": "17.2.
|
|
62
|
-
"@nrwl/js": "17.2.
|
|
60
|
+
"@nx/devkit": "17.2.6",
|
|
61
|
+
"@nx/workspace": "17.2.6",
|
|
62
|
+
"@nrwl/js": "17.2.6"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"verdaccio": "^5.0.4"
|
|
@@ -124,7 +124,9 @@ async function runExecutor(options, context) {
|
|
|
124
124
|
const stdoutData = JSON.parse(err.stdout?.toString() || '{}');
|
|
125
125
|
// If the error is that the package doesn't exist, then we can ignore it because we will be publishing it for the first time in the next step
|
|
126
126
|
if (!(stdoutData.error?.code?.includes('E404') &&
|
|
127
|
-
stdoutData.error?.summary?.includes('no such package available'))
|
|
127
|
+
stdoutData.error?.summary?.includes('no such package available')) &&
|
|
128
|
+
!(err.stderr?.toString().includes('E404') &&
|
|
129
|
+
err.stderr?.toString().includes('no such package available'))) {
|
|
128
130
|
console.error(`Something unexpected went wrong when checking for existing dist-tags.\n`, err);
|
|
129
131
|
return {
|
|
130
132
|
success: false,
|
|
@@ -14,6 +14,6 @@ Run `<%= cliCommand %> build <%= name %>` to build the library.
|
|
|
14
14
|
|
|
15
15
|
## Running unit tests
|
|
16
16
|
|
|
17
|
-
Run `<%= cliCommand %> test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
|
|
17
|
+
Run `<%= cliCommand %> test <%= name %>` to execute the unit tests via <% if(unitTestRunner === 'jest') { %>[Jest](https://jestjs.io)<% } else { %>[Vitest](https://vitest.dev/)<% } %>.
|
|
18
18
|
|
|
19
19
|
<% } %>
|
|
@@ -6,5 +6,9 @@
|
|
|
6
6
|
"types": ["node"]
|
|
7
7
|
},
|
|
8
8
|
"include": ["src/**/*.ts"<% if (js) { %>, "src/**/*.js"<% } %>],
|
|
9
|
-
"exclude": [
|
|
9
|
+
"exclude": [
|
|
10
|
+
<% if (hasUnitTestRunner && unitTestRunner === 'jest') { %>"jest.config.ts",
|
|
11
|
+
<% } else if (hasUnitTestRunner) { %>"vite.config.ts",
|
|
12
|
+
<% } %>"src/**/*.spec.ts", "src/**/*.test.ts"<% if (js) { %>, "src/**/*.spec.js", "src/**/*.test.js"<% } %>
|
|
13
|
+
]
|
|
10
14
|
}
|
|
@@ -18,8 +18,12 @@ async function releaseVersionGenerator(tree, options) {
|
|
|
18
18
|
try {
|
|
19
19
|
const versionData = {};
|
|
20
20
|
// If the user provided a specifier, validate that it is valid semver or a relative semver keyword
|
|
21
|
-
if (options.specifier
|
|
22
|
-
|
|
21
|
+
if (options.specifier) {
|
|
22
|
+
if (!(0, semver_1.isValidSemverSpecifier)(options.specifier)) {
|
|
23
|
+
throw new Error(`The given version specifier "${options.specifier}" is not valid. You provide an exact version or a valid semver keyword such as "major", "minor", "patch", etc.`);
|
|
24
|
+
}
|
|
25
|
+
// The node semver library classes a leading `v` as valid, but we want to ensure it is not present in the final version
|
|
26
|
+
options.specifier = options.specifier.replace(/^v/, '');
|
|
23
27
|
}
|
|
24
28
|
const projects = options.projects;
|
|
25
29
|
const createResolvePackageRoot = (customPackageRoot) => (projectNode) => {
|