@travetto/registry 4.0.1 → 4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/registry",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Patterns and utilities for handling registration of metadata and functionality for run-time use",
5
5
  "keywords": [
6
6
  "ast-transformations",
@@ -30,7 +30,7 @@
30
30
  "@travetto/base": "^4.0.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/cli": "^4.0.1",
33
+ "@travetto/cli": "^4.0.2",
34
34
  "@travetto/transformer": "^4.0.1"
35
35
  },
36
36
  "peerDependenciesMeta": {
@@ -42,10 +42,11 @@ export class DynamicCommonjsLoader {
42
42
  }
43
43
  }
44
44
 
45
- const fileName = Module._resolveFilename!(request, parent);
45
+ const file = Module._resolveFilename!(request, parent);
46
+ const src = RuntimeIndex.getEntry(file)?.sourceFile;
46
47
  // Only proxy workspace modules
47
- if (RuntimeIndex.getModuleFromSource(fileName)?.workspace) {
48
- return proxyModuleLoad ? proxyModuleLoad(fileName, mod) : mod;
48
+ if (src && RuntimeIndex.getModuleFromSource(src)?.workspace) {
49
+ return proxyModuleLoad ? proxyModuleLoad(file, mod) : mod;
49
50
  } else {
50
51
  return mod;
51
52
  }