Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch packages to use the @nx scope #16069

Merged
merged 31 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ec468b9
chore(core): write migration to change scope to @nx
FrozenPandaz Mar 20, 2023
042a4b6
chore(core): run migrate
FrozenPandaz Apr 14, 2023
7212881
chore(repo): remove rescope migration
FrozenPandaz Apr 13, 2023
3582fb4
fix(core): manual fixes
FrozenPandaz Mar 28, 2023
7cd4aad
fix(core): rename native packages
FrozenPandaz Mar 28, 2023
67970f4
chore(angular): use @nrwl:package to build
FrozenPandaz Mar 28, 2023
f628ea6
fix(angular): export generators,executors,migrations.json
FrozenPandaz Mar 31, 2023
c95c112
chore(repo): fix dependencies
FrozenPandaz Apr 4, 2023
1066c5f
fix(repo): fix link checker
FrozenPandaz Apr 3, 2023
a4ff58f
fix(repo): fix jest resolver
FrozenPandaz Apr 3, 2023
75d5ed4
feat(core): add @nx packages to package group
FrozenPandaz Apr 12, 2023
3fe7f4c
chore(repo): fix documentation
FrozenPandaz Apr 4, 2023
f14da2d
fix(repo): graph client build
FrozenPandaz Apr 4, 2023
79a1ed3
fix(repo): fix tests
FrozenPandaz Apr 4, 2023
fa909be
chore(nx-dev): fix build
FrozenPandaz Apr 4, 2023
d290366
fix(nx-dev): fix tailwind config
FrozenPandaz Apr 5, 2023
af047a4
feat(core): update the list of core plugins
FrozenPandaz Apr 12, 2023
5d2bea6
chore(core): fix nx unit tests
FrozenPandaz Apr 5, 2023
b51ae51
fix(repo): fix migration specs
FrozenPandaz Apr 5, 2023
fb2d744
fix(node): fix tests
FrozenPandaz Apr 5, 2023
9c561cb
fix(react): fix unit tests
FrozenPandaz Apr 6, 2023
a4d3675
fix(angular): fix unit tests
FrozenPandaz Apr 6, 2023
0dd1dce
fix(bundlers): fix webpack tests
FrozenPandaz Apr 6, 2023
00b1a66
fix(react): fix nextjs tests
FrozenPandaz Apr 6, 2023
c78f53b
fix(testing): fix jest tests
FrozenPandaz Apr 6, 2023
0251d5d
fix(devkit): fix nx plugins tests
FrozenPandaz Apr 6, 2023
03d0883
fix(storybook): fix unit tests
FrozenPandaz Apr 6, 2023
a024843
feat(core): add re-exports for other public apis
FrozenPandaz Apr 6, 2023
3e63320
chore(repo): fix e2e tests
FrozenPandaz Apr 12, 2023
9f9993b
fix(angular): handle builders that refer to other package
FrozenPandaz Apr 13, 2023
493e366
fix(linter): fix linter migration
FrozenPandaz Apr 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ CHANGELOG.md
# Next.js
.next

# Angular Cache
.angular

# Local dev files
.env

