Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/hungry-hands-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@stephansama/catppuccin-jsonresume-theme": patch
"@stephansama/prettier-plugin-handlebars": patch
"@stephansama/find-makefile-targets": patch
"@stephansama/astro-iconify-svgmap": patch
"@stephansama/remark-asciinema": patch
"@stephansama/typed-nocodb-api": patch
"@stephansama/typed-templates": patch
"@stephansama/ai-commit-msg": patch
"@stephansama/eslint-config": patch
"@stephansama/multipublish": patch
"@stephansama/typed-events": patch
"@stephansama/auto-readme": patch
"@stephansama/single-file": patch
"@stephansama/types-lhci": patch
"@stephansama/typed-env": patch
"create-stephansama-example": patch
---

added tsnapi snapshots to preserve api state
2 changes: 1 addition & 1 deletion .config/autoreadmerc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../node_modules/@stephansama/auto-readme/config/schema.json",
"$schema": "../node_modules/@stephansama/auto-readme/dist/schema.json",
"usageFile": "./example/index.js",
"collapseHeadings": ["Configuration File", "Schema"],
"enablePrettier": false,
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
!patches/*
**/tests/fixtures/**
__snapshots__
core/catppuccin-xsl/templates/**/*.hbs
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/cli.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/cli`
*/
/* no exports */
4 changes: 4 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/cli.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/cli`
*/
/* no exports */
6 changes: 6 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/index.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg`
*/
// #region Functions
export declare function run(): Promise<void>;
// #endregion
6 changes: 6 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/index.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg`
*/
// #region Functions
export async function run() {}
// #endregion
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/schema.json`
*/
/* no exports */
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/schema.json`
*/
/* no exports */
42 changes: 42 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/schema.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/schema`
*/
// #region Types
export type Config = Partial<z.infer<typeof configSchema>>;
export type Model = (typeof models)[number];
export type Provider = (typeof providers)[number];
// #endregion

// #region Variables
export declare const configSchema: z.ZodObject<{
baseURL: z.ZodOptional<z.ZodString>;
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
model: z.ZodString;
prompt: z.ZodDefault<z.ZodString>;
provider: z.ZodEnum<{
google: "google";
openai: "openai";
ollama: "ollama";
}>;
skipNextRun: z.ZodOptional<z.ZodBoolean>;
useConventionalCommits: z.ZodDefault<z.ZodBoolean>;
verbose: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
}, z.core.$strip>;
export declare const defaultPrompt: string;
export declare const environmentSchema: {
google: z.ZodObject<{
GOOGLE_GENERATIVE_AI_API_KEY: z.ZodString;
}, z.core.$strip>;
ollama: z.ZodObject<{}, z.core.$strip>;
openai: z.ZodObject<{
OPENAI_API_KEY: z.ZodString;
}, z.core.$strip>;
};
export declare const models: readonly ["gemini-2.5-flash"];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check source code for model definitions

echo "=== Searching for model definitions in source ==="
rg -n "gemini|models.*=|model.*:" core/ai-commit-msg/src/ --type=ts -C3

Repository: stephansama/packages

Length of output: 2470


🏁 Script executed:

cat -n core/ai-commit-msg/src/schema.ts

Repository: stephansama/packages

Length of output: 1820


🏁 Script executed:

cat -n core/ai-commit-msg/src/config.ts

Repository: stephansama/packages

Length of output: 1093


🏁 Script executed:

# Search for any documentation about supported models
rg -i "model|gemini|llama" core/ai-commit-msg/README.md core/ai-commit-msg/package.json -C2

Repository: stephansama/packages

Length of output: 380


🏁 Script executed:

# Check git history for recent changes to models definition
git log --oneline -n 20 -- core/ai-commit-msg/src/schema.ts

Repository: stephansama/packages

Length of output: 162


🏁 Script executed:

rg "models" core/ai-commit-msg/src/ -n --type=ts

Repository: stephansama/packages

Length of output: 232


🏁 Script executed:

# Check if models is exported and used elsewhere
rg -n "from.*schema.*models|import.*models" core/ai-commit-msg/ --type=ts

Repository: stephansama/packages

Length of output: 46


The snapshot correctly reflects the source code, but the underlying source definition is incomplete.

The models constant in core/ai-commit-msg/src/schema.ts is hardcoded to ["gemini-2.5-flash"], but this constant is unused in the codebase (no imports found) and inconsistent with the default config, which uses "llama2" with the "ollama" provider. The configSchema also accepts any arbitrary string for the model field, making the hardcoded constant list ineffective. Either the constant should be removed if unused, or it should be updated to reflect all supported models across the three providers (google, openai, ollama).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/ai-commit-msg/__snapshots__/tsnapi/schema.snapshot.d.ts` at line 35, The
models constant exported as models in core/ai-commit-msg/src/schema.ts is either
dead or inaccurate: either remove the unused export or replace it with a
complete, accurate list of supported model names across google/openai/ollama and
align it with the configSchema so the model field is validated against that list
(or derive the allowed values from the same source used by configSchema). Locate
the exported symbol models and the configSchema in schema.ts, then either delete
the models export if no code imports it, or update models to include all
supported model strings (and update configSchema to restrict model to those
strings or reference models) so the snapshot and default config (llama2 with
ollama) are consistent.

