@lwrjs/lwc-module-provider 0.22.13 → 0.23.0
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/compiler.cjs
CHANGED
|
@@ -27,7 +27,7 @@ __export(exports, {
|
|
|
27
27
|
LwcCompiler: () => LwcCompiler
|
|
28
28
|
});
|
|
29
29
|
var import_core = __toModule(require("@babel/core"));
|
|
30
|
-
var
|
|
30
|
+
var lwcCompilerCjs = __toModule(require("@lwc/compiler/dist/index.cjs"));
|
|
31
31
|
var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
32
32
|
var import_utils = __toModule(require("./utils.cjs"));
|
|
33
33
|
var import_diagnostics = __toModule(require("@lwrjs/diagnostics"));
|
|
@@ -105,9 +105,8 @@ var LwcCompiler = class {
|
|
|
105
105
|
const transformConfig = {
|
|
106
106
|
namespace: namespace || "",
|
|
107
107
|
name,
|
|
108
|
-
experimentalDynamicComponent: {
|
|
109
|
-
|
|
110
|
-
},
|
|
108
|
+
experimentalDynamicComponent: {strictSpecifier: false},
|
|
109
|
+
dynamicImports: {strictSpecifier: false},
|
|
111
110
|
scopedStyles,
|
|
112
111
|
enableDynamicComponents: true,
|
|
113
112
|
enableLightningWebSecurityTransforms,
|
|
@@ -122,10 +121,10 @@ var LwcCompiler = class {
|
|
|
122
121
|
additionalInfo: {
|
|
123
122
|
filename,
|
|
124
123
|
transformConfig,
|
|
125
|
-
version: this.compiler ? this.compiler.version :
|
|
124
|
+
version: this.compiler ? this.compiler.version : lwcCompilerCjs.version
|
|
126
125
|
}
|
|
127
126
|
});
|
|
128
|
-
const transformer = this.compiler ? this.compiler.transformSync :
|
|
127
|
+
const transformer = this.compiler ? this.compiler.transformSync : lwcCompilerCjs.transformSync;
|
|
129
128
|
const compilerResult = transformer(source, filename, transformConfig);
|
|
130
129
|
import_diagnostics.logger.verbose({
|
|
131
130
|
label: "LwcCompiler",
|
|
File without changes
|
package/build/cjs/utils.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var import_fs = __toModule(require("fs"));
|
|
|
34
34
|
var import_path = __toModule(require("path"));
|
|
35
35
|
var import_diagnostics = __toModule(require("@lwrjs/diagnostics"));
|
|
36
36
|
var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
37
|
-
var
|
|
37
|
+
var import_dist = __toModule(require("@lwc/module-resolver/dist/index.cjs"));
|
|
38
38
|
var EXPLICIT_CONSTANT = "/* _implicit_dependency_ */";
|
|
39
39
|
var DEFAULT_IMPLICIT_DEP = `${EXPLICIT_CONSTANT} export default void 0`;
|
|
40
40
|
function resolveModuleSpecifier(specifier, rootDir, modules = [], packageVersionCache, importer) {
|
|
@@ -45,7 +45,7 @@ function resolveModuleSpecifier(specifier, rootDir, modules = [], packageVersion
|
|
|
45
45
|
});
|
|
46
46
|
let resolvedModule;
|
|
47
47
|
try {
|
|
48
|
-
resolvedModule = (0,
|
|
48
|
+
resolvedModule = (0, import_dist.resolveModule)(specifier, process.env.SF_CLI_ROOT_DIR || importer || rootDir, {
|
|
49
49
|
modules,
|
|
50
50
|
rootDir
|
|
51
51
|
});
|
package/build/es/compiler.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CompilerResult, LwcCompilerConfig } from '@lwrjs/types';
|
|
2
|
-
import
|
|
2
|
+
import * as lwcCompilerCjs from '@lwc/compiler/dist/index.cjs';
|
|
3
3
|
export interface BundleFiles {
|
|
4
4
|
[filename: string]: string;
|
|
5
5
|
}
|
|
6
6
|
export interface CompilerFromLWC {
|
|
7
|
-
transformSync: typeof transformSync;
|
|
7
|
+
transformSync: typeof lwcCompilerCjs.transformSync;
|
|
8
8
|
version: string;
|
|
9
9
|
}
|
|
10
10
|
export declare class LwcCompiler {
|
package/build/es/compiler.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { transformSync as babelTransform } from '@babel/core';
|
|
2
|
-
|
|
2
|
+
// LWC 9: package entry is ESM; load dist/index.cjs so our compiled CJS (and Node require()) works.
|
|
3
|
+
// Namespace import so each call reads `transformSync` from the module (jest.spyOn on that object works).
|
|
4
|
+
import * as lwcCompilerCjs from '@lwc/compiler/dist/index.cjs';
|
|
3
5
|
import { getFeatureFlags } from '@lwrjs/shared-utils';
|
|
4
6
|
import { EXPLICIT_CONSTANT } from './utils.js';
|
|
5
7
|
import { logger } from '@lwrjs/diagnostics';
|
|
@@ -83,9 +85,8 @@ export class LwcCompiler {
|
|
|
83
85
|
const transformConfig = {
|
|
84
86
|
namespace: namespace || '',
|
|
85
87
|
name,
|
|
86
|
-
experimentalDynamicComponent: {
|
|
87
|
-
|
|
88
|
-
},
|
|
88
|
+
experimentalDynamicComponent: { strictSpecifier: false },
|
|
89
|
+
dynamicImports: { strictSpecifier: false },
|
|
89
90
|
scopedStyles,
|
|
90
91
|
enableDynamicComponents: true,
|
|
91
92
|
enableLightningWebSecurityTransforms,
|
|
@@ -100,10 +101,10 @@ export class LwcCompiler {
|
|
|
100
101
|
additionalInfo: {
|
|
101
102
|
filename,
|
|
102
103
|
transformConfig,
|
|
103
|
-
version: this.compiler ? this.compiler.version :
|
|
104
|
+
version: this.compiler ? this.compiler.version : lwcCompilerCjs.version,
|
|
104
105
|
},
|
|
105
106
|
});
|
|
106
|
-
const transformer = this.compiler ? this.compiler.transformSync : transformSync;
|
|
107
|
+
const transformer = this.compiler ? this.compiler.transformSync : lwcCompilerCjs.transformSync;
|
|
107
108
|
const compilerResult = transformer(source, filename, transformConfig);
|
|
108
109
|
logger.verbose({
|
|
109
110
|
label: 'LwcCompiler',
|
package/build/es/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResolverModuleRecord, Watcher, WatcherFactory } from '@lwrjs/types';
|
|
2
|
-
import { RegistryEntry } from '@lwc/module-resolver';
|
|
2
|
+
import { RegistryEntry } from '@lwc/module-resolver/dist/index.cjs';
|
|
3
3
|
export declare const EXPLICIT_CONSTANT = "/* _implicit_dependency_ */";
|
|
4
4
|
export declare const DEFAULT_IMPLICIT_DEP: string;
|
|
5
5
|
export declare function resolveModuleSpecifier(specifier: string, rootDir: string, modules: ResolverModuleRecord[] | undefined, packageVersionCache: Map<string, string>, importer?: string): Required<RegistryEntry>;
|
package/build/es/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { logger } from '@lwrjs/diagnostics';
|
|
4
4
|
import { readFile, debounce } from '@lwrjs/shared-utils';
|
|
5
|
-
import { resolveModule } from '@lwc/module-resolver';
|
|
5
|
+
import { resolveModule } from '@lwc/module-resolver/dist/index.cjs';
|
|
6
6
|
export const EXPLICIT_CONSTANT = '/* _implicit_dependency_ */';
|
|
7
7
|
export const DEFAULT_IMPLICIT_DEP = `${EXPLICIT_CONSTANT} export default void 0`;
|
|
8
8
|
export function resolveModuleSpecifier(specifier, rootDir, modules = [], packageVersionCache, importer) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.23.0",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/core": "^7.26.10",
|
|
37
37
|
"@babel/preset-typescript": "^7.26.0",
|
|
38
|
-
"@lwrjs/diagnostics": "0.
|
|
39
|
-
"@lwrjs/fs-watch": "0.
|
|
40
|
-
"@lwrjs/shared-utils": "0.
|
|
38
|
+
"@lwrjs/diagnostics": "0.23.0",
|
|
39
|
+
"@lwrjs/fs-watch": "0.23.0",
|
|
40
|
+
"@lwrjs/shared-utils": "0.23.0",
|
|
41
41
|
"fs-extra": "^11.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@lwrjs/types": "0.
|
|
44
|
+
"@lwrjs/types": "0.23.0",
|
|
45
45
|
"memfs": "^4.13.0",
|
|
46
46
|
"typescript": "5.0.4"
|
|
47
47
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"volta": {
|
|
56
56
|
"extends": "../../../package.json"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "5de81558aa52fc9593a386d9f6d82532c61cd4c1"
|
|
59
59
|
}
|