-
Notifications
You must be signed in to change notification settings - Fork 90
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
Update Jest #1622
Update Jest #1622
Conversation
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.
Hello @flevi29
Can you fix the style-check
test so that we can merge it?
https://github.com/meilisearch/meilisearch-js/actions/runs/7431299916?pr=1622
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1622 +/- ##
=======================================
Coverage 97.45% 97.45%
=======================================
Files 22 22
Lines 826 826
Branches 109 109
=======================================
Hits 805 805
Misses 20 20
Partials 1 1 ☔ View full report in Codecov by Sentry. |
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.
molto bene!
bors merge
1625: Update version for the next release (v0.37.0) r=brunoocasali a=meili-bot _This PR is auto-generated._ The automated script updates the version of meilisearch-js to a new version: "v0.37.0" 👇 Changelogs --- ## 🚀 Enhancements * Add support for the new setting: `proximityPrecision` (#1619) mdubus ```js client.index('books').getProximityPrecision() client.index('books').updateProximityPrecision('byAttribute') client.index('books').resetProximityPrecision() ``` * Update error inheritance to extend `MeiliSearchError` (#1607) amit-ksh ## 🧪 Experimental enhancement - Hybrid and vector search⚠️ This is about an experimental feature of Meilisearch. Activate the [`vectorStore` experimental feature to use it](https://www.meilisearch.com/docs/reference/api/experimental_features#configure-experimental-features) * Add support for the `embedders` settings (#1623) mdubus ```js client.index('books').getEmbedders() client.index('books').updateEmbedders({ default: { source: 'userProvided', dimensions: 1 }}) client.index('books').resetEmbedders() ``` * Add support for the `hybrid` parameter during search (#1623) mdubus ## ⚙️ Maintenance/misc * Fix test name in error.test.ts (#1609) amit-ksh * Update Jest (#1622) flevi29 Thanks again to amit-ksh, flevi29! 🎉 Co-authored-by: meili-bot <[email protected]>
1611: Add `package.json` `"exports"` field r=curquiza a=flevi29 # Pull Request I am aiming to slowly try to update and simplify this repository, and maybe learn a thing or two along the way. ## What does this PR do? - add `"exports"` field to `package.json` - It is the new way of defining your exported files, instead of just relying on one single [`"main"`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#main) export for Node.js - This way Node.js can conditionally determine which exported file to import based on the fact that `require` or `import` was used, previously Node.js even in ESM mode always imported the commonjs version of this package, but now it can import the ESM version - https://webpack.js.org/guides/package-exports/ - [subpath-exports](https://nodejs.org/docs/latest-v20.x/api/packages.html#subpath-exports) - [conditional-exports](https://nodejs.org/docs/latest-v20.x/api/packages.html#conditional-exports) - add `node:` specifiers to Node.js built-in module imports/requires - add missing ``@types/node`` type definitions development dependency - because older versions of `jest` test runner doesn't support `node:` specifiers, update `jest` (#1622) - ~~because newer versions of `jest` doesn't include anymore `"jest-environment-jsdom"`, add it as development dependency~~ - ~~because newer versions of `jest` simplified snapshots, update them accordingly~~ - ~~this means replacing `Object {` with `{` and `Array [` with `[`~~ > [!CAUTION] > This is a breaking change for anyone who was importing anything other than what we have in the `"exports"` package.json field. From now on only files from the `package.json` `"exports"` field can be imported. ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: F. Levi <[email protected]>
Pull Request
Related issue
Fixes #1621
What does this PR do?
Object {
with{
andArray [
with[
fetch
from newer versions of Node.js, add a global setup script that disables builtinfetch
fetch
breaks a lot of tests, regarding errors, abort, and even objects created byfetch
are different, for instance some arrays no longer returntrue
forexpect.any(Array)
(something to do withinstanceof Array
) (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#description)jasmine
fail()
doesn't work anymore, but it still fails the tests, except with a less convenient error messageReferenceError: fail is not defined
https://jestjs.io/blog/2021/05/25/jest-27#flipping-defaults EDIT: just realized it says here that we can set"testRunner": "jest-jasmine2"
, but I tried it andfail()
is still undefinedPR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!