export declare const providers: readonly ["google", "openai", "ollama"];
export declare const providerSchema: z.ZodEnum<{
google: "google";
openai: "openai";
ollama: "ollama";
}>;
// #endregion
11 changes: 11 additions & 0 deletions core/ai-commit-msg/__snapshots__/tsnapi/schema.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg/schema`
*/
// #region Variables
export var configSchema /* const */
export var defaultPrompt /* const */
export var environmentSchema /* const */
export var models /* const */
export var providers /* const */
export var providerSchema /* const */
// #endregion
5 changes: 0 additions & 5 deletions core/ai-commit-msg/cli.mjs

This file was deleted.

16 changes: 7 additions & 9 deletions core/ai-commit-msg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": "./config/schema.mjs",
"require": "./config/schema.cjs"
},
".": "./dist/index.mjs",
"./cli": "./dist/cli.mjs",
"./package.json": "./package.json",
"./schema": "./dist/schema.mjs",
"./schema.json": "./config/schema.json"
},
"main": "./config/schema.cjs",
"module": "./config/schema.mjs",
"types": "./config/schema.d.cts",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Type declaration extension mismatch with ESM-only build.

The types field points to ./config/schema.d.cts (CommonJS type declarations), but the package is now ESM-only (line 23 exports only .mjs and the build format is ["esm"]). This mismatch can cause TypeScript resolution issues. Change the types field to use .d.mts or .d.ts to match the ESM module format.

🔧 Suggested fix
-  "types": "./config/schema.d.cts",
+  "types": "./config/schema.d.mts",

Ensure the build output generates .d.mts files instead of .d.cts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/ai-commit-msg/package.json` at line 27, The package.json "types" entry
points to ./config/schema.d.cts which is a CommonJS declaration while this
package is ESM-only; update the types reference to an ESM-compatible declaration
(e.g., ./config/schema.d.mts or ./config/schema.d.ts) and ensure the build (the
rollup/tsconfig/build step that emits declarations) is configured to produce
.d.mts outputs for the schema file so TypeScript resolution matches the exports
field and esm build format.

