Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 88a933a

Browse files
committed
read cached compiler directly instead of using originalRequire
1 parent f3f22e9 commit 88a933a

File tree

1 file changed

+3
-3
lines changed
  • packages/compile-solidity/src/compilerSupplier/loadingStrategies

1 file changed

+3
-3
lines changed

packages/compile-solidity/src/compilerSupplier/loadingStrategies/VersionRange.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import debugModule from "debug";
22
const debug = debugModule("compile:compilerSupplier");
33

44
import requireFromString from "require-from-string";
5-
import originalRequire from "original-require";
5+
import fs from "fs";
66

77
// must polyfill AbortController to use axios >=0.20.0, <=0.27.2 on node <= v14.x
88
import "../../polyfill";
@@ -141,9 +141,9 @@ export class VersionRange {
141141
const listeners = observeListeners();
142142
try {
143143
const filePath = this.cache.resolve(fileName);
144-
const soljson = originalRequire(filePath);
144+
const soljson = fs.readFileSync(filePath).toString();
145145
debug("soljson %o", soljson);
146-
return solcWrap(soljson);
146+
return soljson;
147147
} finally {
148148
listeners.cleanup();
149149
}

0 commit comments

Comments
 (0)