Skip to content
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

feat: Rename ESM loader hooks to import and loader #11498

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 9, 2024

Based on feedback in #11338 (comment) I decided it would make sense to rename our ESM hooks to something that is more in line with the Node.js interface to register the hooks.

Old

  • Node <=18.18.2: node --loader=@sentry/node/hook app.js
  • Node >=18.19.0: node --import=@sentry/node/register app.js

New

  • Node <=18.18.2: node --loader=@sentry/node/loader app.js
  • Node >=18.19.0: node --import=@sentry/node/import app.js

@lforst lforst requested review from timfish and AbhiPrasad April 9, 2024 07:59
@timfish
Copy link
Collaborator

timfish commented Apr 9, 2024

When I first saw the two new paths, they read as exactly the same string for me for a good few seconds. I think this is partly because I wasn't fully caffeinated but also because they're the same length and both end in -hook.

  • Node <=18.18.2: node --loader=@sentry/node/loader-hook app.js
  • Node >=18.19.0: node --import=@sentry/node/import-hook app.js

Maybe they're better without -hook?

  • Node <=18.18.2: node --loader=@sentry/node/loader app.js
  • Node >=18.19.0: node --import=@sentry/node/import app.js

@mydea
Copy link
Member

mydea commented Apr 9, 2024

For me omiting -hook makes sense to, but no strong feelings - I'm fine either way!

@lforst
Copy link
Member Author

lforst commented Apr 11, 2024

Changed to omitting the -hook suffix

@lforst lforst changed the title feat: Rename ESM loader hooks to import-hook and loader-hook feat: Rename ESM loader hooks to import and loader Apr 11, 2024
@lforst lforst merged commit 80c0ee6 into develop Apr 11, 2024
78 checks passed
@lforst lforst deleted the lforst-rename-hooks branch April 11, 2024 11:13
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants