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

feat(repo): replace usages of @nrwl/ with @nx/ in tooling packages #16351

Merged
merged 1 commit into from
Apr 18, 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
14 changes: 7 additions & 7 deletions e2e/linter/src/linter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('Linter', () => {
);
updateFile(newRulePath, updatedRuleContents);

const newRuleNameForUsage = `@nrwl/nx/workspace/${newRuleName}`;
const newRuleNameForUsage = `@nx/nx/workspace/${newRuleName}`;

// Add the new workspace rule to the lint config and run linting
const eslintrc = readJson('.eslintrc.json');
Expand Down Expand Up @@ -199,10 +199,10 @@ describe('Linter', () => {

const eslint = readJson('.eslintrc.json');
eslint.overrides[0].rules[
'@nrwl/nx/enforce-module-boundaries'
'@nx/nx/enforce-module-boundaries'
][1].depConstraints = [
{ sourceTag: 'validtag', onlyDependOnLibsWithTags: ['validtag'] },
...eslint.overrides[0].rules['@nrwl/nx/enforce-module-boundaries'][1]
...eslint.overrides[0].rules['@nx/nx/enforce-module-boundaries'][1]
.depConstraints,
];
updateFile('.eslintrc.json', JSON.stringify(eslint, null, 2));
Expand Down Expand Up @@ -454,8 +454,8 @@ describe('Linter', () => {
const e2eEslint = readJson('e2e/.eslintrc.json');

// should directly refer to nx plugin
expect(rootEslint.plugins).toEqual(['@nrwl/nx']);
expect(e2eEslint.plugins).toEqual(['@nrwl/nx']);
expect(rootEslint.plugins).toEqual(['@nx/nx']);
expect(e2eEslint.plugins).toEqual(['@nx/nx']);
}

function verifySuccessfulMigratedSetup(myapp: string, mylib: string) {
Expand All @@ -476,7 +476,7 @@ describe('Linter', () => {
const libEslint = readJson(`libs/${mylib}/.eslintrc.json`);

// should directly refer to nx plugin
expect(rootEslint.plugins).toEqual(['@nrwl/nx']);
expect(rootEslint.plugins).toEqual(['@nx/nx']);
expect(appEslint.plugins).toBeUndefined();
expect(e2eEslint.plugins).toBeUndefined();
expect(libEslint.plugins).toBeUndefined();
Expand Down Expand Up @@ -541,7 +541,7 @@ describe('Linter', () => {

// should have no plugin extends
expect(appEslint.overrides[0].extends).toEqual([
'plugin:@nrwl/nx/angular',
'plugin:@nx/nx/angular',
'plugin:@angular-eslint/template/process-inline-templates',
]);
expect(e2eEslint.overrides[0].extends).toBeUndefined();
Expand Down
11 changes: 4 additions & 7 deletions e2e/nx-plugin/src/nx-plugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import { ProjectConfiguration } from '@nx/devkit';
import {
checkFilesExist,
cleanupProject,
createFile,
expectTestsPass,
isNotWindows,
getPackageManagerCommand,
killPorts,
newProject,
readJson,
readProjectConfig,
runCLI,
runCLIAsync,
runCommand,
uniq,
updateFile,
createFile,
readFile,
removeFile,
cleanupProject,
runCommand,
getPackageManagerCommand,
updateJson,
} from '@nrwl/e2e/utils';
import type { PackageJson } from 'nx/src/utils/package-json';
Expand Down
6 changes: 3 additions & 3 deletions e2e/workspace-create/src/create-nx-workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('create-nx-workspace', () => {
expectNoAngularDevkit();
expectNoTsJestInJestConfig(appName);
const packageJson = readJson('package.json');
expect(packageJson.devDependencies['@nrwl/webpack']).toBeDefined();
expect(packageJson.devDependencies['@nx/webpack']).toBeDefined();
expectCodeIsFormatted();
});

Expand All @@ -197,8 +197,8 @@ describe('create-nx-workspace', () => {

expectNoAngularDevkit();
const packageJson = readJson('package.json');
expect(packageJson.devDependencies['@nrwl/webpack']).not.toBeDefined();
expect(packageJson.devDependencies['@nrwl/vite']).toBeDefined();
expect(packageJson.devDependencies['@nx/webpack']).not.toBeDefined();
expect(packageJson.devDependencies['@nx/vite']).toBeDefined();
expectCodeIsFormatted();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`addLinting generator should correctly generate the .eslintrc.json file
"overrides": [
{
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates",
],
"files": [
Expand All @@ -38,7 +38,7 @@ exports[`addLinting generator should correctly generate the .eslintrc.json file
},
{
"extends": [
"plugin:@nrwl/nx/angular-template",
"plugin:@nx/nx/angular-template",
],
"files": [
"*.html",
Expand All @@ -60,7 +60,7 @@ exports[`addLinting generator support angular v14 should correctly generate the
"overrides": [
{
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates",
],
"files": [
Expand All @@ -87,7 +87,7 @@ exports[`addLinting generator support angular v14 should correctly generate the
},
{
"extends": [
"plugin:@nrwl/nx/angular-template",
"plugin:@nx/nx/angular-template",
],
"files": [
"*.html",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('addLinting generator', () => {

const project = readProjectConfiguration(tree, appProjectName);
expect(project.targets.lint).toEqual({
executor: '@nrwl/linter:eslint',
executor: '@nx/linter:eslint',
options: {
lintFilePatterns: [
`${appProjectRoot}/**/*.ts`,
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('addLinting generator', () => {

const project = readProjectConfiguration(tree, appProjectName);
expect(project.targets.lint).toEqual({
executor: '@nrwl/linter:eslint',
executor: '@nx/linter:eslint',
options: {
lintFilePatterns: [
`${appProjectRoot}/**/*.ts`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const extendAngularEslintJson = (
files: ['*.ts'],
extends: [
...(json.overrides[0].extends || []),
'plugin:@nrwl/nx/angular',
'plugin:@nx/nx/angular',
'plugin:@angular-eslint/template/process-inline-templates',
],
rules: {
Expand All @@ -42,7 +42,7 @@ export const extendAngularEslintJson = (
},
{
files: ['*.html'],
extends: ['plugin:@nrwl/nx/angular-template'],
extends: ['plugin:@nx/nx/angular-template'],
/**
* Having an empty rules object present makes it more obvious to the user where they would
* extend things from if they needed to
Expand Down Expand Up @@ -75,7 +75,7 @@ export function createEsLintConfiguration(
{
files: ['*.ts'],
extends: [
'plugin:@nrwl/nx/angular',
'plugin:@nx/nx/angular',
'plugin:@angular-eslint/template/process-inline-templates',
],
/**
Expand Down Expand Up @@ -117,7 +117,7 @@ export function createEsLintConfiguration(
},
{
files: ['*.html'],
extends: ['plugin:@nrwl/nx/angular-template'],
extends: ['plugin:@nx/nx/angular-template'],
/**
* Having an empty rules object present makes it more obvious to the user where they would
* extend things from if they needed to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ exports[`app nested should create project configs 1`] = `
},
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-dir/my-app/**/*.ts",
Expand Down Expand Up @@ -499,7 +499,7 @@ exports[`app nested should create project configs 1`] = `
"codeCoverage": true,
},
},
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "apps/my-dir/my-app/jest.config.ts",
"passWithNoTests": true,
Expand Down Expand Up @@ -533,15 +533,15 @@ exports[`app nested should create project configs 2`] = `
"devServerTarget": "my-dir-my-app:serve:production",
},
},
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.config.ts",
"devServerTarget": "my-dir-my-app:serve:development",
"testingType": "e2e",
},
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-dir/my-app-e2e/**/*.{js,ts}",
Expand Down Expand Up @@ -621,7 +621,7 @@ exports[`app not nested should create project configs 1`] = `
},
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-app/**/*.ts",
Expand Down Expand Up @@ -657,7 +657,7 @@ exports[`app not nested should create project configs 1`] = `
"codeCoverage": true,
},
},
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "apps/my-app/jest.config.ts",
"passWithNoTests": true,
Expand Down Expand Up @@ -691,15 +691,15 @@ exports[`app not nested should create project configs 2`] = `
"devServerTarget": "my-app:serve:production",
},
},
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/my-app-e2e/cypress.config.ts",
"devServerTarget": "my-app:serve:development",
"testingType": "e2e",
},
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ describe('app', () => {
expect(readProjectConfiguration(appTree, 'my-app').targets.lint)
.toMatchInlineSnapshot(`
{
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-app/**/*.ts",
Expand All @@ -478,7 +478,7 @@ describe('app', () => {
expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint)
.toMatchInlineSnapshot(`
{
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}",
Expand Down Expand Up @@ -506,7 +506,7 @@ describe('app', () => {
"overrides": [
{
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates",
],
"files": [
Expand All @@ -533,7 +533,7 @@ describe('app', () => {
},
{
"extends": [
"plugin:@nrwl/nx/angular-template",
"plugin:@nx/nx/angular-template",
],
"files": [
"*.html",
Expand Down
Loading