
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
This is a small utility to require and run modules from the command line.
npm i -D rrun
$ rrun path/to/some-module [arguments ...]
rrun will require a file and run it's default export with any arguments passed along. It can be useful for running development tasks. This way, tasks can be run directly from npm scripts or the command line, but they can also be required and run from other task files. It's not intended to run anything other than basic node modules that export a single function.
Assume we have a task to compile sass and we want to run it from npm scripts and also from our watch task.
// sass-task.js
module.exports = () => {
// do sassy stuff
};
You can use it in your watch task:
const chokidar = require('chokidar');
const sass = require('path/to/sass-task');
chokidar.watch('./src/scss/**/*.scss').on('change', sass);
And you can rrun it from your npm scripts:
"scripts": {
"sass": "rrun path/to/sass-task"
}
PSA: You can do the same thing without using rrun:
"scripts": {
"any-task": "node -e \"require('path/to/module')()\""
}
But âď¸ that is kind of ugly and co-workers may find it confusing.
FAQs
Require and run a js file with one command
We found that rrun demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: whatâs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.