Skip to content

Commit b215511

Browse files
thdkFrozenPandaz
authored andcommitted
fix(remix): don't add @remix-run/eslint-config dependency to new remix apps (#26568)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> When a new remix app is generated with @nx/remix, it can't be installed due to peer dependencies that are introduced by @remix-run/eslint-config. This dependency though is not used in the nx workspace and has also been removed from the official create-remix method. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Running `npm install` should not throw errors after a remix application was added to the nx workspace. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #26540 (cherry picked from commit 1e41672)
1 parent 3a5f412 commit b215511

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

e2e/remix/src/nx-remix.test.ts

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,34 @@ import {
88
uniq,
99
updateFile,
1010
runCommandAsync,
11-
listFiles,
1211
} from '@nx/e2e/utils';
1312

1413
describe('Remix E2E Tests', () => {
15-
describe('--integrated', () => {
16-
let proj: string;
14+
describe('--integrated (npm)', () => {
15+
beforeAll(() => {
16+
newProject({
17+
packages: ['@nx/remix', '@nx/react'],
18+
packageManager: 'npm',
19+
});
20+
});
1721

22+
afterAll(() => {
23+
killPorts();
24+
cleanupProject();
25+
});
26+
27+
it('should not cause peer dependency conflicts', async () => {
28+
const plugin = uniq('remix');
29+
runCLI(
30+
`generate @nx/remix:app ${plugin} --projectNameAndRootFormat=as-provided`
31+
);
32+
33+
await runCommandAsync('npm install');
34+
}, 120000);
35+
});
36+
describe('--integrated (yarn)', () => {
1837
beforeAll(() => {
19-
proj = newProject({ packages: ['@nx/remix', '@nx/react'] });
38+
newProject({ packages: ['@nx/remix', '@nx/react'] });
2039
});
2140

2241
afterAll(() => {

packages/remix/src/generators/application/files/integrated/package.json__tmpl__

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"devDependencies": {
1717
"@remix-run/dev": "<%= remixVersion %>",
18-
"@remix-run/eslint-config": "<%= remixVersion %>",
1918
"@types/react": "<%= typesReactVersion %>",
2019
"@types/react-dom": "<%= typesReactDomVersion %>",
2120
"eslint": "<%= eslintVersion %>",

packages/remix/src/generators/utils/update-dependencies.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export function updateDependencies(tree: Tree) {
2121
'react-dom': reactDomVersion,
2222
},
2323
{
24-
'@remix-run/eslint-config': remixVersion,
2524
'@types/react': typesReactVersion,
2625
'@types/react-dom': typesReactDomVersion,
2726
eslint: eslintVersion,

0 commit comments

Comments
 (0)