-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): undo removal of @nrwl/cli and add warning when it is impor…
…ted (#9370)
- Loading branch information
1 parent
17fe648
commit 74980db
Showing
5 changed files
with
20 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
#!/usr/bin/env node | ||
|
||
import { logger } from 'nx/src/shared/logger'; | ||
import { getPackageManagerCommand } from 'nx/src/shared/package-manager'; | ||
|
||
logger.warn('Please update your global install of Nx'); | ||
logger.warn(`- ${getPackageManagerCommand().addGlobal} nx`); | ||
|
||
require('nx/bin/nx'); |
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
11 changes: 5 additions & 6 deletions
11
...ate-13-9-0/replace-tao-and-cli-with-nx.ts → ...ions/update-13-9-0/replace-tao-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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { Tree, updateJson } from '@nrwl/devkit'; | ||
|
||
export function replaceTaoAndCLIWithNx(host: Tree) { | ||
export function replaceTaoWithNx(host: Tree) { | ||
updateJson(host, 'package.json', (json: any) => { | ||
if (json.dependencies['@nrwl/workspace']) { | ||
json.dependencies['nx'] = json.dependencies['@nrwl/workspace']; | ||
} else if (json.devDependencies['@nrwl/workspace']) { | ||
json.devDependencies['nx'] = json.devDependencies['@nrwl/workspace']; | ||
} | ||
removeTaoAndCLI(json.dependencies); | ||
removeTaoAndCLI(json.devDependencies); | ||
removeTao(json.dependencies); | ||
removeTao(json.devDependencies); | ||
return json; | ||
}); | ||
} | ||
|
||
function removeTaoAndCLI(json: any) { | ||
function removeTao(json: any) { | ||
if (!json) return; | ||
json['@nrwl/tao'] = undefined; | ||
json['@nrwl/cli'] = undefined; | ||
} | ||
|
||
export default replaceTaoAndCLIWithNx; | ||
export default replaceTaoWithNx; |