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: polyfill node:inspector and node:inspector/promises #207

Merged
merged 6 commits into from
May 29, 2024

Conversation

jculvey
Copy link
Collaborator

@jculvey jculvey commented May 24, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

Adds a polyfill for the node:inspector and node:inspector/promises modules. Also creates a general purpose mock for the Disposable type.

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

src/runtime/mock/disposable.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

+1 to @pi0's comments. otherwise looks good to me.

…romises' modules

Replaces the current auto-mocking of 'inspector' to support destructured ESM imports and allow for functional polyfill coverage in the future.
@pi0 pi0 changed the title cfeat(node:inspector): polyfill node:inspector and node:inspector/promises feat: polyfill node:inspector and node:inspector/promises May 28, 2024
// `node:inspector` and `node:inspector/promises` share the same implementation with only Session being in the promises module:
// https://github.com/nodejs/node/blob/main/lib/inspector/promises.js
export const Session: typeof inspector.Session =
mock.__createMock__("inspector.Session");
Copy link
Member

Choose a reason for hiding this comment

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

Session.post's promise won't be resolved (it is not only limited to here. made tracker: #212)

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@pi0 pi0 merged commit 9e2537c into main May 29, 2024
2 checks passed
@pi0 pi0 deleted the polyfill-inspector branch May 29, 2024 08:03
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.

3 participants