{"id":19372132,"url":"https://github.com/nodenv/nodenv-package-json-engine","last_synced_at":"2025-05-08T21:15:49.701Z","repository":{"id":1941224,"uuid":"45370108","full_name":"nodenv/nodenv-package-json-engine","owner":"nodenv","description":"Activate a nodenv node version from package.json#engines.node field","archived":false,"fork":false,"pushed_at":"2024-12-04T20:25:35.000Z","size":217,"stargazers_count":40,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-08T21:15:40.857Z","etag":null,"topics":["nodenv-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodenv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2015-11-02T03:27:25.000Z","updated_at":"2024-12-04T20:25:38.000Z","dependencies_parsed_at":"2025-01-03T03:07:44.460Z","dependency_job_id":"600d7c68-9fc9-40ce-8ef9-d7b9ebdae3e8","html_url":"https://github.com/nodenv/nodenv-package-json-engine","commit_stats":{"total_commits":146,"total_committers":9,"mean_commits":16.22222222222222,"dds":0.4452054794520548,"last_synced_commit":"30ff413e09592b9ec9ef5a76d768b0f23a885ba9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodenv%2Fnodenv-package-json-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodenv%2Fnodenv-package-json-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodenv%2Fnodenv-package-json-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodenv%2Fnodenv-package-json-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodenv","download_url":"https://codeload.github.com/nodenv/nodenv-package-json-engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149619,"owners_count":21861740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["nodenv-plugin"],"created_at":"2024-11-10T08:21:45.685Z","updated_at":"2025-05-08T21:15:49.676Z","avatar_url":"https://github.com/nodenv.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodenv-package-json-engine\n\n[![Latest GitHub Release](https://img.shields.io/github/v/release/nodenv/nodenv-package-json-engine?logo=github\u0026sort=semver)](https://github.com/nodenv/nodenv-package-json-engine/releases/latest)\n[![Latest npm Release](https://img.shields.io/npm/v/@nodenv/nodenv-package-json-engine)](https://www.npmjs.com/package/@nodenv/nodenv-package-json-engine/v/latest)\n[![Test](https://img.shields.io/github/workflow/status/nodenv/nodenv-package-json-engine/Test?label=tests\u0026logo=github)](https://github.com/nodenv/nodenv-package-json-engine/actions?query=workflow%3ATest)\n\nThis is a plugin for [nodenv](https://github.com/nodenv/nodenv)\nthat detects the Node version based on the [`engines`](https://docs.npmjs.com/files/package.json#engines) field of the current tree's `package.json` file. The `$NODENV_VERSION` environment variable (set with `nodenv shell`) and `.node-version` files still take precedence.\n\nWhen `engines` is configured with a range this plugin chooses the greatest installed version matching the range, or exits with an error if none match.\n\n\u003c!-- toc --\u003e\n\n- [Installation](#installation)\n  * [Installing with Git](#installing-with-git)\n  * [Installing with Homebrew](#installing-with-homebrew)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Credits](#credits)\n\n\u003c!-- tocstop --\u003e\n\n## Installation\n\n### Installing with Git\n\n```sh\n$ git clone https://github.com/nodenv/nodenv-package-json-engine.git $(nodenv root)/plugins/nodenv-package-json-engine\n```\n\n### Installing with Homebrew\n\nMac OS X users can install [many nodenv plugins](https://github.com/nodenv/homebrew-nodenv) with [Homebrew](http://brew.sh).\n\n*This is the recommended method of installation if you installed nodenv with\nHomebrew.*\n\n```sh\n$ brew tap nodenv/nodenv\n$ brew install nodenv-package-json-engine\n```\n\n## Usage\n\nOnce you've installed the plugin you can verify that it's working by `cd`ing into a project that has a `package.json` file with `engines` and does not have a `.node-version` file.  From anywhere in the project's tree, run `nodenv which node`.\n\n## Contributing\n\n`npm install` and `npm test` from within the project.\n\n## Credits\n\n`package.json` inspection and SemVer integration heavily inspired by nvmish [[1]](https://github.com/goodeggs/homebrew-delivery-eng/blob/master/nvmish.sh) [[2]](https://gist.github.com/assaf/ee377a186371e2e269a7) and [rbenv-bundler-ruby-version](https://github.com/aripollak/rbenv-bundler-ruby-version).\n\nShell semver range support provided by [sh-semver](https://github.com/qzb/sh-semver).\n\n`package.json` parsing provided by [JSON.sh](https://github.com/dominictarr/JSON.sh).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodenv%2Fnodenv-package-json-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodenv%2Fnodenv-package-json-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodenv%2Fnodenv-package-json-engine/lists"}