chore(graph): move dep-graph-client to graph-client (#11792)
This commit is contained in:
parent
3be16a88a5
commit
6c3ef9d417
@ -228,7 +228,7 @@ jobs:
|
|||||||
name: Run E2E Tests
|
name: Run E2E Tests
|
||||||
command: |
|
command: |
|
||||||
if $E2E_AFFECTED; then
|
if $E2E_AFFECTED; then
|
||||||
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-make-angular-cli-faster,e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-nx-run,e2e-nx-misc,e2e-react,e2e-web,e2e-angular-extensions,e2e-angular-core,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-add-nx-to-monorepo,nx-dev-e2e,e2e-nx-init,e2e-dep-graph-client --parallel=1;
|
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-make-angular-cli-faster,e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-nx-run,e2e-nx-misc,e2e-react,e2e-web,e2e-angular-extensions,e2e-angular-core,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-add-nx-to-monorepo,nx-dev-e2e,e2e-nx-init,e2e-graph-client --parallel=1;
|
||||||
else
|
else
|
||||||
echo "Skipping E2E tests";
|
echo "Skipping E2E tests";
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
{ name: 'linter', description: 'anything Linter specific' },
|
{ name: 'linter', description: 'anything Linter specific' },
|
||||||
{ name: 'storybook', description: 'anything Storybook specific' },
|
{ name: 'storybook', description: 'anything Storybook specific' },
|
||||||
{ name: 'nx-cloud', description: 'anything NxCloud specific' },
|
{ name: 'nx-cloud', description: 'anything NxCloud specific' },
|
||||||
{ name: 'dep-graph', description: 'anything dep-graph app specific' },
|
{ name: 'graph', description: 'anything graph app specific' },
|
||||||
{
|
{
|
||||||
name: 'testing',
|
name: 'testing',
|
||||||
description: 'anything testing specific (e.g., jest or cypress)',
|
description: 'anything testing specific (e.g., jest or cypress)',
|
||||||
|
|||||||
4
.github/workflows/e2e-matrix.yml
vendored
4
.github/workflows/e2e-matrix.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
|||||||
- e2e-react-native
|
- e2e-react-native
|
||||||
# - e2e-detox
|
# - e2e-detox
|
||||||
- e2e-add-nx-to-monorepo
|
- e2e-add-nx-to-monorepo
|
||||||
- e2e-dep-graph-client
|
- e2e-graph-client
|
||||||
exclude:
|
exclude:
|
||||||
# exclude react-native and detox from ubuntu
|
# exclude react-native and detox from ubuntu
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@ -82,7 +82,7 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
packages: e2e-add-nx-to-monorepo
|
packages: e2e-add-nx-to-monorepo
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
packages: e2e-dep-graph-client
|
packages: e2e-graph-client
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
packages: e2e-make-angular-cli-faster
|
packages: e2e-make-angular-cli-faster
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|||||||
2
.github/workflows/e2e-windows.yml
vendored
2
.github/workflows/e2e-windows.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
- e2e-storybook,e2e-storybook-angular
|
- e2e-storybook,e2e-storybook-angular
|
||||||
- e2e-workspace-create
|
- e2e-workspace-create
|
||||||
- e2e-add-nx-to-monorepo
|
- e2e-add-nx-to-monorepo
|
||||||
- e2e-dep-graph-client
|
- e2e-graph-client
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
name: ${{ matrix.packages }}
|
name: ${{ matrix.packages }}
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,7 +13,7 @@ jest.debug.config.js
|
|||||||
.tool-versions
|
.tool-versions
|
||||||
/.nx-cache
|
/.nx-cache
|
||||||
/.verdaccio/build/local-registry
|
/.verdaccio/build/local-registry
|
||||||
dep-graph/client/src/assets/environment.js
|
/graph/client/src/assets/environment.js
|
||||||
/nx-dev/nx-dev/public/documentation
|
/nx-dev/nx-dev/public/documentation
|
||||||
/nx-dev/nx-dev/public/images/open-graph
|
/nx-dev/nx-dev/public/images/open-graph
|
||||||
# Lerna creates this
|
# Lerna creates this
|
||||||
|
|||||||
@ -4,7 +4,6 @@ tmp
|
|||||||
node_modules
|
node_modules
|
||||||
/package.json
|
/package.json
|
||||||
packages/workspace/src/generators/**/files/**/*.json
|
packages/workspace/src/generators/**/files/**/*.json
|
||||||
packages/workspace/src/core/dep-graph/vendor.js
|
|
||||||
packages/angular/src/schematics/**/files/**/*.json
|
packages/angular/src/schematics/**/files/**/*.json
|
||||||
packages/angular/src/migrations/**/files/**/*.json
|
packages/angular/src/migrations/**/files/**/*.json
|
||||||
packages/web/src/generators/**/files/**/*.json
|
packages/web/src/generators/**/files/**/*.json
|
||||||
|
|||||||
@ -12,19 +12,26 @@ Watch this 5-minute video:
|
|||||||
|
|
||||||
## Got a Question?
|
## Got a Question?
|
||||||
|
|
||||||
We are trying to keep GitHub issues for bug reports and feature requests. Using the `nrwl` tag on [Stack Overflow](https://stackoverflow.com/questions/tagged/nrwl) is a much better place to ask general questions about how to use Nx.
|
We are trying to keep GitHub issues for bug reports and feature requests. Using the `nrwl` tag
|
||||||
|
on [Stack Overflow](https://stackoverflow.com/questions/tagged/nrwl) is a much better place to ask general questions
|
||||||
|
about how to use Nx.
|
||||||
|
|
||||||
## Found an Issue?
|
## Found an Issue?
|
||||||
|
|
||||||
If you find a bug in the source code or a mistake in the documentation, you can help us by [submitting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-issue) to [our GitHub Repository](https://github.com/nrwl/nx). Even better, you can [submit a Pull Request](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr) with a fix.
|
If you find a bug in the source code or a mistake in the documentation, you can help us
|
||||||
|
by [submitting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-issue)
|
||||||
|
to [our GitHub Repository](https://github.com/nrwl/nx). Even better, you
|
||||||
|
can [submit a Pull Request](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr) with a fix.
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
Source code and documentation are included in the top-level folders listed below.
|
Source code and documentation are included in the top-level folders listed below.
|
||||||
|
|
||||||
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform, and API docs.
|
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform,
|
||||||
|
and API docs.
|
||||||
- `e2e` - E2E tests.
|
- `e2e` - E2E tests.
|
||||||
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and executors (or builders).
|
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and
|
||||||
|
executors (or builders).
|
||||||
- `scripts` - Miscellaneous scripts for project tasks such as building documentation, testing, and code formatting.
|
- `scripts` - Miscellaneous scripts for project tasks such as building documentation, testing, and code formatting.
|
||||||
- `tmp` - Folder used by e2e tests. If you are a WebStorm user, make sure to mark this folder as excluded.
|
- `tmp` - Folder used by e2e tests. If you are a WebStorm user, make sure to mark this folder as excluded.
|
||||||
|
|
||||||
@ -64,7 +71,8 @@ yarn local-registry disable
|
|||||||
To publish packages to a local registry, do the following:
|
To publish packages to a local registry, do the following:
|
||||||
|
|
||||||
- Run `yarn local-registry start` in Terminal 1 (keep it running)
|
- Run `yarn local-registry start` in Terminal 1 (keep it running)
|
||||||
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to be logged in. You can use test/test/test@test.io.)
|
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
|
||||||
|
be logged in. You can use test/test/test@test.io.)
|
||||||
- Run `yarn local-registry enable` in Terminal 2
|
- Run `yarn local-registry enable` in Terminal 2
|
||||||
- Run `yarn nx-release 999.9.9 --local` in Terminal 2
|
- Run `yarn nx-release 999.9.9 --local` in Terminal 2
|
||||||
- Run `cd ./tmp` in Terminal 2
|
- Run `cd ./tmp` in Terminal 2
|
||||||
@ -85,7 +93,8 @@ Yarn Berry operates slightly differently than Yarn Classic. In order to publish
|
|||||||
- localhost
|
- localhost
|
||||||
```
|
```
|
||||||
- Run `yarn local-registry start` in Terminal 1 (keep it running)
|
- Run `yarn local-registry start` in Terminal 1 (keep it running)
|
||||||
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (usually in ~/.yarnrc.yml). The file should look something like this:
|
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (
|
||||||
|
usually in ~/.yarnrc.yml). The file should look something like this:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
npmRegistries:
|
npmRegistries:
|
||||||
@ -98,7 +107,9 @@ Yarn Berry operates slightly differently than Yarn Classic. In order to publish
|
|||||||
- localhost
|
- localhost
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run `yarn nx-release --local` in Terminal 2 to publish next minor version. If this version already exists, you can bump the minor version in `lerna.json` to toggle the next minor. The output will report the version of published packages.
|
- Run `yarn nx-release --local` in Terminal 2 to publish next minor version. If this version already exists, you can
|
||||||
|
bump the minor version in `lerna.json` to toggle the next minor. The output will report the version of published
|
||||||
|
packages.
|
||||||
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
|
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
|
||||||
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).
|
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).
|
||||||
|
|
||||||
@ -136,12 +147,14 @@ nx e2e e2e-cli -t versions # I often add qqqq to my test name so I can use -t qq
|
|||||||
|
|
||||||
To build Nx on Windows, you need to use WSL.
|
To build Nx on Windows, you need to use WSL.
|
||||||
|
|
||||||
- Run `yarn install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be compiled for Windows.
|
- Run `yarn install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be
|
||||||
|
compiled for Windows.
|
||||||
- Run `nx affected --target=test` and other commands in WSL.
|
- Run `nx affected --target=test` and other commands in WSL.
|
||||||
|
|
||||||
## Documentation Contributions
|
## Documentation Contributions
|
||||||
|
|
||||||
We would love for you to contribute to our documentation as well! Please feel welcome to submit fixes or enhancements to our existing documentation pages and the `nx-dev` application in this repo.
|
We would love for you to contribute to our documentation as well! Please feel welcome to submit fixes or enhancements to
|
||||||
|
our existing documentation pages and the `nx-dev` application in this repo.
|
||||||
|
|
||||||
### Documentation Structure
|
### Documentation Structure
|
||||||
|
|
||||||
@ -149,18 +162,24 @@ We would love for you to contribute to our documentation as well! Please feel we
|
|||||||
|
|
||||||
Our documentation pages can be found within this repo under the `docs` directory.
|
Our documentation pages can be found within this repo under the `docs` directory.
|
||||||
|
|
||||||
The `docs/map.json` file is considered our source of truth for our site's structure, and should be updated when adding a new page to our documentation to ensure that it is included in the documentation site. We also run automated scripts based on this `map.json` data to safeguard against common human errors that could break our site.
|
The `docs/map.json` file is considered our source of truth for our site's structure, and should be updated when adding a
|
||||||
|
new page to our documentation to ensure that it is included in the documentation site. We also run automated scripts
|
||||||
|
based on this `map.json` data to safeguard against common human errors that could break our site.
|
||||||
|
|
||||||
#### Nx-Dev Application
|
#### Nx-Dev Application
|
||||||
|
|
||||||
Our public `nx.dev` documentation site is a [Next.js](https://nextjs.org/) application, that can be found in the `nx-dev` directory of this repo.
|
Our public `nx.dev` documentation site is a [Next.js](https://nextjs.org/) application, that can be found in
|
||||||
The documentation site is consuming the `docs/` directly by copy-ing its content while deploying, so the website is always in sync and reflects the latest version of `docs/`.
|
the `nx-dev` directory of this repo.
|
||||||
|
The documentation site is consuming the `docs/` directly by copy-ing its content while deploying, so the website is
|
||||||
|
always in sync and reflects the latest version of `docs/`.
|
||||||
|
|
||||||
Jump to [Running the Documentation Site Locally](#running-the-documentation-site-locally) to see how to preview your changes while serving.
|
Jump to [Running the Documentation Site Locally](#running-the-documentation-site-locally) to see how to preview your
|
||||||
|
changes while serving.
|
||||||
|
|
||||||
### Changing Generated API documentation
|
### Changing Generated API documentation
|
||||||
|
|
||||||
`.md` files documenting the API for our CLI (including executor and generator API docs) are generated via the corresponding `schema.json` file for the given command.
|
`.md` files documenting the API for our CLI (including executor and generator API docs) are generated via the
|
||||||
|
corresponding `schema.json` file for the given command.
|
||||||
|
|
||||||
After adjusting the `schema.json` file, `.md` files for these commands can be generated by running:
|
After adjusting the `schema.json` file, `.md` files for these commands can be generated by running:
|
||||||
|
|
||||||
@ -168,9 +187,11 @@ After adjusting the `schema.json` file, `.md` files for these commands can be ge
|
|||||||
yarn documentation
|
yarn documentation
|
||||||
```
|
```
|
||||||
|
|
||||||
This will update the corresponding contents of the `docs` directory. These are generated automatically on push (via husky) as well.
|
This will update the corresponding contents of the `docs` directory. These are generated automatically on push (via
|
||||||
|
husky) as well.
|
||||||
|
|
||||||
Note that adjusting the `schema.json` files will also affect the CLI manuals and Nx Console behavior, in addition to adjusting the docs.
|
Note that adjusting the `schema.json` files will also affect the CLI manuals and Nx Console behavior, in addition to
|
||||||
|
adjusting the docs.
|
||||||
|
|
||||||
### Running the Documentation Site Locally
|
### Running the Documentation Site Locally
|
||||||
|
|
||||||
@ -184,7 +205,9 @@ You can then access the application locally at `localhost:4200`.
|
|||||||
|
|
||||||
#### Troubleshooting: `JavaScript heap out of memory`
|
#### Troubleshooting: `JavaScript heap out of memory`
|
||||||
|
|
||||||
If you see an error that states: `FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`, you need to [increase the max memory size of V8's old memory section](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes):
|
If you see an error that states: `FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`,
|
||||||
|
you need
|
||||||
|
to [increase the max memory size of V8's old memory section](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
@ -194,25 +217,34 @@ After configuring this, try to run `npx nx serve nx-dev` again.
|
|||||||
|
|
||||||
### PR Preview
|
### PR Preview
|
||||||
|
|
||||||
When submitting a PR, this repo will automatically generate a preview of the `nx-dev` application based on the contents of your pull request.
|
When submitting a PR, this repo will automatically generate a preview of the `nx-dev` application based on the contents
|
||||||
|
of your pull request.
|
||||||
|
|
||||||
Once the preview site is launched, a comment will automatically be added to your PR with the link your PR's preview. To check your docs changes, make sure to select `Preview` from the version selection box of the site.
|
Once the preview site is launched, a comment will automatically be added to your PR with the link your PR's preview. To
|
||||||
|
check your docs changes, make sure to select `Preview` from the version selection box of the site.
|
||||||
|
|
||||||
## Submission Guidelines
|
## Submission Guidelines
|
||||||
|
|
||||||
### <a name="submit-issue"></a> Submitting an Issue
|
### <a name="submit-issue"></a> Submitting an Issue
|
||||||
|
|
||||||
Before you submit an issue, please search the issue tracker. An issue for your problem may already exist and has been resolved, or the discussion might inform you of workarounds readily available.
|
Before you submit an issue, please search the issue tracker. An issue for your problem may already exist and has been
|
||||||
|
resolved, or the discussion might inform you of workarounds readily available.
|
||||||
|
|
||||||
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. Having a reproducible scenario gives us wealth of important information without going back and forth with you requiring additional information, such as:
|
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. Having a
|
||||||
|
reproducible scenario gives us wealth of important information without going back and forth with you requiring
|
||||||
|
additional information, such as:
|
||||||
|
|
||||||
- the output of `nx report`
|
- the output of `nx report`
|
||||||
- `yarn.lock` or `package-lock.json`
|
- `yarn.lock` or `package-lock.json`
|
||||||
- and most importantly - a use-case that fails
|
- and most importantly - a use-case that fails
|
||||||
|
|
||||||
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
|
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are
|
||||||
|
fixing the right problem.
|
||||||
|
|
||||||
We will be insisting on a minimal reproduction in order to save maintainers' time and ultimately be able to fix more bugs. Interestingly, from our experience, users often find coding problems themselves while preparing a minimal reproduction repository. We understand that sometimes it might be hard to extract essentials bits of code from a larger codebase, but we really need to isolate the problem before we can fix it.
|
We will be insisting on a minimal reproduction in order to save maintainers' time and ultimately be able to fix more
|
||||||
|
bugs. Interestingly, from our experience, users often find coding problems themselves while preparing a minimal
|
||||||
|
reproduction repository. We understand that sometimes it might be hard to extract essentials bits of code from a larger
|
||||||
|
codebase, but we really need to isolate the problem before we can fix it.
|
||||||
|
|
||||||
You can file new issues by filling out our [issue form](https://github.com/nrwl/nx/issues/new/choose).
|
You can file new issues by filling out our [issue form](https://github.com/nrwl/nx/issues/new/choose).
|
||||||
|
|
||||||
@ -222,7 +254,8 @@ Please follow the following guidelines:
|
|||||||
|
|
||||||
- Make sure unit tests pass (`nx affected --target=test`)
|
- Make sure unit tests pass (`nx affected --target=test`)
|
||||||
- Target a specific project with: `nx run proj:test` (i.e. `nx run angular:test` to target `packages/angular`)
|
- Target a specific project with: `nx run proj:test` (i.e. `nx run angular:test` to target `packages/angular`)
|
||||||
- Target a specific unit test file (i.e. `packages/angular/src/utils/ast-command-line-utils.spec.ts`) with `npx jest angular/src/utils/ast-utils` or `npx jest packages/angular/src/utils/ast-utils`
|
- Target a specific unit test file (i.e. `packages/angular/src/utils/ast-command-line-utils.spec.ts`)
|
||||||
|
with `npx jest angular/src/utils/ast-utils` or `npx jest packages/angular/src/utils/ast-utils`
|
||||||
- For more options on running tests - check `npx jest --help` or visit [jestjs.io](https://jestjs.io/)
|
- For more options on running tests - check `npx jest --help` or visit [jestjs.io](https://jestjs.io/)
|
||||||
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/packages/angular/src/utils/ast-utils.spec.js`
|
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/packages/angular/src/utils/ast-utils.spec.js`
|
||||||
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`yarn e2e`)
|
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`yarn e2e`)
|
||||||
@ -247,9 +280,12 @@ body
|
|||||||
|
|
||||||
The type must be one of the following:
|
The type must be one of the following:
|
||||||
|
|
||||||
- feat - New or improved behavior being introduced (e.g. Updating to new versions of React or Jest which bring in new features)
|
- feat - New or improved behavior being introduced (e.g. Updating to new versions of React or Jest which bring in new
|
||||||
- fix - Fixes the current unexpected behavior to match expected behavior (e.g. Fixing the library generator to create the proper named project)
|
features)
|
||||||
- cleanup - Code Style changes that have little to no effect on the user (e.g. Refactoring some functions into a different file)
|
- fix - Fixes the current unexpected behavior to match expected behavior (e.g. Fixing the library generator to create
|
||||||
|
the proper named project)
|
||||||
|
- cleanup - Code Style changes that have little to no effect on the user (e.g. Refactoring some functions into a
|
||||||
|
different file)
|
||||||
- docs - Changes to the documentation (e.g. Adding more details into the getting started guide)
|
- docs - Changes to the documentation (e.g. Adding more details into the getting started guide)
|
||||||
- chore - Changes that have absolutely no effect on users (e.g. Updating the version of Nx used to build the repo)
|
- chore - Changes that have absolutely no effect on users (e.g. Updating the version of Nx used to build the repo)
|
||||||
|
|
||||||
@ -259,7 +295,7 @@ The scope must be one of the following:
|
|||||||
|
|
||||||
- angular - anything Angular specific
|
- angular - anything Angular specific
|
||||||
- core - anything Nx core specific
|
- core - anything Nx core specific
|
||||||
- dep-graph - anything dep-graph app specific
|
- graph - anything graph app specific
|
||||||
- detox - anything Detox specific
|
- detox - anything Detox specific
|
||||||
- devkit - devkit-related changes
|
- devkit - devkit-related changes
|
||||||
- express - anything Express specific
|
- express - anything Express specific
|
||||||
@ -280,7 +316,8 @@ The scope must be one of the following:
|
|||||||
|
|
||||||
##### Subject and Body
|
##### Subject and Body
|
||||||
|
|
||||||
The subject must contain a description of the change, and the body of the message contains any additional details to provide more context about the change.
|
The subject must contain a description of the change, and the body of the message contains any additional details to
|
||||||
|
provide more context about the change.
|
||||||
|
|
||||||
Including the issue number that the PR relates to also helps with tracking.
|
Including the issue number that the PR relates to also helps with tracking.
|
||||||
|
|
||||||
@ -297,4 +334,5 @@ Closes #157
|
|||||||
#### Commitizen
|
#### Commitizen
|
||||||
|
|
||||||
To simplify and automate the process of committing with this format,
|
To simplify and automate the process of committing with this format,
|
||||||
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and execute `yarn commit`.
|
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and
|
||||||
|
execute `yarn commit`.
|
||||||
|
|||||||
@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
||||||
"sourceRoot": "dep-graph/client-e2e/src",
|
|
||||||
"projectType": "application",
|
|
||||||
"targets": {
|
|
||||||
"e2e-base": {
|
|
||||||
"executor": "@nrwl/cypress:cypress",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": "dep-graph/client-e2e/tsconfig.e2e.json",
|
|
||||||
"baseUrl": "http://localhost:4200"
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"dev": {
|
|
||||||
"cypressConfig": "dep-graph/client-e2e/cypress.json",
|
|
||||||
"devServerTarget": "dep-graph-client:serve"
|
|
||||||
},
|
|
||||||
"watch": {
|
|
||||||
"cypressConfig": "dep-graph/client-e2e/cypress-watch-mode.json",
|
|
||||||
"devServerTarget": "dep-graph-client:serve:watch"
|
|
||||||
},
|
|
||||||
"release": {
|
|
||||||
"cypressConfig": "dep-graph/client-e2e/cypress-release.json",
|
|
||||||
"devServerTarget": "dep-graph-client:serve:release"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultConfiguration": "dev"
|
|
||||||
},
|
|
||||||
"e2e": {
|
|
||||||
"executor": "nx:run-commands",
|
|
||||||
"outputs": [],
|
|
||||||
"options": {
|
|
||||||
"commands": [
|
|
||||||
"npx nx e2e-base e2e-dep-graph-client -c dev",
|
|
||||||
"npx nx e2e-base e2e-dep-graph-client -c watch",
|
|
||||||
"npx nx e2e-base e2e-dep-graph-client -c release"
|
|
||||||
],
|
|
||||||
"parallel": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"executor": "@nrwl/linter:eslint",
|
|
||||||
"outputs": ["{options.outputFile}"],
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": ["dep-graph/client-e2e/**/*.ts"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"implicitDependencies": ["dep-graph-client"]
|
|
||||||
}
|
|
||||||
57
dep-graph/client/src/assets/environment.js
Normal file
57
dep-graph/client/src/assets/environment.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
window.exclude = [];
|
||||||
|
window.watch = false;
|
||||||
|
window.environment = 'dev';
|
||||||
|
window.useXstateInspect = false;
|
||||||
|
|
||||||
|
window.appConfig = {
|
||||||
|
showDebugger: false,
|
||||||
|
showExperimentalFeatures: false,
|
||||||
|
projectGraphs: [
|
||||||
|
{
|
||||||
|
id: 'nx',
|
||||||
|
label: 'Nx',
|
||||||
|
url: 'assets/graphs/nx.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ocean',
|
||||||
|
label: 'Ocean',
|
||||||
|
url: 'assets/graphs/ocean.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'nx-examples',
|
||||||
|
label: 'Nx Examples',
|
||||||
|
url: 'assets/graphs/nx-examples.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'sub-apps',
|
||||||
|
label: 'Sub Apps',
|
||||||
|
url: 'assets/graphs/sub-apps.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'storybook',
|
||||||
|
label: 'Storybook',
|
||||||
|
url: 'assets/graphs/storybook.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'focus-testing',
|
||||||
|
label: 'Focus',
|
||||||
|
url: 'assets/graphs/focus-testing.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'affected',
|
||||||
|
label: 'Affected',
|
||||||
|
url: 'assets/graphs/affected.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'collapsing-edges-testing',
|
||||||
|
label: 'Collapsing Edges',
|
||||||
|
url: 'assets/graphs/collapsing-edges-testing.json',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'nested-workspace-layout',
|
||||||
|
label: 'Nested Workspace Layout',
|
||||||
|
url: 'assets/graphs/nested-workspace-layout.json',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
defaultProjectGraph: 'nx',
|
||||||
|
};
|
||||||
@ -84,7 +84,7 @@ describe('Extra Nx Misc Tests', () => {
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|
||||||
runCLI('dep-graph --file project-graph.json');
|
runCLI('graph --file project-graph.json');
|
||||||
const projectGraphJson = readJson('project-graph.json');
|
const projectGraphJson = readJson('project-graph.json');
|
||||||
expect(projectGraphJson.graph.nodes['plugin-node']).toBeDefined();
|
expect(projectGraphJson.graph.nodes['plugin-node']).toBeDefined();
|
||||||
expect(projectGraphJson.graph.nodes['plugin-node2']).toBeDefined();
|
expect(projectGraphJson.graph.nodes['plugin-node2']).toBeDefined();
|
||||||
|
|||||||
@ -507,8 +507,8 @@ describe('Nx Affected and Graph Tests', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isWindows()) {
|
if (isWindows()) {
|
||||||
it('dep-graph should output json to file by absolute path in Windows', () => {
|
it('graph should output json to file by absolute path in Windows', () => {
|
||||||
runCLI(`dep-graph --file=C:\\tmp\\project-graph.json`);
|
runCLI(`graph --file=C:\\tmp\\project-graph.json`);
|
||||||
|
|
||||||
expect(fileExists('C:\\tmp\\project-graph.json')).toBeTruthy();
|
expect(fileExists('C:\\tmp\\project-graph.json')).toBeTruthy();
|
||||||
}, 1000000);
|
}, 1000000);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"pluginsFile": "./src/plugins/index",
|
"pluginsFile": "./src/plugins/index",
|
||||||
"supportFile": "./src/support/index.ts",
|
"supportFile": "./src/support/index.ts",
|
||||||
"video": true,
|
"video": true,
|
||||||
"videosFolder": "../../dist/cypress/dep-graph/client-e2e/videos",
|
"videosFolder": "../../dist/cypress/graph/client-e2e/videos",
|
||||||
"screenshotsFolder": "../../dist/cypress/dep-graph/client-e2e/screenshots",
|
"screenshotsFolder": "../../dist/cypress/graph/client-e2e/screenshots",
|
||||||
"chromeWebSecurity": false
|
"chromeWebSecurity": false
|
||||||
}
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
"pluginsFile": "./src/plugins/index",
|
"pluginsFile": "./src/plugins/index",
|
||||||
"supportFile": "./src/support/index.ts",
|
"supportFile": "./src/support/index.ts",
|
||||||
"video": true,
|
"video": true,
|
||||||
"videosFolder": "../../dist/cypress/dep-graph/client-e2e/videos",
|
"videosFolder": "../../dist/cypress/graph/client-e2e/videos",
|
||||||
"screenshotsFolder": "../../dist/cypress/dep-graph/client-e2e/screenshots",
|
"screenshotsFolder": "../../dist/cypress/graph/client-e2e/screenshots",
|
||||||
"chromeWebSecurity": false
|
"chromeWebSecurity": false
|
||||||
}
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
"pluginsFile": "./src/plugins/index",
|
"pluginsFile": "./src/plugins/index",
|
||||||
"supportFile": "./src/support/index.ts",
|
"supportFile": "./src/support/index.ts",
|
||||||
"video": true,
|
"video": true,
|
||||||
"videosFolder": "../../dist/cypress/dep-graph/client-e2e/videos",
|
"videosFolder": "../../dist/cypress/graph/client-e2e/videos",
|
||||||
"screenshotsFolder": "../../dist/cypress/dep-graph/client-e2e/screenshots",
|
"screenshotsFolder": "../../dist/cypress/graph/client-e2e/screenshots",
|
||||||
"chromeWebSecurity": false
|
"chromeWebSecurity": false
|
||||||
}
|
}
|
||||||
49
graph/client-e2e/project.json
Normal file
49
graph/client-e2e/project.json
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
|
"sourceRoot": "graph/client-e2e/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"targets": {
|
||||||
|
"e2e-base": {
|
||||||
|
"executor": "@nrwl/cypress:cypress",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": "graph/client-e2e/tsconfig.e2e.json",
|
||||||
|
"baseUrl": "http://localhost:4200"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"dev": {
|
||||||
|
"cypressConfig": "graph/client-e2e/cypress.json",
|
||||||
|
"devServerTarget": "graph-client:serve"
|
||||||
|
},
|
||||||
|
"watch": {
|
||||||
|
"cypressConfig": "graph/client-e2e/cypress-watch-mode.json",
|
||||||
|
"devServerTarget": "graph-client:serve:watch"
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"cypressConfig": "graph/client-e2e/cypress-release.json",
|
||||||
|
"devServerTarget": "graph-client:serve:release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultConfiguration": "dev"
|
||||||
|
},
|
||||||
|
"e2e": {
|
||||||
|
"executor": "nx:run-commands",
|
||||||
|
"outputs": [],
|
||||||
|
"options": {
|
||||||
|
"commands": [
|
||||||
|
"npx nx e2e-base e2e-graph-client -c dev",
|
||||||
|
"npx nx e2e-base e2e-graph-client -c watch",
|
||||||
|
"npx nx e2e-base e2e-graph-client -c release"
|
||||||
|
],
|
||||||
|
"parallel": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"executor": "@nrwl/linter:eslint",
|
||||||
|
"outputs": ["{options.outputFile}"],
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": ["graph/client-e2e/**/*.ts"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"implicitDependencies": ["graph-client"]
|
||||||
|
}
|
||||||
@ -19,7 +19,7 @@ import {
|
|||||||
import * as nxExamplesJson from '../fixtures/nx-examples.json';
|
import * as nxExamplesJson from '../fixtures/nx-examples.json';
|
||||||
import * as affectedJson from '../fixtures/affected.json';
|
import * as affectedJson from '../fixtures/affected.json';
|
||||||
|
|
||||||
describe('dep-graph-client', () => {
|
describe('graph-client', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.intercept('/assets/graphs/nx.json', { fixture: 'nx-examples.json' }).as(
|
cy.intercept('/assets/graphs/nx.json', { fixture: 'nx-examples.json' }).as(
|
||||||
'getGraph'
|
'getGraph'
|
||||||
@ -282,7 +282,7 @@ describe('dep-graph-client', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('loading dep-graph client with url params', () => {
|
describe('loading graph client with url params', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.intercept('/assets/graphs/*', { fixture: 'nx-examples.json' }).as(
|
cy.intercept('/assets/graphs/*', { fixture: 'nx-examples.json' }).as(
|
||||||
'getGraph'
|
'getGraph'
|
||||||
@ -1,4 +1,4 @@
|
|||||||
describe('dep-graph-client release', () => {
|
describe('graph-client release', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.intercept('/assets/graphs/*').as('getGraph');
|
cy.intercept('/assets/graphs/*').as('getGraph');
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { getProjectItems } from '../support/app.po';
|
import { getProjectItems } from '../support/app.po';
|
||||||
|
|
||||||
describe('dep-graph-client in watch mode', () => {
|
describe('graph-client in watch mode', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.clock();
|
cy.clock();
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
@ -10,7 +10,10 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"no-restricted-imports": [
|
"no-restricted-imports": [
|
||||||
"error",
|
"error",
|
||||||
{ "paths": ["rxjs"], "patterns": ["rxjs/*"] }
|
{
|
||||||
|
"paths": ["rxjs"],
|
||||||
|
"patterns": ["rxjs/*"]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -4,7 +4,7 @@ const nxPreset = require('@nrwl/jest/preset').default;
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
...nxPreset,
|
...nxPreset,
|
||||||
displayName: 'dep-graph-client',
|
displayName: 'graph-client',
|
||||||
transform: {
|
transform: {
|
||||||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
|
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
|
||||||
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
|
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
|
||||||
@ -14,6 +14,6 @@ export default {
|
|||||||
// The mock for widnow.matchMedia has to be in a separete file and imported before the components to test
|
// The mock for widnow.matchMedia has to be in a separete file and imported before the components to test
|
||||||
// for more info check : // https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
|
// for more info check : // https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
|
||||||
modulePathIgnorePatterns: [
|
modulePathIgnorePatterns: [
|
||||||
'/dep-graph/client/src/app/machines/match-media-mock.spec.ts',
|
'/graph/client/src/app/machines/match-media-mock.spec.ts',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {
|
tailwindcss: {
|
||||||
config: './dep-graph/client/tailwind.config.js',
|
config: './graph/client/tailwind.config.js',
|
||||||
},
|
},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
"sourceRoot": "dep-graph/client/src",
|
"sourceRoot": "graph/client/src",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"targets": {
|
"targets": {
|
||||||
"build-base": {
|
"build-base": {
|
||||||
"executor": "@nrwl/web:webpack",
|
"executor": "@nrwl/web:webpack",
|
||||||
"options": {
|
"options": {
|
||||||
"maxWorkers": 8,
|
"maxWorkers": 8,
|
||||||
"outputPath": "build/apps/dep-graph",
|
"outputPath": "build/apps/graph",
|
||||||
"index": "dep-graph/client/src/index.html",
|
"index": "graph/client/src/index.html",
|
||||||
"main": "dep-graph/client/src/main.tsx",
|
"main": "graph/client/src/main.tsx",
|
||||||
"polyfills": "dep-graph/client/src/polyfills.ts",
|
"polyfills": "graph/client/src/polyfills.ts",
|
||||||
"tsConfig": "dep-graph/client/tsconfig.app.json",
|
"tsConfig": "graph/client/tsconfig.app.json",
|
||||||
"styles": ["dep-graph/client/src/styles.scss"],
|
"styles": ["graph/client/src/styles.scss"],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"assets": [],
|
"assets": [],
|
||||||
"webpackConfig": "dep-graph/client/webpack.config.js",
|
"webpackConfig": "graph/client/webpack.config.js",
|
||||||
"optimization": false,
|
"optimization": false,
|
||||||
"outputHashing": "none",
|
"outputHashing": "none",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
@ -34,10 +34,10 @@
|
|||||||
"configurations": {
|
"configurations": {
|
||||||
"dev": {
|
"dev": {
|
||||||
"assets": [
|
"assets": [
|
||||||
"dep-graph/client/src/favicon.ico",
|
"graph/client/src/favicon.ico",
|
||||||
"dep-graph/client/src/assets/graphs/",
|
"graph/client/src/assets/graphs/",
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/dev",
|
"input": "graph/client/src/assets/dev",
|
||||||
"output": "/",
|
"output": "/",
|
||||||
"glob": "environment.js"
|
"glob": "environment.js"
|
||||||
}
|
}
|
||||||
@ -45,14 +45,14 @@
|
|||||||
},
|
},
|
||||||
"nx-console": {
|
"nx-console": {
|
||||||
"assets": [
|
"assets": [
|
||||||
"dep-graph/client/src/favicon.ico",
|
"graph/client/src/favicon.ico",
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/graphs",
|
"input": "graph/client/src/assets/graphs",
|
||||||
"output": "/assets/graphs",
|
"output": "/assets/graphs",
|
||||||
"glob": "nx-examples.json"
|
"glob": "nx-examples.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/nx-console",
|
"input": "graph/client/src/assets/nx-console",
|
||||||
"output": "/",
|
"output": "/",
|
||||||
"glob": "environment.js"
|
"glob": "environment.js"
|
||||||
}
|
}
|
||||||
@ -60,14 +60,14 @@
|
|||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
"assets": [
|
"assets": [
|
||||||
"dep-graph/client/src/favicon.ico",
|
"graph/client/src/favicon.ico",
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/graphs",
|
"input": "graph/client/src/assets/graphs",
|
||||||
"output": "/assets/graphs",
|
"output": "/assets/graphs",
|
||||||
"glob": "nx-examples.json"
|
"glob": "nx-examples.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/release",
|
"input": "graph/client/src/assets/release",
|
||||||
"output": "/",
|
"output": "/",
|
||||||
"glob": "environment.js"
|
"glob": "environment.js"
|
||||||
}
|
}
|
||||||
@ -88,9 +88,9 @@
|
|||||||
},
|
},
|
||||||
"watch": {
|
"watch": {
|
||||||
"assets": [
|
"assets": [
|
||||||
"dep-graph/client/src/favicon.ico",
|
"graph/client/src/favicon.ico",
|
||||||
{
|
{
|
||||||
"input": "dep-graph/client/src/assets/watch",
|
"input": "graph/client/src/assets/watch",
|
||||||
"output": "/",
|
"output": "/",
|
||||||
"glob": "environment.js"
|
"glob": "environment.js"
|
||||||
}
|
}
|
||||||
@ -104,16 +104,16 @@
|
|||||||
"executor": "@nrwl/web:dev-server",
|
"executor": "@nrwl/web:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"dev": {
|
"dev": {
|
||||||
"buildTarget": "dep-graph-client:build-base:dev"
|
"buildTarget": "graph-client:build-base:dev"
|
||||||
},
|
},
|
||||||
"nx-console": {
|
"nx-console": {
|
||||||
"buildTarget": "dep-graph-client:build-base:nx-console"
|
"buildTarget": "graph-client:build-base:nx-console"
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
"buildTarget": "dep-graph-client:build-base:release"
|
"buildTarget": "graph-client:build-base:release"
|
||||||
},
|
},
|
||||||
"watch": {
|
"watch": {
|
||||||
"buildTarget": "dep-graph-client:build-base:watch"
|
"buildTarget": "graph-client:build-base:watch"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "dev"
|
"defaultConfiguration": "dev"
|
||||||
@ -122,14 +122,14 @@
|
|||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nrwl/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["dep-graph/client/**/*.{ts,tsx,js,jsx}"]
|
"lintFilePatterns": ["graph/client/**/*.{ts,tsx,js,jsx}"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nrwl/jest:jest",
|
||||||
"outputs": ["coverage/dep-graph/client"],
|
"outputs": ["coverage/graph/client"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "dep-graph/client/jest.config.ts",
|
"jestConfig": "graph/client/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user