@jscrpt/common 7.1.0 → 7.1.1-beta.20260722121409

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/changelog.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 7.1.1 (2026-07-22)
4
+
5
+ ### Bug Fixes
6
+
7
+ - fixed `RecursivePartial` type, now correctly handles `Map`, `Set`, `ReadonlyArray`, and builtins (`Function`, `Date`, `Error`, `RegExp`) without recursing into them and losing type information
8
+
3
9
  ## Version 7.1.0 (2025-07-15)
4
10
 
5
11
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.mjs","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.mjs","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.js","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.cjs","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> = \n{\n [P in keyof T]?: T[P] extends (infer U)[] \n ? RecursivePartial<U>[]\n : T[P] extends object | undefined \n ? RecursivePartial<T[P]> \n : T[P];\n};"]}
1
+ {"version":3,"file":"recursivePartial.cjs","sourceRoot":"","sources":["../../../src/types/recursivePartial.ts"],"names":[],"mappings":"","sourcesContent":["type Primitive = string|number|boolean|bigint|symbol|null|undefined;\ntype Builtin = Primitive|Function|Date|Error|RegExp;\n\n//TODO: in future replace this with https://www.npmjs.com/package/ts-essentials => DeepPartial\n\n/**\n * Utility type that makes partial all nested properties\n */\nexport type RecursivePartial<T> =\n T extends Builtin ? T :\n T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> :\n T extends Set<infer U> ? Set<RecursivePartial<U>> :\n T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> :\n T extends object ? {[P in keyof T]?: RecursivePartial<T[P]>} :\n T;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscrpt/common",
3
- "version": "7.1.0",
3
+ "version": "7.1.1-beta.20260722121409",
4
4
  "description": "Common javascript tools, utilities and other usefull stuff",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,7 +1,10 @@
1
+ type Primitive = string | number | boolean | bigint | symbol | null | undefined;
2
+ type Builtin = Primitive | Function | Date | Error | RegExp;
1
3
  /**
2
4
  * Utility type that makes partial all nested properties
3
5
  */
4
- export type RecursivePartial<T> = {
5
- [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
6
- };
6
+ export type RecursivePartial<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? Map<RecursivePartial<K>, RecursivePartial<V>> : T extends Set<infer U> ? Set<RecursivePartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> : T extends object ? {
7
+ [P in keyof T]?: RecursivePartial<T[P]>;
8
+ } : T;
9
+ export {};
7
10
  //# sourceMappingURL=recursivePartial.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recursivePartial.d.ts","sourceRoot":"","sources":["recursivePartial.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC9B;KACK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACnC,gBAAgB,CAAC,CAAC,CAAC,EAAE,GACrB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACtB,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"recursivePartial.d.ts","sourceRoot":"","sources":["recursivePartial.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,SAAS,CAAC;AACpE,KAAK,OAAO,GAAK,SAAS,GAAC,QAAQ,GAAC,IAAI,GAAC,KAAK,GAAC,MAAM,CAAC;AAItD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC1B,CAAC,SAAS,OAAO,GAAmB,CAAC,GACrC,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAK,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,GACjF,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAc,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC5D,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAI,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,MAAM,GAAoB;KAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAC,GAC7E,CAAC,CAAC"}
package/version.bak CHANGED
@@ -1 +1 @@
1
- 7.1.0
1
+ 7.1.1-beta.20260722121409