@levino/shipyard-base 0.9.2 → 0.9.3-rc-20260926172941

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": "@levino/shipyard-base",
3
- "version": "0.9.2",
3
+ "version": "0.9.3-rc-20260926172941",
4
4
  "description": "Core layouts, components, and configuration for shipyard - a composable page builder for Astro",
5
5
  "keywords": [
6
6
  "astro",
@@ -60,20 +60,20 @@
60
60
  "remark-html": "^16.0.1",
61
61
  "tailwindcss": "^4",
62
62
  "typescript": "^7.0.2",
63
- "vite": "^8.2.2",
64
- "vitest": "^4.1.11"
63
+ "vite": "^8.3.1",
64
+ "vitest": "^5.0.2"
65
65
  },
66
66
  "dependencies": {
67
- "@astrojs/markdown-remark": "^7.2.4",
68
- "clsx": "^2.1.0",
69
- "mdast-util-directive": "^3.0.0",
67
+ "@astrojs/markdown-remark": "^7.3.1",
68
+ "clsx": "^2.1.1",
69
+ "mdast-util-directive": "^3.1.0",
70
70
  "mdast-util-to-hast": "^13.2.1",
71
- "micromark-extension-directive": "^3.0.0",
71
+ "micromark-extension-directive": "^4.0.0",
72
72
  "ramda": "^0.32.0",
73
- "remark-directive": "^3.0.0",
73
+ "remark-directive": "^4.0.0",
74
74
  "remark-parse": "^11.0.0",
75
- "tailwind-merge": "^2.2.0",
76
- "unified": "^11.0.0",
77
- "unist-util-visit": "^5.0.0"
75
+ "tailwind-merge": "^3.7.0",
76
+ "unified": "^11.0.5",
77
+ "unist-util-visit": "^5.1.0"
78
78
  }
79
79
  }
@@ -1,6 +1,7 @@
1
1
  import { mkdirSync, rmSync, writeFileSync } from 'node:fs'
2
2
  import { tmpdir } from 'node:os'
3
3
  import { join } from 'node:path'
4
+ import type { AstroIntegrationLogger } from 'astro'
4
5
  import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
5
6
  import type { LinkCheckResult } from './linkChecker'
6
7
  import { checkLinks, reportBrokenLinks } from './linkChecker'
@@ -168,15 +169,18 @@ describe('checkLinks', () => {
168
169
  })
169
170
 
170
171
  describe('reportBrokenLinks', () => {
171
- const createMockLogger = () => ({
172
- info: vi.fn(),
173
- warn: vi.fn(),
174
- error: vi.fn(),
175
- debug: vi.fn(),
176
- label: 'test',
177
- options: {},
178
- fork: vi.fn(),
179
- })
172
+ const createMockLogger = () => {
173
+ const mock = {
174
+ info: vi.fn(),
175
+ warn: vi.fn(),
176
+ error: vi.fn(),
177
+ debug: vi.fn(),
178
+ label: 'test',
179
+ options: {},
180
+ fork: vi.fn(),
181
+ }
182
+ return mock as typeof mock & AstroIntegrationLogger
183
+ }
180
184
 
181
185
  test('logs success message when no broken links and action is not ignore', () => {
182
186
  const logger = createMockLogger()
@@ -186,7 +190,7 @@ describe('reportBrokenLinks', () => {
186
190
  brokenLinks: [],
187
191
  }
188
192
 
189
- reportBrokenLinks(result, 'warn', logger as any)
193
+ reportBrokenLinks(result, 'warn', logger)
190
194
 
191
195
  expect(logger.info).toHaveBeenCalledWith(
192
196
  'Link check passed: 10 links verified',
@@ -204,7 +208,7 @@ describe('reportBrokenLinks', () => {
204
208
  ],
205
209
  }
206
210
 
207
- reportBrokenLinks(result, 'ignore', logger as any)
211
+ reportBrokenLinks(result, 'ignore', logger)
208
212
 
209
213
  expect(logger.info).not.toHaveBeenCalled()
210
214
  expect(logger.warn).not.toHaveBeenCalled()
@@ -218,7 +222,7 @@ describe('reportBrokenLinks', () => {
218
222
  brokenLinks: [{ sourceFile: 'index.html', href: '/broken', line: 1 }],
219
223
  }
220
224
 
221
- reportBrokenLinks(result, 'log', logger as any)
225
+ reportBrokenLinks(result, 'log', logger)
222
226
 
223
227
  expect(logger.info).toHaveBeenCalled()
224
228
  const message = logger.info.mock.calls[0]?.[0]
@@ -235,7 +239,7 @@ describe('reportBrokenLinks', () => {
235
239
  brokenLinks: [{ sourceFile: 'index.html', href: '/broken', line: 1 }],
236
240
  }
237
241
 
238
- reportBrokenLinks(result, 'warn', logger as any)
242
+ reportBrokenLinks(result, 'warn', logger)
239
243
 
240
244
  expect(logger.warn).toHaveBeenCalled()
241
245
  const message = logger.warn.mock.calls[0]?.[0]
@@ -250,7 +254,7 @@ describe('reportBrokenLinks', () => {
250
254
  brokenLinks: [{ sourceFile: 'index.html', href: '/broken', line: 1 }],
251
255
  }
252
256
 
253
- expect(() => reportBrokenLinks(result, 'throw', logger as any)).toThrow(
257
+ expect(() => reportBrokenLinks(result, 'throw', logger)).toThrow(
254
258
  'Broken links found',
255
259
  )
256
260
  })
@@ -267,7 +271,7 @@ describe('reportBrokenLinks', () => {
267
271
  ],
268
272
  }
269
273
 
270
- reportBrokenLinks(result, 'warn', logger as any)
274
+ reportBrokenLinks(result, 'warn', logger)
271
275
 
272
276
  const message = logger.warn.mock.calls[0]?.[0]
273
277
  expect(message).toContain('Found 3 broken links')
package/src/virtual.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare module 'virtual:shipyard/config' {
2
2
  import type { Config } from './schemas/config'
3
+
3
4
  const config: Config
4
5
  export default config
5
6
  }