@nx/js 18.1.3 → 18.2.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/LICENSE +1 -1
- package/babel.js +33 -13
- package/migrations.json +13 -0
- package/package.json +4 -4
- package/src/executors/node/node.impl.js +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/LICENSE
CHANGED
package/babel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const path_1 = require("path");
|
|
4
|
+
const semver_1 = require("semver");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
module.exports = function (api, options = {}) {
|
|
6
7
|
api.assertVersion(7);
|
|
@@ -27,19 +28,7 @@ module.exports = function (api, options = {}) {
|
|
|
27
28
|
// such as import syntax.
|
|
28
29
|
isTest || process.env.NODE_ENV === 'test' || process.env.JEST_WORKER_ID
|
|
29
30
|
? { targets: { node: 'current' }, loose: true }
|
|
30
|
-
:
|
|
31
|
-
// Allow importing core-js in entrypoint and use browserslist to select polyfills.
|
|
32
|
-
useBuiltIns: options.useBuiltIns ?? 'entry',
|
|
33
|
-
corejs: options.useBuiltIns !== false ? 3 : null,
|
|
34
|
-
// Do not transform modules to CJS
|
|
35
|
-
modules: false,
|
|
36
|
-
targets: isModern ? { esmodules: 'intersect' } : undefined,
|
|
37
|
-
bugfixes: true,
|
|
38
|
-
// Exclude transforms that make all code slower
|
|
39
|
-
exclude: ['transform-typeof-symbol'],
|
|
40
|
-
// This must match the setting for `@babel/plugin-proposal-class-properties`
|
|
41
|
-
loose,
|
|
42
|
-
},
|
|
31
|
+
: createBabelPresetEnvOptions(options.useBuiltIns, isModern, loose),
|
|
43
32
|
],
|
|
44
33
|
[
|
|
45
34
|
require.resolve('@babel/preset-typescript'),
|
|
@@ -89,3 +78,34 @@ module.exports = function (api, options = {}) {
|
|
|
89
78
|
],
|
|
90
79
|
};
|
|
91
80
|
};
|
|
81
|
+
function createBabelPresetEnvOptions(useBuiltIns, isModern, loose) {
|
|
82
|
+
const presetOptions = {
|
|
83
|
+
// Do not transform modules to CJS
|
|
84
|
+
modules: false,
|
|
85
|
+
targets: isModern ? { esmodules: 'intersect' } : undefined,
|
|
86
|
+
bugfixes: true,
|
|
87
|
+
// Exclude transforms that make all code slower
|
|
88
|
+
exclude: ['transform-typeof-symbol'],
|
|
89
|
+
// This must match the setting for `@babel/plugin-proposal-class-properties`
|
|
90
|
+
loose,
|
|
91
|
+
};
|
|
92
|
+
// If core-js is installed then set corresponding options, otherwise don't use core-js.
|
|
93
|
+
// Previously, core-js was required for all projects, but it is not longer required when using only stable JS features that does not need to be transpiled.
|
|
94
|
+
const coreJsVersion = findCoreJsVersion();
|
|
95
|
+
if (coreJsVersion) {
|
|
96
|
+
presetOptions.useBuiltIns = useBuiltIns ?? 'entry';
|
|
97
|
+
presetOptions.corejs = useBuiltIns !== false ? coreJsVersion : null;
|
|
98
|
+
}
|
|
99
|
+
return presetOptions;
|
|
100
|
+
}
|
|
101
|
+
function findCoreJsVersion() {
|
|
102
|
+
try {
|
|
103
|
+
// nx-ignore-next-line
|
|
104
|
+
const v = require('core-js/package.json').version;
|
|
105
|
+
const { major, minor } = (0, semver_1.parse)(v);
|
|
106
|
+
return `${major}.${minor}`;
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
package/migrations.json
CHANGED
|
@@ -154,6 +154,19 @@
|
|
|
154
154
|
"alwaysAddToPackageJson": false
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
+
},
|
|
158
|
+
"18.2.0": {
|
|
159
|
+
"version": "18.2.0-beta.0",
|
|
160
|
+
"x-prompt": "Do you want to update to TypeScript v5.4?",
|
|
161
|
+
"requires": {
|
|
162
|
+
"typescript": ">=5.3.0 <5.4.0"
|
|
163
|
+
},
|
|
164
|
+
"packages": {
|
|
165
|
+
"typescript": {
|
|
166
|
+
"version": "~5.4.2",
|
|
167
|
+
"alwaysAddToPackageJson": false
|
|
168
|
+
}
|
|
169
|
+
}
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
172
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "18.1
|
|
3
|
+
"version": "18.2.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": {
|
|
@@ -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": "18.1
|
|
61
|
-
"@nx/workspace": "18.1
|
|
62
|
-
"@nrwl/js": "18.1
|
|
60
|
+
"@nx/devkit": "18.2.0-beta.1",
|
|
61
|
+
"@nx/workspace": "18.2.0-beta.1",
|
|
62
|
+
"@nrwl/js": "18.2.0-beta.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"verdaccio": "^5.0.4"
|
|
@@ -61,7 +61,7 @@ async function* nodeExecutor(options, context) {
|
|
|
61
61
|
await previousTask?.stop('SIGTERM');
|
|
62
62
|
await task.start();
|
|
63
63
|
};
|
|
64
|
-
const debouncedProcessQueue = debounce(processQueue, options.debounce ??
|
|
64
|
+
const debouncedProcessQueue = debounce(processQueue, options.debounce ?? 1_000);
|
|
65
65
|
const addToQueue = async (childProcess, buildResult) => {
|
|
66
66
|
const task = {
|
|
67
67
|
id: (0, crypto_1.randomUUID)(),
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const swcNodeVersion = "~1.8.0";
|
|
|
8
8
|
export declare const tsLibVersion = "^2.3.0";
|
|
9
9
|
export declare const typesNodeVersion = "18.16.9";
|
|
10
10
|
export declare const verdaccioVersion = "^5.0.4";
|
|
11
|
-
export declare const typescriptVersion = "~5.
|
|
11
|
+
export declare const typescriptVersion = "~5.4.2";
|
|
12
12
|
/**
|
|
13
13
|
* The minimum version is currently determined from the lowest version
|
|
14
14
|
* that's supported by the lowest Angular supported version, e.g.
|
package/src/utils/versions.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.tsLibVersion = '^2.3.0';
|
|
|
12
12
|
exports.typesNodeVersion = '18.16.9';
|
|
13
13
|
exports.verdaccioVersion = '^5.0.4';
|
|
14
14
|
// Typescript
|
|
15
|
-
exports.typescriptVersion = '~5.
|
|
15
|
+
exports.typescriptVersion = '~5.4.2';
|
|
16
16
|
/**
|
|
17
17
|
* The minimum version is currently determined from the lowest version
|
|
18
18
|
* that's supported by the lowest Angular supported version, e.g.
|