@lwrjs/api 0.21.8 → 0.22.1

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.
@@ -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) {
@@ -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) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.21.8",
7
+ "version": "0.22.1",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -35,21 +35,21 @@
35
35
  "test": "jest"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.21.8",
38
+ "@lwrjs/types": "0.22.1",
39
39
  "@types/tar": "6.1.13",
40
40
  "jest": "29.7.0",
41
41
  "ts-jest": "^29.2.6",
42
42
  "typescript": "^4.9.5"
43
43
  },
44
44
  "dependencies": {
45
- "@lwrjs/config": "0.21.8",
46
- "@lwrjs/core": "0.21.8",
47
- "@lwrjs/dev-proxy-server": "0.21.8",
48
- "@lwrjs/diagnostics": "0.21.8",
49
- "@lwrjs/lwc-module-provider": "0.21.8",
50
- "@lwrjs/shared-utils": "0.21.8",
51
- "@lwrjs/static": "0.21.8",
52
- "@lwrjs/tools": "0.21.8",
45
+ "@lwrjs/config": "0.22.1",
46
+ "@lwrjs/core": "0.22.1",
47
+ "@lwrjs/dev-proxy-server": "0.22.1",
48
+ "@lwrjs/diagnostics": "0.22.1",
49
+ "@lwrjs/lwc-module-provider": "0.22.1",
50
+ "@lwrjs/shared-utils": "0.22.1",
51
+ "@lwrjs/static": "0.22.1",
52
+ "@lwrjs/tools": "0.22.1",
53
53
  "chalk": "^5.3.0",
54
54
  "fs-extra": "^11.2.0",
55
55
  "semver": ">=7.6.3",
@@ -59,10 +59,10 @@
59
59
  "lwc": ">= 2.x"
60
60
  },
61
61
  "engines": {
62
- "node": ">=20.0.0"
62
+ "node": ">=22.0.0"
63
63
  },
64
64
  "volta": {
65
65
  "extends": "../../../package.json"
66
66
  },
67
- "gitHead": "3665b85aad9402b59812e67570c0c6e3be093c00"
67
+ "gitHead": "29d44fb69ae394a4191c6a81024a8a81f2125556"
68
68
  }