{"id":26221737,"url":"https://github.com/push-based/nx-verdaccio","last_synced_at":"2025-07-16T11:36:33.049Z","repository":{"id":255541848,"uuid":"850314775","full_name":"push-based/nx-verdaccio","owner":"push-based","description":"Enterprise E2E setup for Nx and Verdaccio","archived":false,"fork":false,"pushed_at":"2025-06-29T17:24:09.000Z","size":2888,"stargazers_count":17,"open_issues_count":20,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-29T17:35:17.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/push-based.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2024-08-31T12:40:20.000Z","updated_at":"2025-06-29T17:24:12.000Z","dependencies_parsed_at":"2024-11-08T22:26:24.827Z","dependency_job_id":"c43ef99f-bc4e-45b8-8e77-4c1f0a12d9a2","html_url":"https://github.com/push-based/nx-verdaccio","commit_stats":null,"previous_names":["push-based/nx-verdaccio-e2e-setup","push-based/nx-verdaccio"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/push-based/nx-verdaccio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/push-based%2Fnx-verdaccio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/push-based%2Fnx-verdaccio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/push-based%2Fnx-verdaccio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/push-based%2Fnx-verdaccio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/push-based","download_url":"https://codeload.github.com/push-based/nx-verdaccio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/push-based%2Fnx-verdaccio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265506337,"owners_count":23778711,"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":[],"created_at":"2025-03-12T16:29:20.963Z","updated_at":"2025-07-16T11:36:33.025Z","avatar_url":"https://github.com/push-based.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enterprise Grade Testing with Verdaccio and Nx\n\n### 🚀 Enterprise Grade Testing with Verdaccio and Nx ⚡\n\n[![npm](https://img.shields.io/npm/v/%40push-based%2Fnx-verdaccio.svg)](https://www.npmjs.com/package/@push-based/nx-verdaccio)\n[![release date](https://img.shields.io/github/release-date/push-based/nx-verdaccio)](https://github.com/push-based/nx-verdaccio/releases)\n[![license](https://img.shields.io/github/license/push-based/nx-verdaccio)](https://opensource.org/licenses/MIT)\n[![commit activity](https://img.shields.io/github/commit-activity/m/push-based/nx-verdaccio)](https://github.com/push-based/nx-verdaccio/pulse/monthly)\n[![CI](https://github.com/push-based/nx-verdaccio/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/push-based/nx-verdaccio/actions/workflows/ci.yml?query=branch%3Amain)\n\nWelcome to the **Verdaccio Testing Environments Nx Plugin** — your one-stop solution for running **blazingly fast**, **isolated**, and **scalable** end-to-end (e2e) tests with zero configuration. Yeah, you heard that right: **ZERO configuration**.\n\nWith this plugin, say goodbye to the old days of waiting around for your tests and hello to _next-level speed_. Plug it in, and you're good to go.\n\n## Why You NEED This Plugin 🔥\n\n**Key Features:**\n\n- ⚙️ **ZERO Config** — You won’t need any global setup or teardown scripts.\n- 🔥 **BRUTALLY FAST** — Up to **⚡110x faster⚡** than traditional setups. Yes, you read that right.\n- 🛡️ **Isolated** — No more conflicts with local file systems. Everything’s clean.\n- 🚀 **Scalable** — Run your tests in parallel, no matter how big your project.\n- 🕒 **Optimized** — We cache everything we can, so your tests run faster over time.\n- ⚡ **Developer Experience** — Streamlined and simplified. You focus on the code, we handle the setup.\n- 🧪 **Easier Debugging** — Debugging e2e tests is now a piece of cake 🍰.\n\n---\n\n### 🏎️ **Speed Benchmarks** 🕒️\n\n| Small Project (4 packages)    | Common Setup | Optimized Setup | [x] times faster | [%] percent faster |\n| ----------------------------- | ------------ | --------------- | ---------------- | ------------------ |\n| **Worst Case** Execution Time | 110 s        | 13 s            | 8.46x faster     | 746%               |\n| **Best Case** Execution Time  | 110 s        | 1 s             | 110x faster      | 11000%             |\n\n### 🧪 **Test Architecture Comparison** 📐\n\n| Default Test Architecture                                              | Decoupled Test Architecture                                                      |\n| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| ![test-architecture-bad.png](docs%2Ftest-architecture--schema-bad.png) | ![test-architecture--schema-good.png](docs%2Ftest-architecture--schema-good.png) |\n\n### 🔗 **Tasks Architecture Comparison** 📐\n\n| Default Task Architecture                                              | Decoupled Task Architecture                                                      |\n| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| ![task-architecture-bad.png](docs%2Ftask-architecture--schema-bad.png) | ![task-architecture--schema-good.png](docs%2Ftask-architecture--schema-good.png) |\n\n### 🔗 **Testing Dx Comparison** 🤓\n\n| Default Testing Dx                                               | Cacheable Testing Dx                                               |\n| ---------------------------------------------------------------- | ------------------------------------------------------------------ |\n| ![testing-dx--schema-bad.png](docs%2Ftesting-dx--schema-bad.png) | ![testing-dx--schema-good.png](docs%2Ftesting-dx--schema-good.png) |\n\n### 🔗 **Debug Dx Comparison** 🐞\n\n| Default Debug Dx                                             | Excellent Debug Dx                                             |\n| ------------------------------------------------------------ | -------------------------------------------------------------- |\n| ![debug-dx--schema-bad.png](docs%2Fdebug-dx--schema-bad.png) | ![debug-dx--schema-good.png](docs%2Fdebug-dx--schema-good.png) |\n\n---\n\n## Getting Started 🏁\n\n### Step 1: Register and Configure in `nx.json`:\n\n```jsonc\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"@push-based/nx-verdaccio\",\n      \"options\": {\n        \"environments\": {\n          \"environmentsDir\": \"tmp/environments\", // Optional\n          \"targetNames\": [\"e2e\"] // Optional\n        }\n      }\n    }\n  ]\n}\n```\n\n\u003e [!NOTE]\n\u003e Your configured targets now has a new dependency configured:\n\u003e\n\u003e ```jsonc\n\u003e {\n\u003e   \"name\": \"utils-e2e\",\n\u003e   \"targets\": {\n\u003e     \"e2e\": {\n\u003e       \"dependsOn\": [\n\u003e         // dynamically added\n\u003e         { \"target\": \"env-setup\", \"params\": \"forward\" }\n\u003e       ]\n\u003e       // ...\n\u003e     }\n\u003e   }\n\u003e   // ...\n\u003e }\n\u003e ```\n\n### Optional: Add the Package Under Test as implicitDependencies\n\nLet the plugin detect your implicit dependencies:\n\n```jsonc\n// projects/utils-e2e/project.json\n{\n  \"name\": \"utils-e2e\",\n  \"implicitDependencies\": [\"utils\"]\n}\n```\n\n### Step 3: Run the E2E Test\n\n```bash\nnx run utils-e2e:e2e\n```\n\nTadaaaa! 🎉 You’re now testing at light speed!\n\n## Configuration Options 🛠️\n\n| Name                             | type                                    | description                                                    |\n| -------------------------------- | --------------------------------------- | -------------------------------------------------------------- |\n| **environments.environmentsDir** | `string` (DEFAULT `'tmp/environments'`) | Directory for environment storage.                             |\n| **environments.targetNames**     | `string[]` (REQUIRED)                   | Target names for environment-based projects.                   |\n| **environments.filterByTag**     | `string[]` (REQUIRED)                   | Only consider projects with these tags for environment setup.  |\n| **publishable.filterByTag**      | `string[]` (REQUIRED)                   | Only consider projects with these tags for publishing targets. |\n\n### Fine-Grained Control for Publishable Projects 🚀\n\nOut of the box, all library-type projects get these targets:\n\n- `nx-verdaccio--pkg-publish`\n- `nx-verdaccio--pkg-install`\n\nBut if you want to narrow it down:\n\n```jsonc\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"@push-based/nx-verdaccio\",\n      \"options\": {\n        \"packages\": {\n          \"filterByTags\": [\"publishable\"]\n        }\n      }\n    }\n  ]\n}\n```\n\nTag your projects accordingly:\n\n```jsonc\n// projects/utils/project.json\n{\n  \"name\": \"utils\",\n  //\n  \"tags\": [\"publishable\"]\n  // ...\n}\n```\n\n### Custom Test Environment Setup 🧪\n\n#### Filter by target names\n\nWant more control over which projects get their environments set up?\n\n```jsonc\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"@push-based/nx-verdaccio\",\n      \"options\": {\n        \"environments\": {\n          \"targetNames\": [\"e2e\", \"e2e-static\"]\n        }\n      }\n    }\n  ]\n}\n```\n\n### Filter by tags\n\nFilter projects by tags to apply environment setup:\n\n```jsonc\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"@push-based/nx-verdaccio\",\n      \"options\": {\n        \"environments\": {\n          \"filterByTags\": [\"npm-env\"]\n        }\n      }\n    }\n  ]\n}\n```\n\nTag those projects accordingly:\n\n```jsonc\n// projects/utils/project.json\n{\n  \"name\": \"lib-e2e\",\n  //\n  \"tags\": [\"npm-env\"]\n  // ...\n}\n```\n\n**Example Usage:**\n\n- Run the E2E test for`utils-e2e`:  \n  `nx run utils-e2e:e2e`\n- Run E2E with specific environments:  \n  `nx run utils-static-e2e:e2e --environmentRoot static-environments/user-lists`\n\n### Customize inferred target names\n\nThe inferred Nx targets are prefixed by `nxv-`, e.g. `nxv-e2e` will run your test target (by default `e2e`) and ensure cleanup is done afterwards (`nxv-teardown`).\nOther inferred targets include `nxv-env-setup`, `nxv-env-bootstrap`, `nxv-env-install`, `nxv-pkg-install`, `nxv-verdaccio-start`, etc.\nYou can find all these targets in the Nx graph (run `npx nx graph`).\n\nYou may prefer to infer different target names, e.g. so you can run `e2e-test` instead of `nxv-e2e`. All target names may be customized for both environment and package targets.\n\n```jsonc\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"@push-based/nx-verdaccio\",\n      \"options\": {\n        \"environments\": {\n          \"inferredTargets\": {\n            \"e2e\": \"e2e-test\", // default is \"nxv-e2e\"\n            \"setup\": \"e2e-test-setup\" // default is \"nxv-e2e-setup\"\n          }\n        },\n        \"packages\": {\n          \"inferredTargets\": {\n            \"install\": \"npm-install\" // default is \"nxv-pkg-install\"\n          }\n        }\n      }\n    }\n  ]\n}\n```\n\n## Benchmarks\n\nThis is a first draft of how the benchmarks will look. ATM the data set it not big enough.\n\n\u003e ⚠️\n\u003e The data is a first draft of the structure and does not reflect a clean data set.\n\u003e Work on the real benchmark data in progress\n\n|            cli:e2e            | Common | Optimized | [x] times faster  | [%] percent faster |\n| :---------------------------: | :----: | :-------: | :---------------: | :----------------: |\n| Execution Time - _Worse case_ | 110 s  |   13 s    | 8.46 times faster |        746%        |\n| Execution Time - _Best case_  | 110 s  |    1 s    |        110        |       11000%       |\n|        Download Volume        | 381 MB |  381 MB   |        0%         |         0%         |\n|           Cacheable           |   ❌   |    ✅     |        n/a        |        n/a         |\n|          Graph Nodes          |   1    |    13     |        n/a        |        n/a         |\n|          Parallelism          |   ❌   |    ✅     |        n/a        |        n/a         |\n\n## Next Steps\n\n- [Configure cacheable environments](./docs/benefits.md#-task-performance---optimized-execution)\n- [Configure Static environments](./projects/nx-verdaccio/docs/static-environments.md)\n- [Debugging](./projects/nx-verdaccio/README.md#debugging-e2e-environments)\n\n## Stay Connected! 🔗\n\n- [Check out our services](https://push-based.io)\n- [Follow us on Twitter](https://twitter.com/pushbased)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpush-based%2Fnx-verdaccio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpush-based%2Fnx-verdaccio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpush-based%2Fnx-verdaccio/lists"}