@lwrjs/module-registry 0.7.2 → 0.8.0-alpha.2

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.
@@ -94,15 +94,13 @@ var LwrModuleRegistry = class {
94
94
  if (cacheDisabled === false && this.moduleDefCache.has(moduleEntry.id)) {
95
95
  return this.moduleDefCache.get(moduleEntry.id);
96
96
  }
97
- const createModulePromiseCtor = async () => {
98
- return this.createModuleDefinition(moduleId, runtimeParams).then((moduleDef) => {
99
- if (cacheDisabled === false) {
100
- this.moduleDefCache.set(moduleDef.id, moduleDef);
101
- }
102
- return moduleDef;
103
- });
104
- };
105
- return this.inflightModuleDefinitions.execute(moduleEntry.id, createModulePromiseCtor, this);
97
+ return this.inflightModuleDefinitions.execute(moduleEntry.id, async () => {
98
+ const moduleDef = await this.createModuleDefinition(moduleId, runtimeParams);
99
+ if (cacheDisabled === false) {
100
+ this.moduleDefCache.set(moduleDef.id, moduleDef);
101
+ }
102
+ return moduleDef;
103
+ });
106
104
  }
107
105
  async createModuleDefinition(moduleId, runtimeParams) {
108
106
  const {locker} = this.globalConfig;
package/build/es/index.js CHANGED
@@ -80,15 +80,13 @@ export class LwrModuleRegistry {
80
80
  // console.log('[INFO] Module Cache Hit: %s', moduleEntry.id);
81
81
  return this.moduleDefCache.get(moduleEntry.id);
82
82
  }
83
- const createModulePromiseCtor = async () => {
84
- return this.createModuleDefinition(moduleId, runtimeParams).then((moduleDef) => {
85
- if (cacheDisabled === false) {
86
- this.moduleDefCache.set(moduleDef.id, moduleDef);
87
- }
88
- return moduleDef;
89
- });
90
- };
91
- return this.inflightModuleDefinitions.execute(moduleEntry.id, createModulePromiseCtor, this);
83
+ return this.inflightModuleDefinitions.execute(moduleEntry.id, async () => {
84
+ const moduleDef = await this.createModuleDefinition(moduleId, runtimeParams);
85
+ if (cacheDisabled === false) {
86
+ this.moduleDefCache.set(moduleDef.id, moduleDef);
87
+ }
88
+ return moduleDef;
89
+ });
92
90
  }
93
91
  async createModuleDefinition(moduleId, runtimeParams) {
94
92
  const { locker } = this.globalConfig;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.7.2",
7
+ "version": "0.8.0-alpha.2",
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.7.2",
34
- "@lwrjs/shared-utils": "0.7.2",
33
+ "@lwrjs/diagnostics": "0.8.0-alpha.2",
34
+ "@lwrjs/shared-utils": "0.8.0-alpha.2",
35
35
  "es-module-lexer": "^0.3.18",
36
36
  "ws": "^7.2.5"
37
37
  },
38
38
  "devDependencies": {
39
- "@lwrjs/types": "0.7.2",
39
+ "@lwrjs/types": "0.8.0-alpha.2",
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 <19"
45
45
  },
46
- "gitHead": "1467a95aa5dcf6901e1122f6025ffd4f22237a3f"
46
+ "gitHead": "44bee038acb30418870678d886e3ded4a6afecf0"
47
47
  }