diff --git a/e2e/linter/src/linter.test.ts b/e2e/linter/src/linter.test.ts index 8c1c2fd7ef56d..9a7a6d224bb4f 100644 --- a/e2e/linter/src/linter.test.ts +++ b/e2e/linter/src/linter.test.ts @@ -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'); @@ -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)); @@ -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) { @@ -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(); @@ -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(); diff --git a/e2e/nx-plugin/src/nx-plugin.test.ts b/e2e/nx-plugin/src/nx-plugin.test.ts index e621745933b42..18aa1e6e4dd6c 100644 --- a/e2e/nx-plugin/src/nx-plugin.test.ts +++ b/e2e/nx-plugin/src/nx-plugin.test.ts @@ -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'; diff --git a/e2e/workspace-create/src/create-nx-workspace.test.ts b/e2e/workspace-create/src/create-nx-workspace.test.ts index cd9a09a3763cc..f4b8cdff742fe 100644 --- a/e2e/workspace-create/src/create-nx-workspace.test.ts +++ b/e2e/workspace-create/src/create-nx-workspace.test.ts @@ -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(); }); @@ -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(); }); diff --git a/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap b/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap index 8813b93d2710c..eef973bd737d7 100644 --- a/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap +++ b/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap @@ -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": [ @@ -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", @@ -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": [ @@ -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", diff --git a/packages/angular/src/generators/add-linting/add-linting.spec.ts b/packages/angular/src/generators/add-linting/add-linting.spec.ts index 811f2f8920d2c..b23fa88464c68 100644 --- a/packages/angular/src/generators/add-linting/add-linting.spec.ts +++ b/packages/angular/src/generators/add-linting/add-linting.spec.ts @@ -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`, @@ -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`, diff --git a/packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts b/packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts index cf8864bebfd80..3c6b352028acf 100644 --- a/packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts +++ b/packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts @@ -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: { @@ -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 @@ -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', ], /** @@ -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 diff --git a/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap index 65f13c9565a24..d3f472878787c 100644 --- a/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap @@ -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", @@ -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, @@ -533,7 +533,7 @@ 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", @@ -541,7 +541,7 @@ exports[`app nested should create project configs 2`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-dir/my-app-e2e/**/*.{js,ts}", @@ -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", @@ -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, @@ -691,7 +691,7 @@ 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", @@ -699,7 +699,7 @@ exports[`app not nested should create project configs 2`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", diff --git a/packages/angular/src/generators/application/application.spec.ts b/packages/angular/src/generators/application/application.spec.ts index c0cc23e9d45a7..7aceaf62ce8df 100644 --- a/packages/angular/src/generators/application/application.spec.ts +++ b/packages/angular/src/generators/application/application.spec.ts @@ -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", @@ -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}", @@ -506,7 +506,7 @@ describe('app', () => { "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -533,7 +533,7 @@ describe('app', () => { }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", diff --git a/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap b/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap index 3405b267f50ff..acbc30ccf437f 100644 --- a/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap +++ b/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap @@ -14,7 +14,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -92,7 +92,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -102,7 +102,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -238,7 +238,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } @@ -255,7 +255,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -287,7 +287,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", @@ -317,7 +317,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -395,7 +395,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -405,7 +405,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -541,7 +541,7 @@ exports[`convert-tslint-to-eslint should not override .eslint config if migratio }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } @@ -554,8 +554,8 @@ exports[`convert-tslint-to-eslint should work for Angular applications 1`] = ` "@angular-eslint/eslint-plugin": "~15.0.0", "@angular-eslint/eslint-plugin-template": "~15.0.0", "@angular-eslint/template-parser": "~15.0.0", - "@nrwl/eslint-plugin-nx": "0.0.1", - "@nrwl/linter": "0.0.1", + "@nx/eslint-plugin-nx": "0.0.1", + "@nx/linter": "0.0.1", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "eslint": "~8.15.0", @@ -575,7 +575,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 2`] = ` "root": "apps/angular-app-1", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/angular-app-1/**/*.ts", @@ -604,7 +604,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 3`] = ` "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -682,7 +682,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -692,7 +692,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -828,7 +828,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 3`] = ` }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } @@ -845,7 +845,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 4`] = ` "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -883,7 +883,7 @@ exports[`convert-tslint-to-eslint should work for Angular applications 4`] = ` }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", @@ -906,8 +906,8 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 1`] = ` "@angular-eslint/eslint-plugin": "~15.0.0", "@angular-eslint/eslint-plugin-template": "~15.0.0", "@angular-eslint/template-parser": "~15.0.0", - "@nrwl/eslint-plugin-nx": "0.0.1", - "@nrwl/linter": "0.0.1", + "@nx/eslint-plugin-nx": "0.0.1", + "@nx/linter": "0.0.1", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "eslint": "~8.15.0", @@ -927,7 +927,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 2`] = ` "root": "libs/angular-lib-1", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/angular-lib-1/**/*.ts", @@ -956,7 +956,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 3`] = ` "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -1034,7 +1034,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -1044,7 +1044,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -1180,7 +1180,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 3`] = ` }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } @@ -1197,7 +1197,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 4`] = ` "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -1229,7 +1229,7 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 4`] = ` }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", diff --git a/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.spec.ts b/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.spec.ts index 5d9a367d4591d..482128a9e797c 100644 --- a/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.spec.ts +++ b/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.spec.ts @@ -321,7 +321,7 @@ describe('convert-tslint-to-eslint', () => { * We will make a change to the eslint config before the next step */ eslintContent.overrides[0].rules[ - '@nrwl/nx/enforce-module-boundaries' + '@nx/nx/enforce-module-boundaries' ][1].enforceBuildableLibDependency = false; writeJson(host, '.eslintrc.json', eslintContent); diff --git a/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts b/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts index 6b35a05bc7d22..b99de223cc275 100644 --- a/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts +++ b/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts @@ -94,7 +94,7 @@ describe('Cypress Component Testing Configuration', () => { expect( readProjectConfiguration(tree, 'fancy-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/fancy-lib/cypress.config.ts', devServerTarget: 'fancy-app:build', @@ -156,7 +156,7 @@ describe('Cypress Component Testing Configuration', () => { expect( readProjectConfiguration(tree, 'fancy-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/fancy-lib/cypress.config.ts', devServerTarget: 'fancy-app:build:development', @@ -249,7 +249,7 @@ describe('Cypress Component Testing Configuration', () => { expect( readProjectConfiguration(tree, 'fancy-app').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'apps/fancy-app/cypress.config.ts', devServerTarget: 'fancy-app:build', @@ -309,7 +309,7 @@ describe('Cypress Component Testing Configuration', () => { expect( readProjectConfiguration(tree, 'fancy-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/fancy-lib/cypress.config.ts', devServerTarget: 'fancy-app:build', diff --git a/packages/angular/src/generators/init/init.spec.ts b/packages/angular/src/generators/init/init.spec.ts index b164f2d04f327..d9dce57f5260f 100644 --- a/packages/angular/src/generators/init/init.spec.ts +++ b/packages/angular/src/generators/init/init.spec.ts @@ -130,7 +130,7 @@ describe('init', () => { const { devDependencies } = readJson(tree, 'package.json'); // ASSERT - expect(devDependencies['@nrwl/jest']).toBeDefined(); + expect(devDependencies['@nx/jest']).toBeDefined(); expect(devDependencies['jest']).toBeDefined(); expect(devDependencies['jest-preset-angular']).toBeDefined(); }); @@ -184,7 +184,7 @@ describe('init', () => { const { devDependencies } = readJson(tree, 'package.json'); // ASSERT - expect(devDependencies['@nrwl/cypress']).toBeDefined(); + expect(devDependencies['@nx/cypress']).toBeDefined(); expect(devDependencies['cypress']).toBeDefined(); }); @@ -482,7 +482,7 @@ bar const { devDependencies } = readJson(tree, 'package.json'); // ASSERT - expect(devDependencies['@nrwl/jest']).toBeDefined(); + expect(devDependencies['@nx/jest']).toBeDefined(); expect(devDependencies['jest']).toBeDefined(); expect(devDependencies['jest-preset-angular']).toEqual( backwardCompatibleVersions.angularV14.jestPresetAngularVersion @@ -538,7 +538,7 @@ bar const { devDependencies } = readJson(tree, 'package.json'); // ASSERT - expect(devDependencies['@nrwl/cypress']).toBeDefined(); + expect(devDependencies['@nx/cypress']).toBeDefined(); expect(devDependencies['cypress']).toBeDefined(); }); diff --git a/packages/angular/src/generators/library/library.spec.ts b/packages/angular/src/generators/library/library.spec.ts index 8194ebd831b61..de8a53dfdb93b 100644 --- a/packages/angular/src/generators/library/library.spec.ts +++ b/packages/angular/src/generators/library/library.spec.ts @@ -1108,7 +1108,7 @@ describe('lib', () => { expect(readProjectConfiguration(tree, 'my-lib').targets['lint']) .toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/my-lib/**/*.ts", @@ -1140,7 +1140,7 @@ describe('lib', () => { "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -1167,7 +1167,7 @@ describe('lib', () => { }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", diff --git a/packages/angular/src/generators/ng-add/migrators/projects/__snapshots__/e2e.migrator.spec.ts.snap b/packages/angular/src/generators/ng-add/migrators/projects/__snapshots__/e2e.migrator.spec.ts.snap index 97c514c3b320c..0271e05c55914 100644 --- a/packages/angular/src/generators/ng-add/migrators/projects/__snapshots__/e2e.migrator.spec.ts.snap +++ b/packages/angular/src/generators/ng-add/migrators/projects/__snapshots__/e2e.migrator.spec.ts.snap @@ -15,11 +15,12 @@ export default defineConfig({ exports[`e2e migrator cypress with project root at "" cypress version >=10 should create a cypress.config.ts file when it does not exist 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname) -});" +}); +" `; exports[`e2e migrator cypress with project root at "" cypress version >=10 should keep paths in the e2e config when they differ from the nx preset defaults 1`] = ` @@ -90,11 +91,12 @@ export default defineConfig({ exports[`e2e migrator cypress with project root at "projects/app1" cypress version >=10 should create a cypress.config.ts file when it does not exist 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname) -});" +}); +" `; exports[`e2e migrator cypress with project root at "projects/app1" cypress version >=10 should keep paths in the e2e config when they differ from the nx preset defaults 1`] = ` diff --git a/packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts b/packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts index 413a2bc9841a9..db64e47b958f1 100644 --- a/packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts +++ b/packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts @@ -30,7 +30,10 @@ export function addCypressOnErrorWorkaround(tree: Tree, schema: Schema) { return; } - if (e2eProject.targets.e2e.executor !== '@nrwl/cypress:cypress') { + if ( + e2eProject.targets.e2e.executor !== '@nx/cypress:cypress' && + e2eProject.targets.e2e.executor !== '@nrwl/cypress:cypress' + ) { // Not a cypress e2e project, skip return; } diff --git a/packages/angular/src/migrations/update-15-9-0/update-testing-tsconfig.spec.ts b/packages/angular/src/migrations/update-15-9-0/update-testing-tsconfig.spec.ts index 7f11ed3a1d9f0..f80c1f01fba5a 100644 --- a/packages/angular/src/migrations/update-15-9-0/update-testing-tsconfig.spec.ts +++ b/packages/angular/src/migrations/update-15-9-0/update-testing-tsconfig.spec.ts @@ -4,6 +4,7 @@ import { readProjectConfiguration, Tree, updateJson, + updateProjectConfiguration, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from 'nx/src/devkit-testing-exports'; import { @@ -75,6 +76,18 @@ async function setup(tree: Tree, name: string) { skipPackageJson: true, }); + const projectConfig = readProjectConfiguration(tree, name); + updateProjectConfiguration(tree, name, { + ...projectConfig, + targets: { + ...projectConfig.targets, + test: { + ...projectConfig.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); + updateJson(tree, `${name}/tsconfig.spec.json`, (json) => { // revert to before jest-preset-angular v13 delete json.compilerOptions.target; @@ -85,6 +98,18 @@ async function setup(tree: Tree, name: string) { name: `${name}-lib`, }); + const libConfig = readProjectConfiguration(tree, `${name}-lib`); + updateProjectConfiguration(tree, `${name}-lib`, { + ...libConfig, + targets: { + ...libConfig.targets, + test: { + ...libConfig.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); + updateJson(tree, `${name}/tsconfig.spec.json`, (json) => { // revert to before jest-preset-angular v13 delete json.compilerOptions.target; diff --git a/packages/cypress/.eslintrc.json b/packages/cypress/.eslintrc.json index 6c7a3539d988a..656f32bca812c 100644 --- a/packages/cypress/.eslintrc.json +++ b/packages/cypress/.eslintrc.json @@ -10,7 +10,7 @@ "files": ["**/*.ts"], "excludedFiles": ["./src/migrations/**"], "rules": { - "no-restricted-imports": ["error", "@nrwl/workspace"] + "no-restricted-imports": ["error", "@nx/workspace"] } }, { diff --git a/packages/cypress/src/executors/cypress/cypress.impl.spec.ts b/packages/cypress/src/executors/cypress/cypress.impl.spec.ts index 43c08ff42d610..2b409c4ffeeaf 100644 --- a/packages/cypress/src/executors/cypress/cypress.impl.spec.ts +++ b/packages/cypress/src/executors/cypress/cypress.impl.spec.ts @@ -37,7 +37,7 @@ describe('Cypress builder', () => { projects: { 'my-app': { targets: { - serve: { executor: '@nrwl/webpack:webpack', options: {} }, + serve: { executor: '@nx/webpack:webpack', options: {} }, }, }, }, diff --git a/packages/cypress/src/executors/cypress/cypress.impl.ts b/packages/cypress/src/executors/cypress/cypress.impl.ts index 31dcb29bab87f..448288cb7bdaf 100644 --- a/packages/cypress/src/executors/cypress/cypress.impl.ts +++ b/packages/cypress/src/executors/cypress/cypress.impl.ts @@ -417,7 +417,7 @@ ${e.message || e}`); let targetHasOpt = Object.keys(targetOpts).includes(property); if (!targetHasOpt) { - // NOTE: readTargetOptions doesn't apply non defaulted values, i.e. @nrwl/vite has a port options but is optional + // NOTE: readTargetOptions doesn't apply non defaulted values, i.e. @nx/vite has a port options but is optional // so we double check the schema if readTargetOptions didn't return a value for the property const projectConfig = context.projectsConfigurations?.projects?.[target.project]; diff --git a/packages/cypress/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap b/packages/cypress/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap index a83eda701a7b5..ac7eddee60532 100644 --- a/packages/cypress/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap +++ b/packages/cypress/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap @@ -4,8 +4,8 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 1`] = ` { "dependencies": {}, "devDependencies": { - "@nrwl/eslint-plugin-nx": "0.0.1", - "@nrwl/linter": "0.0.1", + "@nx/eslint-plugin-nx": "0.0.1", + "@nx/linter": "0.0.1", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "eslint": "~8.15.0", @@ -25,7 +25,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 2`] = ` "root": "apps/e2e-app-1", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/e2e-app-1/**/*.{js,ts}", @@ -53,7 +53,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = ` "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -131,7 +131,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -141,7 +141,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -238,7 +238,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = ` }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } diff --git a/packages/cypress/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts b/packages/cypress/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts index 27d890165874b..f5ba2bd29e427 100755 --- a/packages/cypress/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts +++ b/packages/cypress/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts @@ -21,8 +21,8 @@ export async function conversionGenerator( * to perform in order to convert a project from TSLint to ESLint, as well as some * extensibility points for adjusting the behavior on a per package basis. * - * E.g. @nrwl/angular projects might need to make different changes to the final - * ESLint config when compared with @nrwl/next projects. + * E.g. @nx/angular projects might need to make different changes to the final + * ESLint config when compared with @nx/next projects. * * See the ProjectConverter implementation for a full breakdown of what it does. */ @@ -85,7 +85,7 @@ export async function conversionGenerator( /** * Store user preferences for the collection */ - projectConverter.setDefaults('@nrwl/cypress', defaults); + projectConverter.setDefaults('@nx/cypress', defaults); /** * Based on user preference and remaining usage, remove TSLint from the workspace entirely. diff --git a/packages/cypress/src/generators/cypress-component-project/__snapshots__/cypress-component-project.spec.ts.snap b/packages/cypress/src/generators/cypress-component-project/__snapshots__/cypress-component-project.spec.ts.snap index 61e27319a08e6..5e2a782e1a0b2 100644 --- a/packages/cypress/src/generators/cypress-component-project/__snapshots__/cypress-component-project.spec.ts.snap +++ b/packages/cypress/src/generators/cypress-component-project/__snapshots__/cypress-component-project.spec.ts.snap @@ -2,7 +2,7 @@ exports[`Cypress Component Project should add base cypress component testing config 1`] = ` { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "libs/cool-lib/cypress.config.ts", "testingType": "component", @@ -12,7 +12,7 @@ exports[`Cypress Component Project should add base cypress component testing con exports[`Cypress Component Project should not error when rerunning on an existing project 1`] = ` { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "libs/cool-lib/cypress.config.ts", "testingType": "component", diff --git a/packages/cypress/src/generators/cypress-component-project/cypress-component-project.spec.ts b/packages/cypress/src/generators/cypress-component-project/cypress-component-project.spec.ts index 34fd68dabae54..37542bf2019a0 100644 --- a/packages/cypress/src/generators/cypress-component-project/cypress-component-project.spec.ts +++ b/packages/cypress/src/generators/cypress-component-project/cypress-component-project.spec.ts @@ -18,13 +18,13 @@ let projectConfig: ProjectConfiguration = { root: 'libs/cool-lib', targets: { build: { - executor: '@nrwl/web:rollup', + executor: '@nx/web:rollup', options: { tsConfig: 'libs/cool-lib/tsconfig.lib.json', }, }, test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'libs/cool-lib/jest.config.js', }, @@ -181,7 +181,7 @@ describe('Cypress Component Project', () => { tree.write('libs/cool-lib/cypress.config.ts', ''); const newTarget = { ['component-test']: { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/cool-lib/cypress.config.ts', testingType: 'component', diff --git a/packages/cypress/src/generators/cypress-component-project/cypress-component-project.ts b/packages/cypress/src/generators/cypress-component-project/cypress-component-project.ts index c29ef359fdfd3..6eb177ac2f03b 100644 --- a/packages/cypress/src/generators/cypress-component-project/cypress-component-project.ts +++ b/packages/cypress/src/generators/cypress-component-project/cypress-component-project.ts @@ -89,7 +89,7 @@ function addTargetToProject( options: CypressComponentProjectSchema ) { projectConfig.targets['component-test'] = { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: joinPathFragments(projectConfig.root, 'cypress.config.ts'), testingType: 'component', diff --git a/packages/cypress/src/generators/cypress-e2e-configuration/__snapshots__/cypress-e2e-configuration.spec.ts.snap b/packages/cypress/src/generators/cypress-e2e-configuration/__snapshots__/cypress-e2e-configuration.spec.ts.snap index f0280cdf117c0..8cc06861de313 100644 --- a/packages/cypress/src/generators/cypress-e2e-configuration/__snapshots__/cypress-e2e-configuration.spec.ts.snap +++ b/packages/cypress/src/generators/cypress-e2e-configuration/__snapshots__/cypress-e2e-configuration.spec.ts.snap @@ -12,7 +12,7 @@ exports[`Cypress e2e configuration v10+ should not override eslint settings if p "overrides": [ { "extends": [ - "plugin:@nrwl/nx/angular", + "plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], "files": [ @@ -39,7 +39,7 @@ exports[`Cypress e2e configuration v10+ should not override eslint settings if p }, { "extends": [ - "plugin:@nrwl/nx/angular-template", + "plugin:@nx/nx/angular-template", ], "files": [ "*.html", diff --git a/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.spec.ts b/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.spec.ts index 8b991ff3a1990..e5c5036dc2d72 100644 --- a/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.spec.ts +++ b/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.spec.ts @@ -40,7 +40,7 @@ describe('Cypress e2e configuration', () => { expect(tree.read('apps/my-app/cypress.config.ts', 'utf-8')) .toMatchInlineSnapshot(` "import { defineConfig } from 'cypress'; - import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; + import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname, { @@ -57,7 +57,7 @@ describe('Cypress e2e configuration', () => { "devServerTarget": "my-app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/my-app/cypress.config.ts", "devServerTarget": "my-app:serve", @@ -100,7 +100,7 @@ describe('Cypress e2e configuration', () => { expect(tree.read('libs/my-lib/cypress.config.ts', 'utf-8')) .toMatchInlineSnapshot(` "import { defineConfig } from 'cypress'; - import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; + import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname, { @@ -248,13 +248,13 @@ describe('Cypress e2e configuration', () => { ], }, extends: [ - 'plugin:@nrwl/nx/angular', + 'plugin:@nx/nx/angular', 'plugin:@angular-eslint/template/process-inline-templates', ], }, { files: ['*.html'], - extends: ['plugin:@nrwl/nx/angular-template'], + extends: ['plugin:@nx/nx/angular-template'], rules: {}, }, ], diff --git a/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.ts b/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.ts index 83c03bdc1bc5e..aee55a990d5f1 100644 --- a/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.ts +++ b/packages/cypress/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.ts @@ -174,7 +174,7 @@ function addTarget(tree: Tree, opts: NormalizedSchema) { const projectConfig = readProjectConfiguration(tree, opts.project); const cyVersion = installedCypressVersion(); projectConfig.targets.e2e = { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: joinPathFragments( projectConfig.root, diff --git a/packages/cypress/src/generators/cypress-e2e-configuration/files/v10/cypress.config.ts__tmpl__ b/packages/cypress/src/generators/cypress-e2e-configuration/files/v10/cypress.config.ts__tmpl__ index d33c468d6aa93..bf62aa25cd6c8 100644 --- a/packages/cypress/src/generators/cypress-e2e-configuration/files/v10/cypress.config.ts__tmpl__ +++ b/packages/cypress/src/generators/cypress-e2e-configuration/files/v10/cypress.config.ts__tmpl__ @@ -1,5 +1,5 @@ import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname, { diff --git a/packages/cypress/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap b/packages/cypress/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap index c2c8aae9ce653..0cd5b20d0218e 100644 --- a/packages/cypress/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap +++ b/packages/cypress/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap @@ -40,7 +40,7 @@ exports[`Cypress Project < v7 nested should update configuration 1`] = ` "devServerTarget": "my-dir-my-app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/my-dir/my-app-e2e/cypress.json", "devServerTarget": "my-dir-my-app:serve", @@ -49,7 +49,7 @@ exports[`Cypress Project < v7 nested should update configuration 1`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-dir/my-app-e2e/**/*.{js,ts}", @@ -86,7 +86,7 @@ exports[`Cypress Project < v7 project with directory in its name should update c "devServerTarget": "my-dir-my-app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/my-dir/my-app-e2e/cypress.json", "devServerTarget": "my-dir-my-app:serve", @@ -95,7 +95,7 @@ exports[`Cypress Project < v7 project with directory in its name should update c }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-dir/my-app-e2e/**/*.{js,ts}", @@ -111,7 +111,7 @@ exports[`Cypress Project < v7 project with directory in its name should update c exports[`Cypress Project < v7 should update configuration (baseUrl) 1`] = ` { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "baseUrl": "http://localhost:3000", "cypressConfig": "apps/my-app-e2e/cypress.json", @@ -120,7 +120,7 @@ exports[`Cypress Project < v7 should update configuration (baseUrl) 1`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", @@ -141,7 +141,7 @@ exports[`Cypress Project < v7 should update configuration 1`] = ` "devServerTarget": "my-app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/my-app-e2e/cypress.json", "devServerTarget": "my-app:serve", @@ -150,7 +150,7 @@ exports[`Cypress Project < v7 should update configuration 1`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", @@ -171,7 +171,7 @@ exports[`Cypress Project < v7 should update configuration 2`] = ` "devServerTarget": "my-app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/my-app-e2e/cypress.json", "devServerTarget": "my-app:serve:development", @@ -180,7 +180,7 @@ exports[`Cypress Project < v7 should update configuration 2`] = ` }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", @@ -195,7 +195,7 @@ exports[`Cypress Project < v7 should update configuration 2`] = ` exports[`Cypress Project > v10 for bundler:vite should pass the bundler info to nxE2EPreset in \`cypress.config.ts\` 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname, { @@ -207,7 +207,7 @@ export default defineConfig({ exports[`Cypress Project > v10 nested should set right path names in \`cypress.config.ts\` 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname), @@ -237,7 +237,7 @@ exports[`Cypress Project > v10 nested should set right path names in \`tsconfig. exports[`Cypress Project > v10 should set right path names in \`cypress.config.ts\` 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ e2e: nxE2EPreset(__dirname), @@ -267,7 +267,7 @@ exports[`Cypress Project > v10 should set right path names in \`tsconfig.e2e.jso exports[`Cypress Project > v10 should update configuration when eslint is passed 1`] = ` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", diff --git a/packages/cypress/src/generators/cypress-project/cypress-project.ts b/packages/cypress/src/generators/cypress-project/cypress-project.ts index 4e07018872fc0..0f2c4ca8a5bb4 100644 --- a/packages/cypress/src/generators/cypress-project/cypress-project.ts +++ b/packages/cypress/src/generators/cypress-project/cypress-project.ts @@ -96,7 +96,7 @@ function addProject(tree: Tree, options: CypressProjectSchema) { projectType: 'application', targets: { e2e: { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: joinPathFragments( options.projectRoot, @@ -129,7 +129,7 @@ function addProject(tree: Tree, options: CypressProjectSchema) { projectType: 'application', targets: { e2e: { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: joinPathFragments( options.projectRoot, diff --git a/packages/cypress/src/generators/cypress-project/files/v10-and-after/cypress.config.ts__tmpl__ b/packages/cypress/src/generators/cypress-project/files/v10-and-after/cypress.config.ts__tmpl__ index cc3910ec5ca2a..89e7991fbb55d 100644 --- a/packages/cypress/src/generators/cypress-project/files/v10-and-after/cypress.config.ts__tmpl__ +++ b/packages/cypress/src/generators/cypress-project/files/v10-and-after/cypress.config.ts__tmpl__ @@ -1,10 +1,10 @@ import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; export default defineConfig({ - e2e: nxE2EPreset(__dirname<% if (bundler === 'vite'){ %>, + e2e: nxE2EPreset(__dirname<% if (bundler === 'vite'){ %>, { bundler: 'vite' } <% } %>) -}); \ No newline at end of file +}); diff --git a/packages/cypress/src/generators/init/init.spec.ts b/packages/cypress/src/generators/init/init.spec.ts index 416266fad3392..831a81a8a6837 100644 --- a/packages/cypress/src/generators/init/init.spec.ts +++ b/packages/cypress/src/generators/init/init.spec.ts @@ -15,7 +15,7 @@ describe('init', () => { const existing = 'existing'; const existingVersion = '1.0.0'; updateJson(tree, 'package.json', (json) => { - json.dependencies['@nrwl/cypress'] = cypressVersion; + json.dependencies['@nx/cypress'] = cypressVersion; json.dependencies[existing] = existingVersion; json.devDependencies[existing] = existingVersion; @@ -25,10 +25,10 @@ describe('init', () => { const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies.cypress).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/cypress']).toBeDefined(); + expect(packageJson.devDependencies['@nx/cypress']).toBeDefined(); expect(packageJson.devDependencies['@types/node']).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); - expect(packageJson.dependencies['@nrwl/cypress']).toBeUndefined(); + expect(packageJson.dependencies['@nx/cypress']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); }); diff --git a/packages/cypress/src/generators/init/init.ts b/packages/cypress/src/generators/init/init.ts index 969c2625e08f5..20d1a7dbeebd2 100644 --- a/packages/cypress/src/generators/init/init.ts +++ b/packages/cypress/src/generators/init/init.ts @@ -37,13 +37,13 @@ function setupE2ETargetDefaults(tree: Tree) { } function updateDependencies(tree: Tree) { - removeDependenciesFromPackageJson(tree, ['@nrwl/cypress'], []); + removeDependenciesFromPackageJson(tree, ['@nx/cypress'], []); return addDependenciesToPackageJson( tree, {}, { - ['@nrwl/cypress']: nxVersion, + ['@nx/cypress']: nxVersion, cypress: cypressVersion, '@types/node': typesNodeVersion, } diff --git a/packages/cypress/src/generators/migrate-to-cypress-11/__snapshots__/migrate-to-cypress-11.spec.ts.snap b/packages/cypress/src/generators/migrate-to-cypress-11/__snapshots__/migrate-to-cypress-11.spec.ts.snap index fd0b1ce5015e6..56beaca1d1b01 100644 --- a/packages/cypress/src/generators/migrate-to-cypress-11/__snapshots__/migrate-to-cypress-11.spec.ts.snap +++ b/packages/cypress/src/generators/migrate-to-cypress-11/__snapshots__/migrate-to-cypress-11.spec.ts.snap @@ -2,7 +2,7 @@ exports[`convertToCypressTen convertCypressProject should handle custom target names 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -25,7 +25,7 @@ export default defineConfig({ exports[`convertToCypressTen convertCypressProject should handle multiple configurations 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -56,7 +56,7 @@ exports[`convertToCypressTen convertCypressProject should handle multiple config "baseUrl": "http://localhost:3000", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/app-e2e/cypress.config.ts", "devServerTarget": "app:serve", @@ -67,7 +67,7 @@ exports[`convertToCypressTen convertCypressProject should handle multiple config exports[`convertToCypressTen convertCypressProject should handle multiple configurations with no default cypressConfig option 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -100,7 +100,7 @@ exports[`convertToCypressTen convertCypressProject should handle multiple config "cypressConfig": "apps/app-e2e/cypress.config.ts", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "baseUrl": "http://localhost:4200", "testingType": "e2e", @@ -110,7 +110,7 @@ exports[`convertToCypressTen convertCypressProject should handle multiple config exports[`convertToCypressTen convertCypressProject should handle sharing the same config across projects 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -131,7 +131,7 @@ export default defineConfig({ exports[`convertToCypressTen convertCypressProject should infer targets with --all flag 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -160,7 +160,7 @@ exports[`convertToCypressTen convertCypressProject should infer targets with --a "devServerTarget": "app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/app-e2e/cypress.config.ts", "devServerTarget": "app:serve", @@ -173,7 +173,7 @@ exports[`convertToCypressTen convertCypressProject should infer targets with --a "devServerTarget": "app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/app-e2e/cypress.config.ts", "devServerTarget": "app:serve", @@ -181,7 +181,7 @@ exports[`convertToCypressTen convertCypressProject should infer targets with --a }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/app-e2e/**/*.{js,ts}", @@ -196,7 +196,7 @@ exports[`convertToCypressTen convertCypressProject should infer targets with --a exports[`convertToCypressTen convertCypressProject should not break when an invalid target is passed in 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', @@ -225,7 +225,7 @@ exports[`convertToCypressTen convertCypressProject should not break when an inva "devServerTarget": "app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/app-e2e/cypress.config.ts", "devServerTarget": "app:serve", @@ -238,7 +238,7 @@ exports[`convertToCypressTen convertCypressProject should not break when an inva "devServerTarget": "app:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/app-e2e/cypress.config.ts", "devServerTarget": "app:serve", @@ -246,7 +246,7 @@ exports[`convertToCypressTen convertCypressProject should not break when an inva }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/app-e2e/**/*.{js,ts}", @@ -261,7 +261,7 @@ exports[`convertToCypressTen convertCypressProject should not break when an inva exports[`convertToCypressTen convertCypressProject should update project w/customized config 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; import setupNodeEvents from './src/plugins/index'; const cypressJsonConfig = { @@ -287,7 +287,7 @@ export default defineConfig({ exports[`convertToCypressTen convertCypressProject should update project w/defaults 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; const cypressJsonConfig = { fileServerFolder: '.', diff --git a/packages/cypress/src/generators/migrate-to-cypress-11/conversion.util.ts b/packages/cypress/src/generators/migrate-to-cypress-11/conversion.util.ts index 569660aaa7b7a..9cc33f21ded14 100644 --- a/packages/cypress/src/generators/migrate-to-cypress-11/conversion.util.ts +++ b/packages/cypress/src/generators/migrate-to-cypress-11/conversion.util.ts @@ -324,7 +324,7 @@ export function writeNewConfig( cypressConfigPathTs, stripIndents` import { defineConfig } from 'cypress' -import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'; +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; ${pluginImport} const cypressJsonConfig = ${convertedConfig} diff --git a/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.spec.ts b/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.spec.ts index 6898ce6ed138a..23c512673df68 100644 --- a/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.spec.ts +++ b/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.spec.ts @@ -42,7 +42,7 @@ describe('convertToCypressTen', () => { sourceRoot: 'apps/app/src', targets: { serve: { - executor: '@nrwl/web:file-server', + executor: '@nx/web:file-server', options: {}, }, }, @@ -255,7 +255,7 @@ describe('convertToCypressTen', () => { pc.targets = { ...pc.targets, e2e: { - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { baseUrl: 'http://localhost:4200', }, @@ -300,7 +300,7 @@ describe('convertToCypressTen', () => { sourceRoot: 'apps/app-two/src', targets: { serve: { - executor: '@nrwl/web:file-server', + executor: '@nx/web:file-server', options: {}, }, }, @@ -341,7 +341,7 @@ describe('convertToCypressTen', () => { expect(tree.exists('apps/app-e2e/src/e2e/app.cy.ts')).toBeTruthy(); expect(tree.exists('apps/app-e2e/src/support/e2e.ts')).toBeTruthy(); expect(readProjectConfiguration(tree, 'app-e2e').targets['e2e']).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'cypress.config.ts', devServerTarget: 'app:serve', @@ -363,7 +363,7 @@ describe('convertToCypressTen', () => { expect( readProjectConfiguration(tree, 'app-two-e2e').targets['e2e'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'cypress.config.ts', devServerTarget: 'app-two:serve', diff --git a/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.ts b/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.ts index db5374c55c210..a7bc084348d84 100644 --- a/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.ts +++ b/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.ts @@ -7,6 +7,7 @@ import { installPackagesTask, joinPathFragments, logger, + ProjectConfiguration, readProjectConfiguration, stripIndents, Tree, @@ -24,6 +25,98 @@ import { writeNewConfig, } from './conversion.util'; +function migrateCypressExecutorOptions( + tree: Tree, + projectName: string, + target: string, + configuration: string, + previousCypressConfigs: Map< + string, + ReturnType< + ( + tree: Tree, + projectConfig: ProjectConfiguration, + cypressConfigPathJson: string + ) => { + cypressConfigTs: Record; + cypressConfigJson: Record; + } + > + > +) { + try { + const projectConfig = readProjectConfiguration(tree, projectName); + + const { cypressConfigPathJson, cypressConfigPathTs } = findCypressConfigs( + tree, + projectConfig, + target, + configuration + ); + + if (!cypressConfigPathJson && !cypressConfigPathTs) { + return; + } + // a matching cypress ts file hasn't been made yet. need to migrate. + if ( + tree.exists(cypressConfigPathJson) && + !tree.exists(cypressConfigPathTs) + ) { + let cypressConfigs = createNewCypressConfig( + tree, + projectConfig, + cypressConfigPathJson + ); + cypressConfigs = updatePluginFile(tree, projectConfig, cypressConfigs); + writeNewConfig(tree, cypressConfigPathTs, cypressConfigs); + + previousCypressConfigs.set(cypressConfigPathJson, cypressConfigs); + tree.delete(cypressConfigPathJson); + } + // ts file has been made and matching json file has been removed only need to update the project config + if ( + !tree.exists(cypressConfigPathJson) && + tree.exists(cypressConfigPathTs) + ) { + const cypressConfigs = previousCypressConfigs.get(cypressConfigPathJson); + + updateProjectPaths(tree, projectConfig, cypressConfigs); + addConfigToTsConfig( + tree, + (configuration + ? projectConfig.targets?.[target]?.configurations?.[configuration] + ?.tsConfig + : projectConfig.targets?.[target]?.options?.tsConfig) || + joinPathFragments(projectConfig.root, 'tsconfig.json'), + cypressConfigPathTs + ); + + if (configuration) { + projectConfig.targets[target].configurations[configuration] = { + ...projectConfig.targets[target].configurations[configuration], + cypressConfig: cypressConfigPathTs, + }; + } else { + projectConfig.targets[target].options = { + ...projectConfig.targets[target].options, + cypressConfig: cypressConfigPathTs, + }; + } + + projectConfig.targets[target].options.testingType = 'e2e'; + + updateProjectConfiguration(tree, projectName, projectConfig); + } + } catch (e) { + logger.error(stripIndents` +NX There was an error converting ${projectName}:${target}. +You can manually update the project by following the migration guide if need be. +https://nx.dev/cypress/v10-migration-guide + `); + throw e; + } +} + export async function migrateCypressProject(tree: Tree) { assertMinimumCypressVersion(8); if (installedCypressVersion() >= 10) { @@ -40,81 +133,29 @@ export async function migrateCypressProject(tree: Tree) { forEachExecutorOptions( tree, - '@nrwl/cypress:cypress', + '@nx/cypress:cypress', (currentValue, projectName, target, configuration) => { - try { - const projectConfig = readProjectConfiguration(tree, projectName); - - const { cypressConfigPathJson, cypressConfigPathTs } = - findCypressConfigs(tree, projectConfig, target, configuration); - - if (!cypressConfigPathJson && !cypressConfigPathTs) { - return; - } - // a matching cypress ts file hasn't been made yet. need to migrate. - if ( - tree.exists(cypressConfigPathJson) && - !tree.exists(cypressConfigPathTs) - ) { - let cypressConfigs = createNewCypressConfig( - tree, - projectConfig, - cypressConfigPathJson - ); - cypressConfigs = updatePluginFile( - tree, - projectConfig, - cypressConfigs - ); - writeNewConfig(tree, cypressConfigPathTs, cypressConfigs); - - previousCypressConfigs.set(cypressConfigPathJson, cypressConfigs); - tree.delete(cypressConfigPathJson); - } - // ts file has been made and matching json file has been removed only need to update the project config - if ( - !tree.exists(cypressConfigPathJson) && - tree.exists(cypressConfigPathTs) - ) { - const cypressConfigs = previousCypressConfigs.get( - cypressConfigPathJson - ); - - updateProjectPaths(tree, projectConfig, cypressConfigs); - addConfigToTsConfig( - tree, - (configuration - ? projectConfig.targets?.[target]?.configurations?.[configuration] - ?.tsConfig - : projectConfig.targets?.[target]?.options?.tsConfig) || - joinPathFragments(projectConfig.root, 'tsconfig.json'), - cypressConfigPathTs - ); - - if (configuration) { - projectConfig.targets[target].configurations[configuration] = { - ...projectConfig.targets[target].configurations[configuration], - cypressConfig: cypressConfigPathTs, - }; - } else { - projectConfig.targets[target].options = { - ...projectConfig.targets[target].options, - cypressConfig: cypressConfigPathTs, - }; - } - - projectConfig.targets[target].options.testingType = 'e2e'; + migrateCypressExecutorOptions( + tree, + projectName, + target, + configuration, + previousCypressConfigs + ); + } + ); - updateProjectConfiguration(tree, projectName, projectConfig); - } - } catch (e) { - logger.error(stripIndents` -NX There was an error converting ${projectName}:${target}. -You can manually update the project by following the migration guide if need be. -https://nx.dev/cypress/v10-migration-guide - `); - throw e; - } + forEachExecutorOptions( + tree, + '@nrwl/cypress:cypress', + (currentValue, projectName, target, configuration) => { + migrateCypressExecutorOptions( + tree, + projectName, + target, + configuration, + previousCypressConfigs + ); } ); diff --git a/packages/cypress/src/migrations/update-14-6-1/update-cypress-configs-presets.spec.ts b/packages/cypress/src/migrations/update-14-6-1/update-cypress-configs-presets.spec.ts index 7beaa8c02c36a..08a0d8d895bef 100644 --- a/packages/cypress/src/migrations/update-14-6-1/update-cypress-configs-presets.spec.ts +++ b/packages/cypress/src/migrations/update-14-6-1/update-cypress-configs-presets.spec.ts @@ -304,6 +304,10 @@ export default defineConfig({ }); await cypressProjectGenerator(tree, { project: appName, name: e2eName }); const e2eProjectConfig = readProjectConfiguration(tree, e2eName); + e2eProjectConfig.targets['e2e'] = { + ...e2eProjectConfig.targets['e2e'], + executor: '@nrwl/cypress:cypress', + }; e2eProjectConfig.targets['e2e'].configurations = { ...e2eProjectConfig.targets['e2e'].configurations, sb: { diff --git a/packages/cypress/src/migrations/update-15-0-0/update-cy-mount-usage.spec.ts b/packages/cypress/src/migrations/update-15-0-0/update-cy-mount-usage.spec.ts index 64a373557ad12..2afeb614dbe04 100644 --- a/packages/cypress/src/migrations/update-15-0-0/update-cy-mount-usage.spec.ts +++ b/packages/cypress/src/migrations/update-15-0-0/update-cy-mount-usage.spec.ts @@ -192,6 +192,7 @@ async function setup(tree: Tree) { executor: '@nrwl/angular:webpack-browser', options: {}, }; + myLib.targets['component-test'].executor = '@nrwl/cypress:cypress'; myLib.targets['component-test'].options.devServerTarget = 'my-lib:build'; updateProjectConfiguration(tree, 'my-lib', myLib); const anotherLib = readProjectConfiguration(tree, 'another-lib'); @@ -199,6 +200,7 @@ async function setup(tree: Tree) { executor: '@nrwl/webpack:webpack', options: {}, }; + anotherLib.targets['component-test'].executor = '@nrwl/cypress:cypress'; anotherLib.targets['component-test'].options.devServerTarget = 'another-lib:build'; updateProjectConfiguration(tree, 'another-lib', anotherLib); diff --git a/packages/cypress/src/migrations/update-15-1-0/cypress-11.spec.ts b/packages/cypress/src/migrations/update-15-1-0/cypress-11.spec.ts index 1be671423925c..9f9fbb17ade08 100644 --- a/packages/cypress/src/migrations/update-15-1-0/cypress-11.spec.ts +++ b/packages/cypress/src/migrations/update-15-1-0/cypress-11.spec.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, Tree } from '@nx/devkit'; +import { + addProjectConfiguration, + readProjectConfiguration, + Tree, + updateProjectConfiguration, +} from '@nx/devkit'; import { libraryGenerator } from '@nx/js'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import updateToCypress11 from './cypress-11'; @@ -118,6 +123,9 @@ async function setup(tree: Tree) { project: 'my-react-lib', skipFormat: true, }); + const projectConfig = readProjectConfiguration(tree, 'my-react-lib'); + projectConfig.targets['component-test'].executor = '@nrwl/cypress:cypress'; + updateProjectConfiguration(tree, 'my-react-lib', projectConfig); tree.write( 'libs/my-react-lib/cypress/support/commands.ts', `/// @@ -262,6 +270,9 @@ describe('again', () => { project: 'my-ng-lib', skipFormat: true, }); + const projectConfig2 = readProjectConfiguration(tree, 'my-ng-lib'); + projectConfig2.targets['component-test'].executor = '@nrwl/cypress:cypress'; + updateProjectConfiguration(tree, 'my-ng-lib', projectConfig2); tree.write( 'libs/my-ng-lib/cypress/support/commands.ts', `/// diff --git a/packages/cypress/src/utils/add-linter.ts b/packages/cypress/src/utils/add-linter.ts index be6df5bd858f6..425127d7165e5 100644 --- a/packages/cypress/src/utils/add-linter.ts +++ b/packages/cypress/src/utils/add-linter.ts @@ -78,7 +78,7 @@ export async function addLinterToCyProject( joinPathFragments(projectConfig.root, '.eslintrc.json'), (json) => { if (options.rootProject) { - json.plugins = ['@nrwl/nx']; + json.plugins = ['@nx/nx']; json.extends = ['plugin:cypress/recommended']; } else { json.extends = ['plugin:cypress/recommended', ...json.extends]; diff --git a/packages/detox/generators.json b/packages/detox/generators.json index 62f576cec4ea2..707dc4407f7af 100644 --- a/packages/detox/generators.json +++ b/packages/detox/generators.json @@ -1,7 +1,7 @@ { "name": "Nx Detox", "version": "0.1", - "extends": ["@nrwl/workspace"], + "extends": ["@nx/workspace"], "schematics": { "init": { "factory": "./src/generators/init/init#detoxInitSchematic", diff --git a/packages/detox/src/generators/application/files/app/.babelrc.template b/packages/detox/src/generators/application/files/app/.babelrc.template index 61641ec8ac365..88ee27b140c66 100644 --- a/packages/detox/src/generators/application/files/app/.babelrc.template +++ b/packages/detox/src/generators/application/files/app/.babelrc.template @@ -1,7 +1,7 @@ { "presets": [ [ - "@nrwl/react/babel", + "@nx/react/babel", { "runtime": "automatic" } diff --git a/packages/detox/src/generators/application/files/app/jest.config.json.template b/packages/detox/src/generators/application/files/app/jest.config.json.template index c0fc9c6dffbf3..f0853f3c4774a 100644 --- a/packages/detox/src/generators/application/files/app/jest.config.json.template +++ b/packages/detox/src/generators/application/files/app/jest.config.json.template @@ -9,7 +9,7 @@ "verbose": true, "setupFilesAfterEnv": ["/test-setup.ts"], "transform": { - "^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest", + "^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nx/react/plugins/jest", "^.+\\.[tj]sx?$": "babel-jest" } } diff --git a/packages/detox/src/generators/application/lib/add-linting.spec.ts b/packages/detox/src/generators/application/lib/add-linting.spec.ts index 1a36e513ea8a8..c9588d591d309 100644 --- a/packages/detox/src/generators/application/lib/add-linting.spec.ts +++ b/packages/detox/src/generators/application/lib/add-linting.spec.ts @@ -43,7 +43,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-app-e2e'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nrwl/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/detox/src/generators/application/lib/add-project.spec.ts b/packages/detox/src/generators/application/lib/add-project.spec.ts index dc230a8481d4c..58160f595efa6 100644 --- a/packages/detox/src/generators/application/lib/add-project.spec.ts +++ b/packages/detox/src/generators/application/lib/add-project.spec.ts @@ -61,16 +61,16 @@ describe('Add Project', () => { const project = readProjectConfiguration(tree, 'my-app-e2e'); expect(project.targets).toMatchObject({ 'build-ios': { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', }, 'test-ios': { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', }, 'build-android': { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', }, 'test-android': { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', }, }); }); @@ -112,16 +112,16 @@ describe('Add Project', () => { const project = readProjectConfiguration(tree, 'my-dir-my-app-e2e'); expect(project.targets).toMatchObject({ 'build-ios': { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', }, 'test-ios': { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', }, 'build-android': { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', }, 'test-android': { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', }, }); }); diff --git a/packages/detox/src/generators/application/lib/add-project.ts b/packages/detox/src/generators/application/lib/add-project.ts index 2d09ea6be086f..a4d3a29b48b0d 100644 --- a/packages/detox/src/generators/application/lib/add-project.ts +++ b/packages/detox/src/generators/application/lib/add-project.ts @@ -22,28 +22,28 @@ function getTargets(options: NormalizedSchema) { const targets: { [key: string]: TargetConfiguration } = {}; targets['build-ios'] = { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', ...(options.framework === 'react-native' ? reactNativeBuildTarget('ios.sim') : expoBuildTarget('ios.sim')), }; targets['test-ios'] = { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', ...(options.framework === 'react-native' ? reactNativeTestTarget('ios.sim', options.e2eName) : expoTestTarget('ios.sim', options.e2eName)), }; targets['build-android'] = { - executor: '@nrwl/detox:build', + executor: '@nx/detox:build', ...(options.framework === 'react-native' ? reactNativeBuildTarget('android.emu') : expoBuildTarget('android.emu')), }; targets['test-android'] = { - executor: '@nrwl/detox:test', + executor: '@nx/detox:test', ...(options.framework === 'react-native' ? reactNativeTestTarget('android.emu', options.e2eName) : expoTestTarget('android.emu', options.e2eName)), diff --git a/packages/detox/src/generators/init/init.spec.ts b/packages/detox/src/generators/init/init.spec.ts index 348f14e4dd7aa..a2d3cfaaf9ee1 100644 --- a/packages/detox/src/generators/init/init.spec.ts +++ b/packages/detox/src/generators/init/init.spec.ts @@ -12,7 +12,7 @@ describe('init', () => { it('should add detox dependencies', async () => { await detoxInitGenerator(tree, {}); const packageJson = readJson(tree, 'package.json'); - expect(packageJson.devDependencies['@nrwl/detox']).toBeDefined(); + expect(packageJson.devDependencies['@nx/detox']).toBeDefined(); expect(packageJson.devDependencies['@types/node']).toBeDefined(); expect(packageJson.devDependencies['detox']).toBeDefined(); }); diff --git a/packages/detox/src/generators/init/init.ts b/packages/detox/src/generators/init/init.ts index 5bd7604d26eea..6af85ac9327f6 100644 --- a/packages/detox/src/generators/init/init.ts +++ b/packages/detox/src/generators/init/init.ts @@ -36,7 +36,7 @@ export function updateDependencies(host: Tree) { host, {}, { - '@nrwl/detox': nxVersion, + '@nx/detox': nxVersion, detox: detoxVersion, '@testing-library/jest-dom': testingLibraryJestDom, '@types/node': typesNodeVersion, @@ -46,7 +46,7 @@ export function updateDependencies(host: Tree) { } function moveDependency(host: Tree) { - return removeDependenciesFromPackageJson(host, ['@nrwl/detox'], []); + return removeDependenciesFromPackageJson(host, ['@nx/detox'], []); } export default detoxInitGenerator; diff --git a/packages/esbuild/src/executors/esbuild/esbuild.impl.ts b/packages/esbuild/src/executors/esbuild/esbuild.impl.ts index ea904e6302f2b..36b0f4c83b998 100644 --- a/packages/esbuild/src/executors/esbuild/esbuild.impl.ts +++ b/packages/esbuild/src/executors/esbuild/esbuild.impl.ts @@ -187,7 +187,7 @@ export async function* esbuildExecutor( yield { success: buildResult.errors.length === 0, // Need to call getOutfile directly in the case of bundle=false and outfile is not set for esbuild. - // This field is needed for `@nrwl/js:node` executor to work. + // This field is needed for `@nx/js:node` executor to work. outfile: join(context.root, getOutfile(format, options, context)), }; } @@ -232,7 +232,7 @@ export async function* esbuildExecutor( next({ success, // Need to call getOutfile directly in the case of bundle=false and outfile is not set for esbuild. - // This field is needed for `@nrwl/js:node` executor to work. + // This field is needed for `@nx/js:node` executor to work. outfile: join( context.root, getOutfile(format, options, context) @@ -332,7 +332,7 @@ function getTypeCheckOptions( const { watch, tsConfig, outputPath } = options; const typeCheckOptions: TypeCheckOptions = { - // TODO(jack): Add support for d.ts declaration files -- once the `@nrwl/js:tsc` changes are in we can use the same logic. + // TODO(jack): Add support for d.ts declaration files -- once the `@nx/js:tsc` changes are in we can use the same logic. mode: 'noEmit', tsConfigPath: tsConfig, // outDir: outputPath, diff --git a/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts b/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts index c3c2c77ef5b48..459fe3e78c605 100644 --- a/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts +++ b/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts @@ -28,7 +28,7 @@ describe('buildEsbuildOptions', () => { root: path.join(__dirname, 'fixtures'), cwd: path.join(__dirname, 'fixtures'), target: { - executor: '@nrwl/esbuild:esbuild', + executor: '@nx/esbuild:esbuild', options: { outputPath: 'dist/apps/myapp', }, diff --git a/packages/esbuild/src/executors/esbuild/lib/normalize.ts b/packages/esbuild/src/executors/esbuild/lib/normalize.ts index 5ed21643f331f..409561d8270ef 100644 --- a/packages/esbuild/src/executors/esbuild/lib/normalize.ts +++ b/packages/esbuild/src/executors/esbuild/lib/normalize.ts @@ -71,7 +71,7 @@ export function normalizeOptions( external: options.external ?? [], singleEntry: false, // Use the `main` file name as the output file name. - // This is needed for `@nrwl/js:node` to know the main file to execute. + // This is needed for `@nx/js:node` to know the main file to execute. // NOTE: The .js default extension may be replaced later in getOutfile() call. outputFileName: `${path.parse(options.main).name}.js`, }; diff --git a/packages/esbuild/src/generators/esbuild-project/esbuild-project.ts b/packages/esbuild/src/generators/esbuild-project/esbuild-project.ts index 4d874bb2f4282..e97c122a11e4b 100644 --- a/packages/esbuild/src/generators/esbuild-project/esbuild-project.ts +++ b/packages/esbuild/src/generators/esbuild-project/esbuild-project.ts @@ -82,7 +82,7 @@ function addBuildTarget(tree: Tree, options: EsBuildProjectSchema) { targets: { ...project.targets, build: { - executor: '@nrwl/esbuild:esbuild', + executor: '@nx/esbuild:esbuild', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: buildOptions, diff --git a/packages/eslint-plugin-nx/.eslintrc.json b/packages/eslint-plugin-nx/.eslintrc.json index ff47ddace4d51..a40930e8b428f 100644 --- a/packages/eslint-plugin-nx/.eslintrc.json +++ b/packages/eslint-plugin-nx/.eslintrc.json @@ -3,7 +3,7 @@ "rules": { "no-restricted-imports": [ "error", - "@nrwl/workspace", + "@nx/workspace", "@angular-devkit/core", "@angular-devkit/architect", "@angular-devkit/schematics" diff --git a/packages/eslint-plugin-nx/src/configs/react-tmp.ts b/packages/eslint-plugin-nx/src/configs/react-tmp.ts index 1e6cae320fb6b..49e75b3cb8e43 100644 --- a/packages/eslint-plugin-nx/src/configs/react-tmp.ts +++ b/packages/eslint-plugin-nx/src/configs/react-tmp.ts @@ -8,8 +8,8 @@ */ export default { extends: [ - 'plugin:@nrwl/nx/react-base', - 'plugin:@nrwl/nx/react-typescript', - 'plugin:@nrwl/nx/react-jsx', + 'plugin:@nx/nx/react-base', + 'plugin:@nx/nx/react-typescript', + 'plugin:@nx/nx/react-jsx', ], }; diff --git a/packages/eslint-plugin-nx/src/constants.ts b/packages/eslint-plugin-nx/src/constants.ts index ca2bcc1bad612..81ce623ff9f56 100644 --- a/packages/eslint-plugin-nx/src/constants.ts +++ b/packages/eslint-plugin-nx/src/constants.ts @@ -11,6 +11,6 @@ export const WORKSPACE_PLUGIN_DIR = join(workspaceRoot, 'tools/eslint-rules'); * E.g. if a user writes a rule called "foo", then they will include it in their ESLint * config files as: * - * "@nrwl/nx/workspace/foo": "error" + * "@nx/nx/workspace/foo": "error" */ export const WORKSPACE_RULE_NAMESPACE = 'workspace'; diff --git a/packages/eslint-plugin-nx/src/utils/project-graph-utils.ts b/packages/eslint-plugin-nx/src/utils/project-graph-utils.ts index 457de2d918cd5..f1ef0a0a4b9ee 100644 --- a/packages/eslint-plugin-nx/src/utils/project-graph-utils.ts +++ b/packages/eslint-plugin-nx/src/utils/project-graph-utils.ts @@ -31,7 +31,7 @@ export function ensureGlobalProjectGraph(ruleName: string) { ); } catch { const WARNING_PREFIX = `${chalk.reset.keyword('orange')('warning')}`; - const RULE_NAME_SUFFIX = `${chalk.reset.dim(`@nrwl/nx/${ruleName}`)}`; + const RULE_NAME_SUFFIX = `${chalk.reset.dim(`@nx/nx/${ruleName}`)}`; process.stdout .write(`${WARNING_PREFIX} No cached ProjectGraph is available. The rule will be skipped. If you encounter this error as part of running standard \`nx\` commands then please open an issue on https://github.com/nrwl/nx diff --git a/packages/expo/generators.json b/packages/expo/generators.json index 904f40a533e03..91dfee18d10b9 100644 --- a/packages/expo/generators.json +++ b/packages/expo/generators.json @@ -1,7 +1,7 @@ { "name": "Nx Expo", "version": "0.1", - "extends": ["@nrwl/workspace"], + "extends": ["@nx/workspace"], "schematics": { "init": { "factory": "./src/generators/init/init#expoInitSchematic", diff --git a/packages/expo/plugins/with-nx-webpack.ts b/packages/expo/plugins/with-nx-webpack.ts index d297412f985f0..01e71c633afad 100644 --- a/packages/expo/plugins/with-nx-webpack.ts +++ b/packages/expo/plugins/with-nx-webpack.ts @@ -17,7 +17,7 @@ export async function withNxWebpack(config) { options: { presets: [ [ - '@nrwl/react/babel', + '@nx/react/babel', { runtime: 'automatic', }, diff --git a/packages/expo/src/generators/application/files/metro.config.js.template b/packages/expo/src/generators/application/files/metro.config.js.template index 003680bffff74..792f11624b5d9 100644 --- a/packages/expo/src/generators/application/files/metro.config.js.template +++ b/packages/expo/src/generators/application/files/metro.config.js.template @@ -1,4 +1,4 @@ -const { withNxMetro } = require('@nrwl/expo'); +const { withNxMetro } = require('@nx/expo'); const { getDefaultConfig } = require('@expo/metro-config'); const defaultConfig = getDefaultConfig(__dirname); diff --git a/packages/expo/src/generators/application/files/src/app/App.tsx.template b/packages/expo/src/generators/application/files/src/app/App.tsx.template index 02f538dd39174..49afed21799f4 100644 --- a/packages/expo/src/generators/application/files/src/app/App.tsx.template +++ b/packages/expo/src/generators/application/files/src/app/App.tsx.template @@ -452,14 +452,14 @@ export const App = () => { styles.marginBottomMd, ]} > - nx g @nrwl/expo:lib ui + nx g @nx/expo:lib ui # Add a component nx g \ - @nrwl/expo:component \ + @nx/expo:component \ button --project ui diff --git a/packages/expo/src/generators/application/files/tsconfig.json.template b/packages/expo/src/generators/application/files/tsconfig.json.template index 2cd7843271bf6..db1c7e0b6afab 100644 --- a/packages/expo/src/generators/application/files/tsconfig.json.template +++ b/packages/expo/src/generators/application/files/tsconfig.json.template @@ -12,7 +12,7 @@ "declaration": true }, "files": [ - "../../node_modules/@nrwl/expo/typings/svg.d.ts" + "../../node_modules/@nx/expo/typings/svg.d.ts" ], "include": [], "references": [ diff --git a/packages/expo/src/generators/application/lib/add-project.ts b/packages/expo/src/generators/application/lib/add-project.ts index 243c904e27556..6e56c3d5f4a46 100644 --- a/packages/expo/src/generators/application/lib/add-project.ts +++ b/packages/expo/src/generators/application/lib/add-project.ts @@ -28,7 +28,7 @@ function getTargets(options: NormalizedSchema) { const architect: { [key: string]: TargetConfiguration } = {}; architect.start = { - executor: '@nrwl/expo:start', + executor: '@nx/expo:start', options: { port: 8081, }, @@ -42,63 +42,63 @@ function getTargets(options: NormalizedSchema) { }; architect['run-ios'] = { - executor: '@nrwl/expo:run', + executor: '@nx/expo:run', options: { platform: 'ios', }, }; architect['run-android'] = { - executor: '@nrwl/expo:run', + executor: '@nx/expo:run', options: { platform: 'android', }, }; architect['build'] = { - executor: '@nrwl/expo:build', + executor: '@nx/expo:build', options: {}, }; architect['build-list'] = { - executor: '@nrwl/expo:build-list', + executor: '@nx/expo:build-list', options: {}, }; architect['download'] = { - executor: '@nrwl/expo:download', + executor: '@nx/expo:download', options: { output: `${options.appProjectRoot}/dist`, }, }; architect['sync-deps'] = { - executor: '@nrwl/expo:sync-deps', + executor: '@nx/expo:sync-deps', options: {}, }; architect['ensure-symlink'] = { - executor: '@nrwl/expo:ensure-symlink', + executor: '@nx/expo:ensure-symlink', options: {}, }; architect['prebuild'] = { - executor: '@nrwl/expo:prebuild', + executor: '@nx/expo:prebuild', options: {}, }; architect['install'] = { - executor: '@nrwl/expo:install', + executor: '@nx/expo:install', options: {}, }; architect['update'] = { - executor: '@nrwl/expo:update', + executor: '@nx/expo:update', options: {}, }; architect['export'] = { - executor: '@nrwl/expo:export', + executor: '@nx/expo:export', options: { platform: 'all', outputDir: `${offsetFromRoot(options.appProjectRoot)}dist/${ @@ -108,7 +108,7 @@ function getTargets(options: NormalizedSchema) { }; architect['export-web'] = { - executor: '@nrwl/expo:export', + executor: '@nx/expo:export', options: { bundler: 'metro', }, diff --git a/packages/expo/src/generators/component/schema.d.ts b/packages/expo/src/generators/component/schema.d.ts index 05440ac661a2d..35a13eebfb1e6 100644 --- a/packages/expo/src/generators/component/schema.d.ts +++ b/packages/expo/src/generators/component/schema.d.ts @@ -1,5 +1,5 @@ /** - * Same as the @nrwl/react library schema, except it removes keys: style, routing, globalCss + * Same as the @nx/react library schema, except it removes keys: style, routing, globalCss */ export interface Schema { name: string; diff --git a/packages/expo/src/generators/init/init.ts b/packages/expo/src/generators/init/init.ts index 4314cb5104283..41b32d06dd4f2 100644 --- a/packages/expo/src/generators/init/init.ts +++ b/packages/expo/src/generators/init/init.ts @@ -92,7 +92,7 @@ export function updateDependencies(host: Tree) { 'react-native-svg': reactNativeSvgVersion, }, { - '@nrwl/expo': nxVersion, + '@nx/expo': nxVersion, '@types/react': typesReactVersion, '@types/react-native': typesReactNativeVersion, metro: metroVersion, @@ -108,7 +108,7 @@ export function updateDependencies(host: Tree) { } function moveDependency(host: Tree) { - return removeDependenciesFromPackageJson(host, ['@nrwl/react-native'], []); + return removeDependenciesFromPackageJson(host, ['@nx/react-native'], []); } export default expoInitGenerator; diff --git a/packages/expo/src/generators/library/files/lib/babel.config.json b/packages/expo/src/generators/library/files/lib/babel.config.json index d0bad96b07ad1..b9ba048f2c060 100644 --- a/packages/expo/src/generators/library/files/lib/babel.config.json +++ b/packages/expo/src/generators/library/files/lib/babel.config.json @@ -1,7 +1,7 @@ { "presets": [ [ - "@nrwl/react/babel", + "@nx/react/babel", { "runtime": "automatic", "useBuiltIns": "usage" diff --git a/packages/expo/src/generators/library/library.spec.ts b/packages/expo/src/generators/library/library.spec.ts index 24b9878a980c5..93af2eca6656d 100644 --- a/packages/expo/src/generators/library/library.spec.ts +++ b/packages/expo/src/generators/library/library.spec.ts @@ -39,7 +39,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('libs/my-lib'); expect(projectConfiguration.targets.build).toBeUndefined(); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -144,7 +144,7 @@ describe('lib', () => { 'my-dir-my-lib' ); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -199,7 +199,7 @@ describe('lib', () => { const projectConfiguration = readProjectConfiguration(appTree, 'my-lib'); expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.lint).toMatchObject({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', options: { lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'], }, @@ -232,7 +232,7 @@ describe('lib', () => { const projects = getProjects(appTree); expect(projects.get('my-lib').targets.build).toMatchObject({ - executor: '@nrwl/web:rollup', + executor: '@nx/web:rollup', outputs: ['{options.outputPath}'], options: { external: ['react/jsx-runtime', 'react-native'], @@ -240,7 +240,7 @@ describe('lib', () => { outputPath: 'dist/libs/my-lib', project: 'libs/my-lib/package.json', tsConfig: 'libs/my-lib/tsconfig.lib.json', - rollupConfig: '@nrwl/react/plugins/bundle-rollup', + rollupConfig: '@nx/react/plugins/bundle-rollup', }, }); }); diff --git a/packages/expo/src/generators/library/library.ts b/packages/expo/src/generators/library/library.ts index 91ce8823acbfa..ab2a50282ff92 100644 --- a/packages/expo/src/generators/library/library.ts +++ b/packages/expo/src/generators/library/library.ts @@ -90,7 +90,7 @@ function addProject(host: Tree, options: NormalizedSchema) { const external = ['react/jsx-runtime', 'react-native']; targets.build = { - executor: '@nrwl/web:rollup', + executor: '@nx/web:rollup', outputs: ['{options.outputPath}'], options: { outputPath: `dist/${libsDir}/${options.projectDirectory}`, @@ -98,7 +98,7 @@ function addProject(host: Tree, options: NormalizedSchema) { project: `${options.projectRoot}/package.json`, entryFile: maybeJs(options, `${options.projectRoot}/src/index.ts`), external, - rollupConfig: `@nrwl/react/plugins/bundle-rollup`, + rollupConfig: `@nx/react/plugins/bundle-rollup`, assets: [ { glob: `${options.projectRoot}/README.md`, diff --git a/packages/expo/src/generators/library/schema.d.ts b/packages/expo/src/generators/library/schema.d.ts index ab536a68f3442..706cf0222ae8f 100644 --- a/packages/expo/src/generators/library/schema.d.ts +++ b/packages/expo/src/generators/library/schema.d.ts @@ -1,7 +1,7 @@ import { Linter } from '@nx/linter'; /** - * Same as the @nrwl/react library schema, except it removes keys: style, component, routing, appProject + * Same as the @nx/react library schema, except it removes keys: style, component, routing, appProject */ export interface Schema { name: string; diff --git a/packages/expo/src/utils/add-jest.ts b/packages/expo/src/utils/add-jest.ts index 82328da219de7..bcc636c449aef 100644 --- a/packages/expo/src/utils/add-jest.ts +++ b/packages/expo/src/utils/add-jest.ts @@ -25,7 +25,7 @@ export async function addJest( const configPath = `${appProjectRoot}/jest.config.${js ? 'js' : 'ts'}`; const content = `module.exports = { displayName: '${projectName}', - resolver: '@nrwl/jest/plugins/resolver', + resolver: '@nx/jest/plugins/resolver', preset: 'react-native', transformIgnorePatterns: [ 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)', @@ -33,7 +33,7 @@ export async function addJest( moduleFileExtensions: ['ts', 'js', 'html', 'tsx', 'jsx'], setupFilesAfterEnv: ['/test-setup.${js ? 'js' : 'ts'}'], moduleNameMapper: { - '\\\\.svg$': '@nrwl/expo/plugins/jest/svg-mock' + '\\\\.svg$': '@nx/expo/plugins/jest/svg-mock' } };`; host.write(configPath, content); diff --git a/packages/expo/src/utils/add-linting.spec.ts b/packages/expo/src/utils/add-linting.spec.ts index 1a3fb6e63de45..3256aae1ab3af 100644 --- a/packages/expo/src/utils/add-linting.spec.ts +++ b/packages/expo/src/utils/add-linting.spec.ts @@ -26,7 +26,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nrwl/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/expo/src/utils/ensure-node-modules-symlink.spec.ts b/packages/expo/src/utils/ensure-node-modules-symlink.spec.ts index 4d1996bde84e2..78f4559df42a3 100644 --- a/packages/expo/src/utils/ensure-node-modules-symlink.spec.ts +++ b/packages/expo/src/utils/ensure-node-modules-symlink.spec.ts @@ -25,7 +25,7 @@ describe('ensureNodeModulesSymlink', () => { JSON.stringify({ name: 'workspace', dependencies: { - '@nrwl/react-native': '9999.9.9', + '@nx/react-native': '9999.9.9', '@react-native-community/cli-platform-ios': '7777.7.7', '@react-native-community/cli-platform-android': '7777.7.7', 'react-native': '0.9999.0', @@ -39,7 +39,7 @@ describe('ensureNodeModulesSymlink', () => { }); it('should create symlinks', () => { - createNpmDirectory('@nrwl/react-native', '9999.9.9'); + createNpmDirectory('@nx/react-native', '9999.9.9'); createNpmDirectory( '@react-native-community/cli-platform-android', '7777.7.7' @@ -52,7 +52,7 @@ describe('ensureNodeModulesSymlink', () => { ensureNodeModulesSymlink(workspaceDir, appDir); - expectSymlinkToExist('@nrwl/react-native'); + expectSymlinkToExist('@nx/react-native'); expectSymlinkToExist('react-native'); expectSymlinkToExist('jsc-android'); expectSymlinkToExist('hermes-engine'); @@ -71,7 +71,7 @@ describe('ensureNodeModulesSymlink', () => { }, }) ); - createNpmDirectory('@nrwl/react-native', '9999.9.9'); + createNpmDirectory('@nx/react-native', '9999.9.9'); createNpmDirectory( '@react-native-community/cli-platform-android', '7777.7.7' diff --git a/packages/expo/src/utils/find-all-npm-dependencies.spec.ts b/packages/expo/src/utils/find-all-npm-dependencies.spec.ts index 9c60f05115644..3a8738180b36a 100644 --- a/packages/expo/src/utils/find-all-npm-dependencies.spec.ts +++ b/packages/expo/src/utils/find-all-npm-dependencies.spec.ts @@ -50,12 +50,12 @@ test('findAllNpmDependencies', () => { packageName: 'react-native-snackbar', }, }, - 'npm:@nrwl/react-native': { + 'npm:@nx/react-native': { type: 'npm', - name: 'npm:@nrwl/react-native', + name: 'npm:@nx/react-native', data: { version: '1', - packageName: '@nrwl/react-native', + packageName: '@nx/react-native', }, }, }, @@ -71,7 +71,7 @@ test('findAllNpmDependencies', () => { { type: DependencyType.static, source: 'myapp', - target: 'npm:@nrwl/react-native', + target: 'npm:@nx/react-native', }, ], lib1: [ diff --git a/packages/expo/src/utils/find-all-npm-dependencies.ts b/packages/expo/src/utils/find-all-npm-dependencies.ts index 580a70e0c8736..df7a5e3bedfca 100644 --- a/packages/expo/src/utils/find-all-npm-dependencies.ts +++ b/packages/expo/src/utils/find-all-npm-dependencies.ts @@ -14,10 +14,13 @@ export function findAllNpmDependencies( const node = graph.externalNodes[projectName]; - // Don't want to include '@nrwl/react-native' because React Native + // Don't want to include '@nx/react-native' because React Native // autolink will warn that the package has no podspec file for iOS. if (node) { - if (node.name !== `npm:@nrwl/react-native`) { + if ( + node.name !== `npm:@nx/react-native` && + node.name !== `npm:@nrwl/react-native` + ) { list.push(node.data.packageName); } } else { diff --git a/packages/jest/.eslintrc.json b/packages/jest/.eslintrc.json index 6c7a3539d988a..656f32bca812c 100644 --- a/packages/jest/.eslintrc.json +++ b/packages/jest/.eslintrc.json @@ -10,7 +10,7 @@ "files": ["**/*.ts"], "excludedFiles": ["./src/migrations/**"], "rules": { - "no-restricted-imports": ["error", "@nrwl/workspace"] + "no-restricted-imports": ["error", "@nx/workspace"] } }, { diff --git a/packages/jest/preset/jest-preset.ts b/packages/jest/preset/jest-preset.ts index 044b90c41f9ca..0ca056d2ccefe 100644 --- a/packages/jest/preset/jest-preset.ts +++ b/packages/jest/preset/jest-preset.ts @@ -2,7 +2,7 @@ import type { Config } from 'jest'; export const nxPreset: Config = { // This is one of the patterns that jest finds by default https://jestjs.io/docs/configuration#testmatch-arraystring testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'], - resolver: '@nrwl/jest/plugins/resolver', + resolver: '@nx/jest/plugins/resolver', moduleFileExtensions: ['ts', 'js', 'mjs', 'html'], coverageReporters: ['html'], transform: { diff --git a/packages/jest/src/executors/jest/jest.impl.spec.ts b/packages/jest/src/executors/jest/jest.impl.spec.ts index 9dd7940c89693..bae58de6da8d0 100644 --- a/packages/jest/src/executors/jest/jest.impl.spec.ts +++ b/packages/jest/src/executors/jest/jest.impl.spec.ts @@ -44,7 +44,7 @@ describe('Jest Executor', () => { root: 'proj', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', }, }, }, @@ -54,7 +54,7 @@ describe('Jest Executor', () => { npmScope: 'test', }, target: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', }, cwd: '/root', isVerbose: true, diff --git a/packages/jest/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/jest/src/generators/init/__snapshots__/init.spec.ts.snap index 2525de8ad0ee4..1adc23fb811c6 100644 --- a/packages/jest/src/generators/init/__snapshots__/init.spec.ts.snap +++ b/packages/jest/src/generators/init/__snapshots__/init.spec.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jest should generate files 1`] = ` -"import { getJestProjects } from '@nrwl/jest'; +"import { getJestProjects } from '@nx/jest'; export default { projects: getJestProjects() @@ -9,13 +9,13 @@ projects: getJestProjects() `; exports[`jest should generate files 2`] = ` -"const nxPreset = require('@nrwl/jest/preset').default; +"const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset }" `; exports[`jest should generate files with --js flag 1`] = ` -"const { getJestProjects } = require('@nrwl/jest'); +"const { getJestProjects } = require('@nx/jest'); module.exports = { projects: getJestProjects() @@ -23,7 +23,7 @@ projects: getJestProjects() `; exports[`jest should generate files with --js flag 2`] = ` -"const nxPreset = require('@nrwl/jest/preset').default; +"const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset }" `; diff --git a/packages/jest/src/generators/init/init.spec.ts b/packages/jest/src/generators/init/init.spec.ts index d73940db6662c..21babc19e00af 100644 --- a/packages/jest/src/generators/init/init.spec.ts +++ b/packages/jest/src/generators/init/init.spec.ts @@ -49,7 +49,7 @@ describe('jest', () => { sourceRoot: 'apps/my-app/src', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'apps/my-app/jest.config.ts', }, @@ -57,7 +57,7 @@ describe('jest', () => { }, }); const expected = stripIndents` -import { getJestProjects } from '@nrwl/jest'; +import { getJestProjects } from '@nx/jest'; export default { projects: getJestProjects(), extraThing: "Goes Here" @@ -127,7 +127,7 @@ export default { await jestInitGenerator(tree, {}); const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies.jest).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/jest']).toBeDefined(); + expect(packageJson.devDependencies['@nx/jest']).toBeDefined(); expect(packageJson.devDependencies['@types/jest']).toBeDefined(); expect(packageJson.devDependencies['ts-jest']).toBeDefined(); expect(packageJson.devDependencies['ts-node']).toBeDefined(); @@ -141,7 +141,7 @@ export default { await jestInitGenerator(tree, { testEnvironment: 'node' }); const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies.jest).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/jest']).toBeDefined(); + expect(packageJson.devDependencies['@nx/jest']).toBeDefined(); expect(packageJson.devDependencies['@types/jest']).toBeDefined(); expect(packageJson.devDependencies['ts-jest']).toBeDefined(); expect(packageJson.devDependencies['ts-node']).toBeDefined(); @@ -155,7 +155,7 @@ export default { await jestInitGenerator(tree, { testEnvironment: 'none' }); const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies.jest).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/jest']).toBeDefined(); + expect(packageJson.devDependencies['@nx/jest']).toBeDefined(); expect(packageJson.devDependencies['@types/jest']).toBeDefined(); expect(packageJson.devDependencies['ts-jest']).toBeDefined(); expect(packageJson.devDependencies['ts-node']).toBeDefined(); @@ -213,7 +213,7 @@ export default { sourceRoot: 'src', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'jest.config.ts', }, @@ -239,7 +239,7 @@ export default { await jestInitGenerator(tree, { rootProject: false }); expect(tree.exists('jest.config.app.ts')).toBeTruthy(); expect(tree.read('jest.config.ts', 'utf-8')) - .toEqual(`import { getJestProjects } from '@nrwl/jest'; + .toEqual(`import { getJestProjects } from '@nx/jest'; export default { projects: getJestProjects() @@ -247,7 +247,7 @@ projects: getJestProjects() expect(readProjectConfiguration(tree, 'my-project').targets.test) .toMatchInlineSnapshot(` { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "jest.config.app.ts", }, @@ -262,7 +262,7 @@ projects: getJestProjects() sourceRoot: 'src', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'jest.config.js', }, @@ -288,7 +288,7 @@ module.exports = { await jestInitGenerator(tree, { js: true, rootProject: false }); expect(tree.exists('jest.config.app.js')).toBeTruthy(); expect(tree.read('jest.config.js', 'utf-8')) - .toEqual(`const { getJestProjects } = require('@nrwl/jest'); + .toEqual(`const { getJestProjects } = require('@nx/jest'); module.exports = { projects: getJestProjects() diff --git a/packages/jest/src/generators/init/init.ts b/packages/jest/src/generators/init/init.ts index 227b79899cff9..1eec67e817a13 100644 --- a/packages/jest/src/generators/init/init.ts +++ b/packages/jest/src/generators/init/init.ts @@ -40,13 +40,13 @@ const schemaDefaults = { function generateGlobalConfig(tree: Tree, isJS: boolean) { const contents = isJS ? stripIndents` - const { getJestProjects } = require('@nrwl/jest'); + const { getJestProjects } = require('@nx/jest'); module.exports = { projects: getJestProjects() };` : stripIndents` - import { getJestProjects } from '@nrwl/jest'; + import { getJestProjects } from '@nx/jest'; export default { projects: getJestProjects() @@ -60,7 +60,7 @@ function createJestConfig(tree: Tree, options: NormalizedSchema) { tree.write( `jest.preset.js`, ` - const nxPreset = require('@nrwl/jest/preset').default; + const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset }` ); @@ -94,7 +94,8 @@ function createJestConfig(tree: Tree, options: NormalizedSchema) { if (rootProject) { const rootProjectConfig = projects.get(rootProject); const jestTarget = Object.values(rootProjectConfig.targets || {}).find( - (t) => t?.executor === '@nrwl/jest:jest' + (t) => + t?.executor === '@nx/jest:jest' || t?.executor === '@nrwl/jest:jest' ); const isProjectConfig = jestTarget?.options?.jestConfig === rootJestPath; // if root project doesn't have jest target, there's nothing to migrate @@ -146,7 +147,7 @@ function updateDependencies(tree: Tree, options: NormalizedSchema) { tslib: tslibVersion, }; const devDeps = { - '@nrwl/jest': nxVersion, + '@nx/jest': nxVersion, jest: jestVersion, // because the default jest-preset uses ts-jest, @@ -167,8 +168,8 @@ function updateDependencies(tree: Tree, options: NormalizedSchema) { if (options.compiler === 'babel' || options.babelJest) { devDeps['babel-jest'] = babelJestVersion; - // in some cases @nrwl/js will not already be present i.e. node only projects - devDeps['@nrwl/js'] = nxVersion; + // in some cases @nx/js will not already be present i.e. node only projects + devDeps['@nx/js'] = nxVersion; } else if (options.compiler === 'swc') { devDeps['@swc/jest'] = swcJestVersion; } @@ -208,7 +209,7 @@ export async function jestInitGenerator( createJestConfig(tree, options); if (!options.skipPackageJson) { - removeDependenciesFromPackageJson(tree, ['@nrwl/jest'], []); + removeDependenciesFromPackageJson(tree, ['@nx/jest'], []); const installTask = updateDependencies(tree, options); tasks.push(installTask); } diff --git a/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap b/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap index c94090c71007f..1220dd07803ff 100644 --- a/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap +++ b/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap @@ -115,7 +115,7 @@ exports[`jestProject should use jest.config.js in project config with --js flag "codeCoverage": true, }, }, - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/lib1/jest.config.js", "passWithNoTests": true, diff --git a/packages/jest/src/generators/jest-project/jest-project.spec.ts b/packages/jest/src/generators/jest-project/jest-project.spec.ts index add9ad31194a9..2b9d21c4eaf2d 100644 --- a/packages/jest/src/generators/jest-project/jest-project.spec.ts +++ b/packages/jest/src/generators/jest-project/jest-project.spec.ts @@ -73,7 +73,7 @@ describe('jestProject', () => { } as JestProjectSchema); const lib1 = readProjectConfiguration(tree, 'lib1'); expect(lib1.targets.test).toEqual({ - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: ['{workspaceRoot}/coverage/{projectRoot}'], options: { jestConfig: 'libs/lib1/jest.config.ts', diff --git a/packages/jest/src/generators/jest-project/lib/update-workspace.ts b/packages/jest/src/generators/jest-project/lib/update-workspace.ts index bc7d273ecac18..d1dd27e3a3ff6 100644 --- a/packages/jest/src/generators/jest-project/lib/update-workspace.ts +++ b/packages/jest/src/generators/jest-project/lib/update-workspace.ts @@ -13,7 +13,7 @@ export function updateWorkspace( ) { const projectConfig = readProjectConfiguration(tree, options.project); projectConfig.targets.test = { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: [ options.rootProject ? joinPathFragments('{workspaceRoot}', 'coverage', '{projectName}') diff --git a/packages/jest/src/migrations/update-14-1-5/update-exports-jest-config.spec.ts b/packages/jest/src/migrations/update-14-1-5/update-exports-jest-config.spec.ts index ca07f9db139a2..f58041927ae18 100644 --- a/packages/jest/src/migrations/update-14-1-5/update-exports-jest-config.spec.ts +++ b/packages/jest/src/migrations/update-14-1-5/update-exports-jest-config.spec.ts @@ -57,6 +57,17 @@ describe('Jest Migration (v14.1.2)', () => { it('should update individual project jest configs', async () => { await workspaceLib(tree, { name: 'lib-one' }); + const projectConfiguration = readProjectConfiguration(tree, 'lib-one'); + updateProjectConfiguration(tree, 'lib-one', { + ...projectConfiguration, + targets: { + ...projectConfiguration.targets, + test: { + ...projectConfiguration.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); tree.rename('jest.preset.js', 'jest.preset.ts'); tree.write( 'libs/lib-one/jest.config.ts', diff --git a/packages/jest/src/migrations/update-14-6-0/update-configs-jest-28.spec.ts b/packages/jest/src/migrations/update-14-6-0/update-configs-jest-28.spec.ts index 4caa9e680f74b..aa80240743558 100644 --- a/packages/jest/src/migrations/update-14-6-0/update-configs-jest-28.spec.ts +++ b/packages/jest/src/migrations/update-14-6-0/update-configs-jest-28.spec.ts @@ -1,4 +1,9 @@ -import { readJson, updateJson } from '@nx/devkit'; +import { + readJson, + readProjectConfiguration, + updateJson, + updateProjectConfiguration, +} from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { libraryGenerator as workspaceLib } from '@nx/js'; import { @@ -155,6 +160,18 @@ module.exports = { it('should update deps from jest.config.ts', async () => { let tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' }); await workspaceLib(tree, { name: 'my-lib', unitTestRunner: 'jest' }); + const projectConfiguration = readProjectConfiguration(tree, 'my-lib'); + updateProjectConfiguration(tree, 'my-lib', { + ...projectConfiguration, + targets: { + ...projectConfiguration.targets, + test: { + ...projectConfiguration.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); + updateJson(tree, 'package.json', (json) => { json.devDependencies['jest'] = '27.1.1'; json.devDependencies['jest-environment-jsdom'] = '27.1.1'; diff --git a/packages/jest/src/migrations/update-14-6-0/update-tests-jest-28.spec.ts b/packages/jest/src/migrations/update-14-6-0/update-tests-jest-28.spec.ts index a06ee7e76734e..2b9c528498c58 100644 --- a/packages/jest/src/migrations/update-14-6-0/update-tests-jest-28.spec.ts +++ b/packages/jest/src/migrations/update-14-6-0/update-tests-jest-28.spec.ts @@ -19,6 +19,17 @@ describe('Jest Migration - jest 28 test files', () => { linter: undefined, unitTestRunner: 'jest', }); + const projectConfiguration = readProjectConfiguration(tree, 'blah'); + updateProjectConfiguration(tree, 'blah', { + ...projectConfiguration, + targets: { + ...projectConfiguration.targets, + test: { + ...projectConfiguration.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); await workspaceLib(tree, { name: 'blah-again', @@ -26,6 +37,17 @@ describe('Jest Migration - jest 28 test files', () => { unitTestRunner: 'jest', js: true, }); + const projectConfiguration2 = readProjectConfiguration(tree, 'blah-again'); + updateProjectConfiguration(tree, 'blah-again', { + ...projectConfiguration2, + targets: { + ...projectConfiguration2.targets, + test: { + ...projectConfiguration2.targets.test, + executor: '@nrwl/jest:jest', + }, + }, + }); tree.write( 'libs/blah/src/lib/something/something.spec.ts', diff --git a/packages/jest/src/migrations/update-15-8-0/update-configs-jest-29.spec.ts b/packages/jest/src/migrations/update-15-8-0/update-configs-jest-29.spec.ts index 53d787a435457..f1aa03e9c0d66 100644 --- a/packages/jest/src/migrations/update-15-8-0/update-configs-jest-29.spec.ts +++ b/packages/jest/src/migrations/update-15-8-0/update-configs-jest-29.spec.ts @@ -391,6 +391,7 @@ async function setup(tree: Tree, name: string, existingGraph?: ProjectGraph) { const projectConfig = readProjectConfiguration(tree, name); projectConfig.targets['test'] = { ...projectConfig.targets['test'], + executor: '@nrwl/jest:jest', configurations: { ci: { ci: true, @@ -447,6 +448,22 @@ preset: '../../jest.preset.js' ` ); + tree.write( + 'jest.config.ts', + tree + .read('jest.config.ts') + .toString() + .replace(new RegExp('@nx/jest', 'g'), '@nrwl/jest') + ); + + tree.write( + 'jest.preset.js', + tree + .read('jest.preset.js') + .toString() + .replace(new RegExp('@nx/jest', 'g'), '@nrwl/jest') + ); + projectGraph = { dependencies: { ...existingGraph?.dependencies, diff --git a/packages/jest/src/migrations/update-15-8-0/update-tests-jest-29.spec.ts b/packages/jest/src/migrations/update-15-8-0/update-tests-jest-29.spec.ts index 1569b3b0d8129..f249e4cea8424 100644 --- a/packages/jest/src/migrations/update-15-8-0/update-tests-jest-29.spec.ts +++ b/packages/jest/src/migrations/update-15-8-0/update-tests-jest-29.spec.ts @@ -73,6 +73,7 @@ async function setup(tree: Tree, name: string) { const projectConfig = readProjectConfiguration(tree, name); projectConfig.targets['test'] = { ...projectConfig.targets['test'], + executor: '@nrwl/jest:jest', configurations: { ci: { ci: true, diff --git a/packages/jest/src/utils/__snapshots__/ast-utils.spec.ts.snap b/packages/jest/src/utils/__snapshots__/ast-utils.spec.ts.snap index e775958c0b328..a79c0ab46b6c7 100644 --- a/packages/jest/src/utils/__snapshots__/ast-utils.spec.ts.snap +++ b/packages/jest/src/utils/__snapshots__/ast-utils.spec.ts.snap @@ -2,7 +2,7 @@ exports[`Jest AST Utils addTransformerToConfig should add transformer to export default config 1`] = ` "export default { - transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' }, + transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest' }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'blah', preset: '../../jest.preset.js' @@ -20,7 +20,7 @@ transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '/tsconfig.spec exports[`Jest AST Utils addTransformerToConfig should add transformer to module.exports config 1`] = ` "module.exports = { - transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' }, + transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest' }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'blah', preset: '../../jest.preset.js' diff --git a/packages/jest/src/utils/ast-utils.spec.ts b/packages/jest/src/utils/ast-utils.spec.ts index 5d094e5458b41..9c3475454f30e 100644 --- a/packages/jest/src/utils/ast-utils.spec.ts +++ b/packages/jest/src/utils/ast-utils.spec.ts @@ -5,7 +5,7 @@ describe('Jest AST Utils', () => { const actual = addTransformerToConfig( `module.exports = { transform: { - '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' + '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest' }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'blah', @@ -21,7 +21,7 @@ describe('Jest AST Utils', () => { const actual = addTransformerToConfig( `export default { transform: { - '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' + '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest' }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'blah', diff --git a/packages/jest/src/utils/config/functions.spec.ts b/packages/jest/src/utils/config/functions.spec.ts index a891a8b49927f..c6f3665bcae56 100644 --- a/packages/jest/src/utils/config/functions.spec.ts +++ b/packages/jest/src/utils/config/functions.spec.ts @@ -98,7 +98,7 @@ describe('jestConfigObject', () => { it('should handle spread assignments', () => { const content = ` - import { nxPreset } from '@nrwl/jest/preset'; + import { nxPreset } from '@nx/jest/preset'; export default { ...nxPreset, diff --git a/packages/jest/src/utils/config/get-jest-projects.spec.ts b/packages/jest/src/utils/config/get-jest-projects.spec.ts index cd54ac3e0a91d..6cc89ea246cd3 100644 --- a/packages/jest/src/utils/config/get-jest-projects.spec.ts +++ b/packages/jest/src/utils/config/get-jest-projects.spec.ts @@ -10,7 +10,7 @@ describe('getJestProjects', () => { root: 'blah', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'test/jest/config/location/jest.config.js', }, @@ -36,7 +36,7 @@ describe('getJestProjects', () => { root: 'blah', targets: { 'test-with-jest': { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'test/jest/config/location/jest.config.js', }, @@ -62,7 +62,7 @@ describe('getJestProjects', () => { root: '.', targets: { test: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'jest.config.app.js', }, @@ -86,7 +86,7 @@ describe('getJestProjects', () => { root: 'blah', targets: { 'test-with-jest': { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'test/jest/config/location/jest.config.js', }, @@ -118,7 +118,7 @@ describe('getJestProjects', () => { root: 'blah', targets: { 'test-with-jest': { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', options: { jestConfig: 'test/jest/config/location/jest.config.js', }, diff --git a/packages/jest/src/utils/config/get-jest-projects.ts b/packages/jest/src/utils/config/get-jest-projects.ts index 27d5e0eb19b30..910e6f6bec7be 100644 --- a/packages/jest/src/utils/config/get-jest-projects.ts +++ b/packages/jest/src/utils/config/get-jest-projects.ts @@ -2,8 +2,6 @@ import { join } from 'path'; import type { ProjectsConfigurations } from '@nx/devkit'; import { readWorkspaceConfig } from 'nx/src/project-graph/file-utils'; -const JEST_RUNNER_TOKEN = '@nrwl/jest:jest'; - function getJestConfigProjectPath(projectJestConfigPath: string): string { return join('', projectJestConfigPath); } @@ -30,7 +28,10 @@ export function getJestProjects() { continue; } for (const targetConfiguration of Object.values(projectConfig.targets)) { - if (targetConfiguration.executor !== JEST_RUNNER_TOKEN) { + if ( + targetConfiguration.executor !== '@nx/jest:jest' && + targetConfiguration.executor !== '@nrwl/jest:jest' + ) { continue; } if (targetConfiguration.options?.jestConfig) { diff --git a/packages/js/src/generators/library/library.spec.ts b/packages/js/src/generators/library/library.spec.ts index b5410e96e6cbc..3db38105d6a4e 100644 --- a/packages/js/src/generators/library/library.spec.ts +++ b/packages/js/src/generators/library/library.spec.ts @@ -422,10 +422,8 @@ describe('lib', () => { const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies['eslint']).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/linter']).toBeDefined(); - expect( - packageJson.devDependencies['@nrwl/eslint-plugin-nx'] - ).toBeDefined(); + expect(packageJson.devDependencies['@nx/linter']).toBeDefined(); + expect(packageJson.devDependencies['@nx/eslint-plugin-nx']).toBeDefined(); }); describe('not nested', () => { @@ -435,7 +433,7 @@ describe('lib', () => { name: 'myLib', }); expect(readProjectConfiguration(tree, 'my-lib').targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-lib/**/*.ts'], @@ -499,7 +497,7 @@ describe('lib', () => { expect( readProjectConfiguration(tree, 'my-dir-my-lib').targets.lint ).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-dir/my-lib/**/*.ts'], @@ -1073,10 +1071,10 @@ describe('lib', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.targets.build).toMatchObject({ - executor: '@nrwl/vite:build', + executor: '@nx/vite:build', }); expect(project.targets.test).toMatchObject({ - executor: '@nrwl/vite:test', + executor: '@nx/vite:test', }); expect(tree.exists('libs/my-lib/vite.config.ts')).toBeTruthy(); }); @@ -1084,7 +1082,7 @@ describe('lib', () => { it.each` unitTestRunner | executor ${'none'} | ${undefined} - ${'jest'} | ${'@nrwl/jest:jest'} + ${'jest'} | ${'@nx/jest:jest'} `( 'should respect unitTestRunner if passed', async ({ unitTestRunner, executor }) => { diff --git a/packages/js/src/generators/library/library.ts b/packages/js/src/generators/library/library.ts index 1de8b1f5d272d..b39037738103c 100644 --- a/packages/js/src/generators/library/library.ts +++ b/packages/js/src/generators/library/library.ts @@ -545,7 +545,7 @@ function addProjectDependencies( return addDependenciesToPackageJson( tree, {}, - { '@nrwl/rollup': nxVersion, '@types/node': typesNodeVersion } + { '@nx/rollup': nxVersion, '@types/node': typesNodeVersion } ); } diff --git a/packages/js/src/migrations/update-15-8-0/rename-swcrc-config.spec.ts b/packages/js/src/migrations/update-15-8-0/rename-swcrc-config.spec.ts index 6637421added3..edeb8e7eb5fbd 100644 --- a/packages/js/src/migrations/update-15-8-0/rename-swcrc-config.spec.ts +++ b/packages/js/src/migrations/update-15-8-0/rename-swcrc-config.spec.ts @@ -65,6 +65,10 @@ async function setup(tree: Tree) { config: 'project', }); + const projectConfig = readProjectConfiguration(tree, 'my-lib'); + projectConfig.targets.test.executor = '@nrwl/jest:jest'; + updateProjectConfiguration(tree, 'my-lib', projectConfig); + tree.rename('libs/my-lib/.swcrc', 'libs/my-lib/.lib.swcrc'); tree.write( 'libs/my-lib/jest.config.ts', diff --git a/packages/linter/.eslintrc.json b/packages/linter/.eslintrc.json index 6c7a3539d988a..656f32bca812c 100644 --- a/packages/linter/.eslintrc.json +++ b/packages/linter/.eslintrc.json @@ -10,7 +10,7 @@ "files": ["**/*.ts"], "excludedFiles": ["./src/migrations/**"], "rules": { - "no-restricted-imports": ["error", "@nrwl/workspace"] + "no-restricted-imports": ["error", "@nx/workspace"] } }, { diff --git a/packages/linter/index.ts b/packages/linter/index.ts index 8cb80da42c0fb..3186ba51b5c0d 100644 --- a/packages/linter/index.ts +++ b/packages/linter/index.ts @@ -3,7 +3,7 @@ export { lintInitGenerator } from './src/generators/init/init'; export { Linter } from './src/generators/utils/linter'; export * from './src/utils/convert-tslint-to-eslint'; -// @nrwl/angular needs it for the Angular CLI workspace migration to Nx to +// @nx/angular needs it for the Angular CLI workspace migration to Nx to // infer whether a config is using type aware rules and set the -// `hasTypeAwareRules` option of the `@nrwl/linter:eslint` executor. +// `hasTypeAwareRules` option of the `@nx/linter:eslint` executor. export { hasRulesRequiringTypeChecking } from './src/utils/rules-requiring-type-checking'; diff --git a/packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap index 6a778fa8af1dd..85d2764097a50 100644 --- a/packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap +++ b/packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/linter:init --linter eslint should generate the global eslint config 1`] = ` +exports[`@nx/linter:init --linter eslint should generate the global eslint config 1`] = ` "{ "root": true, "ignorePatterns": [ "**/*" ], "plugins": [ - "@nrwl/nx" + "@nx/nx" ], "overrides": [ { @@ -18,7 +18,7 @@ exports[`@nrwl/linter:init --linter eslint should generate the global eslint con "*.jsx" ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "enforceBuildableLibDependency": true, @@ -41,7 +41,7 @@ exports[`@nrwl/linter:init --linter eslint should generate the global eslint con "*.tsx" ], "extends": [ - "plugin:@nrwl/nx/typescript" + "plugin:@nx/nx/typescript" ], "rules": {} }, @@ -51,7 +51,7 @@ exports[`@nrwl/linter:init --linter eslint should generate the global eslint con "*.jsx" ], "extends": [ - "plugin:@nrwl/nx/javascript" + "plugin:@nx/nx/javascript" ], "rules": {} } diff --git a/packages/linter/src/generators/init/global-eslint-config.ts b/packages/linter/src/generators/init/global-eslint-config.ts index c387d3bdaa669..ed40159d6ccdd 100644 --- a/packages/linter/src/generators/init/global-eslint-config.ts +++ b/packages/linter/src/generators/init/global-eslint-config.ts @@ -6,7 +6,7 @@ import { ESLint, Linter as LinterType } from 'eslint'; */ export const globalTypeScriptOverrides = { files: ['*.ts', '*.tsx'], - extends: ['plugin:@nrwl/nx/typescript'], + extends: ['plugin:@nx/nx/typescript'], /** * Having an empty rules object present makes it more obvious to the user where they would * extend things from if they needed to @@ -20,7 +20,7 @@ export const globalTypeScriptOverrides = { */ export const globalJavaScriptOverrides = { files: ['*.js', '*.jsx'], - extends: ['plugin:@nrwl/nx/javascript'], + extends: ['plugin:@nx/nx/javascript'], /** * Having an empty rules object present makes it more obvious to the user where they would * extend things from if they needed to @@ -35,7 +35,7 @@ export const globalJavaScriptOverrides = { export const moduleBoundariesOverride = { files: ['*.ts', '*.tsx', '*.js', '*.jsx'], rules: { - '@nrwl/nx/enforce-module-boundaries': [ + '@nx/nx/enforce-module-boundaries': [ 'error', { enforceBuildableLibDependency: true, @@ -53,7 +53,7 @@ export const getGlobalEsLintConfiguration = ( const config: ESLint.ConfigData = { root: true, ignorePatterns: rootProject ? ['!**/*'] : ['**/*'], - plugins: ['@nrwl/nx'], + plugins: ['@nx/nx'], /** * We leverage ESLint's "overrides" capability so that we can set up a root config which will support * all permutations of Nx workspaces across all frameworks, libraries and tools. diff --git a/packages/linter/src/generators/init/init-migration.ts b/packages/linter/src/generators/init/init-migration.ts index 6169b75691151..ff08d5331322f 100644 --- a/packages/linter/src/generators/init/init-migration.ts +++ b/packages/linter/src/generators/init/init-migration.ts @@ -40,7 +40,9 @@ export function findLintTarget( ): TargetConfiguration { return Object.entries(project.targets ?? {}).find( ([name, target]) => - name === 'lint' || target.executor === '@nrwl/linter:eslint' + name === 'lint' || + target.executor === '@nx/linter:eslint' || + target.executor === '@nrwl/linter:eslint' )?.[1]; } @@ -54,7 +56,9 @@ function migrateEslintFile(projectEslintPath: string, tree: Tree) { delete json.root; // remove nrwl/nx plugins if (json.plugins) { - json.plugins = json.plugins.filter((p) => p !== '@nrwl/nx'); + json.plugins = json.plugins.filter( + (p) => p !== '@nx/nx' && p !== '@nrwl/nx' + ); if (json.plugins.length === 0) { delete json.plugins; } @@ -73,7 +77,9 @@ function migrateEslintFile(projectEslintPath: string, tree: Tree) { if (override.extends) { override.extends = override.extends.filter( (ext) => + ext !== 'plugin:@nx/nx/typescript' && ext !== 'plugin:@nrwl/nx/typescript' && + ext !== 'plugin:@nx/nx/javascript' && ext !== 'plugin:@nrwl/nx/javascript' ); if (override.extends.length === 0) { diff --git a/packages/linter/src/generators/init/init.spec.ts b/packages/linter/src/generators/init/init.spec.ts index 57385c9b9b5e8..4f579e5bb734f 100644 --- a/packages/linter/src/generators/init/init.spec.ts +++ b/packages/linter/src/generators/init/init.spec.ts @@ -3,7 +3,7 @@ import { readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintInitGenerator } from './init'; -describe('@nrwl/linter:init', () => { +describe('@nx/linter:init', () => { let tree: Tree; beforeEach(() => { diff --git a/packages/linter/src/generators/init/init.ts b/packages/linter/src/generators/init/init.ts index 7230f63d015c7..d78f8c5a531d2 100644 --- a/packages/linter/src/generators/init/init.ts +++ b/packages/linter/src/generators/init/init.ts @@ -53,7 +53,7 @@ function initEsLint(tree: Tree, options: LinterInitOptions): GeneratorCallback { } if (!options.skipPackageJson) { - removeDependenciesFromPackageJson(tree, ['@nrwl/linter'], []); + removeDependenciesFromPackageJson(tree, ['@nx/linter'], []); } writeJson( @@ -80,8 +80,8 @@ function initEsLint(tree: Tree, options: LinterInitOptions): GeneratorCallback { tree, {}, { - '@nrwl/linter': nxVersion, - '@nrwl/eslint-plugin-nx': nxVersion, + '@nx/linter': nxVersion, + '@nx/eslint-plugin-nx': nxVersion, '@typescript-eslint/parser': typescriptESLintVersion, '@typescript-eslint/eslint-plugin': typescriptESLintVersion, eslint: eslintVersion, diff --git a/packages/linter/src/generators/lint-project/__snapshots__/lint-project.spec.ts.snap b/packages/linter/src/generators/lint-project/__snapshots__/lint-project.spec.ts.snap index ea115fa27a7d4..7bc2691d567ce 100644 --- a/packages/linter/src/generators/lint-project/__snapshots__/lint-project.spec.ts.snap +++ b/packages/linter/src/generators/lint-project/__snapshots__/lint-project.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js when an .eslintrc.js already exist 1`] = ` +exports[`@nx/linter:lint-project --linter eslint should extend to .eslintrc.js when an .eslintrc.js already exist 1`] = ` "{ "extends": ["../../.eslintrc.js"], "ignorePatterns": ["!**/*"], @@ -22,7 +22,7 @@ exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js " `; -exports[`@nrwl/linter:lint-project --linter eslint should generate a eslint config 1`] = ` +exports[`@nx/linter:lint-project --linter eslint should generate a eslint config 1`] = ` "{ "extends": ["../../.eslintrc.json"], "ignorePatterns": ["!**/*"], diff --git a/packages/linter/src/generators/lint-project/lint-project.spec.ts b/packages/linter/src/generators/lint-project/lint-project.spec.ts index 9fcf5650a5b8c..cbc7f0d9ace38 100644 --- a/packages/linter/src/generators/lint-project/lint-project.spec.ts +++ b/packages/linter/src/generators/lint-project/lint-project.spec.ts @@ -8,7 +8,7 @@ import { Linter } from '../utils/linter'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintProjectGenerator } from './lint-project'; -describe('@nrwl/linter:lint-project', () => { +describe('@nx/linter:lint-project', () => { let tree: Tree; const defaultOptions = { @@ -51,7 +51,7 @@ describe('@nrwl/linter:lint-project', () => { const projectConfig = readProjectConfiguration(tree, 'test-lib'); expect(projectConfig.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "**/*.ts", diff --git a/packages/linter/src/generators/lint-project/lint-project.ts b/packages/linter/src/generators/lint-project/lint-project.ts index 0120f2e75bc55..4667991b549a2 100644 --- a/packages/linter/src/generators/lint-project/lint-project.ts +++ b/packages/linter/src/generators/lint-project/lint-project.ts @@ -102,7 +102,7 @@ export async function lintProjectGenerator( const projectConfig = readProjectConfiguration(tree, options.project); projectConfig.targets['lint'] = { - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: options.eslintFilePatterns, diff --git a/packages/linter/src/generators/utils/eslint-file.spec.ts b/packages/linter/src/generators/utils/eslint-file.spec.ts index 5185276a6b5d3..69f0859ae3f6a 100644 --- a/packages/linter/src/generators/utils/eslint-file.spec.ts +++ b/packages/linter/src/generators/utils/eslint-file.spec.ts @@ -7,7 +7,7 @@ import { import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -describe('@nrwl/linter:eslint-file', () => { +describe('@nx/linter:eslint-file', () => { let tree: Tree; beforeEach(() => { diff --git a/packages/linter/src/generators/utils/eslint-targets.ts b/packages/linter/src/generators/utils/eslint-targets.ts index 397d09deb8ae2..c7a9fa91edb37 100644 --- a/packages/linter/src/generators/utils/eslint-targets.ts +++ b/packages/linter/src/generators/utils/eslint-targets.ts @@ -3,6 +3,9 @@ import { forEachExecutorOptions } from '@nx/devkit/src/generators/executor-optio export function getEslintTargets(tree: Tree) { const eslintTargetNames = new Set(); + forEachExecutorOptions(tree, '@nx/linter:eslint', (_, __, target) => { + eslintTargetNames.add(target); + }); forEachExecutorOptions(tree, '@nrwl/linter:eslint', (_, __, target) => { eslintTargetNames.add(target); }); diff --git a/packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap b/packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap index cd9113ee3bd91..202da28a350cb 100644 --- a/packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap +++ b/packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a nested directory 1`] = ` +exports[`@nx/linter:workspace-rule --dir should support creating the rule in a nested directory 1`] = ` "/** * This file sets you up with structure needed for an ESLint rule. * @@ -19,7 +19,7 @@ exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a import { ESLintUtils } from '@typescript-eslint/utils'; -// NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/another-rule" +// NOTE: The rule will be available in ESLint configs as "@nx/nx/workspace/another-rule" export const RULE_NAME = 'another-rule'; export const rule = ESLintUtils.RuleCreator(() => __filename)({ @@ -41,7 +41,7 @@ export const rule = ESLintUtils.RuleCreator(() => __filename)({ " `; -exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a nested directory 2`] = ` +exports[`@nx/linter:workspace-rule --dir should support creating the rule in a nested directory 2`] = ` "import { TSESLint } from '@typescript-eslint/utils'; import { rule, RULE_NAME } from './another-rule'; @@ -56,7 +56,7 @@ ruleTester.run(RULE_NAME, rule, { " `; -exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a nested directory with multiple levels of nesting 1`] = ` +exports[`@nx/linter:workspace-rule --dir should support creating the rule in a nested directory with multiple levels of nesting 1`] = ` "/** * This file sets you up with structure needed for an ESLint rule. * @@ -75,7 +75,7 @@ exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a import { ESLintUtils } from '@typescript-eslint/utils'; -// NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/one-more-rule" +// NOTE: The rule will be available in ESLint configs as "@nx/nx/workspace/one-more-rule" export const RULE_NAME = 'one-more-rule'; export const rule = ESLintUtils.RuleCreator(() => __filename)({ @@ -97,7 +97,7 @@ export const rule = ESLintUtils.RuleCreator(() => __filename)({ " `; -exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a nested directory with multiple levels of nesting 2`] = ` +exports[`@nx/linter:workspace-rule --dir should support creating the rule in a nested directory with multiple levels of nesting 2`] = ` "import { TSESLint } from '@typescript-eslint/utils'; import { rule, RULE_NAME } from './one-more-rule'; @@ -112,7 +112,7 @@ ruleTester.run(RULE_NAME, rule, { " `; -exports[`@nrwl/linter:workspace-rule should generate the required files 1`] = ` +exports[`@nx/linter:workspace-rule should generate the required files 1`] = ` "/** * This file sets you up with structure needed for an ESLint rule. * @@ -131,7 +131,7 @@ exports[`@nrwl/linter:workspace-rule should generate the required files 1`] = ` import { ESLintUtils } from '@typescript-eslint/utils'; -// NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/my-rule" +// NOTE: The rule will be available in ESLint configs as "@nx/nx/workspace/my-rule" export const RULE_NAME = 'my-rule'; export const rule = ESLintUtils.RuleCreator(() => __filename)({ @@ -153,7 +153,7 @@ export const rule = ESLintUtils.RuleCreator(() => __filename)({ " `; -exports[`@nrwl/linter:workspace-rule should generate the required files 2`] = ` +exports[`@nx/linter:workspace-rule should generate the required files 2`] = ` "import { TSESLint } from '@typescript-eslint/utils'; import { rule, RULE_NAME } from './my-rule'; @@ -168,7 +168,7 @@ ruleTester.run(RULE_NAME, rule, { " `; -exports[`@nrwl/linter:workspace-rule should update the plugin index.ts with the new rule 1`] = ` +exports[`@nx/linter:workspace-rule should update the plugin index.ts with the new rule 1`] = ` "import { RULE_NAME as myRuleName, rule as myRule } from './rules/my-rule'; /** * Import your custom workspace rules at the top of this file. @@ -181,7 +181,7 @@ exports[`@nrwl/linter:workspace-rule should update the plugin index.ts with the * following generator command and provide your desired rule name: * * \`\`\`sh - * npx nx g @nrwl/linter:workspace-rule {{ NEW_RULE_NAME }} + * npx nx g @nx/linter:workspace-rule {{ NEW_RULE_NAME }} * \`\`\` */ diff --git a/packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ b/packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ index f4d25c4f5d25b..b60294a2859ed 100644 --- a/packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ +++ b/packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ @@ -16,7 +16,7 @@ import { ESLintUtils } from '@typescript-eslint/utils'; -// NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/<%= name %>" +// NOTE: The rule will be available in ESLint configs as "@nx/nx/workspace/<%= name %>" export const RULE_NAME = '<%= name %>'; export const rule = ESLintUtils.RuleCreator(() => __filename)({ diff --git a/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts b/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts index e7dfb7ae464af..ee4875fe82212 100644 --- a/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts +++ b/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts @@ -2,7 +2,7 @@ import { NxJsonConfiguration, readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintWorkspaceRuleGenerator } from './workspace-rule'; -describe('@nrwl/linter:workspace-rule', () => { +describe('@nx/linter:workspace-rule', () => { let tree: Tree; beforeEach(async () => { @@ -66,7 +66,7 @@ describe('@nrwl/linter:workspace-rule', () => { * following generator command and provide your desired rule name: * * \`\`\`sh - * npx nx g @nrwl/linter:workspace-rule {{ NEW_RULE_NAME }} + * npx nx g @nx/linter:workspace-rule {{ NEW_RULE_NAME }} * \`\`\` */ diff --git a/packages/linter/src/generators/workspace-rule/workspace-rule.ts b/packages/linter/src/generators/workspace-rule/workspace-rule.ts index 8a50b77fa3f86..51e69718e5543 100644 --- a/packages/linter/src/generators/workspace-rule/workspace-rule.ts +++ b/packages/linter/src/generators/workspace-rule/workspace-rule.ts @@ -109,7 +109,7 @@ export async function lintWorkspaceRuleGenerator( logger.info(`NX Reminder: Once you have finished writing your rule logic, you need to actually enable the rule within an appropriate .eslintrc.json in your workspace, for example: "rules": { - "@nrwl/nx/workspace/${options.name}": "error" + "@nx/nx/workspace/${options.name}": "error" } `); diff --git a/packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap b/packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap index 314589988d66b..5eeef76a58bb3 100644 --- a/packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap +++ b/packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/linter:workspace-rules-project should generate the required files 1`] = ` +exports[`@nx/linter:workspace-rules-project should generate the required files 1`] = ` "/** * Import your custom workspace rules at the top of this file. * @@ -12,7 +12,7 @@ exports[`@nrwl/linter:workspace-rules-project should generate the required files * following generator command and provide your desired rule name: * * \`\`\`sh - * npx nx g @nrwl/linter:workspace-rule {{ NEW_RULE_NAME }} + * npx nx g @nx/linter:workspace-rule {{ NEW_RULE_NAME }} * \`\`\` */ @@ -31,7 +31,7 @@ module.exports = { " `; -exports[`@nrwl/linter:workspace-rules-project should generate the required files 2`] = ` +exports[`@nx/linter:workspace-rules-project should generate the required files 2`] = ` "{ "extends": "../../tsconfig.base.json", "compilerOptions": { @@ -51,7 +51,7 @@ exports[`@nrwl/linter:workspace-rules-project should generate the required files " `; -exports[`@nrwl/linter:workspace-rules-project should generate the required files 3`] = ` +exports[`@nx/linter:workspace-rules-project should generate the required files 3`] = ` "{ "extends": "./tsconfig.json", "compilerOptions": { @@ -64,7 +64,7 @@ exports[`@nrwl/linter:workspace-rules-project should generate the required files " `; -exports[`@nrwl/linter:workspace-rules-project should generate the required files 4`] = ` +exports[`@nx/linter:workspace-rules-project should generate the required files 4`] = ` "{ "extends": "./tsconfig.json", "compilerOptions": { @@ -77,7 +77,7 @@ exports[`@nrwl/linter:workspace-rules-project should generate the required files " `; -exports[`@nrwl/linter:workspace-rules-project should generate the required files 5`] = ` +exports[`@nx/linter:workspace-rules-project should generate the required files 5`] = ` "/* eslint-disable */ export default { displayName: 'eslint-rules', diff --git a/packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ b/packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ index 79c806b39d943..192a7d8448526 100644 --- a/packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ +++ b/packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ @@ -1,24 +1,24 @@ /** * Import your custom workspace rules at the top of this file. - * + * * For example: - * + * * import { RULE_NAME as myCustomRuleName, rule as myCustomRule } from './rules/my-custom-rule'; - * + * * In order to quickly get started with writing rules you can use the * following generator command and provide your desired rule name: - * + * * ```sh - * npx nx g @nrwl/linter:workspace-rule {{ NEW_RULE_NAME }} + * npx nx g @nx/linter:workspace-rule {{ NEW_RULE_NAME }} * ``` */ module.exports = { /** * Apply the imported custom rules here. - * + * * For example (using the example import above): - * + * * rules: { * [myCustomRuleName]: myCustomRule * } diff --git a/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts b/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts index b06dc0186eb27..5525eacc6bd38 100644 --- a/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts +++ b/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts @@ -12,7 +12,7 @@ import { WORKSPACE_RULES_PROJECT_NAME, } from './workspace-rules-project'; -describe('@nrwl/linter:workspace-rules-project', () => { +describe('@nx/linter:workspace-rules-project', () => { let tree: Tree; beforeEach(() => { @@ -87,7 +87,7 @@ describe('@nrwl/linter:workspace-rules-project', () => { "codeCoverage": true, }, }, - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "tools/eslint-rules/jest.config.ts", "passWithNoTests": true, diff --git a/packages/linter/src/utils/convert-tslint-to-eslint/__snapshots__/project-converter.spec.ts.snap b/packages/linter/src/utils/convert-tslint-to-eslint/__snapshots__/project-converter.spec.ts.snap index 69428bcad4e6f..f8f5916a8c580 100644 --- a/packages/linter/src/utils/convert-tslint-to-eslint/__snapshots__/project-converter.spec.ts.snap +++ b/packages/linter/src/utils/convert-tslint-to-eslint/__snapshots__/project-converter.spec.ts.snap @@ -60,7 +60,7 @@ exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant "defaultBase": "main", }, "generators": { - "@nrwl/angular": { + "@nx/angular": { "application": { "linter": "tslint", }, @@ -90,12 +90,12 @@ exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant { "$schema": "../../node_modules/nx/schemas/project-schema.json", "generators": { - "@nrwl/angular:application": { + "@nx/angular:application": { "e2eTestRunner": "cypress", "linter": "eslint", "unitTestRunner": "jest", }, - "@nrwl/angular:library": { + "@nx/angular:library": { "linter": "tslint", }, }, @@ -153,7 +153,7 @@ exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant { "$schema": "../../node_modules/nx/schemas/project-schema.json", "generators": { - "@nrwl/angular:application": { + "@nx/angular:application": { "e2eTestRunner": "cypress", "unitTestRunner": "jest", }, @@ -184,7 +184,7 @@ exports[`ProjectConverter removeTSLintFromWorkspace() should remove the entry in "defaultBase": "main", }, "generators": { - "@nrwl/angular": { + "@nx/angular": { "convert-tslint-to-eslint": { "removeTSLintIfNoMoreTSLintTargets": true, }, @@ -235,7 +235,7 @@ exports[`ProjectConverter setDefaults() should save in nx.json 1`] = ` "defaultBase": "main", }, "generators": { - "@nrwl/angular": { + "@nx/angular": { "application": { "linter": "tslint", }, @@ -267,7 +267,7 @@ exports[`ProjectConverter setDefaults() should save in nx.json 2`] = ` "defaultBase": "main", }, "generators": { - "@nrwl/angular": { + "@nx/angular": { "application": { "linter": "tslint", }, @@ -303,7 +303,7 @@ exports[`ProjectConverter setDefaults() should save in nx.json 3`] = ` "defaultBase": "main", }, "generators": { - "@nrwl/angular": { + "@nx/angular": { "application": { "linter": "tslint", }, diff --git a/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.spec.ts b/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.spec.ts index 044ca66897f17..0902fa670c81b 100644 --- a/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.spec.ts +++ b/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.spec.ts @@ -63,7 +63,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['error', configFromNxExamplesRepo], }, }, @@ -76,7 +76,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['off', configFromNxExamplesRepo], }, }, @@ -89,7 +89,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['warn', configFromNxExamplesRepo], }, }, @@ -104,7 +104,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['error', configFromNxExamplesRepo], }, }, @@ -119,7 +119,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['warn', configFromNxExamplesRepo], }, }, @@ -134,7 +134,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['off', configFromNxExamplesRepo], }, }, @@ -150,7 +150,7 @@ describe('convertTslintNxRuleToEslintNxRule()', () => { }, }, expected: { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: ['warn', configFromNxExamplesRepo], }, }, diff --git a/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.ts b/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.ts index fcc7325c70e5f..9129045ae4ad0 100644 --- a/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.ts +++ b/packages/linter/src/utils/convert-tslint-to-eslint/convert-nx-enforce-module-boundaries-rule.ts @@ -73,7 +73,7 @@ export function convertTslintNxRuleToEslintNxRule( ); return { - ruleName: '@nrwl/nx/enforce-module-boundaries', + ruleName: '@nx/nx/enforce-module-boundaries', ruleConfig: [ruleSeverity, existingRuleConfig], }; } diff --git a/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.spec.ts b/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.spec.ts index 91082b918abf9..c2444c0792a8f 100644 --- a/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.spec.ts +++ b/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.spec.ts @@ -81,10 +81,10 @@ describe('ProjectConverter', () => { * Default set to tslint, using shorthand syntax */ generators: { - '@nrwl/angular:library': { + '@nx/angular:library': { linter: 'tslint', }, - '@nrwl/angular:application': { + '@nx/angular:application': { e2eTestRunner: 'cypress', linter: 'eslint', unitTestRunner: 'jest', @@ -297,7 +297,7 @@ describe('ProjectConverter', () => { const nxJson = readJson(host, 'nx.json'); nxJson.generators = { - '@nrwl/angular': { + '@nx/angular': { application: { linter: 'tslint', }, @@ -308,23 +308,23 @@ describe('ProjectConverter', () => { }; writeJson(host, 'nx.json', nxJson); - // BEFORE - no entry for convert-tslint-to-eslint wthin @nrwl/angular generators + // BEFORE - no entry for convert-tslint-to-eslint wthin @nx/angular generators expect(readJson(host, 'nx.json')).toMatchSnapshot(); - projectConverter.setDefaults('@nrwl/angular', { + projectConverter.setDefaults('@nx/angular', { ignoreExistingTslintConfig: true, removeTSLintIfNoMoreTSLintTargets: true, }); - // AFTER (1) - convert-tslint-to-eslint wthin @nrwl/angular generators has removeTSLintIfNoMoreTSLintTargets set to true + // AFTER (1) - convert-tslint-to-eslint wthin @nx/angular generators has removeTSLintIfNoMoreTSLintTargets set to true expect(readJson(host, 'nx.json')).toMatchSnapshot(); - projectConverter.setDefaults('@nrwl/angular', { + projectConverter.setDefaults('@nx/angular', { ignoreExistingTslintConfig: false, removeTSLintIfNoMoreTSLintTargets: false, }); - // AFTER (2) - convert-tslint-to-eslint wthin @nrwl/angular generators has removeTSLintIfNoMoreTSLintTargets set to false + // AFTER (2) - convert-tslint-to-eslint wthin @nx/angular generators has removeTSLintIfNoMoreTSLintTargets set to false expect(readJson(host, 'nx.json')).toMatchSnapshot(); }); }); @@ -353,7 +353,7 @@ describe('ProjectConverter', () => { const nxJson = readJson(host, 'nx.json'); // Not using shorthand syntax this time nxJson.generators = { - '@nrwl/angular': { + '@nx/angular': { application: { linter: 'tslint', }, @@ -367,7 +367,7 @@ describe('ProjectConverter', () => { // BEFORE - tslint and codelyzer are present expect(readJson(host, 'package.json')).toMatchSnapshot(); - // BEFORE - tslint set as both global linter for @nrwl/angular generators + // BEFORE - tslint set as both global linter for @nx/angular generators expect(readJson(host, 'nx.json')).toMatchSnapshot(); expect(readProjectConfiguration(host, projectName)).toMatchSnapshot(); @@ -397,7 +397,7 @@ describe('ProjectConverter', () => { const nxJson = readJson(host, 'nx.json'); nxJson.generators = { - '@nrwl/angular': { + '@nx/angular': { 'convert-tslint-to-eslint': { removeTSLintIfNoMoreTSLintTargets: true, }, @@ -405,7 +405,7 @@ describe('ProjectConverter', () => { }; writeJson(host, 'nx.json', nxJson); - // BEFORE - convert-tslint-to-eslint wthin @nrwl/angular generators has a value for removeTSLintIfNoMoreTSLintTargets + // BEFORE - convert-tslint-to-eslint wthin @nx/angular generators has a value for removeTSLintIfNoMoreTSLintTargets expect(readJson(host, 'nx.json')).toMatchSnapshot(); await projectConverter.removeTSLintFromWorkspace()(); diff --git a/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts b/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts index 96ab2804a4adf..cbcb737361cae 100644 --- a/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts +++ b/packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts @@ -35,7 +35,7 @@ export interface ConvertTSLintToESLintSchema { /** * When we convert a TSLint setup to an ESLint setup for a particular project, there are a number of - * shared/common concerns (implemented as library utilities within @nrwl/linter), and a few things + * shared/common concerns (implemented as library utilities within @nx/linter), and a few things * which are specific to this package and the types of projects it produces. * * The key structure of the converted ESLint support is as follows: @@ -192,9 +192,9 @@ export class ProjectConverter { /** * The only piece of the converted root tslint.json that we need to pull out to * apply to the existing overrides within the root .eslintrc.json is the - * @nrwl/nx/enforce-module-boundaries rule. + * @nx/nx/enforce-module-boundaries rule. */ - const nxRuleName = '@nrwl/nx/enforce-module-boundaries'; + const nxRuleName = '@nx/nx/enforce-module-boundaries'; const nxEnforceModuleBoundariesRule = convertedRootESLintConfig.rules[nxRuleName]; if (nxEnforceModuleBoundariesRule) { @@ -516,7 +516,10 @@ export class ProjectConverter { const projects = getProjects(this.host); for (const [projectName, projectConfig] of projects.entries()) { for (const [, targetConfig] of Object.entries(projectConfig.targets)) { - if (targetConfig.executor === '@nrwl/cypress:cypress') { + if ( + targetConfig.executor === '@nx/cypress:cypress' || + targetConfig.executor === '@nrwl/cypress:cypress' + ) { if ( targetConfig.options.devServerTarget === `${this.projectName}:serve` ) { diff --git a/packages/nest/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap b/packages/nest/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap index a4772bb2ec3c0..13c6575fa9a86 100644 --- a/packages/nest/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap +++ b/packages/nest/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap @@ -4,8 +4,8 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 1`] = ` { "dependencies": {}, "devDependencies": { - "@nrwl/eslint-plugin-nx": "0.0.1", - "@nrwl/linter": "0.0.1", + "@nx/eslint-plugin-nx": "0.0.1", + "@nx/linter": "0.0.1", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "eslint": "~8.15.0", @@ -24,7 +24,7 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 2`] = ` "root": "apps/nest-app-1", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/nest-app-1/**/*.ts", @@ -52,7 +52,7 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = ` "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -130,7 +130,7 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -140,7 +140,7 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -237,7 +237,7 @@ exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = ` }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } @@ -289,8 +289,8 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 1`] = ` { "dependencies": {}, "devDependencies": { - "@nrwl/eslint-plugin-nx": "0.0.1", - "@nrwl/linter": "0.0.1", + "@nx/eslint-plugin-nx": "0.0.1", + "@nx/linter": "0.0.1", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "eslint": "~8.15.0", @@ -309,7 +309,7 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 2`] = ` "root": "libs/nest-lib-1", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/nest-lib-1/**/*.ts", @@ -337,7 +337,7 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = ` "*.jsx", ], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/nx/enforce-module-boundaries": [ "error", { "allow": [ @@ -415,7 +415,7 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/typescript", + "plugin:@nx/nx/typescript", ], "files": [ "*.ts", @@ -425,7 +425,7 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = ` }, { "extends": [ - "plugin:@nrwl/nx/javascript", + "plugin:@nx/nx/javascript", ], "files": [ "*.js", @@ -522,7 +522,7 @@ exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = ` }, ], "plugins": [ - "@nrwl/nx", + "@nx/nx", ], "root": true, } diff --git a/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap b/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap index 99611ebfa79a3..a25862919f781 100644 --- a/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap +++ b/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap @@ -47,7 +47,7 @@ exports[`lib --unit-test-runner none should not generate test configuration 1`] exports[`lib --unit-test-runner none should not generate test configuration 2`] = ` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/my-lib/**/*.ts", diff --git a/packages/nest/src/generators/library/library.spec.ts b/packages/nest/src/generators/library/library.spec.ts index 4245a656348b3..10e1c04592326 100644 --- a/packages/nest/src/generators/library/library.spec.ts +++ b/packages/nest/src/generators/library/library.spec.ts @@ -22,14 +22,14 @@ describe('lib', () => { expect(config.root).toEqual(`libs/${libFileName}`); expect(config.targets.build).toBeUndefined(); expect(config.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: [`libs/${libFileName}/**/*.ts`], }, }); expect(config.targets.test).toEqual({ - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: [`{workspaceRoot}/coverage/{projectRoot}`], options: { jestConfig: `libs/${libFileName}/jest.config.ts`, @@ -89,13 +89,6 @@ describe('lib', () => { service: true, }); - console.log( - tree.read( - `libs/${libFileName}/src/lib/${libFileName}.controller.spec.ts`, - 'utf-8' - ) - ); - expect( tree.read( `libs/${libFileName}/src/lib/${libFileName}.module.ts`, @@ -219,7 +212,7 @@ describe('lib', () => { const project = readProjectConfiguration(tree, nestedLibFileName); expect(project.root).toEqual(`libs/${dirFileName}/${libFileName}`); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: [`libs/${dirFileName}/${libFileName}/**/*.ts`], diff --git a/packages/node/src/generators/application/application.spec.ts b/packages/node/src/generators/application/application.spec.ts index 50146a0d89263..e09a3d28ca25a 100644 --- a/packages/node/src/generators/application/application.spec.ts +++ b/packages/node/src/generators/application/application.spec.ts @@ -11,8 +11,6 @@ import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { applicationGenerator as angularApplicationGenerator } from '@nx/angular/generators'; import { Schema } from './schema'; import { applicationGenerator } from './application'; -import { overrideCollectionResolutionForTesting } from '@nx/devkit/ngcli-adapter'; -import { join } from 'path'; describe('app', () => { let tree: Tree; @@ -20,22 +18,9 @@ describe('app', () => { beforeEach(() => { tree = createTreeWithEmptyWorkspace(); - overrideCollectionResolutionForTesting({ - '@nrwl/cypress': join(__dirname, '../../../../cypress/generators.json'), - '@nrwl/jest': join(__dirname, '../../../../jest/generators.json'), - '@nrwl/workspace': join( - __dirname, - '../../../../workspace/generators.json' - ), - '@nrwl/angular': join(__dirname, '../../../../angular/generators.json'), - }); jest.clearAllMocks(); }); - afterEach(() => { - overrideCollectionResolutionForTesting(null); - }); - describe('not nested', () => { it('should update project config', async () => { await applicationGenerator(tree, { @@ -47,7 +32,7 @@ describe('app', () => { expect(project.targets).toEqual( expect.objectContaining({ build: { - executor: '@nrwl/webpack:webpack', + executor: '@nx/webpack:webpack', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -83,7 +68,7 @@ describe('app', () => { }) ); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-node-app/**/*.ts'], @@ -203,7 +188,7 @@ describe('app', () => { expect(project.root).toEqual('my-dir/my-node-app'); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-node-app/**/*.ts'], @@ -293,7 +278,7 @@ describe('app', () => { expect(project.targets.test).toBeUndefined(); expect(project.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "my-node-app/**/*.ts", diff --git a/packages/node/src/generators/application/application.ts b/packages/node/src/generators/application/application.ts index 4ff34e1621387..68829533a5e90 100644 --- a/packages/node/src/generators/application/application.ts +++ b/packages/node/src/generators/application/application.ts @@ -57,7 +57,7 @@ function getWebpackBuildConfig( options: NormalizedSchema ): TargetConfiguration { return { - executor: `@nrwl/webpack:webpack`, + executor: `@nx/webpack:webpack`, outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -93,7 +93,7 @@ function getEsBuildConfig( options: NormalizedSchema ): TargetConfiguration { return { - executor: '@nrwl/esbuild:esbuild', + executor: '@nx/esbuild:esbuild', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -295,7 +295,7 @@ function addProjectDependencies( ): GeneratorCallback { const bundlers = { webpack: { - '@nrwl/webpack': nxVersion, + '@nx/webpack': nxVersion, }, esbuild: { '@nrwl/esbuild': nxVersion, diff --git a/packages/node/src/generators/e2e-project/e2e-project.ts b/packages/node/src/generators/e2e-project/e2e-project.ts index 309f449b6a46e..5785a9e2ea6c9 100644 --- a/packages/node/src/generators/e2e-project/e2e-project.ts +++ b/packages/node/src/generators/e2e-project/e2e-project.ts @@ -36,7 +36,7 @@ export async function e2eProjectGenerator(host: Tree, _options: Schema) { implicitDependencies: [options.project], targets: { e2e: { - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: ['{workspaceRoot}/coverage/{e2eProjectRoot}'], options: { jestConfig: `${options.e2eProjectRoot}/jest.config.ts`, @@ -113,7 +113,7 @@ export async function e2eProjectGenerator(host: Tree, _options: Schema) { updateJson(host, join(options.e2eProjectRoot, '.eslintrc.json'), (json) => { if (options.rootProject) { - json.plugins = ['@nrwl/nx']; + json.plugins = ['@nx/nx']; json.extends = []; } json.overrides = [ diff --git a/packages/node/src/generators/library/library.spec.ts b/packages/node/src/generators/library/library.spec.ts index 101301a79d27b..65c98c0a49534 100644 --- a/packages/node/src/generators/library/library.spec.ts +++ b/packages/node/src/generators/library/library.spec.ts @@ -28,14 +28,14 @@ describe('lib', () => { expect(configuration.root).toEqual('libs/my-lib'); expect(configuration.targets.build).toBeUndefined(); expect(configuration.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-lib/**/*.ts'], }, }); expect(configuration.targets.test).toEqual({ - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: ['{workspaceRoot}/coverage/{projectRoot}'], options: { jestConfig: 'libs/my-lib/jest.config.ts', @@ -228,7 +228,7 @@ describe('lib', () => { const project = readProjectConfiguration(tree, 'my-dir-my-lib'); expect(project.root).toEqual('libs/my-dir/my-lib'); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-dir/my-lib/**/*.ts'], diff --git a/packages/nx-plugin/src/generators/e2e-project/e2e.spec.ts b/packages/nx-plugin/src/generators/e2e-project/e2e.spec.ts index ceea685e40e99..25577a106592b 100644 --- a/packages/nx-plugin/src/generators/e2e-project/e2e.spec.ts +++ b/packages/nx-plugin/src/generators/e2e-project/e2e.spec.ts @@ -167,7 +167,7 @@ describe('NxPlugin e2e-project Generator', () => { const projectsConfigurations = getProjects(tree); expect(projectsConfigurations.get('my-plugin-e2e').targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['apps/my-plugin-e2e/**/*.ts'], diff --git a/packages/nx-plugin/src/generators/lint-checks/generator.spec.ts b/packages/nx-plugin/src/generators/lint-checks/generator.spec.ts index b527129391b27..8c1b59fbf37ee 100644 --- a/packages/nx-plugin/src/generators/lint-checks/generator.spec.ts +++ b/packages/nx-plugin/src/generators/lint-checks/generator.spec.ts @@ -59,7 +59,7 @@ describe('lint-checks generator', () => { './generators.json', ]), rules: { - '@nrwl/nx/nx-plugin-checks': 'error', + '@nx/nx/nx-plugin-checks': 'error', }, }) ); @@ -83,9 +83,7 @@ describe('lint-checks generator', () => { ); expect( - eslintConfig.overrides.filter( - (x) => '@nrwl/nx/nx-plugin-checks' in x.rules - ) + eslintConfig.overrides.filter((x) => '@nx/nx/nx-plugin-checks' in x.rules) ).toHaveLength(1); }); @@ -140,7 +138,7 @@ describe('lint-checks generator', () => { './migrations.json', ]), rules: { - '@nrwl/nx/nx-plugin-checks': 'error', + '@nx/nx/nx-plugin-checks': 'error', }, }) ); diff --git a/packages/nx-plugin/src/generators/lint-checks/generator.ts b/packages/nx-plugin/src/generators/lint-checks/generator.ts index 880e5bb82fefe..56fd064972e2f 100644 --- a/packages/nx-plugin/src/generators/lint-checks/generator.ts +++ b/packages/nx-plugin/src/generators/lint-checks/generator.ts @@ -203,7 +203,7 @@ function updateProjectEslintConfig( ].filter((f) => !!f), parser: 'jsonc-eslint-parser', rules: { - '@nrwl/nx/nx-plugin-checks': 'error', + '@nx/nx/nx-plugin-checks': 'error', }, }); } diff --git a/packages/nx-plugin/src/generators/plugin/plugin.spec.ts b/packages/nx-plugin/src/generators/plugin/plugin.spec.ts index f901c3d69eda0..715ad149fec9b 100644 --- a/packages/nx-plugin/src/generators/plugin/plugin.spec.ts +++ b/packages/nx-plugin/src/generators/plugin/plugin.spec.ts @@ -67,7 +67,7 @@ describe('NxPlugin Plugin Generator', () => { }, }); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: expect.arrayContaining([ @@ -79,7 +79,7 @@ describe('NxPlugin Plugin Generator', () => { }, }); expect(project.targets.test).toEqual({ - executor: '@nrwl/jest:jest', + executor: '@nx/jest:jest', outputs: ['{workspaceRoot}/coverage/{projectRoot}'], options: { jestConfig: 'libs/my-plugin/jest.config.ts', diff --git a/packages/nx-plugin/src/migrations/update-15-9-0/__snapshots__/update-configs-jest-29.spec.ts.snap b/packages/nx-plugin/src/migrations/update-15-9-0/__snapshots__/update-configs-jest-29.spec.ts.snap index eb7b1fd95d321..beee6714d1cb0 100644 --- a/packages/nx-plugin/src/migrations/update-15-9-0/__snapshots__/update-configs-jest-29.spec.ts.snap +++ b/packages/nx-plugin/src/migrations/update-15-9-0/__snapshots__/update-configs-jest-29.spec.ts.snap @@ -323,11 +323,12 @@ exports[`Nx Plugin Migration - jest 29 update configs should work if not using t transform: { '^.+\\\\.[tj]sx?$': 'babel-jest', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', -};" +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work if not using ts-jest transformer 2`] = ` @@ -335,11 +336,12 @@ exports[`Nx Plugin Migration - jest 29 update configs should work if not using t transform: { '^.+\\\\.[tj]sx?$': 'babel-jest', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', -};" +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 1`] = ` @@ -347,63 +349,74 @@ exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat transform: { '^.+\\\\.[tj]sx?$': 'babel-jest', }, - globals: { something: 'else', -abc: [1234, true, {abc: 'yes'}] }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + globals: { something: 'else', abc: [1234, true, { abc: 'yes' }] }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', - snapshotFormat: {escapeString: false, printBasicPrototype: true} -};" + snapshotFormat: { escapeString: false, printBasicPrototype: true }, +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 2`] = ` "module.exports = { transform: { - '^.+\\\\.[tj]sx?$': ['ts-jest', { - tsconfig: '/tsconfig.spec.json' - }], + '^.+\\\\.[tj]sx?$': [ + 'ts-jest', + { + tsconfig: '/tsconfig.spec.json', + }, + ], }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', - globals: { something: 'else', -abc: [1234, true, {abc: 'yes'}] }, - snapshotFormat: {escapeString: false, printBasicPrototype: true} -};" + globals: { something: 'else', abc: [1234, true, { abc: 'yes' }] }, + snapshotFormat: { escapeString: false, printBasicPrototype: true }, +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work with jest-preset-angular 1`] = ` "export default { - globals: { }, + globals: {}, transform: { - '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }], + '^.+.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + tsconfig: '/tsconfig.spec.json', + stringifyContentPathRegex: '.(html|svg)$', + }, + ], }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', -};" +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work with jest-preset-angular 2`] = ` "module.exports = { - globals: { }, + globals: {}, transform: { - '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }], + '^.+.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + tsconfig: '/tsconfig.spec.json', + stringifyContentPathRegex: '.(html|svg)$', + }, + ], }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', -};" +}; +" `; exports[`Nx Plugin Migration - jest 29 update configs should work with multiple projects + configs 1`] = ` diff --git a/packages/nx-plugin/src/migrations/update-15-9-0/update-configs-jest-29.spec.ts b/packages/nx-plugin/src/migrations/update-15-9-0/update-configs-jest-29.spec.ts index 67cce2e2405d0..6c09b939ca3f0 100644 --- a/packages/nx-plugin/src/migrations/update-15-9-0/update-configs-jest-29.spec.ts +++ b/packages/nx-plugin/src/migrations/update-15-9-0/update-configs-jest-29.spec.ts @@ -221,7 +221,7 @@ module.exports = { transform: { '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -239,7 +239,7 @@ module.exports = { transform: { '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -266,7 +266,7 @@ module.exports = { transform: { '^.+\\\\.[tj]sx?$': 'babel-jest', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -278,7 +278,7 @@ module.exports = { transform: { '^.+\\\\.[tj]sx?$': 'babel-jest', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -313,7 +313,7 @@ module.exports = { something: 'else', abc: [1234, true, {abc: 'yes'}] }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -326,7 +326,7 @@ module.exports = { transform: { '^.+\\\\.[tj]sx?$': 'ts-jest', }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], displayName: 'jest', testEnvironment: 'node', preset: '../../jest.preset.js', @@ -448,6 +448,22 @@ preset: '../../jest.preset.js' ` ); + tree.write( + 'jest.config.ts', + tree + .read('jest.config.ts') + .toString() + .replace(new RegExp('@nx/jest', 'g'), '@nrwl/jest') + ); + + tree.write( + 'jest.preset.js', + tree + .read('jest.preset.js') + .toString() + .replace(new RegExp('@nx/jest', 'g'), '@nrwl/jest') + ); + projectGraph = { dependencies: { ...existingGraph?.dependencies, diff --git a/packages/react-native/src/generators/library/library.spec.ts b/packages/react-native/src/generators/library/library.spec.ts index fa02cf2e9dbfd..7bf0509a9dd3e 100644 --- a/packages/react-native/src/generators/library/library.spec.ts +++ b/packages/react-native/src/generators/library/library.spec.ts @@ -33,7 +33,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('libs/my-lib'); expect(projectConfiguration.targets.build).toBeUndefined(); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -159,7 +159,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('libs/my-dir/my-lib'); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -235,7 +235,7 @@ describe('lib', () => { const projectConfiguration = readProjectConfiguration(appTree, 'my-lib'); expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.lint).toMatchObject({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', options: { lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'], }, diff --git a/packages/react-native/src/utils/add-linting.spec.ts b/packages/react-native/src/utils/add-linting.spec.ts index 749b47794a060..f233d7bf1307f 100644 --- a/packages/react-native/src/utils/add-linting.spec.ts +++ b/packages/react-native/src/utils/add-linting.spec.ts @@ -25,7 +25,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nrwl/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/react/src/generators/application/application.spec.ts b/packages/react/src/generators/application/application.spec.ts index e005ff1179147..6452b959f0a49 100644 --- a/packages/react/src/generators/application/application.spec.ts +++ b/packages/react/src/generators/application/application.spec.ts @@ -365,7 +365,7 @@ describe('app', () => { const projectsConfigurations = getProjects(appTree); const targetConfig = projectsConfigurations.get('my-app').targets; - expect(targetConfig.build.executor).toEqual('@nrwl/vite:build'); + expect(targetConfig.build.executor).toEqual('@nx/vite:build'); expect(targetConfig.build.outputs).toEqual(['{options.outputPath}']); expect(targetConfig.build.options).toEqual({ outputPath: 'dist/apps/my-app', @@ -407,7 +407,7 @@ describe('app', () => { const projectsConfigurations = getProjects(appTree); const targetConfig = projectsConfigurations.get('my-app').targets; - expect(targetConfig.serve.executor).toEqual('@nrwl/vite:dev-server'); + expect(targetConfig.serve.executor).toEqual('@nx/vite:dev-server'); expect(targetConfig.serve.options).toEqual({ buildTarget: 'my-app:build', }); @@ -422,7 +422,7 @@ describe('app', () => { const projectsConfigurations = getProjects(appTree); expect(projectsConfigurations.get('my-app').targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['apps/my-app/**/*.{ts,tsx,js,jsx}'], @@ -446,7 +446,7 @@ describe('app', () => { expect(projectsConfigurations.get('my-app').targets.lint) .toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app/**/*.{ts,tsx,js,jsx}", @@ -514,8 +514,8 @@ describe('app', () => { const packageJson = readJson(appTree, '/package.json'); expect(packageJson.devDependencies.eslint).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/linter']).toBeDefined(); - expect(packageJson.devDependencies['@nrwl/eslint-plugin-nx']).toBeDefined(); + expect(packageJson.devDependencies['@nx/linter']).toBeDefined(); + expect(packageJson.devDependencies['@nx/eslint-plugin-nx']).toBeDefined(); expect(packageJson.devDependencies['eslint-plugin-react']).toBeDefined(); expect( packageJson.devDependencies['eslint-plugin-react-hooks'] @@ -947,8 +947,8 @@ describe('app', () => { it('should setup targets with vite configuration', () => { const projectsConfigurations = getProjects(viteAppTree); const targetConfig = projectsConfigurations.get('my-app').targets; - expect(targetConfig.build.executor).toEqual('@nrwl/vite:build'); - expect(targetConfig.serve.executor).toEqual('@nrwl/vite:dev-server'); + expect(targetConfig.build.executor).toEqual('@nx/vite:build'); + expect(targetConfig.serve.executor).toEqual('@nx/vite:dev-server'); expect(targetConfig.serve.options).toEqual({ buildTarget: 'my-app:build', }); diff --git a/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts b/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts index fd70c035ac6c9..bb6c4d7041278 100644 --- a/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts +++ b/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts @@ -153,7 +153,7 @@ describe('React:CypressComponentTestConfiguration', () => { expect( readProjectConfiguration(tree, 'some-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/some-lib/cypress.config.ts', devServerTarget: 'my-app:build', @@ -219,7 +219,7 @@ describe('React:CypressComponentTestConfiguration', () => { expect( readProjectConfiguration(tree, 'some-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/some-lib/cypress.config.ts', devServerTarget: 'my-app:build', @@ -285,7 +285,7 @@ describe('React:CypressComponentTestConfiguration', () => { expect( readProjectConfiguration(tree, 'some-lib').targets['component-test'] ).toEqual({ - executor: '@nrwl/cypress:cypress', + executor: '@nx/cypress:cypress', options: { cypressConfig: 'libs/some-lib/cypress.config.ts', devServerTarget: 'my-app:build', @@ -448,7 +448,7 @@ describe('React:CypressComponentTestConfiguration', () => { "Error trying to find build configuration. Try manually specifying the build target with the --build-target flag. Provided project? some-lib Provided build target? my-app:build - Provided Executors? @nrwl/webpack:webpack, @nrwl/vite:build" + Provided Executors? @nx/webpack:webpack, @nx/vite:build, @nrwl/webpack:webpack, @nrwl/vite:build" `); }); }); diff --git a/packages/react/src/generators/cypress-component-configuration/lib/add-files.ts b/packages/react/src/generators/cypress-component-configuration/lib/add-files.ts index 7d2d2d752c272..b7e37fa443c87 100644 --- a/packages/react/src/generators/cypress-component-configuration/lib/add-files.ts +++ b/packages/react/src/generators/cypress-component-configuration/lib/add-files.ts @@ -60,7 +60,7 @@ export async function addFiles( options.bundler === 'webpack' || (!options.bundler && actualBundler === 'webpack') ) { - addDependenciesToPackageJson(tree, {}, { '@nrwl/webpack': nxVersion }); + addDependenciesToPackageJson(tree, {}, { '@nx/webpack': nxVersion }); } if (options.generateTests) { @@ -85,7 +85,10 @@ async function getBundler( tree: Tree ): Promise<'vite' | 'webpack'> { if (found.target && found.config?.executor) { - return found.config.executor === '@nrwl/vite:build' ? 'vite' : 'webpack'; + return found.config.executor === '@nx/vite:build' || + found.config.executor === '@nrwl/vite:build' + ? 'vite' + : 'webpack'; } const { target, project } = parseTargetString( @@ -93,7 +96,8 @@ async function getBundler( await createProjectGraphAsync() ); const projectConfig = readProjectConfiguration(tree, project); - return projectConfig?.targets?.[target]?.executor === '@nrwl/vite:build' + return projectConfig?.targets?.[target]?.executor === '@nx/vite:build' || + projectConfig?.targets?.[target]?.executor === '@nrwl/vite:build' ? 'vite' : 'webpack'; } diff --git a/packages/react/src/generators/cypress-component-configuration/lib/update-configs.ts b/packages/react/src/generators/cypress-component-configuration/lib/update-configs.ts index b48e50a00f953..b9ef229e843be 100644 --- a/packages/react/src/generators/cypress-component-configuration/lib/update-configs.ts +++ b/packages/react/src/generators/cypress-component-configuration/lib/update-configs.ts @@ -22,6 +22,8 @@ export async function updateProjectConfig( project: options.project, buildTarget: options.buildTarget, validExecutorNames: new Set([ + '@nx/webpack:webpack', + '@nx/vite:build', '@nrwl/webpack:webpack', '@nrwl/vite:build', ]), diff --git a/packages/react/src/generators/library/library.spec.ts b/packages/react/src/generators/library/library.spec.ts index 75d8eda9aeb4c..70eedceb07629 100644 --- a/packages/react/src/generators/library/library.spec.ts +++ b/packages/react/src/generators/library/library.spec.ts @@ -36,11 +36,11 @@ describe('lib', () => { tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' }); updateJson(tree, '/package.json', (json) => { json.devDependencies = { - '@nrwl/cypress': nxVersion, - '@nrwl/jest': nxVersion, - '@nrwl/rollup': nxVersion, - '@nrwl/vite': nxVersion, - '@nrwl/webpack': nxVersion, + '@nx/cypress': nxVersion, + '@nx/jest': nxVersion, + '@nx/rollup': nxVersion, + '@nx/vite': nxVersion, + '@nx/webpack': nxVersion, }; return json; }); @@ -53,7 +53,7 @@ describe('lib', () => { expect(project.root).toEqual('libs/my-lib'); expect(project.targets.build).toBeUndefined(); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -302,7 +302,7 @@ describe('lib', () => { expect(config.root).toEqual('libs/my-dir/my-lib'); expect(config.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -397,7 +397,7 @@ describe('lib', () => { expect(config.targets.test).toBeUndefined(); expect(config.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/my-lib/**/*.{ts,tsx,js,jsx}", diff --git a/packages/rollup/src/executors/rollup/rollup.impl.ts b/packages/rollup/src/executors/rollup/rollup.impl.ts index d4fdf1f29694f..9228266308ab5 100644 --- a/packages/rollup/src/executors/rollup/rollup.impl.ts +++ b/packages/rollup/src/executors/rollup/rollup.impl.ts @@ -245,7 +245,7 @@ export function createRollupOptions( useSwc && swc(), useBabel && getBabelInputPlugin({ - // Lets `@nrwl/js/babel` preset know that we are packaging. + // Lets `@nx/js/babel` preset know that we are packaging. caller: { // @ts-ignore // Ignoring type checks for caller since we have custom attributes diff --git a/packages/rollup/src/generators/init/init.spec.ts b/packages/rollup/src/generators/init/init.spec.ts index 0ff46d283c311..14af6435739cd 100644 --- a/packages/rollup/src/generators/init/init.spec.ts +++ b/packages/rollup/src/generators/init/init.spec.ts @@ -36,7 +36,7 @@ describe('rollupInitGenerator', () => { name: expect.any(String), dependencies: {}, devDependencies: { - '@nrwl/rollup': nxVersion, + '@nx/rollup': nxVersion, '@swc/helpers': expect.any(String), '@swc/core': expect.any(String), 'swc-loader': expect.any(String), diff --git a/packages/rollup/src/generators/init/init.ts b/packages/rollup/src/generators/init/init.ts index 5185daeffced4..a78ea3818f156 100644 --- a/packages/rollup/src/generators/init/init.ts +++ b/packages/rollup/src/generators/init/init.ts @@ -26,7 +26,7 @@ export async function rollupInitGenerator(tree: Tree, schema: Schema) { tree, {}, { - '@nrwl/rollup': nxVersion, + '@nx/rollup': nxVersion, '@swc/helpers': swcHelpersVersion, '@swc/core': swcCoreVersion, 'swc-loader': swcLoaderVersion, diff --git a/packages/rollup/src/generators/rollup-project/rollup-project.spec.ts b/packages/rollup/src/generators/rollup-project/rollup-project.spec.ts index 9bd7c3287f942..8274be292d38d 100644 --- a/packages/rollup/src/generators/rollup-project/rollup-project.spec.ts +++ b/packages/rollup/src/generators/rollup-project/rollup-project.spec.ts @@ -30,7 +30,7 @@ describe('rollupProjectGenerator', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/rollup:rollup', + executor: '@nx/rollup:rollup', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -70,7 +70,7 @@ describe('rollupProjectGenerator', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/rollup:rollup', + executor: '@nx/rollup:rollup', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -90,7 +90,7 @@ describe('rollupProjectGenerator', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/rollup:rollup', + executor: '@nx/rollup:rollup', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { diff --git a/packages/rollup/src/generators/rollup-project/rollup-project.ts b/packages/rollup/src/generators/rollup-project/rollup-project.ts index 8723dcfda19e1..14e9a275e19c7 100644 --- a/packages/rollup/src/generators/rollup-project/rollup-project.ts +++ b/packages/rollup/src/generators/rollup-project/rollup-project.ts @@ -82,7 +82,7 @@ function addBuildTarget(tree: Tree, options: RollupProjectSchema) { targets: { ...project.targets, build: { - executor: '@nrwl/rollup:rollup', + executor: '@nx/rollup:rollup', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: buildOptions, diff --git a/packages/storybook/.eslintrc.json b/packages/storybook/.eslintrc.json index 7a43e59e3deea..386a2e1a709de 100644 --- a/packages/storybook/.eslintrc.json +++ b/packages/storybook/.eslintrc.json @@ -12,7 +12,7 @@ "rules": { "no-restricted-imports": [ "error", - "@nrwl/workspace", + "@nx/workspace", "@angular-devkit/core", "@angular-devkit/schematics", "@angular-devkit/architect" diff --git a/packages/storybook/src/executors/storybook/storybook.impl.spec.ts b/packages/storybook/src/executors/storybook/storybook.impl.spec.ts index 37de4075f301e..147d8ad6f8c50 100644 --- a/packages/storybook/src/executors/storybook/storybook.impl.spec.ts +++ b/packages/storybook/src/executors/storybook/storybook.impl.spec.ts @@ -17,7 +17,7 @@ import { CommonNxStorybookConfig } from '../../utils/models'; // TODO(katerina): Update when Storybook 7 -describe('@nrwl/storybook:storybook', () => { +describe('@nx/storybook:storybook', () => { let context: ExecutorContext; let options: CLIOptions & CommonNxStorybookConfig; beforeEach(() => { @@ -53,7 +53,7 @@ describe('@nrwl/storybook:storybook', () => { sourceRoot: 'src', targets: { build: { - executor: '@nrwl/web:webpack', + executor: '@nx/web:webpack', options: { compiler: 'babel', outputPath: 'dist/apps/webre', @@ -68,11 +68,11 @@ describe('@nrwl/storybook:storybook', () => { ], styles: ['apps/webre/src/styles.css'], scripts: [], - webpackConfig: '@nrwl/react/plugins/webpack', + webpackConfig: '@nx/react/plugins/webpack', }, }, storybook: { - executor: '@nrwl/storybook:storybook', + executor: '@nx/storybook:storybook', options, }, }, diff --git a/packages/storybook/src/executors/utils.ts b/packages/storybook/src/executors/utils.ts index 8e307769b150f..4886a1de243ac 100644 --- a/packages/storybook/src/executors/utils.ts +++ b/packages/storybook/src/executors/utils.ts @@ -52,7 +52,7 @@ function isStorybookV62onwards(uiFramework: string) { `Error: ${e} It looks like you don\'t have Storybook installed. - Please run the @nrwl/storybook:configuration generator, + Please run the @nx/storybook:configuration generator, or run "npm/yarn" again to install your dependencies.` ); } diff --git a/packages/storybook/src/generators/configuration/__snapshots__/configuration-nested.spec.ts.snap b/packages/storybook/src/generators/configuration/__snapshots__/configuration-nested.spec.ts.snap index 43295ff3244dc..d08c13290bd62 100644 --- a/packages/storybook/src/generators/configuration/__snapshots__/configuration-nested.spec.ts.snap +++ b/packages/storybook/src/generators/configuration/__snapshots__/configuration-nested.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 1`] = ` +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 1`] = ` "import type { StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { @@ -24,7 +24,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 2`] = ` +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -32,9 +32,9 @@ exports[`@nrwl/storybook:configuration for workspaces with Root project basic fu "outDir": "" }, "files": [ - "../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../node_modules/@nrwl/react/typings/image.d.ts" + "../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../node_modules/@nx/react/typings/cssmodule.d.ts", + "../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -55,14 +55,14 @@ exports[`@nrwl/storybook:configuration for workspaces with Root project basic fu " `; -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 3`] = `""`; +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 3`] = `""`; -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 4`] = ` +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 4`] = ` "import type { StorybookConfig } from '@storybook/react-webpack5'; const config: StorybookConfig = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], framework: { name: '@storybook/react-webpack5', options: {}, @@ -77,7 +77,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 5`] = ` +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 5`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -85,9 +85,9 @@ exports[`@nrwl/storybook:configuration for workspaces with Root project basic fu "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -108,4 +108,4 @@ exports[`@nrwl/storybook:configuration for workspaces with Root project basic fu " `; -exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 6`] = `""`; +exports[`@nx/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 6`] = `""`; diff --git a/packages/storybook/src/generators/configuration/__snapshots__/configuration-v7.spec.ts.snap b/packages/storybook/src/generators/configuration/__snapshots__/configuration-v7.spec.ts.snap index 4e51431b5b06a..5044b77f9f5ea 100644 --- a/packages/storybook/src/generators/configuration/__snapshots__/configuration-v7.spec.ts.snap +++ b/packages/storybook/src/generators/configuration/__snapshots__/configuration-v7.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should generate TS config for project if tsConfiguration true 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TS config for project if tsConfiguration true 1`] = ` "import type { StorybookConfig } from '@storybook/angular'; const config: StorybookConfig = { @@ -20,7 +20,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 1`] = ` { "$schema": "../../node_modules/nx/schemas/project-schema.json", "name": "test-ui-lib", @@ -47,7 +47,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/test-ui-lib/**/*.ts", @@ -78,7 +78,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh "codeCoverage": true, }, }, - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/test-ui-lib/jest.config.ts", "passWithNoTests": true, @@ -91,9 +91,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh } `; -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 2`] = `null`; +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 2`] = `null`; -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 3`] = ` +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 3`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -114,7 +114,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh " `; -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 4`] = ` +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 4`] = ` "import type { StorybookConfig } from '@storybook/angular'; const config: StorybookConfig = { @@ -134,7 +134,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities should have the proper typings 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should have the proper typings 1`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -142,9 +142,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -164,7 +164,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 basic functionalities sh " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -186,7 +186,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -194,9 +194,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -216,7 +216,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite-ts/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite-ts/.storybook/" 1`] = ` "import type { StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { @@ -240,7 +240,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite-ts/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-vite-ts/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -248,9 +248,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -271,10 +271,10 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-webpack/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-webpack/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], framework: { name: '@storybook/react-webpack5', options: {}, @@ -289,7 +289,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-webpack/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/main-webpack/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -297,9 +297,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -319,7 +319,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/nextapp/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/nextapp/.storybook/" 1`] = ` "const config = { stories: ['../components/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -337,7 +337,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/nextapp/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/nextapp/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -357,12 +357,12 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/react-swc/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/react-swc/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', ], framework: { @@ -379,7 +379,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/react-swc/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/react-swc/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -387,9 +387,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -409,7 +409,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reapp/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reapp/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -431,7 +431,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reapp/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reapp/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -439,9 +439,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -461,10 +461,10 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reappw/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reappw/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], framework: { name: '@storybook/react-webpack5', options: {}, @@ -479,7 +479,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reappw/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/reappw/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -487,9 +487,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -509,7 +509,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/wv1/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/wv1/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -531,7 +531,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/wv1/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/wv1/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -551,7 +551,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/ww1/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/ww1/.storybook/" 1`] = ` "const config = { stories: ['../src/app/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -569,7 +569,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/ww1/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "apps/ww1/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -589,10 +589,10 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-rollup/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-rollup/.storybook/" 1`] = ` "const config = { stories: ['../src/lib/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], framework: { name: '@storybook/react-webpack5', options: {}, @@ -607,7 +607,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-rollup/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-rollup/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -615,9 +615,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -637,7 +637,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-vite/.storybook/" 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-vite/.storybook/" 1`] = ` "const config = { stories: ['../src/lib/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials'], @@ -659,7 +659,7 @@ export default config; " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-vite/.storybook/" 2`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should contain the correct configuration in "libs/react-vite/.storybook/" 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -667,9 +667,9 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -689,7 +689,7 @@ exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook confi " `; -exports[`@nrwl/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should have updated all their target configurations correctly 1`] = ` +exports[`@nx/storybook:configuration for Storybook v7 generate Storybook configuration for all types of projects should have updated all their target configurations correctly 1`] = ` Map { "main-vite" => { "$schema": "../../node_modules/nx/schemas/project-schema.json", @@ -709,7 +709,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "configFile": "apps/main-vite/vite.config.ts", "outputPath": "dist/apps/main-vite", @@ -724,7 +724,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/main-vite/.storybook", "outputDir": "dist/storybook/main-vite", @@ -734,7 +734,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-vite/**/*.{ts,tsx,js,jsx}", @@ -756,7 +756,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "options": { "buildTarget": "main-vite:build", }, @@ -767,14 +767,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/main-vite/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/apps/main-vite", @@ -802,7 +802,7 @@ Map { "devServerTarget": "main-vite:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-vite-e2e/cypress.config.ts", "devServerTarget": "main-vite:serve:development", @@ -810,7 +810,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-vite-e2e/**/*.{js,ts}", @@ -840,7 +840,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "configFile": "apps/main-vite-ts/vite.config.custom.ts", "outputPath": "dist/apps/main-vite-ts", @@ -855,7 +855,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/main-vite-ts/.storybook", "outputDir": "dist/storybook/main-vite-ts", @@ -865,7 +865,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-vite-ts/**/*.{ts,tsx,js,jsx}", @@ -887,7 +887,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "options": { "buildTarget": "main-vite-ts:build", }, @@ -898,14 +898,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/main-vite-ts/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/apps/main-vite-ts", @@ -933,7 +933,7 @@ Map { "devServerTarget": "main-vite-ts:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-vite-ts-e2e/cypress.config.ts", "devServerTarget": "main-vite-ts:serve:development", @@ -941,7 +941,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-vite-ts-e2e/**/*.{js,ts}", @@ -985,7 +985,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [ "apps/main-webpack/src/favicon.ico", @@ -1002,7 +1002,7 @@ Map { "apps/main-webpack/src/styles.css", ], "tsConfig": "apps/main-webpack/tsconfig.app.json", - "webpackConfig": "@nrwl/react/plugins/webpack", + "webpackConfig": "@nx/react/plugins/webpack", }, "outputs": [ "{options.outputPath}", @@ -1014,7 +1014,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/main-webpack/.storybook", "outputDir": "dist/storybook/main-webpack", @@ -1024,7 +1024,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-webpack/**/*.{ts,tsx,js,jsx}", @@ -1045,7 +1045,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "main-webpack:build", "hmr": true, @@ -1057,14 +1057,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/main-webpack/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/main-webpack/jest.config.ts", "passWithNoTests": true, @@ -1092,7 +1092,7 @@ Map { "devServerTarget": "main-webpack:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-webpack-e2e/cypress.config.ts", "devServerTarget": "main-webpack:serve:development", @@ -1100,7 +1100,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/main-webpack-e2e/**/*.{js,ts}", @@ -1124,7 +1124,7 @@ Map { "tags": [], "targets": { "e2e": { - "executor": "@nrwl/nx-plugin:e2e", + "executor": "@nx/nx-plugin:e2e", "options": { "jestConfig": "apps/my-plugin-e2e/jest.config.ts", "target": "my-plugin:build", @@ -1148,7 +1148,7 @@ Map { "production": {}, }, "defaultConfiguration": "production", - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "options": { "outputPath": "dist/apps/nextapp", "root": "apps/nextapp", @@ -1163,7 +1163,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/nextapp/.storybook", "outputDir": "dist/storybook/nextapp", @@ -1173,13 +1173,13 @@ Map { ], }, "export": { - "executor": "@nrwl/next:export", + "executor": "@nx/next:export", "options": { "buildTarget": "nextapp:build:production", }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/nextapp/**/*.{ts,tsx,js,jsx}", @@ -1201,7 +1201,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "options": { "buildTarget": "nextapp:build", "dev": true, @@ -1213,14 +1213,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/nextapp/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/nextapp/jest.config.ts", "passWithNoTests": true, @@ -1248,7 +1248,7 @@ Map { "devServerTarget": "nextapp:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/nextapp-e2e/cypress.config.ts", "devServerTarget": "nextapp:serve:development", @@ -1256,7 +1256,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/nextapp-e2e/**/*.{js,ts}", @@ -1350,7 +1350,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/ngapp/**/*.ts", @@ -1388,7 +1388,7 @@ Map { }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/ngapp/jest.config.ts", "passWithNoTests": true, @@ -1416,7 +1416,7 @@ Map { "devServerTarget": "ngapp:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/ngapp-e2e/cypress.config.ts", "devServerTarget": "ngapp:serve:development", @@ -1424,7 +1424,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/ngapp-e2e/**/*.{js,ts}", @@ -1453,7 +1453,7 @@ Map { "devServerTarget": "nglib:storybook:ci", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/nglib-e2e/cypress.config.ts", "devServerTarget": "nglib:storybook", @@ -1461,7 +1461,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/nglib-e2e/**/*.{js,ts}", @@ -1490,7 +1490,7 @@ Map { "devServerTarget": "react-rollup:storybook:ci", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-rollup-e2e/cypress.config.ts", "devServerTarget": "react-rollup:storybook", @@ -1498,7 +1498,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/react-rollup-e2e/**/*.{js,ts}", @@ -1542,7 +1542,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [ "apps/react-swc/src/favicon.ico", @@ -1570,7 +1570,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/react-swc/.storybook", "outputDir": "dist/storybook/react-swc", @@ -1580,7 +1580,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/react-swc/**/*.{ts,tsx,js,jsx}", @@ -1601,7 +1601,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "react-swc:build", "hmr": true, @@ -1613,14 +1613,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/react-swc/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/react-swc/jest.config.ts", "passWithNoTests": true, @@ -1648,7 +1648,7 @@ Map { "devServerTarget": "react-swc:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-swc-e2e/cypress.config.ts", "devServerTarget": "react-swc:serve:development", @@ -1656,7 +1656,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/react-swc-e2e/**/*.{js,ts}", @@ -1685,7 +1685,7 @@ Map { "devServerTarget": "react-vite:storybook:ci", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-vite-e2e/cypress.config.ts", "devServerTarget": "react-vite:storybook", @@ -1693,7 +1693,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/react-vite-e2e/**/*.{js,ts}", @@ -1723,7 +1723,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "configFile": "apps/reapp/vite.config.ts", "outputPath": "dist/apps/reapp", @@ -1738,7 +1738,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/reapp/.storybook", "outputDir": "dist/storybook/reapp", @@ -1748,7 +1748,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/reapp/**/*.{ts,tsx,js,jsx}", @@ -1770,7 +1770,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "options": { "buildTarget": "reapp:build", }, @@ -1781,14 +1781,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/reapp/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/apps/reapp", @@ -1816,7 +1816,7 @@ Map { "devServerTarget": "reapp:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/reapp-e2e/cypress.config.ts", "devServerTarget": "reapp:serve:development", @@ -1824,7 +1824,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/reapp-e2e/**/*.{js,ts}", @@ -1868,7 +1868,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [ "apps/reappw/src/favicon.ico", @@ -1884,7 +1884,7 @@ Map { "apps/reappw/src/styles.css", ], "tsConfig": "apps/reappw/tsconfig.app.json", - "webpackConfig": "@nrwl/react/plugins/webpack", + "webpackConfig": "@nx/react/plugins/webpack", }, "outputs": [ "{options.outputPath}", @@ -1896,7 +1896,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/reappw/.storybook", "outputDir": "dist/storybook/reappw", @@ -1906,7 +1906,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/reappw/**/*.{ts,tsx,js,jsx}", @@ -1927,7 +1927,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "reappw:build", "hmr": true, @@ -1939,14 +1939,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/reappw/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/reappw/jest.config.ts", "passWithNoTests": true, @@ -1974,7 +1974,7 @@ Map { "devServerTarget": "reappw:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/reappw-e2e/cypress.config.ts", "devServerTarget": "reappw:serve:development", @@ -1982,7 +1982,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/reappw-e2e/**/*.{js,ts}", @@ -2012,7 +2012,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "configFile": "apps/wv1/vite.config.custom.ts", "outputPath": "dist/apps/wv1", @@ -2027,7 +2027,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/wv1/.storybook", "outputDir": "dist/storybook/wv1", @@ -2037,7 +2037,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/wv1/**/*.ts", @@ -2059,7 +2059,7 @@ Map { }, }, "defaultConfiguration": "development", - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "options": { "buildTarget": "wv1:build", }, @@ -2070,14 +2070,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/wv1/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/wv1/jest.config.ts", "passWithNoTests": true, @@ -2105,7 +2105,7 @@ Map { "devServerTarget": "wv1:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/wv1-e2e/cypress.config.ts", "devServerTarget": "wv1:serve:development", @@ -2113,7 +2113,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/wv1-e2e/**/*.{js,ts}", @@ -2151,7 +2151,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [ "apps/ww1/src/favicon.ico", @@ -2179,7 +2179,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "apps/ww1/.storybook", "outputDir": "dist/storybook/ww1", @@ -2189,7 +2189,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/ww1/**/*.ts", @@ -2205,7 +2205,7 @@ Map { "buildTarget": "ww1:build:production", }, }, - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "ww1:build", }, @@ -2216,14 +2216,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "apps/ww1/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/ww1/jest.config.ts", "passWithNoTests": true, @@ -2251,7 +2251,7 @@ Map { "devServerTarget": "ww1:serve:production", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/ww1-e2e/cypress.config.ts", "devServerTarget": "ww1:serve", @@ -2259,7 +2259,7 @@ Map { }, }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/ww1-e2e/**/*.{js,ts}", @@ -2280,7 +2280,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "assets": [ "libs/my-plugin/*.md", @@ -2314,7 +2314,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/my-plugin/**/*.ts", @@ -2328,7 +2328,7 @@ Map { ], }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/my-plugin/jest.config.ts", "passWithNoTests": true, @@ -2379,7 +2379,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/nglib/**/*.ts", @@ -2405,7 +2405,7 @@ Map { }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/nglib/jest.config.ts", "passWithNoTests": true, @@ -2425,7 +2425,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/rollup:rollup", + "executor": "@nx/rollup:rollup", "options": { "assets": [ { @@ -2441,7 +2441,7 @@ Map { ], "outputPath": "dist/libs/react-rollup", "project": "libs/react-rollup/package.json", - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "tsConfig": "libs/react-rollup/tsconfig.lib.json", }, "outputs": [ @@ -2454,7 +2454,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "libs/react-rollup/.storybook", "outputDir": "dist/storybook/react-rollup", @@ -2464,7 +2464,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/react-rollup/**/*.{ts,tsx,js,jsx}", @@ -2480,14 +2480,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "libs/react-rollup/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/react-rollup/jest.config.ts", "passWithNoTests": true, @@ -2507,7 +2507,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/rollup:rollup", + "executor": "@nx/rollup:rollup", "options": { "assets": [ { @@ -2523,7 +2523,7 @@ Map { ], "outputPath": "dist/libs/react-rollup-2", "project": "libs/react-rollup-2/package.json", - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "tsConfig": "libs/react-rollup-2/tsconfig.lib.json", }, "outputs": [ @@ -2531,7 +2531,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/react-rollup-2/**/*.{ts,tsx,js,jsx}", @@ -2542,7 +2542,7 @@ Map { ], }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/react-rollup-2/jest.config.ts", "passWithNoTests": true, @@ -2571,7 +2571,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "outputPath": "dist/libs/react-vite", }, @@ -2585,7 +2585,7 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "options": { "configDir": "libs/react-vite/.storybook", "outputDir": "dist/storybook/react-vite", @@ -2595,7 +2595,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/react-vite/**/*.{ts,tsx,js,jsx}", @@ -2611,14 +2611,14 @@ Map { "quiet": true, }, }, - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "configDir": "libs/react-vite/.storybook", "port": 4400, }, }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/libs/react-vite", @@ -2647,7 +2647,7 @@ Map { }, }, "defaultConfiguration": "production", - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "outputPath": "dist/libs/react-vite-2", }, @@ -2656,7 +2656,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/react-vite-2/**/*.{ts,tsx,js,jsx}", @@ -2667,7 +2667,7 @@ Map { ], }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/libs/react-vite-2", @@ -2687,7 +2687,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [], "main": "libs/utils/one/src/index.ts", @@ -2699,7 +2699,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/utils/one/**/*.ts", @@ -2710,7 +2710,7 @@ Map { ], }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/utils/one/jest.config.ts", "passWithNoTests": true, @@ -2730,7 +2730,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "options": { "outputPath": "dist/libs/utils/three-vite", }, @@ -2739,7 +2739,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/utils/three-vite/**/*.ts", @@ -2750,7 +2750,7 @@ Map { ], }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/utils/three-vite/jest.config.ts", "passWithNoTests": true, @@ -2770,7 +2770,7 @@ Map { "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "options": { "assets": [], "main": "libs/utils/two/src/index.ts", @@ -2782,7 +2782,7 @@ Map { ], }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/utils/two/**/*.ts", @@ -2793,7 +2793,7 @@ Map { ], }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { "jestConfig": "libs/utils/two/jest.config.ts", "passWithNoTests": true, diff --git a/packages/storybook/src/generators/configuration/__snapshots__/configuration.spec.ts.snap b/packages/storybook/src/generators/configuration/__snapshots__/configuration.spec.ts.snap index cc8678f202ed0..0c45c6d0cc392 100644 --- a/packages/storybook/src/generators/configuration/__snapshots__/configuration.spec.ts.snap +++ b/packages/storybook/src/generators/configuration/__snapshots__/configuration.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/storybook:configuration basic functionalities should generate a webpackFinal into the main.js and reference a potential global webpackFinal definition 1`] = ` +exports[`@nx/storybook:configuration basic functionalities should generate a webpackFinal into the main.js and reference a potential global webpackFinal definition 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: ['../**/*.stories.mdx', '../**/*.stories.@(js|jsx|ts|tsx)'], @@ -13,7 +13,7 @@ exports[`@nrwl/storybook:configuration basic functionalities should generate a w " `; -exports[`@nrwl/storybook:configuration basic functionalities should generate files 1`] = ` +exports[`@nx/storybook:configuration basic functionalities should generate files 1`] = ` { "affected": { "defaultBase": "main", @@ -76,15 +76,15 @@ exports[`@nrwl/storybook:configuration basic functionalities should generate fil } `; -exports[`@nrwl/storybook:configuration basic functionalities should have the proper typings 1`] = ` +exports[`@nx/storybook:configuration basic functionalities should have the proper typings 1`] = ` [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts", + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts", ] `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 1`] = ` "const { mergeConfig } = require('vite'); const viteTsConfigPaths = require('vite-tsconfig-paths').default; @@ -112,7 +112,7 @@ module.exports = { " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -120,9 +120,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -142,7 +142,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 1`] = ` "const { mergeConfig } = require('vite'); const viteTsConfigPaths = require('vite-tsconfig-paths').default; @@ -170,7 +170,7 @@ module.exports = { " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -178,9 +178,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -200,7 +200,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 1`] = ` "const { mergeConfig } = require('vite'); const viteTsConfigPaths = require('vite-tsconfig-paths').default; @@ -228,7 +228,7 @@ module.exports = { " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -236,9 +236,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -258,7 +258,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; import { mergeConfig } from 'vite'; @@ -290,7 +290,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -298,9 +298,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -321,7 +321,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; import path from 'path'; import { mergeConfig } from 'vite'; @@ -363,7 +363,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -371,9 +371,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -394,7 +394,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; import { mergeConfig } from 'vite'; @@ -426,7 +426,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -434,9 +434,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -457,7 +457,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; const config: StorybookConfig = { @@ -466,7 +466,7 @@ const config: StorybookConfig = { '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; module.exports = config; @@ -477,7 +477,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -485,9 +485,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -508,7 +508,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; const config: StorybookConfig = { @@ -517,7 +517,7 @@ const config: StorybookConfig = { '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; module.exports = config; @@ -528,7 +528,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -536,9 +536,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -559,7 +559,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; import path from 'path'; @@ -571,7 +571,7 @@ const config: StorybookConfig = { ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', { @@ -591,7 +591,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -599,9 +599,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -622,7 +622,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; const config: StorybookConfig = { @@ -631,7 +631,7 @@ const config: StorybookConfig = { '../src/app/**/*.stories.mdx', '../src/app/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; module.exports = config; @@ -642,7 +642,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -650,9 +650,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -673,7 +673,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; const config: StorybookConfig = { @@ -684,7 +684,7 @@ const config: StorybookConfig = { ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', ], }; @@ -697,7 +697,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -705,9 +705,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -728,7 +728,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 1`] = ` "import type { StorybookConfig } from '@storybook/core-common'; const config: StorybookConfig = { @@ -737,7 +737,7 @@ const config: StorybookConfig = { '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; module.exports = config; @@ -748,7 +748,7 @@ module.exports = config; " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -756,9 +756,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -779,14 +779,14 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: [ '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; // To customize your webpack configuration you can use the webpackFinal field. @@ -795,7 +795,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -803,9 +803,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -825,14 +825,14 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: [ '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; // To customize your webpack configuration you can use the webpackFinal field. @@ -841,7 +841,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -849,9 +849,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -871,7 +871,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 1`] = ` "const path = require('path'); module.exports = { @@ -882,7 +882,7 @@ module.exports = { ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', { @@ -900,7 +900,7 @@ module.exports = { " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -908,9 +908,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -930,14 +930,14 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: [ '../src/app/**/*.stories.mdx', '../src/app/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; // To customize your webpack configuration you can use the webpackFinal field. @@ -946,7 +946,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -954,9 +954,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -976,7 +976,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: [ @@ -985,7 +985,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', ], }; @@ -996,7 +996,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -1004,9 +1004,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", @@ -1026,14 +1026,14 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 1`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 1`] = ` "module.exports = { core: { builder: 'webpack5' }, stories: [ '../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; // To customize your webpack configuration you can use the webpackFinal field. @@ -1042,7 +1042,7 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and " `; -exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 2`] = ` +exports[`@nx/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 2`] = ` "{ "extends": "../tsconfig.json", "compilerOptions": { @@ -1050,9 +1050,9 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and "outDir": "" }, "files": [ - "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" + "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "../**/*.spec.ts", diff --git a/packages/storybook/src/generators/configuration/configuration-nested.spec.ts b/packages/storybook/src/generators/configuration/configuration-nested.spec.ts index c2f94304a58a4..2f9e5f7eb266c 100644 --- a/packages/storybook/src/generators/configuration/configuration-nested.spec.ts +++ b/packages/storybook/src/generators/configuration/configuration-nested.spec.ts @@ -22,7 +22,7 @@ jest.mock('nx/src/project-graph/project-graph', () => ({ jest.mock('enquirer'); // @ts-ignore enquirer.prompt = jest.fn(); -describe('@nrwl/storybook:configuration for workspaces with Root project', () => { +describe('@nx/storybook:configuration for workspaces with Root project', () => { beforeAll(() => { process.env.NX_INTERACTIVE = 'true'; }); diff --git a/packages/storybook/src/generators/configuration/configuration-v7.spec.ts b/packages/storybook/src/generators/configuration/configuration-v7.spec.ts index bd18d53da25a7..be0ce28f04508 100644 --- a/packages/storybook/src/generators/configuration/configuration-v7.spec.ts +++ b/packages/storybook/src/generators/configuration/configuration-v7.spec.ts @@ -30,7 +30,7 @@ jest.mock('enquirer'); // @ts-ignore enquirer.prompt = jest.fn(); -describe('@nrwl/storybook:configuration for Storybook v7', () => { +describe('@nx/storybook:configuration for Storybook v7', () => { describe('basic functionalities', () => { let tree: Tree; diff --git a/packages/storybook/src/generators/configuration/configuration.spec.ts b/packages/storybook/src/generators/configuration/configuration.spec.ts index 215eb1c0d7cfb..030bbb9024f44 100644 --- a/packages/storybook/src/generators/configuration/configuration.spec.ts +++ b/packages/storybook/src/generators/configuration/configuration.spec.ts @@ -28,7 +28,7 @@ jest.mock('enquirer'); // @ts-ignore enquirer.prompt = jest.fn(); -describe('@nrwl/storybook:configuration', () => { +describe('@nx/storybook:configuration', () => { beforeAll(() => { process.env.NX_INTERACTIVE = 'true'; }); @@ -55,7 +55,7 @@ describe('@nrwl/storybook:configuration', () => { '@storybook/addon-essentials': '~6.5.9', '@storybook/react': '~6.5.9', '@storybook/core-server': '~6.5.9', - '@nrwl/web': nxVersion, + '@nx/web': nxVersion, }, }); jest.resetModules(); @@ -143,7 +143,7 @@ describe('@nrwl/storybook:configuration', () => { expect(enquirer.prompt).toHaveBeenCalled(); expect(project.targets.storybook).toEqual({ - executor: '@nrwl/storybook:storybook', + executor: '@nx/storybook:storybook', configurations: { ci: { quiet: true, @@ -157,7 +157,7 @@ describe('@nrwl/storybook:configuration', () => { }); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/test-ui-lib/**/*.ts'], @@ -193,7 +193,7 @@ describe('@nrwl/storybook:configuration', () => { }); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/test-ui-lib-2/**/*.ts'], @@ -231,7 +231,7 @@ describe('@nrwl/storybook:configuration', () => { }); expect(project.targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['libs/test-ui-lib-5/**/*.ts'], @@ -422,7 +422,7 @@ describe('@nrwl/storybook:configuration', () => { } `); expect( - readJson(tree, 'package.json').devDependencies['@nrwl/web'] + readJson(tree, 'package.json').devDependencies['@nx/web'] ).toBeTruthy(); }); it('should use static-storybook:ci in cypress project', async () => { @@ -460,7 +460,7 @@ describe('@nrwl/storybook:configuration', () => { "devServerTarget": "test-ui-lib:static-storybook:ci", }, }, - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/test-ui-lib-e2e/cypress.config.ts", "devServerTarget": "test-ui-lib:storybook", @@ -469,7 +469,7 @@ describe('@nrwl/storybook:configuration', () => { } `); expect( - readJson(tree, 'package.json').devDependencies['@nrwl/web'] + readJson(tree, 'package.json').devDependencies['@nx/web'] ).toBeTruthy(); }); }); diff --git a/packages/storybook/src/generators/configuration/configuration.ts b/packages/storybook/src/generators/configuration/configuration.ts index 9d1e1194e85c0..64ec0d60b79b2 100644 --- a/packages/storybook/src/generators/configuration/configuration.ts +++ b/packages/storybook/src/generators/configuration/configuration.ts @@ -263,7 +263,7 @@ export async function configurationGenerator( devDeps['@storybook/test-runner'] = storybookTestRunnerVersion; } if (schema.configureStaticServe) { - devDeps['@nrwl/web'] = nxVersion; + devDeps['@nx/web'] = nxVersion; } tasks.push(addDependenciesToPackageJson(tree, {}, devDeps)); diff --git a/packages/storybook/src/generators/configuration/lib/util-functions.ts b/packages/storybook/src/generators/configuration/lib/util-functions.ts index ac52d408be382..aee507b14c914 100644 --- a/packages/storybook/src/generators/configuration/lib/util-functions.ts +++ b/packages/storybook/src/generators/configuration/lib/util-functions.ts @@ -43,7 +43,7 @@ export function addStorybookTask( } const projectConfig = readProjectConfiguration(tree, projectName); projectConfig.targets['storybook'] = { - executor: '@nrwl/storybook:storybook', + executor: '@nx/storybook:storybook', options: { port: DEFAULT_PORT, configDir: `${projectConfig.root}/.storybook`, @@ -56,7 +56,7 @@ export function addStorybookTask( }; projectConfig.targets['build-storybook'] = { - executor: '@nrwl/storybook:build', + executor: '@nx/storybook:build', outputs: ['{options.outputDir}'], options: { outputDir: joinPathFragments('dist/storybook', projectName), @@ -480,7 +480,7 @@ export async function getE2EProjectName( const graph = await createProjectGraphAsync(); forEachExecutorOptions( tree, - '@nrwl/cypress:cypress', + '@nx/cypress:cypress', (options, projectName) => { if (e2eProject) { return; diff --git a/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/main.ts__tmpl__ b/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/main.ts__tmpl__ index d2e0218ef23d7..31d5900ebf307 100644 --- a/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/main.ts__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/main.ts__tmpl__ @@ -6,7 +6,7 @@ const config: StorybookConfig = { '../**/*.stories.@(js|jsx|ts|tsx|mdx)' <% } else { %> '../<%= projectDirectory %>/**/*.stories.@(js|jsx|ts|tsx|mdx)' <% } %>], - addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react-webpack5') { %>, '@nrwl/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> + addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react-webpack5') { %>, '@nx/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> <% if(usesSwc) { %>, 'storybook-addon-swc' <% } %> ], framework: { @@ -30,7 +30,7 @@ export default config; <% } %> <% if(usesVite) { %> -// To customize your Vite configuration you can use the viteFinal field. +// To customize your Vite configuration you can use the viteFinal field. // Check https://storybook.js.org/docs/react/builders/vite#configuration // and https://nx.dev/packages/storybook/documents/custom-builder-configs -<% } %> \ No newline at end of file +<% } %> diff --git a/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/tsconfig.json__tmpl__ b/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/tsconfig.json__tmpl__ index 57481bc8179fc..75a29a56eaf64 100644 --- a/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/tsconfig.json__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-7-ts/.storybook/tsconfig.json__tmpl__ @@ -5,9 +5,9 @@ <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>, "outDir": "" <% } %> }, <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>"files": [ - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/image.d.ts" + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/styled-jsx.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/cssmodule.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/image.d.ts" ],<% } %> "exclude": ["../**/*.spec.ts" <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>, "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"<% } %>], "include": [<% if(uiFramework === '@storybook/angular' && projectType === 'library') { %> diff --git a/packages/storybook/src/generators/configuration/project-files-7/.storybook/main.js__tmpl__ b/packages/storybook/src/generators/configuration/project-files-7/.storybook/main.js__tmpl__ index facd3221e192e..7375b1d747950 100644 --- a/packages/storybook/src/generators/configuration/project-files-7/.storybook/main.js__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-7/.storybook/main.js__tmpl__ @@ -4,7 +4,7 @@ const config = { '../**/*.stories.@(js|jsx|ts|tsx|mdx)' <% } else { %> '../<%= projectDirectory %>/**/*.stories.@(js|jsx|ts|tsx|mdx)' <% } %>], - addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react-webpack5') { %>, '@nrwl/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> + addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react-webpack5') { %>, '@nx/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> <% if(usesSwc) { %>, 'storybook-addon-swc' <% } %> ], framework: { @@ -28,7 +28,7 @@ export default config; <% } %> <% if(usesVite) { %> -// To customize your Vite configuration you can use the viteFinal field. +// To customize your Vite configuration you can use the viteFinal field. // Check https://storybook.js.org/docs/react/builders/vite#configuration // and https://nx.dev/packages/storybook/documents/custom-builder-configs -<% } %> \ No newline at end of file +<% } %> diff --git a/packages/storybook/src/generators/configuration/project-files-7/.storybook/tsconfig.json__tmpl__ b/packages/storybook/src/generators/configuration/project-files-7/.storybook/tsconfig.json__tmpl__ index 52240acaa2a52..3708d0593c53e 100644 --- a/packages/storybook/src/generators/configuration/project-files-7/.storybook/tsconfig.json__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-7/.storybook/tsconfig.json__tmpl__ @@ -5,9 +5,9 @@ <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>, "outDir": "" <% } %> }, <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>"files": [ - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/image.d.ts" + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/styled-jsx.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/cssmodule.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/image.d.ts" ],<% } %> "exclude": ["../**/*.spec.ts" <% if(uiFramework === '@storybook/react-webpack5' || uiFramework === '@storybook/react-vite') { %>, "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"<% } %>], "include": [<% if(uiFramework === '@storybook/angular' && projectType === 'library') { %> diff --git a/packages/storybook/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ b/packages/storybook/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ index 3bc8d3dffe85b..21b22aaf23c5d 100644 --- a/packages/storybook/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ @@ -12,9 +12,9 @@ const config: StorybookConfig = { '../<%= projectDirectory %>/**/*.stories.mdx', '../<%= projectDirectory %>/**/*.stories.@(js|jsx|ts|tsx)' <% } %>], - addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react' && !usesVite) { %>, '@nrwl/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> + addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react' && !usesVite) { %>, '@nx/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> <% if(usesSwc && !isNextJs) { %>, 'storybook-addon-swc' <% } %> - <% if(isNextJs) { %>, 'storybook-addon-swc', + <% if(isNextJs) { %>, 'storybook-addon-swc', { name: 'storybook-addon-next', options: { @@ -43,7 +43,7 @@ module.exports = config; <% } %> <% if(usesVite) { %> -// To customize your Vite configuration you can use the viteFinal field. +// To customize your Vite configuration you can use the viteFinal field. // Check https://storybook.js.org/docs/react/builders/vite#configuration // and https://nx.dev/packages/storybook/documents/custom-builder-configs -<% } %> \ No newline at end of file +<% } %> diff --git a/packages/storybook/src/generators/configuration/project-files-ts/.storybook/tsconfig.json__tmpl__ b/packages/storybook/src/generators/configuration/project-files-ts/.storybook/tsconfig.json__tmpl__ index 711209c5025f2..679a20a7cf1b1 100644 --- a/packages/storybook/src/generators/configuration/project-files-ts/.storybook/tsconfig.json__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files-ts/.storybook/tsconfig.json__tmpl__ @@ -5,9 +5,9 @@ <% if(uiFramework === '@storybook/react') { %>, "outDir": "" <% } %> }, <% if(uiFramework === '@storybook/react') { %>"files": [ - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/image.d.ts" + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/styled-jsx.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/cssmodule.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/image.d.ts" ],<% } %> "exclude": ["../**/*.spec.ts" <% if(uiFramework === '@storybook/react') { %>, "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"<% } %>], "include": [<% if(uiFramework === '@storybook/angular' && projectType === 'library') { %> diff --git a/packages/storybook/src/generators/configuration/project-files/.storybook/main.js__tmpl__ b/packages/storybook/src/generators/configuration/project-files/.storybook/main.js__tmpl__ index 33895410aa7d9..23bffd5ce2d4b 100644 --- a/packages/storybook/src/generators/configuration/project-files/.storybook/main.js__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files/.storybook/main.js__tmpl__ @@ -11,9 +11,9 @@ module.exports = { '../<%= projectDirectory %>/**/*.stories.mdx', '../<%= projectDirectory %>/**/*.stories.@(js|jsx|ts|tsx)' <% } %>], - addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react' && !usesVite) { %>, '@nrwl/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> + addons: ['@storybook/addon-essentials' <% if(uiFramework === '@storybook/react' && !usesVite) { %>, '@nx/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %> <% if(usesSwc && !isNextJs) { %>, 'storybook-addon-swc' <% } %> - <% if(isNextJs) { %>, 'storybook-addon-swc', + <% if(isNextJs) { %>, 'storybook-addon-swc', { name: 'storybook-addon-next', options: { @@ -40,7 +40,7 @@ module.exports = { <% } %> <% if(usesVite) { %> -// To customize your Vite configuration you can use the viteFinal field. +// To customize your Vite configuration you can use the viteFinal field. // Check https://storybook.js.org/docs/react/builders/vite#configuration // and https://nx.dev/packages/storybook/documents/custom-builder-configs -<% } %> \ No newline at end of file +<% } %> diff --git a/packages/storybook/src/generators/configuration/project-files/.storybook/tsconfig.json__tmpl__ b/packages/storybook/src/generators/configuration/project-files/.storybook/tsconfig.json__tmpl__ index 14c9245f062cc..17de16312f33d 100644 --- a/packages/storybook/src/generators/configuration/project-files/.storybook/tsconfig.json__tmpl__ +++ b/packages/storybook/src/generators/configuration/project-files/.storybook/tsconfig.json__tmpl__ @@ -5,9 +5,9 @@ <% if(uiFramework === '@storybook/react') { %>, "outDir": "" <% } %> }, <% if(uiFramework === '@storybook/react') { %>"files": [ - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/styled-jsx.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nrwl/react/typings/image.d.ts" + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/styled-jsx.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/cssmodule.d.ts", + "<% if(!isRootProject) { %><%= offsetFromRoot %><% } %>../node_modules/@nx/react/typings/image.d.ts" ],<% } %> "exclude": ["../**/*.spec.ts" <% if(uiFramework === '@storybook/react') { %>, "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"<% } %>], "include": [<% if(uiFramework === '@storybook/angular' && projectType === 'library') { %> diff --git a/packages/storybook/src/generators/configuration/test-configs/root-project-configuration.json b/packages/storybook/src/generators/configuration/test-configs/root-project-configuration.json index dda85b42aa117..5162aa06d8004 100644 --- a/packages/storybook/src/generators/configuration/test-configs/root-project-configuration.json +++ b/packages/storybook/src/generators/configuration/test-configs/root-project-configuration.json @@ -5,7 +5,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/web" }, @@ -23,7 +23,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "web:build" }, "configurations": { @@ -32,7 +32,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["{projectRoot}/coverage"], "options": { "passWithNoTests": true } }, diff --git a/packages/storybook/src/generators/configuration/test-configs/root-workspace-configuration.json b/packages/storybook/src/generators/configuration/test-configs/root-workspace-configuration.json index bfb1ec779e8c4..9f45cee86243c 100644 --- a/packages/storybook/src/generators/configuration/test-configs/root-workspace-configuration.json +++ b/packages/storybook/src/generators/configuration/test-configs/root-workspace-configuration.json @@ -7,7 +7,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/web" }, @@ -25,7 +25,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "web:build" }, "configurations": { @@ -37,7 +37,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["{projectRoot}/coverage"], "options": { "passWithNoTests": true } }, @@ -73,7 +73,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -87,7 +87,7 @@ "assets": ["apps/reapp/src/favicon.ico", "apps/reapp/src/assets"], "styles": ["apps/reapp/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -113,7 +113,7 @@ } }, "serve": { - "executor": "@nrwl/web:dev-server", + "executor": "@nx/web:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reapp:build", @@ -130,14 +130,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/apps/reapp"], "options": { "jestConfig": "apps/reapp/jest.config.ts", @@ -155,14 +155,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/nxlib/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/nxlib"], "options": { "jestConfig": "libs/nxlib/jest.config.ts", @@ -179,7 +179,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/web:rollup", + "executor": "@nx/web:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/nxlib-buildable", @@ -187,7 +187,7 @@ "project": "libs/nxlib-buildable/package.json", "entryFile": "libs/nxlib-buildable/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -199,14 +199,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/nxlib-buildable/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/nxlib-buildable"], "options": { "jestConfig": "libs/nxlib-buildable/jest.config.ts", @@ -223,7 +223,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/web:rollup", + "executor": "@nx/web:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/relib-buildable", @@ -231,7 +231,7 @@ "project": "libs/relib-buildable/package.json", "entryFile": "libs/relib-buildable/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -243,14 +243,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/relib-buildable/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/relib-buildable"], "options": { "jestConfig": "libs/relib-buildable/jest.config.ts", @@ -266,7 +266,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -283,7 +283,7 @@ ], "styles": ["apps/reapp-swc/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -309,7 +309,7 @@ } }, "serve": { - "executor": "@nrwl/web:dev-server", + "executor": "@nx/web:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reapp-swc:build", @@ -326,14 +326,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp-swc/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/apps/reapp-swc"], "options": { "jestConfig": "apps/reapp-swc/jest.config.ts", diff --git a/packages/storybook/src/generators/configuration/test-configs/various-projects.json b/packages/storybook/src/generators/configuration/test-configs/various-projects.json index 7d8dfae252fa8..a5b981d3492ab 100644 --- a/packages/storybook/src/generators/configuration/test-configs/various-projects.json +++ b/packages/storybook/src/generators/configuration/test-configs/various-projects.json @@ -6,7 +6,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -19,7 +19,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "main-vite:build" }, "configurations": { @@ -34,7 +34,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/main-vite"], "options": { "passWithNoTests": true, @@ -42,14 +42,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-vite/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -58,7 +58,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -78,7 +78,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-vite-e2e/cypress.config.ts", "devServerTarget": "main-vite:serve:development", @@ -89,7 +89,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-vite-e2e/**/*.{js,ts}"] } } @@ -105,7 +105,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -118,7 +118,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "main-vite-ts:build" }, "configurations": { @@ -133,7 +133,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/main-vite-ts"], "options": { "passWithNoTests": true, @@ -141,14 +141,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-vite-ts/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -157,7 +157,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -177,7 +177,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-vite-ts-e2e/cypress.config.ts", "devServerTarget": "main-vite-ts:serve:development", @@ -188,7 +188,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-vite-ts-e2e/**/*.{js,ts}"] @@ -206,7 +206,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -223,7 +223,7 @@ ], "styles": ["apps/main-webpack/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -249,7 +249,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "main-webpack:build", "hmr": true }, "configurations": { @@ -261,14 +261,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-webpack/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/main-webpack/jest.config.ts", @@ -276,7 +276,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -285,7 +285,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -305,7 +305,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/main-webpack-e2e/cypress.config.ts", "devServerTarget": "main-webpack:serve:development", @@ -316,7 +316,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-webpack-e2e/**/*.{js,ts}"] @@ -334,7 +334,7 @@ "sourceRoot": "apps/my-plugin-e2e/src", "targets": { "e2e": { - "executor": "@nrwl/nx-plugin:e2e", + "executor": "@nx/nx-plugin:e2e", "options": { "target": "my-plugin:build", "jestConfig": "apps/my-plugin-e2e/jest.config.ts" @@ -352,7 +352,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -365,7 +365,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nextapp:build", "dev": true }, "configurations": { @@ -380,11 +380,11 @@ } }, "export": { - "executor": "@nrwl/next:export", + "executor": "@nx/next:export", "options": { "buildTarget": "nextapp:build:production" } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/nextapp/jest.config.ts", @@ -392,12 +392,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nextapp/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -406,7 +406,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -426,7 +426,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/nextapp-e2e/cypress.config.ts", "devServerTarget": "nextapp:serve:development", @@ -437,7 +437,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nextapp-e2e/**/*.{js,ts}"] } } @@ -506,14 +506,14 @@ "options": { "browserTarget": "ngapp:build" } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ngapp/**/*.ts", "apps/ngapp/**/*.html"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/ngapp/jest.config.ts", @@ -552,7 +552,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/ngapp-e2e/cypress.config.ts", "devServerTarget": "ngapp:serve:development", @@ -563,7 +563,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ngapp-e2e/**/*.{js,ts}"] } } @@ -579,7 +579,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/nglib-e2e/cypress.config.ts", "devServerTarget": "nglib:storybook", @@ -588,7 +588,7 @@ "configurations": { "ci": { "devServerTarget": "nglib:storybook:ci" } } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nglib-e2e/**/*.{js,ts}"] } } @@ -604,7 +604,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-rollup-e2e/cypress.config.ts", "devServerTarget": "react-rollup:storybook", @@ -615,7 +615,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/react-rollup-e2e/**/*.{js,ts}"] @@ -633,7 +633,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -675,7 +675,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "react-swc:build", "hmr": true }, "configurations": { @@ -687,14 +687,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/react-swc/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/react-swc/jest.config.ts", @@ -712,7 +712,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-swc-e2e/cypress.config.ts", "devServerTarget": "react-swc:serve:development", @@ -723,7 +723,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/react-swc-e2e/**/*.{js,ts}"] } } @@ -739,7 +739,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/react-vite-e2e/cypress.config.ts", "devServerTarget": "react-vite:storybook", @@ -750,7 +750,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/react-vite-e2e/**/*.{js,ts}"] } } @@ -766,7 +766,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -779,7 +779,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reapp:build" }, "configurations": { @@ -794,7 +794,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/reapp"], "options": { "passWithNoTests": true, @@ -802,12 +802,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -816,7 +816,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -836,7 +836,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/reapp-e2e/cypress.config.ts", "devServerTarget": "reapp:serve:development", @@ -847,7 +847,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp-e2e/**/*.{js,ts}"] } } @@ -863,7 +863,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -876,7 +876,7 @@ "assets": ["apps/reappw/src/favicon.ico", "apps/reappw/src/assets"], "styles": ["apps/reappw/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -902,7 +902,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reappw:build", "hmr": true }, "configurations": { @@ -914,12 +914,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reappw/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/reappw/jest.config.ts", @@ -927,7 +927,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -936,7 +936,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -956,7 +956,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/reappw-e2e/cypress.config.ts", "devServerTarget": "reappw:serve:development", @@ -967,7 +967,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reappw-e2e/**/*.{js,ts}"] } } @@ -984,7 +984,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -997,7 +997,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "wv1:build" }, "configurations": { @@ -1009,12 +1009,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/wv1/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/wv1/jest.config.ts", @@ -1022,7 +1022,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/web-components", "port": 4400, @@ -1031,7 +1031,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/web-components", @@ -1050,7 +1050,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/wv1-e2e/cypress.config.ts", "devServerTarget": "wv1:serve:development", @@ -1061,7 +1061,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/wv1-e2e/**/*.{js,ts}"] } } @@ -1078,7 +1078,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -1111,19 +1111,19 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "ww1:build" }, "configurations": { "production": { "buildTarget": "ww1:build:production" } } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ww1/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/ww1/jest.config.ts", @@ -1131,7 +1131,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/web-components", "port": 4400, @@ -1140,7 +1140,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/web-components", @@ -1159,7 +1159,7 @@ "projectType": "application", "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/ww1-e2e/cypress.config.ts", "devServerTarget": "ww1:serve", @@ -1170,7 +1170,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ww1-e2e/**/*.{js,ts}"] } } @@ -1186,7 +1186,7 @@ "projectType": "library", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/my-plugin", @@ -1218,7 +1218,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -1230,7 +1230,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/my-plugin/jest.config.ts", @@ -1258,7 +1258,7 @@ "prefix": "imported-libs", "targets": { "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/nglib/jest.config.ts", @@ -1266,7 +1266,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/nglib/**/*.ts", "libs/nglib/**/*.html"] @@ -1304,14 +1304,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-rollup/**/*.{ts,tsx,js,jsx}"] } }, "build": { - "executor": "@nrwl/rollup:rollup", + "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/react-rollup", @@ -1319,7 +1319,7 @@ "project": "libs/react-rollup/package.json", "entryFile": "libs/react-rollup/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -1331,7 +1331,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/react-rollup/jest.config.ts", @@ -1339,7 +1339,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -1348,7 +1348,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -1367,14 +1367,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-rollup-2/**/*.{ts,tsx,js,jsx}"] } }, "build": { - "executor": "@nrwl/rollup:rollup", + "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/react-rollup-2", @@ -1382,7 +1382,7 @@ "project": "libs/react-rollup-2/package.json", "entryFile": "libs/react-rollup-2/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -1394,7 +1394,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/react-rollup-2/jest.config.ts", @@ -1412,14 +1412,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-vite/**/*.{ts,tsx,js,jsx}"] } }, "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/libs/react-vite" }, @@ -1429,7 +1429,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/libs/react-vite"], "options": { "passWithNoTests": true, @@ -1437,7 +1437,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -1446,7 +1446,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -1466,14 +1466,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-vite-2/**/*.{ts,tsx,js,jsx}"] } }, "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/libs/react-vite-2" }, @@ -1483,7 +1483,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/libs/react-vite-2"], "options": { "passWithNoTests": true, @@ -1500,7 +1500,7 @@ "projectType": "library", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/utils/one", @@ -1510,12 +1510,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/utils/one/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/utils/one/jest.config.ts", @@ -1533,17 +1533,17 @@ "projectType": "library", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/utils/three-vite" } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/utils/three-vite/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/utils/three-vite/jest.config.ts", @@ -1561,7 +1561,7 @@ "projectType": "library", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/utils/two", @@ -1571,12 +1571,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/utils/two/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/utils/two/jest.config.ts", diff --git a/packages/storybook/src/generators/configuration/test-configs/workspace-conifiguration.json b/packages/storybook/src/generators/configuration/test-configs/workspace-conifiguration.json index cf66755438401..6ef12ac6dd9c3 100644 --- a/packages/storybook/src/generators/configuration/test-configs/workspace-conifiguration.json +++ b/packages/storybook/src/generators/configuration/test-configs/workspace-conifiguration.json @@ -7,7 +7,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -20,7 +20,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nxapp:build", @@ -38,13 +38,13 @@ } }, "export": { - "executor": "@nrwl/next:export", + "executor": "@nx/next:export", "options": { "buildTarget": "nxapp:build:production" } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/apps/nxapp"], "options": { "jestConfig": "apps/nxapp/jest.config.ts", @@ -52,7 +52,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nxapp/**/*.{ts,tsx,js,jsx}"] @@ -68,7 +68,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -82,7 +82,7 @@ "assets": ["apps/reapp/src/favicon.ico", "apps/reapp/src/assets"], "styles": ["apps/reapp/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -108,7 +108,7 @@ } }, "serve": { - "executor": "@nrwl/web:dev-server", + "executor": "@nx/web:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reapp:build", @@ -125,14 +125,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/apps/reapp"], "options": { "jestConfig": "apps/reapp/jest.config.ts", @@ -150,14 +150,14 @@ "tags": [], "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/nxlib/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/nxlib"], "options": { "jestConfig": "libs/nxlib/jest.config.ts", @@ -174,7 +174,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/web:rollup", + "executor": "@nx/web:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/nxlib-buildable", @@ -182,7 +182,7 @@ "project": "libs/nxlib-buildable/package.json", "entryFile": "libs/nxlib-buildable/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -194,14 +194,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/nxlib-buildable/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/nxlib-buildable"], "options": { "jestConfig": "libs/nxlib-buildable/jest.config.ts", @@ -218,7 +218,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/web:rollup", + "executor": "@nx/web:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/relib-buildable", @@ -226,7 +226,7 @@ "project": "libs/relib-buildable/package.json", "entryFile": "libs/relib-buildable/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel", "assets": [ { @@ -238,14 +238,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/relib-buildable/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/libs/relib-buildable"], "options": { "jestConfig": "libs/relib-buildable/jest.config.ts", @@ -261,7 +261,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -278,7 +278,7 @@ ], "styles": ["apps/reapp-swc/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -304,7 +304,7 @@ } }, "serve": { - "executor": "@nrwl/web:dev-server", + "executor": "@nx/web:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "reapp-swc:build", @@ -321,14 +321,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/reapp-swc/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["coverage/apps/reapp-swc"], "options": { "jestConfig": "apps/reapp-swc/jest.config.ts", diff --git a/packages/storybook/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap b/packages/storybook/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap index e948c166fa6a1..a7beee5475656 100644 --- a/packages/storybook/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap +++ b/packages/storybook/src/generators/cypress-project/__snapshots__/cypress-project.spec.ts.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/storybook:cypress-project should generate files 1`] = ` +exports[`@nx/storybook:cypress-project should generate files 1`] = ` "import { defineConfig } from 'cypress'; -import { nxE2EStorybookPreset } from '@nrwl/storybook/presets/cypress'; +import { nxE2EStorybookPreset } from '@nx/storybook/presets/cypress'; export default defineConfig({ e2e: nxE2EStorybookPreset(__dirname), diff --git a/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts b/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts index dae678454f7f2..b3d082c85a8d7 100644 --- a/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts +++ b/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts @@ -6,7 +6,7 @@ import { libraryGenerator } from '@nx/js'; import { cypressProjectGenerator } from './cypress-project'; jest.mock('@nx/cypress/src/utils/cypress-version'); -describe('@nrwl/storybook:cypress-project', () => { +describe('@nx/storybook:cypress-project', () => { let tree: Tree; let mockedInstalledCypressVersion: jest.Mock< ReturnType @@ -93,7 +93,7 @@ describe('@nrwl/storybook:cypress-project', () => { ).toBeTruthy(); expect( - readJson(tree, 'package.json').devDependencies['@nrwl/cypress'] + readJson(tree, 'package.json').devDependencies['@nx/cypress'] ).toBeTruthy(); }); }); diff --git a/packages/storybook/src/generators/cypress-project/cypress-project.ts b/packages/storybook/src/generators/cypress-project/cypress-project.ts index 27d66cc6f2cea..2e1861c6e6d09 100644 --- a/packages/storybook/src/generators/cypress-project/cypress-project.ts +++ b/packages/storybook/src/generators/cypress-project/cypress-project.ts @@ -144,7 +144,9 @@ function updateAngularJsonBuilder( function projectAlreadyHasCypress(tree: Tree): boolean { const packageJsonContents = readJson(tree, 'package.json'); return ( - (packageJsonContents?.['devDependencies']?.['@nrwl/cypress'] || + (packageJsonContents?.['devDependencies']?.['@nx/cypress'] || + packageJsonContents?.['dependencies']?.['@nx/cypress'] || + packageJsonContents?.['devDependencies']?.['@nrwl/cypress'] || packageJsonContents?.['dependencies']?.['@nrwl/cypress']) && (packageJsonContents?.['devDependencies']?.['cypress'] || packageJsonContents?.['dependencies']?.['cypress']) diff --git a/packages/storybook/src/generators/cypress-project/files/cypress.config.ts__tpl__ b/packages/storybook/src/generators/cypress-project/files/cypress.config.ts__tpl__ index 5b3e381db7d0d..b61050fb8cf71 100644 --- a/packages/storybook/src/generators/cypress-project/files/cypress.config.ts__tpl__ +++ b/packages/storybook/src/generators/cypress-project/files/cypress.config.ts__tpl__ @@ -1,5 +1,5 @@ import { defineConfig } from 'cypress'; -import { nxE2EStorybookPreset } from '@nrwl/storybook/presets/cypress'; +import { nxE2EStorybookPreset } from '@nx/storybook/presets/cypress'; export default defineConfig({ e2e: nxE2EStorybookPreset(__dirname) diff --git a/packages/storybook/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/storybook/src/generators/init/__snapshots__/init.spec.ts.snap index 8fc3af2e0ce47..061755c9528a2 100644 --- a/packages/storybook/src/generators/init/__snapshots__/init.spec.ts.snap +++ b/packages/storybook/src/generators/init/__snapshots__/init.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/storybook:init dependencies for package.json should add angular related dependencies when using Angular as uiFramework 1`] = ` +exports[`@nx/storybook:init dependencies for package.json should add angular related dependencies when using Angular as uiFramework 1`] = ` { "dependencies": { "existing": "1.0.0", @@ -8,7 +8,7 @@ exports[`@nrwl/storybook:init dependencies for package.json should add angular r "devDependencies": { "@angular/forms": "*", "@nrwl/js": "0.0.1", - "@nrwl/storybook": "^6.5.15", + "@nx/storybook": "^6.5.15", "@storybook/addon-essentials": "^6.5.15", "@storybook/angular": "^6.5.15", "@storybook/builder-webpack5": "^6.5.15", diff --git a/packages/storybook/src/generators/init/init.spec.ts b/packages/storybook/src/generators/init/init.spec.ts index cb75be97bd60e..5d27ccaf6e673 100644 --- a/packages/storybook/src/generators/init/init.spec.ts +++ b/packages/storybook/src/generators/init/init.spec.ts @@ -9,7 +9,7 @@ import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { storybookVersion } from '../../utils/versions'; import { initGenerator } from './init'; -describe('@nrwl/storybook:init', () => { +describe('@nx/storybook:init', () => { let tree: Tree; beforeEach(() => { @@ -22,7 +22,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -33,8 +33,8 @@ describe('@nrwl/storybook:init', () => { expect(packageJson).toMatchSnapshot(); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -67,7 +67,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -76,8 +76,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -108,7 +108,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -117,8 +117,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -150,7 +150,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -159,8 +159,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -200,7 +200,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -209,8 +209,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -250,7 +250,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -259,8 +259,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -303,7 +303,7 @@ describe('@nrwl/storybook:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/storybook': storybookVersion, [existing]: existingVersion }, + { '@nx/storybook': storybookVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { @@ -312,8 +312,8 @@ describe('@nrwl/storybook:init', () => { const packageJson = readJson(tree, 'package.json'); // general deps - expect(packageJson.devDependencies['@nrwl/storybook']).toBeDefined(); - expect(packageJson.dependencies['@nrwl/storybook']).toBeUndefined(); + expect(packageJson.devDependencies['@nx/storybook']).toBeDefined(); + expect(packageJson.dependencies['@nx/storybook']).toBeUndefined(); expect(packageJson.dependencies[existing]).toBeDefined(); expect(packageJson.devDependencies[existing]).toBeDefined(); expect( @@ -400,7 +400,7 @@ describe('@nrwl/storybook:init', () => { // check that only the following dependencies have been added expect(Object.keys(packageJson.devDependencies)).toEqual([ '@nrwl/js', - '@nrwl/storybook', + '@nx/storybook', '@storybook/addon-essentials', '@storybook/builder-webpack5', '@storybook/core-server', diff --git a/packages/storybook/src/generators/init/init.ts b/packages/storybook/src/generators/init/init.ts index 1737418786ae5..c83257b738591 100644 --- a/packages/storybook/src/generators/init/init.ts +++ b/packages/storybook/src/generators/init/init.ts @@ -40,7 +40,7 @@ function checkDependenciesInstalled(host: Tree, schema: Schema) { packageJson.devDependencices = packageJson.devDependencices || {}; // base deps - devDependencies['@nrwl/storybook'] = nxVersion; + devDependencies['@nx/storybook'] = nxVersion; if (schema.storybook7Configuration) { // Needed for Storybook 7 @@ -133,7 +133,7 @@ function checkDependenciesInstalled(host: Tree, schema: Schema) { devDependencies['@babel/preset-typescript'] = babelPresetTypescriptVersion; if (schema.bundler === 'webpack') { - devDependencies['@nrwl/webpack'] = nxVersion; + devDependencies['@nx/webpack'] = nxVersion; } } @@ -164,7 +164,7 @@ function addCacheableOperation(tree: Tree) { !nxJson.tasksRunnerOptions || !nxJson.tasksRunnerOptions.default || (nxJson.tasksRunnerOptions.default.runner !== - '@nrwl/workspace/tasks-runners/default' && + '@nx/workspace/tasks-runners/default' && nxJson.tasksRunnerOptions.default.runner !== 'nx/tasks-runners/default') ) { return; @@ -192,10 +192,10 @@ function moveToDevDependencies(tree: Tree) { packageJson.dependencies = packageJson.dependencies || {}; packageJson.devDependencies = packageJson.devDependencies || {}; - if (packageJson.dependencies['@nrwl/storybook']) { - packageJson.devDependencies['@nrwl/storybook'] = - packageJson.dependencies['@nrwl/storybook']; - delete packageJson.dependencies['@nrwl/storybook']; + if (packageJson.dependencies['@nx/storybook']) { + packageJson.devDependencies['@nx/storybook'] = + packageJson.dependencies['@nx/storybook']; + delete packageJson.dependencies['@nx/storybook']; } return packageJson; }); diff --git a/packages/storybook/src/generators/migrate-7/__snapshots__/helper-functions.spec.ts.snap b/packages/storybook/src/generators/migrate-7/__snapshots__/helper-functions.spec.ts.snap index dc81cb891bbd2..06410fe2c1eda 100644 --- a/packages/storybook/src/generators/migrate-7/__snapshots__/helper-functions.spec.ts.snap +++ b/packages/storybook/src/generators/migrate-7/__snapshots__/helper-functions.spec.ts.snap @@ -184,8 +184,8 @@ You can run these commands again, manually, and follow the instructions in the output of these commands to migrate your Storybook configuration to the latest version 7. -Also, we may have missed something. Please make sure to check the logs of the Storybook CLI commands that were run, and look for -the \`❌ Failed trying to evaluate\` message or \`❌ The migration failed to update\` message. This will indicate if a command was +Also, we may have missed something. Please make sure to check the logs of the Storybook CLI commands that were run, and look for +the \`❌ Failed trying to evaluate\` message or \`❌ The migration failed to update\` message. This will indicate if a command was unsuccessful, and will help you run the migration again, manually. ## Final adjustments @@ -197,8 +197,8 @@ workspace, to make sure that everything is working as expected. These adjustment - The \`viteConfigPath\` option was added to the Storybook builder, where needed. - The import package for the \`StorybookConfig\` type was changed to be framework specific. - The \`uiFramework\` option was removed from your project's Storybook targets. -- The \`lit\` package was added to your workspace, if you are using the -Web Components \`@storybook/web-components\` package. Please note that the \`lit-html\` package is +- The \`lit\` package was added to your workspace, if you are using the +Web Components \`@storybook/web-components\` package. Please note that the \`lit-html\` package is no longer needed by Storybook v7. So, if you are not using it anywhere else, you can safely remove it. ## Next steps @@ -218,7 +218,7 @@ Please read the [Storybook 7.0.0 release article](https://storybook.js.org/blog/ official [Storybook 7.0.0 migration guide](https://storybook.js.org/docs/react/migration-guide) for more information. -You can also read the docs for the [@nrwl/storybook:migrate-7 generator](https://nx.dev/packages/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/packages/storybook/documents/storybook-7-setup). +You can also read the docs for the [@nx/storybook:migrate-7 generator](https://nx.dev/packages/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/packages/storybook/documents/storybook-7-setup). " `; @@ -234,7 +234,7 @@ exports[`Helper functions for the Storybook 7 migration generator removePathReso ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', { name: 'storybook-addon-next', @@ -251,7 +251,7 @@ exports[`Helper functions for the Storybook 7 migration generator removePathReso " import type { StorybookConfig } from '@storybook/core-common'; import path from 'path'; - + const config: StorybookConfig = { core: { builder: 'webpack5' }, stories: [ @@ -260,8 +260,7 @@ exports[`Helper functions for the Storybook 7 migration generator removePathReso ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', - + '@nx/react/plugins/storybook', 'storybook-addon-swc', { name: 'storybook-addon-next', @@ -271,7 +270,7 @@ exports[`Helper functions for the Storybook 7 migration generator removePathReso }, ], } as StorybookConfig; - + module.exports = config; " `; @@ -282,7 +281,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeTypecast import { mergeConfig } from 'vite'; import viteTsConfigPaths from 'vite-tsconfig-paths'; - + const config: StorybookConfig = { core: { builder: '@storybook/builder-vite' }, stories: [ @@ -300,7 +299,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeTypecast }); }, } ; - + module.exports = config; " `; @@ -309,7 +308,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeTypecast " import type { StorybookConfig } from '@storybook/core-common'; import path from 'path'; - + const config: StorybookConfig = { core: { builder: 'webpack5' }, stories: [ @@ -318,8 +317,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeTypecast ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', - + '@nx/react/plugins/storybook', 'storybook-addon-swc', { name: 'storybook-addon-next', @@ -329,7 +327,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeTypecast }, ], } ; - + module.exports = config; " `; @@ -338,7 +336,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeViteTsCo " const { mergeConfig } = require('vite'); - + module.exports = { core: { builder: '@storybook/builder-vite' }, stories: [ @@ -352,7 +350,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeViteTsCo }); }, }; - " +" `; exports[`Helper functions for the Storybook 7 migration generator removeViteTsConfigPathsPlugin should remove ViteTsConfigPathsPlugin from main.ts and the whole plugin array if empty 1`] = ` @@ -361,7 +359,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeViteTsCo import { mergeConfig } from 'vite'; - + const config: StorybookConfig = { core: { builder: '@storybook/builder-vite' }, stories: [ @@ -375,7 +373,7 @@ exports[`Helper functions for the Storybook 7 migration generator removeViteTsCo }); }, } as StorybookConfig; - + module.exports = config; " `; diff --git a/packages/storybook/src/generators/migrate-7/files/storybook-migration-summary.md__tmpl__ b/packages/storybook/src/generators/migrate-7/files/storybook-migration-summary.md__tmpl__ index 8cce206c6e088..c2f601b3cdc74 100644 --- a/packages/storybook/src/generators/migrate-7/files/storybook-migration-summary.md__tmpl__ +++ b/packages/storybook/src/generators/migrate-7/files/storybook-migration-summary.md__tmpl__ @@ -43,8 +43,8 @@ You can run these commands again, manually, and follow the instructions in the output of these commands to migrate your Storybook configuration to the latest version 7. <% } %> -Also, we may have missed something. Please make sure to check the logs of the Storybook CLI commands that were run, and look for -the `❌ Failed trying to evaluate` message or `❌ The migration failed to update` message. This will indicate if a command was +Also, we may have missed something. Please make sure to check the logs of the Storybook CLI commands that were run, and look for +the `❌ Failed trying to evaluate` message or `❌ The migration failed to update` message. This will indicate if a command was unsuccessful, and will help you run the migration again, manually. ## Final adjustments @@ -56,8 +56,8 @@ workspace, to make sure that everything is working as expected. These adjustment - The `viteConfigPath` option was added to the Storybook builder, where needed. - The import package for the `StorybookConfig` type was changed to be framework specific. - The `uiFramework` option was removed from your project's Storybook targets. -- The `lit` package was added to your workspace, if you are using the -Web Components `@storybook/web-components` package. Please note that the `lit-html` package is +- The `lit` package was added to your workspace, if you are using the +Web Components `@storybook/web-components` package. Please note that the `lit-html` package is no longer needed by Storybook v7. So, if you are not using it anywhere else, you can safely remove it. ## Next steps @@ -77,4 +77,4 @@ Please read the [Storybook 7.0.0 release article](https://storybook.js.org/blog/ official [Storybook 7.0.0 migration guide](https://storybook.js.org/docs/react/migration-guide) for more information. -You can also read the docs for the [@nrwl/storybook:migrate-7 generator](https://nx.dev/packages/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/packages/storybook/documents/storybook-7-setup). +You can also read the docs for the [@nx/storybook:migrate-7 generator](https://nx.dev/packages/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/packages/storybook/documents/storybook-7-setup). diff --git a/packages/storybook/src/generators/migrate-7/helper-functions.spec.ts b/packages/storybook/src/generators/migrate-7/helper-functions.spec.ts index 9dc80759d8092..d5fa986bb9aac 100644 --- a/packages/storybook/src/generators/migrate-7/helper-functions.spec.ts +++ b/packages/storybook/src/generators/migrate-7/helper-functions.spec.ts @@ -82,7 +82,7 @@ describe('Helper functions for the Storybook 7 migration generator', () => { 'npx storybook@latest upgrade', '', '2. Call the Nx generator to prepare your files for migration:', - 'nx g @nrwl/storybook:migrate-7 --onlyPrepare', + 'nx g @nx/storybook:migrate-7 --onlyPrepare', '', '3. Call the Storybook automigrate scripts:', 'Run the following commands for each Storybook project:', @@ -97,7 +97,7 @@ describe('Helper functions for the Storybook 7 migration generator', () => { 'npx storybook@latest automigrate --config-dir apps/ngapp-ts/.storybook --renderer @storybook/angular', '', '4. Call the Nx generator to finish the migration:', - 'nx g @nrwl/storybook:migrate-7 --afterMigration', + 'nx g @nx/storybook:migrate-7 --afterMigration', ], title: 'Storybook 7 Migration Guide', }) @@ -252,7 +252,7 @@ function writeMainJs(tree: Tree) { ` const { mergeConfig } = require('vite'); const viteTsConfigPaths = require('vite-tsconfig-paths').default; - + module.exports = { core: { builder: '@storybook/builder-vite' }, stories: [ @@ -270,7 +270,7 @@ function writeMainJs(tree: Tree) { }); }, }; - ` +` ); tree.write( @@ -280,7 +280,7 @@ function writeMainJs(tree: Tree) { import { mergeConfig } from 'vite'; import viteTsConfigPaths from 'vite-tsconfig-paths'; - + const config: StorybookConfig = { core: { builder: '@storybook/builder-vite' }, stories: [ @@ -298,7 +298,7 @@ function writeMainJs(tree: Tree) { }); }, } as StorybookConfig; - + module.exports = config; ` ); @@ -316,7 +316,7 @@ function writeMainJs(tree: Tree) { ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', + '@nx/react/plugins/storybook', 'storybook-addon-swc', { name: 'storybook-addon-next', @@ -334,7 +334,7 @@ function writeMainJs(tree: Tree) { ` import type { StorybookConfig } from '@storybook/core-common'; import path from 'path'; - + const config: StorybookConfig = { core: { builder: 'webpack5' }, stories: [ @@ -343,8 +343,7 @@ function writeMainJs(tree: Tree) { ], addons: [ '@storybook/addon-essentials', - '@nrwl/react/plugins/storybook', - + '@nx/react/plugins/storybook', 'storybook-addon-swc', { name: 'storybook-addon-next', @@ -354,7 +353,7 @@ function writeMainJs(tree: Tree) { }, ], } as StorybookConfig; - + module.exports = config; ` ); diff --git a/packages/storybook/src/generators/migrate-7/helper-functions.ts b/packages/storybook/src/generators/migrate-7/helper-functions.ts index 2045e23fbf28b..fcbe6d3c18b4b 100644 --- a/packages/storybook/src/generators/migrate-7/helper-functions.ts +++ b/packages/storybook/src/generators/migrate-7/helper-functions.ts @@ -33,7 +33,7 @@ export function onlyShowGuide(storybookProjects: { `npx storybook@latest upgrade`, ``, `2. Call the Nx generator to prepare your files for migration:`, - `nx g @nrwl/storybook:migrate-7 --onlyPrepare`, + `nx g @nx/storybook:migrate-7 --onlyPrepare`, ``, `3. Call the Storybook automigrate scripts:`, `Run the following commands for each Storybook project:`, @@ -44,7 +44,7 @@ export function onlyShowGuide(storybookProjects: { ), ``, `4. Call the Nx generator to finish the migration:`, - `nx g @nrwl/storybook:migrate-7 --afterMigration`, + `nx g @nx/storybook:migrate-7 --afterMigration`, ], }); } @@ -336,7 +336,7 @@ export function removeTypecastFromMainTs( export function removeUiFrameworkFromProjectJson(tree: Tree) { forEachExecutorOptions( tree, - '@nrwl/storybook:build', + '@nx/storybook:build', (options, projectName, targetName) => { if (projectName && options?.['uiFramework']) { const projectConfiguration = readProjectConfiguration( @@ -351,7 +351,7 @@ export function removeUiFrameworkFromProjectJson(tree: Tree) { forEachExecutorOptions( tree, - '@nrwl/storybook:storybook', + '@nx/storybook:storybook', (options, projectName, targetName) => { if (projectName && options?.['uiFramework']) { const projectConfiguration = readProjectConfiguration( @@ -438,7 +438,7 @@ export function getAllStorybookInfo(tree: Tree): { const allStorybookDirs = {}; forEachExecutorOptions( tree, - '@nrwl/storybook:build', + '@nx/storybook:build', (options, projectName) => { if (projectName && options?.['configDir']) { const projectConfiguration = readProjectConfiguration( @@ -616,8 +616,8 @@ export function checkStorybookInstalled(packageJson): boolean { return ( (packageJson.dependencies['@storybook/core-server'] || packageJson.devDependencies['@storybook/core-server']) && - (packageJson.dependencies['@nrwl/storybook'] || - packageJson.devDependencies['@nrwl/storybook']) + (packageJson.dependencies['@nx/storybook'] || + packageJson.devDependencies['@nx/storybook']) ); } diff --git a/packages/storybook/src/generators/migrate-7/test-configs/all-projects.json b/packages/storybook/src/generators/migrate-7/test-configs/all-projects.json index 69bc9fffc0a5a..2b5abee077293 100644 --- a/packages/storybook/src/generators/migrate-7/test-configs/all-projects.json +++ b/packages/storybook/src/generators/migrate-7/test-configs/all-projects.json @@ -6,7 +6,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -19,7 +19,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nextapp:build", "dev": true }, "configurations": { @@ -34,11 +34,11 @@ } }, "export": { - "executor": "@nrwl/next:export", + "executor": "@nx/next:export", "options": { "buildTarget": "nextapp:build:production" } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/nextapp/jest.config.ts", @@ -47,12 +47,12 @@ "configurations": { "ci": { "ci": true, "codeCoverage": true } } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nextapp/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -61,7 +61,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -81,7 +81,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -94,7 +94,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nextapp-ts:build", "dev": true }, "configurations": { @@ -109,11 +109,11 @@ } }, "export": { - "executor": "@nrwl/next:export", + "executor": "@nx/next:export", "options": { "buildTarget": "nextapp-ts:build:production" } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/nextapp-ts/jest.config.ts", @@ -122,14 +122,14 @@ "configurations": { "ci": { "ci": true, "codeCoverage": true } } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/nextapp-ts/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -138,7 +138,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -211,14 +211,14 @@ "options": { "browserTarget": "ngapp:build" } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ngapp/**/*.ts", "apps/ngapp/**/*.html"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/ngapp/jest.config.ts", @@ -314,7 +314,7 @@ "options": { "browserTarget": "ngapp-ts:build" } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -324,7 +324,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/ngapp-ts/jest.config.ts", @@ -364,7 +364,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/apps/rv1" }, @@ -374,7 +374,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "rv1:build" }, "configurations": { @@ -386,7 +386,7 @@ } }, "preview": { - "executor": "@nrwl/vite:preview-server", + "executor": "@nx/vite:preview-server", "defaultConfiguration": "development", "options": { "buildTarget": "rv1:build" }, "configurations": { @@ -395,7 +395,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/rv1"], "options": { "passWithNoTests": true, @@ -403,12 +403,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/rv1/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -417,7 +417,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -437,7 +437,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/apps/rv2-ts" }, @@ -447,7 +447,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "rv2-ts:build" }, "configurations": { @@ -462,7 +462,7 @@ } }, "preview": { - "executor": "@nrwl/vite:preview-server", + "executor": "@nx/vite:preview-server", "defaultConfiguration": "development", "options": { "buildTarget": "rv2-ts:build" }, "configurations": { @@ -471,7 +471,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/rv2-ts"], "options": { "passWithNoTests": true, @@ -479,12 +479,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/rv2-ts/**/*.{ts,tsx,js,jsx}"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -493,7 +493,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -513,7 +513,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -553,7 +553,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "rw1:build", "hmr": true }, "configurations": { @@ -562,12 +562,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/rw1/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/rw1/jest.config.ts", @@ -576,7 +576,7 @@ "configurations": { "ci": { "ci": true, "codeCoverage": true } } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -585,7 +585,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/react", @@ -606,7 +606,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/vite:build", + "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "outputPath": "dist/apps/wv1" }, @@ -616,7 +616,7 @@ } }, "serve": { - "executor": "@nrwl/vite:dev-server", + "executor": "@nx/vite:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "wv1:build" }, "configurations": { @@ -628,7 +628,7 @@ } }, "preview": { - "executor": "@nrwl/vite:preview-server", + "executor": "@nx/vite:preview-server", "defaultConfiguration": "development", "options": { "buildTarget": "wv1:build" }, "configurations": { @@ -637,7 +637,7 @@ } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/wv1"], "options": { "passWithNoTests": true, @@ -645,12 +645,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/wv1/**/*.ts"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/web-components", "port": 4400, @@ -659,7 +659,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/web-components", @@ -679,7 +679,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -712,14 +712,14 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "ww1:build" }, "configurations": { "production": { "buildTarget": "ww1:build:production" } } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["coverage/apps/ww1"], "options": { "passWithNoTests": true, @@ -727,12 +727,12 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/ww1/**/*.ts"] } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/web-components", "port": 4400, @@ -741,7 +741,7 @@ "configurations": { "ci": { "quiet": true } } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputDir}"], "options": { "uiFramework": "@storybook/web-components", diff --git a/packages/storybook/src/migrations/update-15-5-3/ensure-webpack-package.ts b/packages/storybook/src/migrations/update-15-5-3/ensure-webpack-package.ts index 06fa4dedb5edc..d74c012dd18a0 100644 --- a/packages/storybook/src/migrations/update-15-5-3/ensure-webpack-package.ts +++ b/packages/storybook/src/migrations/update-15-5-3/ensure-webpack-package.ts @@ -6,7 +6,7 @@ import { } from '@nx/devkit'; import { nxVersion } from '../../utils/versions'; -// Add @nrwl/webpack as needed. +// Add @nx/webpack as needed. // See: https://github.com/nrwl/nx/issues/14455 export default async function update(tree: Tree) { const projects = getProjects(tree); diff --git a/packages/storybook/src/utils/test-configs/.storybook/main.js b/packages/storybook/src/utils/test-configs/.storybook/main.js index 6497b183f14bb..067fe72c7ed4e 100644 --- a/packages/storybook/src/utils/test-configs/.storybook/main.js +++ b/packages/storybook/src/utils/test-configs/.storybook/main.js @@ -4,5 +4,5 @@ module.exports = { '../src/app/**/*.stories.mdx', '../src/app/**/*.stories.@(js|jsx|ts|tsx)', ], - addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'], + addons: ['@storybook/addon-essentials', '@nx/react/plugins/storybook'], }; diff --git a/packages/storybook/src/utils/test-configs/different-target-variations.json b/packages/storybook/src/utils/test-configs/different-target-variations.json index 6e365a2a636a6..935639f67e61b 100644 --- a/packages/storybook/src/utils/test-configs/different-target-variations.json +++ b/packages/storybook/src/utils/test-configs/different-target-variations.json @@ -1,21 +1,21 @@ { "web": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "options": { "root": "apps/web", "outputPath": "dist/apps/web" } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "options": { "buildTarget": "web:build", "dev": true } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -25,7 +25,7 @@ } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputPath}"], "options": { "uiFramework": "@storybook/react", @@ -38,7 +38,7 @@ }, "react": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -47,7 +47,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -57,7 +57,7 @@ } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputPath}"], "options": { "uiFramework": "@storybook/react", @@ -70,7 +70,7 @@ }, "nextlib": { "build": { - "executor": "@nrwl/web:rollup", + "executor": "@nx/web:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/next-lib-buildable", @@ -78,14 +78,14 @@ "project": "libs/next-lib-buildable/package.json", "entryFile": "libs/next-lib-buildable/src/index.ts", "external": ["react/jsx-runtime"], - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", + "rollupConfig": "@nx/react/plugins/bundle-rollup", "compiler": "babel" } } }, "nextapp": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -94,7 +94,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nextapp:build", @@ -154,7 +154,7 @@ }, "nglib": { "build": { - "executor": "@nrwl/angular:ng-packagr-lite", + "executor": "@nx/angular:ng-packagr-lite", "outputs": ["dist/libs/nglibuild"], "options": { "project": "libs/nglibuild/ng-package.json" @@ -162,7 +162,7 @@ "defaultConfiguration": "production" }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "libs/nglibuild/**/*.ts", @@ -173,7 +173,7 @@ }, "react-swc": { "build": { - "executor": "@nrwl/web:webpack", + "executor": "@nx/web:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -182,7 +182,7 @@ } }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -192,7 +192,7 @@ } }, "build-storybook": { - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputPath}"], "options": { "uiFramework": "@storybook/react", @@ -205,7 +205,7 @@ }, "nextapp-swc": { "build": { - "executor": "@nrwl/next:build", + "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -215,7 +215,7 @@ } }, "serve": { - "executor": "@nrwl/next:server", + "executor": "@nx/next:server", "defaultConfiguration": "development", "options": { "buildTarget": "nextapp:build", diff --git a/packages/storybook/src/utils/test-configs/executor-context.json b/packages/storybook/src/utils/test-configs/executor-context.json index 67b591273e129..11b30283d0b14 100644 --- a/packages/storybook/src/utils/test-configs/executor-context.json +++ b/packages/storybook/src/utils/test-configs/executor-context.json @@ -5,7 +5,7 @@ "targetName": "build-storybook", "target": { "inputs": ["default", "^production", "{workspaceRoot}/.storybook/**/*"], - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputPath}"], "options": { "uiFramework": "@storybook/react", @@ -26,7 +26,7 @@ "build": { "dependsOn": ["^build"], "inputs": ["production", "^production"], - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -43,7 +43,7 @@ ], "styles": ["apps/main-webpack/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -69,7 +69,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "main-webpack:build", "hmr": true }, "configurations": { @@ -84,7 +84,7 @@ }, "lint": { "inputs": ["default", "{workspaceRoot}/.eslintrc.json"], - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/main-webpack/**/*.{ts,tsx,js,jsx}"] @@ -97,7 +97,7 @@ "^production", "{workspaceRoot}/jest.preset.js" ], - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/main-webpack/jest.config.ts", @@ -106,7 +106,7 @@ "configurations": {} }, "storybook": { - "executor": "@nrwl/storybook:storybook", + "executor": "@nx/storybook:storybook", "options": { "uiFramework": "@storybook/react", "port": 4400, @@ -120,7 +120,7 @@ "^production", "{workspaceRoot}/.storybook/**/*" ], - "executor": "@nrwl/storybook:build", + "executor": "@nx/storybook:build", "outputs": ["{options.outputPath}"], "options": { "uiFramework": "@storybook/react", diff --git a/packages/storybook/src/utils/utilities.spec.ts b/packages/storybook/src/utils/utilities.spec.ts index 296db7ae6e7a1..3bd6ea908dac8 100644 --- a/packages/storybook/src/utils/utilities.spec.ts +++ b/packages/storybook/src/utils/utilities.spec.ts @@ -38,7 +38,7 @@ describe('testing utilities', () => { beforeEach(async () => { overrideCollectionResolutionForTesting({ - '@nrwl/storybook': joinPathFragments( + '@nx/storybook': joinPathFragments( __dirname, '../../../../generators.json' ), @@ -57,7 +57,7 @@ describe('testing utilities', () => { writeJson(appTree, 'package.json', { devDependencies: { - '@nrwl/storybook': nxVersion, + '@nx/storybook': nxVersion, '@storybook/addon-knobs': storybookVersion, '@storybook/angular': storybookVersion, }, diff --git a/packages/storybook/src/utils/utilities.ts b/packages/storybook/src/utils/utilities.ts index 88b2e2eeec71a..0ed2dc5b12540 100644 --- a/packages/storybook/src/utils/utilities.ts +++ b/packages/storybook/src/utils/utilities.ts @@ -156,7 +156,7 @@ export function storybookConfigExistsCheck( `Could not find Storybook configuration for project ${projectName}. Please generate Storybook configuration using the following command: - nx g @nrwl/storybook:configuration --name=${projectName} + nx g @nx/storybook:configuration --name=${projectName} ` ); } @@ -188,7 +188,21 @@ export function findStorybookAndBuildTargetsAndCompiler(targets: { } = {}; const arrayOfBuilders = [ - '@nxext/vite:build', + '@nx/js:babel', + '@nx/js:swc', + '@nx/js:tsc', + '@nx/webpack:webpack', + '@nx/rollup:rollup', + '@nx/web:rollup', + '@nx/vite:build', + '@nx/angular:ng-packagr-lite', + '@nx/angular:package', + '@nx/angular:webpack-browser', + '@nx/esbuild:esbuild', + '@nx/next:build', + '@nx/react-native:bundle', + '@nx/react-native:build-android', + '@nx/react-native:bundle', '@nrwl/js:babel', '@nrwl/js:swc', '@nrwl/js:tsc', @@ -199,12 +213,13 @@ export function findStorybookAndBuildTargetsAndCompiler(targets: { '@nrwl/angular:ng-packagr-lite', '@nrwl/angular:package', '@nrwl/angular:webpack-browser', - '@angular-devkit/build-angular:browser', '@nrwl/esbuild:esbuild', '@nrwl/next:build', '@nrwl/react-native:bundle', '@nrwl/react-native:build-android', '@nrwl/react-native:bundle', + '@nxext/vite:build', + '@angular-devkit/build-angular:browser', ]; for (const target in targets) { @@ -213,10 +228,10 @@ export function findStorybookAndBuildTargetsAndCompiler(targets: { targets[target].executor === '@angular-devkit/build-angular:browser' ) { /** - * Not looking for '@nrwl/angular:ng-packagr-lite' or any other - * @nrwl/angular:* executors. + * Not looking for '@nx/angular:ng-packagr-lite' or any other + * @nx/angular:* executors. * Only looking for '@angular-devkit/build-angular:browser' - * because the '@nrwl/angular:ng-packagr-lite' executor + * because the '@nx/angular:ng-packagr-lite' executor * (and maybe the other custom executors) * does not support styles and extra options, so the user * will be forced to switch to build-storybook to add extra options. @@ -235,11 +250,13 @@ export function findStorybookAndBuildTargetsAndCompiler(targets: { returnObject.compiler = targets[target].options?.compiler; } else if ( targets[target].executor === '@storybook/angular:start-storybook' || - targets[target].executor === '@nrwl/storybook:storybook' + targets[target].executor === '@nrwl/storybook:storybook' || + targets[target].executor === '@nx/storybook:storybook' ) { returnObject.storybookTarget = target; } else if ( targets[target].executor === '@storybook/angular:build-storybook' || + targets[target].executor === '@nx/storybook:build' || targets[target].executor === '@nrwl/storybook:build' ) { returnObject.storybookBuildTarget = target; diff --git a/packages/vite/src/executors/preview-server/preview-server.impl.ts b/packages/vite/src/executors/preview-server/preview-server.impl.ts index 69de944607847..d3f90465ca0f6 100644 --- a/packages/vite/src/executors/preview-server/preview-server.impl.ts +++ b/packages/vite/src/executors/preview-server/preview-server.impl.ts @@ -27,6 +27,7 @@ export async function* vitePreviewServerExecutor( } const isCustomBuildTarget = + targetConfiguration.executor !== '@nx/vite:build' && targetConfiguration.executor !== '@nrwl/vite:build'; // Retrieve the option for the configured buildTarget. diff --git a/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap b/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap index 8c77c57edda49..e00e5984f2b16 100644 --- a/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap +++ b/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/vite:configuration library mode should add config for building library 1`] = ` +exports[`@nx/vite:configuration library mode should add config for building library 1`] = ` "/// import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; @@ -53,7 +53,7 @@ export default defineConfig({ " `; -exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 1`] = ` +exports[`@nx/vite:configuration library mode should set up non buildable library correctly 1`] = ` "/// import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; @@ -115,7 +115,7 @@ export default defineConfig({ " `; -exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 2`] = ` +exports[`@nx/vite:configuration library mode should set up non buildable library correctly 2`] = ` "{ "projects": { "react-lib-nonb-jest": { @@ -126,7 +126,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra "projectType": "library", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -135,7 +135,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/react-lib-nonb-jest/jest.config.ts", @@ -150,7 +150,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra " `; -exports[`@nrwl/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 1`] = ` +exports[`@nx/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 1`] = ` "import dts from 'vite-plugin-dts'; import { join } from 'path'; import { defineConfig } from 'vite'; @@ -202,7 +202,7 @@ export default defineConfig({ " `; -exports[`@nrwl/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 2`] = ` +exports[`@nx/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 2`] = ` "{ "projects": { "react-lib-nonb-vitest": { @@ -213,7 +213,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra "projectType": "library", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -222,7 +222,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["{projectRoot}/coverage"], "options": { "passWithNoTests": true, @@ -237,7 +237,7 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra " `; -exports[`@nrwl/vite:configuration transform React app to use Vite by providing custom targets transform React app if supported executor is provided should transform workspace.json project config 1`] = ` +exports[`@nx/vite:configuration transform React app to use Vite by providing custom targets transform React app if supported executor is provided should transform workspace.json project config 1`] = ` "{ "projects": { "my-test-mixed-react-app": { @@ -248,15 +248,15 @@ exports[`@nrwl/vite:configuration transform React app to use Vite by providing c "projectType": "application", "targets": { "invalid-build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"] }, "valid-build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"] }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "my-test-mixed-react-app:build", @@ -273,7 +273,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite by providing c } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -282,7 +282,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite by providing c } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-mixed-react-app/jest.config.ts", @@ -297,7 +297,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite by providing c " `; -exports[`@nrwl/vite:configuration transform React app to use Vite should create vite.config file at the root of the app 1`] = ` +exports[`@nx/vite:configuration transform React app to use Vite should create vite.config file at the root of the app 1`] = ` "/// import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; @@ -335,7 +335,7 @@ export default defineConfig({ " `; -exports[`@nrwl/vite:configuration transform React app to use Vite should move index.html to the root of the project 1`] = ` +exports[`@nx/vite:configuration transform React app to use Vite should move index.html to the root of the project 1`] = ` " @@ -354,7 +354,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should move in " `; -exports[`@nrwl/vite:configuration transform React app to use Vite should transform workspace.json project config 1`] = ` +exports[`@nx/vite:configuration transform React app to use Vite should transform workspace.json project config 1`] = ` "{ "projects": { "my-test-react-app": { @@ -365,7 +365,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -382,7 +382,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo ], "styles": ["apps/my-test-react-app/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -408,7 +408,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "my-test-react-app:build", @@ -425,14 +425,14 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/my-test-react-app/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-react-app/jest.config.ts", @@ -447,7 +447,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo " `; -exports[`@nrwl/vite:configuration transform Web app to use Vite should create vite.config file at the root of the app 1`] = ` +exports[`@nx/vite:configuration transform Web app to use Vite should create vite.config file at the root of the app 1`] = ` "/// import { defineConfig } from 'vite'; @@ -484,7 +484,7 @@ export default defineConfig({ " `; -exports[`@nrwl/vite:configuration transform Web app to use Vite should move index.html to the root of the project 1`] = ` +exports[`@nx/vite:configuration transform Web app to use Vite should move index.html to the root of the project 1`] = ` " @@ -503,7 +503,7 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should move inde " `; -exports[`@nrwl/vite:configuration transform Web app to use Vite should transform workspace.json project config 1`] = ` +exports[`@nx/vite:configuration transform Web app to use Vite should transform workspace.json project config 1`] = ` "{ "projects": { "my-test-web-app": { @@ -515,7 +515,7 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should transform "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -551,7 +551,7 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should transform } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "my-test-web-app:build" }, @@ -562,14 +562,14 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should transform } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/my-test-web-app/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-web-app/jest.config.ts", @@ -583,7 +583,7 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should transform " `; -exports[`@nrwl/vite:configuration vitest should create a vitest configuration if "includeVitest" is true 1`] = ` +exports[`@nx/vite:configuration vitest should create a vitest configuration if "includeVitest" is true 1`] = ` "/// import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/packages/vite/src/generators/configuration/configuration.spec.ts b/packages/vite/src/generators/configuration/configuration.spec.ts index 053e1b0d0c821..05d5d5fa15181 100644 --- a/packages/vite/src/generators/configuration/configuration.spec.ts +++ b/packages/vite/src/generators/configuration/configuration.spec.ts @@ -18,7 +18,7 @@ import { mockWebAppGenerator, } from '../../utils/test-utils'; -describe('@nrwl/vite:configuration', () => { +describe('@nx/vite:configuration', () => { let tree: Tree; describe('transform React app to use Vite', () => { @@ -29,7 +29,7 @@ describe('@nrwl/vite:configuration', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await viteConfigurationGenerator(tree, { @@ -81,7 +81,7 @@ describe('@nrwl/vite:configuration', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await viteConfigurationGenerator(tree, { @@ -138,7 +138,7 @@ describe('@nrwl/vite:configuration', () => { } catch (e) { expect(e).toBeDefined(); expect(e.toString()).toContain( - 'The project my-test-angular-app cannot be converted to use the @nrwl/vite executors' + 'The project my-test-angular-app cannot be converted to use the @nx/vite executors' ); } }); @@ -184,7 +184,7 @@ describe('@nrwl/vite:configuration', () => { } catch (e) { expect(e).toBeDefined(); expect(e.toString()).toContain( - 'Nx could not verify that the executors you are using can be converted to the @nrwl/vite executors.' + 'Nx could not verify that the executors you are using can be converted to the @nx/vite executors.' ); } }); @@ -199,7 +199,7 @@ describe('@nrwl/vite:configuration', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await viteConfigurationGenerator(tree, { @@ -235,7 +235,7 @@ describe('@nrwl/vite:configuration', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); }); @@ -254,7 +254,7 @@ describe('@nrwl/vite:configuration', () => { } catch (e) { expect(e).toBeDefined(); expect(e.toString()).toContain( - 'The build target invalid-build cannot be converted to use the @nrwl/vite:build executor' + 'The build target invalid-build cannot be converted to use the @nx/vite:build executor' ); } }); @@ -289,7 +289,7 @@ describe('@nrwl/vite:configuration', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await viteConfigurationGenerator(tree, { diff --git a/packages/vite/src/generators/configuration/configuration.ts b/packages/vite/src/generators/configuration/configuration.ts index fdc3af3d303cd..8a549a31b42d1 100644 --- a/packages/vite/src/generators/configuration/configuration.ts +++ b/packages/vite/src/generators/configuration/configuration.ts @@ -73,7 +73,7 @@ export async function viteConfigurationGenerator( */ if (!validFoundTargetName.build && projectContainsUnsupportedExecutor) { throw new Error( - `The project ${schema.project} cannot be converted to use the @nrwl/vite executors.` + `The project ${schema.project} cannot be converted to use the @nx/vite executors.` ); } @@ -83,7 +83,7 @@ export async function viteConfigurationGenerator( alreadyHasNxViteTargets.test ) { throw new Error( - `The project ${schema.project} is already configured to use the @nrwl/vite executors. + `The project ${schema.project} is already configured to use the @nx/vite executors. Please try a different project, or remove the existing targets and re-run this generator to reset the existing Vite Configuration. ` diff --git a/packages/vite/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/vite/src/generators/init/__snapshots__/init.spec.ts.snap index d021fab4d5806..c949e09f43803 100644 --- a/packages/vite/src/generators/init/__snapshots__/init.spec.ts.snap +++ b/packages/vite/src/generators/init/__snapshots__/init.spec.ts.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`@nrwl/vite:init dependencies for package.json should add vite packages and react-related dependencies for vite 1`] = ` +exports[`@nx/vite:init dependencies for package.json should add vite packages and react-related dependencies for vite 1`] = ` { "dependencies": { "existing": "1.0.0", }, "devDependencies": { "@nrwl/js": "0.0.1", - "@nrwl/vite": "0.0.1", + "@nx/vite": "0.0.1", "@vitejs/plugin-react": "^3.0.0", "@vitest/ui": "^0.25.8", "existing": "1.0.0", diff --git a/packages/vite/src/generators/init/init.spec.ts b/packages/vite/src/generators/init/init.spec.ts index 193f7a45333cb..9edec28d06d73 100644 --- a/packages/vite/src/generators/init/init.spec.ts +++ b/packages/vite/src/generators/init/init.spec.ts @@ -10,7 +10,7 @@ import { nxVersion } from '../../utils/versions'; import { initGenerator } from './init'; -describe('@nrwl/vite:init', () => { +describe('@nx/vite:init', () => { let tree: Tree; beforeEach(() => { @@ -23,7 +23,7 @@ describe('@nrwl/vite:init', () => { const existingVersion = '1.0.0'; addDependenciesToPackageJson( tree, - { '@nrwl/vite': nxVersion, [existing]: existingVersion }, + { '@nx/vite': nxVersion, [existing]: existingVersion }, { [existing]: existingVersion } ); await initGenerator(tree, { diff --git a/packages/vite/src/generators/init/init.ts b/packages/vite/src/generators/init/init.ts index 3810462086ddb..20539af0ecf33 100644 --- a/packages/vite/src/generators/init/init.ts +++ b/packages/vite/src/generators/init/init.ts @@ -32,7 +32,7 @@ function checkDependenciesInstalled(host: Tree, schema: InitGeneratorSchema) { packageJson.devDependencies = packageJson.devDependencies || {}; // base deps - devDependencies['@nrwl/vite'] = nxVersion; + devDependencies['@nx/vite'] = nxVersion; devDependencies['vite'] = viteVersion; devDependencies['vite-plugin-eslint'] = vitePluginEslintVersion; devDependencies['vite-tsconfig-paths'] = viteTsConfigPathsVersion; @@ -56,10 +56,10 @@ function moveToDevDependencies(tree: Tree) { packageJson.dependencies = packageJson.dependencies || {}; packageJson.devDependencies = packageJson.devDependencies || {}; - if (packageJson.dependencies['@nrwl/vite']) { - packageJson.devDependencies['@nrwl/vite'] = - packageJson.dependencies['@nrwl/vite']; - delete packageJson.dependencies['@nrwl/vite']; + if (packageJson.dependencies['@nx/vite']) { + packageJson.devDependencies['@nx/vite'] = + packageJson.dependencies['@nx/vite']; + delete packageJson.dependencies['@nx/vite']; } return packageJson; }); diff --git a/packages/vite/src/generators/vitest/vitest.spec.ts b/packages/vite/src/generators/vitest/vitest.spec.ts index 4d37096b81a57..595dc1755dd5b 100644 --- a/packages/vite/src/generators/vitest/vitest.spec.ts +++ b/packages/vite/src/generators/vitest/vitest.spec.ts @@ -30,7 +30,7 @@ describe('vitest generator', () => { const config = readProjectConfiguration(appTree, 'my-test-react-app'); expect(config.targets['test']).toMatchInlineSnapshot(` { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, }, @@ -53,7 +53,7 @@ describe('vitest generator', () => { const config = readProjectConfiguration(appTree, 'my-test-react-app'); expect(config.targets['test']).toMatchInlineSnapshot(` { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/apps/my-test-react-app", diff --git a/packages/vite/src/utils/generator-utils.spec.ts b/packages/vite/src/utils/generator-utils.spec.ts index 0dee514ae2285..42a997aa2e7c8 100644 --- a/packages/vite/src/utils/generator-utils.spec.ts +++ b/packages/vite/src/utils/generator-utils.spec.ts @@ -159,7 +159,7 @@ describe('generator utils', () => { object.targets ); }).rejects.toThrowErrorMatchingInlineSnapshot(` - "The build target my-build cannot be converted to use the @nrwl/vite:build executor. + "The build target my-build cannot be converted to use the @nx/vite:build executor. Please try again, either by providing a different build target or by not providing a target at all (Nx will convert the first one it finds, most probably this one: build) diff --git a/packages/vite/src/utils/generator-utils.ts b/packages/vite/src/utils/generator-utils.ts index 56117f59f78f4..98f3f0645572c 100644 --- a/packages/vite/src/utils/generator-utils.ts +++ b/packages/vite/src/utils/generator-utils.ts @@ -42,22 +42,42 @@ export function findExistingTargetsInProject( const supportedExecutors = { build: [ '@nxext/vite:build', + '@nx/js:babel', + '@nx/js:swc', + '@nx/webpack:webpack', + '@nx/rollup:rollup', + '@nx/web:rollup', '@nrwl/js:babel', '@nrwl/js:swc', '@nrwl/webpack:webpack', '@nrwl/rollup:rollup', '@nrwl/web:rollup', ], - serve: ['@nxext/vite:dev', '@nrwl/webpack:dev-server'], - test: ['@nrwl/jest:jest', '@nxext/vitest:vitest'], + serve: [ + '@nxext/vite:dev', + '@nx/webpack:dev-server', + '@nrwl/webpack:dev-server', + ], + test: ['@nx/jest:jest', '@nrwl/jest:jest', '@nxext/vitest:vitest'], }; const unsupportedExecutors = [ + '@nx/angular:ng-packagr-lite', + '@nx/angular:package', + '@nx/angular:webpack-browser', + '@nx/esbuild:esbuild', + '@nx/react-native:run-ios', + '@nx/react-native:start', + '@nx/react-native:run-android', + '@nx/react-native:bundle', + '@nx/react-native:build-android', + '@nx/react-native:bundle', + '@nx/next:build', + '@nx/next:server', + '@nx/js:tsc', '@nrwl/angular:ng-packagr-lite', '@nrwl/angular:package', '@nrwl/angular:webpack-browser', - '@angular-devkit/build-angular:browser', - '@angular-devkit/build-angular:dev-server', '@nrwl/esbuild:esbuild', '@nrwl/react-native:run-ios', '@nrwl/react-native:start', @@ -68,6 +88,8 @@ export function findExistingTargetsInProject( '@nrwl/next:build', '@nrwl/next:server', '@nrwl/js:tsc', + '@angular-devkit/build-angular:browser', + '@angular-devkit/build-angular:dev-server', ]; // First, we check if the user has provided a target @@ -107,10 +129,16 @@ export function findExistingTargetsInProject( const executorName = targets[target].executor; const hasViteTargets = output.alreadyHasNxViteTargets; - hasViteTargets.build ||= executorName === '@nrwl/vite:build'; - hasViteTargets.serve ||= executorName === '@nrwl/vite:dev-server'; - hasViteTargets.test ||= executorName === '@nrwl/vite:test'; - hasViteTargets.preview ||= executorName === '@nrwl/vite:preview-server'; + hasViteTargets.build ||= + executorName === '@nx/vite:build' || executorName === '@nrwl/vite:build'; + hasViteTargets.serve ||= + executorName === '@nx/vite:dev-server' || + executorName === '@nrwl/vite:dev-server'; + hasViteTargets.test ||= + executorName === '@nx/vite:test' || executorName === '@nrwl/vite:test'; + hasViteTargets.preview ||= + executorName === '@nx/vite:preview-server' || + executorName === '@nrwl/vite:preview-server'; const foundTargets = output.validFoundTargetName; if ( @@ -159,11 +187,11 @@ export function addOrChangeTestTarget( project.targets ??= {}; if (project.targets[target]) { - project.targets[target].executor = '@nrwl/vite:test'; + project.targets[target].executor = '@nx/vite:test'; delete project.targets[target].options?.jestConfig; } else { project.targets[target] = { - executor: '@nrwl/vite:test', + executor: '@nx/vite:test', outputs: [coveragePath], options: testOptions, }; @@ -196,10 +224,10 @@ export function addOrChangeBuildTarget( buildOptions.sourcemap = project.targets[target].options?.sourcemaps; } project.targets[target].options = { ...buildOptions }; - project.targets[target].executor = '@nrwl/vite:build'; + project.targets[target].executor = '@nx/vite:build'; } else { project.targets[target] = { - executor: '@nrwl/vite:build', + executor: '@nx/vite:build', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: buildOptions, @@ -237,11 +265,11 @@ export function addOrChangeServeTarget( if (serveTarget.executor === '@nxext/vite:dev') { serveOptions.proxyConfig = project.targets[target].options.proxyConfig; } - serveTarget.executor = '@nrwl/vite:dev-server'; + serveTarget.executor = '@nx/vite:dev-server'; serveTarget.options = serveOptions; } else { project.targets[target] = { - executor: '@nrwl/vite:dev-server', + executor: '@nx/vite:dev-server', defaultConfiguration: 'development', options: { buildTarget: `${options.project}:build`, @@ -295,7 +323,7 @@ export function addPreviewTarget( // Adds a preview target. project.targets.preview = { - executor: '@nrwl/vite:preview-server', + executor: '@nx/vite:preview-server', defaultConfiguration: 'development', options: previewOptions, configurations: { @@ -641,7 +669,9 @@ export function getViteConfigPathForProject( viteConfigPath = targets?.[target]?.options?.configFile; } else { const config = Object.values(targets).find( - (config) => config.executor === '@nrwl/vite:build' + (config) => + config.executor === '@nrwl/nx:build' || + config.executor === '@nrwl/vite:build' ); viteConfigPath = config?.options?.configFile; } @@ -689,7 +719,7 @@ async function handleUnsupportedUserProvidedTargetsErrors( executor: 'build' | 'dev-server' | 'test' ) { logger.warn( - `The custom ${target} target you provided (${userProvidedTargetName}) cannot be converted to use the @nrwl/vite:${executor} executor. + `The custom ${target} target you provided (${userProvidedTargetName}) cannot be converted to use the @nx/vite:${executor} executor. However, we found the following ${target} target in your project that can be converted: ${validFoundTargetName} Please note that converting a potentially non-compatible project to use Vite.js may result in unexpected behavior. Always commit @@ -699,13 +729,13 @@ async function handleUnsupportedUserProvidedTargetsErrors( const { Confirm } = require('enquirer'); const prompt = new Confirm({ name: 'question', - message: `Should we convert the ${validFoundTargetName} target to use the @nrwl/vite:${executor} executor?`, + message: `Should we convert the ${validFoundTargetName} target to use the @nx/vite:${executor} executor?`, initial: true, }); const shouldConvert = await prompt.run(); if (!shouldConvert) { throw new Error( - `The ${target} target ${userProvidedTargetName} cannot be converted to use the @nrwl/vite:${executor} executor. + `The ${target} target ${userProvidedTargetName} cannot be converted to use the @nx/vite:${executor} executor. Please try again, either by providing a different ${target} target or by not providing a target at all (Nx will convert the first one it finds, most probably this one: ${validFoundTargetName}) @@ -720,13 +750,13 @@ export async function handleUnknownExecutors(projectName: string) { logger.warn( ` We could not find any targets in project ${projectName} that use executors which - can be converted to the @nrwl/vite executors. + can be converted to the @nx/vite executors. This either means that your project may not have a target for building, serving, or testing at all, or that your targets are using executors that are not known to Nx. - If you still want to convert your project to use the @nrwl/vite executors, + If you still want to convert your project to use the @nx/vite executors, please make sure to commit your changes before running this generator. ` ); @@ -734,13 +764,13 @@ export async function handleUnknownExecutors(projectName: string) { const { Confirm } = require('enquirer'); const prompt = new Confirm({ name: 'question', - message: `Should Nx convert your project to use the @nrwl/vite executors?`, + message: `Should Nx convert your project to use the @nx/vite executors?`, initial: true, }); const shouldConvert = await prompt.run(); if (!shouldConvert) { throw new Error(` - Nx could not verify that the executors you are using can be converted to the @nrwl/vite executors. + Nx could not verify that the executors you are using can be converted to the @nx/vite executors. Please try again with a different project. `); } diff --git a/packages/vite/src/utils/test-files/angular-project.config.json b/packages/vite/src/utils/test-files/angular-project.config.json index 81793fa0a3f28..2557ec6d8bafd 100644 --- a/packages/vite/src/utils/test-files/angular-project.config.json +++ b/packages/vite/src/utils/test-files/angular-project.config.json @@ -67,7 +67,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -77,7 +77,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-angular-app/jest.config.ts", diff --git a/packages/vite/src/utils/test-files/react-lib-non-buildable-jest.json b/packages/vite/src/utils/test-files/react-lib-non-buildable-jest.json index 46711b9caa10a..e837dc1b11340 100644 --- a/packages/vite/src/utils/test-files/react-lib-non-buildable-jest.json +++ b/packages/vite/src/utils/test-files/react-lib-non-buildable-jest.json @@ -6,14 +6,14 @@ "projectType": "library", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-lib-nonb-jest/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "libs/react-lib-nonb-jest/jest.config.ts", diff --git a/packages/vite/src/utils/test-files/react-lib-non-buildable-vitest.json b/packages/vite/src/utils/test-files/react-lib-non-buildable-vitest.json index f120e1d2cc799..a14a8c9e8a8a8 100644 --- a/packages/vite/src/utils/test-files/react-lib-non-buildable-vitest.json +++ b/packages/vite/src/utils/test-files/react-lib-non-buildable-vitest.json @@ -6,14 +6,14 @@ "projectType": "library", "targets": { "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/react-lib-nonb-vitest/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/vite:test", + "executor": "@nx/vite:test", "outputs": ["{projectRoot}/coverage"], "options": { "passWithNoTests": true, diff --git a/packages/vite/src/utils/test-files/react-mixed-project.config.json b/packages/vite/src/utils/test-files/react-mixed-project.config.json index f05026c7bec8b..2362abfafd284 100644 --- a/packages/vite/src/utils/test-files/react-mixed-project.config.json +++ b/packages/vite/src/utils/test-files/react-mixed-project.config.json @@ -6,15 +6,15 @@ "projectType": "application", "targets": { "invalid-build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"] }, "valid-build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"] }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "my-test-mixed-react-app:build", @@ -31,7 +31,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ @@ -40,7 +40,7 @@ } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-mixed-react-app/jest.config.ts", diff --git a/packages/vite/src/utils/test-files/react-project.config.json b/packages/vite/src/utils/test-files/react-project.config.json index c638b08d35875..2f83097d661fc 100644 --- a/packages/vite/src/utils/test-files/react-project.config.json +++ b/packages/vite/src/utils/test-files/react-project.config.json @@ -6,7 +6,7 @@ "projectType": "application", "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -23,7 +23,7 @@ ], "styles": ["apps/my-test-react-app/src/styles.css"], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "@nx/react/plugins/webpack" }, "configurations": { "development": { @@ -49,7 +49,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "defaultConfiguration": "development", "options": { "buildTarget": "my-test-react-app:build", @@ -66,14 +66,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/my-test-react-app/**/*.{ts,tsx,js,jsx}"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-react-app/jest.config.ts", diff --git a/packages/vite/src/utils/test-files/web-project.config.json b/packages/vite/src/utils/test-files/web-project.config.json index 1ec37684667c2..239beb184e1fa 100644 --- a/packages/vite/src/utils/test-files/web-project.config.json +++ b/packages/vite/src/utils/test-files/web-project.config.json @@ -7,7 +7,7 @@ "tags": [], "targets": { "build": { - "executor": "@nrwl/webpack:webpack", + "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { @@ -43,7 +43,7 @@ } }, "serve": { - "executor": "@nrwl/webpack:dev-server", + "executor": "@nx/webpack:dev-server", "options": { "buildTarget": "my-test-web-app:build" }, @@ -54,14 +54,14 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/my-test-web-app/**/*.ts"] } }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "apps/my-test-web-app/jest.config.ts", diff --git a/packages/vite/src/utils/test-utils.ts b/packages/vite/src/utils/test-utils.ts index ce37dc314203b..a5de667765efc 100644 --- a/packages/vite/src/utils/test-utils.ts +++ b/packages/vite/src/utils/test-utils.ts @@ -50,8 +50,8 @@ export function mockViteReactAppGenerator(tree: Tree): Tree { "types": ["node"] }, "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" + "../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "src/**/*.spec.ts", @@ -184,8 +184,8 @@ export function mockReactAppGenerator(tree: Tree): Tree { "outDir": "../../dist/out-tsc" }, "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" + "../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "jest.config.ts", @@ -284,8 +284,8 @@ export function mockReactMixedAppGenerator(tree: Tree): Tree { "outDir": "../../dist/out-tsc" }, "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" + "../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "jest.config.ts", @@ -488,8 +488,8 @@ export function mockReactLibNonBuildableJestTestRunnerGenerator( "types": ["node"] }, "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" + "../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "jest.config.ts", @@ -592,8 +592,8 @@ export function mockReactLibNonBuildableVitestRunnerGenerator( "types": ["node"] }, "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" + "../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../node_modules/@nx/react/typings/image.d.ts" ], "exclude": [ "**/*.spec.ts", diff --git a/packages/web/src/generators/application/application.spec.ts b/packages/web/src/generators/application/application.spec.ts index 2cc187e634fab..1cee2544f955c 100644 --- a/packages/web/src/generators/application/application.spec.ts +++ b/packages/web/src/generators/application/application.spec.ts @@ -320,7 +320,7 @@ describe('app', () => { name: 'my-App', }); const targets = readProjectConfiguration(tree, 'my-app').targets; - expect(targets.build.executor).toEqual('@nrwl/webpack:webpack'); + expect(targets.build.executor).toEqual('@nx/webpack:webpack'); expect(targets.build.outputs).toEqual(['{options.outputPath}']); expect(targets.build.options).toEqual({ compiler: 'babel', @@ -355,7 +355,7 @@ describe('app', () => { name: 'my-App', }); const targets = readProjectConfiguration(tree, 'my-app').targets; - expect(targets.serve.executor).toEqual('@nrwl/webpack:dev-server'); + expect(targets.serve.executor).toEqual('@nx/webpack:dev-server'); expect(targets.serve.options).toEqual({ buildTarget: 'my-app:build', }); @@ -371,7 +371,7 @@ describe('app', () => { bundler: 'vite', }); const targets = readProjectConfiguration(tree, 'my-app').targets; - expect(targets.build.executor).toEqual('@nrwl/vite:build'); + expect(targets.build.executor).toEqual('@nx/vite:build'); expect(targets.build.outputs).toEqual(['{options.outputPath}']); expect(targets.build.options).toEqual({ outputPath: 'dist/apps/my-app', @@ -385,7 +385,7 @@ describe('app', () => { bundler: 'vite', }); const targets = readProjectConfiguration(tree, 'my-app').targets; - expect(targets.serve.executor).toEqual('@nrwl/vite:dev-server'); + expect(targets.serve.executor).toEqual('@nx/vite:dev-server'); expect(targets.serve.options).toEqual({ buildTarget: 'my-app:build', }); @@ -400,7 +400,7 @@ describe('app', () => { name: 'my-App', }); expect(readProjectConfiguration(tree, 'my-app').targets.lint).toEqual({ - executor: '@nrwl/linter:eslint', + executor: '@nx/linter:eslint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['apps/my-app/**/*.ts'], @@ -438,7 +438,7 @@ describe('app', () => { expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": [ "apps/my-app/**/*.ts", @@ -469,7 +469,7 @@ describe('app', () => { `); expect( readProjectConfiguration(tree, 'my-cool-app').targets.test.executor - ).toEqual('@nrwl/jest:jest'); + ).toEqual('@nx/jest:jest'); }); it('--bundler=vite --unitTestRunner=jest', async () => { @@ -495,7 +495,7 @@ describe('app', () => { `); expect( readProjectConfiguration(tree, 'my-vite-app').targets.test.executor - ).toEqual('@nrwl/jest:jest'); + ).toEqual('@nx/jest:jest'); }); it('--bundler=webpack --unitTestRunner=vitest', async () => { @@ -520,7 +520,7 @@ describe('app', () => { `); expect( readProjectConfiguration(tree, 'my-webpack-app').targets.test.executor - ).toEqual('@nrwl/vite:test'); + ).toEqual('@nx/vite:test'); }); }); @@ -595,8 +595,8 @@ describe('app', () => { it('should setup targets with vite configuration', () => { const projects = getProjects(viteAppTree); const targetConfig = projects.get('my-app').targets; - expect(targetConfig.build.executor).toEqual('@nrwl/vite:build'); - expect(targetConfig.serve.executor).toEqual('@nrwl/vite:dev-server'); + expect(targetConfig.build.executor).toEqual('@nx/vite:build'); + expect(targetConfig.serve.executor).toEqual('@nx/vite:dev-server'); expect(targetConfig.serve.options).toEqual({ buildTarget: 'my-app:build', }); diff --git a/packages/webpack/src/executors/webpack/schema.d.ts b/packages/webpack/src/executors/webpack/schema.d.ts index 554b1a50384bf..fb05f82ff2959 100644 --- a/packages/webpack/src/executors/webpack/schema.d.ts +++ b/packages/webpack/src/executors/webpack/schema.d.ts @@ -71,27 +71,27 @@ export interface WebpackExecutorOptions { babelConfig?: string; babelUpwardRootMode?: boolean; // TODO(jack): Also deprecate these in schema.json once we have migration from executor options to webpack.config.js file. - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ baseHref?: string; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ crossOrigin?: 'none' | 'anonymous' | 'use-credentials'; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ deployUrl?: string; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ extractCss?: boolean; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ generateIndexHtml?: boolean; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ index?: string; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ postcssConfig?: string; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ scripts?: Array; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ stylePreprocessorOptions?: any; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ styles?: Array; - /** @deprecated Moved to withWeb options from `@nrwl/webpack` */ + /** @deprecated Moved to withWeb options from `@nx/webpack` */ subresourceIntegrity?: boolean; } diff --git a/packages/webpack/src/generators/init/init.spec.ts b/packages/webpack/src/generators/init/init.spec.ts index 671ab0a84040d..beabab2c94695 100644 --- a/packages/webpack/src/generators/init/init.spec.ts +++ b/packages/webpack/src/generators/init/init.spec.ts @@ -35,7 +35,7 @@ describe('webpackInitGenerator', () => { name: expect.any(String), dependencies: {}, devDependencies: { - '@nrwl/webpack': expect.any(String), + '@nx/webpack': expect.any(String), '@swc/helpers': expect.any(String), '@swc/core': expect.any(String), 'swc-loader': expect.any(String), @@ -51,7 +51,7 @@ describe('webpackInitGenerator', () => { name: expect.any(String), dependencies: {}, devDependencies: { - '@nrwl/webpack': expect.any(String), + '@nx/webpack': expect.any(String), tslib: expect.any(String), }, }); diff --git a/packages/webpack/src/generators/init/init.ts b/packages/webpack/src/generators/init/init.ts index a5fce9f73bfda..787d6ad55b491 100644 --- a/packages/webpack/src/generators/init/init.ts +++ b/packages/webpack/src/generators/init/init.ts @@ -24,7 +24,7 @@ export async function webpackInitGenerator(tree: Tree, schema: Schema) { addBabelInputs(tree); } const devDependencies = { - '@nrwl/webpack': nxVersion, + '@nx/webpack': nxVersion, }; if (schema.compiler === 'swc') { diff --git a/packages/webpack/src/generators/webpack-project/webpack-project.spec.ts b/packages/webpack/src/generators/webpack-project/webpack-project.spec.ts index 92cc3e113a56e..21f1c82b09faf 100644 --- a/packages/webpack/src/generators/webpack-project/webpack-project.spec.ts +++ b/packages/webpack/src/generators/webpack-project/webpack-project.spec.ts @@ -28,7 +28,7 @@ describe('webpackProject', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/webpack:webpack', + executor: '@nx/webpack:webpack', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -48,7 +48,7 @@ describe('webpackProject', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/webpack:webpack', + executor: '@nx/webpack:webpack', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -68,7 +68,7 @@ describe('webpackProject', () => { expect(project.targets).toMatchObject({ build: { - executor: '@nrwl/webpack:webpack', + executor: '@nx/webpack:webpack', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: { @@ -88,7 +88,7 @@ describe('webpackProject', () => { expect(project.targets).toMatchObject({ serve: { - executor: '@nrwl/webpack:dev-server', + executor: '@nx/webpack:dev-server', options: { buildTarget: 'mypkg:build', }, diff --git a/packages/webpack/src/generators/webpack-project/webpack-project.ts b/packages/webpack/src/generators/webpack-project/webpack-project.ts index 517085f41ff2c..d01de302db53d 100644 --- a/packages/webpack/src/generators/webpack-project/webpack-project.ts +++ b/packages/webpack/src/generators/webpack-project/webpack-project.ts @@ -109,7 +109,7 @@ module.exports = composePlugins(withNx(), withWeb(), (config) => { targets: { ...project.targets, build: { - executor: '@nrwl/webpack:webpack', + executor: '@nx/webpack:webpack', outputs: ['{options.outputPath}'], defaultConfiguration: 'production', options: buildOptions, @@ -135,7 +135,7 @@ function addServeTarget(tree: Tree, options: WebpackProjectGeneratorSchema) { targets: { ...project.targets, serve: { - executor: '@nrwl/webpack:dev-server', + executor: '@nx/webpack:dev-server', options: { buildTarget: `${options.project}:build`, },