Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 34 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ jobs:
- name: Generate changelog blocks from changefiles (release)
if: startsWith(github.ref_name, 'release/')
env:
CHANGELOG_API_URL: ${{ secrets.VCHART_CHANGELOG_API_URL }}
CHANGELOG_API_TOKEN: ${{ secrets.VCHART_CHANGELOG_API_TOKEN }}
CHANGELOG_API_URL: ${{ secrets.VTABLE_CHANGELOG_API_URL }}
CHANGELOG_API_TOKEN: ${{ secrets.VTABLE_CHANGELOG_API_TOKEN }}
RELEASE_VERSION: ${{ steps.semver_release.outputs.main }}
run: |
node <<'NODE'
Expand Down Expand Up @@ -205,38 +205,19 @@ jobs:
const baseUrl = process.env.CHANGELOG_API_URL;
const token = process.env.CHANGELOG_API_TOKEN;

function writeFallback() {
const date = payload.date;
const enLines = [
`# v${version}`,
'',
date,
'',
'**🆕 New Features**',
'',
`- TODO: Fill in change details for v${version}.`,
'',
];
const zhLines = [
`# v${version}`,
'',
date,
'',
'**🆕 新增功能**',
'',
`- TODO:补充 v${version} 的更新内容。`,
'',
];
fs.mkdirSync('.changelog', { recursive: true });
fs.writeFileSync('.changelog/en.md', enLines.join('\n') + '\n', 'utf8');
fs.writeFileSync('.changelog/zh.md', zhLines.join('\n') + '\n', 'utf8');
console.log('Wrote fallback changelog blocks for version', version);
function failChangelog(message) {
console.error(message);
process.exit(1);
}

function validateBlock(block, lang) {
if (!block || /TODO/i.test(block)) {
throw new Error(`Invalid ${lang} changelog block: empty or contains TODO`);
}
}

if (!baseUrl || !token) {
console.log('CHANGELOG_API_URL or CHANGELOG_API_TOKEN not configured, using fallback template.');
writeFallback();
process.exit(0);
failChangelog('CHANGELOG_API_URL or CHANGELOG_API_TOKEN not configured.');
}

const url = new URL('/api/changelog/vtable/generate', baseUrl);
Expand Down Expand Up @@ -269,24 +250,23 @@ jobs:
if (!en || !zh) {
throw new Error('Missing en/zh blocks in response');
}
validateBlock(String(en), 'en');
validateBlock(String(zh), 'zh');
fs.mkdirSync('.changelog', { recursive: true });
fs.writeFileSync('.changelog/en.md', String(en).trimEnd() + '\n', 'utf8');
fs.writeFileSync('.changelog/zh.md', String(zh).trimEnd() + '\n', 'utf8');
console.log('Changelog blocks generated via API. traceId:', parsed.traceId || '(none)');
} catch (e) {
console.error('Failed to parse API response, fallback to template:', e.message || e);
writeFallback();
failChangelog(`Failed to parse API response: ${e.message || e}`);
}
} else {
console.error('Changelog API returned non-2xx status:', res.statusCode, data);
writeFallback();
failChangelog(`Changelog API returned non-2xx status: ${res.statusCode} ${data}`);
}
});
});

req.on('error', (err) => {
console.error('Changelog API request failed, fallback to template:', err.message || err);
writeFallback();
failChangelog(`Changelog API request failed: ${err.message || err}`);
});

req.write(body);
Expand All @@ -295,6 +275,8 @@ jobs:

- name: Prepend changelog blocks into release docs (release)
if: startsWith(github.ref_name, 'release/')
env:
RELEASE_VERSION: ${{ steps.semver_release.outputs.main }}
run: |
set -euo pipefail
mkdir -p docs/assets/changelog/en docs/assets/changelog/zh
Expand All @@ -303,12 +285,19 @@ jobs:
block_file=".changelog/${lang}.md"
target_file="docs/assets/changelog/${lang}/release.md"
if [ -f "$block_file" ]; then
if [ -f "$target_file" ]; then
cp "$target_file" "${target_file}.bak"
cat "$block_file" "${target_file}.bak" > "$target_file"
else
cp "$block_file" "$target_file"
fi
node -e '
const fs = require("fs");
const [blockFile, targetFile, version] = process.argv.slice(1);
const block = fs.readFileSync(blockFile, "utf8").trimEnd() + "\n\n";
const oldContent = fs.existsSync(targetFile) ? fs.readFileSync(targetFile, "utf8") : "";
const heading = `# v${version}`;
let contentWithoutSameVersion = oldContent;
if (oldContent.startsWith(`${heading}\n`) || oldContent.startsWith(`${heading}\r\n`)) {
const nextVersionIndex = oldContent.slice(1).search(/\n# v\d/);
contentWithoutSameVersion = nextVersionIndex >= 0 ? oldContent.slice(nextVersionIndex + 2) : "";
}
fs.writeFileSync(targetFile, block + contentWithoutSameVersion.replace(/^\n+/, ""), "utf8");
' "$block_file" "$target_file" "$RELEASE_VERSION"
else
echo "Missing changelog block for $lang, skip."
fi
Expand Down Expand Up @@ -392,6 +381,8 @@ jobs:
if git diff --quiet; then
echo 'No changes to commit for release branch.'
else
rm -rf .changelog
find docs/assets/changelog -name '*.bak' -delete
git add .
git commit -m "build: release version ${{ steps.package_version_release.outputs.current_version }} [skip ci]" -n
git push --no-verify origin ${{ github.ref_name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "Merge pull request #5144 from VisActor/fix/issue-5027\n\nfix: avoid selection gap with frozen rows\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: preserve sticky group position after toggle\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: avoid selection gap with frozen rows\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: preserve hidden column order after filter update\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: resolve regression from #5137 fix which broke nested header drag and exposed internal state\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "Fix an issue where keyboard multi-selection with Shift plus arrow keys stopped expanding after the second cell (GitHub #5146)",
"type": "patch"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
3 changes: 2 additions & 1 deletion common/scripts/apply-release-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const parseVersion = require('./parse-version');


function run() {
const preReleaseName = process.argv.slice(2)[0];
const preReleaseNameArg = process.argv.slice(2)[0];
const preReleaseName = preReleaseNameArg === 'none' ? '' : preReleaseNameArg;
const nextVersionOrNextBump = process.argv.slice(2)[1];
const buildName = process.argv.slice(2)[2];
const nextBump = checkAndUpdateNextBump(nextVersionOrNextBump);
Expand Down
Loading