@lwrjs/lwc-module-provider 0.22.8 → 0.22.9

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.
@@ -32,6 +32,7 @@ __export(exports, {
32
32
  setupModuleCache: () => setupModuleCache
33
33
  });
34
34
  var import_path = __toModule(require("path"));
35
+ var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
35
36
  var import_fs_extra = __toModule(require("fs-extra"));
36
37
  var import_diagnostics = __toModule(require("@lwrjs/diagnostics"));
37
38
  var DEFAULT_COMPILED_DIR = "lwc_compiled_modules";
@@ -39,7 +40,7 @@ var DEFAULT_CACHE_FOLDER = "cache";
39
40
  var DEFAULT_CACHE_INDEX = `compiled.json`;
40
41
  var NORMALIZE_PATH_REGEX = /[@\/#\.\?<>\\:\*\|"]/gm;
41
42
  function setupModuleCache(cacheDir) {
42
- const lwcCacheDir = import_path.default.join(cacheDir, `${DEFAULT_COMPILED_DIR}`);
43
+ const lwcCacheDir = (0, import_shared_utils.toForwardSlash)(import_path.default.join(cacheDir, DEFAULT_COMPILED_DIR));
43
44
  const lwcCacheIndexPath = import_path.default.join(lwcCacheDir, DEFAULT_CACHE_INDEX);
44
45
  import_fs_extra.default.mkdirSync(`${lwcCacheDir}/${DEFAULT_CACHE_FOLDER}`, {recursive: true});
45
46
  if (!import_fs_extra.default.existsSync(lwcCacheIndexPath)) {
package/build/es/cache.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import path from 'path';
2
+ import { toForwardSlash } from '@lwrjs/shared-utils';
2
3
  import fs from 'fs-extra';
3
4
  import { logger } from '@lwrjs/diagnostics';
4
5
  export const DEFAULT_COMPILED_DIR = 'lwc_compiled_modules';
@@ -11,7 +12,7 @@ const NORMALIZE_PATH_REGEX = /[@\/#\.\?<>\\:\*\|"]/gm;
11
12
  * We store an index file and the compiler modules individually
12
13
  */
13
14
  export function setupModuleCache(cacheDir) {
14
- const lwcCacheDir = path.join(cacheDir, `${DEFAULT_COMPILED_DIR}`);
15
+ const lwcCacheDir = toForwardSlash(path.join(cacheDir, DEFAULT_COMPILED_DIR));
15
16
  const lwcCacheIndexPath = path.join(lwcCacheDir, DEFAULT_CACHE_INDEX);
16
17
  fs.mkdirSync(`${lwcCacheDir}/${DEFAULT_CACHE_FOLDER}`, { recursive: true });
17
18
  if (!fs.existsSync(lwcCacheIndexPath)) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.22.8",
7
+ "version": "0.22.9",
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.22.8",
39
- "@lwrjs/fs-watch": "0.22.8",
40
- "@lwrjs/shared-utils": "0.22.8",
38
+ "@lwrjs/diagnostics": "0.22.9",
39
+ "@lwrjs/fs-watch": "0.22.9",
40
+ "@lwrjs/shared-utils": "0.22.9",
41
41
  "fs-extra": "^11.2.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@lwrjs/types": "0.22.8",
44
+ "@lwrjs/types": "0.22.9",
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": "66f71f33f5b12fa4e7c7969f0a6239a590c999d1"
58
+ "gitHead": "d0c112cd7b6eb940d6e554d0bbd93fb535465fdc"
59
59
  }