Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(restructure): Project restructuring and improvements. #15

Merged
merged 3 commits into from
Dec 10, 2018

Conversation

quinnturner
Copy link
Member

@quinnturner quinnturner commented Dec 6, 2018

Separated yargs code and the auditing. This will support testing.

Removed babel as a dependency to reduce overhead.

NPM package uses lib folder instead of index.js.

bin/audit-ci references lib/audit-ci.js.

Audit rejections return Error. Audit passes return the report.

Use console.log and console.error instead of process.stdout.write.

Added colour to output where appropriate.

Added lint test for Travis-CI and CircleCI.

Added node 10 to build for Travis-CI.

Updated package.json version to 1.1.0 (this may be bad practice to change in a PR, will not do this in the future).

Set the project's dependencies to be a static version to minimize the risk of introducing new vulnerabilities due to a hacked package version bump.

Supports issues: #4, #5.

Replaces PR: #14.

Signed-off-by: Quinn Turner quinn.turner@ibm.com

lib/audit-ci-reporter.js Outdated Show resolved Hide resolved
@quinnturner
Copy link
Member Author

@andy-patt A few things were changed from the previous PR that you accepted:

  1. console.log and console.error with colouring instead of process.stdout.write
  2. Return after rejections:
    if (stderr) {
      callback(new Error(stderr), null);
      return;
    }
    
    and
    if (err) {
      reject(err);
      return;
    }
    
  3. Rejections always return an Error rather than a sometimes an Error and sometimes a string
  4. The final messages (pass and fail + Exiting...) got moved to audit-ci.js.
  5. ESLint max-len was disabled for audit-ci-reporter.js for the JSDoc
  6. Added JSDoc to the exported function audit

Quinn Turner added 2 commits December 6, 2018 13:07
Separated yargs code and the auditing. This will support testing.

Removed babel as a dependency to reduce overhead.

NPM package uses `lib` folder instead of index.js.

bin/audit-ci references lib/audit-ci.js

Audit rejections return `Error`. Audit passes return the report.

Use console.log and console.error instead of process.stdout.write

Added colour to output where appropriate.

Added lint test for Travis-CI and CircleCI.

Signed-off-by: Quinn Turner <quinn.turner@ibm.com>
Removed JSDocs that were not on exported functions.
@quinnturner quinnturner mentioned this pull request Dec 9, 2018
@quinnturner quinnturner merged commit 147ed78 into master Dec 10, 2018
@quinnturner quinnturner deleted the feat/restructure branch December 10, 2018 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants