Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
codemod-missing-await-act
Advanced tools
Adds missing `await` using [jscodeshift](https://github.com/facebook/jscodeshift)
Adds missing await
using jscodeshift
$ npx codemod-missing-await-act ./src
TODO
$ npx codemod-missing-await-act
codemod-missing-await-act <paths...>
Positionals:
paths [string] [required]
Options:
--version Show version number [boolean]
--help Show help [boolean]
--dry [boolean] [default: false]
--ignore-pattern [string] [default: "**/node_modules/**"]
--verbose [boolean] [default: false]
Examples:
codemod-missing-await-act ./ Ignores `node_modules` and
--ignore-pattern `build` folders
"**/{node_modules,build}/**"
const acting = act(scope);
await anotherPromise;
await acting;
will add await
to the act
call.
This codemod is targetted at act calls.
They're not allowed to be interleaved anyway so the original code was already problematic since it could also contain an act
call.
I don't think this is common in practice (TODO: check if we use this pattern).
We don't track references to class methods. Only references to (arrow-) function declarations or expressions are tracked.
class MyTestUtils {
render() {
act(scope);
}
}
const utils = new MyTestUtils();
utils.render();
will be transformed to
class MyTestUtils {
async render() {
await act(scope);
}
}
const utils = new MyTestUtils();
// no `await` added
utils.render();
The following list contains officially supported runtimes. Please file an issue for runtimes that are not included in this list.
14.x || 16.x || 18.x || 19.x || 20.x
FAQs
Adds missing `await` to `act` calls or methods that contain an `act` call using [jscodeshift](https://github.com/facebook/jscodeshift). The codemod propagates these changes throughout the file. For example, given
The npm package codemod-missing-await-act receives a total of 3 weekly downloads. As such, codemod-missing-await-act popularity was classified as not popular.
We found that codemod-missing-await-act demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.