{"adoption": {"forks": 128, "observed_at": "2026-08-28T04:07:42.430479+00:00", "stars": 3093}, "canonical_url": "https://ross.abutalabs.com/products/rewire", "card": {"archived": false, "artifact_type": "library", "description": "Easy monkey-patching for node.js unit tests", "domain": ["testing", "developer-tools", "backend"], "enriched": true, "function": ["mocking", "testing"], "health_score": 68, "homepage": null, "language": "JavaScript", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["jhnns/rewire"], "name": "jhnns/rewire", "platform": [], "pushed_at": "2025-12-11T21:43:31+00:00", "repo": "jhnns/rewire", "stars": 3093, "tags": ["monkey-patching", "dependency-injection", "unit-testing", "commonjs", "nodejs", "javascript"], "topics": ["mock", "testing", "unit-testing", "monkey-patching"], "urls": [], "use_cases": ["inject mocks for required modules like fs in unit tests", "inspect and override private variables of a module", "mock globals like process or console within a single module", "revert monkey-patched changes after a test runs", "test node.js modules with hard-to-mock dependencies"], "what_it_is": "rewire is a Node.js library that adds special setter and getter methods to CommonJS modules so tests can inject mocks, override private variables, and patch globals. It acts like require() but exposes __set__, __get__, and __with__ for modifying module internals during unit tests.", "when_to_avoid": ["your project uses ES modules, which rewire does not support", "you prefer dependency injection via constructor parameters or a DI framework", "you want modern alternatives like proxyquire or esm mocking"], "when_to_choose": ["you test CommonJS Node.js modules and need to stub their internal dependencies", "you want to access or override module-private variables in tests", "you need scoped global mocking that doesn't leak to other modules"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/rewire", "repo": "jhnns/rewire", "role": "main", "score": 56}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:07:42.430479+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T07:27:19.162116+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "7690f364a408a994fde0498dd964579ab0bb9f4aea878be5fbacead5df0062c2", "fetched_at": "2026-08-28T04:07:42.430479+00:00", "kind": "readme", "missing": false, "url": "https://github.com/jhnns/rewire"}, {"content_hash": "bf9c7b9aadeb12e2fc8f6d913c33901142d9427719ba6255e546483dc42a344f", "fetched_at": "2026-08-29T09:42:46.436705+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/rewire"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 56, "longevity": 100, "rhythm": 31}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 5204, "days_push": 265, "days_rel": 383, "gap_med": 36.0, "n_releases_24m": 3}, "score": 56, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}