diff --git a/e2e-examples/cli-e2e-original/README.md b/e2e-examples/cli-e2e-original/README.md deleted file mode 100644 index 228def13..00000000 --- a/e2e-examples/cli-e2e-original/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# cli-e2e-original - -End-to-end tests for the `cli` library. - -## Included plugins - -- `tools/plugins/original.plugin.ts` - -### Dynamic targets generated by the plugin - -- `workspace-source` - - targets - - `local-registry` -- `cli-e2e-original` - - targets - - `e2e` -- `models`,`utils`,`core`,`cli` - - tags - - `publishable` - - targets - - `original-npm-publish` - - `original-npm-install` - - `original-npm-uninstall` - -## Running the tests - -- `nx e2e cli-e2e-original` - run E2E tests for the `cli-e2e-original` library. - - run vitest setup - `e2e/cli-e2e-original/setup/global-setup.ts#setup` - - `nx local-registry --storage` - - `nx run-many --targets=original-npm-publish` - - `nx run-many --targets=original-npm-install` - - run tests - - run vitest teardown - `e2e/cli-e2e-original/setup/global-setup.ts#teardown` - - stop server - - delete folder - -```mermaid -flowchart TB -pkg-e2e:e2e-. programmatic .->pkg-e2e:start-verdaccio; -pkg-e2e:start-verdaccio-. programmatic .->pkg-e2e:run-many-npm-publish; -pkg-e2e:run-many-npm-publish-. programmatic .->pkg-e2e:run-many-npm-install; -pkg-e2e:run-many-npm-install-->pkg-1:npm-install -pkg-e2e:run-many-npm-install-->pkg-2:npm-install -pkg-1:npm-publish-->pkg-1:build; -pkg-2:npm-publish-->pkg-2:build; -pkg-2:npm-publish-->pkg-1:npm-publish; -pkg-2:npm-publish-->pkg-1:build; -pkg-2:npm-install-. programmatic .->pkg-2:npm-publish -pkg-1:npm-install-. programmatic .->pkg-1:npm-publish -``` - -### Changed or generated files during e2e - -```sh -User/ - └── / - ├── .npmrc # 🔓 added registry and token entry to OS user specific npm config - └──Root/ # 👈 this is your CWD - ├── node_modules/ - │ └── - │ └── /... # 🔓 npm install installs into repository folder - ├── dist/ - │ └── packages/ - │ └── /... - ├── tmp/ - │ └── local-registry/ # 😓 hard to debug a dynamic port - │ ├── storage/... - │ │ └── - │ │ └── /... # nx nx-release-publish saves the package's tarball here - │ └── /... - │ └── /... - ├── package-lock.json # 🔓 npm install/uninstall installs into workspace root - └── package.json # 🔓 npm install/uninstall installs into workspace root -``` - -## Troubleshooting - -### Is my environment free up from any artefacts from previous runs? - -1. Check if any package is installed from previouse runs - - run `npm ls ` to see if the package is installed in your workspace - Example output: - -```sh -@org/source@0.0.0 /Users// -└── /@0.0.1 # 👈 this is a potential left over package from your e2e test -``` - -1. 1. Remove the package from your workspace - - run `nx run-many -t original-npm-uninstall` to remove the package from your workspace - Example output of clean `npm ls ` run: - -```sh -@org/source@0.0.0 /Users// -└── (empty) -``` - -### Is my environment free up from any configuration from previous runs? - -1. Check if your environment is clean - - run `npm config list -ls` to see if there are any unexpected registries or tokens in any of your config files - Example Output: - -```sh -; "default" config from default values -# ... -metrics-registry = "http://localhost:4873/" -prefix = "/usr/local" -# ... -; registry = "https://registry.npmjs.org/" ; overridden by user -# ... -userconfig = "/Users/michael_hladky/.npmrc" -# ... -; "user" config from /Users/michael_hladky/.npmrc - -registry = "http://localhost:4873/" # 👈 this is a potential left over configuration form your e2e test - -; "cli" config from command line options - -# ... -``` - -- Clean potential entries from your OS user specific npm config - - `npm config delete registry` - - `npm config delete :_authToken` - -Example output after cleanup: - -```sh -; "default" config from default values - -# ... -metrics-registry = "https://registry.npmjs.org/" -prefix = "/usr/local" -registry = "https://registry.npmjs.org/" -# ... -userconfig = "/Users/michael_hladky/.npmrc" -# ... -; "cli" config from command line options - -# ... -``` - -### Is Verdaccio server running correctly? - -While the tests are running you can open your browser and visit http://localhost:/ to see the Verdaccio web interface. - -To start it manually do the following steps: - -1. Start local registry manually with `nx local-registry --verbose` - logs port -2. 1. Run `npm config list -ls` to see if the registry and auth token are configured correctly - Example output with correct configuration: - -```sh -; "default" config from default values -# ... -metrics-registry = "http://localhost:4873/" -prefix = "/usr/local" -# ... -; registry = "https://registry.npmjs.org/" ; overridden by user -# ... -userconfig = "/Users/michael_hladky/.npmrc" -# ... -; "user" config from /Users/michael_hladky/.npmrc - -//localhost:4874/:_authToken = (protected) # 👈 this is the auth token for your Verdaccio registry -registry = "http://localhost:4873/" # 👈 this the default registry - -; "cli" config from command line options - -# ... -``` - -2. 2. Check if a package is published with `nx npm-check --registry=http://localhost:4873` - Example of an empty web interface: - -### Is my e2e script publishing to the right registry? diff --git a/e2e/cli-e2e/README.md b/e2e/cli-e2e/README.md deleted file mode 100644 index f86802dd..00000000 --- a/e2e/cli-e2e/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# cli-e2e - -End-to-end tests for the `cli-e2e` library. - -## Running the tests - -- 🧰 `nx setup-env cli-e2e` - - 💾 _outputs:_ [`tmp/e2e/cli-e2e`] - - 🌐 `nx setup-npm-env cli-e2e` - - ▶️ start Verdaccio server - - 📑 init workspace folder - - 📦 `nx install-deps cli-e2e` - - 🧼 `nx teardown-npm-env cli-e2e` - - 🛑 stop Verdaccio server - - 🗑 delete storage folder -- 🔬 `nx run cli-e2e:e2e` - **👈 your entered command** - - _dependsOn:_ [`setup-env:cli-e2e`] - - 🧪run tests - - -- 🧰 `nx setup-env cli-e2e` - - _outputs:_ [`tmp/e2e/cli-e2e`] 💾 - - 🌐 `nx setup-npm-env cli-e2e` - - start Verdaccio server - - init workspace folder - - 📦 `nx install-deps cli-e2e` - - 🧼 `nx teardown-npm-env cli-e2e` - - stop Verdaccio server - - delete storage folder -- 🔬 `nx run cli-e2e:e2e` - **👈 your entered command** - - _dependsOn:_ [`setup-env:cli-e2e`] - - run tests - - -```mermaid -flowchart TB -pkg-e2e:e2e-. programmatic .->pkg-e2e:setup-npm-env; -pkg-e2e:setup-npm-graph-. programmatic .->pkg-e2e:run-many-npm-publish; -pkg-e2e:run-many-npm-publish-. programmatic .->pkg-e2e:run-many-npm-install; -pkg-e2e:run-many-npm-install-->pkg-1:npm-install -pkg-e2e:run-many-npm-install-->pkg-2:npm-install -pkg-1:npm-publish-->pkg-1:build; -pkg-2:npm-publish-->pkg-2:build; -pkg-2:npm-publish-->pkg-1:npm-publish; -pkg-2:npm-publish-->pkg-1:build; -pkg-2:npm-install-. programmatic .->pkg-2:npm-publish -pkg-1:npm-install-. programmatic .->pkg-1:npm-publish -``` - -### Changed or generated files during e2e - -```sh -Root/ # 👈 this is your CWD -├── dist/ -│ └── packages/ -│ └── /... -└── tmp/ - └── e2e/ - └── / # e2e setup - ├── storage/... # npm publish/unpublish - ├── node_modules/ - │ └── - │ └── /... # npm install/uninstall - ├── __test__/... - │ └── /... # e2e beforeEach - │ └── /... - ├── .npmrc # local npm config configured for project specific verdaccio registry - ├── package-lock.json # npm install/uninstall - └── package.json # npm install/uninstall -``` - -### Troubleshooting - -- `nx start-server` -- `nx start-server ` -- `nx start-server --storage tmp/e2e//storage` -- `nx start-env` -- `nx start-env --workspaceRoot tmp/e2e/` -- `nx npm-publish --envProject=` -- `nx run-many -t npm-publish --envProjectName=cli-e2e` -- `nx npm-install --envProject=` -- `nx run-many -t npm-install --envProjectName=cli-e2e` diff --git a/e2e/core-e2e/README.md b/e2e/core-e2e/README.md deleted file mode 100644 index 7ecc0a39..00000000 --- a/e2e/core-e2e/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# core-e2e - -End-to-end tests for the `core-e2e` library. - -## Included plugins - -- `tools/plugins/env.plugin.ts` - -### Dynamic targets generated by the plugin - -- `workspace-source` - - targets - - `graph-start-verdaccio` - - `graph-setup-npm-env` -- `core-e2e` - - targets - - `e2e` -- `models`,`utils`,`core`,`cli` - - tags - - `publishable` - - targets - - `graph-npm-publish` - - `graph-npm-install` - - `graph-npm-uninstall` - -## Running the tests - -- `nx e2e core-e2e` - run E2E tests for the `core-e2e` library. - - run vitest setup - `e2e/core-e2e/setup/global-setup.ts#setup` - - `nx graph-setup-npm-env core-e2e` - - `nx run-many --targets=graph-npm-publish` - - `nx run-many --targets=graph-npm-install` - - run tests - - run vitest teardown - `e2e/core-e2e/setup/global-setup.ts#teardown` - - stop server - - delete folder - -```mermaid -flowchart TB -pkg-e2e:e2e-. programmatic .->pkg-e2e:setup-npm-env; -pkg-e2e:setup-npm-graph-. programmatic .->pkg-e2e:run-many-npm-publish; -pkg-e2e:run-many-npm-publish-. programmatic .->pkg-e2e:run-many-npm-install; -pkg-e2e:run-many-npm-install-->pkg-1:npm-install -pkg-e2e:run-many-npm-install-->pkg-2:npm-install -pkg-1:npm-publish-->pkg-1:build; -pkg-2:npm-publish-->pkg-2:build; -pkg-2:npm-publish-->pkg-1:npm-publish; -pkg-2:npm-publish-->pkg-1:build; -pkg-2:npm-install-. programmatic .->pkg-2:npm-publish -pkg-1:npm-install-. programmatic .->pkg-1:npm-publish -``` - -### Changed or generated files during e2e - -```sh -Root/ # 👈 this is your CWD -├── dist/ -│ └── packages/ -│ └── /... -└── tmp/ - └── e2e/ - └── / # e2e setup - ├── storage/... # npm publish/unpublish - ├── node_modules/ - │ └── - │ └── /... # npm install/uninstall - ├── __test__/... - │ └── /... # e2e beforeEach - │ └── /... - ├── .npmrc # local npm config configured for project specific verdaccio registry - ├── package-lock.json # npm install/uninstall - └── package.json # npm install/uninstall -``` - -### Troubleshooting - -- `nx start-server` -- `nx start-server ` -- `nx start-server --storage tmp/e2e//storage` -- `nx start-env` -- `nx start-env --workspaceRoot tmp/e2e/` -- `nx npm-publish --envProject=` -- `nx run-many -t npm-publish --envProjectName=core-e2e` -- `nx npm-install --envProject=` -- `nx run-many -t npm-install --envProjectName=core-e2e` diff --git a/e2e/models-e2e/README.md b/e2e/models-e2e/README.md deleted file mode 100644 index 6e659710..00000000 --- a/e2e/models-e2e/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# models-e2e - -End-to-end tests for the `models-e2e` library. - -## Included plugins - -- `tools/plugins/env.plugin.ts` - -### Dynamic targets generated by the plugin - -- `workspace-source` - - targets - - `graph-start-verdaccio` - - `graph-setup-npm-env` -- `models-e2e` - - targets - - `e2e` -- `models`,`utils`,`core`,`cli` - - tags - - `publishable` - - targets - - `graph-npm-publish` - - `graph-npm-install` - - `graph-npm-uninstall` - -## Running the tests - -- `nx e2e models-e2e` - run E2E tests for the `models-e2e` library. - - run vitest setup - `e2e/models-e2e/setup/global-setup.ts#setup` - - `nx graph-setup-npm-env models-e2e` - - `nx run-many --targets=graph-npm-publish` - - `nx run-many --targets=graph-npm-install` - - run tests - - run vitest teardown - `e2e/models-e2e/setup/global-setup.ts#teardown` - - stop server - - delete folder - -```mermaid -flowchart TB -pkg-e2e:e2e-. programmatic .->pkg-e2e:setup-npm-env; -pkg-e2e:setup-npm-graph-. programmatic .->pkg-e2e:run-many-npm-publish; -pkg-e2e:run-many-npm-publish-. programmatic .->pkg-e2e:run-many-npm-install; -pkg-e2e:run-many-npm-install-->pkg-1:npm-install -pkg-e2e:run-many-npm-install-->pkg-2:npm-install -pkg-1:npm-publish-->pkg-1:build; -pkg-2:npm-publish-->pkg-2:build; -pkg-2:npm-publish-->pkg-1:npm-publish; -pkg-2:npm-publish-->pkg-1:build; -pkg-2:npm-install-. programmatic .->pkg-2:npm-publish -pkg-1:npm-install-. programmatic .->pkg-1:npm-publish -``` - -### Changed or generated files during e2e - -```sh -Root/ # 👈 this is your CWD -├── dist/ -│ └── packages/ -│ └── /... -└── tmp/ - └── e2e/ - └── / # e2e setup - ├── storage/... # npm publish/unpublish - ├── node_modules/ - │ └── - │ └── /... # npm install/uninstall - ├── __test__/... - │ └── /... # e2e beforeEach - │ └── /... - ├── .npmrc # local npm config configured for project specific verdaccio registry - ├── package-lock.json # npm install/uninstall - └── package.json # npm install/uninstall -``` - -### Troubleshooting - -- `nx start-server` -- `nx start-server ` -- `nx start-server --storage tmp/e2e//storage` -- `nx start-env` -- `nx start-env --workspaceRoot tmp/e2e/` -- `nx npm-publish --envProject=` -- `nx run-many -t npm-publish --envProjectName=models-e2e` -- `nx npm-install --envProject=` -- `nx run-many -t npm-install --envProjectName=models-e2e` diff --git a/e2e/utils-e2e/README.md b/e2e/utils-e2e/README.md deleted file mode 100644 index 586a0eee..00000000 --- a/e2e/utils-e2e/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# utils-e2e - -End-to-end tests for the `utils-e2e` library. - -## Included plugins - -- `tools/plugins/env.plugin.ts` - -### Dynamic targets generated by the plugin - -- `workspace-source` - - targets - - `graph-start-verdaccio` - - `graph-setup-npm-env` -- `utils-e2e` - - targets - - `e2e` -- `models`,`utils`,`core`,`cli` - - tags - - `publishable` - - targets - - `graph-npm-publish` - - `graph-npm-install` - - `graph-npm-uninstall` - -## Running the tests - -- `nx e2e utils-e2e` - run E2E tests for the `utils-e2e` library. - - run vitest setup - `e2e/utils-e2e/setup/global-setup.ts#setup` - - `nx graph-setup-npm-env utils-e2e` - - `nx run-many --targets=graph-npm-publish` - - `nx run-many --targets=graph-npm-install` - - run tests - - run vitest teardown - `e2e/utils-e2e/setup/global-setup.ts#teardown` - - stop server - - delete folder - -```mermaid -flowchart TB -pkg-e2e:e2e-. programmatic .->pkg-e2e:setup-npm-env; -pkg-e2e:setup-npm-graph-. programmatic .->pkg-e2e:run-many-npm-publish; -pkg-e2e:run-many-npm-publish-. programmatic .->pkg-e2e:run-many-npm-install; -pkg-e2e:run-many-npm-install-->pkg-1:npm-install -pkg-e2e:run-many-npm-install-->pkg-2:npm-install -pkg-1:npm-publish-->pkg-1:build; -pkg-2:npm-publish-->pkg-2:build; -pkg-2:npm-publish-->pkg-1:npm-publish; -pkg-2:npm-publish-->pkg-1:build; -pkg-2:npm-install-. programmatic .->pkg-2:npm-publish -pkg-1:npm-install-. programmatic .->pkg-1:npm-publish -``` - -### Changed or generated files during e2e - -```sh -Root/ # 👈 this is your CWD -├── dist/ -│ └── packages/ -│ └── /... -└── tmp/ - └── e2e/ - └── / # e2e setup - ├── storage/... # npm publish/unpublish - ├── node_modules/ - │ └── - │ └── /... # npm install/uninstall - ├── __test__/... - │ └── /... # e2e beforeEach - │ └── /... - ├── .npmrc # local npm config configured for project specific verdaccio registry - ├── package-lock.json # npm install/uninstall - └── package.json # npm install/uninstall -``` - -### Troubleshooting - -- `nx start-server` -- `nx start-server ` -- `nx start-server --storage tmp/e2e//storage` -- `nx start-env` -- `nx start-env --workspaceRoot tmp/e2e/` -- `nx npm-publish --envProject=` -- `nx run-many -t npm-publish --envProjectName=utils-e2e` -- `nx npm-install --envProject=` -- `nx run-many -t npm-install --envProjectName=utils-e2e`