fix(publish): Change prepare to prepublishOnly#138
Merged
spencerwilson-optimizely merged 4 commits intomasterfrom Jul 3, 2018
Merged
fix(publish): Change prepare to prepublishOnly#138spencerwilson-optimizely merged 4 commits intomasterfrom
spencerwilson-optimizely merged 4 commits intomasterfrom
Conversation
Contributor
|
Hm I'm not sure what happened here; at the time that I added the "prepare" hook I didn't remove anything; I was just attempting to codify in code what we currently require from users to deploy. So the regression must have come later (or earlier). |
Contributor
Author
|
@tylerbrandt I think this was a regression due to #129. Before that PR, we unconditionally ran unit tests once, and we ran them twice in the case of npms which understand |
tylerbrandt
approved these changes
Jul 3, 2018
Contributor
tylerbrandt
left a comment
There was a problem hiding this comment.
Ok, sounds good. Can you update the summary to remove the misleading stuff?
Contributor
Author
|
Was in the process of doing that, you're just darn fast at reviewing, haha. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
preparehook to a (not-equivalent)prepublishOnly, reducing the number of times unit tests are run inprepare-literate builds by 1.#129 introduced a regression where unit tests stopped being run for Node.js v4 and v6. Prior to that PR, unit tests were run
preparehook): twiceAfter that PR was merged, the number of times unit tests were run in each build went down by 1, for every build. That means v4 and v6 stopped running unit tests altogether.
2faa9c4 fixed the regression by unconditionally running unit tests on all matrix-based builds (and explicitly adding a build to run xbrowser tests). With this, Node.js 8+ builds resumed running unit tests twice (example).
Regarding the
preparehook: npm@4 added thepreparehook with that fires on prepublish and postinstall. This is strange. Why run tests when someone installs the package? They see the mocha output in their shell, which is likely to surprise.This PR stops the unconventional test runs on postinstall.
Test plan
CI.