
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
dynamic-import-no-cache
Advanced tools
according to ECMAScript, the contents of dynamic imports are cached by default.
Any subsequent call to [
import()] given the argumentsreferencingScriptOrModuleandspecifier, must return [...] a module which has already been evaluated
which means if you are using a dynamic import as part of your build process (eg. using chokidar to execute a function when a file is changed/added/deleted), then await import("/path/to/resource.js") will not fetch the updated version, rather the (cached) version that was fetched the first time that call was made.
dinc solves this by adding a cache busting timestamp param to the request, forcing node to fetch the fresh contents.
import dinc from "dynamic-import-no-cache";
const someResource = await dinc("/path/to/resource.js");
alternatively, if you don't want to install yet another node package, you can just do:
const someResource = await import(`/path/to/resource.js?${Date.now()}`);
FAQs
dynamic import with no caching
The npm package dynamic-import-no-cache receives a total of 2 weekly downloads. As such, dynamic-import-no-cache popularity was classified as not popular.
We found that dynamic-import-no-cache 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.