@halospv3/hce.shared-config 3.0.0-develop.9 → 3.1.0-develop.1

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 (74) hide show
  1. package/CHANGELOG.md +395 -67
  2. package/dotnet/.github/workflows/_unit_test.yml +3 -3
  3. package/dotnet/.github/workflows/dotnet-release.yml +3 -3
  4. package/dotnet/.github/workflows/sample-dotnet-build.yml +2 -2
  5. package/dotnet/PublishAll.targets +3 -2
  6. package/dotnet/ZipPublishDir.targets +24 -29
  7. package/dotnet/samples/HCE.Shared.SignAfterPack/sampleCert.samplepfx +0 -0
  8. package/mjs/debug.d.ts +4 -2
  9. package/mjs/debug.d.ts.map +1 -1
  10. package/mjs/debug.mjs +6 -4
  11. package/mjs/debug.mjs.map +1 -1
  12. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +2 -3
  13. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts.map +1 -1
  14. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +2 -2
  15. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -1
  16. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +39 -21
  17. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -1
  18. package/mjs/dotnet/MSBuildProject.d.ts +4 -5
  19. package/mjs/dotnet/MSBuildProject.d.ts.map +1 -1
  20. package/mjs/dotnet/MSBuildProject.mjs +5 -5
  21. package/mjs/dotnet/MSBuildProject.mjs.map +1 -1
  22. package/mjs/dotnet/NugetProjectProperties.d.ts +3 -3
  23. package/mjs/dotnet/NugetProjectProperties.d.ts.map +1 -1
  24. package/mjs/dotnet/NugetRegistryInfo.d.ts +7 -7
  25. package/mjs/dotnet/NugetRegistryInfo.d.ts.map +1 -1
  26. package/mjs/dotnet/NugetRegistryInfo.mjs +4 -4
  27. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -1
  28. package/mjs/dotnet/helpers.d.ts +2 -2
  29. package/mjs/dotnet/helpers.d.ts.map +1 -1
  30. package/mjs/dotnet/helpers.mjs +4 -4
  31. package/mjs/dotnet/helpers.mjs.map +1 -1
  32. package/mjs/dotnet/index.d.ts +0 -8
  33. package/mjs/dotnet/index.d.ts.map +1 -1
  34. package/mjs/dotnet.d.ts +0 -1
  35. package/mjs/dotnet.d.ts.map +1 -1
  36. package/mjs/eslintConfig.d.ts +2 -2
  37. package/mjs/eslintConfig.d.ts.map +1 -1
  38. package/mjs/eslintConfig.mjs +25 -60
  39. package/mjs/eslintConfig.mjs.map +1 -1
  40. package/mjs/semanticReleaseConfigDotnet.d.ts.map +1 -1
  41. package/mjs/semanticReleaseConfigDotnet.mjs +6 -5
  42. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -1
  43. package/mjs/utils/env.d.ts.map +1 -1
  44. package/mjs/utils/env.mjs +5 -1
  45. package/mjs/utils/env.mjs.map +1 -1
  46. package/mjs/utils/execAsync.d.ts +2 -2
  47. package/mjs/utils/execAsync.d.ts.map +1 -1
  48. package/mjs/utils/execAsync.mjs +2 -2
  49. package/mjs/utils/execAsync.mjs.map +1 -1
  50. package/mjs/utils/isError.d.ts +11 -0
  51. package/mjs/utils/isError.d.ts.map +1 -0
  52. package/mjs/utils/isError.mjs +19 -0
  53. package/mjs/utils/isError.mjs.map +1 -0
  54. package/mjs/utils/miscTypes.d.ts +1 -2
  55. package/mjs/utils/miscTypes.d.ts.map +1 -1
  56. package/package.json +22 -19
  57. package/src/debug.ts +5 -4
  58. package/src/dotnet/GitlabNugetRegistryInfo.ts +4 -5
  59. package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +53 -36
  60. package/src/dotnet/MSBuildProject.ts +8 -9
  61. package/src/dotnet/NugetProjectProperties.ts +2 -3
  62. package/src/dotnet/NugetRegistryInfo.ts +11 -12
  63. package/src/dotnet/helpers.ts +11 -9
  64. package/src/dotnet/index.ts +0 -9
  65. package/src/dotnet.ts +0 -1
  66. package/src/eslintConfig.ts +33 -125
  67. package/src/semanticReleaseConfigDotnet.ts +8 -12
  68. package/src/utils/env.ts +7 -1
  69. package/src/utils/execAsync.ts +4 -5
  70. package/src/utils/isError.ts +18 -0
  71. package/src/utils/miscTypes.ts +1 -2
  72. package/tsconfig.base.json +54 -0
  73. package/tsconfig.json +22 -0
  74. package/tsconfig.mjs.json +8 -0
@@ -2,7 +2,7 @@ import { type } from 'arktype';
2
2
  import { exec } from 'node:child_process';
3
3
  import { constants } from 'node:os';
4
4
  import { promisify } from 'node:util';
5
- import { isNativeError } from 'node:util/types';
5
+ import { isError } from './isError.mjs';
6
6
 
7
7
  /* eslint-disable jsdoc/no-defaults */
8
8
 
@@ -16,7 +16,7 @@ import { isNativeError } from 'node:util/types';
16
16
  */
17
17
  async function execAsync(command, setStderrAsCause = false) {
18
18
  return await promisify(exec)(command).catch(error => {
19
- if (!isNativeError(error)) throw new Error(JSON.stringify(error));
19
+ if (!isError(error)) throw new Error(JSON.stringify(error));
20
20
  if (setStderrAsCause && 'stderr' in error && typeof error.stderr === 'string' && error.stderr !== '') error.cause ??= error.stderr;
21
21
  if ('stdout' in error && typeof error.stdout === 'string') {
22
22
  error.message += '\nSTDOUT:\n' + ` ${error.stdout.replaceAll('\n', '\n ')}`;
@@ -1 +1 @@
1
- {"version":3,"file":"execAsync.mjs","sources":["../../src/utils/execAsync.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;AAAA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,KAAK,EAAE;AACnE,EAAE,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI;AACvD,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACrE,IAAI,IAAI,gBAAg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GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;AAC3C,IAAI,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG;AAC1B,IAAI,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI;AAC5B,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC;AACA,EAAE,GAAG;AACL,EAAE,IAAI;AACN,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM;AACR;;;;"}
@@ -0,0 +1,11 @@
1
+ /** @import 'typescript/lib/lib.esnext.error.d.ts' */
2
+ /**
3
+ * Compatibility wrapper for ES2026 (Node.js 25)
4
+ * {@link Error.isError Error.isError}
5
+ * with failover to the deprecated {@link isNativeError utils.types.isNativeError}.
6
+ * @param error A parameter which may be an Error.
7
+ * @returns `true` if {@link error} is derived from or is sufficiently similar to {@link Error}. Else, `false`.
8
+ * Note: DOMExceptions will result in `false`
9
+ */
10
+ export declare function isError(error: unknown): error is Error;
11
+ //# sourceMappingURL=isError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isError.d.ts","sourceRoot":"","sources":["../../src/utils/isError.ts"],"names":[],"mappings":"AAEA,qDAAqD;AAErD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAKtD"}
@@ -0,0 +1,19 @@
1
+ import { isNativeError } from 'node:util/types';
2
+
3
+ /** @import 'typescript/lib/lib.esnext.error.d.ts' */
4
+
5
+ /**
6
+ * Compatibility wrapper for ES2026 (Node.js 25)
7
+ * {@link Error.isError Error.isError}
8
+ * with failover to the deprecated {@link isNativeError utils.types.isNativeError}.
9
+ * @param error A parameter which may be an Error.
10
+ * @returns `true` if {@link error} is derived from or is sufficiently similar to {@link Error}. Else, `false`.
11
+ * Note: DOMExceptions will result in `false`
12
+ */
13
+ function isError(error) {
14
+ return 'isError' in Error && typeof Error.isError === 'function' && Error.isError.length > 0 ? Error.isError(error)
15
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
16
+ : isNativeError(error);
17
+ }
18
+ export { isError };
19
+ //# sourceMappingURL=isError.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isError.mjs","sources":["../../src/utils/isError.ts"],"sourcesContent":null,"names":[],"mappings":";;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,KAAK,EAAE;AAC/B,EAAE,OAAO,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK;AACpH;AACA,IAAI,aAAa,CAAC,KAAK,CAAC;AACxB;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { type Type } from 'arktype';
2
- import type { StringType } from 'arktype/internal/methods/string.ts';
3
- export declare const tBooleanString: StringType<'false' | 'true'>;
2
+ export declare const tBooleanString: Type<'false' | 'true'>;
4
3
  export type BooleanString = typeof tBooleanString.infer;
5
4
  export declare const tEmptyOrBooleanString: Type<'' | 'false' | 'true'>;
6
5
  export type EmptyOrBooleanString = typeof tEmptyOrBooleanString.infer;
@@ -1 +1 @@
1
- {"version":3,"file":"miscTypes.d.ts","sourceRoot":"","sources":["../../src/utils/miscTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,eAAO,MAAM,cAA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;AAEzF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IACjD,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAElF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halospv3/hce.shared-config",
3
- "version": "3.0.0-develop.9",
3
+ "version": "3.1.0-develop.1",
4
4
  "description": "Automate commit message quality, changelogs, and CI/CD releases. Exports a semantic-release shareable configuration deserialized from this package's '.releaserc.yml'. Shared resources for .NET projects are also distributed with this package.",
5
5
  "keywords": [
6
6
  "halo",
@@ -26,7 +26,8 @@
26
26
  "dotnet/*",
27
27
  "dotnet/.github/**/*",
28
28
  "mjs/**/*",
29
- "src/**/*"
29
+ "src/**/*",
30
+ "tsconfig*.json"
30
31
  ],
31
32
  "main": "./mjs/index.mjs",
32
33
  "infra": "polyrepo",
@@ -49,48 +50,49 @@
49
50
  "prepare": "husky",
50
51
  "presemantic-release": "npm pack",
51
52
  "semantic-release": "semantic-release",
52
- "test": "npm run build && npm run test:noBuild",
53
+ "pretest": "npm run build && npm run test:cacheSampleProjects",
54
+ "test": "tsx --test --experimental-test-coverage --enable-source-maps --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.txt --test-reporter=junit --test-reporter-destination=junit.xml",
53
55
  "test:cacheSampleProjects": "echo \"START: Cache Sample Projects\" && tsx ./tests/dotnet/MSBuildProject.projects.ts && echo \"DONE: Cache Sample Projects\"",
54
- "pretest:noBuild": "npm run test:cacheSampleProjects",
55
- "test:noBuild": "npm run test:justTest",
56
- "test:justTest": "tsx --test --experimental-test-coverage --enable-source-maps --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.txt --test-reporter=junit --test-reporter-destination=junit.xml",
57
- "test:watch": "npm run test:justTest -- -- --watch",
56
+ "test:watch": "npm run test -- --watch",
58
57
  "type": "tsc --build",
59
58
  "validate": "packemon validate",
60
59
  "watch": "packemon watch --loadConfigs"
61
60
  },
62
61
  "dependencies": {
63
- "@commitlint/cli": "^19.8.1",
64
- "@commitlint/config-conventional": "^19.8.1",
62
+ "@commitlint/cli": "^20.0.0",
63
+ "@commitlint/config-conventional": "^20.0.0",
65
64
  "@dotenvx/dotenvx": "^1.47.6",
66
65
  "@eslint/js": "^9.31.0",
66
+ "@eslint/json": "^0.13.2",
67
67
  "@semantic-release/changelog": "^6.0.3",
68
68
  "@semantic-release/commit-analyzer": "^13.0.1",
69
69
  "@semantic-release/exec": "^7.1.0",
70
70
  "@semantic-release/git": "^10.0.1",
71
- "@semantic-release/github": "^11.0.3",
72
- "@semantic-release/npm": "^12.0.2",
71
+ "@semantic-release/github": "^12.0.0",
72
+ "@semantic-release/npm": "^13.0.0",
73
73
  "@semantic-release/release-notes-generator": "^14.0.3",
74
74
  "@stylistic/eslint-plugin": "^5.1.0",
75
- "@types/node": "~20.11.0",
75
+ "@types/node": "~24.9.1",
76
76
  "arktype": "^2.1.20",
77
77
  "chardet": "^2.1.0",
78
78
  "conventional-changelog-conventionalcommits": "^9.1.0",
79
79
  "debug": "^4.4.1",
80
- "eslint-plugin-jsonc": "^2.20.1",
80
+ "error.iserror": "^1.0.2",
81
+ "es-main": "^1.3.0",
81
82
  "globals": "^16.3.0",
82
83
  "husky": "^9.1.7",
83
84
  "sanitize-filename": "^1.6.3",
84
- "semantic-release": "^24.2.7",
85
+ "semantic-release": "^25.0.0",
85
86
  "semantic-release-export-data": "^1.1.0",
86
87
  "ts-essentials": "^10.1.1",
87
88
  "typescript-eslint": "^8.37.0"
88
89
  },
89
90
  "devDependencies": {
91
+ "@amanda-mitchell/semantic-release-npm-multiple": "^3.16.0",
90
92
  "@babel/cli": "^7.28.0",
91
93
  "@babel/core": "^7.28.0",
92
94
  "@babel/eslint-parser": "^7.28.0",
93
- "@commitlint/types": "^19.8.1",
95
+ "@commitlint/types": "^20.0.0",
94
96
  "@eslint/config-inspector": "^1.1.0",
95
97
  "@eslint/markdown": "^7.0.0",
96
98
  "@sebbo2002/semantic-release-jsr": "^3.0.0",
@@ -100,16 +102,17 @@
100
102
  "@types/tmp": "^0.2.6",
101
103
  "conventional-changelog-preset-loader": "^5.0.0",
102
104
  "eslint": "^9.31.0",
103
- "eslint-plugin-jsdoc": "^51.4.0",
104
- "eslint-plugin-unicorn": "^60.0.0",
105
+ "eslint-plugin-jsdoc": "^61.0.0",
106
+ "eslint-plugin-unicorn": "^62.0.0",
105
107
  "packemon": "^4.1.2",
106
108
  "tmp": "^0.2.3",
107
109
  "tslib": "^2.8.1",
108
110
  "tsx": "^4.20.3",
109
111
  "typescript": "^5.8.3"
110
112
  },
113
+ "//engines.node": "See file://./.nvmrc, https://github.com/nvm-sh/nvm#nvmrc. Supporting the lowest version possible is a PITA. Just support LTS. ",
111
114
  "engines": {
112
- "node": "^20.11.0 || >=21.2.0",
115
+ "node": ">=24.10.0",
113
116
  "npm": ">=10.5.0"
114
117
  },
115
118
  "engineStrict": true,
@@ -137,5 +140,5 @@
137
140
  "setupGitPluginSpec": "src/setupGitPluginSpec.ts"
138
141
  }
139
142
  },
140
- "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
143
+ "packageManager": "npm@11.6.2+sha512.ee22b335fcbc95662cdf3ab8a053daf045d9cf9c6df6040d28965abb707512b2c16fa6c5eec049d34c74f78f390cebd14f697919eadb97756564d4f9eccc4954"
141
144
  }
package/src/debug.ts CHANGED
@@ -1,9 +1,10 @@
1
- import debug from 'debug';
1
+ // note: @types/debug is incorrect. There is no .log function!
2
+ import createDebugger, { type Debugger } from 'debug';
2
3
 
3
- const _debug: ReturnType<typeof debug> = debug('@halospv3/hce.shared-config');
4
+ const _debug = createDebugger('@halospv3/hce.shared-config') as Debugger & { log: never };
4
5
 
5
- if (process.argv.some(v => v.includes('--debug')) || debug.enabled('@halospv3/hce.shared-config')) {
6
- debug.enable(_debug.namespace);
6
+ if (process.argv.some(v => v.includes('--debug')) || createDebugger.enabled('@halospv3/hce.shared-config')) {
7
+ createDebugger.enable(_debug.namespace);
7
8
  }
8
9
 
9
10
  export default _debug;
@@ -1,13 +1,12 @@
1
- import { isNativeError } from 'node:util/types';
2
1
  import { getEnvVarValue } from '../utils/env.js';
2
+ import { isError } from '../utils/isError.js';
3
3
  import {
4
4
  NugetRegistryInfo,
5
5
  NRIOpts,
6
6
  NRIOptsBase,
7
7
  } from './NugetRegistryInfo.js';
8
- import type { Out } from 'arktype';
8
+ import type { Out, Type } from 'arktype';
9
9
  import type { Default } from 'arktype/internal/attributes.ts';
10
- import type { ObjectType } from 'arktype/internal/methods/object.ts';
11
10
  import type { MSBuildProject, MSBuildEvaluationOutput } from './MSBuildProject.js';
12
11
  import type { NugetProjectProperties } from './NugetProjectProperties.js';
13
12
 
@@ -53,7 +52,7 @@ export class GitlabNugetRegistryInfo extends NugetRegistryInfo {
53
52
  */
54
53
  constructor(opts: typeof GLNRIOpts.inferIn) {
55
54
  const optsOut = GLNRIOpts.from(opts);
56
- if (isNativeError(optsOut.source))
55
+ if (isError(optsOut.source))
57
56
  throw optsOut.source;
58
57
  super(optsOut as typeof optsOut & { source: string });
59
58
  }
@@ -88,7 +87,7 @@ const GLNRI = GitlabNugetRegistryInfo;
88
87
  /**
89
88
  * The Arktype definition for {@link GitlabNugetRegistryInfo}'s constructor parameter. Construct an object of this type by calling {@link GLNRIOpts.from}
90
89
  */
91
- export const GLNRIOpts: ObjectType<{
90
+ export const GLNRIOpts: Type<{
92
91
  project: MSBuildProject | {
93
92
  readonly Items: Readonly<Required<MSBuildEvaluationOutput>['Items']>;
94
93
  readonly Properties: Readonly<NugetProjectProperties>;
@@ -1,44 +1,61 @@
1
1
  import { NugetRegistryInfo, getGithubOutput } from './NugetRegistryInfo.js';
2
+ import esMain from 'es-main';
2
3
 
3
- const args = process.argv.slice(2);
4
-
5
- // Parse command-line arguments - https://stackoverflow.com/a/76298476/14894786
6
- const options: {
7
- packageId?: string;
8
- source?: string;
9
- } & Record<string, string> = {};
10
- for (let i = 0; i < args.length; i += 2) {
11
- const argName = args[i];
12
- const argValue = args[i + 1];
13
- if (argValue !== undefined && argName?.startsWith('--') === true && options[argName.slice(2)] !== undefined) {
14
- options[argName.slice(2)] = argValue;
4
+ /**
5
+ * @returns if successful
6
+ * @throws {Error} if...
7
+ * - {@link process.argv} does not include...
8
+ * - `--packageId [string]`
9
+ * - `--source [string]`
10
+ * - Value of `await getGithubOutput())['new-release-version']`...
11
+ * - is not a valid Version
12
+ * - already exists at `source`
13
+ */
14
+ async function main(): Promise<0> {
15
+ const args = process.argv.slice(2);
16
+ // Parse command-line arguments - https://stackoverflow.com/a/76298476/14894786
17
+ const options: {
18
+ packageId: string | undefined;
19
+ source: string | undefined;
20
+ } & Record<string, string | undefined> = { packageId: undefined, source: undefined };
21
+ for (let i = 0; i < args.length; i += 2) {
22
+ const argName = args[i];
23
+ const argValue = args[i + 1];
24
+ if (argValue !== undefined && argName?.startsWith('--') === true) {
25
+ options[argName.slice(2)] = argValue;
26
+ }
15
27
  }
16
- }
17
28
 
18
- if (typeof options.packageId !== 'string')
19
- throw new Error('packageId must be a string');
20
- if (typeof options.source !== 'string')
21
- throw new Error('source must be a string');
29
+ if (typeof options.packageId !== 'string')
30
+ throw new Error('packageId must be a string');
31
+ if (typeof options.source !== 'string')
32
+ throw new Error('source must be a string');
33
+
34
+ const packageId = options.packageId,
35
+ source = options.source,
36
+ versionPattern = new RegExp(/\d+\.\d+\.\d+([-+].+)?/);
37
+ const ghOutput = await getGithubOutput() ?? {};
38
+ const matches = versionPattern.exec(ghOutput['new-release-version'] ?? '');
39
+ if (matches === null || matches.length === 0)
40
+ throw new Error(
41
+ 'The variable new-release-version is not present in the GITHUB_OUTPUT env file or its value contains invalid characters.',
42
+ );
22
43
 
23
- const packageId = options.packageId,
24
- source = options.source,
25
- versionPattern = new RegExp(/\d+\.\d+\.\d+([-+].+)?/);
26
- const ghOutput = await getGithubOutput() ?? {};
27
- const matches = versionPattern.exec(ghOutput['new-release-version'] ?? '');
28
- if (matches === null || matches.length === 0)
29
- throw new Error(
30
- 'The variable new-release-version is not present in the GITHUB_OUTPUT env file or its value contains invalid characters.',
44
+ const nextVersion = matches[0];
45
+ const isPublished = await NugetRegistryInfo.IsNextVersionAlreadyPublished(
46
+ source,
47
+ packageId,
48
+ nextVersion,
31
49
  );
32
50
 
33
- const nextVersion = matches[0];
34
- const isPublished = await NugetRegistryInfo.IsNextVersionAlreadyPublished(
35
- source,
36
- packageId,
37
- nextVersion,
38
- );
51
+ if (typeof isPublished !== 'boolean')
52
+ throw new Error('isPublished is not a boolean');
53
+ if (isPublished)
54
+ throw new Error(`${packageId}@${nextVersion} already exists at ${source}.`);
55
+ console.log(`OK: ${packageId}@${nextVersion} does NOT yet exist at ${source}. Yay.`);
56
+
57
+ return 0;
58
+ }
39
59
 
40
- if (typeof isPublished !== 'boolean')
41
- throw new Error('isPublished is not a boolean');
42
- if (isPublished)
43
- throw new Error(`${packageId}@${nextVersion} already exists at ${source}.`);
44
- console.log(`OK: ${packageId}@${nextVersion} does NOT yet exist at ${source}. Yay.`);
60
+ if (esMain(import.meta))
61
+ await main();
@@ -1,18 +1,17 @@
1
- import { type, type Scope } from 'arktype';
1
+ import { type, type Scope, type Type } from 'arktype';
2
2
  import { warn } from 'node:console';
3
3
  import { type Dirent } from 'node:fs';
4
4
  import { readdir, realpath, stat } from 'node:fs/promises';
5
5
  import path from 'node:path';
6
6
  import { setTimeout } from 'node:timers/promises';
7
- import { isNativeError } from 'node:util/types';
8
7
  import { CaseInsensitiveMap } from '../CaseInsensitiveMap.js';
9
8
  import { execAsync } from '../utils/execAsync.js';
9
+ import { isError } from '../utils/isError.js';
10
10
  import { MSBuildProjectProperties } from './MSBuildProjectProperties.js';
11
11
  import {
12
12
  NPPGetterNames,
13
13
  NugetProjectProperties,
14
14
  } from './NugetProjectProperties.js';
15
- import type { ObjectType } from 'arktype/internal/methods/object.ts';
16
15
 
17
16
  /**
18
17
  * See [MSBuild well-known item metadata](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-well-known-item-metadata).
@@ -73,7 +72,7 @@ const targetFailure = type({
73
72
  Items: 'never[]',
74
73
  });
75
74
 
76
- const msbuildEvaluationOutput: ObjectType<{
75
+ const msbuildEvaluationOutput: Type<{
77
76
  Properties?: Record<string, string> | undefined;
78
77
  Items?: Record<string, {
79
78
  [x: string]: string | undefined;
@@ -170,7 +169,7 @@ export class MSBuildEvaluationOutput {
170
169
  TargetResults?: typeof msbuildEvaluationOutput.infer.TargetResults;
171
170
  }
172
171
 
173
- export const EvaluationOptions: ObjectType<{
172
+ export const EvaluationOptions: Type<{
174
173
  FullName: string;
175
174
  Property: {
176
175
  MSBuildProjectFullPath?: string | undefined;
@@ -331,7 +330,7 @@ export class MSBuildProject {
331
330
  * target is specified. If you choose Pack, you must do ['Restore', 'Pack'].
332
331
  * @param options The result of {@link EvaluationOptions.from}.
333
332
  * @returns A promised {@link MSBuildProject} instance.
334
- * @throws if the exec command fails -OR- the JSON parse fails -OR-
333
+ * @throws {Error} if the exec command fails -OR- the JSON parse fails -OR-
335
334
  * MSBuildProject's constructor fails.
336
335
  * @see {@link PackableProjectsToMSBuildProjects} for most use-cases.
337
336
  */
@@ -483,7 +482,7 @@ export class MSBuildProject {
483
482
  const dirent: Dirent | undefined = entries.find(v =>
484
483
  path.join(
485
484
  // condition required for compatibility. `.path` was deprecated, but `.parentPath` is not available in our node minversion
486
- v.path as string | undefined ?? (v as unknown as Omit<typeof v, 'path'> & { parentPath: string }).parentPath,
485
+ ('path' in v ? v.path as string | undefined : undefined) ?? (v as unknown as Omit<typeof v, 'path'> & { parentPath: string }).parentPath,
487
486
  v.name,
488
487
  ) === proj,
489
488
  );
@@ -516,7 +515,7 @@ export class MSBuildProject {
516
515
  async function convertDirentToMSBuildProject(dirent: Dirent): Promise<MSBuildProject> {
517
516
  const fullPath = path.join(
518
517
  // condition required for compatibility. `.path` was deprecated, but `.parentPath` is not available in our node minversion
519
- dirent.path as string | undefined ?? (dirent as unknown as Omit<typeof dirent, 'path'> & { parentPath: string }).parentPath,
518
+ ('path' in dirent ? dirent.path as string | undefined : undefined) ?? (dirent as unknown as Omit<typeof dirent, 'path'> & { parentPath: string }).parentPath,
520
519
  dirent.name,
521
520
  );
522
521
  const projTargets: Promise<string[]> = MSBuildProject.GetTargets(fullPath);
@@ -674,7 +673,7 @@ function makeAbsolute(_path: string) {
674
673
  * @returns `undefined` if CSC2012 (file in use by another process) occurs
675
674
  */
676
675
  export function catchCsc2012(error: unknown): undefined {
677
- if (isNativeError(error)) {
676
+ if (isError(error)) {
678
677
  // check for error reported when "file in use by another process" i.e. EBUSY
679
678
  // (UNIX), NTSTATUS.ERROR_SHARING_VIOLATION == 0x20 == 32 (Windows)
680
679
  if ('stderr' in error && typeof error.stderr === 'string'
@@ -14,10 +14,9 @@ import {
14
14
  type WithProto,
15
15
  } from '../utils/reflection.js';
16
16
  import { MSBuildProjectProperties, type Class_MSBPP } from './MSBuildProjectProperties.js';
17
- import type { StringType } from 'arktype/internal/methods/string.ts';
18
17
 
19
- const Type_RepositoryType: StringType<'' | 'git' | 'tfs'> = type('""|"git"|"tfs"');
20
- const Type_SymbolPackageFormat: StringType<'symbols.nupkg' | 'snupkg'> = type('"symbols.nupkg" | "snupkg"');
18
+ const Type_RepositoryType: type<'' | 'git' | 'tfs'> = type('""|"git"|"tfs"');
19
+ const Type_SymbolPackageFormat: type<'symbols.nupkg' | 'snupkg'> = type('"symbols.nupkg" | "snupkg"');
21
20
 
22
21
  /**
23
22
  * A readonly record of a .csproj or .fsproj with NuGet configuration properties in
@@ -5,7 +5,7 @@ import type { NugetProjectProperties } from './NugetProjectProperties.js';
5
5
  /* eslint-enable @typescript-eslint/no-unused-vars */
6
6
 
7
7
  import { config as configDotenv } from '@dotenvx/dotenvx';
8
- import { type } from 'arktype';
8
+ import { type, type Type } from 'arktype';
9
9
  import { detectFile, detectFileSync } from 'chardet';
10
10
  import { ok } from 'node:assert/strict';
11
11
  import type { ExecException } from 'node:child_process';
@@ -15,12 +15,11 @@ import { tmpdir } from 'node:os';
15
15
  import node_path from 'node:path';
16
16
  import { cwd, env } from 'node:process';
17
17
  import { setTimeout } from 'node:timers/promises';
18
- import { isNativeError } from 'node:util/types';
18
+ import { isError } from '../utils/isError.js';
19
19
  import sanitizeFileName from 'sanitize-filename';
20
20
  import { getEnvVarValue } from '../utils/env.js';
21
21
  import { execAsync } from '../utils/execAsync.js';
22
22
  import { catchCsc2012, MSBuildEvaluationOutput, MSBuildProject } from './MSBuildProject.js';
23
- import type { ObjectType } from 'arktype/internal/methods/object.ts';
24
23
  import type { Default } from 'arktype/internal/attributes.ts';
25
24
 
26
25
  type TmpDirNamespace_Unix = `${ReturnType<typeof tmpdir>}/HCE.Shared/.NET/Dummies`;
@@ -49,7 +48,7 @@ export async function getGithubOutput(): Promise<ReturnType<typeof configDotenv>
49
48
  processEnv: {},
50
49
  });
51
50
 
52
- if (isNativeError(envOutput.error))
51
+ if (isError(envOutput.error))
53
52
  throw envOutput.error;
54
53
  return envOutput.parsed;
55
54
  }
@@ -294,7 +293,7 @@ but the environment variable is empty or undefined.`);
294
293
  * {@link NRI.PackPackagesOptionsType.t.propertyOverrides `propertyOverrides`}
295
294
  * is a wrapper for MSBuild's `-property:<n>=<v>` properties override arg.
296
295
  */
297
- static readonly PackPackagesOptionsType: ObjectType<{
296
+ static readonly PackPackagesOptionsType: Type<{
298
297
  propertyOverrides?: Record<string, string> | undefined;
299
298
  artifactsPath?: string | undefined;
300
299
  configuration?: 'Release' | 'Debug' | undefined;
@@ -345,7 +344,7 @@ but the environment variable is empty or undefined.`);
345
344
  }),
346
345
  );
347
346
 
348
- public static readonly PackDummyPackagesOptionsType: ObjectType<{
347
+ public static readonly PackDummyPackagesOptionsType: Type<{
349
348
  propertyOverrides?: Record<string, string> | undefined;
350
349
  artifactsPath?: string | undefined;
351
350
  configuration?: 'Release' | 'Debug' | undefined;
@@ -559,7 +558,7 @@ but the environment variable is empty or undefined.`);
559
558
  * Specific to this API:
560
559
  * If you want to use this API's default root value (\`${cwd()}/publish`), assign an empty string.
561
560
  */
562
- static readonly PushPackagesOptionsType: ObjectType<{
561
+ static readonly PushPackagesOptionsType: Type<{
563
562
  root: string;
564
563
  apiKey?: string | undefined;
565
564
  configFile?: string | undefined;
@@ -612,7 +611,7 @@ but the environment variable is empty or undefined.`);
612
611
  * {@link NRI.PushPackagesOptionsType} sans {@link NRI.PushPackagesOptionsType.t.root}.
613
612
  * The result of {@link getDummiesDir} is used, instead.
614
613
  */
615
- public static readonly PushDummyPackagesOptionsType: ObjectType<{
614
+ public static readonly PushDummyPackagesOptionsType: Type<{
616
615
  apiKey?: string | undefined;
617
616
  configFile?: string | undefined;
618
617
  disableBuffering?: boolean | undefined;
@@ -730,7 +729,7 @@ but the environment variable is empty or undefined.`);
730
729
  ),
731
730
  true,
732
731
  ).catch((error: unknown) => {
733
- const _error: Error = isNativeError(error) ? error : new Error(JSON.stringify(error));
732
+ const _error: Error = isError(error) ? error : new Error(JSON.stringify(error));
734
733
  throw opts.apiKey
735
734
  ? _censorTokenInError(_error, opts.apiKey)
736
735
  : _error;
@@ -792,7 +791,7 @@ but the environment variable is empty or undefined.`);
792
791
  const pushCmd: string = this.GetPushDummyCommand(opts);
793
792
  return await execAsync(pushCmd, true)
794
793
  .catch((error: unknown) => {
795
- const _error: Error = isNativeError(error) ? error : new Error(String(error));
794
+ const _error: Error = isError(error) ? error : new Error(String(error));
796
795
  throw opts.apiKey
797
796
  ? _censorTokenInError(_error, opts.apiKey)
798
797
  : _error;
@@ -906,7 +905,7 @@ const NRI: typeof NugetRegistryInfo = NugetRegistryInfo;
906
905
  * The base type for {@link NRIOpts} and related types. Extend this type while
907
906
  * overriding member types via {@link NRIOptsBase.merge}
908
907
  */
909
- export const NRIOptsBase: ObjectType<{
908
+ export const NRIOptsBase: Type<{
910
909
  project: MSBuildProject | {
911
910
  readonly Items: Readonly<Required<MSBuildEvaluationOutput>['Items']>;
912
911
  readonly Properties: Readonly<NugetProjectProperties>;
@@ -960,7 +959,7 @@ export const NRIOptsBase: ObjectType<{
960
959
  /**
961
960
  * The type of the parameter for {@link NugetRegistryInfo}'s constructor.
962
961
  */
963
- export const NRIOpts: ObjectType<{
962
+ export const NRIOpts: Type<{
964
963
  project: MSBuildProject | {
965
964
  readonly Items: Readonly<Required<MSBuildEvaluationOutput>['Items']>;
966
965
  readonly Properties: Readonly<NugetProjectProperties>;
@@ -1,11 +1,10 @@
1
- import { type } from 'arktype';
1
+ import { type, type Type } from 'arktype';
2
2
  import path from 'node:path';
3
3
  import { cwd } from 'node:process';
4
4
  import { MSBuildProject } from './MSBuildProject.js';
5
5
  import { MSBuildProjectProperties as MSBPP } from './MSBuildProjectProperties.js';
6
6
  import { NugetRegistryInfo } from './NugetRegistryInfo.js';
7
7
  import type { Default } from 'arktype/internal/attributes.ts';
8
- import type { ObjectType } from 'arktype/internal/methods/object.ts';
9
8
 
10
9
  const ourDefaultPubDir = path.join('.', 'publish') as `.${'/' | '\\'}publish`;
11
10
 
@@ -67,7 +66,7 @@ export async function configurePrepareCmd(
67
66
  * paths.
68
67
  * @returns A Promise of a string. This string contains one or more `dotnet publish`
69
68
  * commands conjoined by " && ". It may also include one or more
70
- * `dotnet msbuild ${...} -t:PublishAll` commands.
69
+ * `dotnet msbuild ${...} -t:PublishAll -p:Configuration=Release` commands.
71
70
  */
72
71
  async function formatDotnetPublish(
73
72
  projectsToPublish: string[] | MSBuildProject[],
@@ -138,7 +137,7 @@ export async function configurePrepareCmd(
138
137
  * runtime-framework combinations.
139
138
  * @returns If {@link proj} imports {@link ../../dotnet/PublishAll.targets}...
140
139
  * ```
141
- * [`${proj.Properties.MSBuildProjectFullPath} -t:PublishAll`]
140
+ * [`${proj.Properties.MSBuildProjectFullPath} -t:PublishAll -p:Configuration=Release`]
142
141
  * ```
143
142
  * Else, an array of `dotnet publish` arguments permutations e.g.
144
143
  * ```
@@ -163,7 +162,7 @@ export async function configurePrepareCmd(
163
162
  * return publishCmdArray.join(' && ');
164
163
  */
165
164
  function getPublishArgsPermutations(proj: MSBuildProject):
166
- ([`"${typeof proj.Properties.MSBuildProjectFullPath}" -t:PublishAll`])
165
+ ([`"${typeof proj.Properties.MSBuildProjectFullPath}" -t:PublishAll -p:Configuration=Release`])
167
166
  | ([`"${typeof proj.Properties.MSBuildProjectFullPath}"`])
168
167
  | (`"${typeof proj.Properties.MSBuildProjectFullPath}" --runtime ${string} --framework ${string}`)[]
169
168
  | (`"${typeof proj.Properties.MSBuildProjectFullPath}" --runtime ${string}`)[]
@@ -173,7 +172,7 @@ export async function configurePrepareCmd(
173
172
  * permutation, return the appropriate command line.
174
173
  */
175
174
  if (proj.Targets.includes('PublishAll'))
176
- return [`"${proj.Properties.MSBuildProjectFullPath}" -t:PublishAll`];
175
+ return [`"${proj.Properties.MSBuildProjectFullPath}" -t:PublishAll -p:Configuration=Release`];
177
176
 
178
177
  // #region formatFrameworksAndRuntimes
179
178
  const tfmRidPermutations: `--runtime ${string} --framework ${string}`[]
@@ -220,7 +219,7 @@ export async function configurePrepareCmd(
220
219
  // #endregion formatFrameworksAndRuntimes
221
220
  }
222
221
 
223
- const publishCmds: (`dotnet publish "${string}"` | `dotnet publish "${string}" ${string}` | `dotnet msbuild "${string}" -t:PublishAll`)[] = [];
222
+ const publishCmds: (`dotnet publish "${string}"` | `dotnet publish "${string}" ${string}` | `dotnet msbuild "${string}" -t:PublishAll -p:Configuration=Release`)[] = [];
224
223
  /** convert {@link evaluatedPublishProjects} to sets of space-separated CLI args. */
225
224
  const argsSets = evaluatedPublishProjects.map(
226
225
  proj => getPublishArgsPermutations(proj),
@@ -231,7 +230,10 @@ export async function configurePrepareCmd(
231
230
  for (const permutation of args) {
232
231
  if (typeof permutation === 'string' && permutation.length === 1)
233
232
  throw new Error('Something has gone terribly wrong. A `dotnet publish` argument set was split to single characters!');
234
- publishCmds.push(`dotnet publish ${permutation}`);
233
+ if (/".+" -t:PublishAll -p:Configuration=Release/.test(permutation))
234
+ publishCmds.push(`dotnet msbuild ${permutation as `"${string}" -t:PublishAll -p:Configuration=Release`}`);
235
+ else
236
+ publishCmds.push(`dotnet publish ${permutation}`);
235
237
  }
236
238
  }
237
239
 
@@ -366,7 +368,7 @@ function formatDotnetNugetSign(
366
368
  }
367
369
  }
368
370
 
369
- const DotnetNugetSignOptions: ObjectType<
371
+ const DotnetNugetSignOptions: Type<
370
372
  {
371
373
  timestamper: Default<string, 'https://rfc3161.ai.moda/'>;
372
374
  certificatePassword?: string | undefined;
@@ -1,12 +1,3 @@
1
- export type * from './GithubNugetRegistryInfo.js';
2
- export type * from './GitlabNugetRegistryInfo.js';
3
- export type * from './helpers.js';
4
- export type * from './IsNextVersionAlreadyPublished.cli.js';
5
- export type * from './MSBuildProject.js';
6
- export type * from './MSBuildProjectProperties.js';
7
- export type * from './NugetProjectProperties.js';
8
- export type * from './NugetRegistryInfo.js';
9
-
10
1
  export * from './GithubNugetRegistryInfo.js';
11
2
  export * from './GitlabNugetRegistryInfo.js';
12
3
  export * from './helpers.js';
package/src/dotnet.ts CHANGED
@@ -1,2 +1 @@
1
- export type * from './dotnet/index.js';
2
1
  export * from './dotnet/index.js';