@onehat/data 1.8.19 → 1.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/src/OneHatData.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/data",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.20",
|
|
4
4
|
"description": "JS data modeling package with adapters for many storage mediums.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -50,18 +50,18 @@
|
|
|
50
50
|
"uuid": "^9.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.
|
|
54
|
-
"@babel/node": "^7.
|
|
55
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
56
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
58
|
-
"@babel/register": "^7.
|
|
59
|
-
"@babel/runtime": "^7.
|
|
53
|
+
"@babel/core": "^7.20.2",
|
|
54
|
+
"@babel/node": "^7.20.2",
|
|
55
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
56
|
+
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
57
|
+
"@babel/preset-env": "^7.20.2",
|
|
58
|
+
"@babel/register": "^7.18.9",
|
|
59
|
+
"@babel/runtime": "^7.20.0",
|
|
60
60
|
"@cypress/webpack-preprocessor": "^5.11.0",
|
|
61
|
-
"babel-loader": "^
|
|
61
|
+
"babel-loader": "^9.1.0",
|
|
62
62
|
"cypress": "5.2.0",
|
|
63
63
|
"ink-docstrap": "^1.3.2",
|
|
64
|
-
"jsdoc": "^
|
|
65
|
-
"webpack": "^
|
|
64
|
+
"jsdoc": "^4.0.0",
|
|
65
|
+
"webpack": "^5.75.0"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/OneHatData.js
CHANGED
|
@@ -85,13 +85,18 @@ export class OneHatData extends EventEmitter {
|
|
|
85
85
|
* Sets global config settings that will be passed into all Repositories.
|
|
86
86
|
* Chainable.
|
|
87
87
|
* @param {object} globals - Schema config object
|
|
88
|
+
* @param {boolean} merge - Whether to merge or replace the globals
|
|
88
89
|
* @return this
|
|
89
90
|
*/
|
|
90
|
-
setRepositoryGlobals = (globals) => {
|
|
91
|
+
setRepositoryGlobals = (globals, merge = true) => {
|
|
91
92
|
if (this.isDestroyed) {
|
|
92
93
|
throw new Error('this.setRepositoryGlobals is no longer valid. OneHatData has been destroyed.');
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
if (merge) {
|
|
96
|
+
_.merge(this._repositoryGlobals, globals);
|
|
97
|
+
} else {
|
|
98
|
+
_.assign(this._repositoryGlobals, globals);
|
|
99
|
+
}
|
|
95
100
|
return this;
|
|
96
101
|
}
|
|
97
102
|
|