Skip to content

Commit

Permalink
feat(repo): replace usages of @nrwl/ with @nx/ in tooling packages
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Apr 17, 2023
1 parent abf534c commit f388f10
Show file tree
Hide file tree
Showing 162 changed files with 1,282 additions and 1,175 deletions.
2 changes: 1 addition & 1 deletion packages/cypress/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"files": ["**/*.ts"],
"excludedFiles": ["./src/migrations/**"],
"rules": {
"no-restricted-imports": ["error", "@nrwl/workspace"]
"no-restricted-imports": ["error", "@nx/workspace"]
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Cypress builder', () => {
projects: {
'my-app': {
targets: {
serve: { executor: '@nrwl/webpack:webpack', options: {} },
serve: { executor: '@nx/webpack:webpack', options: {} },
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cypress/src/executors/cypress/cypress.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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}",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -238,7 +238,7 @@ exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = `
},
],
"plugins": [
"@nrwl/nx",
"@nx/nx",
],
"root": true,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -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",
Expand Down Expand Up @@ -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, {
Expand Down Expand Up @@ -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: {},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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}",
Expand Down Expand Up @@ -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",
Expand All @@ -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}",
Expand All @@ -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",
Expand All @@ -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}",
Expand All @@ -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",
Expand All @@ -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}",
Expand All @@ -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",
Expand All @@ -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}",
Expand All @@ -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, {
Expand All @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
}
<% } %>)
});
});
Loading

0 comments on commit f388f10

Please sign in to comment.