@nx/remix 0.0.0-pr-33300-a25d58c → 0.0.0-pr-33228-85dcafe

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/remix",
3
- "version": "0.0.0-pr-33300-a25d58c",
3
+ "version": "0.0.0-pr-33228-85dcafe",
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,15 +29,16 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nx/devkit": "0.0.0-pr-33300-a25d58c",
33
- "@nx/js": "0.0.0-pr-33300-a25d58c",
34
- "@nx/react": "0.0.0-pr-33300-a25d58c",
35
- "@nx/workspace": "0.0.0-pr-33300-a25d58c",
32
+ "@nx/devkit": "0.0.0-pr-33228-85dcafe",
33
+ "@nx/js": "0.0.0-pr-33228-85dcafe",
34
+ "@nx/react": "0.0.0-pr-33228-85dcafe",
35
+ "@nx/workspace": "0.0.0-pr-33228-85dcafe",
36
36
  "tslib": "^2.3.0",
37
37
  "@phenomnomnominal/tsquery": "~5.0.1"
38
38
  },
39
39
  "devDependencies": {
40
- "nx": "0.0.0-pr-33300-a25d58c"
40
+ "nx": "0.0.0-pr-33228-85dcafe",
41
+ "@nx/vitest": "0.0.0-pr-33228-85dcafe"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "@remix-run/dev": "^2.14.0"
@@ -226,7 +226,7 @@ export default defineConfig({
226
226
  `;
227
227
 
228
228
  exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using jest 1`] = `
229
- "export default {
229
+ "module.exports = {
230
230
  displayName: 'test',
231
231
  preset: '../jest.preset.js',
232
232
  transform: {
@@ -405,7 +405,7 @@ export default defineConfig({
405
405
  `;
406
406
 
407
407
  exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 1`] = `
408
- "export default {
408
+ "module.exports = {
409
409
  setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
410
410
  displayName: 'test',
411
411
  preset: './jest.preset.cjs',
@@ -1 +1 @@
1
- {"version":3,"file":"application.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA6BpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQlD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,8BAOhC;AAED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,sBAAsB,8BA2SjC;AAED,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"application.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA6BpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQlD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,8BAOhC;AAED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,sBAAsB,8BA+SjC;AAED,eAAe,yBAAyB,CAAC"}
@@ -98,8 +98,9 @@ async function remixApplicationGeneratorInternal(tree, _options) {
98
98
  }
99
99
  if (options.unitTestRunner !== 'none') {
100
100
  if (options.unitTestRunner === 'vitest') {
101
- const { vitestGenerator, createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
102
- const vitestTask = await vitestGenerator(tree, {
101
+ const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
102
+ const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
103
+ const vitestTask = await configurationGenerator(tree, {
103
104
  uiFramework: 'react',
104
105
  project: options.projectName,
105
106
  coverageProvider: 'v8',
@@ -108,6 +109,7 @@ async function remixApplicationGeneratorInternal(tree, _options) {
108
109
  testEnvironment: 'jsdom',
109
110
  skipViteConfig: true,
110
111
  addPlugin: true,
112
+ viteVersion: 5,
111
113
  });
112
114
  createOrEditViteConfig(tree, {
113
115
  project: options.projectName,
@@ -203,7 +205,7 @@ async function remixApplicationGeneratorInternal(tree, _options) {
203
205
  tree.write('jest.preset.js', `import { nxPreset } from '@nx/jest/preset.js';
204
206
  export default {...nxPreset};
205
207
  `);
206
- (0, testing_config_utils_1.updateJestTestMatch)(tree, 'jest.config.ts', '<rootDir>/tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}');
208
+ (0, testing_config_utils_1.updateJestTestMatch)(tree, 'jest.config.cts', '<rootDir>/tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}');
207
209
  }
208
210
  }
209
211
  tasks.push(await (0, lib_1.addE2E)(tree, options));
@@ -11,6 +11,8 @@
11
11
  "**/.client/**/*.tsx"
12
12
  ],
13
13
  "exclude": [
14
+ "jest.config.ts",
15
+ "jest.config.cts",
14
16
  "tests/**/*.spec.ts",
15
17
  "tests/**/*.test.ts",
16
18
  "tests/**/*.spec.tsx",
@@ -27,6 +27,8 @@
27
27
  "**/.client/**/*.tsx"
28
28
  ],
29
29
  "exclude": [
30
+ "jest.config.ts",
31
+ "jest.config.cts",
30
32
  "tests/**/*.spec.ts",
31
33
  "tests/**/*.test.ts",
32
34
  "tests/**/*.spec.tsx",
@@ -17,7 +17,7 @@ function updateUnitTestConfig(tree, pathToRoot, unitTestRunner, rootProject) {
17
17
  (0, testing_config_utils_1.updateVitestTestSetup)(tree, pathToViteConfig, 'test-setup.ts');
18
18
  }
19
19
  else if (unitTestRunner === 'jest' && rootProject) {
20
- const pathToJestConfig = (0, devkit_1.joinPathFragments)(pathToRoot, 'jest.config.ts');
20
+ const pathToJestConfig = (0, devkit_1.joinPathFragments)(pathToRoot, 'jest.config.cts');
21
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
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Remix Library Generator --unitTestRunner should create the correct config files for testing with jest 1`] = `
4
- "export default {
4
+ "module.exports = {
5
5
  setupFilesAfterEnv: ['./src/test-setup.ts'],
6
6
  displayName: 'test',
7
7
  preset: '../jest.preset.js',
@@ -19,7 +19,7 @@ function addUnitTestingSetup(tree, options) {
19
19
  (0, testing_config_utils_1.updateVitestTestSetup)(tree, pathToVitestConfig, './src/test-setup.ts');
20
20
  }
21
21
  else if (options.unitTestRunner === 'jest') {
22
- const pathToJestConfig = (0, devkit_1.joinPathFragments)(options.projectRoot, `jest.config.ts`);
22
+ const pathToJestConfig = (0, devkit_1.joinPathFragments)(options.projectRoot, `jest.config.cts`);
23
23
  (0, testing_config_utils_1.updateJestTestSetup)(tree, pathToJestConfig, './src/test-setup.ts');
24
24
  }
25
25
  return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"update-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/utils/update-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAgC,MAAM,YAAY,CAAC;AAcrE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,0CAmB5C"}
1
+ {"version":3,"file":"update-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/utils/update-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAgC,MAAM,YAAY,CAAC;AAcrE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,0CAoB5C"}
@@ -17,5 +17,6 @@ function updateDependencies(tree) {
17
17
  typescript: versions_1.typescriptVersion,
18
18
  vite: versions_1.viteVersion,
19
19
  '@nx/vite': versions_1.nxVersion,
20
+ '@nx/vitest': versions_1.nxVersion,
20
21
  });
21
22
  }