Socket
Socket
Sign inDemoInstall

nx

Package Overview
Dependencies
Maintainers
8
Versions
1371
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nx - npm Package Compare versions

Comparing version 19.7.0-beta.1 to 19.7.0-beta.2

src/command-line/login/command-object.d.ts

13

.eslintrc.json

@@ -103,3 +103,14 @@ {

"prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
"util" // This is coming from @storybook/builder-manager since it uses the browser polyfill
"util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
// The native modules are optional and only one of them will ever be installed on a given machine
"@nx/nx-darwin-x64",
"@nx/nx-darwin-arm64",
"@nx/nx-linux-x64-gnu",
"@nx/nx-linux-x64-musl",
"@nx/nx-win32-x64-msvc",
"@nx/nx-linux-arm64-gnu",
"@nx/nx-linux-arm64-musl",
"@nx/nx-linux-arm-gnueabihf",
"@nx/nx-win32-arm64-msvc",
"@nx/nx-freebsd-x64"
]

@@ -106,0 +117,0 @@ }

26

package.json
{
"name": "nx",
"version": "19.7.0-beta.1",
"version": "19.7.0-beta.2",
"private": false,

@@ -59,3 +59,3 @@ "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",

"jsonc-parser": "3.2.0",
"lines-and-columns": "~2.0.3",
"lines-and-columns": "2.0.3",
"minimatch": "9.0.3",

@@ -75,3 +75,3 @@ "npm-run-path": "^4.0.1",

"ora": "5.3.0",
"@nrwl/tao": "19.7.0-beta.1"
"@nrwl/tao": "19.7.0-beta.2"
},

@@ -91,12 +91,12 @@ "peerDependencies": {

"optionalDependencies": {
"@nx/nx-darwin-x64": "19.7.0-beta.1",
"@nx/nx-darwin-arm64": "19.7.0-beta.1",
"@nx/nx-linux-x64-gnu": "19.7.0-beta.1",
"@nx/nx-linux-x64-musl": "19.7.0-beta.1",
"@nx/nx-win32-x64-msvc": "19.7.0-beta.1",
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.1",
"@nx/nx-linux-arm64-musl": "19.7.0-beta.1",
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.1",
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.1",
"@nx/nx-freebsd-x64": "19.7.0-beta.1"
"@nx/nx-darwin-x64": "19.7.0-beta.2",
"@nx/nx-darwin-arm64": "19.7.0-beta.2",
"@nx/nx-linux-x64-gnu": "19.7.0-beta.2",
"@nx/nx-linux-x64-musl": "19.7.0-beta.2",
"@nx/nx-win32-x64-msvc": "19.7.0-beta.2",
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.2",
"@nx/nx-linux-arm64-musl": "19.7.0-beta.2",
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.2",
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.2",
"@nx/nx-freebsd-x64": "19.7.0-beta.2"
},

@@ -103,0 +103,0 @@ "nx-migrations": {

@@ -63,5 +63,7 @@ "use strict";

if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
const token = process.env.NX_CLOUD_ACCESS_TOKEN || nxJson.nxCloudAccessToken;
const token = process.env.NX_CLOUD_ACCESS_TOKEN ||
nxJson.nxCloudAccessToken ||
nxJson.nxCloudId;
if (!token) {
throw new Error(`Unable to authenticate. Either define accessToken in nx.json or set the NX_CLOUD_ACCESS_TOKEN env variable.`);
throw new Error(`Unable to authenticate. If you are connecting to Nx Cloud locally, set Nx Cloud ID in nx.json. If you are connecting in a CI context, either define accessToken in nx.json or set the NX_CLOUD_ACCESS_TOKEN env variable.`);
}

@@ -72,6 +74,5 @@ const connectCloudUrl = await (0, url_shorten_1.createNxCloudOnboardingURL)(installationSource, token);

bodyLines: [
'If you have not done so already, connect your workspace to your Nx Cloud account:',
`- Connect with Nx Cloud at:
${connectCloudUrl}`,
'If you have not done so already, connect your workspace to your Nx Cloud account with the following URL:',
'',
`${connectCloudUrl}`,
],

@@ -78,0 +79,0 @@ });

@@ -1,2 +0,2 @@

