Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 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,4 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/ai-commit-msg`
*/
/* no exports */
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`
*/
/* no exports */ions
export async function run() {}
// #endregion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This generated snapshot appears to have a couple of issues:

  1. There's an unexpected ions string on line 4, which seems to be a generation artifact.
  2. This file exports a run function, but the corresponding type definition snapshot (index.snapshot.d.ts) indicates there are no exports.

This discrepancy and artifact suggest a potential issue in the tsnapi generation process for this package. Please investigate and fix the snapshot generation to ensure the API surface is correctly and cleanly represented.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
2 changes: 2 additions & 0 deletions core/ai-commit-msg/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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([
Expand All @@ -9,6 +10,7 @@ export default defineConfig([
dts: false,
entry: "./src/index.ts",
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
skipNodeModulesBundle: true,
target: "esnext",
},
Expand Down
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
2 changes: 2 additions & 0 deletions core/astro-iconify-svgmap/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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" },
Expand All @@ -7,6 +8,7 @@ export default defineConfig({
exports: true,
external: ["virtual:iconify-svgmap"],
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
publint: true,
target: "esnext",
tsconfig: "tsconfig.json",
Expand Down
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
2 changes: 2 additions & 0 deletions core/auto-readme/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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([
Expand All @@ -10,6 +11,7 @@ export default defineConfig([
entry: "./src/index.ts",
exports: true,
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
publint: false,
skipNodeModulesBundle: true,
target: "esnext",
Expand Down
2 changes: 2 additions & 0 deletions core/catppuccin-jsonresume-theme/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { defineConfig } from "tsdown";
import ApiSnapshot from "tsnapi/rolldown";

export default defineConfig({
attw: true,
dts: true,
entry: ["src/index.ts"],
exports: true,
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ApiSnapshot plugin is enabled for this package, but there are no generated snapshot files in this pull request. Other packages, even those without any exports, have corresponding snapshot files. Was this an oversight, or is there a reason no snapshot is generated for this package? For consistency, it would be beneficial to have snapshots for all packages where this plugin is enabled.

publint: true,
target: "esnext",
});
25 changes: 25 additions & 0 deletions core/eslint-config/__snapshots__/tsnapi/index.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/eslint-config`
*/
// #region Types
export type BuilderOptions = Partial<{
autoEnable: boolean;
overrides: Array<Config>;
overrides_prepend: Array<Config>;
}>;
export type CommonOptions = Partial<{}>;
export type ConfigDependency = keyof (typeof __json_default_export)["devDependencies"];
export type ConfigOptions = Partial<{ [K in keyof typeof index_d_exports]: boolean | Parameters<(typeof index_d_exports)[K]>[0] }>;
export type Preset = keyof typeof presets_d_exports;
export type StephansamaConfig = keyof typeof index_d_exports;
// #endregion

// #region Functions
export declare function config(_: Options): Promise<Config[]>;
// #endregion

// #region Other
export { index_d_exports as configs }
export { glob_d_exports as globs }
export { presets_d_exports as presets }
// #endregion
12 changes: 12 additions & 0 deletions core/eslint-config/__snapshots__/tsnapi/index.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/eslint-config`
*/
// #region Functions
export async function config(_) {}
// #endregion

// #region Variables
export var configs
export var globs
export var presets
// #endregion
3 changes: 2 additions & 1 deletion core/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
"node": ">=24"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"inlinedDependencies": {
"acorn": "8.16.0",
Expand Down
2 changes: 2 additions & 0 deletions core/eslint-config/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from "tsdown";
import ApiSnapshot from "tsnapi/rolldown";

export default defineConfig([
{
Expand All @@ -7,6 +8,7 @@ export default defineConfig([
entry: ["src/index.ts"],
exports: true,
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
publint: true,
target: "esnext",
},
Expand Down
4 changes: 4 additions & 0 deletions core/multipublish/__snapshots__/tsnapi/index.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/multipublish`
*/
/* no exports */
6 changes: 6 additions & 0 deletions core/multipublish/__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/multipublish`
*/
/* no exports */ions
export async function run() {}
// #endregion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Similar to another snapshot file in this PR, this generated file appears to have some issues:

  1. A stray ions string is present on line 4.
  2. This file exports a run function, while its corresponding type definition snapshot (index.snapshot.d.ts) states there are no exports.

This indicates a recurring issue with the snapshot generation. It's important to have correct and clean API snapshots. Could you please look into the tsnapi configuration or the tool itself to resolve this?

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
2 changes: 2 additions & 0 deletions core/multipublish/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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([
Expand All @@ -9,6 +10,7 @@ export default defineConfig([
dts: false,
entry: "./src/index.ts",
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
skipNodeModulesBundle: true,
target: "esnext",
},
Expand Down
15 changes: 15 additions & 0 deletions core/typed-env/__snapshots__/tsnapi/index.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/typed-env`
*/
// #region Functions
export declare function createEnvironment<Schema extends StandardSchemaV1>(_: Schema, _?: dotenvx.DotenvConfigOptions | true): {
generateExample(_: string): Promise<void>;
loadEnv: (_?: dotenvx.DotenvConfigOptions) => dotenvx.DotenvConfigOutput;
schema: Schema;
validate({
env: environment
}?: {
env?: Record<string, string | undefined>;
}): Promise<StandardSchemaV1.InferOutput<Schema>>;
};
// #endregion
6 changes: 6 additions & 0 deletions core/typed-env/__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/typed-env`
*/
// #region Functions
export function createEnvironment(_, _) {}
// #endregion
2 changes: 2 additions & 0 deletions core/typed-env/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { defineConfig } from "tsdown";
import ApiSnapshot from "tsnapi/rolldown";

export default defineConfig({
attw: true,
dts: true,
entry: ["src/index.ts"],
exports: true,
format: ["esm", "cjs"],
plugins: [ApiSnapshot()],
publint: true,
target: "esnext",
});
17 changes: 17 additions & 0 deletions core/typed-events/__snapshots__/tsnapi/errors.snapshot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/typed-events/errors`
*/
// #region Classes
export declare class TypedBroadcastChannelError extends ValidatorError {
constructor(_: string, _: readonly StandardSchemaV1.Issue[]);
}
export declare class TypedBroadcastEventError extends ValidatorError {
constructor(_: string, _: readonly StandardSchemaV1.Issue[]);
}
export declare class TypedEventError extends ValidatorError {
constructor(_: string, _: readonly StandardSchemaV1.Issue[]);
}
export declare class TypedMessageError extends ValidatorError {
constructor(_: string, _: readonly StandardSchemaV1.Issue[]);
}
Comment on lines +5 to +16

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find ValidatorError definition in the typed-events package
ast-grep --pattern 'class ValidatorError $$$' 

# Alternative: search for ValidatorError export
rg -t ts "export.*class ValidatorError" core/typed-events/

Repository: stephansama/packages

Length of output: 145


🏁 Script executed:

cat -n core/typed-events/__snapshots__/tsnapi/errors.snapshot.d.ts | head -30

Repository: stephansama/packages

Length of output: 840


🏁 Script executed:

# Find the source file that might generate this snapshot
find core/typed-events -name "*.ts" -not -path "*/node_modules/*" -not -path "*/__snapshots__/*" | xargs rg -l "TypedBroadcastChannelError|TypedBroadcastEventError|TypedEventError|TypedMessageError" | head -10

Repository: stephansama/packages

Length of output: 236


🏁 Script executed:

# Check if StandardSchemaV1 is imported or defined anywhere in the typed-events package
rg -t ts "StandardSchemaV1" core/typed-events/src/ --max-count 20

Repository: stephansama/packages

Length of output: 3866


🏁 Script executed:

cat -n core/typed-events/src/errors.ts

Repository: stephansama/packages

Length of output: 302


🏁 Script executed:

# Also check what tsnapi configuration or export pattern exists
find core/typed-events -name "tsconfig.json" -o -name "tsnapi.config.*" | head -5

Repository: stephansama/packages

Length of output: 96


🏁 Script executed:

# Check if ValidatorError is exported from the main index file
fd -t f "index.ts" core/typed-events/src/ -exec cat -n {} \;

Repository: stephansama/packages

Length of output: 295


🏁 Script executed:

# Check the main package.json to see what the exports point to
cat -n core/typed-events/package.json | grep -A 10 '"exports"'

Repository: stephansama/packages

Length of output: 398


🏁 Script executed:

# Verify what the snapshot file is testing - check if there's an errors export in package.json exports
cat -n core/typed-events/package.json

Repository: stephansama/packages

Length of output: 2638


🏁 Script executed:

# Check if ValidatorError is exported from the main index.ts file
cat core/typed-events/src/index.ts

Repository: stephansama/packages

Length of output: 336


🏁 Script executed:

# Check what the actual compiled/exported types include - look at how ValidatorError is made available
rg -t ts "export.*ValidatorError" core/typed-events/src/ -A 2

Repository: stephansama/packages

Length of output: 1909


🏁 Script executed:

# Search for tsnapi configuration
find core/typed-events -type f -name "*tsnapi*" -o -name "*.config.*" | xargs ls -la 2>/dev/null | head -20

Repository: stephansama/packages

Length of output: 230


🏁 Script executed:

# Check utils/index.ts to confirm what's exported
cat core/typed-events/src/utils/index.ts

Repository: stephansama/packages

Length of output: 200


🏁 Script executed:

# Verify if ValidatorError should be in the public API
rg -t ts "ValidatorError" core/typed-events/src/ --max-count 30 | grep -E "(export|import)" | head -20

Repository: stephansama/packages

Length of output: 1182


🏁 Script executed:

# Check what the `@/utils` export includes by looking at the utils barrel export chain
cat core/typed-events/src/utils/types.ts | head -50

Repository: stephansama/packages

Length of output: 1394


🏁 Script executed:

# Check if there are other snapshot files to see the pattern for imports
find core/typed-events/__snapshots__ -type f -name "*.snapshot.d.ts" | head -3 | xargs head -20

Repository: stephansama/packages

Length of output: 3032


The snapshot file is auto-generated and accurately reflects the public API. The issue is in the source code, not the snapshot.

The ./errors export path (defined in core/typed-events/src/errors.ts) only exports the four error classes but does not export ValidatorError (which lives in core/typed-events/src/utils/index.ts) or re-export StandardSchemaV1. Consumers importing from @stephansama/typed-events/errors would receive error classes that extend a base class not available in that export path. Update core/typed-events/src/errors.ts to export ValidatorError and optionally StandardSchemaV1 so the error classes can be properly used by consumers.

🤖 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/typed-events/__snapshots__/tsnapi/errors.snapshot.d.ts` around lines 5 -
16, The errors export path currently only exports the four error classes
(TypedBroadcastChannelError, TypedBroadcastEventError, TypedEventError,
TypedMessageError) but not their base ValidatorError or the StandardSchemaV1
symbol; update core/typed-events/src/errors.ts to also export ValidatorError
from core/typed-events/src/utils/index.ts and re-export StandardSchemaV1 (or its
module) so consumers importing from `@stephansama/typed-events/errors` get
ValidatorError and StandardSchemaV1 alongside the four error classes.

// #endregion
17 changes: 17 additions & 0 deletions core/typed-events/__snapshots__/tsnapi/errors.snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Generated by tsnapi — public API snapshot of `@stephansama/typed-events/errors`
*/
// #region Classes
export class TypedBroadcastChannelError extends ValidatorError {
constructor(_, _) {}
}
export class TypedBroadcastEventError extends ValidatorError {
constructor(_, _) {}
}
export class TypedEventError extends ValidatorError {
constructor(_, _) {}
}
export class TypedMessageError extends ValidatorError {
constructor(_, _) {}
}
Comment on lines +5 to +16

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
# Find where ValidatorError is exported
rg -t ts -t js "export.*ValidatorError" core/typed-events/src/

# Check if there's a base errors module
fd -e ts -e js 'error' core/typed-events/src/

# Try to parse the snapshot to see if it's syntactically valid
node -e "import('./core/typed-events/__snapshots__/tsnapi/errors.snapshot.js').catch(e => console.log('Error:', e.message))"

Repository: stephansama/packages

Length of output: 823


🏁 Script executed:

cat -n core/typed-events/__snapshots__/tsnapi/errors.snapshot.js

Repository: stephansama/packages

Length of output: 644


🏁 Script executed:

# Check the actual source file definitions
cat -n core/typed-events/src/errors.ts

# Check the source error classes
head -30 core/typed-events/src/message.ts
head -30 core/typed-events/src/event.ts

Repository: stephansama/packages

Length of output: 1960


🏁 Script executed:

# Check if ValidatorError import is at the top of the snapshot file
head -20 core/typed-events/__snapshots__/tsnapi/errors.snapshot.js

Repository: stephansama/packages

Length of output: 525


Fix missing import and syntax error in auto-generated snapshot.

This auto-generated snapshot file cannot be loaded due to two issues:

  1. Missing import: ValidatorError is not imported. It's defined in core/typed-events/src/utils/error.ts.
  2. Invalid syntax: Constructors have duplicate parameter names constructor(_, _) {}, which is invalid JavaScript. The source files have proper typed parameters like constructor(scope: string, issues: readonly StandardSchemaV1.Issue[]).

Add the missing import and ensure the snapshot is correctly regenerated to match the source class definitions.

🤖 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/typed-events/__snapshots__/tsnapi/errors.snapshot.js` around lines 5 -
16, The snapshot is invalid because ValidatorError isn't imported and the
constructor parameter names are duplicated; add an import for ValidatorError
from the original module (core/typed-events/src/utils/error.ts), update each
snapshot class (TypedBroadcastChannelError, TypedBroadcastEventError,
TypedEventError, TypedMessageError) to mirror the real constructors (use
distinct parameter names or the same typed params as the source, e.g., scope and
issues) and then regenerate the snapshot so the exported classes match the
source definitions.

// #endregion
Loading
Loading