Skip to content

Commit

Permalink
fix(core): replace @nrwl with @nx in nx core packages
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Apr 17, 2023
1 parent 6428294 commit 1ab8933
Show file tree
Hide file tree
Showing 100 changed files with 366 additions and 337 deletions.
4 changes: 2 additions & 2 deletions packages/create-nx-plugin/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"rules": {
"no-restricted-imports": [
"error",
"@nrwl/workspace",
"@nx/workspace",
"@angular-devkit/core",
"@angular-devkit/architect",
"@angular-devkit/schematics",
"nx",
"@nrwl/devkit"
"@nx/devkit"
]
},
"ignorePatterns": ["!**/*"],
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-plugin/bin/create-nx-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function main(parsedArgs: yargs.Arguments<CreateNxPluginArguments>) {
});

const workspaceInfo = await createWorkspace(
'@nrwl/nx-plugin',
'@nx/nx-plugin',
populatedArguments
);

Expand Down
4 changes: 2 additions & 2 deletions packages/create-nx-workspace/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"rules": {
"no-restricted-imports": [
"error",
"@nrwl/workspace",
"@nx/workspace",
"@angular-devkit/core",
"@angular-devkit/architect",
"@angular-devkit/schematics",
"nx",
"@nrwl/devkit"
"@nx/devkit"
]
},
"ignorePatterns": ["!**/*"],
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/src/create-sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function createSandbox(packageManager: PackageManager) {
JSON.stringify({
dependencies: {
nx: nxVersion,
'@nrwl/workspace': nxVersion,
'@nx/workspace': nxVersion,
},
license: 'MIT',
})
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/src/create-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function createWorkspace<T extends CreateWorkspaceOptions>(

// If the preset is a third-party preset, we need to call createPreset to install it
// For first-party presets, it will created by createEmptyWorkspace instead.
// In createEmptyWorkspace, it will call `nx new` -> `@nrwl/workspace newGenerator` -> `@nrwl/workspace generatePreset`.
// In createEmptyWorkspace, it will call `nx new` -> `@nx/workspace newGenerator` -> `@nx/workspace generatePreset`.
const thirdPartyPreset = await getThirdPartyPreset(preset);
if (thirdPartyPreset) {
await createPreset(thirdPartyPreset, options, packageManager, directory);
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/src/utils/ci/setup-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function setupCI(
try {
const pmc = getPackageManagerCommand(packageManager);
const res = await execAndWait(
`${pmc.exec} nx g @nrwl/workspace:ci-workflow --ci=${ci}`,
`${pmc.exec} nx g @nx/workspace:ci-workflow --ci=${ci}`,
join(process.cwd(), getFileName(name))
);
ciSpinner.succeed('CI workflow has been generated successfully');
Expand Down
4 changes: 2 additions & 2 deletions packages/create-nx-workspace/src/utils/git/default-base.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { execSync } from 'child_process';

/*
* Because we don't want to depend on @nrwl/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nrwl/workspace in this file.
* Because we don't want to depend on @nx/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nx/workspace in this file.
*/
export function deduceDefaultBase(): string {
const nxDefaultBase = 'main';
Expand Down
4 changes: 2 additions & 2 deletions packages/create-nx-workspace/src/utils/output.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Because we don't want to depend on @nrwl/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nrwl/workspace in this file.
* Because we don't want to depend on @nx/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nx/workspace in this file.
*/

import * as chalk from 'chalk';
Expand Down
4 changes: 2 additions & 2 deletions packages/create-nx-workspace/src/utils/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { existsSync, writeFileSync } from 'fs';
import { join } from 'path';

/*
* Because we don't want to depend on @nrwl/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nrwl/workspace in this file.
* Because we don't want to depend on @nx/workspace (to speed up the workspace creation)
* we duplicate the helper functions from @nx/workspace in this file.
*/

export const packageManagerList = ['pnpm', 'yarn', 'npm'] as const;
Expand Down
4 changes: 2 additions & 2 deletions packages/devkit/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"error",
{
"paths": [
"@nrwl/workspace",
"@nx/workspace",
"@angular-devkit/core",
"@angular-devkit/architect",
"@angular-devkit/schematics"
Expand All @@ -17,7 +17,7 @@
"allowTypeImports": true
},
{
"group": ["@nrwl/devkit/**/*"],
"group": ["@nx/devkit/**/*"],
"message": "Use a relative import"
}
]
Expand Down
6 changes: 3 additions & 3 deletions packages/devkit/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Note to developers: STOP! This is the Public API of @nrwl/devkit.
* @nrwl/devkit should be compatible with versions of Nx 1 major version prior.
* This is so that plugins can use the latest @nrwl/devkit while their users may use versions +/- 1 of Nx.
* Note to developers: STOP! This is the Public API of @nx/devkit.
* @nx/devkit should be compatible with versions of Nx 1 major version prior.
* This is so that plugins can use the latest @nx/devkit while their users may use versions +/- 1 of Nx.
*
* 1. Try hard to not add to this API to reduce the surface area we need to maintain.
* 2. Do not add newly created paths from the nx package to this file as they will not be available in older versions of Nx.
Expand Down
Loading

0 comments on commit 1ab8933

Please sign in to comment.