patches: drop internalModuleReadJSON hack of v14.16.0 (#122)

Fixes: #118
Needs: vercel/pkg#1059
This commit is contained in:
Jesse Chan 2021-03-24 15:04:14 +08:00 committed by GitHub
parent 90be40b533
commit b4ebfadc8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,7 +273,7 @@ new file mode 100644
const { SafeMap } = primordials;
-const { internalModuleReadJSON } = internalBinding('fs');
+const internalModuleReadJSON = function (f) { let json = require('fs').internalModuleReadJSON(f); return [json, !!json]; };
+const internalModuleReadJSON = function (f) { return require('fs').internalModuleReadJSON(f); };
const { pathToFileURL } = require('url');
const { toNamespacedPath } = require('path');