* Invokes the `ng-dev release set-dist-tag` command in order to set the specified * NPM dist tag for all packages in the checked out branch to the given version. * * Optionally, the NPM dist tag update can be skipped for experimental packages. This * is useful when tagging long-term-supp
(
projectDir: string,
npmDistTag: NpmDistTag,
version: semver.SemVer,
options: {skipExperimentalPackages: boolean} = {skipExperimentalPackages: false},
)
| 51 | * is useful when tagging long-term-support packages within NPM. |
| 52 | */ |
| 53 | static async invokeSetNpmDist( |
| 54 | projectDir: string, |
| 55 | npmDistTag: NpmDistTag, |
| 56 | version: semver.SemVer, |
| 57 | options: {skipExperimentalPackages: boolean} = {skipExperimentalPackages: false}, |
| 58 | ) { |
| 59 | try { |
| 60 | // Note: No progress indicator needed as that is the responsibility of the command. |
| 61 | await this._spawnNpmScript( |
| 62 | [ |
| 63 | 'ng-dev', |
| 64 | 'release', |
| 65 | 'npm-dist-tag', |
| 66 | 'set', |
| 67 | npmDistTag, |
| 68 | version.format(), |
| 69 | `--skip-experimental-packages=${options.skipExperimentalPackages}`, |
| 70 | ], |
| 71 | projectDir, |
| 72 | ); |
| 73 | |
| 74 | Log.info(green(` ✓ Set "${npmDistTag}" NPM dist tag for all packages to v${version}.`)); |
| 75 | } catch (e) { |
| 76 | Log.error(e); |
| 77 | Log.error(` ✘ An error occurred while setting the NPM dist tag for "${npmDistTag}".`); |
| 78 | throw new FatalReleaseActionError(); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Invokes the `ng-dev release npm-dist-tag delete` command in order to delete the |