"bin": "./cli.mjs",
"bin": {
"ai-commit-msg": "./dist/cli.mjs"
},
"files": [
"./dist",
"./config"
"./dist"
],
"scripts": {
"build": "tsdown",
Expand Down
5 changes: 5 additions & 0 deletions core/ai-commit-msg/src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

import { run } from "./index";

await run();
63 changes: 29 additions & 34 deletions core/ai-commit-msg/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
import * as fs from "node:fs";
import path from "node:path";
import { defineConfig } from "tsdown";
import ApiSnapshot from "tsnapi/rolldown";
import * as z from "zod";

export default defineConfig([
{
attw: true,
dts: false,
entry: "./src/index.ts",
format: ["esm", "cjs"],
skipNodeModulesBundle: true,
target: "esnext",
export default defineConfig({
attw: { excludeEntrypoints: ["schema.json"], profile: "esm-only" },
deps: { skipNodeModulesBundle: true },
dts: true,
entry: {
cli: "./src/cli.ts",
index: "./src/index.ts",
schema: "./src/schema.ts",
},
{
attw: true,
dts: true,
entry: "./src/schema.ts",
exports: {
customExports(exports) {
exports["./schema.json"] = "./config/schema.json";
return exports;
},
enabled: true,
},
format: ["esm", "cjs"],
hooks: {
async "build:done"() {
const { configSchema } = await import("./config/schema.mjs");

const jsonSchema = z.toJSONSchema(configSchema);
exports: {
bin: "./src/cli.ts",
customExports(exports) {
exports["./schema.json"] = "./config/schema.json";

const jsonString = JSON.stringify(jsonSchema);
return Object.fromEntries(
Object.entries(exports).toSorted(([a], [b]) => a.localeCompare(b)),
);
},
enabled: true,
},

await fs.promises.writeFile(
path.join("./config/", "schema.json"),
jsonString,
);
},
hooks: {
async "build:done"() {
const { configSchema } = await import("./dist/schema.mjs");
const jsonSchema = z.toJSONSchema(configSchema);
const jsonString = JSON.stringify(jsonSchema);
const jsonPath = path.join("./dist/", "schema.json");
await fs.promises.writeFile(jsonPath, jsonString);
},
outDir: "config",
skipNodeModulesBundle: true,
target: "esnext",
},
]);
plugins: [ApiSnapshot()],
target: "esnext",
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap/cli`
*/
/* no exports */
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap/cli`
*/
/* no exports */
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap/get`
*/
// #region Functions
export declare function getIcon(_: string, _: string): Promise<string>;
// #endregion
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap/get`
*/
// #region Functions
export async function getIcon(_, _) {}
// #endregion
11 changes: 11 additions & 0 deletions core/astro-iconify-svgmap/__snapshots__/tsnapi/index.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap`
*/
// #region Functions
export declare function createIntegration(_?: Options): AstroIntegration;
// #endregion

// #region Default Export
declare function _default(_?: Options): Plugin;
export default _default
// #endregion
11 changes: 11 additions & 0 deletions core/astro-iconify-svgmap/__snapshots__/tsnapi/index.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/astro-iconify-svgmap`
*/
// #region Functions
export function createIntegration(_) {}
// #endregion

// #region Default Export
function _default(_) {}
export default _default
// #endregion
19 changes: 4 additions & 15 deletions core/astro-iconify-svgmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,12 @@
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./cli": {
"import": "./dist/cli.mjs",
"require": "./dist/cli.cjs"
},
"./get": {
"import": "./dist/get.mjs",
"require": "./dist/get.cjs"
},
".": "./dist/index.mjs",
"./cli": "./dist/cli.mjs",
"./get": "./dist/get.mjs",
"./package.json": "./package.json"
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"types": "./dist/index.d.mts",
"bin": {
"iconify-svgmap": "./dist/cli.mjs"
},
Expand Down
6 changes: 4 additions & 2 deletions core/astro-iconify-svgmap/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { defineConfig } from "tsdown";
import ApiSnapshot from "tsnapi/rolldown";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify tsnapi is declared somewhere in the workspace for this package
echo "=== Searching for tsnapi declarations ==="
fd -t f 'package.json' --exec rg -l '"tsnapi"' {} \;

echo ""
echo "=== pnpm-workspace catalog entries (if any) ==="
fd -t f 'pnpm-workspace.yaml' --exec cat {} \;

echo ""
echo "=== Direct usages of tsnapi across repo ==="
rg -nP '\btsnapi(/|"|\b)' -g '!**/dist/**' -g '!**/__snapshots__/**'

Repository: stephansama/packages

Length of output: 7136


🏁 Script executed:

cat -n core/astro-iconify-svgmap/package.json | sed -n '40,60p'

Repository: stephansama/packages

Length of output: 694


Add tsnapi to devDependencies in core/astro-iconify-svgmap/package.json.

The file imports tsnapi/rolldown at line 2, but tsnapi is not declared in the package's devDependencies (lines 48-54). While tsnapi is available through the workspace catalog, this package must explicitly declare it as a direct dependency. Without this declaration, the package will fail to build outside the monorepo or in isolated installations (e.g., when consumed standalone or in a fresh CI cache).

Add "tsnapi": "catalog:typescript" to the devDependencies block, consistent with how other packages in the workspace (e.g., core/eslint-config) declare it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/astro-iconify-svgmap/tsdown.config.ts` at line 2, The package's
tsdown.config.ts imports ApiSnapshot from "tsnapi/rolldown" but the package.json
devDependencies do not declare tsnapi; update the package.json devDependencies
to include "tsnapi": "catalog:typescript" (matching other workspace packages) so
the import in tsdown.config.ts (ApiSnapshot from "tsnapi/rolldown") resolves for
standalone installs and CI builds.


export default defineConfig({
attw: { profile: "node16" },
attw: { profile: "esm-only" },
dts: true,
entry: ["src/cli.ts", "src/index.ts", "src/get.ts"],
exports: true,
external: ["virtual:iconify-svgmap"],
format: ["esm", "cjs"],
format: ["esm"],
plugins: [ApiSnapshot()],
publint: true,
target: "esnext",
tsconfig: "tsconfig.json",
Expand Down
4 changes: 4 additions & 0 deletions core/auto-readme/__snapshots__/tsnapi/cli.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/auto-readme/cli`
*/
/* no exports */
4 changes: 4 additions & 0 deletions core/auto-readme/__snapshots__/tsnapi/cli.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/auto-readme/cli`
*/
/* no exports */
6 changes: 6 additions & 0 deletions core/auto-readme/__snapshots__/tsnapi/index.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/auto-readme`
*/
// #region Functions
export declare function run(): Promise<void>;
// #endregion
6 changes: 6 additions & 0 deletions core/auto-readme/__snapshots__/tsnapi/index.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/auto-readme`
*/
// #region Functions
export async function run() {}
// #endregion
Loading
Loading