keq 1.8.7 → 1.8.8
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/.nycrc.yml +4 -2
- package/CHANGELOG.md +7 -0
- package/build/tsconfig.test.json +14 -0
- package/es/src/exception/file-expected.exception.ts +8 -0
- package/es/src/exception/overwrite-array-body.exception.ts +8 -0
- package/es/src/exception/unknown-content-type.exception.ts +8 -0
- package/es/src/util/clone.js +3 -0
- package/lib/src/exception/file-expected.exception.ts +8 -0
- package/lib/src/exception/overwrite-array-body.exception.ts +8 -0
- package/lib/src/exception/unknown-content-type.exception.ts +8 -0
- package/lib/src/util/clone.js +3 -0
- package/package.json +17 -11
- package/ava.config.mjs +0 -5
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/index.ts +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -27
package/.nycrc.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.8.8](https://www.github.com/keq-request/keq/compare/v1.8.7...v1.8.8) (2022-06-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* not working when response include null ([e98ea2b](https://www.github.com/keq-request/keq/commit/e98ea2bb831b8e94f531342bb53e0bb1e313c44b))
|
|
11
|
+
|
|
5
12
|
### [1.8.7](https://www.github.com/keq-request/keq/compare/v1.8.6...v1.8.7) (2022-06-22)
|
|
6
13
|
|
|
7
14
|
|
package/es/src/util/clone.js
CHANGED
|
@@ -6,6 +6,9 @@ export function clone(obj) {
|
|
|
6
6
|
if (Array.isArray(obj)) {
|
|
7
7
|
return obj.map(item => isBlob(item) ? item : clone(item));
|
|
8
8
|
}
|
|
9
|
+
else if (obj === null) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
9
12
|
else if (typeof obj === 'object') {
|
|
10
13
|
const entries = Object.entries(obj)
|
|
11
14
|
.map(([key, value]) => ([
|
package/lib/src/util/clone.js
CHANGED
|
@@ -21,6 +21,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
21
21
|
if (Array.isArray(obj)) {
|
|
22
22
|
return obj.map(item => (0, is_1.isBlob)(item) ? item : clone(item));
|
|
23
23
|
}
|
|
24
|
+
else if (obj === null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
24
27
|
else if (typeof obj === 'object') {
|
|
25
28
|
const entries = Object.entries(obj)
|
|
26
29
|
.map(([key, value]) => ([
|
package/package.json
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keq",
|
|
3
|
-
"main": "lib/index.js",
|
|
4
|
-
"module": "es/index.js",
|
|
5
|
-
"
|
|
3
|
+
"main": "lib/src/index.js",
|
|
4
|
+
"module": "es/src/index.js",
|
|
5
|
+
"types": "lib/src/index.d.ts",
|
|
6
|
+
"version": "1.8.8",
|
|
6
7
|
"license": "MIT",
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "ava",
|
|
9
|
+
"test": "npm run clean && npm run build:test && nyc ava",
|
|
10
10
|
"test:debug": "ava --verbose",
|
|
11
11
|
"test:update": "ava -u",
|
|
12
|
-
"report": "nyc --reporter=html --reporter=text-summary --skip-full ava",
|
|
13
|
-
"coveralls": "nyc
|
|
12
|
+
"report": "npm run build:test && nyc --reporter=html --reporter=text-summary --skip-full ava",
|
|
13
|
+
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
|
14
14
|
"ci": "git-cz",
|
|
15
15
|
"ca": "git add -A && git-cz -av",
|
|
16
16
|
"release": "standard-version",
|
|
17
17
|
"release:alpha": "standard-version --prerelease alpha",
|
|
18
18
|
"release:first": "standard-version --first-release",
|
|
19
19
|
"prepublishOnly": "npm run build",
|
|
20
|
-
"clean": "rm -rf ./lib/*",
|
|
20
|
+
"clean": "rm -rf ./lib/* && rm -rf ./es/*",
|
|
21
21
|
"prebuild": "npm run clean",
|
|
22
|
-
"build:es": "ttsc -p build/tsconfig.es.json",
|
|
23
|
-
"build:lib": "ttsc -p build/tsconfig.lib.json",
|
|
22
|
+
"build:es": "ttsc -p build/tsconfig.es.json && npm run copyfile:es",
|
|
23
|
+
"build:lib": "ttsc -p build/tsconfig.lib.json && npm run copyfile:lib",
|
|
24
|
+
"build:test": "ttsc -p build/tsconfig.test.json && npm run copyfile:lib",
|
|
24
25
|
"build": "npm run build:lib && npm run build:es",
|
|
26
|
+
"prewatch": "npm run copyfile:lib",
|
|
25
27
|
"watch": "NODE_ENV=development ttsc -p build/tsconfig.lib.json -w",
|
|
26
|
-
"
|
|
28
|
+
"copyfile:es": "copyfiles -u 1 \"src/**/*.!(ts)\" es/src",
|
|
29
|
+
"copyfile:lib": "copyfiles -u 1 \"src/**/*.!(ts)\" lib/src",
|
|
30
|
+
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
|
|
27
31
|
"prepare": "is-ci || husky install"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
34
|
+
"@ava/typescript": "^3.0.1",
|
|
30
35
|
"@commitlint/cli": "^17.0.2",
|
|
31
36
|
"@commitlint/config-conventional": "^17.0.2",
|
|
32
37
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
@@ -36,6 +41,7 @@
|
|
|
36
41
|
"ajv": "^8",
|
|
37
42
|
"ava": "^4.2.0",
|
|
38
43
|
"commitizen": "^4.2.4",
|
|
44
|
+
"copyfiles": "^2.4.1",
|
|
39
45
|
"coveralls": "^3.1.0",
|
|
40
46
|
"cz-conventional-changelog": "^3.3.0",
|
|
41
47
|
"eslint": "7",
|
package/ava.config.mjs
DELETED
package/es/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/index';
|
package/es/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/index';
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/index'
|
package/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/index';
|
package/lib/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
|
-
(function (factory) {
|
|
16
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
-
var v = factory(require, exports);
|
|
18
|
-
if (v !== undefined) module.exports = v;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./src/index"], factory);
|
|
22
|
-
}
|
|
23
|
-
})(function (require, exports) {
|
|
24
|
-
"use strict";
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
__exportStar(require("./src/index"), exports);
|
|
27
|
-
});
|