@lwrjs/module-registry 0.12.0-alpha.2 → 0.12.0-alpha.20

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.
@@ -148,9 +148,9 @@ async function link(moduleRegistry, moduleDef, versionStrategy, uriStrategy, run
148
148
  codeStringBuilder.overwrite(location.startColumn, location.endColumn, "isServer");
149
149
  }
150
150
  });
151
- const envSpecifier = "lwr/environment";
151
+ const {specifier: envSpecifier, version: envVersion} = await moduleRegistry.getModuleEntry({specifier: "lwr/environment"}, runtimeParams);
152
152
  const {namespace, name} = (0, import_shared_utils2.explodeSpecifier)(envSpecifier);
153
- const envLink = strategy({specifier: envSpecifier, version: runtimeEnvironment.lwrVersion}, runtimeEnvironment, runtimeParams);
153
+ const envLink = strategy({specifier: envSpecifier, version: envVersion}, runtimeEnvironment, runtimeParams);
154
154
  const envImport = `import { isServer } from "${envLink}";
155
155
  `;
156
156
  codeStringBuilder.prepend(envImport);
@@ -149,10 +149,9 @@ export async function link(moduleRegistry, moduleDef, versionStrategy, uriStrate
149
149
  codeStringBuilder.overwrite(location.startColumn, location.endColumn, 'isServer');
150
150
  }
151
151
  });
152
- // Add import { isServer } from 'lwr/environment'
153
- const envSpecifier = 'lwr/environment';
152
+ const { specifier: envSpecifier, version: envVersion } = await moduleRegistry.getModuleEntry({ specifier: 'lwr/environment' }, runtimeParams);
154
153
  const { namespace, name } = explodeSpecifier(envSpecifier);
155
- const envLink = strategy({ specifier: envSpecifier, version: runtimeEnvironment.lwrVersion }, runtimeEnvironment, runtimeParams);
154
+ const envLink = strategy({ specifier: envSpecifier, version: envVersion }, runtimeEnvironment, runtimeParams);
156
155
  const envImport = `import { isServer } from "${envLink}";\n`;
157
156
  codeStringBuilder.prepend(envImport);
158
157
  linkedImports.unshift({
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.12.0-alpha.2",
7
+ "version": "0.12.0-alpha.20",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,15 +30,16 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/diagnostics": "0.12.0-alpha.2",
34
- "@lwrjs/shared-utils": "0.12.0-alpha.2",
33
+ "@lwrjs/config": "0.12.0-alpha.20",
34
+ "@lwrjs/diagnostics": "0.12.0-alpha.20",
35
+ "@lwrjs/shared-utils": "0.12.0-alpha.20",
35
36
  "rollup": "^2.78.0"
36
37
  },
37
38
  "devDependencies": {
38
- "@lwrjs/types": "0.12.0-alpha.2"
39
+ "@lwrjs/types": "0.12.0-alpha.20"
39
40
  },
40
41
  "engines": {
41
42
  "node": ">=18.0.0"
42
43
  },
43
- "gitHead": "586a2aa659882483af9249dc3db7fe07bc842a25"
44
+ "gitHead": "ae1793e34eaf4e9b97996d7aea9031908b23a13a"
44
45
  }