Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
node-core-utils
Advanced tools
CLI tools for Node.js Core collaborators.
npm install -g node-core-utils
If you would prefer to build from the source, install and link:
git clone git@github.com:nodejs/node-core-utils.git
cd node-core-utils
npm install
npm link
Most of the tools need your GitHub credentials to work. You can either
If you prefer option 2, follow these instructions to create the token.
Note: We need to read the email of the PR author in order to check if it matches
the email of the commit author. This requires checking the box user:email
when
you create the personal access token (you can edit the permission later as well).
Then create an rc file (~/.ncurc
or $XDG_CONFIG_HOME/ncurc
):
{
"username": "your_github_username",
"token": "token_that_you_created"
}
Note: you could use ncu-config
to configure these variables, but it's not
recommended to leave your tokens in your command line history.
Put the following entries into ~/.gitignore_global
.ncurc # node-core-utils configuration file
.ncu # node-core-utils working directory
Mind that.ncu/land
could contain your access token since it contains the
serialized configurations.
If you ever accidentally commit your access token on GitHub, you can simply revoke that token and use a new one.
ncu-config
Configure variables for node-core-utils to use. Global variables are stored
in ~/.ncurc
while local variabels are stored in $PWD/.ncu/config
.
ncu-config <command>
Commands:
ncu-config set <key> <value> Set a config variable
ncu-config get <key> Get a config variable
ncu-config list List the configurations
Options:
--version Show version number [boolean]
--help Show help [boolean]
--global [boolean] [default: false]
git-node
A custom Git command for landing pull requests. You can run it as
git-node
or git node
. To see the help text, run git node help
.
It's a Git command, so make sure you have Git installed, of course.
Install core-validate-commit
$ npm install -g core-validate-commit
Configure your upstream remote and branch name. By default it assumes your
remote pointing to https://github.com/nodejs/node is called upstream
, and
the branch that you are trying to land PRs on is master
. If that's not the
case:
$ cd path/to/node/project
$ ncu-config set upstream your-remote-name
$ ncu-config set branch your-branch-name
$ cd path/to/node/project
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git rebase -i upstream/master # Put `edit` on every commit that's gonna stay
$ git node land --amend # Regenerate commit messages in HEAD
$ git rebase --continue # Repeat until the rebase is done
$ git node land --final # Verify all the commit messages
get-metadata
This tool is inspired by Evan Lucas's node-review, although it is a CLI implemented with the GitHub GraphQL API.
get-metadata <identifier>
Retrieves metadata for a PR and validates them against nodejs/node PR rules
Options:
--version Show version number [boolean]
--owner, -o GitHub owner of the PR repository [string]
--repo, -r GitHub repository of the PR [string]
--file, -f File to write the metadata in [string]
--check-comments Check for 'LGTM' in comments [boolean]
--max-commits Number of commits to warn [number] [default: 3]
--help, -h Show help [boolean]
Examples:
PRID=12345
# fetch metadata and run checks on nodejs/node/pull/$PRID
$ get-metadata $PRID
# is equivalent to
$ get-metadata https://github.com/nodejs/node/pull/$PRID
# is equivalent to
$ get-metadata $PRID -o nodejs -r node
# Or, redirect the metadata to a file while see the checks in stderr
$ get-metadata $PRID > msg.txt
# Using it to amend commit messages:
$ get-metadata $PRID -f msg.txt
$ echo -e "$(git show -s --format=%B)\n\n$(cat msg.txt)" > msg.txt
$ git commit --amend -F msg.txt
If you are using git bash
and having trouble with output use winpty get-metadata.cmd $PRID
.
current known issues with git bash:
PR-URL
Reviewed-By
Fixes
Refs
See CONTRIBUTING.md.
MIT. See LICENSE.
FAQs
Utilities for Node.js core collaborators
The npm package node-core-utils receives a total of 2,149 weekly downloads. As such, node-core-utils popularity was classified as popular.
We found that node-core-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.