@nx/js 19.8.1 → 19.8.2
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": "19.8.
|
|
3
|
+
"version": "19.8.2",
|
|
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": "19.8.
|
|
43
|
-
"@nx/workspace": "19.8.
|
|
42
|
+
"@nx/devkit": "19.8.2",
|
|
43
|
+
"@nx/workspace": "19.8.2",
|
|
44
44
|
"babel-plugin-const-enum": "^1.0.1",
|
|
45
45
|
"babel-plugin-macros": "^2.8.0",
|
|
46
46
|
"babel-plugin-transform-typescript-metadata": "^0.3.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "10.9.1",
|
|
62
62
|
"tsconfig-paths": "^4.1.2",
|
|
63
63
|
"tslib": "^2.3.0",
|
|
64
|
-
"@nrwl/js": "19.8.
|
|
64
|
+
"@nrwl/js": "19.8.2"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"verdaccio": "^5.0.4"
|
|
@@ -109,6 +109,15 @@ async function initGeneratorInternal(tree, schema) {
|
|
|
109
109
|
return json;
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
const rootTsConfigFileName = (0, ts_config_1.getRootTsConfigFileName)(tree);
|
|
113
|
+
// If the root tsconfig file uses `importHelpers` then we must install tslib
|
|
114
|
+
// in order to run tsc for build and typecheck.
|
|
115
|
+
if (rootTsConfigFileName) {
|
|
116
|
+
const rootTsConfig = (0, devkit_1.readJson)(tree, rootTsConfigFileName);
|
|
117
|
+
if (rootTsConfig.compilerOptions?.importHelpers) {
|
|
118
|
+
devDependencies['tslib'] = versions_1.tsLibVersion;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
112
121
|
const installTask = !schema.skipPackageJson
|
|
113
122
|
? (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, schema.keepExistingVersions)
|
|
114
123
|
: () => { };
|
|
@@ -105,9 +105,6 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
105
105
|
(0, devkit_1.joinPathFragments)(options.projectRoot, './src', 'index.' + (options.js ? 'js' : 'ts')),
|
|
106
106
|
]);
|
|
107
107
|
}
|
|
108
|
-
if (options.bundler !== 'none') {
|
|
109
|
-
addBundlerDependencies(tree, options);
|
|
110
|
-
}
|
|
111
108
|
if (!options.skipFormat) {
|
|
112
109
|
await (0, devkit_1.formatFiles)(tree);
|
|
113
110
|
}
|
|
@@ -269,23 +266,6 @@ async function addLint(tree, options) {
|
|
|
269
266
|
}
|
|
270
267
|
return task;
|
|
271
268
|
}
|
|
272
|
-
function addBundlerDependencies(tree, options) {
|
|
273
|
-
(0, devkit_1.updateJson)(tree, `${options.projectRoot}/package.json`, (json) => {
|
|
274
|
-
if (options.bundler === 'tsc') {
|
|
275
|
-
json.dependencies = {
|
|
276
|
-
...json.dependencies,
|
|
277
|
-
tslib: versions_1.tsLibVersion,
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
else if (options.bundler === 'swc') {
|
|
281
|
-
json.dependencies = {
|
|
282
|
-
...json.dependencies,
|
|
283
|
-
'@swc/helpers': versions_1.swcHelpersVersion,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
return json;
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
269
|
function updateTsConfig(tree, options) {
|
|
290
270
|
(0, devkit_1.updateJson)(tree, (0, path_1.join)(options.projectRoot, 'tsconfig.json'), (json) => {
|
|
291
271
|
if (options.strict) {
|