-
Notifications
You must be signed in to change notification settings - Fork 20
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: add jest watch typeahead plugin #143
Conversation
package.json
Outdated
@@ -55,6 +55,7 @@ | |||
"instantsearch.js": "2.10.5", | |||
"jest": "24.8.0", | |||
"jest-localstorage-mock": "2.4.0", | |||
"jest-watch-typeahead": "^0.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be pinned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not used to it, so I keep forgetting it 😅 Thanks for pointing it out!
Btw, is this guide aligned to what you do?
- Any apps (web or node.js) that aren't require()'d by other packages should pin all types of dependencies for greatest reliability/predictability.
- Browser or dual browser/node.js libraries that are consumed/required()'d by others should keep using semver ranges for dependencies but can use pinned dependencies for devDependencies.
- Node.js-only libraries can consider pinning all dependencies, because application size/duplicate dependencies are not as much a concern in node.js compared to the browser. Of course, don't do that if your library is a micro one likely to be consumed in disk-sensitive environments.
from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! We follow these rules in our Renovate configuration. It's better to always pin dev dependencies so that every collaborator has exactly the same environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the confirmation!
I wish to have some repo-level configuration which automatically adds --exact
when I add devDepencency.
I googled but couldn't find any. I will try not to forget :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @eunjae-lee
As françois mentionned, it's best to pin the dependency for consistency but otherwise, cool addition!
Thanks! Just did ;) 93a24e9 |
* chore: add jest watch typeahead plugin * chore: pin dependency
* fix(compat): disable anonymous tracking on env without cookies * chore: move supportsCookies to featureDetection * chore: process queue only on browser * chore: throw when user token is not set * chore: add jest watch typeahead plugin (#143) * chore: add jest watch typeahead plugin * chore: pin dependency * chore: add __BROWSER_BUILD__ instead of process.maybeNode * chore: add __BROWSER_BUILD__ condition * chore: fix broken test * chore: remove __BROWSER_BUILD__ * chore: process queue only on browser build * fix: process queue inside browser module * chore: fix test cases * chore: update travis config regarding xvfb (#144) * chore: rename getAa to getFuctionalInterface * chore: remove the duplicates * fix: remove useless argument * chore: move getInsatnceXX functions to _instance * fix(compat): node compatibility [PART-3] (#142) * chore: add util functions and tests * chore: add request function which wraps sendBeacon, xhr and node http * chore: apply feedback Co-Authored-By: Youcef Mammar <[email protected]> * chore: apply feedbacks Co-Authored-By: Youcef Mammar <[email protected]> * chore: require http/https dynamically to clean browser build * chore: remove node http related code from browser build * chore: remove __BROWSER_BUILD__ * chore: fix tests for sendEvent in node * fix: pass requestFn to AlgoliaAnalytics * chore: remove _instance and use AlgoliaAnalytics instead * chore: split getRequester * fix: change parameters of request for node 8.x node 8.x and 10.x have different signautures for 'request' function. - node 8.x: https://nodejs.org/docs/latest-v8.x/api/https.html#https_https_request_options_callback - node 10.x: https://nodejs.org/dist/latest-v10.x/docs/api/https.html#https_https_request_options_callback * fix: allow userToken in event payload * fix: remove the duplicated assignment
* chore: configure rollup to generate two builds * chore: remove unused option (browser) from rollup config * chore: add process.maybeNode * chore: add __BROWSER_BUILD__ instead of process.maybeNode * chore: make two entries * chore: export aa function in node build * chore: instantiate AlgoliaInsights every time in tests * chore: rename entry files * chore: use top-level beforeEach * chore: rename getAa to getFuctionalInterface * fix(compat): node compatibility [PART-2] (#141) * fix(compat): disable anonymous tracking on env without cookies * chore: move supportsCookies to featureDetection * chore: process queue only on browser * chore: throw when user token is not set * chore: add jest watch typeahead plugin (#143) * chore: add jest watch typeahead plugin * chore: pin dependency * chore: add __BROWSER_BUILD__ instead of process.maybeNode * chore: add __BROWSER_BUILD__ condition * chore: fix broken test * chore: remove __BROWSER_BUILD__ * chore: process queue only on browser build * fix: process queue inside browser module * chore: fix test cases * chore: update travis config regarding xvfb (#144) * chore: rename getAa to getFuctionalInterface * chore: remove the duplicates * fix: remove useless argument * chore: move getInsatnceXX functions to _instance * fix(compat): node compatibility [PART-3] (#142) * chore: add util functions and tests * chore: add request function which wraps sendBeacon, xhr and node http * chore: apply feedback Co-Authored-By: Youcef Mammar <[email protected]> * chore: apply feedbacks Co-Authored-By: Youcef Mammar <[email protected]> * chore: require http/https dynamically to clean browser build * chore: remove node http related code from browser build * chore: remove __BROWSER_BUILD__ * chore: fix tests for sendEvent in node * fix: pass requestFn to AlgoliaAnalytics * chore: remove _instance and use AlgoliaAnalytics instead * chore: split getRequester * fix: change parameters of request for node 8.x node 8.x and 10.x have different signautures for 'request' function. - node 8.x: https://nodejs.org/docs/latest-v8.x/api/https.html#https_https_request_options_callback - node 10.x: https://nodejs.org/dist/latest-v10.x/docs/api/https.html#https_https_request_options_callback * fix: allow userToken in event payload * fix: remove the duplicated assignment * fix: check userToken for only undefined * chore: rename AlgoliaInsights with analyticsInstance in test cases * fix: add `new` at `TypeError`s Co-Authored-By: Haroen Viaene <[email protected]> * chore: apply suggestions from code review Co-Authored-By: Haroen Viaene <[email protected]> * fix: update inline snapshot of test case * fix: add `new` at `TypeError`s * chore: inline AlgoliaAnalyticsOptions type * chore: use `isUndefined` helper * fix: throw when userToken is an empty string * fix: improve test case * fix: split a test case * chore: update feedback from review Co-Authored-By: Youcef Mammar <[email protected]>
* docs(readme): update documentation (#153) * docs(readme): update documentation * docs(migration): add migration file * chore(package): update description * docs(readme): fix license link (#154) * chore(deps): update dependency html-webpack-plugin to v3 (#85) * chore(deps): update dependency @types/jest to v24.0.18 (#147) * chore(deps): update dependency dotenv to v8.1.0 (#152) * chore(deps): update dependency jest to v24.9.0 (#150) * chore(deps): update node.js to v8.16.1 (#151) * chore(deps): update dependency puppeteer to v1.19.0 (#124) * docs(readme): convert `positions` to numbers (#156) * fix(compat): node compatibility (#140) * chore: configure rollup to generate two builds * chore: remove unused option (browser) from rollup config * chore: add process.maybeNode * chore: add __BROWSER_BUILD__ instead of process.maybeNode * chore: make two entries * chore: export aa function in node build * chore: instantiate AlgoliaInsights every time in tests * chore: rename entry files * chore: use top-level beforeEach * chore: rename getAa to getFuctionalInterface * fix(compat): node compatibility [PART-2] (#141) * fix(compat): disable anonymous tracking on env without cookies * chore: move supportsCookies to featureDetection * chore: process queue only on browser * chore: throw when user token is not set * chore: add jest watch typeahead plugin (#143) * chore: add jest watch typeahead plugin * chore: pin dependency * chore: add __BROWSER_BUILD__ instead of process.maybeNode * chore: add __BROWSER_BUILD__ condition * chore: fix broken test * chore: remove __BROWSER_BUILD__ * chore: process queue only on browser build * fix: process queue inside browser module * chore: fix test cases * chore: update travis config regarding xvfb (#144) * chore: rename getAa to getFuctionalInterface * chore: remove the duplicates * fix: remove useless argument * chore: move getInsatnceXX functions to _instance * fix(compat): node compatibility [PART-3] (#142) * chore: add util functions and tests * chore: add request function which wraps sendBeacon, xhr and node http * chore: apply feedback Co-Authored-By: Youcef Mammar <[email protected]> * chore: apply feedbacks Co-Authored-By: Youcef Mammar <[email protected]> * chore: require http/https dynamically to clean browser build * chore: remove node http related code from browser build * chore: remove __BROWSER_BUILD__ * chore: fix tests for sendEvent in node * fix: pass requestFn to AlgoliaAnalytics * chore: remove _instance and use AlgoliaAnalytics instead * chore: split getRequester * fix: change parameters of request for node 8.x node 8.x and 10.x have different signautures for 'request' function. - node 8.x: https://nodejs.org/docs/latest-v8.x/api/https.html#https_https_request_options_callback - node 10.x: https://nodejs.org/dist/latest-v10.x/docs/api/https.html#https_https_request_options_callback * fix: allow userToken in event payload * fix: remove the duplicated assignment * fix: check userToken for only undefined * chore: rename AlgoliaInsights with analyticsInstance in test cases * fix: add `new` at `TypeError`s Co-Authored-By: Haroen Viaene <[email protected]> * chore: apply suggestions from code review Co-Authored-By: Haroen Viaene <[email protected]> * fix: update inline snapshot of test case * fix: add `new` at `TypeError`s * chore: inline AlgoliaAnalyticsOptions type * chore: use `isUndefined` helper * fix: throw when userToken is an empty string * fix: improve test case * fix: split a test case * chore: update feedback from review Co-Authored-By: Youcef Mammar <[email protected]> * docs: add a section for Node.js module (#145) * docs: add a section for node module * docs: add TOC * docs: apply feedbacks Co-Authored-By: Youcef Mammar <[email protected]> * docs: move Node.js part under getting started * docs: update setUserToken part * docs: apply changes again * docs: apply suggestions from code review Co-Authored-By: François Chalifour <[email protected]> * docs: apply feedbacks * docs: update TOC * chore: update version
This PR adds typeahead plugin to jest.