Skip to content

Commit d95fe22

Browse files
ci: apply automated fixes
1 parent 2d251d5 commit d95fe22

6 files changed

Lines changed: 50 additions & 20 deletions

File tree

packages/intent/src/scanner.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,10 @@ export async function scanForIntents(root?: string): Promise<ScanResult> {
550550
const workspacePatterns = readWorkspacePatterns(projectRoot)
551551
if (!workspacePatterns) return
552552

553-
for (const wsDir of resolveWorkspacePackages(projectRoot, workspacePatterns)) {
553+
for (const wsDir of resolveWorkspacePackages(
554+
projectRoot,
555+
workspacePatterns,
556+
)) {
554557
const wsNodeModules = join(wsDir, 'node_modules')
555558
if (existsSync(wsNodeModules)) {
556559
for (const dirPath of listNodeModulesPackageDirs(wsNodeModules)) {

packages/intent/src/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { execFileSync } from 'node:child_process'
2-
import {
3-
existsSync,
4-
readFileSync,
5-
readdirSync,
6-
type Dirent,
7-
} from 'node:fs'
2+
import { existsSync, readFileSync, readdirSync, type Dirent } from 'node:fs'
83
import { createRequire } from 'node:module'
94
import { dirname, join } from 'node:path'
105
import { parse as parseYaml } from 'yaml'

packages/intent/tests/fixtures/integration/skills-leaf/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
"repo": "test/skills-leaf",
77
"docs": "https://example.com/docs"
88
},
9-
"files": ["skills"]
9+
"files": [
10+
"skills"
11+
]
1012
}

packages/intent/tests/fixtures/integration/skills-leaf/skills/core/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: core
3-
description: "Core skill for integration testing"
3+
description: 'Core skill for integration testing'
44
type: core
55
---
66

packages/intent/tests/integration/scaffold.ts

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,24 @@ export async function startRegistry(): Promise<Registry> {
5656
].join('\n'),
5757
)
5858

59-
const verdaccioBin = join(thisDir, '..', '..', 'node_modules', '.bin', 'verdaccio')
59+
const verdaccioBin = join(
60+
thisDir,
61+
'..',
62+
'..',
63+
'node_modules',
64+
'.bin',
65+
'verdaccio',
66+
)
6067

6168
return new Promise((resolve, reject) => {
62-
const child = spawn(verdaccioBin, ['--config', configPath, '--listen', String(port)], {
63-
stdio: ['ignore', 'pipe', 'pipe'],
64-
detached: false,
65-
})
69+
const child = spawn(
70+
verdaccioBin,
71+
['--config', configPath, '--listen', String(port)],
72+
{
73+
stdio: ['ignore', 'pipe', 'pipe'],
74+
detached: false,
75+
},
76+
)
6677

6778
let started = false
6879
const timeout = setTimeout(() => {
@@ -180,7 +191,10 @@ export function scaffoldProject(opts: {
180191
...(opts.pm !== 'pnpm' ? { workspaces: ['packages/*'] } : {}),
181192
})
182193
if (opts.pm === 'pnpm') {
183-
writeFileSync(join(root, 'pnpm-workspace.yaml'), 'packages:\n - packages/*\n')
194+
writeFileSync(
195+
join(root, 'pnpm-workspace.yaml'),
196+
'packages:\n - packages/*\n',
197+
)
184198
}
185199
if (opts.pm === 'yarn') {
186200
writeFileSync(join(root, '.yarnrc.yml'), 'nodeLinker: node-modules\n')
@@ -211,7 +225,11 @@ function install(dir: string, pm: PackageManager, registryUrl: string): void {
211225
execSync(`npm install ${reg}`, { cwd: dir, stdio: 'ignore', env })
212226
break
213227
case 'pnpm':
214-
execSync(`pnpm install ${reg} --no-frozen-lockfile`, { cwd: dir, stdio: 'ignore', env })
228+
execSync(`pnpm install ${reg} --no-frozen-lockfile`, {
229+
cwd: dir,
230+
stdio: 'ignore',
231+
env,
232+
})
215233
break
216234
case 'yarn':
217235
execSync(`yarn install ${reg}`, { cwd: dir, stdio: 'ignore', env })

packages/intent/tests/scanner.test.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,11 @@ describe('scanForIntents', () => {
504504
writeJson(join(dbDir, 'package.json'), {
505505
name: '@tanstack/db',
506506
version: '0.5.0',
507-
intent: { version: 1, repo: 'TanStack/db', docs: 'https://db.tanstack.com' },
507+
intent: {
508+
version: 1,
509+
repo: 'TanStack/db',
510+
docs: 'https://db.tanstack.com',
511+
},
508512
})
509513
writeSkillMd(join(dbDir, 'skills', 'db-core'), {
510514
name: 'db-core',
@@ -541,7 +545,11 @@ describe('scanForIntents', () => {
541545
writeJson(join(dbDir, 'package.json'), {
542546
name: '@tanstack/db',
543547
version: '0.5.0',
544-
intent: { version: 1, repo: 'TanStack/db', docs: 'https://db.tanstack.com' },
548+
intent: {
549+
version: 1,
550+
repo: 'TanStack/db',
551+
docs: 'https://db.tanstack.com',
552+
},
545553
})
546554
writeSkillMd(join(dbDir, 'skills', 'db-core'), {
547555
name: 'db-core',
@@ -571,7 +579,7 @@ describe('scanForIntents', () => {
571579
writeJson(join(appDir, 'package.json'), {
572580
name: '@monorepo/app',
573581
version: '1.0.0',
574-
dependencies: { 'wrapper': '1.0.0' },
582+
dependencies: { wrapper: '1.0.0' },
575583
})
576584

577585
// wrapper has no skills, but depends on skills-pkg
@@ -623,7 +631,11 @@ describe('scanForIntents', () => {
623631
writeJson(join(dbDir, 'package.json'), {
624632
name: '@tanstack/db',
625633
version: '0.5.0',
626-
intent: { version: 1, repo: 'TanStack/db', docs: 'https://db.tanstack.com' },
634+
intent: {
635+
version: 1,
636+
repo: 'TanStack/db',
637+
docs: 'https://db.tanstack.com',
638+
},
627639
})
628640
writeSkillMd(join(dbDir, 'skills', 'db-core'), {
629641
name: 'db-core',

0 commit comments

Comments
 (0)