decocms 2.277.0 → 2.278.0

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 (212) hide show
  1. package/dist/client/assets/{AlertCircle-CDrkM01U.js → AlertCircle-DUgLKRqD.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-D40KhznE.js → ArrowNarrowLeft-kCQ-qIL4.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-BTIsSwsN.js → CheckCircle-DGqHVO6J.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CYdW9NBw.js → ChevronDown-B24A-aAH.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-YkSQYi3B.js → ChevronRight-te-i08ST.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-BcPC1hCC.js → ChevronUp-ClIw8oee.js} +1 -1
  7. package/dist/client/assets/{Container-ChD3KoS4.js → Container-BEpzzcWb.js} +1 -1
  8. package/dist/client/assets/{LinkExternal01-l0w4_WlJ.js → LinkExternal01-DGR8dD9K.js} +1 -1
  9. package/dist/client/assets/{Lock01-CmojMPTn.js → Lock01-CgN6byUv.js} +1 -1
  10. package/dist/client/assets/{Palette-D4s8zWmN.js → Palette-hGvX_iIm.js} +1 -1
  11. package/dist/client/assets/{Play-CiTVDuYt.js → Play-B45MhCGv.js} +1 -1
  12. package/dist/client/assets/{Plus-CVdax6FK.js → Plus-DEi1gvs0.js} +1 -1
  13. package/dist/client/assets/{SearchMd-DJ0JdIz3.js → SearchMd-Bb-t_BjN.js} +1 -1
  14. package/dist/client/assets/{Settings02-D-hypCbK.js → Settings02-DqmMmEZU.js} +1 -1
  15. package/dist/client/assets/{Star01-Vcjv0Tzc.js → Star01-ByFKZL35.js} +1 -1
  16. package/dist/client/assets/{Sun-51uZR1E5.js → Sun-BSLTRNwf.js} +1 -1
  17. package/dist/client/assets/{Tool01-DCaYwllU.js → Tool01-A2H1ijQd.js} +1 -1
  18. package/dist/client/assets/{Trash01-D5ZS0TOT.js → Trash01-Dtv8SktB.js} +1 -1
  19. package/dist/client/assets/{Upload01-CBYhGwn0.js → Upload01-BnthyrUJ.js} +1 -1
  20. package/dist/client/assets/{User01-Dq3q9cE-.js → User01-B6A46HmV.js} +1 -1
  21. package/dist/client/assets/{Users03-BIYd5t8v.js → Users03-SGJicyFL.js} +1 -1
  22. package/dist/client/assets/{X-D_4PiiTE.js → X-ZYbgpGnr.js} +1 -1
  23. package/dist/client/assets/{XCircle-rGav0QLs.js → XCircle-CQXPNkKc.js} +1 -1
  24. package/dist/client/assets/{Zap-qFCEz_qt.js → Zap-CT4bYj4K.js} +1 -1
  25. package/dist/client/assets/{ZapSquare-BYfCzFpy.js → ZapSquare-BIpgOhjL.js} +1 -1
  26. package/dist/client/assets/{accordion-C_FjDGY7.js → accordion-DlHNJyYy.js} +1 -1
  27. package/dist/client/assets/{agent-icon-31CiXnkF.js → agent-icon-BPm7_0O4.js} +1 -1
  28. package/dist/client/assets/{agents-list-kGMjebHK.js → agents-list-DDy9vjua.js} +1 -1
  29. package/dist/client/assets/ai-providers-B4zJ5gIB.js +1 -0
  30. package/dist/client/assets/{alert-dialog-BpydK2MI.js → alert-dialog-BYfF9kq9.js} +1 -1
  31. package/dist/client/assets/{auth-catchall-I0vdEcHs.js → auth-catchall-IXiVEa8k.js} +1 -1
  32. package/dist/client/assets/{automation-list-row-mTTWiKQ6.js → automation-list-row-DdODiuWb.js} +1 -1
  33. package/dist/client/assets/{automations-Z179s9qX.js → automations-DaQmwJ_-.js} +1 -1
  34. package/dist/client/assets/{avatar-BVvDTfBW.js → avatar-Cd7pOZ3k.js} +1 -1
  35. package/dist/client/assets/{badge-BhfSxzi-.js → badge-XxgdnuAZ.js} +1 -1
  36. package/dist/client/assets/{brand-context-Bn_7uvJT.js → brand-context-gdbCtW1V.js} +1 -1
  37. package/dist/client/assets/{card-BAp6Jwgi.js → card-ohyYL2jd.js} +1 -1
  38. package/dist/client/assets/{chat-context-Dp5HM8R-.js → chat-context-BBBi8D2H.js} +1 -1
  39. package/dist/client/assets/{checkbox-BhkHXCse.js → checkbox-CV6BjILT.js} +1 -1
  40. package/dist/client/assets/{collection-detail-Bm3mvhEG.js → collection-detail-BDC-qOMT.js} +1 -1
  41. package/dist/client/assets/{collection-display-button-jqECsu1f.js → collection-display-button-Dzc3fhoU.js} +1 -1
  42. package/dist/client/assets/{collection-search-C0B93tJw.js → collection-search-RK7vbvUN.js} +1 -1
  43. package/dist/client/assets/{collection-table-wrapper-Bf17fkBP.js → collection-table-wrapper-DSiZO_Rx.js} +1 -1
  44. package/dist/client/assets/{collection-tabs-CMC3SILy.js → collection-tabs-BThF2_kc.js} +1 -1
  45. package/dist/client/assets/{collections-DIuw_dNV.js → collections-D4PM7cfP.js} +1 -1
  46. package/dist/client/assets/{command-CRMnQTof.js → command-D-rn-MCf.js} +1 -1
  47. package/dist/client/assets/{connection-card-CJ6uOT9E.js → connection-card-C77H1oWc.js} +1 -1
  48. package/dist/client/assets/{connection-detail-Dj-OLW3C.js → connection-detail-B3eR0g_I.js} +1 -1
  49. package/dist/client/assets/{connection-form-helpers-CDPt3S_P.js → connection-form-helpers-C9kgqFQD.js} +1 -1
  50. package/dist/client/assets/{connections-aYS5E8PJ.js → connections-DLnzLvDf.js} +1 -1
  51. package/dist/client/assets/{constants-BG70AVFL.js → constants-CBMPX4Nz.js} +1 -1
  52. package/dist/client/assets/{constants-CdNdiXMf.js → constants-DV3gfGwj.js} +1 -1
  53. package/dist/client/assets/{dialog-C0FUDu40.js → dialog-LWRIZTr3.js} +1 -1
  54. package/dist/client/assets/{drawer-D4_wXu6X.js → drawer-D1pg0ocH.js} +1 -1
  55. package/dist/client/assets/{dropdown-menu-aG44dJsz.js → dropdown-menu-DLn7MpGb.js} +1 -1
  56. package/dist/client/assets/{dynamic-plugin-layout-pzG9mWCw.js → dynamic-plugin-layout-BSXEX5vh.js} +1 -1
  57. package/dist/client/assets/{empty-state-BjAjwUcB.js → empty-state-DkrYdGBA.js} +1 -1
  58. package/dist/client/assets/{empty-state-BGqwS_3w.js → empty-state-t8Y8fpWZ.js} +1 -1
  59. package/dist/client/assets/{extract-connection-data-CAAXAkZY.js → extract-connection-data-BhJroSSL.js} +1 -1
  60. package/dist/client/assets/{features-DCfAHIGS.js → features-B5cMQOy4.js} +1 -1
  61. package/dist/client/assets/{form-BQFhlKGv.js → form-DYWw7BDT.js} +1 -1
  62. package/dist/client/assets/{general-0YlUSUig.js → general-Bx99MR-8.js} +1 -1
  63. package/dist/client/assets/{index-CoTOPljc.js → index-9mpD21lu.js} +1 -1
  64. package/dist/client/assets/{index-CEQG3Gi2.js → index-BAPPcxpC.js} +1 -1
  65. package/dist/client/assets/{index-EE9r4ne7.js → index-CAeiwvn1.js} +2 -2
  66. package/dist/client/assets/{index-C6SXa4V4.js → index-CTb5Ivgi.js} +1 -1
  67. package/dist/client/assets/{index-mdSoEPSF.js → index-DNVFRTN5.js} +1 -1
  68. package/dist/client/assets/{index-DRjT3wqk.js → index-DQr1bBCj.js} +3 -3
  69. package/dist/client/assets/{index-CIlSPTSj.js → index-DphB1nct.js} +1 -1
  70. package/dist/client/assets/{index-CN1oVHjb.js → index-Ds-JIDUi.js} +4 -4
  71. package/dist/client/assets/{index-NYDZhYFt.js → index-RqKqA1J6.js} +1 -1
  72. package/dist/client/assets/{index-BRiQU6du.js → index-dR4PVdxt.js} +1 -1
  73. package/dist/client/assets/{infiniteQueryObserver-BQYXKuj2.js → infiniteQueryObserver-DgmIeDDw.js} +1 -1
  74. package/dist/client/assets/{input-r_oEqK-V.js → input-bSmRFU9Y.js} +1 -1
  75. package/dist/client/assets/{integration-icon-BKKqOsd5.js → integration-icon-BCfLG4yN.js} +1 -1
  76. package/dist/client/assets/{label-CenAgqhm.js → label-DHm3L_Pw.js} +1 -1
  77. package/dist/client/assets/{layout-DB6YepVn.js → layout-Bi-oKYFz.js} +1 -1
  78. package/dist/client/assets/{lean-canvas-recruit-modal-TnasvQfT.js → lean-canvas-recruit-modal-Y-73eqIT.js} +1 -1
  79. package/dist/client/assets/{login-DDMVtz0x.js → login-oTC9k0u0.js} +1 -1
  80. package/dist/client/assets/{members-BH6aFn0i.js → members-DXtluaQF.js} +1 -1
  81. package/dist/client/assets/{monaco-editor-C3TYqqnp.js → monaco-editor-J6gXCbSf.js} +1 -1
  82. package/dist/client/assets/{monitoring-stats-row-DosCpU_L.js → monitoring-stats-row-COftXD12.js} +1 -1
  83. package/dist/client/assets/{oauth-callback-ai-provider-DjkxS6zo.js → oauth-callback-ai-provider-BG5KUhrn.js} +1 -1
  84. package/dist/client/assets/{oauth-callback-BV7Kg1aN.js → oauth-callback-iJ681_o2.js} +1 -1
  85. package/dist/client/assets/{onboarding-DmzJa5qN.js → onboarding-CaPHCpYM.js} +1 -1
  86. package/dist/client/assets/{org-layout-D05CVA_8.js → org-layout-tpbZft4k.js} +1 -1
  87. package/dist/client/assets/{org-plugin-layout-Cv_313Tb.js → org-plugin-layout-DKUGssvU.js} +1 -1
  88. package/dist/client/assets/{plugin-empty-state-CQeGBgOP.js → plugin-empty-state-CjLoe77j.js} +1 -1
  89. package/dist/client/assets/{plugin-header-BXYsY1_p.js → plugin-header-D-DgJiT_.js} +1 -1
  90. package/dist/client/assets/{plugin-layout-Do_Ws-WY.js → plugin-layout-BxoJjnAH.js} +1 -1
  91. package/dist/client/assets/{popover-BktSfQG9.js → popover-QXf8PVl2.js} +1 -1
  92. package/dist/client/assets/{profile-BSS2RbEG.js → profile-BXxDmHas.js} +1 -1
  93. package/dist/client/assets/project-app-view-CpeukqHC.js +1 -0
  94. package/dist/client/assets/registry-BwQkRfy5.js +2 -0
  95. package/dist/client/assets/{registry-layout-B0UM9hrK.js → registry-layout-Dp1ULu6N.js} +1 -1
  96. package/dist/client/assets/{required-auth-layout-C6TLzB3T.js → required-auth-layout-BQkYfP3n.js} +1 -1
  97. package/dist/client/assets/{reset-password-BV1UW9SB.js → reset-password-CU4ON9vN.js} +1 -1
  98. package/dist/client/assets/{scroll-area-C6ws31M0.js → scroll-area-CM6U9wSm.js} +1 -1
  99. package/dist/client/assets/{search-input-Dxw50-Fc.js → search-input-D1anatj6.js} +1 -1
  100. package/dist/client/assets/{select-DMKL-iI9.js → select-DE9H0LNP.js} +1 -1
  101. package/dist/client/assets/{select-model-D2d213qn.js → select-model-C72ySuI7.js} +1 -1
  102. package/dist/client/assets/{settings-layout-BBdiRp4e.js → settings-layout-BcGWWnw4.js} +1 -1
  103. package/dist/client/assets/{shell-layout-CDe1Q4z8.js → shell-layout-DbjX6AWI.js} +1 -1
  104. package/dist/client/assets/{skeleton-C8k5qVSG.js → skeleton-DJZQh5Pk.js} +1 -1
  105. package/dist/client/assets/{sso-CChrq6HN.js → sso-330TvduR.js} +1 -1
  106. package/dist/client/assets/{store-Dk4svl-0.js → store-CValARVk.js} +1 -1
  107. package/dist/client/assets/store-registry-DxTZD8aD.js +2 -0
  108. package/dist/client/assets/{switch-BlmZa3uf.js → switch-DXZpP3PP.js} +1 -1
  109. package/dist/client/assets/{table-omg9OiL8.js → table-BC1vaa2h.js} +1 -1
  110. package/dist/client/assets/{tabs-ZI6fRQkw.js → tabs-y_vyQ1bZ.js} +1 -1
  111. package/dist/client/assets/{task-status-erNd2Sbl.js → task-status-u0ZgPY9s.js} +31 -31
  112. package/dist/client/assets/{textarea-CpW5pfml.js → textarea-BKBUm0h-.js} +1 -1
  113. package/dist/client/assets/{toggle-group-By5F9baT.js → toggle-group-BGNuzMLR.js} +1 -1
  114. package/dist/client/assets/{tools-list-2T2hc8nL.js → tools-list-DnYw-GLl.js} +1 -1
  115. package/dist/client/assets/{types-BOQuLrVp.js → types-_e2R6uHw.js} +14 -14
  116. package/dist/client/assets/{use-ai-providers-CITI1iNq.js → use-ai-providers-DA7fBB8t.js} +1 -1
  117. package/dist/client/assets/{use-collections-CRzXRke9.js → use-collections-B56DgGhQ.js} +1 -1
  118. package/dist/client/assets/{use-connection-CeSGdaGP.js → use-connection-DmlqhQzU.js} +1 -1
  119. package/dist/client/assets/{use-copy-DGEKKbaG.js → use-copy-yDy37O6x.js} +1 -1
  120. package/dist/client/assets/{use-create-virtual-mcp-UIh1S6RD.js → use-create-virtual-mcp-St-hxc3T.js} +1 -1
  121. package/dist/client/assets/{use-decopilot-events-CN7YV5I-.js → use-decopilot-events-C6hMvsnN.js} +1 -1
  122. package/dist/client/assets/{use-delete-connection-DeXytvwf.js → use-delete-connection-9Vw8o7eu.js} +1 -1
  123. package/dist/client/assets/{use-infinite-scroll-DjXaeUEQ.js → use-infinite-scroll-BDoBJohW.js} +1 -1
  124. package/dist/client/assets/{use-list-state-UZMoJUvO.js → use-list-state-BSaQM_cf.js} +1 -1
  125. package/dist/client/assets/{use-mcp-tools-BKQPDk4x.js → use-mcp-tools-CrNS6JKZ.js} +1 -1
  126. package/dist/client/assets/{use-members-afZV5Me8.js → use-members-CuGMiyzy.js} +1 -1
  127. package/dist/client/assets/{use-mobile-DP4MR1ix.js → use-mobile-Dcrjnr8n.js} +1 -1
  128. package/dist/client/assets/{use-navigate-to-agent-C0iuNKaP.js → use-navigate-to-agent-CK6LXIOn.js} +1 -1
  129. package/dist/client/assets/{use-org-sso-B4mWsSMh.js → use-org-sso-CDZI8wr6.js} +1 -1
  130. package/dist/client/assets/{use-organization-settings-CcvcpCtE.js → use-organization-settings-Dz4Ob_xk.js} +1 -1
  131. package/dist/client/assets/{use-registry-connections-Bj_DPVwf.js → use-registry-connections-C4iSg1no.js} +1 -1
  132. package/dist/client/assets/{use-status-sounds-ChUYFOhF.js → use-status-sounds-BpX9On4z.js} +1 -1
  133. package/dist/client/assets/{use-tasks-DGmrkFpo.js → use-tasks-B1E3D-6c.js} +1 -1
  134. package/dist/client/assets/{use-view-mode-zFqL6G4U.js → use-view-mode-OuDPu3JY.js} +1 -1
  135. package/dist/client/assets/{use-virtual-mcp-Dn9ixQmR.js → use-virtual-mcp-C84ySRY_.js} +1 -1
  136. package/dist/client/assets/useInfiniteQuery-C63zt5p0.js +1 -0
  137. package/dist/client/assets/{user-D7q59BB0.js → user-D-ueNiJ9.js} +1 -1
  138. package/dist/client/assets/{view-mode-toggle-BTfIGFL4.js → view-mode-toggle-JzxZIaam.js} +1 -1
  139. package/dist/client/assets/{workflow-DXb2lFI1.js → workflow-DILBdxqV.js} +1 -1
  140. package/dist/client/assets/workflow-detail-CbBLr-jD.js +1 -0
  141. package/dist/client/index.html +1 -1
  142. package/dist/server/cli.js +1 -1
  143. package/dist/server/node_modules/deepmerge/.editorconfig +7 -0
  144. package/dist/server/node_modules/deepmerge/.eslintcache +1 -0
  145. package/dist/server/node_modules/deepmerge/changelog.md +167 -0
  146. package/dist/server/node_modules/deepmerge/dist/cjs.js +133 -0
  147. package/dist/server/node_modules/deepmerge/dist/umd.js +139 -0
  148. package/dist/server/node_modules/deepmerge/index.d.ts +20 -0
  149. package/dist/server/node_modules/deepmerge/index.js +106 -0
  150. package/dist/server/node_modules/{postgres-bytea/license → deepmerge/license.txt} +1 -1
  151. package/dist/server/node_modules/deepmerge/package.json +42 -0
  152. package/dist/server/node_modules/deepmerge/readme.md +264 -0
  153. package/dist/server/node_modules/deepmerge/rollup.config.js +22 -0
  154. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  155. package/dist/server/node_modules/onetime/index.js +44 -0
  156. package/dist/server/node_modules/onetime/package.json +43 -0
  157. package/dist/server/node_modules/onetime/readme.md +94 -0
  158. package/package.json +1 -1
  159. package/dist/client/assets/ai-providers-Bykzb-xW.js +0 -1
  160. package/dist/client/assets/project-app-view-B_z1QorU.js +0 -1
  161. package/dist/client/assets/registry-B_QfL3wE.js +0 -2
  162. package/dist/client/assets/store-registry-DNqLsJlQ.js +0 -2
  163. package/dist/client/assets/useInfiniteQuery-7hq96Va6.js +0 -1
  164. package/dist/client/assets/workflow-detail-CC_ctEsy.js +0 -1
  165. package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
  166. package/dist/server/node_modules/ansi-styles/index.js +0 -223
  167. package/dist/server/node_modules/ansi-styles/package.json +0 -54
  168. package/dist/server/node_modules/ansi-styles/readme.md +0 -173
  169. package/dist/server/node_modules/figures/index.d.ts +0 -279
  170. package/dist/server/node_modules/figures/index.js +0 -292
  171. package/dist/server/node_modules/figures/license +0 -9
  172. package/dist/server/node_modules/figures/package.json +0 -49
  173. package/dist/server/node_modules/figures/readme.md +0 -337
  174. package/dist/server/node_modules/pg/LICENSE +0 -21
  175. package/dist/server/node_modules/pg/README.md +0 -95
  176. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  177. package/dist/server/node_modules/pg/lib/client.js +0 -743
  178. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  179. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  180. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  181. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  182. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  183. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  184. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  185. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  186. package/dist/server/node_modules/pg/lib/index.js +0 -73
  187. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  188. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  189. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  190. package/dist/server/node_modules/pg/lib/query.js +0 -252
  191. package/dist/server/node_modules/pg/lib/result.js +0 -109
  192. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  193. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  194. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  195. package/dist/server/node_modules/pg/package.json +0 -76
  196. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  197. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  198. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  199. package/dist/server/node_modules/split2/LICENSE +0 -13
  200. package/dist/server/node_modules/split2/README.md +0 -85
  201. package/dist/server/node_modules/split2/bench.js +0 -27
  202. package/dist/server/node_modules/split2/index.js +0 -141
  203. package/dist/server/node_modules/split2/package.json +0 -39
  204. package/dist/server/node_modules/split2/test.js +0 -409
  205. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  206. package/dist/server/node_modules/xtend/LICENSE +0 -20
  207. package/dist/server/node_modules/xtend/README.md +0 -32
  208. package/dist/server/node_modules/xtend/immutable.js +0 -19
  209. package/dist/server/node_modules/xtend/mutable.js +0 -17
  210. package/dist/server/node_modules/xtend/package.json +0 -55
  211. package/dist/server/node_modules/xtend/test.js +0 -103
  212. /package/dist/server/node_modules/{ansi-styles → onetime}/license +0 -0
