@lwrjs/view-registry 0.15.6 → 0.15.8

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.
@@ -42,7 +42,7 @@ function includeIdFactory(bundleConfig) {
42
42
  };
43
43
  }
44
44
  var moduleGraphsCache = new import_lru_cache.LRUCache({
45
- max: 500,
45
+ max: parseInt(process.env.MODULE_GRAPH_CACHE_SIZE ?? "500", 10),
46
46
  dispose: (_value, key) => {
47
47
  if ((0, import_shared_utils.isLambdaEnv)()) {
48
48
  import_diagnostics.logger.warn(`Module graph evicted from cache ${key}`);
@@ -35,7 +35,7 @@ var import_utils2 = __toModule(require("./utils.cjs"));
35
35
  var import_utils3 = __toModule(require("../utils.cjs"));
36
36
  var import_preload_utils = __toModule(require("./preload-utils.cjs"));
37
37
  var moduleGraphsCache = new import_lru_cache.LRUCache({
38
- max: 500,
38
+ max: parseInt(process.env.MODULE_GRAPH_CACHE_SIZE ?? "500", 10),
39
39
  dispose: (_value, key) => {
40
40
  if ((0, import_shared_utils.isLambdaEnv)()) {
41
41
  import_diagnostics.logger.warn(`Module graph evicted from cache ${key}`);
@@ -350,14 +350,14 @@ function getViewDefCacheKey(view, runtimeEnvironment, freezeAssets, runtimeParam
350
350
  });
351
351
  }
352
352
  function getModuleGraphCacheKey(specifier, runtimeEnvironment, runtimeParams) {
353
- const updatedParams = {
354
- ...runtimeParams
353
+ const params = {
354
+ basePath: runtimeParams.basePath,
355
+ debug: runtimeEnvironment.debug,
356
+ locale: runtimeParams.locale,
357
+ ssr: runtimeParams.ssr
355
358
  };
356
- delete updatedParams.url;
357
- delete updatedParams.query;
358
359
  return (0, import_shared_utils.getCacheKeyFromJson)({
359
360
  specifier,
360
- updatedParams,
361
- runtimeEnvironment
361
+ params
362
362
  });
363
363
  }
@@ -19,7 +19,7 @@ function includeIdFactory(bundleConfig) {
19
19
  // `getModuleGraphs` is very expensive and does not need to be recomputed every time.
20
20
  // Note: we use the same cache key passed in from the top level view-registry for consistency
21
21
  const moduleGraphsCache = new LRUCache({
22
- max: 500,
22
+ max: parseInt(process.env.MODULE_GRAPH_CACHE_SIZE ?? '500', 10),
23
23
  dispose: (_value, key) => {
24
24
  if (isLambdaEnv()) {
25
25
  logger.warn(`Module graph evicted from cache ${key}`);
@@ -9,7 +9,7 @@ import { setPreloadModulesMeta, getPreloadModulesMeta } from './preload-utils.js
9
9
  // `getModuleGraphs` is very expensive and does not need to be recomputed every time.
10
10
  // Note: we use the same cache key passed in from the top level view-registry for consistency
11
11
  const moduleGraphsCache = new LRUCache({
12
- max: 500,
12
+ max: parseInt(process.env.MODULE_GRAPH_CACHE_SIZE ?? '500', 10),
13
13
  dispose: (_value, key) => {
14
14
  if (isLambdaEnv()) {
15
15
  logger.warn(`Module graph evicted from cache ${key}`);
package/build/es/utils.js CHANGED
@@ -341,16 +341,15 @@ export function getViewDefCacheKey(view, runtimeEnvironment, freezeAssets, runti
341
341
  });
342
342
  }
343
343
  export function getModuleGraphCacheKey(specifier, runtimeEnvironment, runtimeParams) {
344
- const updatedParams = {
345
- ...runtimeParams,
344
+ const params = {
345
+ basePath: runtimeParams.basePath,
346
+ debug: runtimeEnvironment.debug,
347
+ locale: runtimeParams.locale,
348
+ ssr: runtimeParams.ssr,
346
349
  };
347
- // Remove the URL and query from the runtimeParams
348
- delete updatedParams.url;
349
- delete updatedParams.query;
350
350
  return getCacheKeyFromJson({
351
351
  specifier,
352
- updatedParams,
353
- runtimeEnvironment,
352
+ params,
354
353
  });
355
354
  }
356
355
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.15.6",
7
+ "version": "0.15.8",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,14 +33,14 @@
33
33
  "build": "tsc -b"
34
34
  },
35
35
  "dependencies": {
36
- "@lwrjs/app-service": "0.15.6",
37
- "@lwrjs/diagnostics": "0.15.6",
38
- "@lwrjs/instrumentation": "0.15.6",
39
- "@lwrjs/shared-utils": "0.15.6",
36
+ "@lwrjs/app-service": "0.15.8",
37
+ "@lwrjs/diagnostics": "0.15.8",
38
+ "@lwrjs/instrumentation": "0.15.8",
39
+ "@lwrjs/shared-utils": "0.15.8",
40
40
  "lru-cache": "^10.4.3"
41
41
  },
42
42
  "devDependencies": {
43
- "@lwrjs/types": "0.15.6"
43
+ "@lwrjs/types": "0.15.8"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=18.0.0"
@@ -48,5 +48,5 @@
48
48
  "volta": {
49
49
  "extends": "../../../package.json"
50
50
  },
51
- "gitHead": "149a9606a77347eb0ba326497f8fcde5c855d5f8"
51
+ "gitHead": "e044933053591965ec7662b33540ce91d91e9542"
52
52
  }