{"id":24530078,"url":"https://github.com/debopamsengupta/requirey","last_synced_at":"2025-04-14T17:38:13.464Z","repository":{"id":57354439,"uuid":"82079414","full_name":"debopamsengupta/requirey","owner":"debopamsengupta","description":"Intelligent multi-version dependency management for npm packages","archived":false,"fork":false,"pushed_at":"2017-06-02T15:27:32.000Z","size":25,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-15T13:10:27.808Z","etag":null,"topics":["dependency-manager","multi-version","npm","package","require"],"latest_commit_sha":null,"homepage":"","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/debopamsengupta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T16:09:10.000Z","updated_at":"2023-03-05T05:36:46.000Z","dependencies_parsed_at":"2022-09-12T05:41:22.094Z","dependency_job_id":null,"html_url":"https://github.com/debopamsengupta/requirey","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debopamsengupta%2Frequirey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debopamsengupta%2Frequirey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debopamsengupta%2Frequirey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debopamsengupta%2Frequirey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debopamsengupta","download_url":"https://codeload.github.com/debopamsengupta/requirey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235082224,"owners_count":18932920,"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":["dependency-manager","multi-version","npm","package","require"],"created_at":"2025-01-22T07:53:32.769Z","updated_at":"2025-01-22T07:53:33.314Z","avatar_url":"https://github.com/debopamsengupta.png","language":"JavaScript","readme":"[![npm version](https://img.shields.io/npm/v/requirey.svg)](https://www.npmjs.com/package/requirey)\n[![Build Status](https://img.shields.io/travis/debopamsengupta/requirey.svg)](https://travis-ci.org/debopamsengupta/requirey)\n[![Windows Build Status](https://img.shields.io/appveyor/ci/debopamsengupta/requirey/master.svg?label=appveyor)](https://ci.appveyor.com/project/debopamsengupta/requirey)\n\n![Logo](https://www.dropbox.com/s/a89s7cegzye0d79/requirey.png?dl=1)\n\nIntelligent multi-version dependency management for npm packages.\n\n### Install\n`npm install --save requirey`\n\n### Usage\n\n- #### Initialize \n\n```js\nconst ry = require('requirey')(config, options);\n```\n`config` - object of module names mapped to arrays of supported versions   \n`options` - extra options to override default behaviors like `strict`\n\n**Default behavior is strict mode enabled which will always use config to determine which versions can be installed and required**\n\n**Strict mode will ignore version overrides for require calls**\n\neg: \n```js\n{\n  \"lodash\": ['1.0.0', '2.1.2'],\n  ...\n}\n```\n\n- #### Install\n\n```js\nry.installAll();\n```\nor\n```js\nry.install('lodash');\n// or\nry.install('lodash', '1.0.0');\nry.install('lodash', '2.0.0');\n```\n\n- #### Require\n\n```js\nconst requirer = new ry.Requirer(pkgJson);\n\nrequirer.require('lodash'); // ==\u003e highest possible version supported\nrequirer.require('lodash@1.0.0'); // ==\u003e version 1.0.0\nrequirer.require('lodash', '^2.0.0'); // ==\u003e highest version in the range between 2.0.0 and 3.0.0\nrequirer.require('lodash', '~2.2.0'); // ==\u003e highest version in the range between 2.2.0 to 2.3.0\nrequirer.require('lodash/fp/curry'); // ==\u003e require sub-paths from auto-detected version\nrequirer.require('lodash@3.0.0/array/chunk'); // ==\u003e require sub-paths from particular version\n```\n\nThe `require` method also takes an optional third parameter:\n\n`force` - boolean ==\u003e Forces a require call for a particular version\n\n```js\nrequirer.require('lodash', '4.0.0', true);\n```\n\n#### Built Using\n\n- [npm-install-version](https://www.npmjs.com/package/npm-install-version)\n- [semver](https://www.npmjs.com/package/semver)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebopamsengupta%2Frequirey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebopamsengupta%2Frequirey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebopamsengupta%2Frequirey/lists"}