Skip to content
Closed
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
5 changes: 0 additions & 5 deletions .changeset/fix-transitive-deps-and-shim.md

This file was deleted.

8 changes: 7 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"entry": ["scripts/*.ts"]
},
"packages/intent": {
"entry": ["src/index.ts", "src/cli.ts", "src/setup.ts", "src/intent-library.ts", "src/library-scanner.ts"],
"entry": [
"src/index.ts",
"src/cli.ts",
"src/setup.ts",
"src/intent-library.ts",
"src/library-scanner.ts"
],
"ignore": ["meta/**"]
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/intent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @tanstack/intent

## 0.0.14

### Patch Changes

- Fix scanner to discover transitive dependencies with skills in non-hoisted layouts (pnpm). Add dependency tree walking via `resolveDepDir` that resolves packages through the pnpm virtual store. Also handle shim import errors gracefully when `@tanstack/intent` is not installed, and use `@latest` in all npx commands to avoid local binary conflicts. ([#46](https://github.com/TanStack/intent/pull/46))

## 0.0.11

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/intent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/intent",
"version": "0.0.13",
"version": "0.0.14",
"description": "Ship compositional knowledge for AI coding agents alongside your npm packages",
"license": "MIT",
"type": "module",
Expand Down
5 changes: 4 additions & 1 deletion packages/intent/src/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ function padColumn(text: string, width: number): string {
return text.length >= width ? text + ' ' : text.padEnd(width)
}

export function printTable(headers: Array<string>, rows: Array<Array<string>>): void {
export function printTable(
headers: Array<string>,
rows: Array<Array<string>>,
): void {
const widths = headers.map(
(h, i) => Math.max(h.length, ...rows.map((r) => (r[i] ?? '').length)) + 2,
)
Expand Down
10 changes: 2 additions & 8 deletions packages/intent/src/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ export function validatePayload(payload: unknown): {
const obj = payload as Record<string, unknown>

for (const field of REQUIRED_FIELDS) {
if (
typeof obj[field] !== 'string' ||
(obj[field]).trim() === ''
) {
if (typeof obj[field] !== 'string' || obj[field].trim() === '') {
errors.push(`Missing or empty required field: ${field}`)
}
}
Expand Down Expand Up @@ -171,10 +168,7 @@ export function validateMetaPayload(payload: unknown): {
const obj = payload as Record<string, unknown>

for (const field of META_REQUIRED_FIELDS) {
if (
typeof obj[field] !== 'string' ||
(obj[field]).trim() === ''
) {
if (typeof obj[field] !== 'string' || obj[field].trim() === '') {
errors.push(`Missing or empty required field: ${field}`)
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/intent/src/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ function deriveIntentConfig(
// Skill discovery within a package
// ---------------------------------------------------------------------------

function discoverSkills(skillsDir: string, _baseName: string): Array<SkillEntry> {
function discoverSkills(
skillsDir: string,
_baseName: string,
): Array<SkillEntry> {
const skills: Array<SkillEntry> = []

function walk(dir: string): void {
Expand Down