nx 21.2.0-beta.2 → 21.2.0-beta.3
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/bin/init-local.d.ts +1 -1
- package/bin/init-local.js +7 -1
- package/bin/nx.js +9 -6
- package/package.json +11 -11
- package/src/command-line/release/changelog.js +15 -5
- package/src/command-line/release/version/release-group-processor.js +1 -1
- package/src/command-line/release/version/topological-sort.js +1 -1
- package/src/command-line/report/report.js +1 -1
- package/src/command-line/run/run-one.d.ts +10 -0
- package/src/command-line/run/run-one.js +16 -5
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/native/index.d.ts +12 -2
- package/src/native/native-bindings.js +4 -1
- package/src/native/nx.wasi-browser.js +47 -40
- package/src/native/nx.wasi.cjs +47 -40
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/lock-file/pnpm-parser.js +11 -3
- package/src/plugins/js/lock-file/project-graph-pruning.d.ts +2 -1
- package/src/plugins/js/lock-file/project-graph-pruning.js +4 -0
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +22 -12
- package/src/plugins/js/utils/register.d.ts +3 -2
- package/src/plugins/js/utils/register.js +36 -22
- package/src/plugins/js/utils/typescript.d.ts +2 -1
- package/src/plugins/js/utils/typescript.js +12 -7
- package/src/project-graph/plugins/transpiler.js +5 -5
- package/src/tasks-runner/run-command.js +1 -1
- package/src/utils/nx-console-prompt.d.ts +1 -0
- package/src/utils/nx-console-prompt.js +50 -0
@@ -6,9 +6,9 @@ exports.pluginTranspilerIsRegistered = pluginTranspilerIsRegistered;
|
|
6
6
|
exports.cleanupPluginTSTranspiler = cleanupPluginTSTranspiler;
|
7
7
|
const node_fs_1 = require("node:fs");
|
8
8
|
const posix_1 = require("node:path/posix");
|
9
|
-
const workspace_root_1 = require("../../utils/workspace-root");
|
10
9
|
const register_1 = require("../../plugins/js/utils/register");
|
11
10
|
const typescript_1 = require("../../plugins/js/utils/typescript");
|
11
|
+
const workspace_root_1 = require("../../utils/workspace-root");
|
12
12
|
exports.unregisterPluginTSTranspiler = null;
|
13
13
|
/**
|
14
14
|
* Register swc-node or ts-node if they are not currently registered
|
@@ -23,16 +23,16 @@ function registerPluginTSTranspiler() {
|
|
23
23
|
if (!tsConfigName) {
|
24
24
|
return;
|
25
25
|
}
|
26
|
-
const
|
27
|
-
? (0, typescript_1.
|
26
|
+
const tsConfig = tsConfigName
|
27
|
+
? (0, typescript_1.readTsConfigWithoutFiles)(tsConfigName)
|
28
28
|
: {};
|
29
29
|
const cleanupFns = [
|
30
30
|
(0, register_1.registerTsConfigPaths)(tsConfigName),
|
31
31
|
(0, register_1.registerTranspiler)({
|
32
32
|
experimentalDecorators: true,
|
33
33
|
emitDecoratorMetadata: true,
|
34
|
-
...
|
35
|
-
}),
|
34
|
+
...tsConfig.options,
|
35
|
+
}, tsConfig.raw),
|
36
36
|
];
|
37
37
|
exports.unregisterPluginTSTranspiler = () => {
|
38
38
|
cleanupFns.forEach((fn) => fn?.());
|
@@ -142,7 +142,7 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
|
|
142
142
|
: chunk.toString());
|
143
143
|
}
|
144
144
|
else {
|
145
|
-
(0, native_1.
|
145
|
+
(0, native_1.logDebug)(Buffer.isBuffer(chunk)
|
146
146
|
? chunk.toString(encoding)
|
147
147
|
: chunk.toString());
|
148
148
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function ensureNxConsoleInstalled(): Promise<void>;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ensureNxConsoleInstalled = ensureNxConsoleInstalled;
|
4
|
+
const enquirer_1 = require("enquirer");
|
5
|
+
const os_1 = require("os");
|
6
|
+
const output_1 = require("./output");
|
7
|
+
const native_1 = require("../native");
|
8
|
+
async function ensureNxConsoleInstalled() {
|
9
|
+
const preferences = new native_1.NxConsolePreferences((0, os_1.homedir)());
|
10
|
+
let setting = preferences.getAutoInstallPreference();
|
11
|
+
const canInstallConsole = (0, native_1.canInstallNxConsole)();
|
12
|
+
// Noop
|
13
|
+
if (!canInstallConsole) {
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
if (typeof setting !== 'boolean') {
|
17
|
+
setting = await promptForNxConsoleInstallation();
|
18
|
+
preferences.setAutoInstallPreference(setting);
|
19
|
+
}
|
20
|
+
if (setting) {
|
21
|
+
(0, native_1.installNxConsole)();
|
22
|
+
}
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Prompts the user whether they want to automatically install the Nx Console extension
|
26
|
+
* and persists their preference using the NxConsolePreferences struct
|
27
|
+
*/
|
28
|
+
async function promptForNxConsoleInstallation() {
|
29
|
+
try {
|
30
|
+
output_1.output.log({
|
31
|
+
title: "Enhance your developer experience with Nx Console, Nx's official editor extension",
|
32
|
+
bodyLines: [
|
33
|
+
'- Enable your AI assistant to do more by understanding your workspace',
|
34
|
+
'- Add IntelliSense for Nx configuration files',
|
35
|
+
'- Explore your workspace visually',
|
36
|
+
'- Generate code and execute tasks interactively',
|
37
|
+
],
|
38
|
+
});
|
39
|
+
const { shouldInstallNxConsole } = await (0, enquirer_1.prompt)({
|
40
|
+
type: 'confirm',
|
41
|
+
name: 'shouldInstallNxConsole',
|
42
|
+
message: 'Install Nx Console? (you can uninstall anytime)',
|
43
|
+
initial: true,
|
44
|
+
});
|
45
|
+
return shouldInstallNxConsole;
|
46
|
+
}
|
47
|
+
catch (error) {
|
48
|
+
return false;
|
49
|
+
}
|
50
|
+
}
|