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

chore(refactor): refactor exit handler and tests #3482

Merged
merged 1 commit into from Jul 12, 2021

Commits on Jul 12, 2021

  1. chore(refactor): refactor exit handler and tests

     * npm mock logger writes to npm.log.record too now
     * No more extra process.exit from within the process `exit` event handle.
     * No more `exit()` function.  Logic is rolled up into the exit handler.
     * Now there is only an exit handler and an exit event listener.
       `lib/utils/perf.js` was rolled up into npm.js itself.
    
    Unfortunately the tests were written in such a way that any further
    refactoring of the exit handler was going to require also rewriting the
    tests.  Fortunately NOW the tests are interacting with the exit handler
    in a way that shouldn't require them to be rewritten AGAIN if we change
    the internals of the exit handler.
    
    PR-URL: #3482
    Credit: @wraithgar
    Close: #3482
    Reviewed-by: @nlf
    wraithgar committed Jul 12, 2021
    Copy the full SHA
    efc4313 View commit details
    Browse the repository at this point in the history