@lwrjs/module-registry 0.13.0-alpha.3 → 0.13.0-alpha.30
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.
|
@@ -51,11 +51,12 @@ async function resolveRelativeImport(registry, moduleSpecifier, importeeEntry, v
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, location, runtimeParams) {
|
|
54
|
-
const {namespace, name, specifier} = (0, import_shared_utils.explodeSpecifier)(moduleSpecifier);
|
|
54
|
+
const {namespace, name, specifier, version} = (0, import_shared_utils.explodeSpecifier)(moduleSpecifier);
|
|
55
55
|
const {entry, virtual} = importeeEntry;
|
|
56
56
|
const moduleEntryRoot = virtual ? void 0 : import_path.default.dirname(entry);
|
|
57
57
|
const dependencyModuleEntry = await registry.getModuleEntry({
|
|
58
|
-
specifier
|
|
58
|
+
specifier,
|
|
59
|
+
version,
|
|
59
60
|
importer: moduleEntryRoot
|
|
60
61
|
}, runtimeParams);
|
|
61
62
|
return {
|
|
@@ -63,7 +64,7 @@ async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, l
|
|
|
63
64
|
name: name || specifier,
|
|
64
65
|
scope: dependencyModuleEntry.scope,
|
|
65
66
|
sourceSpecifier: moduleSpecifier,
|
|
66
|
-
specifier
|
|
67
|
+
specifier,
|
|
67
68
|
version: dependencyModuleEntry.version,
|
|
68
69
|
locations: [location],
|
|
69
70
|
interchangeable: dependencyModuleEntry.interchangeable
|
|
@@ -114,10 +115,11 @@ async function getModuleRecord(compiledModule, registry, runtimeParams) {
|
|
|
114
115
|
if (!visitedDynamicImports.has(moduleSpecifier)) {
|
|
115
116
|
visitedDynamicImports.add(moduleSpecifier);
|
|
116
117
|
if (moduleNameType === import_shared_utils.ModuleNameType.unresolved) {
|
|
118
|
+
const {specifier, version: version2 = ""} = (0, import_shared_utils.explodeSpecifier)(moduleSpecifier);
|
|
117
119
|
dynamicImports.push({
|
|
118
|
-
specifier
|
|
120
|
+
specifier,
|
|
119
121
|
sourceSpecifier: moduleSpecifier,
|
|
120
|
-
version:
|
|
122
|
+
version: version2,
|
|
121
123
|
name: moduleNameType,
|
|
122
124
|
moduleNameType,
|
|
123
125
|
locations: [
|
|
@@ -33,11 +33,12 @@ async function resolveRelativeImport(registry, moduleSpecifier, importeeEntry, v
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, location, runtimeParams) {
|
|
36
|
-
const { namespace, name, specifier } = explodeSpecifier(moduleSpecifier);
|
|
36
|
+
const { namespace, name, specifier, version } = explodeSpecifier(moduleSpecifier);
|
|
37
37
|
const { entry, virtual } = importeeEntry;
|
|
38
38
|
const moduleEntryRoot = virtual ? undefined : path.dirname(entry);
|
|
39
39
|
const dependencyModuleEntry = await registry.getModuleEntry({
|
|
40
|
-
specifier
|
|
40
|
+
specifier,
|
|
41
|
+
version,
|
|
41
42
|
importer: moduleEntryRoot,
|
|
42
43
|
}, runtimeParams);
|
|
43
44
|
return {
|
|
@@ -45,7 +46,7 @@ async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, l
|
|
|
45
46
|
name: name || specifier,
|
|
46
47
|
scope: dependencyModuleEntry.scope,
|
|
47
48
|
sourceSpecifier: moduleSpecifier,
|
|
48
|
-
specifier:
|
|
49
|
+
specifier: specifier,
|
|
49
50
|
version: dependencyModuleEntry.version,
|
|
50
51
|
locations: [location],
|
|
51
52
|
interchangeable: dependencyModuleEntry.interchangeable,
|
|
@@ -97,11 +98,12 @@ export async function getModuleRecord(compiledModule, registry, runtimeParams) {
|
|
|
97
98
|
if (!visitedDynamicImports.has(moduleSpecifier)) {
|
|
98
99
|
visitedDynamicImports.add(moduleSpecifier);
|
|
99
100
|
if (moduleNameType === ModuleNameType.unresolved) {
|
|
101
|
+
const { specifier, version = '' } = explodeSpecifier(moduleSpecifier);
|
|
100
102
|
// mark variable dynamic imports
|
|
101
103
|
dynamicImports.push({
|
|
102
|
-
specifier
|
|
104
|
+
specifier,
|
|
103
105
|
sourceSpecifier: moduleSpecifier,
|
|
104
|
-
version
|
|
106
|
+
version,
|
|
105
107
|
name: moduleNameType,
|
|
106
108
|
moduleNameType,
|
|
107
109
|
locations: [
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.13.0-alpha.
|
|
7
|
+
"version": "0.13.0-alpha.30",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,18 +33,21 @@
|
|
|
33
33
|
"build/**/*.cjs",
|
|
34
34
|
"build/**/*.d.ts"
|
|
35
35
|
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -b"
|
|
38
|
+
},
|
|
36
39
|
"dependencies": {
|
|
37
|
-
"@lwrjs/config": "0.13.0-alpha.
|
|
38
|
-
"@lwrjs/diagnostics": "0.13.0-alpha.
|
|
39
|
-
"@lwrjs/shared-utils": "0.13.0-alpha.
|
|
40
|
+
"@lwrjs/config": "0.13.0-alpha.30",
|
|
41
|
+
"@lwrjs/diagnostics": "0.13.0-alpha.30",
|
|
42
|
+
"@lwrjs/shared-utils": "0.13.0-alpha.30",
|
|
40
43
|
"fs-extra": "^11.1.1",
|
|
41
44
|
"rollup": "^2.78.0"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
|
-
"@lwrjs/types": "0.13.0-alpha.
|
|
47
|
+
"@lwrjs/types": "0.13.0-alpha.30"
|
|
45
48
|
},
|
|
46
49
|
"engines": {
|
|
47
50
|
"node": ">=18.0.0"
|
|
48
51
|
},
|
|
49
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "8bf14ed00a95675fdb506e2cbdb6033324bf95bf"
|
|
50
53
|
}
|