| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
There is also a CJS example on line 920 of the file that needs to be updated as well.
Sorry, something went wrong.
There was a problem hiding this comment.
| const path = require('path'); | |
| const path = require('node:path'); |
Sorry, something went wrong.
There was a problem hiding this comment.
| import path from 'path'; | |
| import path from 'node:path'; |
Sorry, something went wrong.
|
@OshriAsulin I resolved the suggestions you have fixed, there are two more issues raised that are not taken care of:
|
Sorry, something went wrong.
|
@aduh95 ok then I guess we should add it to the CJS example |
Sorry, something went wrong.
No, I don't think so, no one said that the examples need to be a line-by-line equivalent, and it's consistent with most snippets in the docs: CJS ones rely on global.process, ESM ones import it from node:process. |
Sorry, something went wrong.
|
@OshriAsulin The commit message of first commit should be changed to start with lower case character after the submodule (doc: Fix -> doc: fix) Could you rebase and change commit message? |
Sorry, something went wrong.
|
I'd suggest using doc: fix missing imports in `test.run` code examples. Note it can be done by whoever lands the PR, it's totally optional for you to do it. |
Sorry, something went wrong.
The script was missing necessary imports for the `run` function and the `path` module, causing it to fail. This commit adds the missing imports and resolves the issue. - Import `run` from the appropriate module. - Import `path` to resolve file paths. The script should now run without errors.
This commit enhances the script by addressing missing imports for the 'run' function and the 'path' module, which previously resulted in script failure. The following improvements have been made: Imported 'run' from the appropriate module via require to ensure correct functionality. Imported 'path' via require to facilitate proper file path resolution. Imported 'process' via require to include this essential module. These changes resolve the issue of missing dependencies execution.
In this commit, I've refactored the import statements and destructuring assignments in the codebase to enhance code organization and maintainability. The primary changes are as follows:
1. Replaced the import statement:
- From: `import { tap, run } from 'node:test/reporters';`
- To:
- `import { run } from 'node:test';`
- `import { tap } from 'node:test/reporters';`
2. Reorganized destructuring assignments:
- From:
```
const { tap, run } = require('node:test/reporters');
const process = require('process');
```
- To:
```
const { run } = require('node:test');
const { tap } = require('node:test/reporters');
```
In this commit, I update import and require statements throughout the codebase to use 'node:path' instead of 'path'.
|
@OshriAsulin thanks for your contribution! |
Sorry, something went wrong.
The script was missing necessary imports for the `run` function and the `path` module, causing it to fail. This commit adds the missing imports and resolves the issue. - Import `run` from the appropriate module. - Import `path` to resolve file paths. The script should now run without errors. PR-URL: #49489 Fixes: #49488 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
Fixes: #49488
The script was missing necessary imports for the 'run' function and the 'path' module, causing it to fail. This commit adds the missing imports and resolves the issue.
The script should now run without errors.