@halospv3/hce.shared-config 3.5.2 → 3.5.3-develop.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 (36) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dotnet/.github/workflows/_unit_test.yml +1 -1
  3. package/mjs/CaseInsensitiveMap.mjs.map +1 -1
  4. package/mjs/debug.mjs.map +1 -1
  5. package/mjs/dotnet/GithubNugetRegistryInfo.mjs +1 -0
  6. package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -1
  7. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +6 -0
  8. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -1
  9. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -1
  10. package/mjs/dotnet/MSBuildProject.mjs +54 -0
  11. package/mjs/dotnet/MSBuildProject.mjs.map +1 -1
  12. package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -1
  13. package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -1
  14. package/mjs/dotnet/NugetRegistryInfo.mjs +68 -0
  15. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -1
  16. package/mjs/dotnet/helpers.mjs +65 -1
  17. package/mjs/dotnet/helpers.mjs.map +1 -1
  18. package/mjs/insertPlugins.mjs.map +1 -1
  19. package/mjs/semanticReleaseConfig.mjs +1 -0
  20. package/mjs/semanticReleaseConfig.mjs.map +1 -1
  21. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -1
  22. package/mjs/setupGitPluginSpec.mjs.map +1 -1
  23. package/mjs/utils/env.mjs.map +1 -1
  24. package/mjs/utils/execAsync.mjs.map +1 -1
  25. package/mjs/utils/isError.mjs.map +1 -1
  26. package/mjs/utils/reflection/filterForGetters.mjs.map +1 -1
  27. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -1
  28. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -1
  29. package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -1
  30. package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -1
  31. package/mjs/utils/reflection/isConstructor.mjs.map +1 -1
  32. package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -1
  33. package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -1
  34. package/package.json +15 -15
  35. package/src/utils/isError.ts +1 -1
  36. package/src/utils/reflection/getPrototypeOf.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"getPrototypeChainOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"sourcesContent":["/* eslint-disable jsdoc/no-defaults */\nimport type { TupleIndices } from '../miscTypes.ts';\nimport { getPrototypeOf } from './getPrototypeOf.ts';\nimport {\n baseClassProto,\n type BaseClassProto,\n type ClassLike,\n type ConstructorConstraint,\n type ProtoChainOfClass,\n type ProtoChainOfClassInstance,\n type SuperClassLike,\n type WithProto,\n} from './inheritance.ts';\nimport { isConstructor } from './isConstructor.ts';\n\ntype ProtoChain<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n> = [ClassesOrInstances] extends ['classInstances'] ? ProtoChainOfClassInstance<Class>\n : [ClassesOrInstances] extends ['classes'] ? ProtoChainOfClass<Class>\n : never;\n\n/**\n * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.\n * @template Class Any {@link ClassLike} type.\n * @template ClassesOrInstances 'classes' or 'classInstances'\n * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.\n * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.\n * @since 3.0.0\n * @returns\n * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`\n * Excludes default superclasses e.g. anonymous functions, native code.\n */\nexport function getPrototypesChainOf<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n>(\n classDefinition: Class,\n returnType: ClassesOrInstances,\n): ProtoChain<Class, ClassesOrInstances> {\n // class definitions or their respective .prototype; exclude default superclasses.\n let current: ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>] = classDefinition as ProtoChainOfClass<Class>[0 extends TupleIndices<ProtoChainOfClass<Class>> ? 0 : never];\n let parent: typeof current & WithProto<SuperClassLike | BaseClassProto> | object;\n const returnValue = [] as unknown as\n ProtoChain<Class, ClassesOrInstances>;\n let index: TupleIndices<typeof returnValue> = 0 as TupleIndices<typeof returnValue>;\n\n while (baseClassProto !== current) {\n parent = getPrototypeOf(current);\n // current is a Class symbol/constructor. Object.getOwnPropertyDescriptors on current will include static properties.\n if (!isConstructor(current))\n break;\n if (returnType === 'classInstances') {\n const instanceOfCurrent = current.prototype as InstanceType<typeof current>;\n\n returnValue[index] = instanceOfCurrent as typeof returnValue[typeof index];\n }\n else {\n returnValue[index] = current as typeof returnValue[typeof index];\n }\n\n /**\n * Assign the super class to current.\n * If the argument is a class, Reflect.getPrototypeOf method returns the\n * superclass.\n */\n if (\n isConstructor(parent)\n && 'name' in parent\n && typeof parent.name === 'string'\n && '' !== parent.name // it's possible for a Function/Constructor to be anonymous...\n ) {\n current = parent as ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>];\n }\n else {\n break;\n }\n index++;\n }\n return returnValue;\n /*\n assuming current is NugetProjectProperties...\n Reflect.getPrototypeOf(current).name is 'MSBuildProjectProperties'\n */\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAgB,qBAId,iBACA,YACuC;CAEvC,IAAI,UAA4E;CAChF,IAAI;CACJ,MAAM,cAAc,EAAE;CAEtB,IAAI,QAA0C;AAE9C,QAAO,mBAAmB,SAAS;AACjC,WAAS,eAAe,QAAQ;AAEhC,MAAI,CAAC,cAAc,QAAQ,CACzB;AACF,MAAI,eAAe,iBAGjB,aAAY,SAFc,QAAQ;MAKlC,aAAY,SAAS;;;;;;AAQvB,MACE,cAAc,OAAO,IAClB,UAAU,UACV,OAAO,OAAO,SAAS,YACvB,OAAO,OAAO,KAEjB,WAAU;MAGV;AAEF;;AAEF,QAAO"}
1
+ {"version":3,"file":"getPrototypeChainOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"sourcesContent":["/* eslint-disable jsdoc/no-defaults */\nimport type { TupleIndices } from '../miscTypes.ts';\nimport { getPrototypeOf } from './getPrototypeOf.ts';\nimport {\n baseClassProto,\n type BaseClassProto,\n type ClassLike,\n type ConstructorConstraint,\n type ProtoChainOfClass,\n type ProtoChainOfClassInstance,\n type SuperClassLike,\n type WithProto,\n} from './inheritance.ts';\nimport { isConstructor } from './isConstructor.ts';\n\ntype ProtoChain<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n> = [ClassesOrInstances] extends ['classInstances'] ? ProtoChainOfClassInstance<Class>\n : [ClassesOrInstances] extends ['classes'] ? ProtoChainOfClass<Class>\n : never;\n\n/**\n * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.\n * @template Class Any {@link ClassLike} type.\n * @template ClassesOrInstances 'classes' or 'classInstances'\n * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.\n * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.\n * @since 3.0.0\n * @returns\n * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`\n * Excludes default superclasses e.g. anonymous functions, native code.\n */\nexport function getPrototypesChainOf<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n>(\n classDefinition: Class,\n returnType: ClassesOrInstances,\n): ProtoChain<Class, ClassesOrInstances> {\n // class definitions or their respective .prototype; exclude default superclasses.\n let current: ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>] = classDefinition as ProtoChainOfClass<Class>[0 extends TupleIndices<ProtoChainOfClass<Class>> ? 0 : never];\n let parent: typeof current & WithProto<SuperClassLike | BaseClassProto> | object;\n const returnValue = [] as unknown as\n ProtoChain<Class, ClassesOrInstances>;\n let index: TupleIndices<typeof returnValue> = 0 as TupleIndices<typeof returnValue>;\n\n while (baseClassProto !== current) {\n parent = getPrototypeOf(current);\n // current is a Class symbol/constructor. Object.getOwnPropertyDescriptors on current will include static properties.\n if (!isConstructor(current))\n break;\n if (returnType === 'classInstances') {\n const instanceOfCurrent = current.prototype as InstanceType<typeof current>;\n\n returnValue[index] = instanceOfCurrent as typeof returnValue[typeof index];\n }\n else {\n returnValue[index] = current as typeof returnValue[typeof index];\n }\n\n /**\n * Assign the super class to current.\n * If the argument is a class, Reflect.getPrototypeOf method returns the\n * superclass.\n */\n if (\n isConstructor(parent)\n && 'name' in parent\n && typeof parent.name === 'string'\n && '' !== parent.name // it's possible for a Function/Constructor to be anonymous...\n ) {\n current = parent as ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>];\n }\n else {\n break;\n }\n index++;\n }\n return returnValue;\n /*\n assuming current is NugetProjectProperties...\n Reflect.getPrototypeOf(current).name is 'MSBuildProjectProperties'\n */\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAgB,qBAId,iBACA,YACuC;CAEvC,IAAI,UAA4E;CAChF,IAAI;CACJ,MAAM,cAAc,EAAE;CAEtB,IAAI,QAA0C;CAE9C,OAAO,mBAAmB,SAAS;EACjC,SAAS,eAAe,QAAQ;EAEhC,IAAI,CAAC,cAAc,QAAQ,EACzB;EACF,IAAI,eAAe,kBAGjB,YAAY,SAFc,QAAQ;OAKlC,YAAY,SAAS;;;;;;EAQvB,IACE,cAAc,OAAO,IAClB,UAAU,UACV,OAAO,OAAO,SAAS,YACvB,OAAO,OAAO,MAEjB,UAAU;OAGV;EAEF;;CAEF,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPrototypeOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"sourcesContent":["import type { ProtoOrSuperClass, WithProto } from './inheritance.ts';\n\n/**\n * A nearly useless wrapper for {@link Reflect.getPrototypeOf}\n * @param object An object with the internal `__proto__` property present in its type.\n * @returns The `__proto__` of the `object` param.\n */\nexport function getPrototypeOf<\n T extends WithProto<ProtoOrSuperClass>,\n>(object: T): T['__proto__'] {\n return Reflect.getPrototypeOf(object) as T['__proto__'];\n}\n"],"mappings":";;;;;;AAOA,SAAgB,eAEd,QAA2B;AAC3B,QAAO,QAAQ,eAAe,OAAO"}
1
+ {"version":3,"file":"getPrototypeOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"sourcesContent":["import type { ProtoOrSuperClass, WithProto } from './inheritance.ts';\n\n/**\n * A nearly useless wrapper for {@link Reflect.getPrototypeOf}\n * @param object An object with the internal `__proto__` property present in its type.\n * @returns The `__proto__` of the `object` param.\n */\nexport function getPrototypeOf<\n T extends WithProto<ProtoOrSuperClass>,\n>(object: T): T['__proto__'] {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return Reflect.getPrototypeOf(object) as T['__proto__'];\n}\n"],"mappings":";;;;;;AAOA,SAAgB,eAEd,QAA2B;CAE3B,OAAO,QAAQ,eAAe,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"isConstructor.mjs","names":[],"sources":["../../../src/utils/reflection/isConstructor.ts"],"sourcesContent":["/**\n * A very jank function to determine if an object can be the target of Reflect.construct.\n * Unfortunately, many functions have a constructor in their prototype. These\n * functions are treated like classes due to JavaScript's poor distinction between\n * classes and functions.\\\n * Typescript can enforce \"new\" keyword usage, but overriding the type\n * allows you to `new isConstructor()` despite this function not intended to be\n * used with the `new` keyword.\n * #### NOTE: Only works when targeting ES6/ES2015 or later.\n * > If your project or a dependent project is compiled to < ES6, this function will always return `false`; classes and constructors were introduced in ES6/ES2015.\n * @param obj Anything.\n * @returns `true` if the obj is a constructor. Else, `false`.\n * @since 3.0.0\n * @see https://stackoverflow.com/a/49510834\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isConstructor(obj: unknown): obj is abstract new (...args: any[]) => any {\n // Method 0 - filter\n if (typeof obj !== 'function')\n return false;\n\n // Method 1\n // statically-defined class\n if (/^class\\s/.test(obj.toString()))\n return true;\n\n /* Method 2\n * > class class_ {}; function func(){}\n * undefined\n * > class_.prototype.constructor.name === class_.name\n * true\n * > func.prototype?.constructor?.name === func.name\n * false\n * typeof String.prototype ==='object'\n * > true\n * typeof Function.prototype === 'object';\n * > false\n * typeof Function.prototype\n * > 'function'\n */\n const prototype: unknown = obj.prototype;\n if ((typeof prototype === 'object' || typeof prototype === 'function')\n && prototype !== null\n && 'constructor' in prototype\n && typeof prototype.constructor === 'function') {\n const _ctor = prototype.constructor as (new (...arguments_: unknown[]) => unknown);\n const _name = Reflect.getOwnPropertyDescriptor(\n _ctor,\n 'name',\n );\n // short-circuit if `obj.prototype.constructor` is a function, but not a constructor. Return false.\n return (\n _ctor === obj\n && _name?.writable === false\n && _name.enumerable === false\n && _name.configurable === true\n );\n }\n\n // Short-circuit\n // Method 3 catches exceptions when !isConstructor. When debugging, that's annoying.\n return false;\n\n // Method 3\n // isConstructable (See https://stackoverflow.com/a/49510834)\n // try {\n // // @ts-expect-error ts(2351): Type 'Function' has no construct signatures.\n // new new Proxy(obj, { construct: () => ({}) })()\n // return true\n // }\n // catch {\n // return false\n // }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,cAAc,KAA2D;AAEvF,KAAI,OAAO,QAAQ,WACjB,QAAO;AAIT,KAAI,WAAW,KAAK,IAAI,UAAU,CAAC,CACjC,QAAO;CAgBT,MAAM,YAAqB,IAAI;AAC/B,MAAK,OAAO,cAAc,YAAY,OAAO,cAAc,eACtD,cAAc,QACd,iBAAiB,aACjB,OAAO,UAAU,gBAAgB,YAAY;EAChD,MAAM,QAAQ,UAAU;EACxB,MAAM,QAAQ,QAAQ,yBACpB,OACA,OACD;AAED,SACE,UAAU,OACP,OAAO,aAAa,SACpB,MAAM,eAAe,SACrB,MAAM,iBAAiB;;AAM9B,QAAO"}
1
+ {"version":3,"file":"isConstructor.mjs","names":[],"sources":["../../../src/utils/reflection/isConstructor.ts"],"sourcesContent":["/**\n * A very jank function to determine if an object can be the target of Reflect.construct.\n * Unfortunately, many functions have a constructor in their prototype. These\n * functions are treated like classes due to JavaScript's poor distinction between\n * classes and functions.\\\n * Typescript can enforce \"new\" keyword usage, but overriding the type\n * allows you to `new isConstructor()` despite this function not intended to be\n * used with the `new` keyword.\n * #### NOTE: Only works when targeting ES6/ES2015 or later.\n * > If your project or a dependent project is compiled to < ES6, this function will always return `false`; classes and constructors were introduced in ES6/ES2015.\n * @param obj Anything.\n * @returns `true` if the obj is a constructor. Else, `false`.\n * @since 3.0.0\n * @see https://stackoverflow.com/a/49510834\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isConstructor(obj: unknown): obj is abstract new (...args: any[]) => any {\n // Method 0 - filter\n if (typeof obj !== 'function')\n return false;\n\n // Method 1\n // statically-defined class\n if (/^class\\s/.test(obj.toString()))\n return true;\n\n /* Method 2\n * > class class_ {}; function func(){}\n * undefined\n * > class_.prototype.constructor.name === class_.name\n * true\n * > func.prototype?.constructor?.name === func.name\n * false\n * typeof String.prototype ==='object'\n * > true\n * typeof Function.prototype === 'object';\n * > false\n * typeof Function.prototype\n * > 'function'\n */\n const prototype: unknown = obj.prototype;\n if ((typeof prototype === 'object' || typeof prototype === 'function')\n && prototype !== null\n && 'constructor' in prototype\n && typeof prototype.constructor === 'function') {\n const _ctor = prototype.constructor as (new (...arguments_: unknown[]) => unknown);\n const _name = Reflect.getOwnPropertyDescriptor(\n _ctor,\n 'name',\n );\n // short-circuit if `obj.prototype.constructor` is a function, but not a constructor. Return false.\n return (\n _ctor === obj\n && _name?.writable === false\n && _name.enumerable === false\n && _name.configurable === true\n );\n }\n\n // Short-circuit\n // Method 3 catches exceptions when !isConstructor. When debugging, that's annoying.\n return false;\n\n // Method 3\n // isConstructable (See https://stackoverflow.com/a/49510834)\n // try {\n // // @ts-expect-error ts(2351): Type 'Function' has no construct signatures.\n // new new Proxy(obj, { construct: () => ({}) })()\n // return true\n // }\n // catch {\n // return false\n // }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,cAAc,KAA2D;CAEvF,IAAI,OAAO,QAAQ,YACjB,OAAO;CAIT,IAAI,WAAW,KAAK,IAAI,UAAU,CAAC,EACjC,OAAO;CAgBT,MAAM,YAAqB,IAAI;CAC/B,KAAK,OAAO,cAAc,YAAY,OAAO,cAAc,eACtD,cAAc,QACd,iBAAiB,aACjB,OAAO,UAAU,gBAAgB,YAAY;EAChD,MAAM,QAAQ,UAAU;EACxB,MAAM,QAAQ,QAAQ,yBACpB,OACA,OACD;EAED,OACE,UAAU,OACP,OAAO,aAAa,SACpB,MAAM,eAAe,SACrB,MAAM,iBAAiB;;CAM9B,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"isGetterDescriptor.mjs","names":[],"sources":["../../../src/utils/reflection/isGetterDescriptor.ts"],"sourcesContent":["import type { GetterDescriptor } from './GetterDescriptor.d.ts';\n\n/**\n * A function for inferring a {@link TypedPropertyDescriptor} is a {@link GetterDescriptor}\n * @param propertyDescriptor The {@link TypedPropertyDescriptor} to inspect.\n * @returns `true` if {@link propertyDescriptor} describes a getter. Else, `false.\n * @since 3.0.0\n */\nexport function isGetterDescriptor<T>(propertyDescriptor: TypedPropertyDescriptor<T>): propertyDescriptor is GetterDescriptor<T> {\n return typeof propertyDescriptor.get === 'function';\n};\n"],"mappings":";;;;;;;AAQA,SAAgB,mBAAsB,oBAA2F;AAC/H,QAAO,OAAO,mBAAmB,QAAQ"}
1
+ {"version":3,"file":"isGetterDescriptor.mjs","names":[],"sources":["../../../src/utils/reflection/isGetterDescriptor.ts"],"sourcesContent":["import type { GetterDescriptor } from './GetterDescriptor.d.ts';\n\n/**\n * A function for inferring a {@link TypedPropertyDescriptor} is a {@link GetterDescriptor}\n * @param propertyDescriptor The {@link TypedPropertyDescriptor} to inspect.\n * @returns `true` if {@link propertyDescriptor} describes a getter. Else, `false.\n * @since 3.0.0\n */\nexport function isGetterDescriptor<T>(propertyDescriptor: TypedPropertyDescriptor<T>): propertyDescriptor is GetterDescriptor<T> {\n return typeof propertyDescriptor.get === 'function';\n};\n"],"mappings":";;;;;;;AAQA,SAAgB,mBAAsB,oBAA2F;CAC/H,OAAO,OAAO,mBAAmB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"listOwnGetters.mjs","names":[],"sources":["../../../src/utils/reflection/listOwnGetters.ts"],"sourcesContent":["import type { InstanceOrStatic } from '../miscTypes.ts';\nimport { filterForGetters } from './filterForGetters.ts';\nimport { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.ts';\nimport type {\n BaseClassProto,\n ClassLike,\n ConstructorConstraint,\n InstanceTypeOrSelf,\n SuperClassLike,\n WithProto,\n} from './inheritance.ts';\nimport type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.d.ts';\nimport type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.d.ts';\n\n/**\n * Description placeholder\n * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class\n * @template {InstanceOrStatic} _InstanceOrStatic\n * @since 3.0.0\n */\ntype OwnGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n>\n = [_InstanceOrStatic] extends ['Instance']\n ? Exclude<\n (Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>) extends null\n ? keyof InstanceType<Class>\n : Exclude<\n keyof InstanceType<Class>,\n keyof (Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>)\n >,\n '__proto__'\n >[]\n : [_InstanceOrStatic] extends ['Static']\n ? Exclude<\n Class['__proto__'] extends null ? keyof Class : Exclude<keyof Class, keyof Class['__proto__']>,\n '__proto__'\n >[]\n : never;\n\n/**\n * # !WARNING!\n * > If you don't specify the Class's SuperClass (or `BaseClassProto`) via WithProto, the return type will wrongly include inherited property names! This is a design limitation of TypeScript.\n *\n * Returns the names of the instantiated (or static), noninherited getters derived from the\n * given prototype or prototype of the given object.\n * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class\n * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @param classDefinition Any class cast to ClassLike\n * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @since 3.0.0\n * @returns\n * An array of names of getters that were not inherited from a parent class. If {@link classDefinition} is a class instance, the names of instanced getters are returned. Otherwise, the names of static getters are returned;\n */\nexport function listOwnGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n>(\n classDefinition: Class,\n instanceOrStatic: Extract<_InstanceOrStatic, InstanceOrStatic>,\n): OwnGetters<Class, _InstanceOrStatic> {\n if (instanceOrStatic === 'Instance') {\n const descriptorMap: InstancePropertyDescriptorMap<Class> = getOwnPropertyDescriptors(classDefinition, instanceOrStatic as 'Instance');\n const getterDescriptorMap = filterForGetters(descriptorMap);\n const keyArray = Reflect.ownKeys(getterDescriptorMap) as (keyof typeof getterDescriptorMap)[];\n return keyArray as [typeof instanceOrStatic & 'Instance'] extends ['Instance'] ? typeof keyArray : never;\n }\n else if (instanceOrStatic === 'Static') {\n const descriptorMap: OwnPropertyDescriptorMap<Class> = getOwnPropertyDescriptors(classDefinition, instanceOrStatic as 'Static');\n const getterDescriptorMap = filterForGetters(descriptorMap);\n const keyArray = Reflect.ownKeys(getterDescriptorMap) as (keyof typeof getterDescriptorMap)[];\n return keyArray as [_InstanceOrStatic] extends ['Instance']\n ? never\n : [_InstanceOrStatic] extends ['Static']\n ? typeof keyArray\n : never;\n }\n else throw new TypeError('Argument `instanceOrStatic` must be \"Instance\" or \"Static\".');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuDA,SAAgB,eAId,iBACA,kBACsC;AACtC,KAAI,qBAAqB,YAAY;EAEnC,MAAM,sBAAsB,iBADgC,0BAA0B,iBAAiB,iBAA+B,CAC3E;AAE3D,SADiB,QAAQ,QAAQ,oBAAoB;YAG9C,qBAAqB,UAAU;EAEtC,MAAM,sBAAsB,iBAD2B,0BAA0B,iBAAiB,iBAA6B,CACpE;AAE3D,SADiB,QAAQ,QAAQ,oBAAoB;OAOlD,OAAM,IAAI,UAAU,kEAA8D"}
1
+ {"version":3,"file":"listOwnGetters.mjs","names":[],"sources":["../../../src/utils/reflection/listOwnGetters.ts"],"sourcesContent":["import type { InstanceOrStatic } from '../miscTypes.ts';\nimport { filterForGetters } from './filterForGetters.ts';\nimport { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.ts';\nimport type {\n BaseClassProto,\n ClassLike,\n ConstructorConstraint,\n InstanceTypeOrSelf,\n SuperClassLike,\n WithProto,\n} from './inheritance.ts';\nimport type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.d.ts';\nimport type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.d.ts';\n\n/**\n * Description placeholder\n * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class\n * @template {InstanceOrStatic} _InstanceOrStatic\n * @since 3.0.0\n */\ntype OwnGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n>\n = [_InstanceOrStatic] extends ['Instance']\n ? Exclude<\n (Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>) extends null\n ? keyof InstanceType<Class>\n : Exclude<\n keyof InstanceType<Class>,\n keyof (Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>)\n >,\n '__proto__'\n >[]\n : [_InstanceOrStatic] extends ['Static']\n ? Exclude<\n Class['__proto__'] extends null ? keyof Class : Exclude<keyof Class, keyof Class['__proto__']>,\n '__proto__'\n >[]\n : never;\n\n/**\n * # !WARNING!\n * > If you don't specify the Class's SuperClass (or `BaseClassProto`) via WithProto, the return type will wrongly include inherited property names! This is a design limitation of TypeScript.\n *\n * Returns the names of the instantiated (or static), noninherited getters derived from the\n * given prototype or prototype of the given object.\n * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class\n * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @param classDefinition Any class cast to ClassLike\n * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @since 3.0.0\n * @returns\n * An array of names of getters that were not inherited from a parent class. If {@link classDefinition} is a class instance, the names of instanced getters are returned. Otherwise, the names of static getters are returned;\n */\nexport function listOwnGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n>(\n classDefinition: Class,\n instanceOrStatic: Extract<_InstanceOrStatic, InstanceOrStatic>,\n): OwnGetters<Class, _InstanceOrStatic> {\n if (instanceOrStatic === 'Instance') {\n const descriptorMap: InstancePropertyDescriptorMap<Class> = getOwnPropertyDescriptors(classDefinition, instanceOrStatic as 'Instance');\n const getterDescriptorMap = filterForGetters(descriptorMap);\n const keyArray = Reflect.ownKeys(getterDescriptorMap) as (keyof typeof getterDescriptorMap)[];\n return keyArray as [typeof instanceOrStatic & 'Instance'] extends ['Instance'] ? typeof keyArray : never;\n }\n else if (instanceOrStatic === 'Static') {\n const descriptorMap: OwnPropertyDescriptorMap<Class> = getOwnPropertyDescriptors(classDefinition, instanceOrStatic as 'Static');\n const getterDescriptorMap = filterForGetters(descriptorMap);\n const keyArray = Reflect.ownKeys(getterDescriptorMap) as (keyof typeof getterDescriptorMap)[];\n return keyArray as [_InstanceOrStatic] extends ['Instance']\n ? never\n : [_InstanceOrStatic] extends ['Static']\n ? typeof keyArray\n : never;\n }\n else throw new TypeError('Argument `instanceOrStatic` must be \"Instance\" or \"Static\".');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuDA,SAAgB,eAId,iBACA,kBACsC;CACtC,IAAI,qBAAqB,YAAY;EAEnC,MAAM,sBAAsB,iBADgC,0BAA0B,iBAAiB,iBAC7C,CAAC;EAE3D,OADiB,QAAQ,QAAQ,oBAClB;QAEZ,IAAI,qBAAqB,UAAU;EAEtC,MAAM,sBAAsB,iBAD2B,0BAA0B,iBAAiB,iBACxC,CAAC;EAE3D,OADiB,QAAQ,QAAQ,oBAClB;QAMZ,MAAM,IAAI,UAAU,kEAA8D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halospv3/hce.shared-config",
3
- "version": "3.5.2",
3
+ "version": "3.5.3-develop.2",
4
4
  "description": "Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are also provided.",
5
5
  "keywords": [
6
6
  "semantic-release",
@@ -40,7 +40,7 @@
40
40
  "scripts": {
41
41
  "build": "tsdown",
42
42
  "build:clean": "npm run clean-build",
43
- "check": "npm run type && npm run test && npm run lint",
43
+ "check": "npm run type && npm run lint:check && npm run test",
44
44
  "clean": "tsdown --clean",
45
45
  "clean-build": "npm run clean && npm run build",
46
46
  "coverage": "npm run test -- --experimental-test-coverage",
@@ -62,11 +62,11 @@
62
62
  "watch": "tsdown --watch"
63
63
  },
64
64
  "dependencies": {
65
- "@commitlint/cli": "^20.5.0",
66
- "@commitlint/config-conventional": "^20.5.0",
67
- "@dotenvx/dotenvx": "^1.61.1",
65
+ "@commitlint/cli": "^21.0.0",
66
+ "@commitlint/config-conventional": "^21.0.0",
67
+ "@dotenvx/dotenvx": "^1.63.0",
68
68
  "@eslint/js": "^10.0.1",
69
- "@eslint/json": "^1.2.0",
69
+ "@eslint/json": "^2.0.0",
70
70
  "@semantic-release/changelog": "^6.0.3",
71
71
  "@semantic-release/commit-analyzer": "^13.0.1",
72
72
  "@semantic-release/exec": "^7.1.0",
@@ -75,7 +75,7 @@
75
75
  "@semantic-release/npm": "^13.1.5",
76
76
  "@semantic-release/release-notes-generator": "^14.1.0",
77
77
  "@stylistic/eslint-plugin": "^5.9.0",
78
- "@types/node": "~24.12.0",
78
+ "@types/node": "~24.13.0",
79
79
  "arktype": "^2.1.20",
80
80
  "chardet": "^2.1.0",
81
81
  "conventional-changelog-conventionalcommits": "^9.3.1",
@@ -89,7 +89,7 @@
89
89
  "semantic-release": "^25.0.0",
90
90
  "semantic-release-export-data": "^1.1.0",
91
91
  "ts-essentials": "^10.1.1",
92
- "typescript-eslint": "^8.58.2"
92
+ "typescript-eslint": "^8.59.0"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "@bintoss/semantic-release-npm-multiple": "^3.0.0 || >= 3.0.0",
@@ -109,21 +109,21 @@
109
109
  "devDependencies": {
110
110
  "@arethetypeswrong/core": "^0.18.2",
111
111
  "@bintoss/semantic-release-npm-multiple": "^3.17.1",
112
- "@commitlint/types": "^20.5.0",
113
- "@eslint/config-inspector": "^2.0.0",
112
+ "@commitlint/types": "^21.0.0",
113
+ "@eslint/config-inspector": "^3.0.0",
114
114
  "@eslint/markdown": "^8.0.1",
115
- "@sebbo2002/semantic-release-jsr": "^3.2.0",
115
+ "@sebbo2002/semantic-release-jsr": "^4.0.0",
116
116
  "@semantic-release/gitlab": "^13.3.2",
117
117
  "@types/debug": "^4.1.13",
118
118
  "@types/tmp": "^0.2.6",
119
119
  "conventional-changelog-preset-loader": "^5.0.0",
120
120
  "eslint": "^10.2.1",
121
- "eslint-plugin-jsdoc": "^62.9.0",
122
- "eslint-plugin-unicorn": "^64.0.0",
121
+ "eslint-plugin-jsdoc": "^63.0.0",
122
+ "eslint-plugin-unicorn": "^65.0.0",
123
123
  "pinst": "^3.0.0",
124
124
  "publint": "^0.3.18",
125
125
  "tmp": "^0.2.3",
126
- "tsdown": "^0.21.9",
126
+ "tsdown": "^0.22.0",
127
127
  "tslib": "^2.8.1",
128
128
  "tsx": "^4.20.3",
129
129
  "typescript": "^6.0.3",
@@ -186,5 +186,5 @@
186
186
  "./*": "./*"
187
187
  },
188
188
  "types": "./mjs/index.d.mts",
189
- "packageManager": "npm@11.12.1+sha512.cdca14b85d647b3192028d02aadbe82d75f79a446aceea9874be98e6d768f20ebd3555770a48d0e9906106007877bbc690f715e9372f2e2dc644a3c3157fb14c"
189
+ "packageManager": "npm@11.17.0+sha512.3eeaf18997b11070d313849268b23766b9db0068997dec9471073170fe43fa17f2b4d0337bf0f52330ee2274e7f5754b21b01052742e48f5c9c74d8b1e32ef43"
190
190
  }
@@ -12,7 +12,7 @@ import { isNativeError } from 'node:util/types';
12
12
  */
13
13
  export function isError(error: unknown): error is Error {
14
14
  return 'isError' in Error && typeof Error.isError === 'function' && Error.isError.length > 0
15
- ? (Error.isError as typeof isError)(error)
15
+ ? Error.isError(error)
16
16
  // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  : isNativeError(error);
18
18
  }
@@ -8,5 +8,6 @@ import type { ProtoOrSuperClass, WithProto } from './inheritance.ts';
8
8
  export function getPrototypeOf<
9
9
  T extends WithProto<ProtoOrSuperClass>,
10
10
  >(object: T): T['__proto__'] {
11
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
11
12
  return Reflect.getPrototypeOf(object) as T['__proto__'];
12
13
  }