@halospv3/hce.shared-config 3.4.7 → 3.4.8

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 (72) hide show
  1. package/CHANGELOG.md +25 -4
  2. package/mjs/CaseInsensitiveMap.mjs +27 -1
  3. package/mjs/CaseInsensitiveMap.mjs.map +1 -1
  4. package/mjs/commitlintConfig.mjs +13 -1
  5. package/mjs/commitlintConfig.mjs.map +1 -1
  6. package/mjs/debug.mjs +8 -1
  7. package/mjs/debug.mjs.map +1 -1
  8. package/mjs/dotnet/GithubNugetRegistryInfo.mjs +39 -1
  9. package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -1
  10. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +81 -1
  11. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -1
  12. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +42 -1
  13. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -1
  14. package/mjs/dotnet/MSBuildProject.mjs +345 -2
  15. package/mjs/dotnet/MSBuildProject.mjs.map +1 -1
  16. package/mjs/dotnet/MSBuildProjectProperties.mjs +233 -1
  17. package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -1
  18. package/mjs/dotnet/NugetProjectProperties.mjs +520 -1
  19. package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -1
  20. package/mjs/dotnet/NugetRegistryInfo.mjs +599 -3
  21. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -1
  22. package/mjs/dotnet/helpers.mjs +222 -1
  23. package/mjs/dotnet/helpers.mjs.map +1 -1
  24. package/mjs/dotnet/index.mjs +9 -1
  25. package/mjs/dotnet.mjs +9 -1
  26. package/mjs/eslintConfig.mjs +97 -1
  27. package/mjs/eslintConfig.mjs.map +1 -1
  28. package/mjs/index.mjs +2 -1
  29. package/mjs/insertPlugins.mjs +35 -1
  30. package/mjs/insertPlugins.mjs.map +1 -1
  31. package/mjs/semanticReleaseConfig.mjs +63 -1
  32. package/mjs/semanticReleaseConfig.mjs.map +1 -1
  33. package/mjs/semanticReleaseConfigDotnet.mjs +223 -6
  34. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -1
  35. package/mjs/setupGitPluginSpec.default.mjs +18 -2
  36. package/mjs/setupGitPluginSpec.default.mjs.map +1 -1
  37. package/mjs/setupGitPluginSpec.mjs +108 -1
  38. package/mjs/setupGitPluginSpec.mjs.map +1 -1
  39. package/mjs/utils/Exact.d.mts +10 -10
  40. package/mjs/utils/Exact.d.mts.map +1 -1
  41. package/mjs/utils/env.mjs +39 -1
  42. package/mjs/utils/env.mjs.map +1 -1
  43. package/mjs/utils/execAsync.mjs +54 -7
  44. package/mjs/utils/execAsync.mjs.map +1 -1
  45. package/mjs/utils/isError.mjs +17 -1
  46. package/mjs/utils/isError.mjs.map +1 -1
  47. package/mjs/utils/miscTypes.mjs +7 -1
  48. package/mjs/utils/miscTypes.mjs.map +1 -1
  49. package/mjs/utils/reflection/filterForGetters.mjs +25 -1
  50. package/mjs/utils/reflection/filterForGetters.mjs.map +1 -1
  51. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs +27 -1
  52. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -1
  53. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +34 -1
  54. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -1
  55. package/mjs/utils/reflection/getPrototypeChainOf.mjs +39 -1
  56. package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -1
  57. package/mjs/utils/reflection/getPrototypeOf.mjs +12 -1
  58. package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -1
  59. package/mjs/utils/reflection/inheritance.mjs +10 -1
  60. package/mjs/utils/reflection/inheritance.mjs.map +1 -1
  61. package/mjs/utils/reflection/isConstructor.mjs +30 -1
  62. package/mjs/utils/reflection/isConstructor.mjs.map +1 -1
  63. package/mjs/utils/reflection/isGetterDescriptor.mjs +13 -1
  64. package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -1
  65. package/mjs/utils/reflection/listOwnGetters.mjs +29 -1
  66. package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -1
  67. package/mjs/utils/reflection.mjs +10 -1
  68. package/package.json +17 -43
  69. package/src/utils/Exact.d.ts +17 -0
  70. package/mjs/utils/Exact.mjs +0 -2
  71. package/mjs/utils/Exact.mjs.map +0 -1
  72. package/src/utils/Exact.ts +0 -49
@@ -1,2 +1,14 @@
1
- function e(e){return typeof e.get==`function`}export{e as isGetterDescriptor};
1
+ //#region src/utils/reflection/isGetterDescriptor.ts
2
+ /**
3
+ * A function for inferring a {@link TypedPropertyDescriptor} is a {@link GetterDescriptor}
4
+ * @param propertyDescriptor The {@link TypedPropertyDescriptor} to inspect.
5
+ * @returns `true` if {@link propertyDescriptor} describes a getter. Else, `false.
6
+ * @since 3.0.0
7
+ */
8
+ function isGetterDescriptor(propertyDescriptor) {
9
+ return typeof propertyDescriptor.get === "function";
10
+ }
11
+ //#endregion
12
+ export { isGetterDescriptor };
13
+
2
14
  //# sourceMappingURL=isGetterDescriptor.mjs.map
@@ -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,EAAsB,EAA2F,CAC/H,OAAO,OAAO,EAAmB,KAAQ"}
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,2 +1,30 @@
1
- import{filterForGetters as e}from"./filterForGetters.mjs";import{getOwnPropertyDescriptors as t}from"./getOwnPropertyDescriptors.mjs";function n(n,r){if(r===`Instance`){let i=e(t(n,r));return Reflect.ownKeys(i)}else if(r===`Static`){let i=e(t(n,r));return Reflect.ownKeys(i)}else throw TypeError('Argument `instanceOrStatic` must be "Instance" or "Static".')}export{n as listOwnGetters};
1
+ import { filterForGetters } from "./filterForGetters.mjs";
2
+ import { getOwnPropertyDescriptors } from "./getOwnPropertyDescriptors.mjs";
3
+ //#region src/utils/reflection/listOwnGetters.ts
4
+ /**
5
+ * # !WARNING!
6
+ * > 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.
7
+ *
8
+ * Returns the names of the instantiated (or static), noninherited getters derived from the
9
+ * given prototype or prototype of the given object.
10
+ * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
11
+ * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
12
+ * @param classDefinition Any class cast to ClassLike
13
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
14
+ * @since 3.0.0
15
+ * @returns
16
+ * 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;
17
+ */
18
+ function listOwnGetters(classDefinition, instanceOrStatic) {
19
+ if (instanceOrStatic === "Instance") {
20
+ const getterDescriptorMap = filterForGetters(getOwnPropertyDescriptors(classDefinition, instanceOrStatic));
21
+ return Reflect.ownKeys(getterDescriptorMap);
22
+ } else if (instanceOrStatic === "Static") {
23
+ const getterDescriptorMap = filterForGetters(getOwnPropertyDescriptors(classDefinition, instanceOrStatic));
24
+ return Reflect.ownKeys(getterDescriptorMap);
25
+ } else throw new TypeError("Argument `instanceOrStatic` must be \"Instance\" or \"Static\".");
26
+ }
27
+ //#endregion
28
+ export { listOwnGetters };
29
+
2
30
  //# sourceMappingURL=listOwnGetters.mjs.map
@@ -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":"sIAuDA,SAAgB,EAId,EACA,EACsC,CACtC,GAAI,IAAqB,WAAY,CAEnC,IAAM,EAAsB,EADgC,EAA0B,EAAiB,EAA+B,CAC3E,CAE3D,OADiB,QAAQ,QAAQ,EAAoB,SAG9C,IAAqB,SAAU,CAEtC,IAAM,EAAsB,EAD2B,EAA0B,EAAiB,EAA6B,CACpE,CAE3D,OADiB,QAAQ,QAAQ,EAAoB,MAOlD,MAAU,UAAU,8DAA8D"}
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 +1,10 @@
1
- import{filterForGetters as e}from"./reflection/filterForGetters.mjs";import{getOwnPropertyDescriptors as t}from"./reflection/getOwnPropertyDescriptors.mjs";import{getPrototypeOf as n}from"./reflection/getPrototypeOf.mjs";import{baseClassProto as r}from"./reflection/inheritance.mjs";import{isConstructor as i}from"./reflection/isConstructor.mjs";import{getPrototypesChainOf as a}from"./reflection/getPrototypeChainOf.mjs";import{getOwnPropertyDescriptorsRecursively as o}from"./reflection/getOwnPropertyDescriptorsRecursively.mjs";import{isGetterDescriptor as s}from"./reflection/isGetterDescriptor.mjs";import{listOwnGetters as c}from"./reflection/listOwnGetters.mjs";export{r as baseClassProto,e as filterForGetters,t as getOwnPropertyDescriptors,o as getOwnPropertyDescriptorsRecursively,n as getPrototypeOf,a as getPrototypesChainOf,i as isConstructor,s as isGetterDescriptor,c as listOwnGetters};
1
+ import { filterForGetters } from "./reflection/filterForGetters.mjs";
2
+ import { getOwnPropertyDescriptors } from "./reflection/getOwnPropertyDescriptors.mjs";
3
+ import { getPrototypeOf } from "./reflection/getPrototypeOf.mjs";
4
+ import { baseClassProto } from "./reflection/inheritance.mjs";
5
+ import { isConstructor } from "./reflection/isConstructor.mjs";
6
+ import { getPrototypesChainOf } from "./reflection/getPrototypeChainOf.mjs";
7
+ import { getOwnPropertyDescriptorsRecursively } from "./reflection/getOwnPropertyDescriptorsRecursively.mjs";
8
+ import { isGetterDescriptor } from "./reflection/isGetterDescriptor.mjs";
9
+ import { listOwnGetters } from "./reflection/listOwnGetters.mjs";
10
+ export { baseClassProto, filterForGetters, getOwnPropertyDescriptors, getOwnPropertyDescriptorsRecursively, getPrototypeOf, getPrototypesChainOf, isConstructor, isGetterDescriptor, listOwnGetters };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halospv3/hce.shared-config",
3
- "version": "3.4.7",
3
+ "version": "3.4.8",
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",
@@ -110,7 +110,7 @@
110
110
  "@bintoss/semantic-release-npm-multiple": "^3.17.1",
111
111
  "@commitlint/types": "^20.5.0",
112
112
  "@eslint/config-inspector": "^1.4.2",
113
- "@eslint/markdown": "^7.5.1",
113
+ "@eslint/markdown": "^8.0.0",
114
114
  "@sebbo2002/semantic-release-jsr": "^3.2.0",
115
115
  "@semantic-release/gitlab": "^13.3.2",
116
116
  "@tsconfig/node24": "^24.0.3",
@@ -150,66 +150,40 @@
150
150
  "./dotnet/NugetRegistryInfo": "./mjs/dotnet/NugetRegistryInfo.mjs",
151
151
  "./eslintConfig": "./mjs/eslintConfig.mjs",
152
152
  "./insertPlugins": "./mjs/insertPlugins.mjs",
153
+ "./semantic-release__commit-analyzer": "./src/semantic-release__commit-analyzer.d.ts",
154
+ "./semantic-release__exec": "./src/semantic-release__exec.d.ts",
155
+ "./semantic-release__git": "./src/semantic-release__git.d.ts",
156
+ "./semantic-release__github": "./src/semantic-release__github.d.ts",
153
157
  "./semanticReleaseConfig": "./mjs/semanticReleaseConfig.mjs",
154
158
  "./semanticReleaseConfigDotnet": "./mjs/semanticReleaseConfigDotnet.mjs",
155
159
  "./setupGitPluginSpec": "./mjs/setupGitPluginSpec.mjs",
156
160
  "./setupGitPluginSpec.default": "./mjs/setupGitPluginSpec.default.mjs",
157
161
  "./utils/env": "./mjs/utils/env.mjs",
158
- "./utils/Exact": "./mjs/utils/Exact.mjs",
162
+ "./utils/Exact": "./src/utils/Exact.d.ts",
159
163
  "./utils/execAsync": "./mjs/utils/execAsync.mjs",
164
+ "./utils/GracefulRecursion": "./src/utils/GracefulRecursion.d.ts",
160
165
  "./utils/isError": "./mjs/utils/isError.mjs",
161
166
  "./utils/miscTypes": "./mjs/utils/miscTypes.mjs",
162
167
  "./utils/reflection": "./mjs/utils/reflection.mjs",
163
168
  "./utils/reflection/filterForGetters": "./mjs/utils/reflection/filterForGetters.mjs",
169
+ "./utils/reflection/FunctionLike": "./src/utils/reflection/FunctionLike.d.ts",
164
170
  "./utils/reflection/getOwnPropertyDescriptors": "./mjs/utils/reflection/getOwnPropertyDescriptors.mjs",
165
171
  "./utils/reflection/getOwnPropertyDescriptorsRecursively": "./mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs",
166
172
  "./utils/reflection/getPrototypeChainOf": "./mjs/utils/reflection/getPrototypeChainOf.mjs",
167
173
  "./utils/reflection/getPrototypeOf": "./mjs/utils/reflection/getPrototypeOf.mjs",
174
+ "./utils/reflection/GetterDescriptor": "./src/utils/reflection/GetterDescriptor.d.ts",
168
175
  "./utils/reflection/inheritance": "./mjs/utils/reflection/inheritance.mjs",
176
+ "./utils/reflection/InstancePropertyDescriptorMap": "./src/utils/reflection/InstancePropertyDescriptorMap.d.ts",
177
+ "./utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap": "./src/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.ts",
169
178
  "./utils/reflection/isConstructor": "./mjs/utils/reflection/isConstructor.mjs",
170
179
  "./utils/reflection/isGetterDescriptor": "./mjs/utils/reflection/isGetterDescriptor.mjs",
171
180
  "./utils/reflection/listOwnGetters": "./mjs/utils/reflection/listOwnGetters.mjs",
181
+ "./utils/reflection/OwnGetterDescriptorMap": "./src/utils/reflection/OwnGetterDescriptorMap.d.ts",
182
+ "./utils/reflection/OwnKeyOf": "./src/utils/reflection/OwnKeyOf.d.ts",
183
+ "./utils/reflection/OwnPropertyDescriptorMap": "./src/utils/reflection/OwnPropertyDescriptorMap.d.ts",
184
+ "./utils/reflection/PropertyDescriptorMap": "./src/utils/reflection/PropertyDescriptorMap.d.ts",
172
185
  "./*": "./*"
173
186
  },
174
187
  "types": "./mjs/index.d.mts",
175
- "packageManager": "npm@11.12.0+sha512.c4f84e6a9e196c95b277b0c03ae90fe7ae161703521aeff615e4d114786288ab6171abb1847fcda64240426db8c43f9c027f1abf9b50d34a618bdf03aad7cbb2",
176
- "publishConfig": {
177
- "exports": {
178
- ".": "./mjs/index.mjs",
179
- "./CaseInsensitiveMap": "./mjs/CaseInsensitiveMap.mjs",
180
- "./commitlintConfig": "./mjs/commitlintConfig.mjs",
181
- "./debug": "./mjs/debug.mjs",
182
- "./dotnet": "./mjs/dotnet/index.mjs",
183
- "./dotnet/GithubNugetRegistryInfo": "./mjs/dotnet/GithubNugetRegistryInfo.mjs",
184
- "./dotnet/GitlabNugetRegistryInfo": "./mjs/dotnet/GitlabNugetRegistryInfo.mjs",
185
- "./dotnet/helpers": "./mjs/dotnet/helpers.mjs",
186
- "./dotnet/IsNextVersionAlreadyPublished.cli": "./mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs",
187
- "./dotnet/MSBuildProject": "./mjs/dotnet/MSBuildProject.mjs",
188
- "./dotnet/MSBuildProjectProperties": "./mjs/dotnet/MSBuildProjectProperties.mjs",
189
- "./dotnet/NugetProjectProperties": "./mjs/dotnet/NugetProjectProperties.mjs",
190
- "./dotnet/NugetRegistryInfo": "./mjs/dotnet/NugetRegistryInfo.mjs",
191
- "./eslintConfig": "./mjs/eslintConfig.mjs",
192
- "./insertPlugins": "./mjs/insertPlugins.mjs",
193
- "./semanticReleaseConfig": "./mjs/semanticReleaseConfig.mjs",
194
- "./semanticReleaseConfigDotnet": "./mjs/semanticReleaseConfigDotnet.mjs",
195
- "./setupGitPluginSpec": "./mjs/setupGitPluginSpec.mjs",
196
- "./setupGitPluginSpec.default": "./mjs/setupGitPluginSpec.default.mjs",
197
- "./utils/env": "./mjs/utils/env.mjs",
198
- "./utils/Exact": "./mjs/utils/Exact.mjs",
199
- "./utils/execAsync": "./mjs/utils/execAsync.mjs",
200
- "./utils/isError": "./mjs/utils/isError.mjs",
201
- "./utils/miscTypes": "./mjs/utils/miscTypes.mjs",
202
- "./utils/reflection": "./mjs/utils/reflection.mjs",
203
- "./utils/reflection/filterForGetters": "./mjs/utils/reflection/filterForGetters.mjs",
204
- "./utils/reflection/getOwnPropertyDescriptors": "./mjs/utils/reflection/getOwnPropertyDescriptors.mjs",
205
- "./utils/reflection/getOwnPropertyDescriptorsRecursively": "./mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs",
206
- "./utils/reflection/getPrototypeChainOf": "./mjs/utils/reflection/getPrototypeChainOf.mjs",
207
- "./utils/reflection/getPrototypeOf": "./mjs/utils/reflection/getPrototypeOf.mjs",
208
- "./utils/reflection/inheritance": "./mjs/utils/reflection/inheritance.mjs",
209
- "./utils/reflection/isConstructor": "./mjs/utils/reflection/isConstructor.mjs",
210
- "./utils/reflection/isGetterDescriptor": "./mjs/utils/reflection/isGetterDescriptor.mjs",
211
- "./utils/reflection/listOwnGetters": "./mjs/utils/reflection/listOwnGetters.mjs",
212
- "./*": "./*"
213
- }
214
- }
188
+ "packageManager": "npm@11.12.1+sha512.cdca14b85d647b3192028d02aadbe82d75f79a446aceea9874be98e6d768f20ebd3555770a48d0e9906106007877bbc690f715e9372f2e2dc644a3c3157fb14c"
215
189
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ### `Exact<T, S>`
3
+ *
4
+ * [issue](https://github.com/microsoft/TypeScript/issues/12936#issuecomment-2816928183)\
5
+ * [author](https://github.com/ahrjarrett)\
6
+ * license: unlicensed[!]
7
+ * @see
8
+ * - {@link https://tsplay.dev/NnGG6m}
9
+ */
10
+ export type Exact<T, S> = [keyof T] extends [keyof S]
11
+ ? [T] extends [S] ? { [K in keyof T]: T[K] } : S
12
+ : { [K in keyof T as K extends keyof S ? never : K]: TypeError<`Excess: '${Coerce<K>}'`> };
13
+
14
+ interface TypeError<Message> { [' TypeError']: Message }
15
+ // prior art: use arktype's ^^^ leading whitespace trick to avoid collisions
16
+
17
+ type Coerce<T> = `${T & (string | number)}`;
@@ -1,2 +0,0 @@
1
- export{};
2
- //# sourceMappingURL=Exact.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Exact.mjs","names":[],"sources":["../../src/utils/Exact.ts"],"sourcesContent":["/**\n * ### `Exact<T, S>`\n *\n * [issue](https://github.com/microsoft/TypeScript/issues/12936#issuecomment-2816928183)\\\n * [author](https://github.com/ahrjarrett)\\\n * license: unlicensed[!]\n * @see\n * - {@link https://tsplay.dev/NnGG6m}\n */\nexport type Exact<T, S> = [keyof T] extends [keyof S]\n ? [T] extends [S] ? { [K in keyof T]: T[K] } : S\n : { [K in keyof T as K extends keyof S ? never : K]: TypeError<`Excess: '${Coerce<K>}'`> };\n\n// eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/no-unused-vars\nfunction exact<S, T extends Exact<T, S>>(x: S, _y: T): T {\n return x as unknown as T;\n};\n\n// should succeed\nexact({ a: 1 }, { a: 1 });\nexact({ a: 1, b: 'two' }, { a: 1, b: 'two' });\n\n// should raise a TypeError\ntry {\n // @ts-expect-error Type 'boolean' is not assignable to type 'TypeError<\"Excess: 'c'\">'.ts(2322)\n exact({ a: 1 }, { a: 1, b: 'two', c: false });\n}\ncatch { /* empty */ }\ntry {\n // @ts-expect-error Type 'number' is not assignable to type 'TypeError<\"Excess: 'c'\">'.ts(2322)\n exact({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 });\n}\ncatch { /* empty */ }\ntry {\n // @ts-expect-error Argument of type '{ a: number; }' is not assignable to parameter of type '{ a: number; b: number; }'. Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'.ts(2345)\n exact({ a: 1, b: 2 }, { a: 1 });\n}\ncatch { /* empty */ }\ninterface TypeError<Message> { [' TypeError']: Message }\n// prior art: use arktype's ^^^ leading whitespace trick to avoid collisions\n\ntype Coerce<T> = `${T & (string | number)}`;\n\ntry {\n // @ts-expect-error Should error\n exact({ a: 1 }, { a: 1, b: 2 });\n // ^ 🚫 raises a TypeError here\n}\ncatch { /* empty */ }\n"],"mappings":""}
@@ -1,49 +0,0 @@
1
- /**
2
- * ### `Exact<T, S>`
3
- *
4
- * [issue](https://github.com/microsoft/TypeScript/issues/12936#issuecomment-2816928183)\
5
- * [author](https://github.com/ahrjarrett)\
6
- * license: unlicensed[!]
7
- * @see
8
- * - {@link https://tsplay.dev/NnGG6m}
9
- */
10
- export type Exact<T, S> = [keyof T] extends [keyof S]
11
- ? [T] extends [S] ? { [K in keyof T]: T[K] } : S
12
- : { [K in keyof T as K extends keyof S ? never : K]: TypeError<`Excess: '${Coerce<K>}'`> };
13
-
14
- // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/no-unused-vars
15
- function exact<S, T extends Exact<T, S>>(x: S, _y: T): T {
16
- return x as unknown as T;
17
- };
18
-
19
- // should succeed
20
- exact({ a: 1 }, { a: 1 });
21
- exact({ a: 1, b: 'two' }, { a: 1, b: 'two' });
22
-
23
- // should raise a TypeError
24
- try {
25
- // @ts-expect-error Type 'boolean' is not assignable to type 'TypeError<"Excess: 'c'">'.ts(2322)
26
- exact({ a: 1 }, { a: 1, b: 'two', c: false });
27
- }
28
- catch { /* empty */ }
29
- try {
30
- // @ts-expect-error Type 'number' is not assignable to type 'TypeError<"Excess: 'c'">'.ts(2322)
31
- exact({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 });
32
- }
33
- catch { /* empty */ }
34
- try {
35
- // @ts-expect-error Argument of type '{ a: number; }' is not assignable to parameter of type '{ a: number; b: number; }'. Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'.ts(2345)
36
- exact({ a: 1, b: 2 }, { a: 1 });
37
- }
38
- catch { /* empty */ }
39
- interface TypeError<Message> { [' TypeError']: Message }
40
- // prior art: use arktype's ^^^ leading whitespace trick to avoid collisions
41
-
42
- type Coerce<T> = `${T & (string | number)}`;
43
-
44
- try {
45
- // @ts-expect-error Should error
46
- exact({ a: 1 }, { a: 1, b: 2 });
47
- // ^ 🚫 raises a TypeError here
48
- }
49
- catch { /* empty */ }