@morscherlab/mint-sdk 1.0.9 → 1.0.11
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": "@morscherlab/mint-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "MINT Platform SDK — Vue 3 components, composables, and types for plugin development. MINT = Mass-spec INtegrated Toolkit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -5,6 +5,7 @@ import { afterEach, describe, expect, it } from 'vitest'
|
|
|
5
5
|
import {
|
|
6
6
|
parseNamedExports,
|
|
7
7
|
parseNamedExportSpecs,
|
|
8
|
+
parseInlineNamedExports,
|
|
8
9
|
resolveLocalExportPath,
|
|
9
10
|
resolveNamedExportPath,
|
|
10
11
|
} from '../../../scripts/extract-docs-exports'
|
|
@@ -53,6 +54,18 @@ describe('extract docs export helpers', () => {
|
|
|
53
54
|
expect(resolveLocalExportPath(indexPath, 'vue')).toBeNull()
|
|
54
55
|
})
|
|
55
56
|
|
|
57
|
+
it('collects inline exported declarations', () => {
|
|
58
|
+
expect(parseInlineNamedExports(`
|
|
59
|
+
export interface Item {}
|
|
60
|
+
export type ItemId = string
|
|
61
|
+
export const makeItem = () => ({})
|
|
62
|
+
export function parseItem() {}
|
|
63
|
+
export class ItemStore {}
|
|
64
|
+
export enum ItemKind { A = 'a' }
|
|
65
|
+
export default function ignored() {}
|
|
66
|
+
`)).toEqual(['Item', 'ItemId', 'ItemKind', 'ItemStore', 'makeItem', 'parseItem'])
|
|
67
|
+
})
|
|
68
|
+
|
|
56
69
|
it('collects and resolves named exports through re-export chains', () => {
|
|
57
70
|
const dir = createTempDir()
|
|
58
71
|
const indexPath = join(dir, 'index.ts')
|
|
@@ -68,9 +81,11 @@ describe('extract docs export helpers', () => {
|
|
|
68
81
|
writeFileSync(starPath, 'export const StarExport = 2')
|
|
69
82
|
|
|
70
83
|
expect(parseNamedExports(indexPath)).toEqual([
|
|
84
|
+
{ name: 'InternalLeaf' },
|
|
71
85
|
{ name: 'PublicLeaf' },
|
|
72
86
|
{ name: 'StarExport' },
|
|
73
87
|
])
|
|
88
|
+
expect(resolveNamedExportPath(indexPath, 'InternalLeaf')).toBe(leafPath)
|
|
74
89
|
expect(resolveNamedExportPath(indexPath, 'PublicLeaf')).toBe(leafPath)
|
|
75
90
|
expect(resolveNamedExportPath(indexPath, 'StarExport')).toBe(starPath)
|
|
76
91
|
})
|