Expand Down
2 changes: 1 addition & 1 deletion e2e/angular-core/src/module-federation.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { names } from '@nrwl/devkit';
import { names } from '@nx/devkit';
import {
cleanupProject,
killProcessAndPorts,
Expand Down
2 changes: 1 addition & 1 deletion e2e/angular-core/src/projects.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { names } from '@nrwl/devkit';
import { names } from '@nx/devkit';
import {
checkFilesExist,
cleanupProject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
removeFile,
checkFilesExist,
} from '../../utils';
import { names } from '@nrwl/devkit';
import { names } from '@nx/devkit';
import { join } from 'path';

describe('Angular Cypress Component Tests', () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/angular-extensions/src/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
uniq,
updateFile,
} from '@nrwl/e2e/utils';
import { classify } from '@nrwl/devkit/src/utils/string-utils';
import { classify } from '@nx/devkit/src/utils/string-utils';

describe('Move Angular Project', () => {
let proj: string;
Expand Down
2 changes: 1 addition & 1 deletion e2e/angular-extensions/src/tailwind.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Tailwind support', () => {
tailwindConfigFile = 'tailwind.config.js',
libSpacing: typeof spacing['projectVariant1']
) => {
const tailwindConfig = `const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
const tailwindConfig = `const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
const { join } = require('path');

module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions e2e/next/src/next.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { detectPackageManager, joinPathFragments } from '@nrwl/devkit';
import { capitalize } from '@nrwl/devkit/src/utils/string-utils';
import { detectPackageManager, joinPathFragments } from '@nx/devkit';
import { capitalize } from '@nx/devkit/src/utils/string-utils';
import {
checkFilesExist,
cleanupProject,
Expand Down Expand Up @@ -292,7 +292,7 @@ describe('Next.js Applications', () => {
updateFile(
`apps/${appName}/next.config.js`,
`
const { withNx } = require('@nrwl/next/plugins/with-nx');
const { withNx } = require('@nx/next/plugins/with-nx');
const nextConfig = {
nx: {
svgr: false,
Expand Down Expand Up @@ -327,7 +327,7 @@ describe('Next.js Applications', () => {
updateFile(
`apps/${appName}/next.config.js`,
`
const { withNx } = require('@nrwl/next/plugins/with-nx');
const { withNx } = require('@nx/next/plugins/with-nx');
// Not including "nx" entry should still work.
const nextConfig = {};

Expand Down
2 changes: 1 addition & 1 deletion e2e/node/src/node.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { stripIndents } from '@angular-devkit/core/src/utils/literals';
import { joinPathFragments } from '@nrwl/devkit';
import { joinPathFragments } from '@nx/devkit';
import {
checkFilesDoNotExist,
checkFilesExist,
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-misc/src/extras.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Extra Nx Misc Tests', () => {
`
module.exports = {
processProjectGraph: (graph) => {
const Builder = require('@nrwl/devkit').ProjectGraphBuilder;
const Builder = require('@nx/devkit').ProjectGraphBuilder;
const builder = new Builder(graph);
builder.addNode({
name: 'plugin-node',
Expand Down
14 changes: 7 additions & 7 deletions e2e/nx-misc/src/misc.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NxJsonConfiguration } from '@nrwl/devkit';
import type { NxJsonConfiguration } from '@nx/devkit';
import {
cleanupProject,
e2eCwd,
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Nx Commands', () => {
expect(listOutput).toContain('NX Installed plugins');

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

// temporarily make it look like this isn't installed
renameSync(
Expand All @@ -79,9 +79,9 @@ describe('Nx Commands', () => {
expect(listOutput).toContain('NX Also available');

// look for specific plugin
listOutput = runCLI('list @nrwl/workspace');
listOutput = runCLI('list @nx/workspace');

expect(listOutput).toContain('Capabilities in @nrwl/workspace');
expect(listOutput).toContain('Capabilities in @nx/workspace');

// check for schematics
expect(listOutput).toContain('workspace');
Expand All @@ -92,10 +92,10 @@ describe('Nx Commands', () => {
expect(listOutput).toContain('run-commands');

// // look for uninstalled core plugin
listOutput = runCLI('list @nrwl/angular');
listOutput = runCLI('list @nx/angular');

expect(listOutput).toContain(
'NX @nrwl/angular is not currently installed'
'NX @nx/angular is not currently installed'
);

// look for an unknown plugin
Expand All @@ -105,7 +105,7 @@ describe('Nx Commands', () => {
'NX @wibble/fish is not currently installed'
);

// put back the @nrwl/angular module (or all the other e2e tests after this will fail)
// put back the @nx/angular module (or all the other e2e tests after this will fail)
renameSync(
tmpProjPath('node_modules/@nrwl/angular_tmp'),
tmpProjPath('node_modules/@nrwl/angular')
Expand Down
44 changes: 6 additions & 38 deletions e2e/nx-misc/src/nxw.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NxJsonConfiguration } from '@nrwl/devkit';
import type { NxJsonConfiguration } from '@nx/devkit';
import {
newWrappedNxWorkspace,
updateFile,
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('nx wrapper / .nx installation', () => {
updateJson<NxJsonConfiguration>('nx.json', (json) => {
json.tasksRunnerOptions.default.options.cacheableOperations = ['echo'];
json.installation.plugins = {
'@nrwl/nest': getPublishedVersion(),
'@nrwl/js': getPublishedVersion(),
};
return json;
});
Expand All @@ -66,9 +66,7 @@ describe('nx wrapper / .nx installation', () => {
it('should work with nx report', () => {
const output = runNxWrapper('report');
expect(output).toMatch(new RegExp(`nx.*:.*${getPublishedVersion()}`));
expect(output).toMatch(
new RegExp(`@nrwl/nest.*:.*${getPublishedVersion()}`)
);
expect(output).toMatch(new RegExp(`@nrwl/js.*:.*${getPublishedVersion()}`));
expect(output).not.toContain('@nrwl/express');
});

Expand All @@ -87,12 +85,10 @@ describe('nx wrapper / .nx installation', () => {
);

expect(installedPluginLines.some((x) => x.includes(`${bold('nx')}`)));
expect(
installedPluginLines.some((x) => x.includes(`${bold('@nrwl/nest')}`))
);
expect(installedPluginLines.some((x) => x.includes(`${bold('@nrwl/js')}`)));

output = runNxWrapper('list @nrwl/nest');
expect(output).toContain('Capabilities in @nrwl/nest');
output = runNxWrapper('list @nrwl/js');
expect(output).toContain('Capabilities in @nrwl/js');
});

it('should work with basic generators', () => {
Expand All @@ -118,13 +114,6 @@ describe('nx wrapper / .nx installation', () => {
updateFile(
`.nx/installation/node_modules/migrate-parent-package/migrations.json`,
JSON.stringify({
schematics: {
run11: {
version: '1.1.0',
description: '1.1.0',
factory: './run11',
},
},
generators: {
run20: {
version: '2.0.0',
Expand All @@ -135,18 +124,6 @@ describe('nx wrapper / .nx installation', () => {
})
);

updateFile(
`.nx/installation/node_modules/migrate-parent-package/run11.js`,
`
var angular_devkit_core1 = require("@angular-devkit/core");
exports.default = function default_1() {
return function(host) {
host.create('file-11', 'content11')
}
}
`
);

updateFile(
`.nx/installation/node_modules/migrate-parent-package/run20.js`,
`
Expand Down Expand Up @@ -182,9 +159,6 @@ describe('nx wrapper / .nx installation', () => {
return Promise.resolve({
version: '2.0.0',
generators: {
'run11': {
version: '1.1.0'
},
'run20': {
version: '2.0.0',
cli: 'nx'
Expand Down Expand Up @@ -236,11 +210,6 @@ describe('nx wrapper / .nx installation', () => {
const migrationsJson = readJson(`migrations.json`);
expect(migrationsJson).toEqual({
migrations: [
{
package: 'migrate-parent-package',
version: '1.1.0',
name: 'run11',
},
{
package: 'migrate-parent-package',
version: '2.0.0',
Expand All @@ -259,7 +228,6 @@ describe('nx wrapper / .nx installation', () => {
NX_WRAPPER_SKIP_INSTALL: 'true',
},
});
expect(readFile('file-11')).toEqual('content11');
expect(readFile('file-20')).toEqual('content20');
});
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-plugin/src/nx-plugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProjectConfiguration } from '@nrwl/devkit';
import { ProjectConfiguration } from '@nx/devkit';
import {
checkFilesExist,
expectTestsPass,
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-run/src/affected-graph.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NxJsonConfiguration } from '@nrwl/devkit';
import type { NxJsonConfiguration } from '@nx/devkit';
import {
getPackageManagerCommand,
isNotWindows,
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-core/src/react-module-federation.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stripIndents } from '@nrwl/devkit';
import { stripIndents } from '@nx/devkit';
import {
checkFilesExist,
cleanupProject,
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-core/src/react-package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
updateJson,
updateProjectConfig,
} from '@nrwl/e2e/utils';
import { names } from '@nrwl/devkit';
import { names } from '@nx/devkit';

describe('Build React libraries and apps', () => {
/**
Expand Down
4 changes: 2 additions & 2 deletions e2e/react-extensions/src/cypress-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ ${content}`;
createFile(
`apps/${appName}/webpack.config.js`,
`
const { composePlugins, withNx } = require('@nrwl/webpack');
const { withReact } = require('@nrwl/react');
const { composePlugins, withNx } = require('@nx/webpack');
const { withReact } = require('@nx/react');

module.exports = composePlugins(
withNx(),
Expand Down
4 changes: 2 additions & 2 deletions e2e/utils/command-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { output, PackageManager } from '@nrwl/devkit';
import { output, PackageManager } from '@nx/devkit';
import { packageInstall, tmpProjPath } from './create-project-utils';
import {
detectPackageManager,
Expand All @@ -8,7 +8,7 @@ import {
getStrippedEnvironmentVariables,
isVerboseE2ERun,
} from './get-env-info';
import { TargetConfiguration } from '@nrwl/devkit';
import { TargetConfiguration } from '@nx/devkit';
import { ChildProcess, exec, execSync, ExecSyncOptions } from 'child_process';
import { join } from 'path';
import * as isCI from 'is-ci';
Expand Down
4 changes: 2 additions & 2 deletions e2e/utils/create-project-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from './get-env-info';
import * as isCI from 'is-ci';

import { angularCliVersion as defaultAngularCliVersion } from '@nrwl/workspace/src/utils/versions';
import { angularCliVersion as defaultAngularCliVersion } from '@nx/workspace/src/utils/versions';
import { dump } from '@zkochan/js-yaml';
import { execSync, ExecSyncOptions } from 'child_process';

Expand All @@ -28,7 +28,7 @@ import {
RunCmdOpts,
runCommand,
} from './command-utils';
import { output } from '@nrwl/devkit';
import { output } from '@nx/devkit';
import { readFileSync } from 'fs';
import { join } from 'path';

Expand Down
2 changes: 1 addition & 1 deletion e2e/utils/file-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseJson } from '@nrwl/devkit';
import { parseJson } from '@nx/devkit';
import {
createFileSync,
ensureDirSync,
Expand Down
2 changes: 1 addition & 1 deletion e2e/utils/get-env-info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readJsonFile, workspaceRoot } from '@nrwl/devkit';
import { readJsonFile, workspaceRoot } from '@nx/devkit';
import { execSync } from 'child_process';
import { existsSync } from 'fs-extra';
import { join } from 'path';
Expand Down
2 changes: 1 addition & 1 deletion e2e/utils/project-config-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProjectConfiguration, Workspaces } from '@nrwl/devkit';
import { ProjectConfiguration, Workspaces } from '@nx/devkit';
import { join } from 'path';
import { tmpProjPath } from './create-project-utils';
import { readJson, updateFile } from './file-utils';
Expand Down
2 changes: 1 addition & 1 deletion e2e/utils/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { joinPathFragments } from '@nrwl/devkit';
import { joinPathFragments } from '@nx/devkit';
import {
getPackageManagerCommand,
runCLI,
Expand Down
6 changes: 3 additions & 3 deletions e2e/web/src/web.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('Web Components Applications', () => {
updateFile(
`apps/${appName}/webpack.config.js`,
`
const { composePlugins, withNx, withWeb } = require('@nrwl/webpack');
const { composePlugins, withNx, withWeb } = require('@nx/webpack');
module.exports = composePlugins(withNx(), withWeb(), (config, context) => {
return config;
});
Expand All @@ -185,7 +185,7 @@ describe('Web Components Applications', () => {
updateFile(
`apps/${appName}/webpack.config.js`,
`
const { composePlugins, withNx, withWeb } = require('@nrwl/webpack');
const { composePlugins, withNx, withWeb } = require('@nx/webpack');
module.exports = composePlugins(withNx(), withWeb(), async (config, context) => {
return config;
});
Expand All @@ -200,7 +200,7 @@ describe('Web Components Applications', () => {
updateFile(
`apps/${appName}/webpack.config.js`,
`
const { composePlugins, withNx, withWeb } = require('@nrwl/webpack');
const { composePlugins, withNx, withWeb } = require('@nx/webpack');
module.exports = composePlugins(withNx(), withWeb(), Promise.resolve((config, context) => {
return config;
}));
Expand Down
2 changes: 1 addition & 1 deletion e2e/webpack/src/webpack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Webpack Plugin', () => {
updateFile(
`libs/${myPkg}/webpack.config.js`,
`
const { composePlugins, withNx } = require('@nrwl/webpack');
const { composePlugins, withNx } = require('@nx/webpack');

module.exports = composePlugins(withNx(), (config) => {
console.log('scriptType is ' + config.output.scriptType);
Expand Down
2 changes: 1 addition & 1 deletion graph/client-e2e/cypress-release-static.config.ts
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';
import setupNodeEvents from './src/plugins/index';

const cypressJsonConfig = {
Expand Down
2 changes: 1 addition & 1 deletion graph/client-e2e/cypress-release.config.ts
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';
import setupNodeEvents from './src/plugins/index';

const cypressJsonConfig = {
Expand Down
2 changes: 1 addition & 1 deletion graph/client-e2e/cypress-watch-mode.config.ts
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';
import setupNodeEvents from './src/plugins/index';

const cypressJsonConfig = {
Expand Down
Loading