xshell 1.2.8 → 1.2.9

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.
Files changed (3) hide show
  1. package/io.browser.js +3 -3
  2. package/io.js +3 -3
  3. package/package.json +7 -7
package/io.browser.js CHANGED
@@ -462,10 +462,8 @@ function _pack(value) {
462
462
  // 先不序列化,防止某个 key 对应的 value 很大
463
463
  let nkv = 0;
464
464
  for (const key in value)
465
- if (++nkv === 16)
465
+ if (typeof value[key] !== 'function' && ++nkv === 16)
466
466
  break;
467
- // 记录相对位置,避免 buffer 替换后位置错误
468
- const offset = q + 1 - qstart;
469
467
  if (nkv <= 0x0f) // small object
470
468
  buffer[q++] = 0xa0 + nkv;
471
469
  else {
@@ -474,6 +472,8 @@ function _pack(value) {
474
472
  alloc(2);
475
473
  q += 2;
476
474
  }
475
+ // 记录相对位置,避免 buffer 替换后位置错误
476
+ const offset = q - qstart - 2;
477
477
  nkv = 0;
478
478
  for (const key in value) {
479
479
  const v = value[key];
package/io.js CHANGED
@@ -462,10 +462,8 @@ function _pack(value) {
462
462
  // 先不序列化,防止某个 key 对应的 value 很大
463
463
  let nkv = 0;
464
464
  for (const key in value)
465
- if (++nkv === 16)
465
+ if (typeof value[key] !== 'function' && ++nkv === 16)
466
466
  break;
467
- // 记录相对位置,避免 buffer 替换后位置错误
468
- const offset = q + 1 - qstart;
469
467
  if (nkv <= 0x0f) // small object
470
468
  buffer[q++] = 0xa0 + nkv;
471
469
  else {
@@ -474,6 +472,8 @@ function _pack(value) {
474
472
  alloc(2);
475
473
  q += 2;
476
474
  }
475
+ // 记录相对位置,避免 buffer 替换后位置错误
476
+ const offset = q - qstart - 2;
477
477
  nkv = 0;
478
478
  for (const key in value) {
479
479
  const v = value[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -57,14 +57,14 @@
57
57
  "@svgr/webpack": "^8.1.0",
58
58
  "@types/sass-loader": "^8.0.9",
59
59
  "@types/ws": "^8.5.13",
60
- "@typescript-eslint/eslint-plugin": "^8.20.0",
61
- "@typescript-eslint/parser": "^8.20.0",
62
- "@typescript-eslint/utils": "^8.20.0",
60
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
61
+ "@typescript-eslint/parser": "^8.21.0",
62
+ "@typescript-eslint/utils": "^8.21.0",
63
63
  "archiver": "^7.0.1",
64
64
  "chalk": "^5.4.1",
65
65
  "cli-table3": "^0.6.5",
66
66
  "cli-truncate": "^4.0.0",
67
- "commander": "^13.0.0",
67
+ "commander": "^13.1.0",
68
68
  "css-loader": "^7.1.2",
69
69
  "emoji-regex": "^10.4.0",
70
70
  "eslint": "^9.18.0",
@@ -83,7 +83,7 @@
83
83
  "ora": "^8.1.1",
84
84
  "react": "^19.0.0",
85
85
  "react-i18next": "^15.4.0",
86
- "react-object-model": "^1.2.21",
86
+ "react-object-model": "^1.2.22",
87
87
  "resolve-path": "^1.4.0",
88
88
  "sass": "^1.83.4",
89
89
  "sass-loader": "^16.0.4",
@@ -96,7 +96,7 @@
96
96
  "tslib": "^2.8.1",
97
97
  "typescript": "^5.7.3",
98
98
  "ua-parser-js": "^2.0.0",
99
- "undici": "^7.2.2",
99
+ "undici": "^7.2.3",
100
100
  "vinyl": "^3.0.0",
101
101
  "vinyl-fs": "^4.0.0",
102
102
  "webpack": "^5.97.1",