@nx/remix 0.0.0-pr-3-5e7ccde → 0.0.0-pr-29464-c4b160c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +22 -13
- package/src/generators/application/application.impl.js +1 -1
- package/src/generators/application/files/common/tests/routes/_index.spec.tsx__tmpl__ +3 -2
- package/src/generators/application/lib/ignore-vite-temp-files.d.ts +3 -0
- package/src/generators/application/lib/ignore-vite-temp-files.js +60 -0
- package/src/generators/application/lib/index.d.ts +1 -1
- package/src/generators/application/lib/index.js +1 -1
- package/src/generators/application/lib/update-unit-test-config.js +1 -0
- package/src/generators/library/__snapshots__/library.impl.spec.ts.snap +6 -3
- package/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap +3 -3
- package/src/plugins/__snapshots__/plugin.spec.ts.snap +0 -20
- package/src/plugins/plugin.js +0 -2
- package/src/utils/versions.d.ts +2 -1
- package/src/utils/versions.js +3 -2
- package/src/executors/build/schema.d.ts +0 -8
- package/src/executors/build/schema.json +0 -46
- package/src/generators/application/lib/add-vite-temp-files-to-gitignore.d.ts +0 -2
- package/src/generators/application/lib/add-vite-temp-files-to-gitignore.js +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-29464-c4b160c",
|
|
4
4
|
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"migrations": "./migrations.json"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nx/devkit": "0.0.0-pr-
|
|
33
|
-
"@nx/js": "0.0.0-pr-
|
|
34
|
-
"@nx/react": "0.0.0-pr-
|
|
32
|
+
"@nx/devkit": "0.0.0-pr-29464-c4b160c",
|
|
33
|
+
"@nx/js": "0.0.0-pr-29464-c4b160c",
|
|
34
|
+
"@nx/react": "0.0.0-pr-29464-c4b160c",
|
|
35
35
|
"tslib": "^2.3.1",
|
|
36
36
|
"@phenomnomnominal/tsquery": "~5.0.1"
|
|
37
37
|
},
|
|
@@ -252,7 +252,7 @@ import react from '@vitejs/plugin-react';
|
|
|
252
252
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
253
253
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
254
254
|
|
|
255
|
-
export default defineConfig({
|
|
255
|
+
export default defineConfig(() => ({
|
|
256
256
|
root: __dirname,
|
|
257
257
|
cacheDir: '../node_modules/.vite/test',
|
|
258
258
|
plugins: [react(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
@@ -269,10 +269,10 @@ export default defineConfig({
|
|
|
269
269
|
reporters: ['default'],
|
|
270
270
|
coverage: {
|
|
271
271
|
reportsDirectory: '../coverage/test',
|
|
272
|
-
provider: 'v8',
|
|
272
|
+
provider: 'v8' as const,
|
|
273
273
|
},
|
|
274
274
|
},
|
|
275
|
-
});
|
|
275
|
+
}));
|
|
276
276
|
"
|
|
277
277
|
`;
|
|
278
278
|
|
|
@@ -429,7 +429,8 @@ installGlobals();
|
|
|
429
429
|
|
|
430
430
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 3`] = `
|
|
431
431
|
"import { createRemixStub } from '@remix-run/testing';
|
|
432
|
-
import { render
|
|
432
|
+
import { render } from '@testing-library/react';
|
|
433
|
+
import { screen } from '@testing-library/dom';
|
|
433
434
|
import Index from '../../app/routes/_index';
|
|
434
435
|
|
|
435
436
|
test('renders loader data', async () => {
|
|
@@ -442,7 +443,7 @@ test('renders loader data', async () => {
|
|
|
442
443
|
|
|
443
444
|
render(<RemixStub />);
|
|
444
445
|
|
|
445
|
-
await
|
|
446
|
+
await screen.findByText('Hello there,');
|
|
446
447
|
});
|
|
447
448
|
"
|
|
448
449
|
`;
|
|
@@ -454,7 +455,7 @@ import react from '@vitejs/plugin-react';
|
|
|
454
455
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
455
456
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
456
457
|
|
|
457
|
-
export default defineConfig({
|
|
458
|
+
export default defineConfig(() => ({
|
|
458
459
|
root: __dirname,
|
|
459
460
|
cacheDir: './node_modules/.vite/test',
|
|
460
461
|
plugins: [react(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
@@ -471,16 +472,17 @@ export default defineConfig({
|
|
|
471
472
|
reporters: ['default'],
|
|
472
473
|
coverage: {
|
|
473
474
|
reportsDirectory: './coverage/test',
|
|
474
|
-
provider: 'v8',
|
|
475
|
+
provider: 'v8' as const,
|
|
475
476
|
},
|
|
476
477
|
},
|
|
477
|
-
});
|
|
478
|
+
}));
|
|
478
479
|
"
|
|
479
480
|
`;
|
|
480
481
|
|
|
481
482
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
482
483
|
"import { createRemixStub } from '@remix-run/testing';
|
|
483
|
-
import { render
|
|
484
|
+
import { render } from '@testing-library/react';
|
|
485
|
+
import { screen } from '@testing-library/dom';
|
|
484
486
|
import Index from '../../app/routes/_index';
|
|
485
487
|
|
|
486
488
|
test('renders loader data', async () => {
|
|
@@ -493,7 +495,7 @@ test('renders loader data', async () => {
|
|
|
493
495
|
|
|
494
496
|
render(<RemixStub />);
|
|
495
497
|
|
|
496
|
-
await
|
|
498
|
+
await screen.findByText('Hello there,');
|
|
497
499
|
});
|
|
498
500
|
"
|
|
499
501
|
`;
|
|
@@ -606,7 +608,8 @@ export default function Index() {
|
|
|
606
608
|
|
|
607
609
|
exports[`Remix Application Standalone Project Repo should create the application correctly 3`] = `
|
|
608
610
|
"import { createRemixStub } from '@remix-run/testing';
|
|
609
|
-
import { render
|
|
611
|
+
import { render } from '@testing-library/react';
|
|
612
|
+
import { screen } from '@testing-library/dom';
|
|
610
613
|
import Index from '../../app/routes/_index';
|
|
611
614
|
|
|
612
615
|
test('renders loader data', async () => {
|
|
@@ -619,7 +622,7 @@ test('renders loader data', async () => {
|
|
|
619
622
|
|
|
620
623
|
render(<RemixStub />);
|
|
621
624
|
|
|
622
|
-
await
|
|
625
|
+
await screen.findByText('Hello there,');
|
|
623
626
|
});
|
|
624
627
|
"
|
|
625
628
|
`;
|
|
@@ -656,7 +659,13 @@ export default defineConfig({
|
|
|
656
659
|
exports[`Remix Application Standalone Project Repo should create the application correctly 5`] = `
|
|
657
660
|
"{
|
|
658
661
|
"root": true,
|
|
659
|
-
"ignorePatterns": [
|
|
662
|
+
"ignorePatterns": [
|
|
663
|
+
"!**/*",
|
|
664
|
+
"build",
|
|
665
|
+
"public/build",
|
|
666
|
+
"**/vite.config.*.timestamp*",
|
|
667
|
+
"**/vitest.config.*.timestamp*"
|
|
668
|
+
],
|
|
660
669
|
"plugins": ["@nx"],
|
|
661
670
|
"overrides": [
|
|
662
671
|
{
|
|
@@ -193,7 +193,7 @@ export default {...nxPreset};
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
tasks.push(await (0, lib_1.addE2E)(tree, options));
|
|
196
|
-
(0, lib_1.
|
|
196
|
+
await (0, lib_1.ignoreViteTempFiles)(tree, options.projectRoot);
|
|
197
197
|
(0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.projectRoot, 'tsconfig.app.json', {
|
|
198
198
|
jsx: 'react-jsx',
|
|
199
199
|
module: 'esnext',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRemixStub } from '@remix-run/testing';
|
|
2
|
-
import { render
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { screen } from '@testing-library/dom';
|
|
3
4
|
import Index from '../../app/routes/_index';
|
|
4
5
|
|
|
5
6
|
test('renders loader data', async () => {
|
|
@@ -12,5 +13,5 @@ test('renders loader data', async () => {
|
|
|
12
13
|
|
|
13
14
|
render(<RemixStub />);
|
|
14
15
|
|
|
15
|
-
await
|
|
16
|
+
await screen.findByText('Hello there,');
|
|
16
17
|
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ignoreViteTempFiles = ignoreViteTempFiles;
|
|
4
|
+
exports.isEslintInstalled = isEslintInstalled;
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const versions_1 = require("../../../utils/versions");
|
|
7
|
+
async function ignoreViteTempFiles(tree, projectRoot) {
|
|
8
|
+
addViteTempFilesToGitIgnore(tree);
|
|
9
|
+
await ignoreViteTempFilesInEslintConfig(tree, projectRoot);
|
|
10
|
+
}
|
|
11
|
+
function addViteTempFilesToGitIgnore(tree) {
|
|
12
|
+
let gitIgnoreContents = tree.exists('.gitignore')
|
|
13
|
+
? tree.read('.gitignore', 'utf-8')
|
|
14
|
+
: '';
|
|
15
|
+
if (!/^vite\.config\.\*\.timestamp\*$/m.test(gitIgnoreContents)) {
|
|
16
|
+
gitIgnoreContents = (0, devkit_1.stripIndents) `${gitIgnoreContents}
|
|
17
|
+
vite.config.*.timestamp*`;
|
|
18
|
+
}
|
|
19
|
+
if (!/^vitest\.config\.\*\.timestamp\*$/m.test(gitIgnoreContents)) {
|
|
20
|
+
gitIgnoreContents = (0, devkit_1.stripIndents) `${gitIgnoreContents}
|
|
21
|
+
vitest.config.*.timestamp*`;
|
|
22
|
+
}
|
|
23
|
+
tree.write('.gitignore', gitIgnoreContents);
|
|
24
|
+
}
|
|
25
|
+
async function ignoreViteTempFilesInEslintConfig(tree, projectRoot) {
|
|
26
|
+
if (!isEslintInstalled(tree)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
(0, devkit_1.ensurePackage)('@nx/eslint', (0, versions_1.getPackageVersion)(tree, 'nx'));
|
|
30
|
+
const { addIgnoresToLintConfig, isEslintConfigSupported } = await Promise.resolve().then(() => require('@nx/eslint/src/generators/utils/eslint-file'));
|
|
31
|
+
if (!isEslintConfigSupported(tree)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const { useFlatConfig } = await Promise.resolve().then(() => require('@nx/eslint/src/utils/flat-config'));
|
|
35
|
+
const isUsingFlatConfig = useFlatConfig(tree);
|
|
36
|
+
if (!projectRoot && !isUsingFlatConfig) {
|
|
37
|
+
// root eslintrc files ignore all files and the root eslintrc files add
|
|
38
|
+
// back all the project files, so we only add the ignores to the project
|
|
39
|
+
// eslintrc files
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// for flat config, we update the root config file
|
|
43
|
+
const directory = isUsingFlatConfig ? '' : projectRoot ?? '';
|
|
44
|
+
addIgnoresToLintConfig(tree, directory, [
|
|
45
|
+
'**/vite.config.*.timestamp*',
|
|
46
|
+
'**/vitest.config.*.timestamp*',
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
function isEslintInstalled(tree) {
|
|
50
|
+
try {
|
|
51
|
+
require('eslint');
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
catch { }
|
|
55
|
+
// it might not be installed yet, but it might be in the tree pending install
|
|
56
|
+
const { devDependencies, dependencies } = tree.exists('package.json')
|
|
57
|
+
? (0, devkit_1.readJson)(tree, 'package.json')
|
|
58
|
+
: {};
|
|
59
|
+
return !!devDependencies?.['eslint'] || !!dependencies?.['eslint'];
|
|
60
|
+
}
|
|
@@ -4,4 +4,4 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./update-unit-test-config"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./add-e2e"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./ignore-vite-temp-files"), exports);
|
|
@@ -46,6 +46,7 @@ function updateUnitTestConfig(tree, pathToRoot, unitTestRunner, rootProject) {
|
|
|
46
46
|
});
|
|
47
47
|
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
48
48
|
'@testing-library/jest-dom': versions_1.testingLibraryJestDomVersion,
|
|
49
|
+
'@testing-library/dom': versions_1.testingLibraryDomVersion,
|
|
49
50
|
'@testing-library/react': versions_1.testingLibraryReactVersion,
|
|
50
51
|
'@testing-library/user-event': versions_1.testingLibraryUserEventsVersion,
|
|
51
52
|
'@remix-run/node': (0, versions_1.getRemixVersion)(tree),
|
|
@@ -28,7 +28,7 @@ import react from '@vitejs/plugin-react';
|
|
|
28
28
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
29
29
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
30
30
|
|
|
31
|
-
export default defineConfig({
|
|
31
|
+
export default defineConfig(() => ({
|
|
32
32
|
root: __dirname,
|
|
33
33
|
cacheDir: '../node_modules/.vite/test',
|
|
34
34
|
plugins: [react(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
@@ -43,9 +43,12 @@ export default defineConfig({
|
|
|
43
43
|
environment: 'jsdom',
|
|
44
44
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
45
45
|
reporters: ['default'],
|
|
46
|
-
coverage: {
|
|
46
|
+
coverage: {
|
|
47
|
+
reportsDirectory: '../coverage/test',
|
|
48
|
+
provider: 'v8' as const,
|
|
49
|
+
},
|
|
47
50
|
},
|
|
48
|
-
});
|
|
51
|
+
}));
|
|
49
52
|
"
|
|
50
53
|
`;
|
|
51
54
|
|
|
@@ -92,7 +92,7 @@ import react from '@vitejs/plugin-react';
|
|
|
92
92
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
93
93
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
94
94
|
|
|
95
|
-
export default defineConfig({
|
|
95
|
+
export default defineConfig(() => ({
|
|
96
96
|
root: __dirname,
|
|
97
97
|
cacheDir: '../../node_modules/.vite/libs/storybook-test',
|
|
98
98
|
plugins: [react(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
@@ -109,10 +109,10 @@ export default defineConfig({
|
|
|
109
109
|
reporters: ['default'],
|
|
110
110
|
coverage: {
|
|
111
111
|
reportsDirectory: '../../coverage/libs/storybook-test',
|
|
112
|
-
provider: 'v8',
|
|
112
|
+
provider: 'v8' as const,
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
|
-
});
|
|
115
|
+
}));
|
|
116
116
|
"
|
|
117
117
|
`;
|
|
118
118
|
|
|
@@ -40,14 +40,12 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should create
|
|
|
40
40
|
},
|
|
41
41
|
"dev": {
|
|
42
42
|
"command": "remix dev --manual",
|
|
43
|
-
"continuous": true,
|
|
44
43
|
"options": {
|
|
45
44
|
"cwd": "my-app",
|
|
46
45
|
},
|
|
47
46
|
},
|
|
48
47
|
"serve-static": {
|
|
49
48
|
"command": "remix-serve build/index.js",
|
|
50
|
-
"continuous": true,
|
|
51
49
|
"dependsOn": [
|
|
52
50
|
"build",
|
|
53
51
|
],
|
|
@@ -57,7 +55,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should create
|
|
|
57
55
|
},
|
|
58
56
|
"start": {
|
|
59
57
|
"command": "remix-serve build/index.js",
|
|
60
|
-
"continuous": true,
|
|
61
58
|
"dependsOn": [
|
|
62
59
|
"build",
|
|
63
60
|
],
|
|
@@ -67,7 +64,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should create
|
|
|
67
64
|
},
|
|
68
65
|
"static-serve": {
|
|
69
66
|
"command": "remix-serve build/index.js",
|
|
70
|
-
"continuous": true,
|
|
71
67
|
"dependsOn": [
|
|
72
68
|
"build",
|
|
73
69
|
],
|
|
@@ -159,14 +155,12 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should infer w
|
|
|
159
155
|
},
|
|
160
156
|
"dev": {
|
|
161
157
|
"command": "remix dev --manual",
|
|
162
|
-
"continuous": true,
|
|
163
158
|
"options": {
|
|
164
159
|
"cwd": "my-app",
|
|
165
160
|
},
|
|
166
161
|
},
|
|
167
162
|
"serve-static": {
|
|
168
163
|
"command": "remix-serve build/index.js",
|
|
169
|
-
"continuous": true,
|
|
170
164
|
"dependsOn": [
|
|
171
165
|
"build",
|
|
172
166
|
],
|
|
@@ -176,7 +170,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should infer w
|
|
|
176
170
|
},
|
|
177
171
|
"start": {
|
|
178
172
|
"command": "remix-serve build/index.js",
|
|
179
|
-
"continuous": true,
|
|
180
173
|
"dependsOn": [
|
|
181
174
|
"build",
|
|
182
175
|
],
|
|
@@ -186,7 +179,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler non-root project should infer w
|
|
|
186
179
|
},
|
|
187
180
|
"static-serve": {
|
|
188
181
|
"command": "remix-serve build/index.js",
|
|
189
|
-
"continuous": true,
|
|
190
182
|
"dependsOn": [
|
|
191
183
|
"build",
|
|
192
184
|
],
|
|
@@ -273,14 +265,12 @@ exports[`@nx/remix/plugin Remix Classic Compiler root project should create node
|
|
|
273
265
|
},
|
|
274
266
|
"dev": {
|
|
275
267
|
"command": "remix dev --manual",
|
|
276
|
-
"continuous": true,
|
|
277
268
|
"options": {
|
|
278
269
|
"cwd": ".",
|
|
279
270
|
},
|
|
280
271
|
},
|
|
281
272
|
"serve-static": {
|
|
282
273
|
"command": "remix-serve build/index.js",
|
|
283
|
-
"continuous": true,
|
|
284
274
|
"dependsOn": [
|
|
285
275
|
"build",
|
|
286
276
|
],
|
|
@@ -290,7 +280,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler root project should create node
|
|
|
290
280
|
},
|
|
291
281
|
"start": {
|
|
292
282
|
"command": "remix-serve build/index.js",
|
|
293
|
-
"continuous": true,
|
|
294
283
|
"dependsOn": [
|
|
295
284
|
"build",
|
|
296
285
|
],
|
|
@@ -300,7 +289,6 @@ exports[`@nx/remix/plugin Remix Classic Compiler root project should create node
|
|
|
300
289
|
},
|
|
301
290
|
"static-serve": {
|
|
302
291
|
"command": "remix-serve build/index.js",
|
|
303
|
-
"continuous": true,
|
|
304
292
|
"dependsOn": [
|
|
305
293
|
"build",
|
|
306
294
|
],
|
|
@@ -385,14 +373,12 @@ exports[`@nx/remix/plugin Remix Vite Compiler non-root project should create nod
|
|
|
385
373
|
},
|
|
386
374
|
"dev": {
|
|
387
375
|
"command": "remix vite:dev",
|
|
388
|
-
"continuous": true,
|
|
389
376
|
"options": {
|
|
390
377
|
"cwd": "my-app",
|
|
391
378
|
},
|
|
392
379
|
},
|
|
393
380
|
"serve-static": {
|
|
394
381
|
"command": "remix-serve build/server/index.js",
|
|
395
|
-
"continuous": true,
|
|
396
382
|
"dependsOn": [
|
|
397
383
|
"build",
|
|
398
384
|
],
|
|
@@ -402,7 +388,6 @@ exports[`@nx/remix/plugin Remix Vite Compiler non-root project should create nod
|
|
|
402
388
|
},
|
|
403
389
|
"start": {
|
|
404
390
|
"command": "remix-serve build/server/index.js",
|
|
405
|
-
"continuous": true,
|
|
406
391
|
"dependsOn": [
|
|
407
392
|
"build",
|
|
408
393
|
],
|
|
@@ -412,7 +397,6 @@ exports[`@nx/remix/plugin Remix Vite Compiler non-root project should create nod
|
|
|
412
397
|
},
|
|
413
398
|
"static-serve": {
|
|
414
399
|
"command": "remix-serve build/server/index.js",
|
|
415
|
-
"continuous": true,
|
|
416
400
|
"dependsOn": [
|
|
417
401
|
"build",
|
|
418
402
|
],
|
|
@@ -498,14 +482,12 @@ exports[`@nx/remix/plugin Remix Vite Compiler root project should create nodes 1
|
|
|
498
482
|
},
|
|
499
483
|
"dev": {
|
|
500
484
|
"command": "remix vite:dev",
|
|
501
|
-
"continuous": true,
|
|
502
485
|
"options": {
|
|
503
486
|
"cwd": ".",
|
|
504
487
|
},
|
|
505
488
|
},
|
|
506
489
|
"serve-static": {
|
|
507
490
|
"command": "remix-serve build/server/index.js",
|
|
508
|
-
"continuous": true,
|
|
509
491
|
"dependsOn": [
|
|
510
492
|
"build",
|
|
511
493
|
],
|
|
@@ -515,7 +497,6 @@ exports[`@nx/remix/plugin Remix Vite Compiler root project should create nodes 1
|
|
|
515
497
|
},
|
|
516
498
|
"start": {
|
|
517
499
|
"command": "remix-serve build/server/index.js",
|
|
518
|
-
"continuous": true,
|
|
519
500
|
"dependsOn": [
|
|
520
501
|
"build",
|
|
521
502
|
],
|
|
@@ -525,7 +506,6 @@ exports[`@nx/remix/plugin Remix Vite Compiler root project should create nodes 1
|
|
|
525
506
|
},
|
|
526
507
|
"static-serve": {
|
|
527
508
|
"command": "remix-serve build/server/index.js",
|
|
528
|
-
"continuous": true,
|
|
529
509
|
"dependsOn": [
|
|
530
510
|
"build",
|
|
531
511
|
],
|
package/src/plugins/plugin.js
CHANGED
|
@@ -127,7 +127,6 @@ function buildTarget(buildTargetName, projectRoot, buildDirectory, assetsBuildDi
|
|
|
127
127
|
}
|
|
128
128
|
function devTarget(serverBuildPath, projectRoot, remixCompiler, isUsingTsSolutionSetup) {
|
|
129
129
|
const devTarget = {
|
|
130
|
-
continuous: true,
|
|
131
130
|
command: remixCompiler === RemixCompiler.IsVte
|
|
132
131
|
? 'remix vite:dev'
|
|
133
132
|
: 'remix dev --manual',
|
|
@@ -147,7 +146,6 @@ function startTarget(projectRoot, serverBuildPath, buildTargetName, remixCompile
|
|
|
147
146
|
}
|
|
148
147
|
const startTarget = {
|
|
149
148
|
dependsOn: [buildTargetName],
|
|
150
|
-
continuous: true,
|
|
151
149
|
command: `remix-serve ${serverPath}`,
|
|
152
150
|
options: {
|
|
153
151
|
cwd: projectRoot,
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
2
|
export declare const nxVersion: any;
|
|
3
|
-
export declare const remixVersion = "^2.
|
|
3
|
+
export declare const remixVersion = "^2.15.0";
|
|
4
4
|
export declare const isbotVersion = "^4.4.0";
|
|
5
5
|
export declare const reactVersion = "^18.2.0";
|
|
6
6
|
export declare const reactDomVersion = "^18.2.0";
|
|
@@ -13,6 +13,7 @@ export declare const postcssVersion = "^8.4.38";
|
|
|
13
13
|
export declare const autoprefixerVersion = "^10.4.19";
|
|
14
14
|
export declare const testingLibraryReactVersion = "^14.1.2";
|
|
15
15
|
export declare const testingLibraryJestDomVersion = "6.4.2";
|
|
16
|
+
export declare const testingLibraryDomVersion = "^10.4.0";
|
|
16
17
|
export declare const testingLibraryUserEventsVersion = "^14.5.2";
|
|
17
18
|
export declare const viteVersion = "^5.0.0";
|
|
18
19
|
export declare function getRemixVersion(tree: Tree): string;
|
package/src/utils/versions.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.viteVersion = exports.testingLibraryUserEventsVersion = exports.testingLibraryJestDomVersion = exports.testingLibraryReactVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptVersion = exports.eslintVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactDomVersion = exports.reactVersion = exports.isbotVersion = exports.remixVersion = exports.nxVersion = void 0;
|
|
3
|
+
exports.viteVersion = exports.testingLibraryUserEventsVersion = exports.testingLibraryDomVersion = exports.testingLibraryJestDomVersion = exports.testingLibraryReactVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptVersion = exports.eslintVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactDomVersion = exports.reactVersion = exports.isbotVersion = exports.remixVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.getRemixVersion = getRemixVersion;
|
|
5
5
|
exports.getPackageVersion = getPackageVersion;
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
exports.nxVersion = require('../../package.json').version;
|
|
8
|
-
exports.remixVersion = '^2.
|
|
8
|
+
exports.remixVersion = '^2.15.0';
|
|
9
9
|
exports.isbotVersion = '^4.4.0';
|
|
10
10
|
exports.reactVersion = '^18.2.0';
|
|
11
11
|
exports.reactDomVersion = '^18.2.0';
|
|
@@ -19,6 +19,7 @@ exports.autoprefixerVersion = '^10.4.19';
|
|
|
19
19
|
exports.testingLibraryReactVersion = '^14.1.2';
|
|
20
20
|
// TODO(colum): Unpin this when @testing-library/jest-dom pushes a fix
|
|
21
21
|
exports.testingLibraryJestDomVersion = '6.4.2';
|
|
22
|
+
exports.testingLibraryDomVersion = '^10.4.0';
|
|
22
23
|
exports.testingLibraryUserEventsVersion = '^14.5.2';
|
|
23
24
|
exports.viteVersion = '^5.0.0';
|
|
24
25
|
function getRemixVersion(tree) {
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"outputCapture": "pipe",
|
|
4
|
-
"$schema": "https://json-schema.org/schema",
|
|
5
|
-
"cli": "nx",
|
|
6
|
-
"title": "Remix Build",
|
|
7
|
-
"description": "Build a Remix app.",
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"outputPath": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "The output path of the generated files.",
|
|
13
|
-
"x-completion-type": "directory",
|
|
14
|
-
"x-priority": "important"
|
|
15
|
-
},
|
|
16
|
-
"includeDevDependenciesInPackageJson": {
|
|
17
|
-
"type": "boolean",
|
|
18
|
-
"description": "Include `devDependencies` in the generated package.json file. By default only production `dependencies` are included.",
|
|
19
|
-
"default": false
|
|
20
|
-
},
|
|
21
|
-
"generatePackageJson": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"description": "Generate package.json file in the output folder.",
|
|
24
|
-
"default": false
|
|
25
|
-
},
|
|
26
|
-
"generateLockfile": {
|
|
27
|
-
"type": "boolean",
|
|
28
|
-
"description": "Generate a lockfile (e.g. package-lock.json) that matches the workspace lockfile to ensure package versions match.",
|
|
29
|
-
"default": false
|
|
30
|
-
},
|
|
31
|
-
"skipOverrides": {
|
|
32
|
-
"type": "boolean",
|
|
33
|
-
"description": "Do not add a `overrides` and `resolutions` entries to the generated package.json file. Only works in conjunction with `generatePackageJson` option."
|
|
34
|
-
},
|
|
35
|
-
"skipPackageManager": {
|
|
36
|
-
"type": "boolean",
|
|
37
|
-
"description": "Do not add a `packageManager` entry to the generated package.json file. Only works in conjunction with `generatePackageJson` option."
|
|
38
|
-
},
|
|
39
|
-
"sourcemap": {
|
|
40
|
-
"type": "boolean",
|
|
41
|
-
"description": "Generate source maps for production.",
|
|
42
|
-
"default": false
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"required": ["outputPath"]
|
|
46
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addViteTempFilesToGitIgnore = addViteTempFilesToGitIgnore;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
function addViteTempFilesToGitIgnore(tree) {
|
|
6
|
-
let newGitIgnoreContents = `vite.config.*.timestamp*`;
|
|
7
|
-
if (tree.exists('.gitignore')) {
|
|
8
|
-
const gitIgnoreContents = tree.read('.gitignore', 'utf-8');
|
|
9
|
-
if (!gitIgnoreContents.includes(newGitIgnoreContents)) {
|
|
10
|
-
newGitIgnoreContents = (0, devkit_1.stripIndents) `${gitIgnoreContents}
|
|
11
|
-
${newGitIgnoreContents}`;
|
|
12
|
-
tree.write('.gitignore', newGitIgnoreContents);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
tree.write('.gitignore', newGitIgnoreContents);
|
|
17
|
-
}
|
|
18
|
-
}
|