-
Notifications
You must be signed in to change notification settings - Fork 0
fix(core): fix 6 bugs found in codebase audit #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ import type { | |
| RealtimeEvent, | ||
| RealtimeStats, | ||
| AggregatedData, | ||
| } from '../types/realtime'; | ||
| import { parseUserAgent } from '../utils/user-agent-parser'; | ||
| import { detectBot } from '../utils/bot-detection'; | ||
| } from '../types/realtime.js'; | ||
| import { parseUserAgent } from '../utils/user-agent-parser.js'; | ||
| import { detectBot } from '../utils/bot-detection.js'; | ||
|
Comment on lines
+5
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Three new 🔧 Proposed fix-} from '../types/realtime.js';
-import { parseUserAgent } from '../utils/user-agent-parser.js';
-import { detectBot } from '../utils/bot-detection.js';
+} from '../types/realtime';
+import { parseUserAgent } from '../utils/user-agent-parser';
+import { detectBot } from '../utils/bot-detection';Based on learnings: "Applies to 🤖 Prompt for AI Agents |
||
|
|
||
| /** | ||
| * Durable Object for real-time analytics aggregation | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||||||
| import { Hono } from 'hono'; | ||||||||||||||
| import type { Env } from '../types/index'; | ||||||||||||||
| import { RealtimeAdapter } from '../adapters/realtime'; | ||||||||||||||
| import type { ServerContext, RealtimeEvent } from '../types/realtime'; | ||||||||||||||
| import type { Env } from '../types/index.js'; | ||||||||||||||
| import { RealtimeAdapter } from '../adapters/realtime.js'; | ||||||||||||||
| import type { ServerContext, RealtimeEvent } from '../types/realtime.js'; | ||||||||||||||
|
Comment on lines
+2
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same Lines 2–4 add 🔧 Proposed fix-import type { Env } from '../types/index.js';
-import { RealtimeAdapter } from '../adapters/realtime.js';
-import type { ServerContext, RealtimeEvent } from '../types/realtime.js';
+import type { Env } from '../types/index';
+import { RealtimeAdapter } from '../adapters/realtime';
+import type { ServerContext, RealtimeEvent } from '../types/realtime';Based on learnings: "Never import 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| const realtimeRouter = new Hono<{ Bindings: Env }>(); | ||||||||||||||
| const adapter = new RealtimeAdapter(); | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||
| import type { FingerprintComponents, Fingerprint } from '../types/realtime'; | ||||||
| import type { FingerprintComponents, Fingerprint } from '../types/realtime.js'; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The guideline requires: "Never import 🔧 Proposed fix-import type { FingerprintComponents, Fingerprint } from '../types/realtime.js';
+import type { FingerprintComponents, Fingerprint } from '../types/realtime';Based on learnings: "Applies to 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| /** | ||||||
| * Generate a privacy-respecting fingerprint from browser components | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.jsimport extensions violate project coding guidelinesAll four changed import lines add
.jsextensions, directly contradicting the project rule: "Never import.jsfiles — use.tsimports only (TypeScript will resolve to .js at runtime)."🔧 Proposed fix
Based on learnings: "Never import
.jsfiles - use.tsimports only (TypeScript will resolve to .js at runtime)."🤖 Prompt for AI Agents