@nx/remix 19.1.0-beta.2 → 19.1.0-beta.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/remix",
3
- "version": "19.1.0-beta.2",
3
+ "version": "19.1.0-beta.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, 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,12 +29,12 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nx/devkit": "19.1.0-beta.2",
33
- "@nx/js": "19.1.0-beta.2",
34
- "@nx/react": "19.1.0-beta.2",
32
+ "@nx/devkit": "19.1.0-beta.4",
33
+ "@nx/js": "19.1.0-beta.4",
34
+ "@nx/react": "19.1.0-beta.4",
35
35
  "tslib": "^2.3.1",
36
36
  "@phenomnomnominal/tsquery": "~5.0.1",
37
- "@nrwl/remix": "19.1.0-beta.2"
37
+ "@nrwl/remix": "19.1.0-beta.4"
38
38
  },
39
39
  "peerDependencies": {},
40
40
  "publishConfig": {
@@ -10,16 +10,19 @@ const path_1 = require("path");
10
10
  const fs_1 = require("fs");
11
11
  const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
12
12
  const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'remix.hash');
13
- const targetsCache = (0, fs_1.existsSync)(cachePath) ? readTargetsCache() : {};
14
- const calculatedTargets = {};
13
+ const targetsCache = readTargetsCache();
15
14
  function readTargetsCache() {
16
- return (0, devkit_1.readJsonFile)(cachePath);
15
+ return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
17
16
  }
18
- function writeTargetsToCache(targets) {
19
- (0, devkit_1.writeJsonFile)(cachePath, targets);
17
+ function writeTargetsToCache() {
18
+ const oldCache = readTargetsCache();
19
+ (0, devkit_1.writeJsonFile)(cachePath, {
20
+ ...oldCache,
21
+ ...targetsCache,
22
+ });
20
23
  }
21
24
  const createDependencies = () => {
22
- writeTargetsToCache(calculatedTargets);
25
+ writeTargetsToCache();
23
26
  return [];
24
27
  };
25
28
  exports.createDependencies = createDependencies;
@@ -40,15 +43,12 @@ exports.createNodes = [
40
43
  const hash = (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [
41
44
  (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)),
42
45
  ]);
43
- const targets = targetsCache[hash]
44
- ? targetsCache[hash]
45
- : await buildRemixTargets(configFilePath, projectRoot, options, context, siblingFiles);
46
- calculatedTargets[hash] = targets;
46
+ targetsCache[hash] ??= await buildRemixTargets(configFilePath, projectRoot, options, context, siblingFiles);
47
47
  return {
48
48
  projects: {
49
49
  [projectRoot]: {
50
50
  root: projectRoot,
51
- targets,
51
+ targets: targetsCache[hash],
52
52
  },
53
53
  },
54
54
  };