@lvce-editor/extension-detail-view 7.18.0 → 7.19.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.
|
@@ -69,7 +69,7 @@ const Size = 'Size';
|
|
|
69
69
|
const Snippets = 'Snippets';
|
|
70
70
|
const Status = 'Status';
|
|
71
71
|
const StringMustNotBeEmpty = 'String must not be empty';
|
|
72
|
-
const
|
|
72
|
+
const Themes = 'Themes';
|
|
73
73
|
const Uninstall$1 = 'Uninstall';
|
|
74
74
|
const UnableToLoadExtension = 'Unable to load extension';
|
|
75
75
|
const UnableToLoadExtensionWithError = 'The extension details could not be loaded: {PH1}';
|
|
@@ -149,7 +149,7 @@ const extensionNotAvailable = extensionId => {
|
|
|
149
149
|
});
|
|
150
150
|
};
|
|
151
151
|
const theme = () => {
|
|
152
|
-
return i18nString(
|
|
152
|
+
return i18nString(Themes);
|
|
153
153
|
};
|
|
154
154
|
const commands$1 = () => {
|
|
155
155
|
return i18nString(Commands$1);
|
|
@@ -5711,7 +5711,7 @@ const handleTabFocus = (state, name) => {
|
|
|
5711
5711
|
const escapeMarkdown = value => {
|
|
5712
5712
|
return value.replaceAll('\\', '\\\\').replaceAll('[', '\\[').replaceAll(']', '\\]');
|
|
5713
5713
|
};
|
|
5714
|
-
const getPublishedText = publishedAt => {
|
|
5714
|
+
const getPublishedText = (publishedAt, now) => {
|
|
5715
5715
|
if (!publishedAt) {
|
|
5716
5716
|
return 'Publication date unavailable';
|
|
5717
5717
|
}
|
|
@@ -5719,18 +5719,16 @@ const getPublishedText = publishedAt => {
|
|
|
5719
5719
|
if (Number.isNaN(date.getTime())) {
|
|
5720
5720
|
return 'Publication date unavailable';
|
|
5721
5721
|
}
|
|
5722
|
-
return `Published ${date.
|
|
5723
|
-
dateStyle: 'long'
|
|
5724
|
-
})}`;
|
|
5722
|
+
return `Published ${formatCreated(date.getTime(), now)}`;
|
|
5725
5723
|
};
|
|
5726
|
-
const getGithubReleasesMarkdown = (releases, githubRepository) => {
|
|
5724
|
+
const getGithubReleasesMarkdown = (releases, githubRepository, now = Date.now()) => {
|
|
5727
5725
|
if (releases.length === 0) {
|
|
5728
5726
|
return `# Changelog\n\nNo GitHub releases were found for **${escapeMarkdown(githubRepository.owner)}/${escapeMarkdown(githubRepository.repository)}**.`;
|
|
5729
5727
|
}
|
|
5730
5728
|
return releases.map(release => {
|
|
5731
5729
|
const title = release.name || release.tagName;
|
|
5732
5730
|
const body = release.body.trim() || '_No release notes were provided._';
|
|
5733
|
-
return `# [${escapeMarkdown(title)}](${release.htmlUrl})\n\n${getPublishedText(release.publishedAt)} · \`${release.tagName}\`\n\n${body}`;
|
|
5731
|
+
return `# [${escapeMarkdown(title)}](${release.htmlUrl})\n\n${getPublishedText(release.publishedAt, now)} · \`${release.tagName}\`\n\n${body}`;
|
|
5734
5732
|
}).join('\n\n---\n\n');
|
|
5735
5733
|
};
|
|
5736
5734
|
|