@lwrjs/api 0.21.8 → 0.22.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.
- package/build/cjs/cli/build.cjs +1 -1
- package/build/es/cli/build.js +6 -2
- package/build/es/localdev/providers/alias-static-module-provider.js +4 -1
- package/build/es/localdev/providers/evergreen-lwc-module-provider.js +1 -1
- package/build/es/localdev/providers/fallthrough-module-provider.js +3 -1
- package/build/es/localdev/providers/override-bundle-provider.js +0 -9
- package/build/es/localdev/providers/root-lwc-module-provider.js +1 -1
- package/build/es/localdev/providers/sfdx-module-provider.js +1 -2
- package/package.json +14 -14
package/build/cjs/cli/build.cjs
CHANGED
|
@@ -185,7 +185,7 @@ async function build(options) {
|
|
|
185
185
|
}
|
|
186
186
|
function getSuggestedNodeVersion() {
|
|
187
187
|
const nodeVersion = process.version;
|
|
188
|
-
const majorVersion = parseInt(nodeVersion.slice(1).split(".")[0]);
|
|
188
|
+
const majorVersion = parseInt(nodeVersion.slice(1).split(".")[0], 10);
|
|
189
189
|
return `${majorVersion}.x`;
|
|
190
190
|
}
|
|
191
191
|
function stageProxyConfig(rootDir, outputDir) {
|
package/build/es/cli/build.js
CHANGED
|
@@ -19,7 +19,7 @@ export async function build(options) {
|
|
|
19
19
|
process.env.REEVALUATE_MODULES = 'true';
|
|
20
20
|
// Module re-evaluation is only supported with the "legacy" loader
|
|
21
21
|
process.env.LEGACY_LOADER = 'true';
|
|
22
|
-
// Check the node version (to fail early)
|
|
22
|
+
// Check the node version (to fail early) and use recommended MRT Node version for config
|
|
23
23
|
ssrFunctionNodeVersion = getSuggestedNodeVersion();
|
|
24
24
|
}
|
|
25
25
|
if (clean) {
|
|
@@ -200,9 +200,13 @@ export async function build(options) {
|
|
|
200
200
|
logger.info({ label: `build`, message: `complete` });
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Returns the Node version to set in MRT config (ssrFunctionNodeVersion).
|
|
205
|
+
* Uses the current process Node major so the config matches the runtime (e.g. 24.x when building on Node 24).
|
|
206
|
+
*/
|
|
203
207
|
function getSuggestedNodeVersion() {
|
|
204
208
|
const nodeVersion = process.version;
|
|
205
|
-
const majorVersion = parseInt(nodeVersion.slice(1).split('.')[0]);
|
|
209
|
+
const majorVersion = parseInt(nodeVersion.slice(1).split('.')[0], 10);
|
|
206
210
|
return `${majorVersion}.x`;
|
|
207
211
|
}
|
|
208
212
|
function stageProxyConfig(rootDir, outputDir) {
|
|
@@ -3,7 +3,10 @@ const EXTERNAL_ALIAS = {
|
|
|
3
3
|
'lwr/loaderLegacy': '@salesforce/loader',
|
|
4
4
|
};
|
|
5
5
|
export default class AliasStaticModuleProvider extends StaticModuleProvider {
|
|
6
|
-
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'alias-static-module-provider';
|
|
9
|
+
}
|
|
7
10
|
async getModuleEntry(moduleId, runtimeParams) {
|
|
8
11
|
const alias = EXTERNAL_ALIAS[moduleId.specifier];
|
|
9
12
|
if (alias) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import LWCModuleProvider from '@lwrjs/lwc-module-provider';
|
|
2
2
|
import { logger } from '@lwrjs/diagnostics';
|
|
3
3
|
export default class EvergreenLWCModuleProvider extends LWCModuleProvider {
|
|
4
|
-
name = 'evergreen-lwc-module-provider';
|
|
5
4
|
constructor(options = {}, context) {
|
|
6
5
|
super(options, context);
|
|
6
|
+
this.name = 'evergreen-lwc-module-provider';
|
|
7
7
|
}
|
|
8
8
|
async getModuleEntry(moduleId, runtimeParams) {
|
|
9
9
|
let entry;
|
|
@@ -7,7 +7,9 @@ import { getSpecifier } from '@lwrjs/shared-utils';
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
export default class FallthroughModuleProvider {
|
|
10
|
-
|
|
10
|
+
constructor() {
|
|
11
|
+
this.name = 'fallthrough-module-provider';
|
|
12
|
+
}
|
|
11
13
|
async getModule(moduleId) {
|
|
12
14
|
logger.warn({
|
|
13
15
|
label: `${this.name}`,
|
|
@@ -4,15 +4,6 @@ import path from 'path';
|
|
|
4
4
|
import { logger } from '@lwrjs/diagnostics';
|
|
5
5
|
const LWR_DEFINE_REGEX = /LWR\.define\(["']([^"']+)["']/g;
|
|
6
6
|
export default class StaticOverrideBundleProvider extends StaticBundler {
|
|
7
|
-
staticBundles;
|
|
8
|
-
moduleRegistry;
|
|
9
|
-
moduleBundler;
|
|
10
|
-
cacheDir;
|
|
11
|
-
debug;
|
|
12
|
-
// experimental - Allow you to write to a separate directory rather than overwriting the bundle files
|
|
13
|
-
overrideDir; // default app
|
|
14
|
-
// experimental - Overwrite existing LWR defines (experimental) vs just adding modules to the bundle
|
|
15
|
-
inlineUpdate; // default false
|
|
16
7
|
constructor(options, context) {
|
|
17
8
|
super({
|
|
18
9
|
...options,
|
|
@@ -17,9 +17,9 @@ import { logger } from '@lwrjs/diagnostics';
|
|
|
17
17
|
* { specifier: 'lightning/button' importer: '<sf-cli>/<lightning-plugin>' }
|
|
18
18
|
*/
|
|
19
19
|
export default class RootLWCModuleProvider extends LWCModuleProvider {
|
|
20
|
-
name = 'root-lwc-module-provider';
|
|
21
20
|
constructor(options = {}, context) {
|
|
22
21
|
super(options, context);
|
|
22
|
+
this.name = 'root-lwc-module-provider';
|
|
23
23
|
this.rootDir = options.rootDir || context.config.rootDir;
|
|
24
24
|
}
|
|
25
25
|
async getModuleEntry(moduleId, runtimeParams) {
|
|
@@ -17,10 +17,9 @@ function resolveResource(name) {
|
|
|
17
17
|
return { component: name, resource: undefined };
|
|
18
18
|
}
|
|
19
19
|
export default class SFDXProvider extends LWCModuleProvider {
|
|
20
|
-
name = 'sfdx-module-provider';
|
|
21
|
-
namespacePaths;
|
|
22
20
|
constructor(options, context) {
|
|
23
21
|
super(options, context);
|
|
22
|
+
this.name = 'sfdx-module-provider';
|
|
24
23
|
this.namespacePaths =
|
|
25
24
|
options.namespacePaths && options.namespacePaths.length > 0
|
|
26
25
|
? options.namespacePaths
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.22.2",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
"test": "jest"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.
|
|
38
|
+
"@lwrjs/types": "0.22.2",
|
|
39
39
|
"@types/tar": "6.1.13",
|
|
40
40
|
"jest": "29.7.0",
|
|
41
41
|
"ts-jest": "^29.2.6",
|
|
42
|
-
"typescript": "
|
|
42
|
+
"typescript": "5.0.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lwrjs/config": "0.
|
|
46
|
-
"@lwrjs/core": "0.
|
|
47
|
-
"@lwrjs/dev-proxy-server": "0.
|
|
48
|
-
"@lwrjs/diagnostics": "0.
|
|
49
|
-
"@lwrjs/lwc-module-provider": "0.
|
|
50
|
-
"@lwrjs/shared-utils": "0.
|
|
51
|
-
"@lwrjs/static": "0.
|
|
52
|
-
"@lwrjs/tools": "0.
|
|
45
|
+
"@lwrjs/config": "0.22.2",
|
|
46
|
+
"@lwrjs/core": "0.22.2",
|
|
47
|
+
"@lwrjs/dev-proxy-server": "0.22.2",
|
|
48
|
+
"@lwrjs/diagnostics": "0.22.2",
|
|
49
|
+
"@lwrjs/lwc-module-provider": "0.22.2",
|
|
50
|
+
"@lwrjs/shared-utils": "0.22.2",
|
|
51
|
+
"@lwrjs/static": "0.22.2",
|
|
52
|
+
"@lwrjs/tools": "0.22.2",
|
|
53
53
|
"chalk": "^5.3.0",
|
|
54
54
|
"fs-extra": "^11.2.0",
|
|
55
55
|
"semver": ">=7.6.3",
|
|
56
|
-
"tar": "7.
|
|
56
|
+
"tar": "^7.5.7"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"lwc": ">= 2.x"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
|
-
"node": ">=
|
|
62
|
+
"node": ">=22.0.0"
|
|
63
63
|
},
|
|
64
64
|
"volta": {
|
|
65
65
|
"extends": "../../../package.json"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "30870e466e15e6691d238e75836e9266a45203e3"
|
|
68
68
|
}
|