appium-uiautomator2-driver 8.7.0 → 8.7.2

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 (787) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +36 -2
  3. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts +12 -0
  4. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map +1 -0
  5. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js +33 -0
  6. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map +1 -0
  7. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts.map +1 -1
  8. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js +49 -9
  9. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
  10. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/timeout.js +1 -1
  11. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/timeout.js.map +1 -1
  12. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.d.ts.map +1 -1
  13. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js +2 -0
  14. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js.map +1 -1
  15. package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.d.ts.map +1 -1
  16. package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.js +40 -3
  17. package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.js.map +1 -1
  18. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts +17 -6
  19. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts.map +1 -1
  20. package/node_modules/@appium/base-driver/build/lib/express/middleware.js +11 -7
  21. package/node_modules/@appium/base-driver/build/lib/express/middleware.js.map +1 -1
  22. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts +1 -0
  23. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts.map +1 -1
  24. package/node_modules/@appium/base-driver/build/lib/express/server.js +4 -3
  25. package/node_modules/@appium/base-driver/build/lib/express/server.js.map +1 -1
  26. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts +1 -2
  27. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts.map +1 -1
  28. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js +8 -3
  29. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js.map +1 -1
  30. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi-subscriptions.ts +36 -0
  31. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +56 -9
  32. package/node_modules/@appium/base-driver/lib/basedriver/commands/timeout.ts +1 -1
  33. package/node_modules/@appium/base-driver/lib/basedriver/driver.ts +2 -0
  34. package/node_modules/@appium/base-driver/lib/basedriver/helpers.ts +41 -3
  35. package/node_modules/@appium/base-driver/lib/express/middleware.ts +32 -12
  36. package/node_modules/@appium/base-driver/lib/express/server.ts +7 -2
  37. package/node_modules/@appium/base-driver/lib/protocol/bidi-commands.ts +9 -3
  38. package/node_modules/@appium/base-driver/package.json +10 -10
  39. package/node_modules/@appium/base-driver/tsconfig.json +1 -1
  40. package/node_modules/@appium/logger/CHANGELOG.md +8 -0
  41. package/node_modules/@appium/logger/package.json +3 -3
  42. package/node_modules/@appium/support/build/lib/fs.d.ts.map +1 -1
  43. package/node_modules/@appium/support/build/lib/fs.js +7 -0
  44. package/node_modules/@appium/support/build/lib/fs.js.map +1 -1
  45. package/node_modules/@appium/support/build/lib/index.d.ts.map +1 -1
  46. package/node_modules/@appium/support/build/lib/net.d.ts.map +1 -1
  47. package/node_modules/@appium/support/build/lib/net.js +6 -2
  48. package/node_modules/@appium/support/build/lib/net.js.map +1 -1
  49. package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
  50. package/node_modules/@appium/support/build/lib/npm.js +2 -1
  51. package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
  52. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  53. package/node_modules/@appium/support/build/lib/util.js +23 -5
  54. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  55. package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
  56. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  57. package/node_modules/@appium/support/build/lib/zip.js +195 -71
  58. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  59. package/node_modules/@appium/support/lib/fs.ts +8 -1
  60. package/node_modules/@appium/support/lib/net.ts +7 -2
  61. package/node_modules/@appium/support/lib/npm.ts +2 -1
  62. package/node_modules/@appium/support/lib/util.ts +22 -4
  63. package/node_modules/@appium/support/lib/zip.ts +234 -80
  64. package/node_modules/@appium/support/package.json +11 -11
  65. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
  66. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
  67. package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
  68. package/node_modules/@appium/types/package.json +4 -4
  69. package/node_modules/appium-adb/CHANGELOG.md +37 -0
  70. package/node_modules/appium-adb/README.md +1 -1
  71. package/node_modules/appium-adb/build/lib/tools/aab-utils.js +34 -34
  72. package/node_modules/appium-adb/build/lib/tools/aab-utils.js.map +1 -1
  73. package/node_modules/appium-adb/build/lib/tools/android-manifest.js +1 -1
  74. package/node_modules/appium-adb/build/lib/tools/android-manifest.js.map +1 -1
  75. package/node_modules/appium-adb/build/lib/tools/apk-signing.d.ts.map +1 -1
  76. package/node_modules/appium-adb/build/lib/tools/apk-signing.js +21 -9
  77. package/node_modules/appium-adb/build/lib/tools/apk-signing.js.map +1 -1
  78. package/node_modules/appium-adb/build/lib/tools/apks-utils.d.ts.map +1 -1
  79. package/node_modules/appium-adb/build/lib/tools/apks-utils.js +6 -5
  80. package/node_modules/appium-adb/build/lib/tools/apks-utils.js.map +1 -1
  81. package/node_modules/appium-adb/build/lib/tools/app-commands.d.ts.map +1 -1
  82. package/node_modules/appium-adb/build/lib/tools/app-commands.js +63 -62
  83. package/node_modules/appium-adb/build/lib/tools/app-commands.js.map +1 -1
  84. package/node_modules/appium-adb/build/lib/tools/device-settings.js +1 -1
  85. package/node_modules/appium-adb/build/lib/tools/device-settings.js.map +1 -1
  86. package/node_modules/appium-adb/build/lib/tools/lockmgmt.d.ts.map +1 -1
  87. package/node_modules/appium-adb/build/lib/tools/lockmgmt.js +3 -9
  88. package/node_modules/appium-adb/build/lib/tools/lockmgmt.js.map +1 -1
  89. package/node_modules/appium-adb/build/lib/tools/system-calls.d.ts.map +1 -1
  90. package/node_modules/appium-adb/build/lib/tools/system-calls.js +7 -6
  91. package/node_modules/appium-adb/build/lib/tools/system-calls.js.map +1 -1
  92. package/node_modules/appium-adb/build/lib/tools/types.d.ts +4 -0
  93. package/node_modules/appium-adb/build/lib/tools/types.d.ts.map +1 -1
  94. package/node_modules/appium-adb/build/lib/utils/helpers/index.d.ts +1 -0
  95. package/node_modules/appium-adb/build/lib/utils/helpers/index.d.ts.map +1 -1
  96. package/node_modules/appium-adb/build/lib/utils/helpers/index.js +1 -0
  97. package/node_modules/appium-adb/build/lib/utils/helpers/index.js.map +1 -1
  98. package/node_modules/appium-adb/build/lib/utils/helpers/redact.d.ts +19 -0
  99. package/node_modules/appium-adb/build/lib/utils/helpers/redact.d.ts.map +1 -0
  100. package/node_modules/appium-adb/build/lib/utils/helpers/redact.js +57 -0
  101. package/node_modules/appium-adb/build/lib/utils/helpers/redact.js.map +1 -0
  102. package/node_modules/appium-adb/build/lib/utils/index.d.ts +2 -0
  103. package/node_modules/appium-adb/build/lib/utils/index.d.ts.map +1 -1
  104. package/node_modules/appium-adb/build/lib/utils/index.js +2 -0
  105. package/node_modules/appium-adb/build/lib/utils/index.js.map +1 -1
  106. package/node_modules/appium-adb/lib/tools/aab-utils.ts +35 -35
  107. package/node_modules/appium-adb/lib/tools/android-manifest.ts +1 -1
  108. package/node_modules/appium-adb/lib/tools/apk-signing.ts +26 -9
  109. package/node_modules/appium-adb/lib/tools/apks-utils.ts +13 -5
  110. package/node_modules/appium-adb/lib/tools/app-commands.ts +59 -68
  111. package/node_modules/appium-adb/lib/tools/device-settings.ts +1 -1
  112. package/node_modules/appium-adb/lib/tools/lockmgmt.ts +3 -8
  113. package/node_modules/appium-adb/lib/tools/system-calls.ts +15 -6
  114. package/node_modules/appium-adb/lib/tools/types.ts +4 -0
  115. package/node_modules/appium-adb/lib/utils/helpers/index.ts +1 -0
  116. package/node_modules/appium-adb/lib/utils/helpers/redact.ts +59 -0
  117. package/node_modules/appium-adb/lib/utils/index.ts +2 -0
  118. package/node_modules/appium-adb/package.json +10 -13
  119. package/node_modules/appium-android-driver/CHANGELOG.md +31 -0
  120. package/node_modules/appium-android-driver/build/lib/commands/context/exports.d.ts.map +1 -1
  121. package/node_modules/appium-android-driver/build/lib/commands/context/exports.js +10 -6
  122. package/node_modules/appium-android-driver/build/lib/commands/context/exports.js.map +1 -1
  123. package/node_modules/appium-android-driver/build/lib/commands/file-actions.d.ts.map +1 -1
  124. package/node_modules/appium-android-driver/build/lib/commands/file-actions.js +55 -35
  125. package/node_modules/appium-android-driver/build/lib/commands/file-actions.js.map +1 -1
  126. package/node_modules/appium-android-driver/build/lib/commands/log.js +2 -2
  127. package/node_modules/appium-android-driver/build/lib/commands/log.js.map +1 -1
  128. package/node_modules/appium-android-driver/lib/commands/context/exports.ts +10 -6
  129. package/node_modules/appium-android-driver/lib/commands/file-actions.ts +58 -39
  130. package/node_modules/appium-android-driver/lib/commands/log.ts +2 -2
  131. package/node_modules/appium-android-driver/package.json +1 -1
  132. package/node_modules/appium-chromedriver/CHANGELOG.md +80 -0
  133. package/node_modules/appium-chromedriver/README.md +2 -4
  134. package/node_modules/appium-chromedriver/build/lib/commands/version.d.ts.map +1 -1
  135. package/node_modules/appium-chromedriver/build/lib/commands/version.js +9 -0
  136. package/node_modules/appium-chromedriver/build/lib/commands/version.js.map +1 -1
  137. package/node_modules/appium-chromedriver/config/mapping.json +9 -1
  138. package/node_modules/appium-chromedriver/lib/commands/version.ts +10 -0
  139. package/node_modules/appium-chromedriver/package.json +10 -13
  140. package/node_modules/appium-uiautomator2-server/CHANGELOG.md +19 -0
  141. package/node_modules/appium-uiautomator2-server/README.md +5 -2
  142. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk +0 -0
  143. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk.idsig +0 -0
  144. package/node_modules/appium-uiautomator2-server/apks/{appium-uiautomator2-server-v10.6.6.apk → appium-uiautomator2-server-v10.7.1.apk} +0 -0
  145. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.7.1.apk.idsig +0 -0
  146. package/node_modules/appium-uiautomator2-server/package.json +12 -14
  147. package/node_modules/asyncbox/README.md +43 -0
  148. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
  149. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  150. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
  151. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  152. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
  153. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  154. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
  155. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  156. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
  157. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  158. package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
  159. package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  160. package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  161. package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  162. package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
  163. package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  164. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  165. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  166. package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  167. package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  168. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
  169. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  170. package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
  171. package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  172. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
  173. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  174. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  175. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  176. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
  177. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  178. package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  179. package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  180. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
  181. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  182. package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
  183. package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  184. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
  185. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  186. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
  187. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  188. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
  189. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  190. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
  191. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  192. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  193. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  194. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
  195. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  196. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
  197. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  198. package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
  199. package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  200. package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
  201. package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  202. package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
  203. package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  204. package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  205. package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  206. package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  207. package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  208. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  209. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  210. package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  211. package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  212. package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
  213. package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  214. package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
  215. package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  216. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  217. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  218. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
  219. package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  220. package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
  221. package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  222. package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
  223. package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  224. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
  225. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  226. package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
  227. package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  228. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  229. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  230. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
  231. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  232. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
  233. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  234. package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
  235. package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  236. package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
  237. package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
  238. package/node_modules/asyncbox/lib/errors.ts +15 -0
  239. package/node_modules/asyncbox/lib/index.ts +21 -0
  240. package/node_modules/asyncbox/lib/limit-function.ts +18 -0
  241. package/node_modules/asyncbox/lib/lock.ts +360 -0
  242. package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
  243. package/node_modules/asyncbox/lib/retry.ts +61 -0
  244. package/node_modules/asyncbox/lib/sleep.ts +79 -0
  245. package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
  246. package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
  247. package/node_modules/asyncbox/package.json +8 -8
  248. package/node_modules/bare-fs/binding.c +52 -23
  249. package/node_modules/bare-fs/index.d.ts +12 -10
  250. package/node_modules/bare-fs/index.js +43 -10
  251. package/node_modules/bare-fs/package.json +2 -1
  252. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  253. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  254. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  255. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  256. package/node_modules/bare-url/README.md +4 -0
  257. package/node_modules/bare-url/index.d.ts +3 -0
  258. package/node_modules/bare-url/index.js +42 -18
  259. package/node_modules/bare-url/lib/errors.js +4 -0
  260. package/node_modules/bare-url/package.json +1 -1
  261. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  262. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  263. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  264. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  265. package/node_modules/body-parser/README.md +17 -13
  266. package/node_modules/body-parser/lib/read.js +74 -57
  267. package/node_modules/body-parser/lib/types/json.js +11 -11
  268. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  269. package/node_modules/body-parser/lib/utils.js +0 -15
  270. package/node_modules/body-parser/package.json +7 -12
  271. package/node_modules/bplist-creator/README.md +26 -6
  272. package/node_modules/bplist-creator/dist/index.cjs +508 -0
  273. package/node_modules/bplist-creator/dist/index.cjs.map +7 -0
  274. package/node_modules/bplist-creator/dist/index.d.cts +12 -0
  275. package/node_modules/bplist-creator/dist/index.d.ts +12 -0
  276. package/node_modules/bplist-creator/dist/index.mjs +472 -0
  277. package/node_modules/bplist-creator/dist/index.mjs.map +7 -0
  278. package/node_modules/bplist-creator/package.json +43 -9
  279. package/node_modules/bplist-parser/README.md +37 -3
  280. package/node_modules/bplist-parser/dist/index.cjs +385 -0
  281. package/node_modules/bplist-parser/dist/index.cjs.map +7 -0
  282. package/node_modules/bplist-parser/dist/index.d.cts +13 -0
  283. package/node_modules/bplist-parser/dist/index.d.ts +13 -0
  284. package/node_modules/bplist-parser/{bplistParser.js → dist/index.mjs} +141 -171
  285. package/node_modules/bplist-parser/dist/index.mjs.map +7 -0
  286. package/node_modules/bplist-parser/package.json +39 -12
  287. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +4 -0
  288. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
  289. package/node_modules/brace-expansion/dist/commonjs/index.js +69 -25
  290. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
  291. package/node_modules/brace-expansion/dist/esm/index.d.ts +4 -0
  292. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
  293. package/node_modules/brace-expansion/dist/esm/index.js +68 -24
  294. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
  295. package/node_modules/brace-expansion/package.json +2 -1
  296. package/node_modules/follow-redirects/README.md +27 -1
  297. package/node_modules/follow-redirects/index.js +11 -6
  298. package/node_modules/follow-redirects/package.json +1 -1
  299. package/node_modules/io.appium.settings/CHANGELOG.md +72 -0
  300. package/node_modules/io.appium.settings/README.md +126 -0
  301. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  302. package/node_modules/io.appium.settings/build/lib/client.d.ts +4 -0
  303. package/node_modules/io.appium.settings/build/lib/client.d.ts.map +1 -1
  304. package/node_modules/io.appium.settings/build/lib/client.js +4 -0
  305. package/node_modules/io.appium.settings/build/lib/client.js.map +1 -1
  306. package/node_modules/io.appium.settings/build/lib/commands/clipboard.d.ts.map +1 -1
  307. package/node_modules/io.appium.settings/build/lib/commands/clipboard.js +1 -1
  308. package/node_modules/io.appium.settings/build/lib/commands/clipboard.js.map +1 -1
  309. package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.d.ts +55 -0
  310. package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.d.ts.map +1 -0
  311. package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.js +156 -0
  312. package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.js.map +1 -0
  313. package/node_modules/io.appium.settings/build/lib/commands/media-projection.d.ts.map +1 -1
  314. package/node_modules/io.appium.settings/build/lib/commands/media-projection.js.map +1 -1
  315. package/node_modules/io.appium.settings/build/lib/commands/media.js +1 -1
  316. package/node_modules/io.appium.settings/build/lib/commands/media.js.map +1 -1
  317. package/node_modules/io.appium.settings/build/lib/commands/network.js +1 -1
  318. package/node_modules/io.appium.settings/build/lib/commands/network.js.map +1 -1
  319. package/node_modules/io.appium.settings/build/lib/commands/types.d.ts +65 -0
  320. package/node_modules/io.appium.settings/build/lib/commands/types.d.ts.map +1 -1
  321. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts +56 -0
  322. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts.map +1 -0
  323. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js +166 -0
  324. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js.map +1 -0
  325. package/node_modules/io.appium.settings/build/lib/constants.d.ts +7 -0
  326. package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
  327. package/node_modules/io.appium.settings/build/lib/constants.js +7 -0
  328. package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
  329. package/node_modules/io.appium.settings/build/lib/index.js +1 -1
  330. package/node_modules/io.appium.settings/build/lib/index.js.map +1 -1
  331. package/node_modules/io.appium.settings/build/lib/{utils.d.ts → utils/apk-path.d.ts} +1 -1
  332. package/node_modules/io.appium.settings/build/lib/utils/apk-path.d.ts.map +1 -0
  333. package/node_modules/io.appium.settings/build/lib/{utils.js → utils/apk-path.js} +1 -1
  334. package/node_modules/io.appium.settings/build/lib/utils/apk-path.js.map +1 -0
  335. package/node_modules/io.appium.settings/build/lib/utils/index.d.ts +5 -0
  336. package/node_modules/io.appium.settings/build/lib/utils/index.d.ts.map +1 -0
  337. package/node_modules/io.appium.settings/build/lib/utils/index.js +4 -0
  338. package/node_modules/io.appium.settings/build/lib/utils/index.js.map +1 -0
  339. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts +47 -0
  340. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts.map +1 -0
  341. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js +67 -0
  342. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js.map +1 -0
  343. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts +142 -0
  344. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts.map +1 -0
  345. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js +416 -0
  346. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js.map +1 -0
  347. package/node_modules/io.appium.settings/lib/client.ts +5 -0
  348. package/node_modules/io.appium.settings/lib/commands/clipboard.ts +1 -0
  349. package/node_modules/io.appium.settings/lib/commands/jpeg-stream.ts +175 -0
  350. package/node_modules/io.appium.settings/lib/commands/media-projection.ts +1 -5
  351. package/node_modules/io.appium.settings/lib/commands/media.ts +1 -1
  352. package/node_modules/io.appium.settings/lib/commands/network.ts +1 -1
  353. package/node_modules/io.appium.settings/lib/commands/types.ts +70 -0
  354. package/node_modules/io.appium.settings/lib/commands/video-stream.ts +185 -0
  355. package/node_modules/io.appium.settings/lib/constants.ts +10 -0
  356. package/node_modules/io.appium.settings/lib/index.ts +1 -1
  357. package/node_modules/io.appium.settings/lib/utils/index.ts +4 -0
  358. package/node_modules/io.appium.settings/lib/utils/streaming-protocol.ts +93 -0
  359. package/node_modules/io.appium.settings/lib/utils/streaming-transport.ts +450 -0
  360. package/node_modules/io.appium.settings/package.json +17 -20
  361. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  362. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
  363. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
  364. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
  365. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
  366. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
  367. package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
  368. package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
  369. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
  370. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
  371. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
  372. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
  373. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  374. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
  375. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
  376. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
  377. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
  378. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
  379. package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
  380. package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
  381. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
  382. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
  383. package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
  384. package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
  385. package/node_modules/lru-cache/package.json +27 -1
  386. package/node_modules/morgan/README.md +49 -10
  387. package/node_modules/morgan/index.js +24 -6
  388. package/node_modules/morgan/package.json +6 -6
  389. package/node_modules/on-finished/index.js +14 -2
  390. package/node_modules/on-finished/package.json +11 -7
  391. package/node_modules/p-limit/index.d.ts +2 -0
  392. package/node_modules/p-limit/index.js +17 -1
  393. package/node_modules/p-limit/package.json +1 -1
  394. package/node_modules/p-limit/readme.md +2 -0
  395. package/node_modules/proxy-addr/HISTORY.md +60 -54
  396. package/node_modules/proxy-addr/README.md +1 -1
  397. package/node_modules/proxy-addr/index.js +32 -0
  398. package/node_modules/proxy-addr/package.json +8 -4
  399. package/node_modules/qs/.editorconfig +1 -1
  400. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  401. package/node_modules/qs/CHANGELOG.md +61 -14
  402. package/node_modules/qs/README.md +57 -4
  403. package/node_modules/qs/dist/qs.js +19 -19
  404. package/node_modules/qs/eslint.config.mjs +61 -50
  405. package/node_modules/qs/lib/formats.js +7 -2
  406. package/node_modules/qs/lib/parse.js +105 -8
  407. package/node_modules/qs/lib/stringify.js +9 -7
  408. package/node_modules/qs/lib/utils.js +145 -13
  409. package/node_modules/qs/package.json +8 -8
  410. package/node_modules/qs/test/parse.js +440 -2
  411. package/node_modules/qs/test/stringify.js +485 -33
  412. package/node_modules/qs/test/utils.js +245 -3
  413. package/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
  414. package/node_modules/readable-stream/lib/internal/streams/destroy.js +1 -1
  415. package/node_modules/readable-stream/lib/internal/streams/duplexify.js +1 -1
  416. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -1
  417. package/node_modules/readable-stream/lib/internal/streams/from.js +1 -1
  418. package/node_modules/readable-stream/lib/internal/streams/legacy.js +6 -1
  419. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +1 -1
  420. package/node_modules/readable-stream/lib/internal/streams/readable.js +1 -1
  421. package/node_modules/readable-stream/lib/internal/streams/writable.js +1 -1
  422. package/node_modules/readable-stream/package.json +3 -2
  423. package/node_modules/sharp/dist/index.d.cts +2 -2
  424. package/node_modules/sharp/dist/index.d.mts +3 -3
  425. package/node_modules/sharp/dist/is.cjs +8 -2
  426. package/node_modules/sharp/dist/is.mjs +8 -2
  427. package/node_modules/sharp/dist/operation.cjs +2 -2
  428. package/node_modules/sharp/dist/operation.mjs +2 -2
  429. package/node_modules/sharp/dist/output.cjs +1 -0
  430. package/node_modules/sharp/dist/output.mjs +1 -0
  431. package/node_modules/sharp/dist/resize.cjs +14 -14
  432. package/node_modules/sharp/dist/resize.mjs +14 -14
  433. package/node_modules/sharp/dist/sharp.cjs +3 -3
  434. package/node_modules/sharp/dist/sharp.mjs +3 -3
  435. package/node_modules/sharp/lib/index.d.ts +2 -2
  436. package/node_modules/sharp/package.json +35 -35
  437. package/node_modules/sharp/src/binding.gyp +1 -1
  438. package/node_modules/sharp/src/common.cc +4 -4
  439. package/node_modules/sharp/src/common.h +2 -2
  440. package/node_modules/sharp/src/pipeline.cc +31 -6
  441. package/node_modules/sharp/src/utilities.cc +1 -1
  442. package/node_modules/shell-quote/README.md +37 -4
  443. package/node_modules/shell-quote/package.json +10 -6
  444. package/node_modules/shell-quote/parse.d.ts +1 -1
  445. package/node_modules/shell-quote/parse.js +63 -11
  446. package/node_modules/shell-quote/quote.d.ts +2 -1
  447. package/node_modules/shell-quote/quote.js +23 -3
  448. package/node_modules/spdx-license-ids/index.json +13 -0
  449. package/node_modules/spdx-license-ids/package.json +1 -1
  450. package/node_modules/stream-buffers/.codeclimate.yml +12 -0
  451. package/node_modules/stream-buffers/.eslintignore +1 -0
  452. package/node_modules/stream-buffers/.eslintrc +25 -0
  453. package/node_modules/stream-buffers/.github/workflows/codeql-analysis.yml +71 -0
  454. package/node_modules/stream-buffers/.github/workflows/node.js.yml +31 -0
  455. package/node_modules/stream-buffers/.mailmap +1 -0
  456. package/node_modules/stream-buffers/.nvmrc +1 -0
  457. package/node_modules/stream-buffers/README.md +65 -65
  458. package/node_modules/stream-buffers/lib/constants.js +8 -6
  459. package/node_modules/stream-buffers/lib/readable_streambuffer.js +114 -136
  460. package/node_modules/stream-buffers/lib/streambuffer.js +5 -3
  461. package/node_modules/stream-buffers/lib/writable_streambuffer.js +72 -97
  462. package/node_modules/stream-buffers/package.json +7 -5
  463. package/node_modules/tar-stream/package.json +7 -7
  464. package/node_modules/type-fest/index.d.ts +7 -7
  465. package/node_modules/type-fest/package.json +2 -1
  466. package/node_modules/type-fest/readme.md +7 -16
  467. package/node_modules/type-fest/source/all-extend.d.ts +9 -7
  468. package/node_modules/type-fest/source/array-reverse.d.ts +13 -12
  469. package/node_modules/type-fest/source/array-tail.d.ts +3 -3
  470. package/node_modules/type-fest/source/delimiter-case.d.ts +1 -1
  471. package/node_modules/type-fest/source/get.d.ts +1 -1
  472. package/node_modules/type-fest/source/int-closed-range.d.ts +4 -1
  473. package/node_modules/type-fest/source/int-range.d.ts +56 -9
  474. package/node_modules/type-fest/source/internal/array.d.ts +14 -13
  475. package/node_modules/type-fest/source/internal/numeric.d.ts +0 -38
  476. package/node_modules/type-fest/source/internal/object.d.ts +30 -1
  477. package/node_modules/type-fest/source/is-boolean-literal.d.ts +39 -0
  478. package/node_modules/type-fest/source/is-literal.d.ts +43 -269
  479. package/node_modules/type-fest/source/is-numeric-literal.d.ts +50 -0
  480. package/node_modules/type-fest/source/is-string-literal.d.ts +72 -0
  481. package/node_modules/type-fest/source/is-symbol-literal.d.ts +39 -0
  482. package/node_modules/type-fest/source/is-tuple.d.ts +3 -3
  483. package/node_modules/type-fest/source/jsonify.d.ts +1 -5
  484. package/node_modules/type-fest/source/merge-deep.d.ts +3 -3
  485. package/node_modules/type-fest/source/remove-prefix.d.ts +1 -1
  486. package/node_modules/type-fest/source/remove-suffix.d.ts +1 -1
  487. package/node_modules/type-fest/source/rename-keys.d.ts +163 -0
  488. package/node_modules/type-fest/source/set-required.d.ts +10 -9
  489. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +6 -4
  490. package/node_modules/type-fest/source/some-extend.d.ts +9 -7
  491. package/node_modules/type-fest/source/split-on-rest-element.d.ts +14 -13
  492. package/node_modules/type-fest/source/split.d.ts +22 -11
  493. package/node_modules/type-fest/source/string-repeat.d.ts +1 -1
  494. package/node_modules/type-fest/source/string-to-array.d.ts +1 -1
  495. package/node_modules/type-fest/source/tsconfig-json.d.ts +1 -1
  496. package/node_modules/type-fest/source/typed-array.d.ts +6 -0
  497. package/node_modules/type-fest/source/union-max.d.ts +56 -0
  498. package/node_modules/type-fest/source/writable.d.ts +2 -2
  499. package/node_modules/uuid/package.json +17 -17
  500. package/node_modules/ws/lib/websocket.js +17 -3
  501. package/node_modules/ws/package.json +1 -1
  502. package/node_modules/xpath/LICENSE +22 -22
  503. package/node_modules/xpath/package.json +43 -43
  504. package/node_modules/xpath/xpath.d.ts +51 -51
  505. package/node_modules/xpath/xpath.js +17 -2
  506. package/package.json +7 -7
  507. package/node_modules/@appium/base-driver/node_modules/asyncbox/LICENSE +0 -203
  508. package/node_modules/@appium/base-driver/node_modules/asyncbox/README.md +0 -215
  509. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  510. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  511. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -301
  512. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  513. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
  514. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
  515. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
  516. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
  517. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/package.json +0 -3
  518. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  519. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  520. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -288
  521. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  522. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
  523. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
  524. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  525. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
  526. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/package.json +0 -3
  527. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncbox.ts +0 -365
  528. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/types.ts +0 -88
  529. package/node_modules/@appium/base-driver/node_modules/asyncbox/package.json +0 -74
  530. package/node_modules/@appium/base-driver/node_modules/axios/CHANGELOG.md +0 -1872
  531. package/node_modules/@appium/base-driver/node_modules/axios/LICENSE +0 -7
  532. package/node_modules/@appium/base-driver/node_modules/axios/MIGRATION_GUIDE.md +0 -877
  533. package/node_modules/@appium/base-driver/node_modules/axios/README.md +0 -2623
  534. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.js +0 -5509
  535. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js +0 -5
  536. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js.map +0 -1
  537. package/node_modules/@appium/base-driver/node_modules/axios/dist/browser/axios.cjs +0 -5469
  538. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.js +0 -5490
  539. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js +0 -3
  540. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js.map +0 -1
  541. package/node_modules/@appium/base-driver/node_modules/axios/dist/node/axios.cjs +0 -6356
  542. package/node_modules/@appium/base-driver/node_modules/axios/index.d.cts +0 -762
  543. package/node_modules/@appium/base-driver/node_modules/axios/index.d.ts +0 -783
  544. package/node_modules/@appium/base-driver/node_modules/axios/index.js +0 -45
  545. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/README.md +0 -36
  546. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/adapters.js +0 -132
  547. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/fetch.js +0 -643
  548. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/http.js +0 -1406
  549. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/xhr.js +0 -228
  550. package/node_modules/@appium/base-driver/node_modules/axios/lib/axios.js +0 -89
  551. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CancelToken.js +0 -135
  552. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CanceledError.js +0 -22
  553. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/isCancel.js +0 -5
  554. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/Axios.js +0 -301
  555. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosError.js +0 -219
  556. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosHeaders.js +0 -474
  557. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/InterceptorManager.js +0 -72
  558. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/README.md +0 -8
  559. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/buildFullPath.js +0 -88
  560. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/dispatchRequest.js +0 -89
  561. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/mergeConfig.js +0 -174
  562. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/setFormDataHeaders.js +0 -27
  563. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/settle.js +0 -27
  564. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/transformData.js +0 -28
  565. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/index.js +0 -177
  566. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/transitional.js +0 -10
  567. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/README.md +0 -3
  568. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/classes/FormData.js +0 -2
  569. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/data.js +0 -1
  570. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
  571. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
  572. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
  573. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -78
  574. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/README.md +0 -7
  575. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
  576. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/bind.js +0 -14
  577. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/buildURL.js +0 -69
  578. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/callbackify.js +0 -18
  579. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/combineURLs.js +0 -23
  580. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/composeSignals.js +0 -68
  581. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/cookies.js +0 -64
  582. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
  583. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -166
  584. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToJSON.js +0 -125
  585. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
  586. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
  587. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
  588. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  589. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
  590. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/null.js +0 -2
  591. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseHeaders.js +0 -71
  592. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  593. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
  594. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/readBlob.js +0 -15
  595. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/resolveConfig.js +0 -105
  596. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
  597. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -329
  598. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/speedometer.js +0 -55
  599. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/spread.js +0 -28
  600. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/throttle.js +0 -44
  601. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toFormData.js +0 -286
  602. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  603. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/trackStream.js +0 -89
  604. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/validator.js +0 -112
  605. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  606. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  607. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
  608. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/index.js +0 -13
  609. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/common/utils.js +0 -52
  610. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/index.js +0 -7
  611. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/Buffer.js +0 -11
  612. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
  613. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
  614. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/index.js +0 -37
  615. package/node_modules/@appium/base-driver/node_modules/axios/lib/utils.js +0 -1029
  616. package/node_modules/@appium/base-driver/node_modules/axios/package.json +0 -203
  617. package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
  618. package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -215
  619. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  620. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  621. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -301
  622. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  623. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
  624. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
  625. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
  626. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
  627. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +0 -3
  628. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  629. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  630. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -288
  631. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  632. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
  633. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
  634. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  635. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
  636. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +0 -3
  637. package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncbox.ts +0 -365
  638. package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
  639. package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
  640. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +0 -1872
  641. package/node_modules/@appium/support/node_modules/axios/LICENSE +0 -7
  642. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +0 -877
  643. package/node_modules/@appium/support/node_modules/axios/README.md +0 -2623
  644. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +0 -5509
  645. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +0 -5
  646. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +0 -1
  647. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +0 -5469
  648. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +0 -5490
  649. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +0 -3
  650. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +0 -1
  651. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +0 -6356
  652. package/node_modules/@appium/support/node_modules/axios/index.d.cts +0 -762
  653. package/node_modules/@appium/support/node_modules/axios/index.d.ts +0 -783
  654. package/node_modules/@appium/support/node_modules/axios/index.js +0 -45
  655. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +0 -36
  656. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +0 -132
  657. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +0 -643
  658. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +0 -1406
  659. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +0 -228
  660. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +0 -89
  661. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +0 -135
  662. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +0 -22
  663. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +0 -5
  664. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +0 -301
  665. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +0 -219
  666. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +0 -474
  667. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +0 -72
  668. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +0 -8
  669. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +0 -88
  670. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +0 -89
  671. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +0 -174
  672. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +0 -27
  673. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +0 -27
  674. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +0 -28
  675. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +0 -177
  676. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +0 -10
  677. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +0 -3
  678. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +0 -2
  679. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +0 -1
  680. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
  681. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
  682. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
  683. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -78
  684. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +0 -7
  685. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
  686. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +0 -14
  687. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +0 -69
  688. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +0 -18
  689. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +0 -23
  690. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +0 -68
  691. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +0 -64
  692. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
  693. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -166
  694. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +0 -125
  695. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
  696. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
  697. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
  698. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  699. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
  700. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +0 -2
  701. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +0 -71
  702. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  703. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
  704. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +0 -15
  705. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +0 -105
  706. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
  707. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -329
  708. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +0 -55
  709. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +0 -28
  710. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +0 -44
  711. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +0 -286
  712. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  713. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +0 -89
  714. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +0 -112
  715. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  716. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  717. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
  718. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +0 -13
  719. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +0 -52
  720. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +0 -7
  721. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +0 -11
  722. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
  723. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
  724. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +0 -37
  725. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +0 -1029
  726. package/node_modules/@appium/support/node_modules/axios/package.json +0 -203
  727. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.6.6.apk.idsig +0 -0
  728. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  729. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  730. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  731. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  732. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  733. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  734. package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  735. package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  736. package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  737. package/node_modules/big-integer/BigInteger.d.ts +0 -2393
  738. package/node_modules/big-integer/BigInteger.js +0 -1453
  739. package/node_modules/big-integer/BigInteger.min.js +0 -1
  740. package/node_modules/big-integer/LICENSE +0 -24
  741. package/node_modules/big-integer/README.md +0 -589
  742. package/node_modules/big-integer/bower.json +0 -29
  743. package/node_modules/big-integer/package.json +0 -48
  744. package/node_modules/big-integer/tsconfig.json +0 -24
  745. package/node_modules/bplist-creator/bplistCreator.d.ts +0 -8
  746. package/node_modules/bplist-creator/bplistCreator.js +0 -460
  747. package/node_modules/bplist-creator/test/airplay.bplist +0 -0
  748. package/node_modules/bplist-creator/test/binaryData.bplist +0 -0
  749. package/node_modules/bplist-creator/test/creatorTest.js +0 -211
  750. package/node_modules/bplist-creator/test/iTunes-small.bplist +0 -0
  751. package/node_modules/bplist-creator/test/integers.bplist +0 -0
  752. package/node_modules/bplist-creator/test/sample1.bplist +0 -0
  753. package/node_modules/bplist-creator/test/sample2.bplist +0 -0
  754. package/node_modules/bplist-creator/test/uid.bplist +0 -0
  755. package/node_modules/bplist-creator/test/utf16.bplist +0 -0
  756. package/node_modules/bplist-parser/.editorconfig +0 -12
  757. package/node_modules/bplist-parser/.eslintignore +0 -1
  758. package/node_modules/bplist-parser/.eslintrc.js +0 -296
  759. package/node_modules/bplist-parser/bplistParser.d.ts +0 -8
  760. package/node_modules/io.appium.settings/build/lib/utils.d.ts.map +0 -1
  761. package/node_modules/io.appium.settings/build/lib/utils.js.map +0 -1
  762. package/node_modules/on-finished/HISTORY.md +0 -98
  763. package/node_modules/shell-quote/.nycrc +0 -14
  764. package/node_modules/shell-quote/eslint.config.mjs +0 -29
  765. package/node_modules/shell-quote/security.md +0 -11
  766. package/node_modules/shell-quote/test/comment.js +0 -16
  767. package/node_modules/shell-quote/test/env.js +0 -52
  768. package/node_modules/shell-quote/test/env_fn.js +0 -21
  769. package/node_modules/shell-quote/test/op.js +0 -102
  770. package/node_modules/shell-quote/test/parse.js +0 -149
  771. package/node_modules/shell-quote/test/quote.js +0 -145
  772. package/node_modules/shell-quote/test/set.js +0 -31
  773. package/node_modules/stream-buffers/.travis.yml +0 -28
  774. package/node_modules/stream-buffers/coverage/coverage.json +0 -1
  775. package/node_modules/stream-buffers/coverage/lcov-report/base.css +0 -182
  776. package/node_modules/stream-buffers/coverage/lcov-report/index.html +0 -73
  777. package/node_modules/stream-buffers/coverage/lcov-report/lib/constants.js.html +0 -63
  778. package/node_modules/stream-buffers/coverage/lcov-report/lib/index.html +0 -112
  779. package/node_modules/stream-buffers/coverage/lcov-report/lib/readable_streambuffer.js.html +0 -453
  780. package/node_modules/stream-buffers/coverage/lcov-report/lib/streambuffer.js.html +0 -54
  781. package/node_modules/stream-buffers/coverage/lcov-report/lib/writable_streambuffer.js.html +0 -336
  782. package/node_modules/stream-buffers/coverage/lcov-report/prettify.css +0 -1
  783. package/node_modules/stream-buffers/coverage/lcov-report/prettify.js +0 -1
  784. package/node_modules/stream-buffers/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  785. package/node_modules/stream-buffers/coverage/lcov-report/sorter.js +0 -156
  786. package/node_modules/stream-buffers/coverage/lcov.info +0 -305
  787. /package/node_modules/io.appium.settings/lib/{utils.ts → utils/apk-path.ts} +0 -0
