{"id":21339848,"url":"https://github.com/webextensions/npm-install-quick","last_synced_at":"2026-02-28T13:12:48.727Z","repository":{"id":33210418,"uuid":"154955627","full_name":"webextensions/npm-install-quick","owner":"webextensions","description":"Script for quick npm installation (archive node_modules directory and reuse). Helpful when you work on multiple branches.","archived":false,"fork":false,"pushed_at":"2025-11-29T14:29:50.000Z","size":361,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-01T15:38:41.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/npm-install-quick","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webextensions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-10-27T11:13:34.000Z","updated_at":"2025-11-29T14:29:53.000Z","dependencies_parsed_at":"2024-04-24T22:46:03.222Z","dependency_job_id":null,"html_url":"https://github.com/webextensions/npm-install-quick","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.4,"last_synced_commit":"2a6806e1c3337154267cf8879e8b6051cac95a6b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/webextensions/npm-install-quick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webextensions%2Fnpm-install-quick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webextensions%2Fnpm-install-quick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webextensions%2Fnpm-install-quick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webextensions%2Fnpm-install-quick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webextensions","download_url":"https://codeload.github.com/webextensions/npm-install-quick/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webextensions%2Fnpm-install-quick/sbom","scorecard":{"id":1240164,"data":{"date":"2025-11-24","repo":{"name":"github.com/webextensions/npm-install-quick","commit":"1326ccb839548898a61bb0dff79f3320628b5617"},"scorecard":{"version":"v5.4.1-0.20251125161513-488797dbe611","commit":"488797dbe611ab7e16f12d88185cde5e8dc28aca"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: https://osv.dev/GHSA-5j98-mcp5-4vw2","Warn: Project is vulnerable to: https://osv.dev/GHSA-mh29-5h37-fv8m"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#sast"}}]},"last_synced_at":"2025-12-03T11:11:35.868Z","repository_id":33210418,"created_at":"2025-12-03T11:11:35.868Z","updated_at":"2025-12-03T11:11:35.868Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29935102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:00:17.143Z","status":"ssl_error","status_checked_at":"2026-02-28T12:59:13.669Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T00:47:43.309Z","updated_at":"2026-02-28T13:12:48.706Z","avatar_url":"https://github.com/webextensions.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-install-quick\nScript for quick npm installation (archive **node_modules** directory and reuse). Helpful when you work on multiple branches.\n\n---\n\n**Please note**  \nThis functionality has been tested only in Linux environment. In case it doesn't run properly for your OS/environment, kindly create a new issue.\n\n---\n\n## Installation and usage\n\nThere are two ways to install **npm-install-quick** :  \n* globally (as an executable)\n* manually (add it only to a specific project)\n\n### Global installation and usage\n\n```sh\n$ npm install -g npm-install-quick\n```\n\n```sh\n$ npm-install-quick\n\n  OR\n\n$ npmiq\n```\n\n### Manual setup and usage\n\n* Access the source code from https://github.com/webextensions/npm-install-quick\n* Copy the following files / directories into your project:\n  * **npm-install-quick**\n  * **node_modules-archive** (If you wish to use that folder for backup, which is specified in **npm-install-quick/npm-install-quick.js**)\n  * **npmiq.sh** (If you wish to use that helper command)\n* Run it via one of the following executable files:\n  * `$ ./npm-install-quick/npm-install-quick.js`\n  * `$ ./npmiq.sh`\n\n## Pain point (which this project aims to help you with)\nIn a Node JS project, you need to jump between branches, which often leads to the need of running npm install again and again. It costs a good amount of time.\n\n## Assumptions / Recommendations\n* Use Node JS version 8 or newer\n* Use npm version 5 or newer\n\n## Solution\nRather than using `$ npm install` , use `$ npm-install-quick` as provided by this project.\n\n## How it works\nWhen you run `$ npm-install-quick` :\n* It would first try to find if there is an archived backup for the expected **node_modules** contents stored in a configured directory (eg: **/var/tmp/npm-install-quick/archive**)\n* If a backup is available, it would be restored into the project's **node_modules** directory and that's it (on SSD disks, it would usually take around 1 to 10 seconds for most of the projects)\n* If a backup was not available, the script internally runs `$ npm ci` or `$ npm install` or `$ npm install --no-package-lock`\n* Once the contents in **node_modules** directory are updated successfully, a compressed backup file would be created in the directory configured for archiving\n\n## Parameters\n* `--must-have-package-lock`  \n  Ensures that **package-lock.json** exists\n* `--package-lock-must-be-in-sync-when-available`  \n  Ensures that **package.json** and **package-lock.json** are in sync (when available)\n* `--ignore-node-nvmrc-mismatch`  \n  If `.nvmrc` file exists (with simple number format), then, the current Node JS version in use must match it\n\n## Important files and directories\n### Code:\n* **./npm-install-quick/lib/**  \n  The files in this directory contain the core functionality code\n* **./npm-install-quick/npm-install-quick.js**  \n  This file contains a general purpose configuration and usage example\n* **./npmiq.sh**  \n  This file contains a general purpose usage example (calls **./npm-install-quick/npm-install-quick.js**)\n\n### Backup directory:\n* **/var/tmp/npm-install-quick/archive**  \n  Use such a path in configuration to keep the archived **node_modules** contents in a shared temporary directory\n* **./node_modules-archive/archive**  \n  Use such a path in configuration to keep the archived **node_modules** contents within the project directory\n\n## Notes\n* Since this would occupy a little extra disk space for each new backup, which may reach to a significant amount over time, you are updated about the size occupied by this archive directory on every repeated install and a warning would be shown when your free disk space is less than a threshold (default threshold: 10GB).\n* If this script is executed in VirtualBox like environments with dynamic size disk file, it might lead to unnecessary disk usage over time, so, it is not recommended for such a case. As a workaround on such environments, one would need to update some of the required paths which use partition via fixed size disk file or paths shared by host machine.\n\n## Similar npm packages\n* have-it @ https://github.com/bahmutov/have-it\n* inst @ https://github.com/runk/node-inst\n* npm-fast-install @ https://github.com/appcelerator/npm-fast-install\n* strong-cached-install @ https://github.com/strongloop/strong-cached-install\n\n## TODO\n* Use console coloring/styling (eg: via **chalk**/**boxen**), when packages for that are available\n* Check that the script works across various environments / operating systems\n* When restoring, extract the **node_modules** contents to a temporary directory first and then only do `$ rm -rf node_modules`, followed by renaming that temporary directory to **node_modules**\n* When archiving a backup, pipe it to a temporary file name and once that operation is complete, rename it to the target filename. This would avoid race condition if multiple executions of this script attempt to write to the same file at the same time.\n* Add more configuration options for compressing the files. For exmaple: higher compression ratio to save disk space, or faster compression to save time, or possibly a combination of both (by running compression task in background)\n* Add the **npm** version as a stakeholder for generating hash for the backup file\n* Add some options to suggest cleaning or automatically cleaning old backups\n* Add support for **yarn**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebextensions%2Fnpm-install-quick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebextensions%2Fnpm-install-quick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebextensions%2Fnpm-install-quick/lists"}