Skip to content

Conversation

scottinet
Copy link
Contributor

@scottinet scottinet commented Jul 23, 2020

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
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #532 into 7-dev will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            7-dev     #532      +/-   ##
==========================================
+ Coverage   91.13%   91.14%   +0.01%     
==========================================
  Files          32       32              
  Lines        1387     1389       +2     
  Branches      129      129              
==========================================
+ Hits         1264     1266       +2     
  Misses         98       98              
  Partials       25       25              
Impacted Files Coverage Δ
src/controllers/Document.ts 71.11% <100.00%> (ø)
src/core/searchResult/Document.ts 100.00% <100.00%> (ø)
src/protocols/Http.js 91.19% <100.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3dd7c7e...89b24ac. Read the comment docs.

@scottinet scottinet merged commit 4a04dda into 7-dev Jul 23, 2020
@scottinet scottinet deleted the encode-uri branch July 23, 2020 13:17
@scottinet scottinet mentioned this pull request Jul 23, 2020
scottinet added a commit that referenced this pull request Jul 23, 2020
# [7.3.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.3.0) (2020-07-23)


#### Bug fixes

- [ [#532](#532) ] Encode URI parameters when using the HTTTP protocol   ([scottinet](https://github.com/scottinet))
- [ [#516](#516) ] Fix query string construction   ([Yoann-Abbes](https://github.com/Yoann-Abbes))

#### New features

- [ [#526](#526) ] Add typescript definitions for Auth controller   ([Aschen](https://github.com/Aschen))
- [ [#524](#524) ] Support ms:mexecute   ([Leodau](https://github.com/Leodau))
- [ [#522](#522) ] Add bulk:deleteByQuery   ([Yoann-Abbes](https://github.com/Yoann-Abbes))
- [ [#519](#519) ] Add document:updateByQuery   ([Yoann-Abbes](https://github.com/Yoann-Abbes))

#### Enhancements

- [ [#517](#517) ] Add collection:update and deprecate collection:updateMapping   ([Yoann-Abbes](https://github.com/Yoann-Abbes))
- [ [#514](#514) ] Able to execute document search as GET http method   ([Yoann-Abbes](https://github.com/Yoann-Abbes))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants