hinted-tree-merger 6.0.0 → 6.0.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 (3) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +12 -10
  3. package/src/merger.mjs +2 -2
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2023 by arlac77
1
+ Copyright (c) 2019-2024 by arlac77
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "hinted-tree-merger",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "publishConfig": {
5
- "access": "public"
5
+ "access": "public",
6
+ "provenance": true
6
7
  },
7
8
  "exports": {
8
9
  ".": "./src/index.mjs"
@@ -33,18 +34,18 @@
33
34
  "lint:docs": "documentation lint ./src/**/*.mjs"
34
35
  },
35
36
  "devDependencies": {
36
- "ava": "^5.3.1",
37
- "browser-ava": "^2.1.3",
38
- "c8": "^8.0.1",
39
- "documentation": "^14.0.2",
40
- "semantic-release": "^22.0.8"
37
+ "ava": "^6.1.1",
38
+ "browser-ava": "^2.2.0",
39
+ "c8": "^9.1.0",
40
+ "documentation": "^14.0.3",
41
+ "semantic-release": "^23.0.2"
41
42
  },
42
43
  "engines": {
43
- "node": ">=18.18.2"
44
+ "node": ">=20.11.0"
44
45
  },
45
46
  "repository": {
46
47
  "type": "git",
47
- "url": "https://github.com/arlac77/hinted-tree-merger"
48
+ "url": "git+https://github.com/arlac77/hinted-tree-merger.git"
48
49
  },
49
50
  "bugs": {
50
51
  "url": "https://github.com/arlac77/hinted-tree-merger/issues"
@@ -54,7 +55,8 @@
54
55
  "inheritFrom": [
55
56
  "arlac77/template-arlac77-github",
56
57
  "arlac77/template-browser-ava",
57
- "arlac77/template-esm-only"
58
+ "arlac77/template-javascript-component",
59
+ "arlac77/template-node-component"
58
60
  ]
59
61
  }
60
62
  }
package/src/merger.mjs CHANGED
@@ -122,7 +122,7 @@ export function mergeArrays(a, b, path, actions = nullAction, hints) {
122
122
  */
123
123
  export function merge(a, b, path, actions = nullAction, hints) {
124
124
  if (isScalar(a)) {
125
- if (b !== undefined && !isEqual(a, b)) {
125
+ if (b !== undefined && b !== null && !isEqual(a, b)) {
126
126
  const hint = hintFor(hints, path);
127
127
  b = hint.keepHints ? deepCopy(b) : removeHintedValues(b);
128
128
  actions({ add: b, path }, hint);
@@ -139,7 +139,7 @@ export function merge(a, b, path, actions = nullAction, hints) {
139
139
  return new Set(mergeArrays([...a], [...b], path, actions, hints));
140
140
  }
141
141
 
142
- if (b === undefined) {
142
+ if (b === undefined || b === null) {
143
143
  b = {};
144
144
  }
145
145