@@ -0,0 +1,7 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab
5
+ end_of_line = lf
6
+ trim_trailing_whitespace = true
7
+ insert_final_newline = true
@@ -0,0 +1 @@
1
+ [{"/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js":"1"},{"size":1990,"mtime":1679007485753,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ktjd5k","/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js",[],[]]
@@ -0,0 +1,167 @@
1
+ # [4.3.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.3.1)
2
+
3
+ - Fix type definition for arrayMerge options. [#239](https://github.com/TehShrike/deepmerge/pull/239)
4
+
5
+ # [4.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.3.0)
6
+
7
+ - Avoid thrown errors if the target doesn't have `propertyIsEnumerable`. [#252](https://github.com/TehShrike/deepmerge/pull/252)
8
+
9
+ # [4.2.2](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.2)
10
+
11
+ - `isMergeableObject` is now only called if there are two values that could be merged. [a34dd4d2](https://github.com/TehShrike/deepmerge/commit/a34dd4d25bf5e250653540a2022bc832c7b00a19)
12
+
13
+ # [4.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.1)
14
+
15
+ - Fix: falsey values can now be merged. [#170](https://github.com/TehShrike/deepmerge/issues/170)
16
+
17
+ # [4.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.0)
18
+
19
+ - Properties are now only overwritten if they exist on the target object and are enumerable. [#164](https://github.com/TehShrike/deepmerge/pull/164)
20
+
21
+ Technically this could probably be a patch release since "which properties get overwritten" wasn't documented and accidentally overwriting a built-in function or some function up the property chain would almost certainly be undesirable, but it feels like a gray area, so here we are with a feature version bump.
22
+
23
+ # [4.1.2](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.2)
24
+
25
+ - Rolled back #167 since `Object.assign` breaks ES5 support. [55067352](https://github.com/TehShrike/deepmerge/commit/55067352a92c65a6c44a5165f3387720aae1e192)
26
+
27
+ # [4.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.1)
28
+
29
+ - The `options` argument is no longer mutated [#167](https://github.com/TehShrike/deepmerge/pull/167)
30
+
31
+ # [4.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.0)
32
+
33
+ - `cloneUnlessOtherwiseSpecified` is now exposed to the `arrayMerge` function [#165](https://github.com/TehShrike/deepmerge/pull/165)
34
+
35
+ # [4.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.0.0)
36
+
37
+ - The `main` entry point in `package.json` is now a CommonJS module instead of a UMD module [#155](https://github.com/TehShrike/deepmerge/pull/155)
38
+
39
+ # [3.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.3.0)
40
+
41
+ - Enumerable Symbol properties are now copied [#151](https://github.com/TehShrike/deepmerge/pull/151)
42
+
43
+ # [3.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.1)
44
+
45
+ - bumping dev dependency versions to try to shut up bogus security warnings from Github/npm [#149](https://github.com/TehShrike/deepmerge/pull/149)
46
+
47
+ # [3.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.0)
48
+
49
+ - feature: added the [`customMerge`](https://github.com/TehShrike/deepmerge#custommerge) option [#133](https://github.com/TehShrike/deepmerge/pull/133)
50
+
51
+ # [3.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.1.0)
52
+
53
+ - typescript typing: make the `all` function generic [#129](https://github.com/TehShrike/deepmerge/pull/129)
54
+
55
+ # [3.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.0.0)
56
+
57
+ - drop ES module build [#123](https://github.com/TehShrike/deepmerge/issues/123)
58
+
59
+ # [2.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.1)
60
+
61
+ - bug: typescript export type was wrong [#121](https://github.com/TehShrike/deepmerge/pull/121)
62
+
63
+ # [2.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.0)
64
+
65
+ - feature: added TypeScript typings [#119](https://github.com/TehShrike/deepmerge/pull/119)
66
+
67
+ # [2.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.1)
68
+
69
+ - documentation: Rename "methods" to "api", note ESM syntax [#103](https://github.com/TehShrike/deepmerge/pull/103)
70
+ - documentation: Fix grammar [#107](https://github.com/TehShrike/deepmerge/pull/107)
71
+ - documentation: Restructure headers for clarity + some wording tweaks [108](https://github.com/TehShrike/deepmerge/pull/108) + [109](https://github.com/TehShrike/deepmerge/pull/109)
72
+
73
+
74
+ # [2.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.0)
75
+
76
+ - feature: Support a custom `isMergeableObject` function [#96](https://github.com/TehShrike/deepmerge/pull/96)
77
+ - documentation: note a Webpack bug that some users might need to work around [#100](https://github.com/TehShrike/deepmerge/pull/100)
78
+
79
+ # [2.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.1)
80
+
81
+ - documentation: fix the old array merge algorithm in the readme. [#84](https://github.com/TehShrike/deepmerge/pull/84)
82
+
83
+ # [2.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.0)
84
+
85
+ - breaking: the array merge algorithm has changed from a complicated thing to `target.concat(source).map(element => cloneUnlessOtherwiseSpecified(element, optionsArgument))`
86
+ - breaking: The `clone` option now defaults to `true`
87
+ - feature: `merge.all` now accepts an array of any size, even 0 or 1 elements
88
+
89
+ See [pull request 77](https://github.com/TehShrike/deepmerge/pull/77).
90
+
91
+ # [1.5.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.2)
92
+
93
+ - fix: no longer attempts to merge React elements [#76](https://github.com/TehShrike/deepmerge/issues/76)
94
+
95
+ # [1.5.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.1)
96
+
97
+ - bower support: officially dropping bower support. If you use bower, please depend on the [unpkg distribution](https://unpkg.com/deepmerge/dist/umd.js). See [#63](https://github.com/TehShrike/deepmerge/issues/63)
98
+
99
+ # [1.5.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.0)
100
+
101
+ - bug fix: merging objects into arrays was allowed, and doesn't make any sense. [#65](https://github.com/TehShrike/deepmerge/issues/65) published as a feature release instead of a patch because it is a decent behavior change.
102
+
103
+ # [1.4.4](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.4)
104
+
105
+ - bower support: updated `main` in bower.json
106
+
107
+ # [1.4.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.3)
108
+
109
+ - bower support: inline is-mergeable-object in a new CommonJS build, so that people using both bower and CommonJS can bundle the library [0b34e6](https://github.com/TehShrike/deepmerge/commit/0b34e6e95f989f2fc8091d25f0d291c08f3d2d24)
110
+
111
+ # [1.4.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.2)
112
+
113
+ - performance: bump is-mergeable-object dependency version for a slight performance improvement [5906c7](https://github.com/TehShrike/deepmerge/commit/5906c765d691d48e83d76efbb0d4b9ca150dc12c)
114
+
115
+ # [1.4.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.1)
116
+
117
+ - documentation: fix unpkg link [acc45b](https://github.com/TehShrike/deepmerge/commit/acc45be85519c1df906a72ecb24764b622d18d47)
118
+
119
+ # [1.4.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.0)
120
+
121
+ - api: instead of only exporting a UMD module, expose a UMD module with `pkg.main`, a CJS module with `pkg.browser`, and an ES module with `pkg.module` [#62](https://github.com/TehShrike/deepmerge/pull/62)
122
+
123
+ # [1.3.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.2)
124
+
125
+ - documentation: note the minified/gzipped file sizes [56](https://github.com/TehShrike/deepmerge/pull/56)
126
+ - documentation: make data structures more readable in merge example: pull request [57](https://github.com/TehShrike/deepmerge/pull/57)
127
+
128
+ # [1.3.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.1)
129
+
130
+ - documentation: clarify and test some array merging documentation: pull request [51](https://github.com/TehShrike/deepmerge/pull/51)
131
+
132
+ # [1.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.0)
133
+
134
+ - feature: `merge.all`, a merge function that merges any number of objects: pull request [50](https://github.com/TehShrike/deepmerge/pull/50)
135
+
136
+ # [1.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.2.0)
137
+
138
+ - fix: an error that would be thrown when an array would be merged onto a truthy non-array value: pull request [46](https://github.com/TehShrike/deepmerge/pull/46)
139
+ - feature: the ability to clone: Issue [28](https://github.com/TehShrike/deepmerge/issues/28), pull requests [44](https://github.com/TehShrike/deepmerge/pull/44) and [48](https://github.com/TehShrike/deepmerge/pull/48)
140
+ - maintenance: added tests + travis to `.npmignore`: pull request [47](https://github.com/TehShrike/deepmerge/pull/47)
141
+
142
+ # [1.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.1)
143
+
144
+ - fix an issue where an error was thrown when merging an array onto a non-array: [Pull request 46](https://github.com/TehShrike/deepmerge/pull/46)
145
+
146
+ # [1.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.0)
147
+
148
+ - allow consumers to specify their own array merging algorithm: [Pull request 37](https://github.com/TehShrike/deepmerge/pull/37)
149
+
150
+ # [1.0.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.3)
151
+
152
+ - adding bower.json back: [Issue 38](https://github.com/TehShrike/deepmerge/pull/38)
153
+ - updating keywords and Github links in package.json [bc3898e](https://github.com/TehShrike/deepmerge/commit/bc3898e587a56f74591328f40f656b0152c1d5eb)
154
+
155
+ # [1.0.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.2)
156
+
157
+ - Updating the readme: dropping bower, testing that the example works: [7102fc](https://github.com/TehShrike/deepmerge/commit/7102fcc4ddec11e2d33205866f9f18df14e5aeb5)
158
+
159
+ # [1.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.1)
160
+
161
+ - `null`, dates, and regular expressions are now properly merged in arrays: [Issue 18](https://github.com/TehShrike/deepmerge/pull/18), plus commit: [ef1c6b](https://github.com/TehShrike/deepmerge/commit/ef1c6bac8350ba12a24966f0bc7da02560827586)
162
+
163
+ # 1.0.0
164
+
165
+ - Should only be a patch change, because this module is READY. [Issue 15](https://github.com/TehShrike/deepmerge/issues/15)
166
+ - Regular expressions are now treated like primitive values when merging: [Issue 30](https://github.com/TehShrike/deepmerge/pull/30)
167
+ - Dates are now treated like primitives when merging: [Issue 31](https://github.com/TehShrike/deepmerge/issues/31)
@@ -0,0 +1,133 @@
1
+ 'use strict';
2
+
3
+ var isMergeableObject = function isMergeableObject(value) {
4
+ return isNonNullObject(value)
5
+ && !isSpecial(value)
6
+ };
7
+
8
+ function isNonNullObject(value) {
9
+ return !!value && typeof value === 'object'
10
+ }
11
+
12
+ function isSpecial(value) {
13
+ var stringValue = Object.prototype.toString.call(value);
14
+
15
+ return stringValue === '[object RegExp]'
16
+ || stringValue === '[object Date]'
17
+ || isReactElement(value)
18
+ }
19
+
20
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
21
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
22
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
23
+
24
+ function isReactElement(value) {
25
+ return value.$$typeof === REACT_ELEMENT_TYPE
26
+ }
27
+
28
+ function emptyTarget(val) {
29
+ return Array.isArray(val) ? [] : {}
30
+ }
31
+
32
+ function cloneUnlessOtherwiseSpecified(value, options) {
33
+ return (options.clone !== false && options.isMergeableObject(value))
34
+ ? deepmerge(emptyTarget(value), value, options)
35
+ : value
36
+ }
37
+
38
+ function defaultArrayMerge(target, source, options) {
39
+ return target.concat(source).map(function(element) {
40
+ return cloneUnlessOtherwiseSpecified(element, options)
41
+ })
42
+ }
43
+
44
+ function getMergeFunction(key, options) {
45
+ if (!options.customMerge) {
46
+ return deepmerge
47
+ }
48
+ var customMerge = options.customMerge(key);
49
+ return typeof customMerge === 'function' ? customMerge : deepmerge
50
+ }
51
+
52
+ function getEnumerableOwnPropertySymbols(target) {
53
+ return Object.getOwnPropertySymbols
54
+ ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
55
+ return Object.propertyIsEnumerable.call(target, symbol)
56
+ })
57
+ : []
58
+ }
59
+
60
+ function getKeys(target) {
61
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
62
+ }
63
+
64
+ function propertyIsOnObject(object, property) {
65
+ try {
66
+ return property in object
67
+ } catch(_) {
68
+ return false
69
+ }
70
+ }
71
+
72
+ // Protects from prototype poisoning and unexpected merging up the prototype chain.
73
+ function propertyIsUnsafe(target, key) {
74
+ return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
75
+ && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
76
+ && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
77
+ }
78
+
79
+ function mergeObject(target, source, options) {
80
+ var destination = {};
81
+ if (options.isMergeableObject(target)) {
82
+ getKeys(target).forEach(function(key) {
83
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
84
+ });
85
+ }
86
+ getKeys(source).forEach(function(key) {
87
+ if (propertyIsUnsafe(target, key)) {
88
+ return
89
+ }
90
+
91
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
92
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
93
+ } else {
94
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
95
+ }
96
+ });
97
+ return destination
98
+ }
99
+
100
+ function deepmerge(target, source, options) {
101
+ options = options || {};
102
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
103
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
104
+ // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
105
+ // implementations can use it. The caller may not replace it.
106
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
107
+
108
+ var sourceIsArray = Array.isArray(source);
109
+ var targetIsArray = Array.isArray(target);
110
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
111
+
112
+ if (!sourceAndTargetTypesMatch) {
113
+ return cloneUnlessOtherwiseSpecified(source, options)
114
+ } else if (sourceIsArray) {
115
+ return options.arrayMerge(target, source, options)
116
+ } else {
117
+ return mergeObject(target, source, options)
118
+ }
119
+ }
120
+
121
+ deepmerge.all = function deepmergeAll(array, options) {
122
+ if (!Array.isArray(array)) {
123
+ throw new Error('first argument should be an array')
124
+ }
125
+
126
+ return array.reduce(function(prev, next) {
127
+ return deepmerge(prev, next, options)
128
+ }, {})
129
+ };
130
+
131
+ var deepmerge_1 = deepmerge;
132
+
133
+ module.exports = deepmerge_1;
@@ -0,0 +1,139 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
4
+ (global = global || self, global.deepmerge = factory());
5
+ }(this, function () { 'use strict';
6
+
7
+ var isMergeableObject = function isMergeableObject(value) {
8
+ return isNonNullObject(value)
9
+ && !isSpecial(value)
10
+ };
11
+
12
+ function isNonNullObject(value) {
13
+ return !!value && typeof value === 'object'
14
+ }
15
+
16
+ function isSpecial(value) {
17
+ var stringValue = Object.prototype.toString.call(value);
18
+
19
+ return stringValue === '[object RegExp]'
20
+ || stringValue === '[object Date]'
21
+ || isReactElement(value)
22
+ }
23
+
24
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
25
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
26
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
27
+
28
+ function isReactElement(value) {
29
+ return value.$$typeof === REACT_ELEMENT_TYPE
30
+ }
31
+
32
+ function emptyTarget(val) {
33
+ return Array.isArray(val) ? [] : {}
34
+ }
35
+
36
+ function cloneUnlessOtherwiseSpecified(value, options) {
37
+ return (options.clone !== false && options.isMergeableObject(value))
38
+ ? deepmerge(emptyTarget(value), value, options)
39
+ : value
40
+ }
41
+
42
+ function defaultArrayMerge(target, source, options) {
43
+ return target.concat(source).map(function(element) {
44
+ return cloneUnlessOtherwiseSpecified(element, options)
45
+ })
46
+ }
47
+
48
+ function getMergeFunction(key, options) {
49
+ if (!options.customMerge) {
50
+ return deepmerge
51
+ }
52
+ var customMerge = options.customMerge(key);
53
+ return typeof customMerge === 'function' ? customMerge : deepmerge
54
+ }
55
+
56
+ function getEnumerableOwnPropertySymbols(target) {
57
+ return Object.getOwnPropertySymbols
58
+ ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
59
+ return Object.propertyIsEnumerable.call(target, symbol)
60
+ })
61
+ : []
62
+ }
63
+
64
+ function getKeys(target) {
65
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
66
+ }
67
+
68
+ function propertyIsOnObject(object, property) {
69
+ try {
70
+ return property in object
71
+ } catch(_) {
72
+ return false
73
+ }
74
+ }
75
+
76
+ // Protects from prototype poisoning and unexpected merging up the prototype chain.
77
+ function propertyIsUnsafe(target, key) {
78
+ return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
79
+ && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
80
+ && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
81
+ }
82
+
83
+ function mergeObject(target, source, options) {
84
+ var destination = {};
85
+ if (options.isMergeableObject(target)) {
86
+ getKeys(target).forEach(function(key) {
87
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
88
+ });
89
+ }
90
+ getKeys(source).forEach(function(key) {
91
+ if (propertyIsUnsafe(target, key)) {
92
+ return
93
+ }
94
+
95
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
96
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
97
+ } else {
98
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
99
+ }
100
+ });
101
+ return destination
102
+ }
103
+
104
+ function deepmerge(target, source, options) {
105
+ options = options || {};
106
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
107
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
108
+ // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
109
+ // implementations can use it. The caller may not replace it.
110
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
111
+
112
+ var sourceIsArray = Array.isArray(source);
113
+ var targetIsArray = Array.isArray(target);
114
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
115
+
116
+ if (!sourceAndTargetTypesMatch) {
117
+ return cloneUnlessOtherwiseSpecified(source, options)
118
+ } else if (sourceIsArray) {
119
+ return options.arrayMerge(target, source, options)
120
+ } else {
121
+ return mergeObject(target, source, options)
122
+ }
123
+ }
124
+
125
+ deepmerge.all = function deepmergeAll(array, options) {
126
+ if (!Array.isArray(array)) {
127
+ throw new Error('first argument should be an array')
128
+ }
129
+
130
+ return array.reduce(function(prev, next) {
131
+ return deepmerge(prev, next, options)
132
+ }, {})
133
+ };
134
+
135
+ var deepmerge_1 = deepmerge;
136
+
137
+ return deepmerge_1;
138
+
139
+ }));
@@ -0,0 +1,20 @@
1
+ declare function deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
2
+ declare function deepmerge<T1, T2>(x: Partial<T1>, y: Partial<T2>, options?: deepmerge.Options): T1 & T2;
3
+
4
+ declare namespace deepmerge {
5
+ export interface Options {
6
+ arrayMerge?(target: any[], source: any[], options?: ArrayMergeOptions): any[];
7
+ clone?: boolean;
8
+ customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined;
9
+ isMergeableObject?(value: object): boolean;
10
+ }
11
+ export interface ArrayMergeOptions {
12
+ isMergeableObject(value: object): boolean;
13
+ cloneUnlessOtherwiseSpecified(value: object, options?: Options): object;
14
+ }
15
+
16
+ export function all (objects: object[], options?: Options): object;
17
+ export function all<T> (objects: Partial<T>[], options?: Options): T;
18
+ }
19
+
20
+ export = deepmerge;
@@ -0,0 +1,106 @@
1
+ var defaultIsMergeableObject = require('is-mergeable-object')
2
+
3
+ function emptyTarget(val) {
4
+ return Array.isArray(val) ? [] : {}
5
+ }
6
+
7
+ function cloneUnlessOtherwiseSpecified(value, options) {
8
+ return (options.clone !== false && options.isMergeableObject(value))
9
+ ? deepmerge(emptyTarget(value), value, options)
10
+ : value
11
+ }
12
+
13
+ function defaultArrayMerge(target, source, options) {
14
+ return target.concat(source).map(function(element) {
15
+ return cloneUnlessOtherwiseSpecified(element, options)
16
+ })
17
+ }
18
+
19
+ function getMergeFunction(key, options) {
20
+ if (!options.customMerge) {
21
+ return deepmerge
22
+ }
23
+ var customMerge = options.customMerge(key)
24
+ return typeof customMerge === 'function' ? customMerge : deepmerge
25
+ }
26
+
27
+ function getEnumerableOwnPropertySymbols(target) {
28
+ return Object.getOwnPropertySymbols
29
+ ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
30
+ return Object.propertyIsEnumerable.call(target, symbol)
31
+ })
32
+ : []
33
+ }
34
+
35
+ function getKeys(target) {
36
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
37
+ }
38
+
39
+ function propertyIsOnObject(object, property) {
40
+ try {
41
+ return property in object
42
+ } catch(_) {
43
+ return false
44
+ }
45
+ }
46
+
47
+ // Protects from prototype poisoning and unexpected merging up the prototype chain.
48
+ function propertyIsUnsafe(target, key) {
49
+ return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
50
+ && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
51
+ && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
52
+ }
53
+
54
+ function mergeObject(target, source, options) {
55
+ var destination = {}
56
+ if (options.isMergeableObject(target)) {
57
+ getKeys(target).forEach(function(key) {
58
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
59
+ })
60
+ }
61
+ getKeys(source).forEach(function(key) {
62
+ if (propertyIsUnsafe(target, key)) {
63
+ return
64
+ }
65
+
66
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
67
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
68
+ } else {
69
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
70
+ }
71
+ })
72
+ return destination
73
+ }
74
+
75
+ function deepmerge(target, source, options) {
76
+ options = options || {}
77
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge
78
+ options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
79
+ // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
80
+ // implementations can use it. The caller may not replace it.
81
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
82
+
83
+ var sourceIsArray = Array.isArray(source)
84
+ var targetIsArray = Array.isArray(target)
85
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
86
+
87
+ if (!sourceAndTargetTypesMatch) {
88
+ return cloneUnlessOtherwiseSpecified(source, options)
89
+ } else if (sourceIsArray) {
90
+ return options.arrayMerge(target, source, options)
91
+ } else {
92
+ return mergeObject(target, source, options)
93
+ }
94
+ }
95
+
96
+ deepmerge.all = function deepmergeAll(array, options) {
97
+ if (!Array.isArray(array)) {
98
+ throw new Error('first argument should be an array')
99
+ }
100
+
101
+ return array.reduce(function(prev, next) {
102
+ return deepmerge(prev, next, options)
103
+ }, {})
104
+ }
105
+
106
+ module.exports = deepmerge
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
3
+ Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "deepmerge",
3
+ "description": "A library for deep (recursive) merging of Javascript objects",
4
+ "keywords": [
5
+ "merge",
6
+ "deep",
7
+ "extend",
8
+ "copy",
9
+ "clone",
10
+ "recursive"
11
+ ],
12
+ "version": "4.3.1",
13
+ "homepage": "https://github.com/TehShrike/deepmerge",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git://github.com/TehShrike/deepmerge.git"
17
+ },
18
+ "main": "dist/cjs.js",
19
+ "engines": {
20
+ "node": ">=0.10.0"
21
+ },
22
+ "scripts": {
23
+ "build": "rollup -c",
24
+ "test": "npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript",
25
+ "test:typescript": "tsc --noEmit test/typescript.ts && ts-node test/typescript.ts",
26
+ "size": "npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^8.10.54",
30
+ "is-mergeable-object": "1.1.0",
31
+ "is-plain-object": "^5.0.0",
32
+ "jsmd": "^1.0.2",
33
+ "rollup": "^1.23.1",
34
+ "rollup-plugin-commonjs": "^10.1.0",
35
+ "rollup-plugin-node-resolve": "^5.2.0",
36
+ "tape": "^4.11.0",
37
+ "ts-node": "7.0.1",
38
+ "typescript": "=2.2.2",
39
+ "uglify-js": "^3.6.1"
40
+ },
41
+ "license": "MIT"
42
+ }