@miketromba/issy-core 0.5.7 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miketromba/issy-core",
3
- "version": "0.5.7",
3
+ "version": "0.7.0",
4
4
  "description": "Issue storage, search, and parsing for issy",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/lib/issues.ts CHANGED
@@ -200,7 +200,6 @@ export function parseFrontmatter(content: string): {
200
200
  export function generateFrontmatter(data: IssueFrontmatter): string {
201
201
  const lines = ['---']
202
202
  lines.push(`title: ${data.title}`)
203
- lines.push(`description: ${data.description}`)
204
203
  lines.push(`priority: ${data.priority}`)
205
204
  if (data.scope) {
206
205
  lines.push(`scope: ${data.scope}`)
@@ -429,7 +428,6 @@ export async function createIssue(input: CreateIssueInput): Promise<Issue> {
429
428
 
430
429
  const frontmatter: IssueFrontmatter = {
431
430
  title: input.title,
432
- description: input.description || input.title,
433
431
  priority,
434
432
  scope: scope || undefined,
435
433
  type,
@@ -439,13 +437,9 @@ export async function createIssue(input: CreateIssueInput): Promise<Issue> {
439
437
  created: formatDate()
440
438
  }
441
439
 
442
- const content = `${generateFrontmatter(frontmatter)}
443
-
444
- ## Details
445
-
446
- <!-- Add detailed description here -->
447
-
448
- `
440
+ const body =
441
+ input.body ?? '\n## Details\n\n<!-- Add detailed description here -->\n'
442
+ const content = `${generateFrontmatter(frontmatter)}\n${body}\n`
449
443
 
450
444
  await writeFile(join(getIssuesDir(), filename), content)
451
445
 
@@ -453,7 +447,7 @@ export async function createIssue(input: CreateIssueInput): Promise<Issue> {
453
447
  id: issueNumber,
454
448
  filename,
455
449
  frontmatter,
456
- content: '\n## Details\n\n<!-- Add detailed description here -->\n\n'
450
+ content: `\n${body}\n`
457
451
  }
458
452
  }
459
453
 
@@ -470,7 +464,6 @@ export async function updateIssue(
470
464
  const updatedFrontmatter: IssueFrontmatter = {
471
465
  ...issue.frontmatter,
472
466
  ...(input.title && { title: input.title }),
473
- ...(input.description && { description: input.description }),
474
467
  ...(input.priority && { priority: input.priority }),
475
468
  ...(input.scope && { scope: input.scope }),
476
469
  ...(input.type && { type: input.type }),
@@ -482,14 +475,17 @@ export async function updateIssue(
482
475
  updated: formatDate()
483
476
  }
484
477
 
478
+ const updatedContent =
479
+ input.body !== undefined ? `\n${input.body}\n` : issue.content
485
480
  const content = `${generateFrontmatter(updatedFrontmatter)}
486
- ${issue.content}`
481
+ ${updatedContent}`
487
482
 
488
483
  await writeFile(join(getIssuesDir(), issue.filename), content)
489
484
 
490
485
  return {
491
486
  ...issue,
492
- frontmatter: updatedFrontmatter
487
+ frontmatter: updatedFrontmatter,
488
+ content: updatedContent
493
489
  }
494
490
  }
495
491
 
package/src/lib/search.ts CHANGED
@@ -10,7 +10,6 @@ import type { Issue, IssueFilters } from './types'
10
10
  const FUSE_OPTIONS: IFuseOptions<Issue> = {
11
11
  keys: [
12
12
  { name: 'frontmatter.title', weight: 1.0 },
13
- { name: 'frontmatter.description', weight: 0.7 },
14
13
  { name: 'frontmatter.labels', weight: 0.5 },
15
14
  { name: 'content', weight: 0.3 }
16
15
  ],
@@ -227,7 +226,7 @@ function sortIssues(issues: Issue[], sortBy: string): void {
227
226
  * - `sort:roadmap` / `sort:priority` / `sort:created` / `sort:created-asc` / `sort:updated` / `sort:id` - sorts results
228
227
  *
229
228
  * Any remaining free text after qualifiers triggers fuzzy search across title,
230
- * description, labels, and content. Results are sorted by relevance when search
229
+ * labels, and content. Results are sorted by relevance when search
231
230
  * text is present. When no search text is provided, results are sorted by the
232
231
  * `sort:` qualifier (defaults to roadmap if not specified). ID prefix matching
233
232
  * is supported (e.g., "1" matches #0001).
package/src/lib/types.ts CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  export interface IssueFrontmatter {
6
6
  title: string
7
- description: string
8
7
  priority: 'high' | 'medium' | 'low'
9
8
  scope?: 'small' | 'medium' | 'large'
10
9
  type: 'bug' | 'improvement'
@@ -32,7 +31,7 @@ export interface IssueFilters {
32
31
 
33
32
  export interface CreateIssueInput {
34
33
  title: string
35
- description?: string
34
+ body?: string
36
35
  priority?: 'high' | 'medium' | 'low'
37
36
  scope?: 'small' | 'medium' | 'large'
38
37
  type?: 'bug' | 'improvement'
@@ -42,7 +41,7 @@ export interface CreateIssueInput {
42
41
 
43
42
  export interface UpdateIssueInput {
44
43
  title?: string
45
- description?: string
44
+ body?: string
46
45
  priority?: 'high' | 'medium' | 'low'
47
46
  scope?: 'small' | 'medium' | 'large'
48
47
  type?: 'bug' | 'improvement'