Skip to content

Commit 122bb64

Browse files
committedApr 14, 2023
[Refactor] deprecated lib/core.js now uses data from is-core-module also
1 parent c2f9ce2 commit 122bb64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎lib/core.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
'use strict';
22

33
var isCoreModule = require('is-core-module');
4-
var data = require('./core.json');
4+
var path = require('path');
5+
var fs = require('fs');
6+
var data = JSON.parse(String(fs.readFileSync(path.join(path.dirname(require.resolve('is-core-module/package.json')), 'core.json'))));
57

68
var core = {};
79
for (var mod in data) { // eslint-disable-line no-restricted-syntax

0 commit comments

Comments
 (0)
Please sign in to comment.