Skip to content

Commit

Permalink
Merge pull request #96 from chohner/fix_exports_methods
Browse files Browse the repository at this point in the history
fix: methods from exports instead of global this
  • Loading branch information
RSeidelsohn authored Sep 25, 2023
2 parents a43c400 + 7d25eb8 commit 742c876
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ exports.init = function init(args, callback) {

// customPath is a path to a JSON file that defined a custom format
if (args.customPath) {
args.customFormat = this.parseJson(args.customPath);
args.customFormat = exports.parseJson(args.customPath);
}

const optionsForReadingInstalledPackages = {
Expand Down Expand Up @@ -395,7 +395,7 @@ exports.init = function init(args, callback) {
// An object mapping from Package name -> What contents it should have
let clarifications = {};
if (args.clarificationsFile) {
clarifications = this.parseJson(args.clarificationsFile);
clarifications = exports.parseJson(args.clarificationsFile);
}

if (checker && pusher) {
Expand Down Expand Up @@ -728,7 +728,7 @@ exports.init = function init(args, callback) {
inputError = err;
} else {
// Output to files, if necessary
this.writeOutput(args, resultJson);
exports.writeOutput(args, resultJson);
}

// Return the callback and variables nicely
Expand Down Expand Up @@ -917,7 +917,7 @@ exports.writeOutput = function (parsedArgs, foundLicensesJson) {
const formattedOutput = licenseCheckerHelpers.getFormattedOutput(foundLicensesJson, parsedArgs);

if (parsedArgs.files) {
this.asFiles(foundLicensesJson, parsedArgs.files);
exports.asFiles(foundLicensesJson, parsedArgs.files);
}

if (parsedArgs.out) {
Expand Down

0 comments on commit 742c876

Please sign in to comment.