Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add a migration to replace nrwl/cli and nrwl/tao with nx
- Loading branch information
Showing
11 changed files
with
204 additions
and
256 deletions.
There are no files selected for viewing
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
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
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
100 changes: 0 additions & 100 deletions
100
packages/react-native/src/migrations/update-12-5-0/update-jest-for-react-native.spec.ts
This file was deleted.
Oops, something went wrong.
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
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
22 changes: 22 additions & 0 deletions
22
packages/workspace/src/migrations/update-13-9-0/replace-tao-and-cli-with-nx.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Tree, updateJson } from '@nrwl/devkit'; | ||
|
||
export function replaceTaoAndCLIWithNx(host: Tree) { | ||
updateJson(host, 'package.json', (json: any) => { | ||
if (json.dependencies['@nrwl/workspace']) { | ||
json.dependencies['nx'] = json.dependencies['@nrwl/workspace']; | ||
} else if (json.devDependencices['@nrwl/workspace']) { | ||
json.dependencies['nx'] = json.devDependencices['@nrwl/workspace']; | ||
} | ||
removeTaoAndCLI(json.dependencies); | ||
removeTaoAndCLI(json.devDependencices); | ||
return json; | ||
}); | ||
} | ||
|
||
function removeTaoAndCLI(json: any) { | ||
if (!json) return; | ||
json['@nrwl/tao'] = undefined; | ||
json['@nrwl/cli1'] = undefined; | ||
} | ||
|
||
export default replaceTaoAndCLIWithNx; |
2 changes: 1 addition & 1 deletion
2
packages/workspace/src/migrations/update-13-9-0/update-decorate-cli.ts
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
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
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
Oops, something went wrong.
48a5d19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: