@esmx/core 3.0.0-rc.44 → 3.0.0-rc.45

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/dist/core.mjs CHANGED
@@ -3,6 +3,7 @@ import fs from "node:fs";
3
3
  import fsp from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { cwd } from "node:process";
6
+ import { pathToFileURL } from "node:url";
6
7
  import serialize from "serialize-javascript";
7
8
  import { createApp } from "./app.mjs";
8
9
  import { getManifestList } from "./manifest-json.mjs";
@@ -690,12 +691,12 @@ export class Esmx {
690
691
  getScope: (name) => {
691
692
  const linkPath = moduleConfig.links[name].server;
692
693
  const realPath = fs.realpathSync(linkPath);
693
- return path.join(realPath, "/");
694
+ return pathToFileURL(path.join(realPath, "/")).href;
694
695
  },
695
696
  getFile: (name, file) => {
696
697
  const linkPath = moduleConfig.links[name].server;
697
698
  const realPath = fs.realpathSync(linkPath);
698
- return path.resolve(realPath, file);
699
+ return pathToFileURL(path.resolve(realPath, file)).href;
699
700
  }
700
701
  });
701
702
  break;
package/package.json CHANGED
@@ -59,7 +59,7 @@
59
59
  "build": "unbuild"
60
60
  },
61
61
  "dependencies": {
62
- "@esmx/import": "3.0.0-rc.44",
62
+ "@esmx/import": "3.0.0-rc.45",
63
63
  "@types/serialize-javascript": "^5.0.4",
64
64
  "es-module-lexer": "^1.7.0",
65
65
  "find": "^0.3.0",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@biomejs/biome": "1.9.4",
71
- "@esmx/lint": "3.0.0-rc.44",
71
+ "@esmx/lint": "3.0.0-rc.45",
72
72
  "@types/find": "^0.2.4",
73
73
  "@types/node": "^24.0.0",
74
74
  "@types/send": "^0.17.4",
@@ -79,7 +79,7 @@
79
79
  "unbuild": "3.5.0",
80
80
  "vitest": "3.2.4"
81
81
  },
82
- "version": "3.0.0-rc.44",
82
+ "version": "3.0.0-rc.45",
83
83
  "type": "module",
84
84
  "private": false,
85
85
  "exports": {
@@ -102,5 +102,5 @@
102
102
  "template",
103
103
  "public"
104
104
  ],
105
- "gitHead": "c83ac6a9b183e5f1a98884d9ae18ff99aacf1a54"
105
+ "gitHead": "c1e2c9bf24c9321b06e63a08e8bfc4953c834aef"
106
106
  }
package/src/core.ts CHANGED
@@ -3,6 +3,7 @@ import fs from 'node:fs';
3
3
  import fsp from 'node:fs/promises';
4
4
  import path from 'node:path';
5
5
  import { cwd } from 'node:process';
6
+ import { pathToFileURL } from 'node:url';
6
7
  import type { ImportMap, ScopesMap, SpecifierMap } from '@esmx/import';
7
8
 
8
9
  import serialize from 'serialize-javascript';
@@ -872,7 +873,7 @@ export class Esmx {
872
873
  // because the actual accessed paths are real physical paths, not the symbolic links.
873
874
  // Using realpathSync ensures path consistency between import map generation and runtime resolution.
874
875
  const realPath = fs.realpathSync(linkPath);
875
- return path.join(realPath, '/');
876
+ return pathToFileURL(path.join(realPath, '/')).href;
876
877
  },
877
878
  getFile: (name: string, file: string) => {
878
879
  const linkPath = moduleConfig.links[name].server;
@@ -880,7 +881,8 @@ export class Esmx {
880
881
  // This is crucial to maintain consistency with getScope function
881
882
  // and ensure proper module resolution at runtime
882
883
  const realPath = fs.realpathSync(linkPath);
883
- return path.resolve(realPath, file);
884
+ return pathToFileURL(path.resolve(realPath, file))
885
+ .href;
884
886
  }
885
887
  });
886
888
  break;