refactor\!: rename input_reader to input, clean up folder structure#4
Merged
refactor\!: rename input_reader to input, clean up folder structure#4
Conversation
Owner
nberlette
commented
Feb 17, 2026
- chore: add updated lockfile
- refactor(input)!: rename input_reader dir to input
- fix(input): fix some issues with types and typos
- config: update exports to use new input/ folder
- refactor(input): ensure keyboard and mouse APIs are exposed by src/input.ts
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase by renaming the input_reader directory to input and updating related imports and exports. The refactoring includes fixing type assertions, adding explicit return types, and consolidating the input handling structure. However, the refactor is incomplete as several files outside this PR still reference the old input_reader paths, which will break the codebase.
Changes:
- Renamed
input_reader/directory toinput/with updated internal import paths - Updated deno.json exports to remove old
input-readerandinput_readerpaths and add newinput/submodule exports - Fixed type assertion in mouse.ts from
undefined as unknown as Uint8Arraytoundefined!and added explicit return type to emitInputEvents
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/input/types.ts | Removed copyright header (line removed from previous file) |
| src/input/mouse.ts | Updated import path from "../types.ts" to "./types.ts", changed type assertion, contains "SSS" typo |
| src/input/mod.ts | Updated import paths to use local keyboard.ts and mouse.ts, added explicit Promise return type |
| src/input/keyboard.ts | Updated import path from "../types.ts" to "./types.ts", contains "3//" typo in copyright line |
| src/input.ts | Updated import path from "./input_reader/mod.ts" to "./input/mod.ts", added re-export of input/mod.ts |
| deno.lock | Added new lockfile with crayon dependency |
| deno.json | Removed old input_reader/input-reader exports, added new input/ submodule exports |
Comments suppressed due to low confidence (3)
src/input/mouse.ts:35
- The line contains "SSS" appended to the return statement. This appears to be accidental typing that should be removed.
src/input/keyboard.ts:1 - The line starts with "3//" instead of just "//". The character "3" appears to be accidentally added and should be removed.
src/input/types.ts:1 - The copyright header was removed from this file. This violates the codebase convention where all TypeScript source files consistently include "// Copyright 2023 Im-Beast. MIT license." as the first line. The copyright header should be restored to maintain consistency with the rest of the codebase.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.