Skip to content

Conversation

@fisker
Copy link
Contributor

@fisker fisker commented May 10, 2025

  • Missed one import.
  • Use .once for one time events.
  • Use node:assert/strict instead of node:assert.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. worker Issues and PRs related to Worker support. labels May 10, 2025
```mjs
import assert from 'node:assert';
import assert from 'node:assert/strict';
Copy link
Member

Choose a reason for hiding this comment

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

The rest of the changes here are ok but this one is generally unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

```cjs
'use strict';
const process = require('node:process');
Copy link
Contributor

Choose a reason for hiding this comment

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

CJS snippets usually use the global process

Suggested change
const process = require('node:process');

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

Labels

doc Issues and PRs related to the documentations. worker Issues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants