@lwrjs/config 0.11.0-alpha.10 → 0.11.0-alpha.11

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.
@@ -31,14 +31,14 @@ __export(exports, {
31
31
  var import_path = __toModule(require("path"));
32
32
  var import_diagnostics = __toModule(require("@lwrjs/diagnostics"));
33
33
  var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
34
- var import_typescript = __toModule(require("@lwrjs/shared-utils/typescript"));
35
34
  async function importModule(filepath, rootDir, cacheDir) {
36
35
  let resolvedFilePath = (0, import_shared_utils.normalizeDirectory)(filepath, rootDir);
37
36
  const resolvedCacheDir = (0, import_shared_utils.normalizeDirectory)(cacheDir, rootDir);
38
37
  try {
39
38
  if (resolvedFilePath.endsWith(".ts")) {
40
39
  const fullPath = (0, import_shared_utils.resolveFileExtension)(resolvedFilePath);
41
- resolvedFilePath = await (0, import_typescript.transpileTs)(fullPath, {rootDir, cacheDir: resolvedCacheDir});
40
+ const {transpileTs} = await Promise.resolve().then(() => __toModule(require("@lwrjs/esbuild")));
41
+ resolvedFilePath = await transpileTs(fullPath, {rootDir, cacheDir: resolvedCacheDir});
42
42
  }
43
43
  const moduleEntry = await Promise.resolve().then(() => __toModule(require(resolvedFilePath)));
44
44
  const output = moduleEntry.default || moduleEntry;
@@ -1,7 +1,6 @@
1
1
  import path from 'path';
2
2
  import { logger } from '@lwrjs/diagnostics';
3
3
  import { normalizeDirectory, resolveFileExtension } from '@lwrjs/shared-utils';
4
- import { transpileTs } from '@lwrjs/shared-utils/typescript';
5
4
  async function importModule(filepath, rootDir, cacheDir) {
6
5
  // ensure paths are fully resolved before loading source
7
6
  let resolvedFilePath = normalizeDirectory(filepath, rootDir);
@@ -9,6 +8,9 @@ async function importModule(filepath, rootDir, cacheDir) {
9
8
  try {
10
9
  if (resolvedFilePath.endsWith('.ts')) {
11
10
  const fullPath = resolveFileExtension(resolvedFilePath);
11
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
12
+ // @ts-ignore Optional Dependency
13
+ const { transpileTs } = await import('@lwrjs/esbuild');
12
14
  resolvedFilePath = await transpileTs(fullPath, { rootDir, cacheDir: resolvedCacheDir });
13
15
  }
14
16
  const moduleEntry = await import(resolvedFilePath);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.11.0-alpha.10",
7
+ "version": "0.11.0-alpha.11",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -41,21 +41,27 @@
41
41
  "test": "jest"
42
42
  },
43
43
  "dependencies": {
44
- "@lwrjs/diagnostics": "0.11.0-alpha.10",
45
- "@lwrjs/instrumentation": "0.11.0-alpha.10",
46
- "@lwrjs/shared-utils": "0.11.0-alpha.10",
44
+ "@lwrjs/diagnostics": "0.11.0-alpha.11",
45
+ "@lwrjs/instrumentation": "0.11.0-alpha.11",
46
+ "@lwrjs/shared-utils": "0.11.0-alpha.11",
47
47
  "fs-extra": "^11.1.1",
48
48
  "jsonc-parser": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@lwrjs/types": "0.11.0-alpha.10",
51
+ "@lwrjs/types": "0.11.0-alpha.11",
52
52
  "jest": "^26.6.3",
53
53
  "ts-jest": "^26.5.6"
54
54
  },
55
55
  "peerDependencies": {
56
- "@lwc/engine-dom": "2.x || 3.x",
57
- "@lwc/synthetic-shadow": "2.x || 3.x",
58
- "lwc": "2.x || 3.x"
56
+ "@lwc/engine-dom": "2.x || 3.x || 4.x",
57
+ "@lwc/synthetic-shadow": "2.x || 3.x || 4.x",
58
+ "@lwrjs/esbuild": "0.11.0-alpha.10",
59
+ "lwc": "2.x || 3.x || 4.x"
60
+ },
61
+ "peerDependenciesMeta": {
62
+ "@lwrjs/esbuild": {
63
+ "optional": true
64
+ }
59
65
  },
60
66
  "engines": {
61
67
  "node": ">=16.0.0"
@@ -63,5 +69,5 @@
63
69
  "volta": {
64
70
  "extends": "../../../package.json"
65
71
  },
66
- "gitHead": "34b1e289e8de12531f5624b64512e870157195d4"
72
+ "gitHead": "acb9df6ee7887b683e28ad43e00df311256d6018"
67
73
  }