Skip to content
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): replace @nrwl with @nx in nx core packages #16344

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/nx-misc/src/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Nx Commands', () => {
expect(listOutput).toContain('NX Installed plugins');

// just check for some, not all
expect(listOutput).toContain('@nrwl/workspace');
expect(listOutput).toContain('@nx/workspace');

// temporarily make it look like this isn't installed
renameSync(
Expand Down
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",
AgentEnder marked this conversation as resolved.
Show resolved Hide resolved
"@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