@idomatic/core 1.0.1 โ†’ 1.0.2

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.
Files changed (2) hide show
  1. package/lib/core.js +7 -3
  2. package/package.json +1 -1
package/lib/core.js CHANGED
@@ -11,7 +11,7 @@ const parserMap = {
11
11
  ".ng.html": "@idomatic/parser-html",
12
12
  };
13
13
 
14
- // ๐Ÿ”ฅ require from the user project root
14
+ // Create a require function relative to the user's project root
15
15
  const requireFromUserProject = createRequire(process.cwd());
16
16
 
17
17
  export async function processFile(filePath, config) {
@@ -24,8 +24,12 @@ export async function processFile(filePath, config) {
24
24
  }
25
25
 
26
26
  try {
27
- const parserPath = requireFromUserProject.resolve(parserPackage);
28
- const parser = await import(parserPath);
27
+ console.log("Process CWD:", process.cwd());
28
+ // Resolve the package path using the user's project root
29
+ const resolvedPath = requireFromUserProject.resolve(parserPackage);
30
+ console.log(`๐Ÿงช Resolved "${parserPackage}" to:`, resolvedPath);
31
+
32
+ const parser = await import(resolvedPath);
29
33
  await parser.default(filePath, config);
30
34
  console.log(`โœ… Updated: ${filePath}`);
31
35
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idomatic/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "idomatic": "./bin/index.js"