
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.
package-light
Advanced tools
to reduce time you spent waiting your docker image is being built.
npm i -d package-light
or
yarn add --dev package-light
.git-ignore filepackage-light.json
package-light-lock.json
pre script for building docker image npx package-light which generate package-light.json and package-light-lock.json in case your use npm.somewhere in your package.json
"scripts": {
"prebuild:docker": "npx package-light", // generate `package-light.json` and `package-light-lock.json` (if needed)
"build:docker": "docker build -t my-image-tag .", // your command to build docker image
}
FROM node:12.13
# Install app dependencies
COPY ./package-light.json ./package.json
COPY ./package-light-lock.json ./package-lock.json
RUN npm i
## <-- this layer is cached until your dependencies change
# App source
COPY . .
# do your stuff here
FROM node:12.13
# Install app dependencies
COPY package-light.json package.json
COPY yarn.lock ./
RUN yarn
## <-- this layer is cached until your dependencies change
# App source
COPY . .
# do your stuff here
This will greatly help to cache dependencies layer. After dependencies are installed you should copy the rest files and may override package-light.json with original package.json you may change your scripts, package version or other fields in your package json, it does not matter, dependencies layer remain unchanged.
// TODO:
FAQs
cut only package dependencies to package-light.json
We found that package-light 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.