Skip to content

Commit

Permalink
cleanup(misc): remove CRACO tests since it's unmaintained, and remove…
Browse files Browse the repository at this point in the history
… type hacks for release command object
  • Loading branch information
jaysoo committed Aug 28, 2024
1 parent 950681d commit 4644e50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
29 changes: 0 additions & 29 deletions e2e/nx-init/src/nx-init-react.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,6 @@ describe('nx init (for React - legacy)', () => {
process.env.SELECTED_PM = originalPM;
});

it('should convert to a standalone workspace with craco (webpack)', () => {
const appName = 'my-app';
createReactApp(appName);

const craToNxOutput = runCommand(
`${
pmc.runUninstalledPackage
} nx@${getPublishedVersion()} init --no-interactive --vite=false`,
{
env: {
...process.env,
// TODO(eslint): craco does not support ESLint v9 https://github.com/dilanx/craco/issues/543
ESLINT_USE_FLAT_CONFIG: 'false',
},
}
);

expect(craToNxOutput).toContain('🎉 Done!');

runCLI(`build ${appName}`, {
env: {
// since craco 7.1.0 the NODE_ENV is used, since the tests set it
// to "test" is causes an issue with React Refresh Babel
NODE_ENV: undefined,
},
});
checkFilesExist(`dist/${appName}/index.html`);
});

it('should convert to an standalone workspace with Vite', () => {
const appName = 'my-app';
createReactApp(appName);
Expand Down
6 changes: 2 additions & 4 deletions packages/nx/src/command-line/release/command-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ export const yargsReleaseCommand: CommandModule<
);
}
const nxJson = readNxJson();
// TODO(eslint): address this type error and figure out why e2e and local do not agree
const groups = argv.groups as any;
if (groups?.length) {
for (const group of groups) {
if (argv.groups?.length) {
for (const group of argv.groups) {
if (!nxJson.release?.groups?.[group]) {
throw new Error(
`The specified release group "${group}" was not found in nx.json`
Expand Down

0 comments on commit 4644e50

Please sign in to comment.