Skip to content

Commit

Permalink
remove uncompiled regexps.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
schmod committed Sep 7, 2022
1 parent 196ba64 commit 3c20400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
14 changes: 5 additions & 9 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ var yaml = require('yamlparser');
*/

function getKnown() {
const oldSource = fs.readFileSync(path.join(__dirname, './regexps.js'), 'utf8');
if (oldSource.match(/^\/\/ unbuilt/g)) {
return null;
}

var known = new Set();
try {
try {
var known = new Set();
var old = require('./regexps');
for (var type in old) {
if (!old.hasOwnProperty(type)) continue;
Expand All @@ -34,10 +29,11 @@ function getKnown() {
known.add(regex);
}
}
return known;
} catch (e) {
console.warn("Error parsing old regexps.js file. Ignoring and continuing...", e)
if (e.code !== 'ENOENT') console.warn("Error parsing old regexps.js file. Ignoring and continuing...", e)
return null;
}
return known;
}

var known = getKnown();
Expand Down
1 change: 0 additions & 1 deletion lib/regexps.js

This file was deleted.

0 comments on commit 3c20400

Please sign in to comment.