A proxy for the NPM registry that hides package versions released after a specified date.
Start the proxy with a specified date.
./nptm --port=9000 --date=2021-12-05
Switch to a Node.js version for that date.
nvm install 12
nvm use 12
Or if you are using a project-wide .nvmrc, just run
nvm use.
Check your current registry URL and save it (to restore later).
npm config get registry
Set the proxy as your NPM registry.
npm config set registry http://localhost:9000/
Create an .npmrc file in your project with the proxy
URL.
registry=http://localhost:9000/
Now you can run npm install for your project.
Dependencies will be resolved as of the specified date.
You need Go installed to build this project.
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o nptm .
MIT