@@ -5,6 +5,7 @@ var qs = require('../');
5
5
  var utils = require('../lib/utils');
6
6
  var iconv = require('iconv-lite');
7
7
  var SaferBuffer = require('safer-buffer').Buffer;
8
+ var url = require('url');
8
9
  var hasSymbols = require('has-symbols');
9
10
  var mockProperty = require('mock-property');
10
11
  var emptyTestCases = require('./empty-keys-cases').emptyTestCases;
@@ -24,6 +25,28 @@ test('stringify()', function (t) {
24
25
  st.end();
25
26
  });
26
27
 
28
+ t.test('stringifies lone surrogates as U+FFFD', function (st) {
29
+ st.equal(qs.stringify({ a: '\uD800x' }), 'a=%EF%BF%BDx', 'lone high surrogate does not swallow the next character');
30
+ st.equal(qs.stringify({ a: '\uDC00x' }), 'a=%EF%BF%BDx', 'lone low surrogate does not swallow the next character');
31
+ st.equal(qs.stringify({ '\uD800': 'b' }), '%EF%BF%BD=b', 'lone surrogate in a key');
32
+ st.deepEqual(qs.parse(qs.stringify({ a: 'x\uD800y' })), { a: 'x\uFFFDy' }, 'parses back with U+FFFD in place of the lone surrogate');
33
+ st.equal(qs.stringify({ '\uDC00': 'b' }), '%EF%BF%BD=b', 'lone low surrogate in a key');
34
+ st.equal(qs.stringify({ a: { 'b\uD800': 'c' } }), 'a%5Bb%EF%BF%BD%5D=c', 'lone surrogate in a nested key does not swallow the closing bracket');
35
+ st.equal(qs.stringify({ a: '\uD800 x' }, { format: 'RFC1738' }), 'a=%EF%BF%BD+x', 'lone surrogate does not swallow a space in RFC1738');
36
+ st.equal(
37
+ qs.stringify({ 'a\uD800': { b: 'c' } }, { allowDots: true, encodeDotInKeys: true }),
38
+ 'a%EF%BF%BD.b=c',
39
+ 'lone surrogate does not swallow a dot separator'
40
+ );
41
+ st.equal(qs.stringify({ a: ['x\uD800', 'y'] }, { arrayFormat: 'comma' }), 'a=x%EF%BF%BD%2Cy', 'lone surrogate does not swallow a comma');
42
+ st.equal(
43
+ qs.stringify({ a: ['x\uD800', 'y'] }, { arrayFormat: 'comma', encodeValuesOnly: true }),
44
+ 'a=x%EF%BF%BD,y',
45
+ 'lone surrogate at the end of a comma-joined element encodes as U+FFFD'
46
+ );
47
+ st.end();
48
+ });
49
+
27
50
  t.test('stringifies falsy values', function (st) {
28
51
  st.equal(qs.stringify(undefined), '');
29
52
  st.equal(qs.stringify(null), '');
@@ -212,63 +235,94 @@ test('stringify()', function (t) {
212
235
  st.end();
213
236
  });
214
237
 
215
- // Characterization of the CURRENT (buggy) behavior: with `allowDots` + `encodeDotInKeys`,
216
- // `stringify` percent-encodes the structural `.` separators that `allowDots` inserts between
217
- // nested keys, not just the literal dots inside a key, which breaks the stringify -> parse
218
- // round-trip. These assertions pin that behavior so it cannot change silently: the fix in
219
- // https://github.com/ljharb/qs/pull/564 changes every output below, so landing that fix MUST
220
- // update this test (that is the point — it forces the behavior change to be explicit).
221
- t.test('[characterization] encodeDotInKeys currently over-encodes structural separator dots (pre-#564)', function (st) {
238
+ t.test('does not encode the structural separator dots between nested keys when encodeDotInKeys and allowDots are provided', function (st) {
222
239
  st.equal(
223
- qs.stringify({ a: { b: { c: 'd' } } }, { allowDots: true, encodeDotInKeys: true }),
224
- 'a%252Eb.c=d',
225
- 'over-encodes the a->b separator (#564: should become a.b.c=d)'
240
+ qs.stringify(
241
+ { a: { b: { c: 'd' } } },
242
+ { allowDots: true, encodeDotInKeys: true }
243
+ ),
244
+ 'a.b.c=d',
245
+ 'no key contains a literal dot, so encodeDotInKeys is a no-op on the separators'
226
246
  );
227
247
  st.equal(
228
- qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true, encodeDotInKeys: true }),
229
- 'a%252Eb%252Ec.d=e',
230
- 'clobbers every separator but the last (#564: should become a.b.c.d=e)'
248
+ qs.stringify(
249
+ { a: { b: { c: { d: 'e' } } } },
250
+ { allowDots: true, encodeDotInKeys: true }
251
+ ),
252
+ 'a.b.c.d=e',
253
+ 'every nesting separator is preserved, not just the last one'
231
254
  );
232
- st.equal(
233
- qs.stringify({ 'a.b': { c: { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
234
- 'a%252Eb%252Ec.d=e',
235
- 'top-level dotted key: deeper separators also get encoded (#564: should become a%252Eb.c.d=e)'
255
+
256
+ st.deepEqual(
257
+ qs.parse(
258
+ qs.stringify({ a: { b: { c: 'd' } } }, { allowDots: true, encodeDotInKeys: true }),
259
+ { allowDots: true, decodeDotInKeys: true }
260
+ ),
261
+ { a: { b: { c: 'd' } } },
262
+ 'stringify -> parse round-trips a deeply nested object'
236
263
  );
264
+
265
+ st.end();
266
+ });
267
+
268
+ t.test('encodeDotInKeys encodes only literal dots inside nested keys, never the structural separators, at any depth', function (st) {
237
269
  st.equal(
238
270
  qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
239
- 'a%252Eb%252Ec.d=e',
240
- 'nested dotted key + object value: the separator around it is encoded (#564: should become a.b%252Ec.d=e)'
271
+ 'a.b%252Ec.d=e',
272
+ 'a nested key with a literal dot and an object value encodes only its own dot'
273
+ );
274
+ st.equal(
275
+ qs.stringify({ 'a.b': { c: { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
276
+ 'a%252Eb.c.d=e',
277
+ 'a top-level dotted key stays encoded while deeper separators stay literal'
241
278
  );
242
279
  st.equal(
243
280
  qs.stringify({ a: { b: { 'c.d': { e: 'f' } } } }, { allowDots: true, encodeDotInKeys: true }),
244
- 'a%252Eb%252Ec%252Ed.e=f',
245
- 'deeply nested dotted key: all separators encoded (#564: should become a.b.c%252Ed.e=f)'
281
+ 'a.b.c%252Ed.e=f',
282
+ 'a literal dot in a deeply nested key is encoded without touching the separators around it'
246
283
  );
247
284
 
248
285
  st.equal(
249
286
  qs.stringify({ a: { b: [1, 2] } }, { allowDots: true, encodeDotInKeys: true }),
250
- 'a%252Eb%5B0%5D=1&a%252Eb%5B1%5D=2',
251
- 'array value under nested keys: separator encoded (#564: should become a.b%5B0%5D=1&a.b%5B1%5D=2)'
287
+ 'a.b%5B0%5D=1&a.b%5B1%5D=2',
288
+ 'separator dots are preserved for an array value nested under keys'
252
289
  );
253
290
  st.equal(
254
291
  qs.stringify({ a: { 'b.c': [1, 2] } }, { allowDots: true, encodeDotInKeys: true }),
255
- 'a%252Eb%252Ec%5B0%5D=1&a%252Eb%252Ec%5B1%5D=2',
256
- 'array value under nested dotted key (#564: should become a.b%252Ec%5B0%5D=1&a.b%252Ec%5B1%5D=2)'
292
+ 'a.b%252Ec%5B0%5D=1&a.b%252Ec%5B1%5D=2',
293
+ 'a nested dotted key with an array value encodes only its own dot'
257
294
  );
258
295
 
259
- st.equal(
260
- qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: false, encodeDotInKeys: true }),
261
- 'a%5Bb%252Ec%5D%5Bd%5D=e',
262
- 'allowDots:false object value encodes the nested-key dot, unlike the primitive-value case (#564: should become a%5Bb.c%5D%5Bd%5D=e)'
296
+ st.deepEqual(
297
+ qs.parse(
298
+ qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
299
+ { allowDots: true, decodeDotInKeys: true }
300
+ ),
301
+ { a: { 'b.c': { d: 'e' } } },
302
+ 'stringify -> parse round-trips a nested dotted key with an object value'
263
303
  );
264
-
265
304
  st.deepEqual(
266
305
  qs.parse(
267
- qs.stringify({ a: { b: { c: 'd' } } }, { allowDots: true, encodeDotInKeys: true }),
306
+ qs.stringify({ 'a.b': { c: { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
268
307
  { allowDots: true, decodeDotInKeys: true }
269
308
  ),
270
- { 'a.b': { c: 'd' } },
271
- 'the over-encoding breaks the round-trip: {a:{b:{c}}} comes back as {"a.b":{c}} (#564 restores it)'
309
+ { 'a.b': { c: { d: 'e' } } },
310
+ 'stringify -> parse round-trips a top-level dotted key with deep nesting'
311
+ );
312
+
313
+ st.end();
314
+ });
315
+
316
+ t.test('with allowDots false, encodeDotInKeys leaves nested-key dots literal, consistently for object and primitive values', function (st) {
317
+ st.equal(
318
+ qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: false, encodeDotInKeys: true }),
319
+ 'a%5Bb.c%5D%5Bd%5D=e',
320
+ 'nested dotted key with an object value'
321
+ );
322
+ st.equal(
323
+ qs.stringify({ a: { 'b.c': 'e' } }, { allowDots: false, encodeDotInKeys: true }),
324
+ 'a%5Bb.c%5D=e',
325
+ 'nested dotted key with a primitive value matches the object-value case'
272
326
  );
273
327
 
274
328
  st.end();
@@ -394,6 +448,41 @@ test('stringify()', function (t) {
394
448
  st.end();
395
449
  });
396
450
 
451
+ t.test('ignores inherited array format names', function (st) {
452
+ var array = { a: ['b', 'c'] };
453
+ var indices = 'a%5B0%5D=b&a%5B1%5D=c';
454
+ var repeat = 'a=b&a=c';
455
+
456
+ st.equal(qs.stringify(array, { arrayFormat: 'unsupported' }), indices, 'unknown format falls back to `indices`');
457
+
458
+ var names = [
459
+ 'constructor',
460
+ 'toString',
461
+ '__proto__',
462
+ 'valueOf',
463
+ 'hasOwnProperty',
464
+ 'isPrototypeOf',
465
+ 'propertyIsEnumerable',
466
+ 'toLocaleString'
467
+ ];
468
+ for (var i = 0; i < names.length; i++) {
469
+ var name = names[i];
470
+ st.equal(qs.stringify(array, { arrayFormat: name }), indices, '`' + name + '` falls back to `indices`');
471
+ st.equal(
472
+ qs.stringify(array, { arrayFormat: name, indices: true }),
473
+ indices,
474
+ '`' + name + '` with `indices: true` falls back to `indices`'
475
+ );
476
+ st.equal(
477
+ qs.stringify(array, { arrayFormat: name, indices: false }),
478
+ repeat,
479
+ '`' + name + '` with `indices: false` falls back to `repeat`'
480
+ );
481
+ }
482
+
483
+ st.end();
484
+ });
485
+
397
486
  t.test('`skipNulls` option', function (st) {
398
487
  st.equal(
399
488
  qs.stringify({ a: 'b', c: null }, { skipNulls: true }),
@@ -454,6 +543,24 @@ test('stringify()', function (t) {
454
543
  st.end();
455
544
  });
456
545
 
546
+ t.test('allowEmptyArrays keys that need no encoding', function (st) {
547
+ st.equal(qs.stringify({ foo: [] }, { allowEmptyArrays: true, format: 'RFC1738' }), 'foo[]', 'a top-level key in RFC1738');
548
+ st.equal(
549
+ qs.stringify({ a: { b: [] }, c: 'd e' }, { allowEmptyArrays: true, encodeValuesOnly: true }),
550
+ 'a[b][]&c=d%20e',
551
+ 'a nested key with encodeValuesOnly'
552
+ );
553
+ st.equal(qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, encode: false }), 'a[b][]', 'a nested key with encode: false');
554
+ st.equal(qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, allowDots: true }), 'a.b[]', 'a nested key with allowDots');
555
+ st.equal(
556
+ qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, allowDots: true, format: 'RFC1738' }),
557
+ 'a.b[]',
558
+ 'a nested key with allowDots in RFC1738'
559
+ );
560
+
561
+ st.end();
562
+ });
563
+
457
564
  t.test('allowEmptyArrays + strictNullHandling', function (st) {
458
565
  st.equal(
459
566
  qs.stringify(
@@ -499,6 +606,62 @@ test('stringify()', function (t) {
499
606
  st.end();
500
607
  });
501
608
 
609
+ t.test('should encode the key of an empty array when allowEmptyArrays is set', function (st) {
610
+ st.equal(
611
+ qs.stringify({ 'a b': [] }, { allowEmptyArrays: true }),
612
+ 'a%20b[]',
613
+ 'default (RFC3986) percent-encodes the space in the key'
614
+ );
615
+ st.equal(
616
+ qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, format: 'RFC1738' }),
617
+ 'a+b[]',
618
+ 'RFC1738 encodes the space in the key as a plus'
619
+ );
620
+ st.equal(
621
+ qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, encodeValuesOnly: true }),
622
+ 'a b[]',
623
+ 'encodeValuesOnly leaves the key unencoded'
624
+ );
625
+ st.equal(
626
+ qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, encode: false }),
627
+ 'a b[]',
628
+ 'encode: false leaves the key unencoded'
629
+ );
630
+
631
+ st.deepEqual(
632
+ qs.parse(qs.stringify({ 'a b': [], 'a&b=c': [] }, { allowEmptyArrays: true }), { allowEmptyArrays: true }),
633
+ { 'a b': [], 'a&b=c': [] },
634
+ 'the encoded keys round-trip back to the original, including `&` and `=`'
635
+ );
636
+ st.equal(
637
+ qs.stringify({ 'a b': ['x'] }, { allowEmptyArrays: true, arrayFormat: 'brackets' }),
638
+ 'a%20b%5B%5D=x',
639
+ 'the same key with a value encodes the key prefix identically'
640
+ );
641
+ st.equal(
642
+ qs.stringify({ a: { 'b c': [] } }, { allowEmptyArrays: true }),
643
+ 'a%5Bb%20c%5D[]',
644
+ 'a nested key prefix is encoded like the value path encodes it'
645
+ );
646
+ st.equal(
647
+ qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true }),
648
+ 'a%5Bb%5D[]',
649
+ 'a nested key that needs no encoding still has its brackets encoded'
650
+ );
651
+ st.equal(
652
+ qs.stringify({ 'a.b': [] }, { allowEmptyArrays: true, allowDots: true, encodeDotInKeys: true }),
653
+ 'a%252Eb[]',
654
+ 'encodeDotInKeys double-encodes the dot, as on the value path'
655
+ );
656
+ st.deepEqual(
657
+ qs.parse('a%252Eb[]', { allowEmptyArrays: true, allowDots: true, decodeDotInKeys: true }),
658
+ { 'a.b': [] },
659
+ 'the encodeDotInKeys output round-trips'
660
+ );
661
+
662
+ st.end();
663
+ });
664
+
502
665
  t.test('stringifies an array value with one item vs multiple items', function (st) {
503
666
  st.test('non-array item', function (s2t) {
504
667
  s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c');
@@ -569,6 +732,53 @@ test('stringify()', function (t) {
569
732
  st.end();
570
733
  });
571
734
 
735
+ t.test('encodes comma array values with the same encoder arguments as other values, with encodeValuesOnly', function (st) {
736
+ var commaValuesOnly = { arrayFormat: 'comma', encodeValuesOnly: true };
737
+
738
+ st.equal(
739
+ qs.stringify({ a: ['é', 'x'], b: 'é' }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)),
740
+ 'a=%E9,x&b=%E9',
741
+ 'respects charset iso-8859-1'
742
+ );
743
+ st.deepEqual(
744
+ qs.parse(qs.stringify({ a: ['é', 'x'] }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)), { charset: 'iso-8859-1', comma: true }),
745
+ { a: ['é', 'x'] },
746
+ 'round-trips in iso-8859-1'
747
+ );
748
+ st.equal(
749
+ qs.stringify({ a: ['☺'] }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)),
750
+ 'a=%26%239786%3B',
751
+ 'encodes unrepresentable chars as numeric entities in iso-8859-1'
752
+ );
753
+ st.equal(
754
+ qs.stringify({ a: ['(x)', 'y z'], b: '(x)' }, utils.assign({ format: qs.formats.RFC1738 }, commaValuesOnly)),
755
+ 'a=(x),y+z&b=(x)',
756
+ 'respects format RFC1738'
757
+ );
758
+
759
+ var calls = [];
760
+ st.equal(
761
+ qs.stringify({ a: ['b', 'c'] }, utils.assign({
762
+ encoder: function (str, defaultEncoder, charset, kind, format) {
763
+ calls[calls.length] = [str, typeof defaultEncoder, charset, kind, format];
764
+ return defaultEncoder(str, defaultEncoder, charset, kind, format).toUpperCase();
765
+ }
766
+ }, commaValuesOnly)),
767
+ 'a=B,C',
768
+ 'a custom encoder can call defaultEncoder'
769
+ );
770
+ st.deepEqual(
771
+ calls,
772
+ [
773
+ ['b', 'function', 'utf-8', 'value', qs.formats.RFC3986],
774
+ ['c', 'function', 'utf-8', 'value', qs.formats.RFC3986]
775
+ ],
776
+ 'a custom encoder receives defaultEncoder, charset, kind, and format'
777
+ );
778
+
779
+ st.end();
780
+ });
781
+
572
782
  t.test('stringifies comma and empty non-array values', function (st) {
573
783
  st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'indices' }), 'a=,&b=&c=c,d%');
574
784
  st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'brackets' }), 'a=,&b=&c=c,d%');
@@ -865,6 +1075,112 @@ test('stringify()', function (t) {
865
1075
  st.end();
866
1076
  });
867
1077
 
1078
+ t.test('arrayFormat=comma: does not crash on entries with no callable `toString`', function (st) {
1079
+ var json = JSON.parse('{ "a": ["b", { "toString": "x" }, "c"] }');
1080
+ st.equal(qs.stringify(json, { arrayFormat: 'comma' }), 'a=b%2C%5Bobject%20Object%5D%2Cc', 'JSON own `toString`');
1081
+ st.equal(qs.stringify(json, { arrayFormat: 'comma', encode: false }), 'a=b,[object Object],c', 'with encode: false');
1082
+ st.equal(
1083
+ qs.stringify(json, { arrayFormat: 'comma', encodeValuesOnly: true }),
1084
+ 'a=b,%5Bobject%20Object%5D,c',
1085
+ 'with encodeValuesOnly'
1086
+ );
1087
+ st.equal(
1088
+ qs.stringify(JSON.parse('{ "a": [{ "toString": "x" }] }'), { arrayFormat: 'comma', commaRoundTrip: true }),
1089
+ 'a%5B%5D=%5Bobject%20Object%5D',
1090
+ 'with commaRoundTrip'
1091
+ );
1092
+ st.equal(
1093
+ qs.stringify(JSON.parse('{ "a": [{ "toString": "x" }] }'), { arrayFormat: 'comma' }),
1094
+ qs.stringify({ a: [{ b: 1 }] }, { arrayFormat: 'comma' }),
1095
+ 'renders the same as a plain object entry'
1096
+ );
1097
+
1098
+ st.equal(
1099
+ qs.stringify(qs.parse('a[][b]=c', { plainObjects: true }), { arrayFormat: 'comma' }),
1100
+ 'a=%5Bobject%20Object%5D',
1101
+ 'null-prototype entry from `parse` with plainObjects'
1102
+ );
1103
+ st.equal(
1104
+ qs.stringify(qs.parse('a[][b]=c', { plainObjects: true }), { arrayFormat: 'comma', encodeValuesOnly: true }),
1105
+ 'a=%5Bobject%20Object%5D',
1106
+ 'null-prototype entry from `parse` with plainObjects, with encodeValuesOnly'
1107
+ );
1108
+ st.equal(
1109
+ qs.stringify(qs.parse('a[0][toString]=x', { allowPrototypes: true }), { arrayFormat: 'comma' }),
1110
+ 'a=%5Bobject%20Object%5D',
1111
+ 'own `toString` entry from `parse` with allowPrototypes'
1112
+ );
1113
+
1114
+ var nested = JSON.parse('{ "a": [[1, [{ "toString": "x" }]], "y"] }');
1115
+ st.equal(qs.stringify(nested, { arrayFormat: 'comma', encode: false }), 'a=1,[object Object],y', 'nested array');
1116
+ st.equal(
1117
+ qs.stringify(nested, { arrayFormat: 'comma', encodeValuesOnly: true }),
1118
+ 'a=1%2C%5Bobject%20Object%5D,y',
1119
+ 'nested array, with encodeValuesOnly'
1120
+ );
1121
+ st.equal(qs.stringify({ a: [[1, 2], 3] }, { arrayFormat: 'comma', encode: false }), 'a=1,2,3', 'nested array is still flattened');
1122
+
1123
+ var cyclic = [{ toString: 'x' }];
1124
+ cyclic[cyclic.length] = cyclic;
1125
+ st.equal(
1126
+ qs.stringify({ a: cyclic }, { arrayFormat: 'comma', encode: false }),
1127
+ 'a=[object Object],[object Object],',
1128
+ 'cyclic nested array joins its cycle as empty'
1129
+ );
1130
+
1131
+ var customJoin = [{ toString: 'x' }];
1132
+ customJoin.join = function () { return 'j'; };
1133
+ st.equal(qs.stringify({ a: [customJoin, 'y'] }, { arrayFormat: 'comma', encode: false }), 'a=j,y', 'own `join` is still used');
1134
+
1135
+ st.equal(
1136
+ qs.stringify({ a: [{ toString: 'x', valueOf: function () { return 7; } }] }, { arrayFormat: 'comma' }),
1137
+ 'a=7',
1138
+ 'primitive `valueOf` is still used'
1139
+ );
1140
+ st.equal(
1141
+ qs.stringify({ a: [{ toString: 'x', valueOf: function () { return null; } }] }, { arrayFormat: 'comma' }),
1142
+ 'a=null',
1143
+ 'null `valueOf` is still used'
1144
+ );
1145
+ st.equal(
1146
+ qs.stringify({ a: [{ toString: 'x', valueOf: function () { return {}; } }] }, { arrayFormat: 'comma' }),
1147
+ 'a=%5Bobject%20Object%5D',
1148
+ 'non-primitive `valueOf` falls back'
1149
+ );
1150
+
1151
+ st.equal(
1152
+ qs.stringify({ a: [{ toString: function () { return 't'; } }, new Date(0)] }, { arrayFormat: 'comma', encode: false }),
1153
+ 'a=t,1970-01-01T00:00:00.000Z',
1154
+ 'callable `toString` and dates are unaffected'
1155
+ );
1156
+
1157
+ st['throws'](
1158
+ function () {
1159
+ qs.stringify({ a: [{ toString: function () { throw new SyntaxError('mine'); } }] }, { arrayFormat: 'comma' });
1160
+ },
1161
+ SyntaxError,
1162
+ 'a throwing `toString` still throws'
1163
+ );
1164
+ st['throws'](
1165
+ function () {
1166
+ qs.stringify({ a: [{ toString: 'x', valueOf: function () { throw new EvalError('mine'); } }] }, { arrayFormat: 'comma' });
1167
+ },
1168
+ EvalError,
1169
+ 'a throwing `valueOf` still throws'
1170
+ );
1171
+
1172
+ st.end();
1173
+ });
1174
+
1175
+ t.test('arrayFormat=comma: entries with `Symbol.toPrimitive` are unaffected', { skip: !hasSymbols() || typeof Symbol.toPrimitive !== 'symbol' }, function (st) {
1176
+ var entry = { toString: 'x' };
1177
+ entry[Symbol.toPrimitive] = function () { return 'p'; };
1178
+ st.equal(qs.stringify({ a: [entry] }, { arrayFormat: 'comma' }), 'a=p');
1179
+ st.equal(qs.stringify({ a: [entry] }, { arrayFormat: 'comma', encodeValuesOnly: true }), 'a=p');
1180
+
1181
+ st.end();
1182
+ });
1183
+
868
1184
  t.test('stringifies a null object', { skip: !hasProto }, function (st) {
869
1185
  st.equal(qs.stringify({ __proto__: null, a: 'b' }), 'a=b');
870
1186
  st.end();
@@ -1095,6 +1411,53 @@ test('stringify()', function (t) {
1095
1411
  st.end();
1096
1412
  });
1097
1413
 
1414
+ t.test('applies sort to nested keys selected by filter=array', function (st) {
1415
+ var asc = function (a, b) { return a.localeCompare(b); };
1416
+ var desc = function (a, b) { return b.localeCompare(a); };
1417
+
1418
+ st.equal(
1419
+ qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'a', 'c', 'b'], sort: asc, encode: false }),
1420
+ 'a[b]=2&a[c]=1&z=3',
1421
+ 'nested keys are sorted, not left in filter order'
1422
+ );
1423
+ st.equal(
1424
+ qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'b', 'a', 'c'], sort: desc, encode: false }),
1425
+ 'z=3&a[c]=1&a[b]=2',
1426
+ 'nested keys follow a descending sort'
1427
+ );
1428
+ st.equal(
1429
+ qs.stringify({ a: [{ y: 1, x: 2 }] }, { filter: ['a', '0', 'y', 'x'], sort: asc, encode: false }),
1430
+ 'a[0][x]=2&a[0][y]=1',
1431
+ 'keys of objects nested in arrays are sorted'
1432
+ );
1433
+ st.equal(
1434
+ qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'a', 'c', 'b'], encode: false }),
1435
+ 'z=3&a[c]=1&a[b]=2',
1436
+ 'without sort, keys keep filter order at every level'
1437
+ );
1438
+
1439
+ st.end();
1440
+ });
1441
+
1442
+ t.test('does not reorder the caller\'s filter array when sorting', function (st) {
1443
+ var filter = ['z', 'a', 'c', 'b'];
1444
+ var asc = function (a, b) { return a.localeCompare(b); };
1445
+
1446
+ st.equal(
1447
+ qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: filter, sort: asc, encode: false }),
1448
+ 'a[b]=2&a[c]=1&z=3',
1449
+ 'keys are sorted at every level'
1450
+ );
1451
+ st.deepEqual(filter, ['z', 'a', 'c', 'b'], 'filter array is not mutated');
1452
+ st.equal(
1453
+ qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: filter, encode: false }),
1454
+ 'z=3&a[c]=1&a[b]=2',
1455
+ 'reusing the filter without sort keeps its own order'
1456
+ );
1457
+
1458
+ st.end();
1459
+ });
1460
+
1098
1461
  t.test('supports custom representations when filter=function', function (st) {
1099
1462
  var calls = 0;
1100
1463
  var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
@@ -1345,6 +1708,7 @@ test('stringify()', function (t) {
1345
1708
  st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b');
1346
1709
 
1347
1710
  st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar');
1711
+ st.equal(qs.stringify({ 'a~*': '~*()' }, { format: qs.formats.RFC1738 }), 'a~%2A=~%2A()', 'leaves `~` unencoded and encodes `*`');
1348
1712
 
1349
1713
  st.end();
1350
1714
  });
@@ -1353,6 +1717,83 @@ test('stringify()', function (t) {
1353
1717
  st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
1354
1718
  st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
1355
1719
  st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b');
1720
+ st.equal(qs.stringify({ 'a~*': '~*()' }, { format: qs.formats.RFC3986 }), 'a~%2A=~%2A%28%29', 'leaves `~` unencoded, and encodes `*` and parens');
1721
+
1722
+ st.end();
1723
+ });
1724
+
1725
+ t.test('WHATWG serialization', function (st) {
1726
+ st.equal(qs.formats.WHATWG, 'WHATWG', 'is exported');
1727
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.WHATWG }), 'a=b+c');
1728
+ st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.WHATWG }), 'a+b=c+d');
1729
+ st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.WHATWG }), 'a+b=a+b');
1730
+
1731
+ st.equal(qs.stringify({ a: '~' }, { format: qs.formats.WHATWG }), 'a=%7E', 'encodes `~`');
1732
+ st.equal(qs.stringify({ a: '*' }, { format: qs.formats.WHATWG }), 'a=*', 'does not encode `*`');
1733
+ st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.WHATWG }), 'foo%28ref%29=bar', 'encodes parentheses');
1734
+ st.equal(qs.stringify({ a: '-._' }, { format: qs.formats.WHATWG }), 'a=-._');
1735
+ st.equal(qs.stringify({ a: '+&=' }, { format: qs.formats.WHATWG }), 'a=%2B%26%3D');
1736
+ st.equal(qs.stringify({ a: { b: 'c d' } }, { format: qs.formats.WHATWG }), 'a%5Bb%5D=c+d');
1737
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.WHATWG, encode: false }), 'a=b c', 'encode: false leaves the value alone');
1738
+
1739
+ st.equal(
1740
+ qs.stringify({ 'a~b*': { 'c d': '~* ' } }, { format: qs.formats.WHATWG, encodeValuesOnly: true }),
1741
+ 'a~b*[c d]=%7E*+',
1742
+ 'encodeValuesOnly: leaves keys alone'
1743
+ );
1744
+ st.equal(
1745
+ qs.stringify({ a: '~*\u00e9 ' }, { format: qs.formats.WHATWG, charset: 'iso-8859-1' }),
1746
+ 'a=%7E*%E9+',
1747
+ 'charset iso-8859-1'
1748
+ );
1749
+ st.equal(
1750
+ qs.stringify({ a: '~* ' }, {
1751
+ format: qs.formats.WHATWG,
1752
+ encoder: function (str, defaultEncoder, charset, type, format) {
1753
+ return defaultEncoder(str, defaultEncoder, charset, type, format);
1754
+ }
1755
+ }),
1756
+ 'a=%7E*+',
1757
+ 'an encoder wrapping the default encoder'
1758
+ );
1759
+ st.equal(
1760
+ qs.stringify({ a: ['~ x', '*'] }, { format: qs.formats.WHATWG, arrayFormat: 'comma' }),
1761
+ 'a=%7E+x%2C*',
1762
+ 'arrayFormat comma'
1763
+ );
1764
+
1765
+ st.end();
1766
+ });
1767
+
1768
+ var USP = typeof URLSearchParams === 'function' ? URLSearchParams : url.URLSearchParams;
1769
+
1770
+ t.test('WHATWG serialization matches URLSearchParams', { skip: typeof USP !== 'function' }, function (st) {
1771
+ var chars = [];
1772
+ for (var c = 0; c < 0x80; c++) {
1773
+ chars[chars.length] = String.fromCharCode(c);
1774
+ }
1775
+ chars.push('\u00e9', '\u20ac', '\uFFFF', '\uD83D\uDCA9', 'a b~c*d(e)f', '\uD800', '\uDC00', 'x\uDC00y');
1776
+
1777
+ for (var i = 0; i < chars.length; i++) {
1778
+ var key = {};
1779
+ key[chars[i]] = 'v';
1780
+ st.equal(
1781
+ qs.stringify({ k: chars[i] }, { format: qs.formats.WHATWG }),
1782
+ new USP([['k', chars[i]]]).toString(),
1783
+ 'value ' + JSON.stringify(chars[i])
1784
+ );
1785
+ st.equal(
1786
+ qs.stringify(key, { format: qs.formats.WHATWG }),
1787
+ new USP([[chars[i], 'v']]).toString(),
1788
+ 'key ' + JSON.stringify(chars[i])
1789
+ );
1790
+ }
1791
+
1792
+ st.equal(
1793
+ qs.stringify({ a: { 'b~': 'c d' } }, { format: qs.formats.WHATWG }),
1794
+ new USP([['a[b~]', 'c d']]).toString(),
1795
+ 'nested key'
1796
+ );
1356
1797
 
1357
1798
  st.end();
1358
1799
  });
@@ -1480,6 +1921,17 @@ test('stringify()', function (t) {
1480
1921
  st.end();
1481
1922
  });
1482
1923
 
1924
+ t.test('encodes a literal `+` as `%2B` in iso-8859-1 mode so it round-trips', function (st) {
1925
+ st.equal(qs.stringify({ a: 'b+c' }, { charset: 'iso-8859-1' }), 'a=b%2Bc', 'a `+` in a value is percent-encoded');
1926
+ st.equal(qs.stringify({ 'a+b': 'c' }, { charset: 'iso-8859-1' }), 'a%2Bb=c', 'a `+` in a key is percent-encoded');
1927
+ st.deepEqual(
1928
+ qs.parse(qs.stringify({ a: 'b+c' }, { charset: 'iso-8859-1' }), { charset: 'iso-8859-1' }),
1929
+ { a: 'b+c' },
1930
+ 'the `+` survives a round-trip instead of decoding to a space'
1931
+ );
1932
+ st.end();
1933
+ });
1934
+
1483
1935
  t.test('respects an explicit charset of utf-8 (the default)', function (st) {
1484
1936
  st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6');
1485
1937
  st.end();