Repository navigation
chore: Knip in check, declare long, ci-bun pack smoke test - #195
Merged
Merged
Conversation
src/utils/long.ts and src/utils/raw-json.ts import `long` directly, but it reached node_modules only as a dependency of @mtcute/core. An install that doesn't hoist transitive dependencies would leave tg unable to start. Knip reports it as an unlisted dependency. The range ^5.3.2 matches what @mtcute already resolves, so the lockfile keeps [email protected]. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`bun run check` now ends with `check:knip`, which runs Knip 6.45.1 (exact devDependency) on files, dependencies, devDependencies, unlisted and unresolved imports and binaries. Exports and types stay out of scope: they are tg's public API. knip.json adds two entries on top of what Knip finds from package.json (bin, scripts, bun test): - index.ts, the root shim that runs src/index.ts, which Knip's default entry covered until an explicit `entry` replaced the defaults; - src/__tests__/helpers/session-exit-child.ts, which daemon-platform.test.ts spawns by path. src/__tests__/helpers/snapshots.ts had no importers and is not packaged, so it is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci-bun (devkit v1.6) can pack the package, install the tarball in a clean project outside the checkout and run every bin with an allowlisted environment and a fresh HOME. The build job turns it on with pack-args '[["--help"],["--version"]]', so `tg --help` and `tg --version` still run from the packed package with no Telegram credentials. That replaces the tarball steps of the repo's own pack job. The job keeps what devkit doesn't cover, the compiled single-file binary that releases ship: it is renamed `binary`, builds dist/tg and runs `--version` and `--help` in an empty environment. The required check is still `ci`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/testing.md imported snapshotLines from src/__tests__/helpers/snapshots.ts, which the Knip commit removed as unused. The example now mirrors the snapshots block in src/__tests__/output.test.ts, which spies on console.log. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Merged
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#195: Knip in bun run check, and long as a runtime dependency. No conflict; the check is clean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Knip to
bun run check, fixes what it found, and moves the npm tarball smoke test to devkit'sci-bunpack step.Changes
long(^5.3.2, lock stays at 5.3.2).src/utils/long.tsandsrc/utils/raw-json.tsimport it, but it only arrived through@mtcute/core. Changelog entry under Unreleased → Fixed.check:knip(Knip 6.45.1, exact devDependency) runs at the end ofbun run check. It checks files, dependencies, devDependencies, unlisted and unresolved imports, and binaries, but not exports, which are public API.knip.jsonlists two extra entries: the rootindex.tsshim andsession-exit-child.ts, which a test spawns by path. Removes the unused test helpersrc/__tests__/helpers/snapshots.ts.buildjob setspack: trueandpack-args: '[["--help"],["--version"]]', so the tarball is installed in a clean project andtg --help/tg --versionrun with no credentials. The repo'spackjob becomesbinary: it compilesdist/tgand runs--versionand--helpin an empty environment. The tarball steps it duplicated are removed. The required check is stillci.Verification
bun run check(Biome, tsc, Knip): passes.pack-smokefrom devkit v1 with[["--help"],["--version"]]: passes; the packed tg prints0.14.0.bun run build, thendist/tg --version/--helpunderenv -i: passes.ci.yml: no findings.main.No version bump: the release procedure handles that.
🤖 Generated with Claude Code