-
Notifications
You must be signed in to change notification settings - Fork 17
Release 7.3.0 #533
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
Merged
Merged
Release 7.3.0 #533
Conversation
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
Fix a bug while constructing query strings. The string interpolation ${key}:${value} gave as value [Object object] as string for nested objects instead of stringifying the whole object. How should this be manually tested? unit tests Other changes Refresh collection before execution of deleteByQuery snippet code Rename the tests scripts in package.json to make them match the kuzzle ones Fix eslint version for the documentation CI
## What does this PR do? This PR adds `document:updateByQuery` to the sdk Issue #518
## What does this PR do? [Jira ticket](https://jira.kaliop.net/browse/KZL-1493) This PR provides the possibility to execute a `document:search` with the GET http verb ### How should this be manually tested? Create a `nyc-open-data' index` and `yellow-taxi` collection. Create some files with 2 containing field `{name:"ok"}` Execute this code Remove the `verb` option and/or change it to `POST` and re-execute the code By default, `document:search` is still POST ```js const { Kuzzle, Http } = require('kuzzle-sdk'); const kuzzle = new Kuzzle( new Http(`localhost`, { port: 7512}) ); async function main () { try { await kuzzle.connect(); const response = await kuzzle.document.search( 'nyc-open-data', 'yellow-taxi', { query:{ term: { name: 'ok' } } },{verb: 'GET'} ); console.log(`Successfully get ${response.total} documents`); } catch (error) { console.error(error); } } main() ``` ### Other changes update Mocha to [7.2.0](https://github.com/mochajs/mocha/releases/tag/v7.2.0) update codecov to 3.7.0 ### Boyscout Removes an unused url who was in conflict with `collection:update` url Fix eslint version for the documentation CI
## What does this PR do? This PR adds `collection:update` to the sdk and deprecates the older `collection:updateMapping`. ### How should this be manually tested? Create an index/collection and update its mapping by calling the `collection:update` method Tests
Co-authored-by: Adrien Maret <amaret93@gmail.com>
Add bulk:deleteByQuery
## What does this PR do? Use `Reflect` to hide the kuzzle object from log ### Other changes - Get ride of every `delete` keyword and use `Map` for RAM caches - Do not throw custom error when unsubscribing from unknown room (let Kuzzle trigger it's own documented error) - Allows to pass `_id` to `realtime.publish`
## What does this PR do? Implements support for the newly added **ms:mexecute** ### How should this be manually tested? ``` const actions = [ { 'action': 'set', 'args': { '_id': 'list:a', 'body': { 'value': 1, 'ex': 100, 'nx': true } } }, { 'action': 'get', 'args': { '_id': 'list:a' } }, { 'action': 'del', 'args': { 'body': { 'keys': ['list:a'] } } }]; // Should Print : "[ [ null, 'OK' ], [ null, '1' ], [ null, 1 ] ]" console.log(await kuzzle.ms.mexecute(actions)); ``` ### Boyscout - Applied _one-var_ esrule in the memoryStorage file.
Adds Typescript support for the AuthController. I took the descriptions from the documentation. How should this be manually tested? Build and pack the SDK: npm run build && npm pack Then init a Node project and add this dependency: { ... "dependencies": { "kuzzle-sdk": "file:kuzzle-sdk-7.2.0.tgz" } } Then create a test.ts file with the following and try to use the controller (just for the auto-completion)
# Description When using the HTTP protocol, URI parameters are sent as-is by the SDK, which leads to invalid URLs sent when parameters contain reserved or unicode characters. # Changes * Encode URI keys and values when adding them in the URI * Encode values when replacing URI placeholders # Other changes * Fix an incorrect module exports (e.g. "KuzzleEventEmitter" and other modules were exposed as subobjects) * The `npm run test` script was outdated: it now uses the renamed npm scripts (i.e. test:* scripts) * The `DocumentSearchResult` class was renamed `DocumentsSearchResult`, which _might_ be considered a breaking change (and is inconsistent with other *SearchResult object names anyway)
Codecov Report
@@ Coverage Diff @@
## master #533 +/- ##
=========================================
Coverage ? 91.14%
=========================================
Files ? 32
Lines ? 1389
Branches ? 129
=========================================
Hits ? 1266
Misses ? 98
Partials ? 25
Continue to review full report at Codecov.
|
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.
7.3.0 (2020-07-23)
Bug fixes
New features
Enhancements