cloudflare / cloudflare/actors
Alarms runs setName which doesn't exist if the Alarms class is used independently of the Actor class
- Dominant language
- TypeScript
- Stars
- 422
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Alarms runs `setName` here: https://github.com/cloudflare/actors/blob/main/packages/alarms/src/index.ts#L301
The method doesn't exist if the alarms is used independently - the parent instance is not an actor instance.
**To Reproduce**
Steps to reproduce the behavior:
1. Use the alarms package without the actor class
2. Schedule an alarm
3. Wait for the alarm to run
4. Check console
5. `error setting identifier TypeError: this.parent.setName is not a function` appears in the console
**Expected behavior**
Everything works as expected
**Information (please complete the following information):**
- Typescript: [5.8.3]
- Node.js: [23.10.0]
- Wrangler: [4.30.0]
- Actor Version: [0.0.1-beta.6]
**Additional context**
Contributor guide
Research direction
Start at packages/alarms/src/index.ts around line 301 and reproduce the reported failure by using the alarms package without the Actor class, then scheduling an alarm. Done means the alarm runs without the `this.parent.setName is not a function` error and the expected behavior works for standalone use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100