configate 0.1.5 → 1.0.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.
- package/dist/deepMerge.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/makeSecureDeepProxy.js +3 -2
- package/package.json +3 -3
package/dist/deepMerge.js
CHANGED
|
@@ -13,7 +13,7 @@ export function deepMerge(target, ...sources) {
|
|
|
13
13
|
const source = sources.shift();
|
|
14
14
|
if (isObject(target) && isObject(source)) {
|
|
15
15
|
for (const key in source) {
|
|
16
|
-
if (Object.
|
|
16
|
+
if (Object.hasOwn(source, key)) {
|
|
17
17
|
if (key === '__proto__' || key === 'constructor') {
|
|
18
18
|
continue;
|
|
19
19
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export function makeSecureDeepProxy(config) {
|
|
|
21
21
|
function makeSecureProxy(targetObject) {
|
|
22
22
|
return new Proxy(targetObject, {
|
|
23
23
|
get(target, prop) {
|
|
24
|
-
// Handle Symbol
|
|
25
|
-
if (prop ===
|
|
24
|
+
// Handle Symbol and Array properties
|
|
25
|
+
if (typeof prop === 'symbol' ||
|
|
26
|
+
// Don't throw error when using array methods
|
|
26
27
|
(Array.isArray(target) && Number.isNaN(Number(prop)))) {
|
|
27
28
|
return Reflect.get(target, prop);
|
|
28
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "configate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Configuration helper for TypeScript applications",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsc",
|
|
18
|
-
"ci": "node --run test &&
|
|
18
|
+
"ci": "node --run test && node --run typecheck && node --run lint",
|
|
19
19
|
"lint": "biome check",
|
|
20
20
|
"test": "node --test-isolation=none --test-reporter=spec --experimental-test-coverage --test-coverage-exclude='src/{testConfigDirs/**/*,**/*.test.ts}' --test 'src/**/*.test.ts'",
|
|
21
21
|
"typecheck": "tsc --noEmit"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/mdrobny/configate#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@biomejs/biome": "
|
|
43
|
+
"@biomejs/biome": "2.3.8",
|
|
44
44
|
"@types/node": "^22.10.6",
|
|
45
45
|
"typescript": "^5.7.3"
|
|
46
46
|
}
|