feat: adding linter for commits
This commit is contained in:
22
node_modules/ts-node/dist-raw/node-internal-fs.js
generated
vendored
Normal file
22
node_modules/ts-node/dist-raw/node-internal-fs.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
const fs = require('fs');
|
||||
|
||||
// In node's core, this is implemented in C
|
||||
// https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985
|
||||
function internalModuleReadJSON(path) {
|
||||
let string
|
||||
try {
|
||||
string = fs.readFileSync(path, 'utf8')
|
||||
} catch (e) {
|
||||
if (e.code === 'ENOENT') return []
|
||||
throw e
|
||||
}
|
||||
// Node's implementation checks for the presence of relevant keys: main, name, type, exports, imports
|
||||
// Node does this for performance to skip unnecessary parsing.
|
||||
// This would slow us down and, based on our usage, we can skip it.
|
||||
const containsKeys = true
|
||||
return [string, containsKeys]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
internalModuleReadJSON
|
||||
};
|
Reference in New Issue
Block a user