starlight-versions 0.8.0 → 0.8.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # starlight-versions
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#62](https://github.com/HiDeoo/starlight-versions/pull/62) [`3b6b14a`](https://github.com/HiDeoo/starlight-versions/commit/3b6b14a1e55f13aaf289e822f10dcead916e6c12) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Improves the error message logged when the plugin configuration is invalid.
8
+
3
9
  ## 0.8.0
4
10
 
5
11
  ### Minor Changes
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { StarlightPlugin } from '@astrojs/starlight/types'
2
+ import { z } from 'astro/zod'
2
3
 
3
4
  import { StarlightVersionsConfigSchema, type StarlightVersionsUserConfig } from './libs/config'
4
5
  import { overrideComponents, throwPluginError } from './libs/plugin'
@@ -13,7 +14,10 @@ export default function starlightVersionsPlugin(userConfig: StarlightVersionsUse
13
14
 
14
15
  if (!parsedConfig.success) {
15
16
  throwPluginError(
16
- `The provided plugin configuration is invalid.\n${parsedConfig.error.issues.map((issue) => issue.message).join('\n')}`,
17
+ `Invalid starlight-versions configuration:
18
+
19
+ ${z.prettifyError(parsedConfig.error)}
20
+ `,
17
21
  )
18
22
  }
19
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-versions",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to version documentation pages.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",