Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(node-core): passthrough node-cron context #17835

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

Open
sebws wants to merge 1 commit into getsentry:develop
base: develop
Choose a base branch
Loading
from sebws:fix-node-cron-integration

Conversation

Copy link

@sebws sebws commented Oct 1, 2025

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

(削除) - [ ] If you've added code that should be tested, please add tests. (削除ここまで)

  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

node-cron passes context to the functions which this integration does not.

the types here seem to be largely irrelevant as consumers just get the actual node-cron type. however, it might be better to install node-cron as a devdependency and then import and use types from it to get consistency

seer-by-sentry[bot] reacted with hooray emoji
@sebws sebws force-pushed the fix-node-cron-integration branch from 4e0cb52 to 6f554fa Compare October 1, 2025 01:03
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, should we add a dev dep for this @andreiborza ?

Copy link
Member

Yea, we can add that in this PR.

Copy link
Author

sebws commented Oct 3, 2025

tbh it might be a bit harder, given this wrapper already wraps incorrectly and doesn't support node-cron fully, e.g. string referring to a file instead of a callback.

however, just for fun, perhaps it would be more accurate to do

"peerDependencies": { 
 "node-cron": "^4"
},
"peerDependenciesMeta": {
 "node-cron": {
 "optional": true
 }
}

Copy link
Author

sebws commented Oct 3, 2025
edited
Loading

maybe a different style of wrapper would be more accurate that passed through without manipulation and would add event listeners, leaving node-cron to fully handle the execution.

although I'm not sure if that would work with how withMonitor works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@chargome chargome chargome approved these changes

@andreiborza andreiborza Awaiting requested review from andreiborza

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /