Skip to content

Commit 879d5c9

Browse files
committed
run npm ci before migrating
1 parent 88fcd2d commit 879d5c9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

dist/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -41720,6 +41720,7 @@ const inputs_helper_1 = __nccwpck_require__(6188);
4172041720
const nx_version_1 = __nccwpck_require__(692);
4172141721
const git_1 = __nccwpck_require__(6350);
4172241722
const nx_migrate_1 = __nccwpck_require__(8796);
41723+
const exec_1 = __nccwpck_require__(1514);
4172341724
function run() {
4172441725
return __awaiter(this, void 0, void 0, function* () {
4172541726
try {
@@ -41752,6 +41753,8 @@ function run() {
4175241753
core.debug('Setting up git user, origin and branch...');
4175341754
const origin = `https://x-access-token:${inputs.repoToken}@github.com/${github.context.repo.owner}/${github.context.repo.repo}`;
4175441755
yield (0, git_1.prepareGit)(origin, branchName);
41756+
core.debug('Installing deps...');
41757+
yield (0, exec_1.exec)('npm ci');
4175541758
core.debug('Starting migrations...');
4175641759
yield (0, nx_migrate_1.migrate)(inputs.includeMigrationsFile, inputs.legacyPeerDeps);
4175741760
core.debug('Pushing changes...');

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {getInputs} from './inputs-helper'
44
import {getCurrentNxVersion, getLatestNxVersion} from './nx-version'
55
import {makePRBody, prepareGit, pushChangesToRemote} from './git'
66
import {migrate} from './nx-migrate'
7+
import {exec} from '@actions/exec'
78

89
async function run(): Promise<void> {
910
try {
@@ -55,6 +56,9 @@ async function run(): Promise<void> {
5556
const origin = `https://x-access-token:${inputs.repoToken}@github.com/${github.context.repo.owner}/${github.context.repo.repo}`
5657
await prepareGit(origin, branchName)
5758

59+
core.debug('Installing deps...')
60+
await exec('npm ci')
61+
5862
core.debug('Starting migrations...')
5963
await migrate(inputs.includeMigrationsFile, inputs.legacyPeerDeps)
6064

0 commit comments

Comments
 (0)