
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
dl6.require() delay the loading until the first time you call it.
dl6.require() reload your module automatically when the module is modified !
We use the es6 proxy and fs.watch() to implement the dl6 package.
$ npm i dl6
File: dl6ex.js
const dl6 = require('dl6')
const fs = require('fs')
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
async function main () {
fs.writeFileSync('cat.js', `
module.exports = {
say: () => 'meow'
}
`)
const cat = dl6.dload(__dirname, 'cat')
console.log('cat=', cat)
console.log(cat.say())
console.log('cat=', cat)
fs.writeFileSync('cat.js', `
module.exports = {
say: () => 'hello'
}
`)
await sleep(1000)
console.log(cat.say())
dl6.end()
}
main().catch((error) => console.log(error))
Run:
$ node dl6ex.js
cat= {}
call D:\ccc\code\js\dl6\example\cat : say
meow
cat= { say: [Function: say] }
call D:\ccc\code\js\dl6\example\cat : say
hello
FAQs
Dynamic Loading Module (by ES6 Proxy)
The npm package dl6 receives a total of 1 weekly downloads. As such, dl6 popularity was classified as not popular.
We found that dl6 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.