fix: restore build:dist and gate in CI

This commit is contained in:
Peter Steinberger
2026-01-12 02:16:37 +00:00
parent da5d81d11c
commit c7acdbd3fd
5 changed files with 9 additions and 5 deletions
+3
View File
@@ -34,5 +34,8 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Build dist
run: pnpm run build:dist
- name: Run tests - name: Run tests
run: pnpm test run: pnpm test
+1
View File
@@ -14,6 +14,7 @@
- Following/followers pagination now guards repeat cursors and standardizes JSON output (#28) — thanks @malpern. - Following/followers pagination now guards repeat cursors and standardizes JSON output (#28) — thanks @malpern.
- Lists GraphQL feature flags updated to prevent 400s (#27) — thanks @zheli. - Lists GraphQL feature flags updated to prevent 400s (#27) — thanks @zheli.
- Likes pagination now follows cursors and avoids stalling on duplicate pages (#12) — thanks @titouv. - Likes pagination now follows cursors and avoids stalling on duplicate pages (#12) — thanks @titouv.
- `pnpm run build:dist` now succeeds after tightening JSON/pagination option typing in tweet output commands.
### Tests ### Tests
- Following: split following/likes tests + cover cursor handling (#33) — thanks @VACInc. - Following: split following/likes tests + cover cursor handling (#33) — thanks @VACInc.
+2 -2
View File
@@ -40,7 +40,7 @@ export function registerBookmarksCommand(program: Command, ctx: CliContext): voi
process.exit(1); process.exit(1);
} }
const usePagination = cmdOpts.all || cmdOpts.cursor; const usePagination = Boolean(cmdOpts.all || cmdOpts.cursor);
if (maxPages !== undefined && !usePagination) { if (maxPages !== undefined && !usePagination) {
console.error(`${ctx.p('err')}--max-pages requires --all or --cursor.`); console.error(`${ctx.p('err')}--max-pages requires --all or --cursor.`);
process.exit(1); process.exit(1);
@@ -73,7 +73,7 @@ export function registerBookmarksCommand(program: Command, ctx: CliContext): voi
if (result.success && result.tweets) { if (result.success && result.tweets) {
const emptyMessage = folderId ? 'No bookmarks found in folder.' : 'No bookmarks found.'; const emptyMessage = folderId ? 'No bookmarks found in folder.' : 'No bookmarks found.';
const isJson = cmdOpts.json || cmdOpts.jsonFull; const isJson = Boolean(cmdOpts.json || cmdOpts.jsonFull);
ctx.printTweetsResult(result, { json: isJson, usePagination, emptyMessage }); ctx.printTweetsResult(result, { json: isJson, usePagination, emptyMessage });
} else { } else {
console.error(`${ctx.p('err')}Failed to fetch bookmarks: ${result.error}`); console.error(`${ctx.p('err')}Failed to fetch bookmarks: ${result.error}`);
+2 -2
View File
@@ -107,7 +107,7 @@ export function registerListsCommand(program: Command, ctx: CliContext): void {
process.exit(2); process.exit(2);
} }
const usePagination = cmdOpts.all || cmdOpts.cursor || maxPages !== undefined; const usePagination = Boolean(cmdOpts.all || cmdOpts.cursor || maxPages !== undefined);
if (!usePagination && (!Number.isFinite(count) || count <= 0)) { if (!usePagination && (!Number.isFinite(count) || count <= 0)) {
console.error(`${ctx.p('err')}Invalid --count. Expected a positive integer.`); console.error(`${ctx.p('err')}Invalid --count. Expected a positive integer.`);
process.exit(1); process.exit(1);
@@ -138,7 +138,7 @@ export function registerListsCommand(program: Command, ctx: CliContext): void {
: await client.getListTimeline(listId, count, timelineOptions); : await client.getListTimeline(listId, count, timelineOptions);
if (result.success && result.tweets) { if (result.success && result.tweets) {
const isJson = cmdOpts.json || cmdOpts.jsonFull; const isJson = Boolean(cmdOpts.json || cmdOpts.jsonFull);
ctx.printTweetsResult(result, { ctx.printTweetsResult(result, {
json: isJson, json: isJson,
usePagination, usePagination,
+1 -1
View File
@@ -114,7 +114,7 @@ export function registerUserTweetsCommand(program: Command, ctx: CliContext): vo
}); });
if (result.success && result.tweets) { if (result.success && result.tweets) {
const isJson = cmdOpts.json || cmdOpts.jsonFull; const isJson = Boolean(cmdOpts.json || cmdOpts.jsonFull);
ctx.printTweetsResult(result, { ctx.printTweetsResult(result, {
json: isJson, json: isJson,
usePagination: wantsPaginationOutput, usePagination: wantsPaginationOutput,