-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): improve running migrations for older workspaces #15174
Merged
FrozenPandaz
merged 1 commit into
nrwl:master
from
leosvelperez:core/migrate-support-older-workspaces
Feb 23, 2023
Merged
fix(core): improve running migrations for older workspaces #15174
FrozenPandaz
merged 1 commit into
nrwl:master
from
leosvelperez:core/migrate-support-older-workspaces
Feb 23, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
leosvelperez
requested review from
vsavkin,
FrozenPandaz and
AgentEnder
as code owners
February 22, 2023 15:43
Can we pin to latest 15.6.X instead of the local version? |
AgentEnder
approved these changes
Feb 22, 2023
leosvelperez
force-pushed
the
core/migrate-support-older-workspaces
branch
from
February 23, 2023 18:17
0619cf5
to
b7ef4af
Compare
leosvelperez
changed the title
fix(core): use local installation of nx to run migrations in versions older than 15.7.0
fix(core): improve running migrations for older workspaces
Feb 23, 2023
FrozenPandaz
approved these changes
Feb 23, 2023
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Behavior
Starting on Nx 15.7.0, Nx DevKit generators can only write to
project.json
files. When it comes to migrations, workspaces in older versions that are using the config format v1 and are migrating to a version lower than 15.7.0 have issues with any migration generators written with Nx DevKit and usingupdateProjectConfiguration
. In those cases an error is thrown because theproject.json
file (expected by latest Nx) doesn't exist. This happens because migrations are always run with the latest version of Nx.Workspaces migrating to a version lower than 13.9.0 don't get
@nrwl/tao
version bumped which is a package needed for those versions.Workspaces using an Nx version older than 14.0.0 when migrating to a version higher than 14.0.0 don't get any package update unless the package is explicitly set in the command
nx migrate @nrwl/workspace@<version>
.Expected Behavior
Migrating a workspace to an older version than 15.7.0 should succeed. In those cases, the migrations would be run with the local installation of Nx.
The
@nrwl/tao
package should be updated when migrating to an older version of Nx where that package is required.Migrating running
nx migrate latest
should work regardless of the version, explicitly specifying the package to update Nx should not be required.Related Issue(s)
Fixes #15063
Fixes #15141