Skip to content

Commit

Permalink
fix(core): migrate should warn if package does not exist (#23317)
Browse files Browse the repository at this point in the history
<!-- 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` -->

## Current Behavior
Migrations are a noop if the package can't be fetched

## Expected Behavior
There is a warning if the package doesn't exist

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

Fixes #22308
  • Loading branch information
AgentEnder committed May 16, 2024
1 parent 504d048 commit 7a34a46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/nx/src/command-line/migrate/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,10 @@ async function getPackageMigrationsUsingInstall(
}

result = { ...migrations, packageGroup, version: packageJson.version };
} catch (e) {
logger.warn(
`Unable to fetch migrations for ${packageName}@${packageVersion}: ${e.message}`
);
} finally {
await cleanup();
}
Expand Down

0 comments on commit 7a34a46

Please sign in to comment.