Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ng-dev/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {buildPullapproveParser} from './pullapprove/cli.js';
import {buildReleaseParser} from './release/cli.js';
import {tsCircularDependenciesBuilder} from './ts-circular-dependencies/index.js';
import {captureLogOutputForCommand} from './utils/logging.js';
import {ngDevVersionMiddleware} from './utils/version-check.js';
import {localVersion, ngDevVersionMiddleware} from './utils/version-check.js';
import {buildAuthParser} from './auth/cli.js';
import {buildPerfParser} from './perf/cli.js';
import {buildConfigParser} from './config/cli.js';
Expand All @@ -46,6 +46,7 @@ runParserWithCompletedFunctions((yargs: Argv) => {
.command('perf <command>', '', buildPerfParser)
.command('ai <command>', '', buildAiParser)
.command('config <command>', false, buildConfigParser)
.version(localVersion)
.wrap(120)
.strict();
});
20 changes: 10 additions & 10 deletions ng-dev/release/publish/external-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,20 @@ export abstract class ExternalCommands {
spawnOptions: SpawnOptions = {},
): Promise<SpawnResult> {
if (PnpmVersioning.isUsingPnpm(projectDir)) {
return ChildProcess.spawn('npx', ['--yes', 'pnpm', '-s', 'run', ...args], {
...spawnOptions,
cwd: projectDir,
});
} else {
// Note: We cannot use `yarn` directly as command because we might operate in
// a different publish branch and the current `PATH` will point to the Yarn version
// that invoked the release tool. More details in the function description.
const yarnCommand = await resolveYarnScriptForProject(projectDir);
return ChildProcess.spawn(yarnCommand.binary, [...yarnCommand.args, ...args], {
return ChildProcess.spawn('npx', ['--yes', 'pnpm', '-s', ...args], {
...spawnOptions,
cwd: projectDir,
});
}

// Note: We cannot use `yarn` directly as command because we might operate in
// a different publish branch and the current `PATH` will point to the Yarn version
// that invoked the release tool. More details in the function description.
const yarnCommand = await resolveYarnScriptForProject(projectDir);
return ChildProcess.spawn(yarnCommand.binary, [...yarnCommand.args, ...args], {
...spawnOptions,
cwd: projectDir,
});
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ng-dev/utils/version-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {GitClient} from './git/git-client.js';
* The currently executing version of ng-dev
* Note: The placeholder will be replaced by the `pkg_npm` substitutions.
*/
const localVersion = `0.0.0-{SCM_HEAD_SHA}`;
export const localVersion = `0.0.0-{SCM_HEAD_SHA}`;

/** Whether ngDevVersionMiddleware verification has already occured. */
let verified = false;
Expand Down
Loading