import { ProjectFileMap, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
import { ProjectFileMap, ProjectGraph, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
import { TaskGraph } from '../../config/task-graph';

@@ -51,1 +51,18 @@ export interface GraphError {

}, affectedProjects: string[]): Promise<void>;
/**
* The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains
*/
export interface GraphJson {
/**
* A graph of tasks populated with `nx build --graph`
*/
tasks?: TaskGraph;
/**
* The plans for hashing a task in the task graph
*/
taskPlans?: Record<string, string[]>;
/**
* The project graph
*/
graph: ProjectGraph;
}

@@ -678,4 +678,6 @@ "use strict";

inputs.forEach((input) => {
if (input.startsWith('{workspaceRoot}')) {
workspaceRootInputs.push(input);
// grouped workspace inputs look like workspace:[pattern,otherPattern]
if (input.startsWith('workspace:[')) {
const inputs = input.substring(11, input.length - 1).split(',');
workspaceRootInputs.push(...inputs);
return;

@@ -700,18 +702,3 @@ }

});
const workspaceRootsExpanded = workspaceRootInputs.flatMap((input) => {
const matches = [];
const withoutWorkspaceRoot = input.substring(16);
const matchingFile = allWorkspaceFiles.find((t) => t.file === withoutWorkspaceRoot);
if (matchingFile) {
matches.push(matchingFile.file);
}
else {
allWorkspaceFiles
.filter((f) => (0, minimatch_1.minimatch)(f.file, withoutWorkspaceRoot))
.forEach((f) => {
matches.push(f.file);
});
}
return matches;
});
const workspaceRootsExpanded = getExpandedWorkspaceRoots(workspaceRootInputs, allWorkspaceFiles);
const otherInputsExpanded = otherInputs.map((input) => {

@@ -749,2 +736,32 @@ if (input === 'TsConfig') {

}
function getExpandedWorkspaceRoots(workspaceRootInputs, allWorkspaceFiles) {
const workspaceRootsExpanded = [];
const negativeWRPatterns = [];
const positiveWRPatterns = [];
for (const fileset of workspaceRootInputs) {
if (fileset.startsWith('!')) {
negativeWRPatterns.push(fileset.substring(17));
}
else {
positiveWRPatterns.push(fileset.substring(16));
}
}
for (const pattern of positiveWRPatterns) {
const matchingFile = allWorkspaceFiles.find((t) => t.file === pattern);
if (matchingFile &&
!negativeWRPatterns.some((p) => (0, minimatch_1.minimatch)(matchingFile.file, p))) {
workspaceRootsExpanded.push(matchingFile.file);
}
else {
allWorkspaceFiles
.filter((f) => (0, minimatch_1.minimatch)(f.file, pattern) &&
!negativeWRPatterns.some((p) => (0, minimatch_1.minimatch)(f.file, p)))
.forEach((f) => {
workspaceRootsExpanded.push(f.file);
});
}
}
workspaceRootsExpanded.sort();
return workspaceRootsExpanded;
}
async function createJsonOutput(prunedGraph, rawGraph, projects, targets) {

@@ -751,0 +768,0 @@ const response = {

@@ -1082,35 +1082,13 @@ "use strict";

}
// TODO (v17): This should just become something like:
// ```
// return !collection.generators[name] && collection.schematics[name]
// ```
// TODO (v21): Remove CLI determination of Angular Migration
function isAngularMigration(collection, collectionPath, name) {
const entry = collection.generators?.[name] || collection.schematics?.[name];
// In the future we will determine this based on the location of the entry in the collection.
// If the entry is under `schematics`, it will be assumed to be an angular cli migration.
// If the entry is under `generators`, it will be assumed to be an nx migration.
// For now, we will continue to obey the cli property, if it exists.
// If it doesn't exist, we will check if the implementation references @angular/devkit.
const shouldBeNx = !!collection.generators?.[name];
const shouldBeNg = !!collection.schematics?.[name];
let useAngularDevkitToRunMigration = false;
const { path: implementationPath } = getImplementationPath(collection, collectionPath, name);
const implStringContents = (0, fs_1.readFileSync)(implementationPath, 'utf-8');
// TODO (v17): Remove this check and the cli property access - it is only here for backwards compatibility.
if (['@angular/material', '@angular/cdk'].includes(collection.name) ||
[
"import('@angular-devkit",
'import("@angular-devkit',
"require('@angular-devkit",
'require("@angular-devkit',
"from '@angular-devkit",
'from "@angular-devkit',
].some((s) => implStringContents.includes(s))) {
useAngularDevkitToRunMigration = true;
}
if (useAngularDevkitToRunMigration && shouldBeNx) {
if (entry.cli && entry.cli !== 'nx' && collection.generators?.[name]) {
output_1.output.warn({
title: `The migration '${collection.name}:${name}' appears to be an Angular CLI migration, but is located in the 'generators' section of migrations.json.`,
bodyLines: [
'In Nx 17, migrations inside `generators` will be treated as Angular Devkit migrations.',
'In Nx 21, migrations inside `generators` will be treated as Nx Devkit migrations and therefore may not run correctly if they are using Angular Devkit.',
'If the migration should be run with Angular Devkit, please place the migration inside `schematics` instead.',
"Please open an issue on the plugin's repository if you believe this is an error.",

@@ -1120,14 +1098,5 @@ ],

}
if (!useAngularDevkitToRunMigration && entry.cli === 'nx' && shouldBeNg) {
output_1.output.warn({
title: `The migration '${collection.name}:${name}' appears to be an Nx migration, but is located in the 'schematics' section of migrations.json.`,
bodyLines: [
'In Nx 17, migrations inside `generators` will be treated as nx devkit migrations.',
"Please open an issue on the plugin's repository if you believe this is an error.",
],
});
}
// Currently, if the cli property exists we listen to it. If its nx, its not an ng cli migration.
// If the property is not set, we will fall back to our intuition.
return entry.cli ? entry.cli !== 'nx' : useAngularDevkitToRunMigration;
return entry.cli ? entry.cli !== 'nx' : !shouldBeNx && shouldBeNg;
}

@@ -1134,0 +1103,0 @@ const getNgCompatLayer = (() => {

@@ -27,4 +27,6 @@ "use strict";

const command_object_21 = require("./add/command-object");
const command_object_22 = require("./login/command-object");
const command_object_23 = require("./logout/command-object");
const command_objects_1 = require("./deprecated/command-objects");
const command_object_22 = require("./sync/command-object");
const command_object_24 = require("./sync/command-object");
// Ensure that the output takes up the available width of the terminal.

@@ -74,7 +76,9 @@ yargs.wrap(yargs.terminalWidth());

.command(command_object_17.yargsShowCommand)
.command(command_object_22.yargsSyncCommand)
.command(command_object_22.yargsSyncCheckCommand)
.command(command_object_24.yargsSyncCommand)
.command(command_object_24.yargsSyncCheckCommand)
.command(command_object_2.yargsViewLogsCommand)
.command(command_object_18.yargsWatchCommand)
.command(command_object_15.yargsNxInfixCommand)
.command(command_object_22.yargsLoginCommand)
.command(command_object_23.yargsLogoutCommand)
.scriptName('nx')

@@ -81,0 +85,0 @@ .help()

@@ -1,5 +0,6 @@

import { Argv } from 'yargs';
import { Argv, ParserConfigurationOptions } from 'yargs';
interface ExcludeOptions {
exclude: string[];
}
export declare const defaultYargsParserConfiguration: Partial<ParserConfigurationOptions>;
export declare function withExcludeOption(yargs: Argv): Argv<ExcludeOptions>;

@@ -6,0 +7,0 @@ export interface RunOptions {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultYargsParserConfiguration = void 0;
exports.withExcludeOption = withExcludeOption;

@@ -15,2 +16,9 @@ exports.withRunOptions = withRunOptions;

exports.parseCSV = parseCSV;
exports.defaultYargsParserConfiguration = {
'strip-dashed': true,
'unknown-options-as-args': true,
'populate--': true,
'parse-numbers': false,
'parse-positional-numbers': false,
};
function withExcludeOption(yargs) {

@@ -132,7 +140,3 @@ return yargs.option('exclude', {

return withExcludeOption(yargs)
.parserConfiguration({
'strip-dashed': true,
'unknown-options-as-args': true,
'populate--': true,
})
.parserConfiguration(exports.defaultYargsParserConfiguration)
.option('files', {

@@ -174,7 +178,3 @@ describe: 'Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces',

return withRunOptions(yargs)
.parserConfiguration({
'strip-dashed': true,
'unknown-options-as-args': true,
'populate--': true,
})
.parserConfiguration(exports.defaultYargsParserConfiguration)
.option('projects', {

@@ -231,7 +231,3 @@ type: 'string',

const res = withRunOptions(withOutputStyleOption(withConfiguration(yargs), allOutputStyles))
.parserConfiguration({
'strip-dashed': true,
'unknown-options-as-args': true,
'populate--': true,
})
.parserConfiguration(exports.defaultYargsParserConfiguration)
.option('project', {

@@ -238,0 +234,0 @@ describe: 'Target project',

@@ -1,1 +0,1 @@

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{79207:()=>{}},s=>{var e;e=79207,s(s.s=e)}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{46134:()=>{}},s=>{var e;e=46134,s(s.s=e)}]);

@@ -75,5 +75,7 @@ "use strict";

// CI=true,env=true => daemon
// docker=true,env=undefined => no daemon
// docker=true,env=false => no daemon
// docker=true,env=true => daemon
// WASM => no daemon because file watching does not work
if (((0, is_ci_1.isCI)() && env !== 'true') ||
isDocker() ||
if ((((0, is_ci_1.isCI)() || isDocker()) && env !== 'true') ||
(0, tmp_dir_1.isDaemonDisabled)() ||

@@ -80,0 +82,0 @@ nxJsonIsNotPresent() ||

@@ -70,2 +70,3 @@ /**

export type { ProjectFileMap, FileMap, FileData, ProjectGraph, ProjectGraphDependency, ProjectGraphNode, ProjectGraphProjectNode, ProjectGraphExternalNode, ProjectGraphProcessorContext, } from './config/project-graph';
export type { GraphJson } from './command-line/graph/graph';
/**

@@ -72,0 +73,0 @@ * @category Project Graph

@@ -19,3 +19,3 @@ "use strict";

(0, task_env_1.unloadDotEnvFile)(path, env);
const result = (0, task_env_1.loadAndExpandDotEnvFile)(path, env);
const result = (0, task_env_1.loadAndExpandDotEnvFile)(path, env, true);
if (result.error) {

@@ -297,10 +297,15 @@ throw result.error;

const localEnv = (0, npm_run_path_1.env)({ cwd: cwd ?? process.cwd() });
const res = {
let res = {
...process.env,
...localEnv,
...env,
};
// env file from envFile option takes priority over process env
if (process.env.NX_LOAD_DOT_ENV_FILES !== 'false') {
loadEnvVars(envFile, res);
}
// env variables from env option takes priority over everything else
res = {
...res,
...env,
};
// need to override PATH to make sure we are using the local node_modules

@@ -307,0 +312,0 @@ if (localEnv.PATH)

@@ -41,3 +41,3 @@ import { NxJsonConfiguration } from '../config/nx-json';

private hashProjectInputs;
private hashRootFileset;
private hashRootFilesets;
private hashProjectConfig;

@@ -44,0 +44,0 @@ private hashTsConfig;

@@ -302,6 +302,6 @@ "use strict";

this.hashTsConfig(projectName),
...[
...workspaceFilesets,
...this.legacyFilesetInputs.map((r) => r.fileset),
].map((fileset) => this.hashRootFileset(fileset)),
...(workspaceFilesets.length
? [this.hashRootFilesets(workspaceFilesets)]
: []),
this.hashRootFilesets(this.legacyFilesetInputs.map((r) => r.fileset)),
...[...notFilesets, ...this.legacyRuntimeInputs].map((r) => r['runtime']

@@ -324,18 +324,36 @@ ? this.hashRuntime(env, r['runtime'])

}
async hashRootFileset(fileset) {
const mapKey = fileset;
const withoutWorkspaceRoot = fileset.substring(16);
async hashRootFilesets(filesets) {
const mapKey = `workspace:[${filesets.join(',')}]`;
if (!this.filesetHashes[mapKey]) {
this.filesetHashes[mapKey] = new Promise(async (res) => {
const parts = [];
const matchingFile = this.allWorkspaceFiles.find((t) => t.file === withoutWorkspaceRoot);
if (matchingFile) {
parts.push(matchingFile.hash);
const negativePatterns = [];
const positivePatterns = [];
for (const fileset of filesets) {
if (fileset.startsWith('!')) {
negativePatterns.push(fileset.substring(17));
}
else {
positivePatterns.push(fileset.substring(16));
}
}
else {
this.allWorkspaceFiles
.filter((f) => (0, minimatch_1.minimatch)(f.file, withoutWorkspaceRoot))
.forEach((f) => {
parts.push(f.hash);
});
for (const fileset of positivePatterns) {
const withoutWorkspaceRoot = fileset;
// Used to shortcut minimatch if not necessary
const matchingFile = this.allWorkspaceFiles.find((t) => t.file === withoutWorkspaceRoot);
// shortcut because there is a direct match
if (matchingFile) {
if (!negativePatterns.some((p) => (0, minimatch_1.minimatch)(matchingFile.file, p))) {
parts.push(matchingFile.hash);
}
// No direct match, check if pattern matched
}
else {
this.allWorkspaceFiles
.filter((f) => (0, minimatch_1.minimatch)(f.file, withoutWorkspaceRoot) &&
!negativePatterns.some((p) => (0, minimatch_1.minimatch)(f.file, p)))
.forEach((f) => {
parts.push(f.hash);
});
}
}

@@ -342,0 +360,0 @@ const value = (0, file_hasher_1.hashArray)(parts);

@@ -14,8 +14,3 @@ "use strict";

if (!accessToken && !nxCloudId) {
if (process.env.NX_ENABLE_LOGIN === 'true' && !nxCloudId) {
throw new Error(`Unable to authenticate. Please connect your workspace to Nx Cloud to define a valid Nx Cloud Id. If you are in a CI context, please set the NX_CLOUD_ACCESS_TOKEN environment variable or define an access token in your nx.json.`);
}
else {
throw new Error(`Unable to authenticate. Either define accessToken in nx.json or set the NX_CLOUD_ACCESS_TOKEN env variable. If you do not want to use Nx Cloud for this command, either set NX_NO_CLOUD=true, or pass the --no-cloud flag.`);
}
throw new Error(`Unable to authenticate. If you are connecting to Nx Cloud locally, set an Nx Cloud ID in your nx.json with "nx connect". If you are in a CI context, please set the NX_CLOUD_ACCESS_TOKEN environment variable or define an access token in your nx.json.`);
}

@@ -22,0 +17,0 @@ if (options.customProxyConfigPath) {

@@ -22,2 +22,3 @@ import { ProjectFileMap, ProjectGraph, ProjectGraphProjectNode } from '../../../config/project-graph';

skipPackageManager?: boolean;
skipOverrides?: boolean;
}, fileMap?: ProjectFileMap): PackageJson;

@@ -24,0 +25,0 @@ export declare function findProjectsNpmDependencies(projectNode: ProjectGraphProjectNode, graph: ProjectGraph, target: string, rootPackageJson: PackageJson, options: {

@@ -124,2 +124,26 @@ "use strict";

}
// region Overrides/Resolutions
// npm
if (rootPackageJson.overrides && !options.skipOverrides) {
packageJson.overrides = {
...rootPackageJson.overrides,
...packageJson.overrides,
};
}
// pnpm
if (rootPackageJson.pnpm?.overrides && !options.skipOverrides) {
packageJson.pnpm ??= {};
packageJson.pnpm.overrides = {
...rootPackageJson.pnpm.overrides,
...packageJson.pnpm.overrides,
};
}
// yarn
if (rootPackageJson.resolutions && !options.skipOverrides) {
packageJson.resolutions = {
...rootPackageJson.resolutions,
...packageJson.resolutions,
};
}
// endregion Overrides/Resolutions
return packageJson;

@@ -126,0 +150,0 @@ }

@@ -59,5 +59,5 @@ "use strict";

async function runAllTasks(tasks, options, context) {
const orchestrator = new task_orchestrator_1.TaskOrchestrator(context.hasher, context.initiatingProject, context.projectGraph, context.taskGraph, options, context.nxArgs?.nxBail, context.daemon);
const orchestrator = new task_orchestrator_1.TaskOrchestrator(context.hasher, context.initiatingProject, context.projectGraph, context.taskGraph, options, context.nxArgs?.nxBail, context.daemon, context.nxArgs?.outputStyle);
return orchestrator.run();
}
exports.default = exports.defaultTasksRunner;
import { NxArgs } from '../utils/command-line-utils';
import { Task, TaskGraph } from '../config/task-graph';
import { TaskResult } from './life-cycle';
export declare function initTasksRunner(nxArgs: NxArgs): Promise<{

@@ -10,3 +11,4 @@ invoke: (opts: {

taskGraph: TaskGraph;
taskResults: Record<string, TaskResult>;
}>;
}>;

@@ -55,2 +55,3 @@ "use strict";

taskGraph,
taskResults: lifeCycle.getTaskResults(),
};

@@ -57,0 +58,0 @@ },

import { TaskStatus } from '../tasks-runner';
import type { LifeCycle } from '../life-cycle';
import type { LifeCycle, TaskResult } from '../life-cycle';
import { Task } from '../../config/task-graph';

@@ -8,11 +8,9 @@ export declare class InvokeRunnerTerminalOutputLifeCycle implements LifeCycle {

cachedTasks: Task[];
private taskResults;
constructor(tasks: Task[]);
startCommand(): void;
endCommand(): void;
endTasks(taskResults: {
task: Task;
status: TaskStatus;
code: number;
}[]): void;
endTasks(taskResults: TaskResult[]): void;
printTaskTerminalOutput(task: Task, cacheStatus: TaskStatus, terminalOutput: string): void;
getTaskResults(): Record<string, TaskResult>;
}

@@ -11,2 +11,3 @@ "use strict";

this.cachedTasks = [];
this.taskResults = {};
}

@@ -49,2 +50,3 @@ startCommand() {

for (let t of taskResults) {
this.taskResults[t.task.id] = t;
if (t.status === 'failure') {

@@ -68,3 +70,6 @@ this.failedTasks.push(t.task);

}
getTaskResults() {
return this.taskResults;
}
}
exports.InvokeRunnerTerminalOutputLifeCycle = InvokeRunnerTerminalOutputLifeCycle;

@@ -444,3 +444,3 @@ "use strict";

process.env.NX_CLOUD_ACCESS_TOKEN ||
// Nx Cloud Id specified in nxJson
// Nx Cloud ID specified in nxJson
nxJson.nxCloudId;

@@ -447,0 +447,0 @@ return isCloudRunner ? 'nx-cloud' : require.resolve('./default-tasks-runner');

@@ -10,5 +10,5 @@ import { Task } from '../config/task-graph';

* This function loads a .env file and expands the variables in it.
* It is going to override existing environmentVariables.
* @param filename
* @param environmentVariables
* @param filename the .env file to load
* @param environmentVariables the object to load environment variables into
* @param override whether to override existing environment variables
*/

@@ -15,0 +15,0 @@ export declare function loadAndExpandDotEnvFile(filename: string, environmentVariables: NodeJS.ProcessEnv, override?: boolean): import("dotenv-expand").DotenvExpandOutput;

@@ -82,5 +82,5 @@ "use strict";

* This function loads a .env file and expands the variables in it.
* It is going to override existing environmentVariables.
* @param filename
* @param environmentVariables
* @param filename the .env file to load
* @param environmentVariables the object to load environment variables into
* @param override whether to override existing environment variables
*/

@@ -87,0 +87,0 @@ function loadAndExpandDotEnvFile(filename, environmentVariables, override = false) {

@@ -15,2 +15,3 @@ import { TaskHasher } from '../hasher/task-hasher';

private readonly daemon;
private readonly outputStyle;
private cache;

@@ -27,3 +28,3 @@ private forkedProcessTaskRunner;

private bailed;
constructor(hasher: TaskHasher, initiatingProject: string | undefined, projectGraph: ProjectGraph, taskGraph: TaskGraph, options: DefaultTasksRunnerOptions, bail: boolean, daemon: DaemonClient);
constructor(hasher: TaskHasher, initiatingProject: string | undefined, projectGraph: ProjectGraph, taskGraph: TaskGraph, options: DefaultTasksRunnerOptions, bail: boolean, daemon: DaemonClient, outputStyle: string);
run(): Promise<{

@@ -30,0 +31,0 @@ [id: string]: TaskStatus;

@@ -22,3 +22,3 @@ "use strict";

// endregion internal state
constructor(hasher, initiatingProject, projectGraph, taskGraph, options, bail, daemon) {
constructor(hasher, initiatingProject, projectGraph, taskGraph, options, bail, daemon, outputStyle) {
this.hasher = hasher;

@@ -31,2 +31,3 @@ this.initiatingProject = initiatingProject;

this.daemon = daemon;
this.outputStyle = outputStyle;
this.cache = process.env.NX_DB_CACHE === 'true'

@@ -214,3 +215,5 @@ ? new cache_1.DbCache({

const temporaryOutputPath = this.cache.temporaryOutputPath(task);
const streamOutput = (0, utils_1.shouldStreamOutput)(task, this.initiatingProject);
const streamOutput = this.outputStyle === 'static'
? false
: (0, utils_1.shouldStreamOutput)(task, this.initiatingProject);
let env = pipeOutput

@@ -217,0 +220,0 @@ ? (0, task_env_1.getEnvVariablesForTask)(task, taskSpecificEnv, process.env.FORCE_COLOR === undefined

@@ -45,2 +45,5 @@ import { ProjectConfiguration, ProjectMetadata, TargetConfiguration } from '../config/workspace-json-project-json';

resolutions?: Record<string, string>;
pnpm?: {
overrides?: PackageOverride;
};
overrides?: PackageOverride;

@@ -47,0 +50,0 @@ bin?: Record<string, string> | string;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc