@lwrjs/module-registry 0.6.2 → 0.7.0-alpha.1

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.
@@ -120,7 +120,7 @@ var LwrModuleRegistry = class {
120
120
  async getLinkedModule(moduleId, runtimeEnvironment, runtimeParams) {
121
121
  const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
122
122
  const id = moduleEntry.id;
123
- const {format, compat, debug, minify} = runtimeEnvironment;
123
+ const {format, compat, debug, minify, bundle} = runtimeEnvironment;
124
124
  const locale = runtimeParams?.["locale"];
125
125
  const environment = runtimeParams?.["environment"];
126
126
  const {
@@ -134,6 +134,7 @@ var LwrModuleRegistry = class {
134
134
  compat,
135
135
  debug,
136
136
  minify,
137
+ bundle,
137
138
  lockerEnabled,
138
139
  locale,
139
140
  environment
@@ -147,7 +148,16 @@ var LwrModuleRegistry = class {
147
148
  const moduleLinked = await this.createLinkedModuleDefinition(moduleDef, runtimeEnvironment, runtimeParams);
148
149
  if (cacheDisabled === false) {
149
150
  const linkedMap = this.moduleLinkedCache.get(id) || new Map();
150
- linkedMap.set((0, import_shared_utils.getCacheKeyFromJson)({format, compat, debug, minify, lockerEnabled, locale, environment}), moduleLinked);
151
+ linkedMap.set((0, import_shared_utils.getCacheKeyFromJson)({
152
+ format,
153
+ compat,
154
+ debug,
155
+ minify,
156
+ bundle,
157
+ lockerEnabled,
158
+ locale,
159
+ environment
160
+ }), moduleLinked);
151
161
  this.moduleLinkedCache.set(id, linkedMap);
152
162
  }
153
163
  return moduleLinked;
@@ -32,7 +32,7 @@ var import_process = __toModule(require("process"));
32
32
  var import_module = __toModule(require("module"));
33
33
  var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
34
34
  var LWC_VERSION = getLWCVersion();
35
- var ENABLED_FINGERPRINTS = (0, import_shared_utils.getExperimentalFeatures)().ENABLE_FINGERPRINTS;
35
+ var ENABLED_FINGERPRINTS = !(0, import_shared_utils.getFeatureFlags)().LEGACY_LOADER;
36
36
  var ENV_KEY = `LWC:${LWC_VERSION},FINGERPRINTS:${ENABLED_FINGERPRINTS}`;
37
37
  async function getRecursiveModuleHash(definitions, registry, hash, visitedDefinitions = new Set()) {
38
38
  if (!definitions.length) {
package/build/es/index.js CHANGED
@@ -110,7 +110,7 @@ export class LwrModuleRegistry {
110
110
  const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
111
111
  const id = moduleEntry.id;
112
112
  // cache key pivots from the runtimeEnvironment
113
- const { format, compat, debug, minify } = runtimeEnvironment;
113
+ const { format, compat, debug, minify, bundle } = runtimeEnvironment;
114
114
  const locale = runtimeParams?.['locale'];
115
115
  const environment = runtimeParams?.['environment'];
116
116
  const { locker: { enabled: lockerEnabled }, } = this.globalConfig;
@@ -122,6 +122,7 @@ export class LwrModuleRegistry {
122
122
  compat,
123
123
  debug,
124
124
  minify,
125
+ bundle,
125
126
  lockerEnabled,
126
127
  locale,
127
128
  environment,
@@ -136,7 +137,16 @@ export class LwrModuleRegistry {
136
137
  // Add to cache
137
138
  if (cacheDisabled === false) {
138
139
  const linkedMap = this.moduleLinkedCache.get(id) || new Map();
139
- linkedMap.set(getCacheKeyFromJson({ format, compat, debug, minify, lockerEnabled, locale, environment }), moduleLinked);
140
+ linkedMap.set(getCacheKeyFromJson({
141
+ format,
142
+ compat,
143
+ debug,
144
+ minify,
145
+ bundle,
146
+ lockerEnabled,
147
+ locale,
148
+ environment,
149
+ }), moduleLinked);
140
150
  this.moduleLinkedCache.set(id, linkedMap);
141
151
  }
142
152
  return moduleLinked;
@@ -2,9 +2,9 @@ import crypto from 'crypto';
2
2
  import path from 'path';
3
3
  import { cwd } from 'process';
4
4
  import { createRequire } from 'module';
5
- import { getExperimentalFeatures } from '@lwrjs/shared-utils';
5
+ import { getFeatureFlags } from '@lwrjs/shared-utils';
6
6
  const LWC_VERSION = getLWCVersion();
7
- const ENABLED_FINGERPRINTS = getExperimentalFeatures().ENABLE_FINGERPRINTS;
7
+ const ENABLED_FINGERPRINTS = !getFeatureFlags().LEGACY_LOADER;
8
8
  const ENV_KEY = `LWC:${LWC_VERSION},FINGERPRINTS:${ENABLED_FINGERPRINTS}`;
9
9
  async function getRecursiveModuleHash(definitions, registry, hash, visitedDefinitions = new Set()) {
10
10
  if (!definitions.length) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.6.2",
7
+ "version": "0.7.0-alpha.1",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,18 +30,18 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/diagnostics": "0.6.2",
34
- "@lwrjs/shared-utils": "0.6.2",
33
+ "@lwrjs/diagnostics": "0.7.0-alpha.1",
34
+ "@lwrjs/shared-utils": "0.7.0-alpha.1",
35
35
  "es-module-lexer": "^0.3.18",
36
36
  "ws": "^7.2.5"
37
37
  },
38
38
  "devDependencies": {
39
- "@lwrjs/types": "0.6.2",
39
+ "@lwrjs/types": "0.7.0-alpha.1",
40
40
  "@types/es-module-lexer": "^0.3.0",
41
41
  "@types/ws": "^7.2.4"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.15.4 <17"
45
45
  },
46
- "gitHead": "ef85bdc48adde58b7c648561d67acbb408bbe189"
46
+ "gitHead": "24245670d6908d37e465f2316f92385df63d22aa"
47
47
  }