@lwrjs/module-registry 0.12.0-alpha.24 → 0.12.0-alpha.25

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.
@@ -233,6 +233,9 @@ var LwrModuleRegistry = class {
233
233
  for (const registry of this.providers) {
234
234
  const result = await registry.getModuleEntry(moduleId, runtimeParams);
235
235
  if (result) {
236
+ if (!result.version) {
237
+ result.version = import_shared_utils.VERSION_NOT_PROVIDED;
238
+ }
236
239
  return result;
237
240
  }
238
241
  }
@@ -244,6 +247,12 @@ var LwrModuleRegistry = class {
244
247
  for (const registry of this.providers) {
245
248
  const result = await registry.getModule(moduleId, runtimeParams);
246
249
  if (result) {
250
+ if (!result.version) {
251
+ result.version = import_shared_utils.VERSION_NOT_PROVIDED;
252
+ }
253
+ if (!result.moduleEntry.version) {
254
+ result.moduleEntry.version = import_shared_utils.VERSION_NOT_PROVIDED;
255
+ }
247
256
  return result;
248
257
  }
249
258
  }
package/build/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LwrUnresolvableError, createSingleDiagnosticError, descriptions, logger } from '@lwrjs/diagnostics';
2
- import { discoverInterchangeableModules, getCacheKeyFromJson, InflightTasks, LATEST_SIGNATURE, ModuleNameType, getGroupName, isExternalSpecifier, } from '@lwrjs/shared-utils';
2
+ import { discoverInterchangeableModules, getCacheKeyFromJson, InflightTasks, LATEST_SIGNATURE, ModuleNameType, getGroupName, isExternalSpecifier, VERSION_NOT_PROVIDED, } from '@lwrjs/shared-utils';
3
3
  // dependencies @locker/compiler and rollup are in this package.json is to satisfy the shared-utils/compiler optional dependencies
4
4
  import { convertToAmd } from '@lwrjs/shared-utils/compiler';
5
5
  import { link } from './linker/linker.js';
@@ -150,6 +150,7 @@ export class LwrModuleRegistry {
150
150
  // the bundler will convert the linked source to AMD when bundling is enabled
151
151
  if (format === 'amd' &&
152
152
  !bundle &&
153
+ // Assume external source are already in AMD
153
154
  !isExternalSpecifier(moduleLinked.specifier, this.getConfig().bundleConfig)) {
154
155
  // convert the linkedSource to the transport AMD format
155
156
  moduleLinked.linkedSource = (await convertToAmd(moduleLinked.linkedSource, {
@@ -231,6 +232,10 @@ export class LwrModuleRegistry {
231
232
  // eslint-disable-next-line no-await-in-loop
232
233
  const result = await registry.getModuleEntry(moduleId, runtimeParams);
233
234
  if (result) {
235
+ // If version is not set in the provider set it to 'version-not-provided' so we know it has been resolved.
236
+ if (!result.version) {
237
+ result.version = VERSION_NOT_PROVIDED;
238
+ }
234
239
  return result;
235
240
  }
236
241
  }
@@ -243,6 +248,13 @@ export class LwrModuleRegistry {
243
248
  // eslint-disable-next-line no-await-in-loop
244
249
  const result = await registry.getModule(moduleId, runtimeParams);
245
250
  if (result) {
251
+ // If version is not set in the provider set it to 'version-not-provided' so we know it has been resolved.
252
+ if (!result.version) {
253
+ result.version = VERSION_NOT_PROVIDED;
254
+ }
255
+ if (!result.moduleEntry.version) {
256
+ result.moduleEntry.version = VERSION_NOT_PROVIDED;
257
+ }
246
258
  return result;
247
259
  }
248
260
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.12.0-alpha.24",
7
+ "version": "0.12.0-alpha.25",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -34,17 +34,17 @@
34
34
  "build/**/*.d.ts"
35
35
  ],
36
36
  "dependencies": {
37
- "@lwrjs/config": "0.12.0-alpha.24",
38
- "@lwrjs/diagnostics": "0.12.0-alpha.24",
39
- "@lwrjs/shared-utils": "0.12.0-alpha.24",
37
+ "@lwrjs/config": "0.12.0-alpha.25",
38
+ "@lwrjs/diagnostics": "0.12.0-alpha.25",
39
+ "@lwrjs/shared-utils": "0.12.0-alpha.25",
40
40
  "fs-extra": "^11.1.1",
41
41
  "rollup": "^2.78.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@lwrjs/types": "0.12.0-alpha.24"
44
+ "@lwrjs/types": "0.12.0-alpha.25"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=18.0.0"
48
48
  },
49
- "gitHead": "3f78e567d4d64485d57e0b4bfa174175be3ca031"
49
+ "gitHead": "1a3059f11fa8f64401a2a99941174911f23b30a8"
50
50
  }