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