@sap-ux/project-access 2.0.0 → 2.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.
@@ -5,6 +5,7 @@ import { createRequire } from 'node:module';
5
5
  import { getNodeModulesPath } from './dependencies.js';
6
6
  import { FileName, moduleCacheRoot } from '../constants.js';
7
7
  import { execNpmCommand } from '../command/index.js';
8
+ import { pathToFileURL } from 'node:url';
8
9
  const require = createRequire(import.meta.url);
9
10
  /**
10
11
  * Get the module path from project or app. Throws error if module is not installed.
@@ -36,7 +37,7 @@ export async function loadModuleFromProject(projectRoot, moduleName) {
36
37
  let module;
37
38
  try {
38
39
  const modulePath = await getModulePath(projectRoot, moduleName);
39
- module = (await import(modulePath));
40
+ module = (await import(pathToFileURL(modulePath).href));
40
41
  }
41
42
  catch (error) {
42
43
  throw Error(`Module '${moduleName}' not installed in project '${projectRoot}'.\n${error.toString()}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "type": "module",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "mem-fs-editor": "9.4.0",
32
32
  "semver": "7.7.4",
33
33
  "@sap-ux/i18n": "1.0.0",
34
- "@sap-ux/ui5-config": "1.0.0"
34
+ "@sap-ux/ui5-config": "1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@jest/globals": "30.3.0",