keq 1.8.4 → 1.8.5

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 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.5](https://www.github.com/keq-request/keq/compare/v1.8.4...v1.8.5) (2022-05-01)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * esm not work ([6d1cd16](https://www.github.com/keq-request/keq/commit/6d1cd16b99e177b419dc5f1083662c6fa956caf1))
11
+
5
12
  ### [1.8.4](https://www.github.com/keq-request/keq/compare/v1.8.3...v1.8.4) (2022-05-01)
6
13
 
7
14
 
package/es/src/mount.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Exception } from "./exception";
2
- import * as minimatch from 'minimatch';
2
+ import minimatch from 'minimatch';
3
3
  import { isBrowser } from './util';
4
4
  function createMounter(matcher) {
5
5
  const mounter = ctx => matcher(ctx);
@@ -1,6 +1,6 @@
1
1
  import { isBlob } from './is';
2
- import * as deepClone from 'clone';
3
- import * as fromEntries from 'object.fromentries';
2
+ import deepClone from 'clone';
3
+ import fromEntries from 'object.fromentries';
4
4
  export function clone(obj) {
5
5
  if (typeof obj === 'object' && !Array.isArray(obj)) {
6
6
  const entries = Object.entries(obj)
package/lib/src/index.js CHANGED
@@ -9,9 +9,21 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
9
  if (k2 === undefined) k2 = k;
10
10
  o[k2] = m[k];
11
11
  }));
12
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14
+ }) : function(o, v) {
15
+ o["default"] = v;
16
+ });
12
17
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
13
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
14
19
  };
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
15
27
  (function (factory) {
16
28
  if (typeof module === "object" && typeof module.exports === "object") {
17
29
  var v = factory(require, exports);
@@ -30,6 +42,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
30
42
  Object.defineProperty(exports, "compose", { enumerable: true, get: function () { return middleware_1.compose; } });
31
43
  __exportStar(require("./keq"), exports);
32
44
  __exportStar(require("./polyfill"), exports);
33
- const mount = require("./mount");
45
+ const mount = __importStar(require("./mount"));
34
46
  exports.mount = mount;
35
47
  });
package/lib/src/mount.js CHANGED
@@ -1,3 +1,6 @@
1
+ var __importDefault = (this && this.__importDefault) || function (mod) {
2
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3
+ };
1
4
  (function (factory) {
2
5
  if (typeof module === "object" && typeof module.exports === "object") {
3
6
  var v = factory(require, exports);
@@ -11,7 +14,7 @@
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.module = exports.host = exports.pathname = exports.location = void 0;
13
16
  const exception_1 = require("./exception");
14
- const minimatch = require("minimatch");
17
+ const minimatch_1 = __importDefault(require("minimatch"));
15
18
  const util_1 = require("./util");
16
19
  function createMounter(matcher) {
17
20
  const mounter = ctx => matcher(ctx);
@@ -44,7 +47,7 @@
44
47
  return createMounter(ctx => {
45
48
  const pathname = ctx.url.pathname || '/';
46
49
  if (typeof matcher === 'string')
47
- return minimatch(pathname, matcher);
50
+ return (0, minimatch_1.default)(pathname, matcher);
48
51
  return matcher.test(pathname);
49
52
  });
50
53
  }
@@ -1,3 +1,6 @@
1
+ var __importDefault = (this && this.__importDefault) || function (mod) {
2
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3
+ };
1
4
  (function (factory) {
2
5
  if (typeof module === "object" && typeof module.exports === "object") {
3
6
  var v = factory(require, exports);
@@ -11,18 +14,18 @@
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.clone = void 0;
13
16
  const is_1 = require("./is");
14
- const deepClone = require("clone");
15
- const fromEntries = require("object.fromentries");
17
+ const clone_1 = __importDefault(require("clone"));
18
+ const object_fromentries_1 = __importDefault(require("object.fromentries"));
16
19
  function clone(obj) {
17
20
  if (typeof obj === 'object' && !Array.isArray(obj)) {
18
21
  const entries = Object.entries(obj)
19
22
  .map(([key, value]) => ([
20
23
  key,
21
- (0, is_1.isBlob)(value) ? value : deepClone(value),
24
+ (0, is_1.isBlob)(value) ? value : (0, clone_1.default)(value),
22
25
  ]));
23
- return fromEntries(entries);
26
+ return (0, object_fromentries_1.default)(entries);
24
27
  }
25
- return deepClone(obj);
28
+ return (0, clone_1.default)(obj);
26
29
  }
27
30
  exports.clone = clone;
28
31
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "keq",
3
3
  "main": "lib/index.js",
4
4
  "module": "es/index.js",
5
- "version": "1.8.4",
5
+ "version": "1.8.5",
6
6
  "license": "MIT",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {