@nx/js 18.0.0-beta.0 → 18.0.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/babel.js +2 -2
- package/executors.json +1 -1
- package/package.json +8 -8
- package/src/executors/node/schema.json +1 -1
- package/src/executors/release-publish/schema.json +1 -1
- package/src/executors/swc/schema.json +1 -1
- package/src/executors/verdaccio/schema.json +1 -1
- package/src/generators/convert-to-swc/schema.json +1 -1
- package/src/generators/init/schema.json +1 -1
- package/src/generators/library/library.js +4 -0
- package/src/generators/library/schema.json +1 -1
- package/src/generators/release-version/schema.json +1 -1
- package/src/generators/setup-build/schema.json +1 -1
- package/src/generators/setup-verdaccio/schema.json +1 -1
- package/src/utils/inline.js +5 -3
package/babel.js
CHANGED
|
@@ -12,10 +12,10 @@ module.exports = function (api, options = {}) {
|
|
|
12
12
|
const emitDecoratorMetadata = api.caller((caller) => caller?.emitDecoratorMetadata ?? true);
|
|
13
13
|
// Determine settings for `@babel//babel-plugin-transform-class-properties`,
|
|
14
14
|
// so that we can sync the `loose` option with `@babel/preset-env`.
|
|
15
|
-
// TODO(
|
|
15
|
+
// TODO(v19): Remove classProperties since it's no longer needed, now that the class props transform is in preset-env.
|
|
16
16
|
const loose = options.classProperties?.loose ?? options.loose ?? true;
|
|
17
17
|
if (options.classProperties) {
|
|
18
|
-
devkit_1.logger.warn(`Use =\`loose\` option instead of \`classProperties.loose\`. The \`classProperties\` option will be removed in Nx
|
|
18
|
+
devkit_1.logger.warn(`Use =\`loose\` option instead of \`classProperties.loose\`. The \`classProperties\` option will be removed in Nx 19`);
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
21
|
presets: [
|
package/executors.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "18.0.0-beta.
|
|
3
|
+
"version": "18.0.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": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"generators": "./generators.json",
|
|
31
31
|
"executors": "./executors.json",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
33
|
+
"@babel/core": "^7.23.2",
|
|
34
34
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
35
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
35
|
+
"@babel/plugin-transform-runtime": "^7.23.2",
|
|
36
36
|
"@babel/plugin-transform-class-properties": "^7.22.5",
|
|
37
|
-
"@babel/preset-env": "^7.
|
|
37
|
+
"@babel/preset-env": "^7.23.2",
|
|
38
38
|
"@babel/preset-typescript": "^7.22.5",
|
|
39
39
|
"@babel/runtime": "^7.22.6",
|
|
40
40
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"js-tokens": "^4.0.0",
|
|
55
55
|
"minimatch": "9.0.3",
|
|
56
56
|
"ora": "5.3.0",
|
|
57
|
-
"semver": "7.5.3",
|
|
57
|
+
"semver": "^7.5.3",
|
|
58
58
|
"source-map-support": "0.5.19",
|
|
59
59
|
"tslib": "^2.3.0",
|
|
60
|
-
"@nx/devkit": "18.0.0-beta.
|
|
61
|
-
"@nx/workspace": "18.0.0-beta.
|
|
62
|
-
"@nrwl/js": "18.0.0-beta.
|
|
60
|
+
"@nx/devkit": "18.0.0-beta.1",
|
|
61
|
+
"@nx/workspace": "18.0.0-beta.1",
|
|
62
|
+
"@nrwl/js": "18.0.0-beta.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"verdaccio": "^5.0.4"
|
|
@@ -12,6 +12,7 @@ const versions_1 = require("../../utils/versions");
|
|
|
12
12
|
const init_1 = require("../init/init");
|
|
13
13
|
const generator_1 = require("../setup-verdaccio/generator");
|
|
14
14
|
const create_ts_config_1 = require("../../utils/typescript/create-ts-config");
|
|
15
|
+
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
15
16
|
async function libraryGenerator(tree, schema) {
|
|
16
17
|
return await libraryGeneratorInternal(tree, {
|
|
17
18
|
// provide a default projectNameAndRootFormat to avoid breaking changes
|
|
@@ -98,6 +99,9 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
98
99
|
if (!options.skipFormat) {
|
|
99
100
|
await (0, devkit_1.formatFiles)(tree);
|
|
100
101
|
}
|
|
102
|
+
tasks.push(() => {
|
|
103
|
+
(0, log_show_project_command_1.logShowProjectCommand)(options.name);
|
|
104
|
+
});
|
|
101
105
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
102
106
|
}
|
|
103
107
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
package/src/utils/inline.js
CHANGED
|
@@ -161,9 +161,11 @@ function movePackage(from, to) {
|
|
|
161
161
|
(0, fs_extra_1.copySync)(from, to, { overwrite: true });
|
|
162
162
|
}
|
|
163
163
|
function updateImports(destOutputPath, inlinedDepsDestOutputRecord) {
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
const pathAliases = Object.keys(inlinedDepsDestOutputRecord);
|
|
165
|
+
if (pathAliases.length == 0) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const importRegex = new RegExp(pathAliases.map((pathAlias) => `["'](${pathAlias})["']`).join('|'), 'g');
|
|
167
169
|
recursiveUpdateImport(destOutputPath, importRegex, inlinedDepsDestOutputRecord);
|
|
168
170
|
}
|
|
169
171
|
function recursiveUpdateImport(dirPath, importRegex, inlinedDepsDestOutputRecord, rootParentDir) {
|