Skip to content

Commit e696d00

Browse files
elastic-renovate-prod[bot]tsullivankowalczyk-krzysztof
authored
Update dependency rison-node to v2 (main) (elastic#219596)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rison-node](https://redirect.github.com/w33ble/rison-node) | dependencies | major | [`1.0.2` -> `2.1.1`](https://renovatebot.com/diffs/npm/rison-node/1.0.2/2.1.1) | --- ### Release Notes <details> <summary>w33ble/rison-node (rison-node)</summary> ### [`v2.1.1`](https://redirect.github.com/w33ble/rison-node/blob/HEAD/CHANGELOG.md#v211-4-June-2020) [Compare Source](https://redirect.github.com/w33ble/rison-node/compare/v2.1.0...v2.1.1) - fix: handle keys that start with numbers [`f0e10e3`](https://redirect.github.com/w33ble/rison-node/commit/f0e10e377bc328bfeb82e74c6498394612e6e4e6) ### [`v2.1.0`](https://redirect.github.com/w33ble/rison-node/blob/HEAD/CHANGELOG.md#v210-1-November-2018) [Compare Source](https://redirect.github.com/w33ble/rison-node/compare/v2.0.0...v2.1.0) - feat: add decode_uri method [`#2`](https://redirect.github.com/w33ble/rison-node/pull/2) - feat: add rison.unquote, use in decode_uri [`41ba487`](https://redirect.github.com/w33ble/rison-node/commit/41ba487d05ba623ce8bcde5da96517df61e2e7ff) - v2.1.0 [`71c9910`](https://redirect.github.com/w33ble/rison-node/commit/71c991021497c9ad229b289b6a4bd72672855c50) ### [`v2.0.0`](https://redirect.github.com/w33ble/rison-node/blob/HEAD/CHANGELOG.md#v200-30-April-2018) [Compare Source](https://redirect.github.com/w33ble/rison-node/compare/v1.0.2...v2.0.0) - v2.0.0 [`409eede`](https://redirect.github.com/w33ble/rison-node/commit/409eedecda2ced49f31c57bfe250ddefd24b5cfe) - **Breaking:** feat: prevent quoting numeric keys [`01e2be2`](https://redirect.github.com/w33ble/rison-node/commit/01e2be2fb546fdeea9f68cd5fd9087660cc1802c) ##### [v1.0.2](https://redirect.github.com/w33ble/rison-node/compare/v1.0.1...v1.0.2) (17 April 2018) - docs: proper fork, update repo, add badges [`667fc6c`](https://redirect.github.com/w33ble/rison-node/commit/667fc6cd6a3ef4022228dd5de6f1d8a28b153eba) - 1.0.2 [`41f1f52`](https://redirect.github.com/w33ble/rison-node/commit/41f1f528c4102553fa55d3a7ee54ba5b1f312eeb) ##### [v1.0.1](https://redirect.github.com/w33ble/rison-node/compare/v1.0.0...v1.0.1) (17 April 2018) - 1.0.1 [`df44524`](https://redirect.github.com/w33ble/rison-node/commit/df44524cc91690a4f1bd425ae434c6cc7e3fb6e0) - docs: update readme [`09bbabf`](https://redirect.github.com/w33ble/rison-node/commit/09bbabf3959d77bf26caa84f7221b3625992d27c) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlNoYXJlZFVYIiwiYmFja3BvcnQ6YWxsLW9wZW4iLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==--> --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com> Co-authored-by: Timothy Sullivan <tsullivan@elastic.co> Co-authored-by: Krzysztof Kowalczyk <krzysztof.kowalczyk@elastic.co>
1 parent d015c15 commit e696d00

3 files changed

Lines changed: 29 additions & 10 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@
13741374
"remark-stringify": "^8.0.3",
13751375
"require-in-the-middle": "^7.5.2",
13761376
"reselect": "^4.1.8",
1377-
"rison-node": "1.0.2",
1377+
"rison-node": "2.1.1",
13781378
"rxjs": "^7.8.2",
13791379
"safe-squel": "^5.12.5",
13801380
"seedrandom": "^3.0.5",

x-pack/platform/plugins/shared/maps/public/classes/sources/es_search_source/es_search_source.test.ts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ import { APP_ID, ES_GEO_FIELD_TYPE, SCALING_TYPES } from '../../../../common/con
1010
jest.mock('../../../kibana_services');
1111
jest.mock('./util/load_index_settings');
1212

13-
import { getIndexPatternService, getSearchService, getHttp } from '../../../kibana_services';
1413
import type { SearchSource } from '@kbn/data-plugin/public';
14+
import { decode } from '@kbn/rison';
15+
import { getHttp, getIndexPatternService, getSearchService } from '../../../kibana_services';
1516

1617
import { loadIndexSettings } from './util/load_index_settings';
1718

18-
import { ESSearchSource } from './es_search_source';
1919
import type { VectorSourceRequestMeta } from '../../../../common/descriptor_types';
20+
import { ESSearchSource } from './es_search_source';
2021

2122
const mockDescriptor = { indexPatternId: 'foo', geoField: 'bar' };
2223

@@ -132,15 +133,33 @@ describe('ESSearchSource', () => {
132133
expect(urlParts[0]).toEqual('rootdir/internal/maps/mvt/getTile/{z}/{x}/{y}.pbf');
133134

134135
const params = new URLSearchParams(urlParts[1]);
135-
expect(Object.fromEntries(params)).toEqual({
136+
137+
expect(Object.fromEntries(params)).toMatchObject({
136138
buffer: '5',
137139
geometryFieldName: 'bar',
138140
hasLabels: 'false',
139141
index: 'foobar-title-*',
140-
requestBody:
141-
"(fields:('0':('0':index,'1':(fields:(),title:'foobar-title-*')),'1':('0':size,'1':1000),'2':('0':filter,'1':!()),'3':('0':query),'4':('0':index,'1':(fields:(),title:'foobar-title-*')),'5':('0':query,'1':(language:KQL,query:'tooltipField: foobar')),'6':('0':fieldsFromSource,'1':!(_id)),'7':('0':source,'1':!f),'8':('0':fields,'1':!(tooltipField,styleField)),'9':('0':filter,'1':!((meta:(),query:(exists:(field:bar)))))))",
142+
requestBody: expect.any(String),
142143
token: '1234',
143144
});
145+
146+
// Verify requestBody data after decoding from Rison
147+
const requestBody = params.get('requestBody');
148+
const requestBodyDecoded = requestBody ? decode(requestBody) : {};
149+
expect(requestBodyDecoded).toEqual({
150+
fields: {
151+
'0': { '0': 'index', '1': { fields: {}, title: 'foobar-title-*' } },
152+
'1': { '0': 'size', '1': 1000 },
153+
'2': { '0': 'filter', '1': [] },
154+
'3': { '0': 'query' },
155+
'4': { '0': 'index', '1': { fields: {}, title: 'foobar-title-*' } },
156+
'5': { '0': 'query', '1': { language: 'KQL', query: 'tooltipField: foobar' } },
157+
'6': { '0': 'fieldsFromSource', '1': ['_id'] },
158+
'7': { '0': 'source', '1': false },
159+
'8': { '0': 'fields', '1': ['tooltipField', 'styleField'] },
160+
'9': { '0': 'filter', '1': [{ meta: {}, query: { exists: { field: 'bar' } } }] },
161+
},
162+
});
144163
});
145164

146165
it('should include executionContextId when provided', async () => {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29479,10 +29479,10 @@ ripemd160@=2.0.1, ripemd160@^2.0.0, ripemd160@^2.0.1:
2947929479
hash-base "^2.0.0"
2948029480
inherits "^2.0.1"
2948129481

29482-
rison-node@1.0.2:
29483-
version "1.0.2"
29484-
resolved "https://registry.yarnpkg.com/rison-node/-/rison-node-1.0.2.tgz#b7b5f37f39f5ae2a51a973a33c9aa17239a33e4b"
29485-
integrity sha1-t7Xzfzn1ripRqXOjPJqhcjmjPks=
29482+
rison-node@2.1.1:
29483+
version "2.1.1"
29484+
resolved "https://registry.yarnpkg.com/rison-node/-/rison-node-2.1.1.tgz#3db68c6a736442a5494826f86fc8d675933934a5"
29485+
integrity sha512-GuV0OnSL2erZJ0j/9YUsrAdfSh3mGcrq+4wM4PqRftOYT7+TRhxbMrpVZaGC5YIPwncIoOM7PPnskDku5Ywg1Q==
2948629486

2948729487
robots-parser@^3.0.1:
2948829488
version "3.0.1"

0 commit comments

Comments
 (0)