xshell 1.0.161 → 1.0.162

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.161",
3
+ "version": "1.0.162",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -126,8 +126,8 @@
126
126
  "@types/koa-compress": "^4.0.6",
127
127
  "@types/lodash": "^4.17.7",
128
128
  "@types/mime-types": "^2.1.4",
129
- "@types/node": "^22.4.1",
130
- "@types/react": "^18.3.3",
129
+ "@types/node": "^22.4.2",
130
+ "@types/react": "^18.3.4",
131
131
  "@types/through2": "^2.0.41",
132
132
  "@types/tough-cookie": "^4.0.5",
133
133
  "@types/ua-parser-js": "^0.7.39",
package/path.d.ts CHANGED
@@ -55,7 +55,7 @@ export declare function extname(path: string): string;
55
55
  /** `/` */
56
56
  export declare const sep = "/";
57
57
  /** The platform-specific file delimiter. ';' or ':'. */
58
- export declare const delimiter: ";" | ":";
58
+ export declare const delimiter: ":" | ";";
59
59
  /** Returns an object from a path string - the opposite of format().
60
60
  @param path path to evaluate.
61
61
  @throws {TypeError} if `path` is not a string. */
@@ -83,7 +83,7 @@ export declare let path: {
83
83
  basename: typeof basename;
84
84
  extname: typeof extname;
85
85
  sep: string;
86
- delimiter: ";" | ":";
86
+ delimiter: ":" | ";";
87
87
  parse: typeof parse;
88
88
  format: typeof format;
89
89
  toNamespacedPath: typeof toNamespacedPath;
@@ -29,5 +29,14 @@ if (!Array.prototype.at)
29
29
  define(Array.prototype, 'at', function at(index) {
30
30
  return index >= 0 ? this[index] : this[index + this.length];
31
31
  });
32
+ if (!Object.groupBy)
33
+ define(Object, 'groupBy', function groupBy(array, callback) {
34
+ return array.reduce((result, element, index) => {
35
+ const key = callback(element, index);
36
+ result[key] ??= [];
37
+ result[key].push(element);
38
+ return result;
39
+ }, {});
40
+ });
32
41
  export {};
33
42
  //# sourceMappingURL=polyfill.browser.js.map
@@ -68,7 +68,7 @@ export declare function encode(str: string): Uint8Array;
68
68
  在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
69
69
  export declare function decode(buffer: Uint8Array): string;
70
70
  /** 字符串字典序比较 */
71
- export declare function strcmp(l: string, r: string): 1 | 0 | -1;
71
+ export declare function strcmp(l: string, r: string): 0 | 1 | -1;
72
72
  /** 比较 1.10.02 这种版本号
73
73
  - l, r: 两个版本号字符串
74
74
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
package/utils.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
37
37
  /** 忽略对象中的 keys, 返回新对象 */
38
38
  export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
39
39
  /** 字符串字典序比较 */
40
- export declare function strcmp(l: string, r: string): 1 | 0 | -1;
40
+ export declare function strcmp(l: string, r: string): 0 | 1 | -1;
41
41
  /** 比较 1.10.02 这种版本号
42
42
  - l, r: 两个版本号字符串
43
43
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */