release-note 0.0.7 → 0.0.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.
package/dist/bin.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const require_chunk = require("./chunk-Cek0wNdY.cjs");
3
- const require_generate = require("./generate-Co3HP4o3.cjs");
3
+ const require_generate = require("./generate-Dek8yxKi.cjs");
4
4
  let node_events = require("node:events");
5
5
  let node_child_process = require("node:child_process");
6
6
  node_child_process = require_chunk.__toESM(node_child_process, 1);
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as resolveConfig, t as generateReleaseNote } from "./generate-DrcKRdlK.mjs";
2
+ import { C as resolveConfig, t as generateReleaseNote } from "./generate-7V2JnFA2.mjs";
3
3
  import { EventEmitter } from "node:events";
4
4
  import childProcess from "node:child_process";
5
5
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.cjs");
2
- const require_generate = require("./generate-Co3HP4o3.cjs");
2
+ const require_generate = require("./generate-Dek8yxKi.cjs");
3
3
  //#region node_modules/.pnpm/@ai-sdk+openai-compatible@2.0.48_zod@4.4.3/node_modules/@ai-sdk/openai-compatible/dist/index.mjs
4
4
  function toCamelCase(str) {
5
5
  return str.replace(/[_-]([a-z])/g, (g) => g[1].toUpperCase());
@@ -1,4 +1,4 @@
1
- import { A as number, D as boolean, E as array, M as record, N as string, O as literal, P as union, S as UnsupportedFunctionalityError, T as any, _ as withUserAgentSuffix, a as convertBase64ToUint8Array, b as InvalidResponseDataError, c as createEventSourceResponseHandler, d as downloadBlob, f as generateId, g as postJsonToApi, h as postFormDataToApi, i as combineHeaders, j as object, k as looseObject, l as createJsonErrorResponseHandler, m as parseProviderOptions, o as convertToBase64, p as isParsableJson, s as convertToFormData, u as createJsonResponseHandler, v as withoutTrailingSlash, w as _enum, x as TooManyEmbeddingValuesForCallError, y as InvalidPromptError } from "./generate-DrcKRdlK.mjs";
1
+ import { A as number, D as boolean, E as array, M as record, N as string, O as literal, P as union, S as UnsupportedFunctionalityError, T as any, _ as withUserAgentSuffix, a as convertBase64ToUint8Array, b as InvalidResponseDataError, c as createEventSourceResponseHandler, d as downloadBlob, f as generateId, g as postJsonToApi, h as postFormDataToApi, i as combineHeaders, j as object, k as looseObject, l as createJsonErrorResponseHandler, m as parseProviderOptions, o as convertToBase64, p as isParsableJson, s as convertToFormData, u as createJsonResponseHandler, v as withoutTrailingSlash, w as _enum, x as TooManyEmbeddingValuesForCallError, y as InvalidPromptError } from "./generate-7V2JnFA2.mjs";
2
2
  //#region node_modules/.pnpm/@ai-sdk+openai-compatible@2.0.48_zod@4.4.3/node_modules/@ai-sdk/openai-compatible/dist/index.mjs
3
3
  function toCamelCase(str) {
4
4
  return str.replace(/[_-]([a-z])/g, (g) => g[1].toUpperCase());
@@ -13972,18 +13972,28 @@ const gitCommitTargetSchema = union([tagSchema, object$1({
13972
13972
  prev: union([tagSchema, commitSchema]),
13973
13973
  current: union([tagSchema, commitSchema])
13974
13974
  })]);
13975
- const providerOptionsSchema = object$1({
13975
+ const generateConfigSchema = object$1({
13976
13976
  apiUrl: string$1().optional(),
13977
13977
  apiKeyEnv: union([string$1(), array$1(string$1())]).optional(),
13978
13978
  provider: _enum(Object.keys(SUPPORTED_PROVIDERS)).default("@ai-sdk/openai-compatible"),
13979
13979
  headers: record(string$1(), string$1()).optional(),
13980
13980
  options: record(string$1(), unknown()).optional()
13981
- });
13982
- const generateConfigSchema = object$1({
13981
+ }).extend({
13983
13982
  target: gitCommitTargetSchema.default({ tag: ".*" }),
13984
13983
  model: string$1().min(1),
13985
- steps: number$1().int().min(5).max(500).optional()
13986
- }).extend(providerOptionsSchema.shape);
13984
+ temperature: number$1().min(0).max(1).optional(),
13985
+ topP: number$1().min(0).max(1).optional(),
13986
+ topK: number$1().optional(),
13987
+ maxRetries: number$1().int().min(0).optional(),
13988
+ maxOutputTokens: number$1().int().min(1).optional(),
13989
+ toolChoice: _enum([
13990
+ "auto",
13991
+ "none",
13992
+ "required"
13993
+ ]).optional(),
13994
+ steps: number$1().int().min(5).max(500).optional(),
13995
+ instructions: string$1().optional()
13996
+ });
13987
13997
  //#endregion
13988
13998
  //#region src/config/resolve-config.ts
13989
13999
  const CONFIG_PATHS = [
@@ -14027,7 +14037,7 @@ async function resolveProvider(name, options) {
14027
14037
  if (name === "@ai-sdk/openai-compatible") {
14028
14038
  if (!options.apiUrl) throw new Error("\"\"apiUrl\"\" is required for openai-compatible provider");
14029
14039
  if (!resolvedApiKey) throw new Error("No API key found in the specified environment variables");
14030
- const { createOpenAICompatible } = await import("./dist-CeBX9H5m.mjs");
14040
+ const { createOpenAICompatible } = await import("./dist-CAvr2NGX.mjs");
14031
14041
  return createOpenAICompatible({
14032
14042
  name,
14033
14043
  apiKey: resolvedApiKey,
@@ -19921,7 +19931,7 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJSMin(((exports, mod
19921
19931
  err = error;
19922
19932
  }
19923
19933
  try {
19924
- const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_token_util())), await import("./token-BhSAhkpE.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))]);
19934
+ const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_token_util())), await import("./token-CZ2jk4PL.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))]);
19925
19935
  if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
19926
19936
  await refreshToken(options);
19927
19937
  token = getVercelOidcTokenSync();
@@ -30920,16 +30930,29 @@ async function generateReleaseNote(cwd, options) {
30920
30930
  options.logger?.(`Generating with "${options.provider}" using "${options.model}" in ${steps} steps...`);
30921
30931
  const result = await generateText({
30922
30932
  model: provider(options.model),
30933
+ temperature: options.temperature,
30934
+ topP: options.topP,
30935
+ topK: options.topK,
30936
+ maxRetries: options.maxRetries,
30937
+ maxOutputTokens: options.maxOutputTokens,
30938
+ toolChoice: options.toolChoice,
30923
30939
  tools: generateTools(git, options.logger),
30924
30940
  stopWhen: stepCountIs(steps),
30925
30941
  system: buildSystemPrompt(Math.floor(steps / 1.5)),
30926
- messages: [{
30927
- role: "user",
30928
- content: "Here are the commits related to the release:"
30929
- }, {
30930
- role: "user",
30931
- content: commitsMarkdown.trim()
30932
- }]
30942
+ messages: [
30943
+ {
30944
+ role: "user",
30945
+ content: "Here are the commits related to the release:"
30946
+ },
30947
+ {
30948
+ role: "user",
30949
+ content: commitsMarkdown.trim()
30950
+ },
30951
+ ...options.instructions ? [{
30952
+ role: "user",
30953
+ content: options.instructions
30954
+ }] : []
30955
+ ]
30933
30956
  });
30934
30957
  return {
30935
30958
  commits,
@@ -13977,18 +13977,28 @@ const gitCommitTargetSchema = union([tagSchema, object$1({
13977
13977
  prev: union([tagSchema, commitSchema]),
13978
13978
  current: union([tagSchema, commitSchema])
13979
13979
  })]);
13980
- const providerOptionsSchema = object$1({
13980
+ const generateConfigSchema = object$1({
13981
13981
  apiUrl: string$1().optional(),
13982
13982
  apiKeyEnv: union([string$1(), array$1(string$1())]).optional(),
13983
13983
  provider: _enum(Object.keys(SUPPORTED_PROVIDERS)).default("@ai-sdk/openai-compatible"),
13984
13984
  headers: record(string$1(), string$1()).optional(),
13985
13985
  options: record(string$1(), unknown()).optional()
13986
- });
13987
- const generateConfigSchema = object$1({
13986
+ }).extend({
13988
13987
  target: gitCommitTargetSchema.default({ tag: ".*" }),
13989
13988
  model: string$1().min(1),
13990
- steps: number$1().int().min(5).max(500).optional()
13991
- }).extend(providerOptionsSchema.shape);
13989
+ temperature: number$1().min(0).max(1).optional(),
13990
+ topP: number$1().min(0).max(1).optional(),
13991
+ topK: number$1().optional(),
13992
+ maxRetries: number$1().int().min(0).optional(),
13993
+ maxOutputTokens: number$1().int().min(1).optional(),
13994
+ toolChoice: _enum([
13995
+ "auto",
13996
+ "none",
13997
+ "required"
13998
+ ]).optional(),
13999
+ steps: number$1().int().min(5).max(500).optional(),
14000
+ instructions: string$1().optional()
14001
+ });
13992
14002
  //#endregion
13993
14003
  //#region src/config/resolve-config.ts
13994
14004
  const CONFIG_PATHS = [
@@ -14032,7 +14042,7 @@ async function resolveProvider(name, options) {
14032
14042
  if (name === "@ai-sdk/openai-compatible") {
14033
14043
  if (!options.apiUrl) throw new Error("\"\"apiUrl\"\" is required for openai-compatible provider");
14034
14044
  if (!resolvedApiKey) throw new Error("No API key found in the specified environment variables");
14035
- const { createOpenAICompatible } = await Promise.resolve().then(() => require("./dist-DS4okU_S.cjs"));
14045
+ const { createOpenAICompatible } = await Promise.resolve().then(() => require("./dist-BvsdEIPM.cjs"));
14036
14046
  return createOpenAICompatible({
14037
14047
  name,
14038
14048
  apiKey: resolvedApiKey,
@@ -19926,7 +19936,7 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ require_chunk.__commonJSMin(
19926
19936
  err = error;
19927
19937
  }
19928
19938
  try {
19929
- const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require_token_util())), await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./token-Cv3WAUe2.cjs").default))]);
19939
+ const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require_token_util())), await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./token-C4YQI8jF.cjs").default))]);
19930
19940
  if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
19931
19941
  await refreshToken(options);
19932
19942
  token = getVercelOidcTokenSync();
@@ -30925,16 +30935,29 @@ async function generateReleaseNote(cwd, options) {
30925
30935
  options.logger?.(`Generating with "${options.provider}" using "${options.model}" in ${steps} steps...`);
30926
30936
  const result = await generateText({
30927
30937
  model: provider(options.model),
30938
+ temperature: options.temperature,
30939
+ topP: options.topP,
30940
+ topK: options.topK,
30941
+ maxRetries: options.maxRetries,
30942
+ maxOutputTokens: options.maxOutputTokens,
30943
+ toolChoice: options.toolChoice,
30928
30944
  tools: generateTools(git, options.logger),
30929
30945
  stopWhen: stepCountIs(steps),
30930
30946
  system: buildSystemPrompt(Math.floor(steps / 1.5)),
30931
- messages: [{
30932
- role: "user",
30933
- content: "Here are the commits related to the release:"
30934
- }, {
30935
- role: "user",
30936
- content: commitsMarkdown.trim()
30937
- }]
30947
+ messages: [
30948
+ {
30949
+ role: "user",
30950
+ content: "Here are the commits related to the release:"
30951
+ },
30952
+ {
30953
+ role: "user",
30954
+ content: commitsMarkdown.trim()
30955
+ },
30956
+ ...options.instructions ? [{
30957
+ role: "user",
30958
+ content: options.instructions
30959
+ }] : []
30960
+ ]
30938
30961
  });
30939
30962
  return {
30940
30963
  commits,
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("./chunk-Cek0wNdY.cjs");
6
- const require_generate = require("./generate-Co3HP4o3.cjs");
6
+ const require_generate = require("./generate-Dek8yxKi.cjs");
7
7
  //#region src/index.ts
8
8
  var src_default = require_generate.generateReleaseNote;
9
9
  const releaseNote = require_generate.generateReleaseNote;
package/dist/index.d.cts CHANGED
@@ -6424,25 +6424,6 @@ declare global {
6424
6424
  //#endregion
6425
6425
  //#region src/config/config-schema.d.ts
6426
6426
  declare const generateConfigSchema: ZodObject<{
6427
- target: ZodDefault<ZodUnion<readonly [ZodObject<{
6428
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6429
- offset: ZodOptional<ZodNumber>;
6430
- }, $strip>, ZodObject<{
6431
- prev: ZodUnion<readonly [ZodObject<{
6432
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6433
- offset: ZodOptional<ZodNumber>;
6434
- }, $strip>, ZodObject<{
6435
- commit: ZodString;
6436
- }, $strip>]>;
6437
- current: ZodUnion<readonly [ZodObject<{
6438
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6439
- offset: ZodOptional<ZodNumber>;
6440
- }, $strip>, ZodObject<{
6441
- commit: ZodString;
6442
- }, $strip>]>;
6443
- }, $strip>]>>;
6444
- model: ZodString;
6445
- steps: ZodOptional<ZodNumber>;
6446
6427
  apiUrl: ZodOptional<ZodString>;
6447
6428
  apiKeyEnv: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6448
6429
  provider: ZodDefault<ZodEnum<{
@@ -6470,6 +6451,36 @@ declare const generateConfigSchema: ZodObject<{
6470
6451
  }>>;
6471
6452
  headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
6472
6453
  options: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
6454
+ target: ZodDefault<ZodUnion<readonly [ZodObject<{
6455
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6456
+ offset: ZodOptional<ZodNumber>;
6457
+ }, $strip>, ZodObject<{
6458
+ prev: ZodUnion<readonly [ZodObject<{
6459
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6460
+ offset: ZodOptional<ZodNumber>;
6461
+ }, $strip>, ZodObject<{
6462
+ commit: ZodString;
6463
+ }, $strip>]>;
6464
+ current: ZodUnion<readonly [ZodObject<{
6465
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6466
+ offset: ZodOptional<ZodNumber>;
6467
+ }, $strip>, ZodObject<{
6468
+ commit: ZodString;
6469
+ }, $strip>]>;
6470
+ }, $strip>]>>;
6471
+ model: ZodString;
6472
+ temperature: ZodOptional<ZodNumber>;
6473
+ topP: ZodOptional<ZodNumber>;
6474
+ topK: ZodOptional<ZodNumber>;
6475
+ maxRetries: ZodOptional<ZodNumber>;
6476
+ maxOutputTokens: ZodOptional<ZodNumber>;
6477
+ toolChoice: ZodOptional<ZodEnum<{
6478
+ auto: "auto";
6479
+ none: "none";
6480
+ required: "required";
6481
+ }>>;
6482
+ steps: ZodOptional<ZodNumber>;
6483
+ instructions: ZodOptional<ZodString>;
6473
6484
  }, $strip>;
6474
6485
  //#endregion
6475
6486
  //#region src/generate/index.d.ts
package/dist/index.d.mts CHANGED
@@ -6424,25 +6424,6 @@ declare global {
6424
6424
  //#endregion
6425
6425
  //#region src/config/config-schema.d.ts
6426
6426
  declare const generateConfigSchema: ZodObject<{
6427
- target: ZodDefault<ZodUnion<readonly [ZodObject<{
6428
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6429
- offset: ZodOptional<ZodNumber>;
6430
- }, $strip>, ZodObject<{
6431
- prev: ZodUnion<readonly [ZodObject<{
6432
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6433
- offset: ZodOptional<ZodNumber>;
6434
- }, $strip>, ZodObject<{
6435
- commit: ZodString;
6436
- }, $strip>]>;
6437
- current: ZodUnion<readonly [ZodObject<{
6438
- tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6439
- offset: ZodOptional<ZodNumber>;
6440
- }, $strip>, ZodObject<{
6441
- commit: ZodString;
6442
- }, $strip>]>;
6443
- }, $strip>]>>;
6444
- model: ZodString;
6445
- steps: ZodOptional<ZodNumber>;
6446
6427
  apiUrl: ZodOptional<ZodString>;
6447
6428
  apiKeyEnv: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6448
6429
  provider: ZodDefault<ZodEnum<{
@@ -6470,6 +6451,36 @@ declare const generateConfigSchema: ZodObject<{
6470
6451
  }>>;
6471
6452
  headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
6472
6453
  options: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
6454
+ target: ZodDefault<ZodUnion<readonly [ZodObject<{
6455
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6456
+ offset: ZodOptional<ZodNumber>;
6457
+ }, $strip>, ZodObject<{
6458
+ prev: ZodUnion<readonly [ZodObject<{
6459
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6460
+ offset: ZodOptional<ZodNumber>;
6461
+ }, $strip>, ZodObject<{
6462
+ commit: ZodString;
6463
+ }, $strip>]>;
6464
+ current: ZodUnion<readonly [ZodObject<{
6465
+ tag: ZodUnion<[ZodString, ZodCustom<RegExp, RegExp>]>;
6466
+ offset: ZodOptional<ZodNumber>;
6467
+ }, $strip>, ZodObject<{
6468
+ commit: ZodString;
6469
+ }, $strip>]>;
6470
+ }, $strip>]>>;
6471
+ model: ZodString;
6472
+ temperature: ZodOptional<ZodNumber>;
6473
+ topP: ZodOptional<ZodNumber>;
6474
+ topK: ZodOptional<ZodNumber>;
6475
+ maxRetries: ZodOptional<ZodNumber>;
6476
+ maxOutputTokens: ZodOptional<ZodNumber>;
6477
+ toolChoice: ZodOptional<ZodEnum<{
6478
+ auto: "auto";
6479
+ none: "none";
6480
+ required: "required";
6481
+ }>>;
6482
+ steps: ZodOptional<ZodNumber>;
6483
+ instructions: ZodOptional<ZodString>;
6473
6484
  }, $strip>;
6474
6485
  //#endregion
6475
6486
  //#region src/generate/index.d.ts
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as generateReleaseNote } from "./generate-DrcKRdlK.mjs";
1
+ import { t as generateReleaseNote } from "./generate-7V2JnFA2.mjs";
2
2
  //#region src/index.ts
3
3
  var src_default = generateReleaseNote;
4
4
  const releaseNote = generateReleaseNote;
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.cjs");
2
- const require_generate = require("./generate-Co3HP4o3.cjs");
2
+ const require_generate = require("./generate-Dek8yxKi.cjs");
3
3
  //#region node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js
4
4
  var require_token = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
1
  import { t as __commonJSMin } from "./chunk-CNf5ZN-e.mjs";
2
- import { n as require_token_util, r as require_token_error } from "./generate-DrcKRdlK.mjs";
2
+ import { n as require_token_util, r as require_token_error } from "./generate-7V2JnFA2.mjs";
3
3
  //#region node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js
4
4
  var require_token = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
5
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-note",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "scripts": {
5
5
  "lint": "eslint .",
6
6
  "lint:fix": "eslint . --fix",