@lwrjs/lwc-module-provider 0.17.2-alpha.16 → 0.17.2-alpha.18

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.
@@ -39,6 +39,12 @@ var DEFAULT_BABEL_CONFIG = {
39
39
  plugins: [["decorators", {decoratorsBeforeExport: true}]]
40
40
  }
41
41
  };
42
+ function skipCompilation(namespace, theName) {
43
+ if (!namespace && theName === "lwc" || namespace === "@lwc" || namespace === "lwr" && theName === "hmr") {
44
+ return true;
45
+ }
46
+ return false;
47
+ }
42
48
  var LwcCompiler = class {
43
49
  constructor(compiler) {
44
50
  this.compiler = compiler;
@@ -89,7 +95,7 @@ var LwcCompiler = class {
89
95
  }
90
96
  source = result.code;
91
97
  }
92
- if (namespace === "lwr" && name === "hmr") {
98
+ if (skipCompilation(namespace, name)) {
93
99
  return {
94
100
  code: source,
95
101
  map: null,
@@ -11,6 +11,15 @@ const DEFAULT_BABEL_CONFIG = {
11
11
  plugins: [['decorators', { decoratorsBeforeExport: true }]],
12
12
  },
13
13
  };
14
+ function skipCompilation(namespace, theName) {
15
+ if ((!namespace && theName === 'lwc') || // LWC framework
16
+ namespace === '@lwc' || // other LWC framework packages
17
+ (namespace === 'lwr' && theName === 'hmr') // HMR module (until we dont allow swap methods)
18
+ ) {
19
+ return true;
20
+ }
21
+ return false;
22
+ }
14
23
  export class LwcCompiler {
15
24
  constructor(compiler) {
16
25
  // Allow callers to pass in their own version of the LWC compiler
@@ -64,8 +73,7 @@ export class LwcCompiler {
64
73
  }
65
74
  source = result.code;
66
75
  }
67
- // HACK: This is to avoid running the LWC compiler on the HMR module until we dont allow swap methods
68
- if (namespace === 'lwr' && name === 'hmr') {
76
+ if (skipCompilation(namespace, name)) {
69
77
  return {
70
78
  code: source,
71
79
  map: null,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.17.2-alpha.16",
7
+ "version": "0.17.2-alpha.18",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,14 +33,14 @@
33
33
  "build": "tsc -b"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/preset-typescript": "^7.24.7",
37
- "@lwrjs/diagnostics": "0.17.2-alpha.16",
38
- "@lwrjs/fs-watch": "0.17.2-alpha.16",
39
- "@lwrjs/shared-utils": "0.17.2-alpha.16",
36
+ "@babel/preset-typescript": "^7.26.0",
37
+ "@lwrjs/diagnostics": "0.17.2-alpha.18",
38
+ "@lwrjs/fs-watch": "0.17.2-alpha.18",
39
+ "@lwrjs/shared-utils": "0.17.2-alpha.18",
40
40
  "fs-extra": "^11.2.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@lwrjs/types": "0.17.2-alpha.16",
43
+ "@lwrjs/types": "0.17.2-alpha.18",
44
44
  "memfs": "^4.13.0",
45
45
  "typescript": "^4.9.5"
46
46
  },
@@ -54,5 +54,5 @@
54
54
  "volta": {
55
55
  "extends": "../../../package.json"
56
56
  },
57
- "gitHead": "5a6b24c265145652f9dda60d1d2cb405148c71f3"
57
+ "gitHead": "94b7812858b33c0c27e7ae9554e1840d906706fa"
58
58
  }