@lwrjs/esbuild 0.13.1 → 0.13.3

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.
@@ -29,8 +29,6 @@ __export(exports, {
29
29
  var import_fs = __toModule(require("fs"));
30
30
  var import_path = __toModule(require("path"));
31
31
  var import_esbuild = __toModule(require("esbuild"));
32
- var import_url = __toModule(require("url"));
33
- var import_os = __toModule(require("os"));
34
32
  var esbuild = import_esbuild.default;
35
33
  if (!import_esbuild.default) {
36
34
  try {
@@ -69,7 +67,7 @@ async function transpileTs(tsAbsPath, {rootDir, cacheDir}) {
69
67
  const pathRelativeToRoot = (0, import_path.relative)(rootDir, tsAbsPath);
70
68
  const outBasename = pathRelativeToRoot.replace(new RegExp(`\\${import_path.sep}`, "g"), "_");
71
69
  const outFilename = outBasename.replace(/\.ts$/, ext);
72
- let outfile = (0, import_path.join)(cacheDir, outFilename);
70
+ const outfile = (0, import_path.join)(cacheDir, outFilename);
73
71
  await esbuild.build({
74
72
  format,
75
73
  bundle: true,
@@ -79,8 +77,5 @@ async function transpileTs(tsAbsPath, {rootDir, cacheDir}) {
79
77
  outfile,
80
78
  plugins: [ESBUILD_EXTENSION_PLUGIN(tsAbsPath, format)]
81
79
  });
82
- if (import_os.default.platform() === "win32") {
83
- outfile = (0, import_url.pathToFileURL)(outfile).href;
84
- }
85
80
  return outfile;
86
81
  }
package/build/es/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import { join, dirname, extname, relative, sep } from 'path';
3
3
  import esbuildEsm from 'esbuild';
4
- import { pathToFileURL } from 'url';
5
- import os from 'os';
6
4
  // https://github.com/evanw/esbuild/issues/706
7
5
  // Fixed in 0.11.0 but upgrading past 0.9.7 has caused breaking changes for consumers...
8
6
  // https://github.com/salesforce-experience-platform-emu/lwr/issues/1014
@@ -57,7 +55,7 @@ export async function transpileTs(tsAbsPath, { rootDir, cacheDir }) {
57
55
  const pathRelativeToRoot = relative(rootDir, tsAbsPath);
58
56
  const outBasename = pathRelativeToRoot.replace(new RegExp(`\\${sep}`, 'g'), '_'); // replace "/" with "_" in path
59
57
  const outFilename = outBasename.replace(/\.ts$/, ext);
60
- let outfile = join(cacheDir, outFilename);
58
+ const outfile = join(cacheDir, outFilename);
61
59
  await esbuild.build({
62
60
  format,
63
61
  bundle: true,
@@ -67,12 +65,6 @@ export async function transpileTs(tsAbsPath, { rootDir, cacheDir }) {
67
65
  outfile,
68
66
  plugins: [ESBUILD_EXTENSION_PLUGIN(tsAbsPath, format)],
69
67
  });
70
- // Only URLs with a scheme in: file, data, and node are supported by the default ESM loader
71
- // On Windows, absolute paths must be valid file:// URLs.
72
- // Without this code for windows, dynamic imports will fail in modules.ts
73
- if (os.platform() === 'win32') {
74
- outfile = pathToFileURL(outfile).href;
75
- }
76
68
  return outfile;
77
69
  }
78
70
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.1",
7
+ "version": "0.13.3",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -35,14 +35,14 @@
35
35
  "test": "jest"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.13.1",
38
+ "@lwrjs/types": "0.13.3",
39
39
  "jest": "^26.6.3",
40
40
  "ts-jest": "^26.5.6",
41
41
  "typescript": "^4.9.5"
42
42
  },
43
43
  "dependencies": {
44
- "@lwrjs/diagnostics": "0.13.1",
45
- "@lwrjs/shared-utils": "0.13.1",
44
+ "@lwrjs/diagnostics": "0.13.3",
45
+ "@lwrjs/shared-utils": "0.13.3",
46
46
  "esbuild": "^0.9.7"
47
47
  },
48
48
  "engines": {
@@ -51,5 +51,5 @@
51
51
  "volta": {
52
52
  "extends": "../../../package.json"
53
53
  },
54
- "gitHead": "548b27ed22f5bfba7031d6b356d64898e15bd609"
54
+ "gitHead": "adaedf286df20aed374d9eb07eaf74668084073c"
55
55
  }