@eventcatalog/core 2.8.8 → 2.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 4e0823d: fix(core): fixed issue with importing users package json files
8
+
3
9
  ## 2.8.8
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.8.8",
9
+ "version": "2.8.9",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -17,8 +17,10 @@ export const getEventCatalogConfigFile = async (projectDirectory) => {
17
17
  try {
18
18
  let configFilePath = path.join(projectDirectory, 'eventcatalog.config.js');
19
19
 
20
- const packageJson = await import(/* @vite-ignore */ path.join(projectDirectory, 'package.json'));
21
- if (packageJson.default?.type !== 'module') {
20
+ const filePath = path.join(projectDirectory, 'package.json');
21
+ const packageJson = JSON.parse(await readFile(filePath, 'utf-8'));
22
+
23
+ if (packageJson?.type !== 'module') {
22
24
  await copyFile(configFilePath, path.join(tmpdir(), 'eventcatalog.config.mjs'));
23
25
  configFilePath = path.join(tmpdir(), 'eventcatalog.config.mjs');
24
26
  }