@serenity-js/rest 3.0.0-rc.15 → 3.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/lib/model/HTTPRequest.js +1 -1
- package/lib/model/HTTPRequest.js.map +1 -1
- package/package.json +4 -4
- package/src/model/HTTPRequest.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
7
11
|
|
|
8
12
|
|
|
@@ -100,6 +104,10 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
100
104
|
|
|
101
105
|
|
|
102
106
|
|
|
107
|
+
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
103
111
|
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
104
112
|
|
|
105
113
|
|
|
@@ -190,6 +198,110 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
190
198
|
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
191
199
|
|
|
192
200
|
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
### Features
|
|
236
|
+
|
|
237
|
+
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### Bug Fixes
|
|
253
|
+
|
|
254
|
+
* **core:** you can now retrieve the .length property of an Array wrapped in an Adapter<Array> ([c36e210](https://github.com/serenity-js/serenity-js/commit/c36e210c024052b96ba47e9663c7098e269c5688))
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Bug Fixes
|
|
262
|
+
|
|
263
|
+
* **rest:** corrected LastResponse to wrap .status(), .body(), .header() and .headers() in Adapters ([aab8e93](https://github.com/serenity-js/serenity-js/commit/aab8e93a19005710d9f333756cdae5aa21c31058)), closes [#1082](https://github.com/serenity-js/serenity-js/issues/1082)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
### Bug Fixes
|
|
279
|
+
|
|
280
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Features
|
|
284
|
+
|
|
285
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
### BREAKING CHANGES
|
|
289
|
+
|
|
290
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
291
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## [2.33.6](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v2.33.6) (2022-04-15)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Bug Fixes
|
|
298
|
+
|
|
299
|
+
* **rest:** Allow disabling maxRedirects. Closes [#1181](https://github.com/serenity-js/serenity-js/issues/1181) ([e819409](https://github.com/serenity-js/serenity-js/commit/e81940946adb6e67948ea2591023cb16e178b94c))
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
193
305
|
## [2.33.5](https://github.com/serenity-js/serenity-js/compare/v2.33.4...v2.33.5) (2022-04-08)
|
|
194
306
|
|
|
195
307
|
**Note:** Version bump only for package @serenity-js/rest
|
package/lib/model/HTTPRequest.js
CHANGED
|
@@ -49,7 +49,7 @@ class HTTPRequest extends core_1.Question {
|
|
|
49
49
|
then(config =>
|
|
50
50
|
// eslint-disable-next-line unicorn/prefer-object-from-entries
|
|
51
51
|
Object.keys(config).reduce((acc, key) => {
|
|
52
|
-
if (config[key]) {
|
|
52
|
+
if (config[key] !== null && config[key] !== undefined) {
|
|
53
53
|
acc[key] = config[key];
|
|
54
54
|
}
|
|
55
55
|
return acc;
|
|
@@ -1 +1 @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AAC,IAAI,CAAC,CAAC,CAAC,GAAI,IAAK,MAAO,UAAU,CAAC;IAC9E,CAAC;CACJ;AA7FD,kCA6FC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/rest",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.16",
|
|
4
4
|
"description": "Test REST APIs with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"npm": "^6 || ^7 || ^8"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
51
|
+
"@serenity-js/core": "3.0.0-rc.16",
|
|
52
52
|
"axios": "^0.21.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@documentation/esdoc-template": "3.0.0",
|
|
56
56
|
"@integration/testing-tools": "3.0.0",
|
|
57
|
-
"@serenity-js/assertions": "3.0.0-rc.
|
|
57
|
+
"@serenity-js/assertions": "3.0.0-rc.16",
|
|
58
58
|
"@types/chai": "^4.3.0",
|
|
59
59
|
"@types/mocha": "^9.1.0",
|
|
60
60
|
"axios-mock-adapter": "^1.20.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"ts-node": "^10.7.0",
|
|
63
63
|
"typescript": "^4.6.3"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "636519a30032f1ff9a3fcba8c45433ca0e17fc7f"
|
|
66
66
|
}
|
package/src/model/HTTPRequest.ts
CHANGED
|
@@ -61,7 +61,7 @@ export abstract class HTTPRequest extends Question<Promise<AxiosRequestConfig>>
|
|
|
61
61
|
then(config =>
|
|
62
62
|
// eslint-disable-next-line unicorn/prefer-object-from-entries
|
|
63
63
|
Object.keys(config).reduce((acc, key) => {
|
|
64
|
-
if (config[key]) {
|
|
64
|
+
if (config[key] !== null && config[key] !== undefined ) {
|
|
65
65
|
acc[key] = config[key];
|
|
66
66
|
}
|
|
67
67
|
return acc;
|