MaxKless b73f1e0e00
fix(core): set windowsHide: true wherever possible (#28073)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-09-24 11:31:22 -04:00

63 lines
1.7 KiB
JavaScript

#!/usr/bin/env node
/**
* USAGE:
*
* Run the following command from the root of the workspace.
* Replace the versions with the correct target versions
*
* pnpm ts-node scripts/angular-support-upgrades/init-upgrade.ts --angularVersion=next --targetNxVersion=15.5.0 --targetNxMigrationVersion=15.5.0-beta.0
*
*/
import { execSync } from 'child_process';
import { buildMigrations } from './build-migrations';
import { fetchVersionsFromRegistry } from './fetch-versions-from-registry';
import { updatePackageJsonForAngular } from './update-package-jsons';
import { updateVersionUtils } from './update-version-utils';
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const argv = yargs(hideBin(process.argv)).argv;
if (
!argv.angularVersion &&
!argv.targetNxVersion &&
!argv.targetNxMigrationVersion
) {
throw new Error(
'You need to provide --angularVersion=(latest|next) and --targetNxVersion=versionString and --targetNxMigrationVersion=versionString'
);
}
async function run() {
const packageVersionMap = await fetchVersionsFromRegistry(
argv.angularVersion
);
await updatePackageJsonForAngular(packageVersionMap);
await buildMigrations(
packageVersionMap,
argv.targetNxVersion,
argv.targetNxMigrationVersion
);
updateVersionUtils(packageVersionMap);
console.log('⏳ - Installing packages...');
execSync('pnpm install', {
stdio: 'inherit',
encoding: 'utf8',
windowsHide: true,
});
console.log('✅ - Finished installing packages!');
console.log('⏳ - Formatting files...');
execSync('pnpm nx format', {
stdio: 'inherit',
encoding: 'utf8',
windowsHide: true,
});
console.log('✅ - Finished creating migrations!');
}
run();