-
-
Notifications
You must be signed in to change notification settings - Fork 25
feat(process-assert-to-assert): introduce #200
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
base: main
Are you sure you want to change the base?
feat(process-assert-to-assert): introduce #200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see any test for that kind cases
import process from "node:process"But good first pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome first contribution 🎉, Thank you @matheusmorett2 !
Just small fixes needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the conflict in the remove-binding file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For require call not in cjs context the transformed code may be wrong.
For example this before
import { createRequire} from 'node:module';
const require = createRequire(import.meta.dirname)
process.assert(true);Broken after with the current implementation
const assert = require('node:assert');
import { createRequire} from 'node:module';
const require = createRequire(import.meta.dirname)
assert(true);In this case I expect that require is undefined.
Solutions:
- Try to found a logic that handle that.
- Add it at inline comment so we know for the future
|
hey @matheusmorett2 any news on this pr ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could use some refactoring. There's a lot of nesting, among other things.
Can you break it up, and look at the other mods for inspiration?
|
bump @matheusmorett2 |
Closes #197
Add codemod recipe
process-assert-to-assertto handle deprecation DEP0100.Before
After
Fix:
remove-binding.tshandle scenario where have alias in require