@nx/remix 18.0.3 → 18.0.4
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 +5 -5
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +2 -4
- package/src/generators/application/application.impl.js +1 -1
- package/src/generators/application/lib/update-unit-test-config.d.ts +1 -1
- package/src/generators/application/lib/update-unit-test-config.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.4",
|
|
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, 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",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"migrations": "./migrations.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nx/devkit": "18.0.
|
|
32
|
-
"@nx/js": "18.0.
|
|
33
|
-
"@nx/react": "18.0.
|
|
31
|
+
"@nx/devkit": "18.0.4",
|
|
32
|
+
"@nx/js": "18.0.4",
|
|
33
|
+
"@nx/react": "18.0.4",
|
|
34
34
|
"tslib": "^2.3.1",
|
|
35
35
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
36
|
-
"@nrwl/remix": "18.0.
|
|
36
|
+
"@nrwl/remix": "18.0.4"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {},
|
|
39
39
|
"publishConfig": {
|
|
@@ -323,9 +323,8 @@ export default {
|
|
|
323
323
|
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using jest 2`] = `
|
|
324
324
|
"/* eslint-disable */
|
|
325
325
|
export default {
|
|
326
|
-
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
|
|
327
326
|
displayName: 'test',
|
|
328
|
-
preset: '../jest.preset.
|
|
327
|
+
preset: '../jest.preset.js',
|
|
329
328
|
transform: {
|
|
330
329
|
'^.+\\\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
331
330
|
},
|
|
@@ -801,9 +800,8 @@ export default {
|
|
|
801
800
|
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using jest 2`] = `
|
|
802
801
|
"/* eslint-disable */
|
|
803
802
|
export default {
|
|
804
|
-
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
|
|
805
803
|
displayName: 'test',
|
|
806
|
-
preset: '../../jest.preset.
|
|
804
|
+
preset: '../../jest.preset.js',
|
|
807
805
|
transform: {
|
|
808
806
|
'^.+\\\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
809
807
|
},
|
|
@@ -129,7 +129,7 @@ async function remixApplicationGeneratorInternal(tree, _options) {
|
|
|
129
129
|
}
|
|
130
130
|
tasks.push(jestTask);
|
|
131
131
|
}
|
|
132
|
-
const pkgInstallTask = (0, lib_1.updateUnitTestConfig)(tree, options.projectRoot, options.unitTestRunner);
|
|
132
|
+
const pkgInstallTask = (0, lib_1.updateUnitTestConfig)(tree, options.projectRoot, options.unitTestRunner, options.rootProject);
|
|
133
133
|
tasks.push(pkgInstallTask);
|
|
134
134
|
}
|
|
135
135
|
else {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Tree } from '@nx/devkit';
|
|
2
|
-
export declare function updateUnitTestConfig(tree: Tree, pathToRoot: string, unitTestRunner: 'vitest' | 'jest'): import("@nx/devkit").GeneratorCallback;
|
|
2
|
+
export declare function updateUnitTestConfig(tree: Tree, pathToRoot: string, unitTestRunner: 'vitest' | 'jest', rootProject: boolean): import("@nx/devkit").GeneratorCallback;
|
|
@@ -4,7 +4,7 @@ exports.updateUnitTestConfig = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const testing_config_utils_1 = require("../../../utils/testing-config-utils");
|
|
6
6
|
const versions_1 = require("../../../utils/versions");
|
|
7
|
-
function updateUnitTestConfig(tree, pathToRoot, unitTestRunner) {
|
|
7
|
+
function updateUnitTestConfig(tree, pathToRoot, unitTestRunner, rootProject) {
|
|
8
8
|
const pathToTestSetup = (0, devkit_1.joinPathFragments)(pathToRoot, `test-setup.ts`);
|
|
9
9
|
tree.write(pathToTestSetup, (0, devkit_1.stripIndents) `
|
|
10
10
|
import { installGlobals } from '@remix-run/node';
|
|
@@ -16,9 +16,9 @@ function updateUnitTestConfig(tree, pathToRoot, unitTestRunner) {
|
|
|
16
16
|
(0, testing_config_utils_1.updateVitestTestIncludes)(tree, pathToViteConfig, './tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}');
|
|
17
17
|
(0, testing_config_utils_1.updateVitestTestSetup)(tree, pathToViteConfig, 'test-setup.ts');
|
|
18
18
|
}
|
|
19
|
-
else if (unitTestRunner === 'jest') {
|
|
19
|
+
else if (unitTestRunner === 'jest' && rootProject) {
|
|
20
20
|
const pathToJestConfig = (0, devkit_1.joinPathFragments)(pathToRoot, 'jest.config.ts');
|
|
21
|
-
tree.
|
|
21
|
+
tree.write('jest.preset.cjs', tree.read('jest.preset.js', 'utf-8'));
|
|
22
22
|
(0, testing_config_utils_1.updateJestTestSetup)(tree, pathToJestConfig, `<rootDir>/test-setup.ts`);
|
|
23
23
|
tree.write(pathToJestConfig, tree
|
|
24
24
|
.read(pathToJestConfig, 'utf-8')
|