@astrojs/starlight 0.15.0 → 0.15.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 +16 -0
- package/components/SocialIcons.astro +2 -0
- package/package.json +2 -2
- package/translations/es.json +4 -1
- package/translations/fr.json +4 -1
- package/types.ts +4 -1
- package/utils/git.ts +4 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1273](https://github.com/withastro/starlight/pull/1273) [`ae53155`](https://github.com/withastro/starlight/commit/ae531557aa4d42bd27c15f8f08bb3ca8242c9beb) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Updates `<SocialIcon />` styling for improved accessibility. Specifically, the component now meets the [Target Size (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html) success criteria defined by [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/).
|
|
8
|
+
|
|
9
|
+
- [#1289](https://github.com/withastro/starlight/pull/1289) [`9bd343f`](https://github.com/withastro/starlight/commit/9bd343fb1efab90a0aa03a95b1928a53c1674000) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds French translations for Expressive Code UI
|
|
10
|
+
|
|
11
|
+
- [#1280](https://github.com/withastro/starlight/pull/1280) [`6b1693d`](https://github.com/withastro/starlight/commit/6b1693d55552a48316a31d986e1cbaf695f10a61) Thanks [@kevinzunigacuellar](https://github.com/kevinzunigacuellar)! - Adds Spanish translations for Expressive Code UI
|
|
12
|
+
|
|
13
|
+
- [#1276](https://github.com/withastro/starlight/pull/1276) [`667f23d`](https://github.com/withastro/starlight/commit/667f23d615742b44bb18ace39d981f8797b8ac55) Thanks [@hippotastic](https://github.com/hippotastic)! - Updates `astro-expressive-code` dependency to the latest version
|
|
14
|
+
|
|
15
|
+
- [#1266](https://github.com/withastro/starlight/pull/1266) [`c9edf30`](https://github.com/withastro/starlight/commit/c9edf30b16f66757797dcaa5161b4afc18027476) Thanks [@alex-way](https://github.com/alex-way)! - Removes redundant subprocess calls in git last-updated time utility to improve performance
|
|
16
|
+
|
|
17
|
+
- [#1278](https://github.com/withastro/starlight/pull/1278) [`e88abb0`](https://github.com/withastro/starlight/commit/e88abb0cc8b329500c15bc77aaed3907ec7dc507) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Exports the `StarlightUserConfig` TypeScript type representing the user's Starlight configuration received by plugins.
|
|
18
|
+
|
|
3
19
|
## 0.15.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"@pagefind/default-ui": "^1.0.3",
|
|
175
175
|
"@types/hast": "^3.0.3",
|
|
176
176
|
"@types/mdast": "^4.0.3",
|
|
177
|
-
"astro-expressive-code": "^0.
|
|
177
|
+
"astro-expressive-code": "^0.30.1",
|
|
178
178
|
"bcp-47": "^2.1.0",
|
|
179
179
|
"execa": "^8.0.1",
|
|
180
180
|
"hast-util-select": "^6.0.2",
|
package/translations/es.json
CHANGED
|
@@ -22,5 +22,8 @@
|
|
|
22
22
|
"aside.note": "Nota",
|
|
23
23
|
"aside.tip": "Consejo",
|
|
24
24
|
"aside.caution": "Precaución",
|
|
25
|
-
"aside.danger": "Peligro"
|
|
25
|
+
"aside.danger": "Peligro",
|
|
26
|
+
"expressiveCode.copyButtonCopied": "¡Copiado!",
|
|
27
|
+
"expressiveCode.copyButtonTooltip": "Copiar al portapapeles",
|
|
28
|
+
"expressiveCode.terminalWindowFallbackTitle": "Ventana de terminal"
|
|
26
29
|
}
|
package/translations/fr.json
CHANGED
|
@@ -22,5 +22,8 @@
|
|
|
22
22
|
"aside.note": "Note",
|
|
23
23
|
"aside.tip": "Astuce",
|
|
24
24
|
"aside.caution": "Attention",
|
|
25
|
-
"aside.danger": "Danger"
|
|
25
|
+
"aside.danger": "Danger",
|
|
26
|
+
"expressiveCode.copyButtonCopied": "Copié !",
|
|
27
|
+
"expressiveCode.copyButtonTooltip": "Copier dans le presse-papiers",
|
|
28
|
+
"expressiveCode.terminalWindowFallbackTitle": "Fenêtre de terminal"
|
|
26
29
|
}
|
package/types.ts
CHANGED
package/utils/git.ts
CHANGED
|
@@ -8,12 +8,9 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import
|
|
11
|
+
import { basename, dirname } from 'node:path';
|
|
12
12
|
import { execaSync } from 'execa';
|
|
13
13
|
|
|
14
|
-
/** Custom error thrown when git is not found in `PATH`. */
|
|
15
|
-
class GitNotFoundError extends Error {}
|
|
16
|
-
|
|
17
14
|
/** Custom error thrown when the current file is not tracked by git. */
|
|
18
15
|
class FileNotTrackedError extends Error {}
|
|
19
16
|
|
|
@@ -22,7 +19,6 @@ class FileNotTrackedError extends Error {}
|
|
|
22
19
|
* It gets the commit date instead of author date so that amended commits
|
|
23
20
|
* can have their dates updated.
|
|
24
21
|
*
|
|
25
|
-
* @throws {GitNotFoundError} If git is not found in `PATH`.
|
|
26
22
|
* @throws {FileNotTrackedError} If the current file is not tracked by git.
|
|
27
23
|
* @throws Also throws when `git log` exited with non-zero, or when it outputs
|
|
28
24
|
* unexpected text.
|
|
@@ -34,24 +30,6 @@ export function getFileCommitDate(
|
|
|
34
30
|
date: Date;
|
|
35
31
|
timestamp: number;
|
|
36
32
|
} {
|
|
37
|
-
try {
|
|
38
|
-
const { stdout } = execaSync('which', ['git']);
|
|
39
|
-
if (!stdout) {
|
|
40
|
-
throw new GitNotFoundError(
|
|
41
|
-
`Failed to retrieve git history for "${file}" because git is not installed.`
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
} catch {}
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
const { stdout } = execaSync('test', ['-f', file]);
|
|
48
|
-
if (!stdout) {
|
|
49
|
-
throw new Error(
|
|
50
|
-
`Failed to retrieve git history for "${file}" because the file does not exist.`
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
} catch {}
|
|
54
|
-
|
|
55
33
|
const result = execaSync(
|
|
56
34
|
'git',
|
|
57
35
|
[
|
|
@@ -60,10 +38,10 @@ export function getFileCommitDate(
|
|
|
60
38
|
'--max-count=1',
|
|
61
39
|
...(age === 'oldest' ? ['--follow', '--diff-filter=A'] : []),
|
|
62
40
|
'--',
|
|
63
|
-
|
|
41
|
+
basename(file),
|
|
64
42
|
],
|
|
65
43
|
{
|
|
66
|
-
cwd:
|
|
44
|
+
cwd: dirname(file),
|
|
67
45
|
}
|
|
68
46
|
);
|
|
69
47
|
if (result.exitCode !== 0) {
|
|
@@ -71,7 +49,6 @@ export function getFileCommitDate(
|
|
|
71
49
|
`Failed to retrieve the git history for file "${file}" with exit code ${result.exitCode}: ${result.stderr}`
|
|
72
50
|
);
|
|
73
51
|
}
|
|
74
|
-
let regex = /^(?<timestamp>\d+)$/;
|
|
75
52
|
|
|
76
53
|
const output = result.stdout.trim();
|
|
77
54
|
|
|
@@ -81,6 +58,7 @@ export function getFileCommitDate(
|
|
|
81
58
|
);
|
|
82
59
|
}
|
|
83
60
|
|
|
61
|
+
const regex = /^(?<timestamp>\d+)$/;
|
|
84
62
|
const match = output.match(regex);
|
|
85
63
|
|
|
86
64
|
if (!match) {
|