Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Update nx to 15.7.x #143

Merged
merged 17 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/witty-rice-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nx-mesh': major
---

Update Nx support to ">=15.7"
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion .github/actions/setup-job/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ runs:
if: inputs.skip_node_cache == 'false'
shell: bash
run: |
echo "key=cache-version-7--os-${{ runner.os }}--volta-${{ steps.volta.outputs.version }}--node-${{ steps.node.outputs.version }}--pnpm-${{ steps.pnpm.outputs.version }}" >> $GITHUB_OUTPUT
echo "key=cache-version-8--os-${{ runner.os }}--volta-${{ steps.volta.outputs.version }}--node-${{ steps.node.outputs.version }}--pnpm-${{ steps.pnpm.outputs.version }}" >> $GITHUB_OUTPUT

- name: Create cache key
id: cache_key
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/__lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ jobs:
node_version: ${{ inputs.node_version }}
save_cache: '${{ inputs.save_cache }}'

- name: Workspace Lint
run: |
pnpm nx-cloud record -- npx nx workspace-lint
- name: Format
run: |
pnpm nx-cloud record -- npx nx format:check
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
.vuepress/dist
dist
out
tmp
out-tsc


# =========================================================
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
strict-peer-dependencies=false
auto-install-peers=false
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

/coverage
/dist
pnpm-lock.yaml
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- [`serve`](#serve)
- [`validate`](#validate)
- [Examples](#examples)
- [Compatibility](#compatibility)
- [Credits](#credits)

<br/>
Expand Down Expand Up @@ -85,7 +86,7 @@ yarn add -D nx-mesh

| Name | Version | Required | Auto-installed by generators |
| --------------------- | ---------- | :------: | :--------------------------: |
| `nx` | `>=15.4.1` | ✅ | - |
| `nx` | `>=15.7.1` | ✅ | - |
| `@graphql-mesh/cli` | `>=0.71.0` | ✅ | ✅ |
| `@graphql-codgen/cli` | `>=2.16.1` | ✅ | ✅ |

Expand Down Expand Up @@ -157,7 +158,6 @@ CREATE apps/my-api-gateway/.eslintrc.json
| `linter` | - | `eslint`, `tslint` | - | `eslint` | The tool to use for running lint checks |
| `setParserOptionsProject` | - | `boolean` | - | `false` | Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons. |
| `skipFormat` | - | `boolean` | - | `false` | Skip formatting files. |
| `skipWorkspaceJson` | - | `boolean` | - | `false` | Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`). |
| `standaloneConfig` | - | `boolean` | - | `false` | Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json` |
| `tags` | `t` | `string` | - | - | Add tags to the application (used for linting). |
| `unitTestRunner` | - | `jest`, `none` | - | `jest` | Test runner to use for unit tests. |
Expand Down Expand Up @@ -222,7 +222,7 @@ UPDATE workspace.json
CREATE libs/my-mesh-sdk/.eslintrc.json
CREATE libs/my-mesh-sdk/jest.config.ts
CREATE libs/my-mesh-sdk/tsconfig.spec.json
CREATE libs/my-mesh-sdk/.lib.swcrc
CREATE libs/my-mesh-sdk/.swcrc
CREATE libs/my-mesh-sdk/.meshrc.json
CREATE libs/my-mesh-sdk/src/lib/sdk.ts
CREATE libs/my-mesh-sdk/codegen.ts
Expand Down Expand Up @@ -388,7 +388,7 @@ This is the equivalent of using `graphql-mesh build`, but with extra steps for p
| `outputPath` | `string` | ✅ | - | The output path of the generated files. |
| `require` | `string[]` | - | `[]` | Loads specific require.extensions before running the codegen and reading the configuration. |
| `skipTypeCheck` | `boolean` | - | `false` | Whether to skip TypeScript type checking. |
| `swcrc` | `string` | - | `.lib.swcrc` | The path to the SWC configuration file. |
| `swcrc` | `string` | - | `.swcrc` | The path to the SWC configuration file. |
| `transformers` | `string[]` | - | - | List of TypeScript Transformer Plugins. |
| `tsConfig` | `string` | ✅ | - | The path to the Typescript configuration file. |
| `updateBuildableProjectDepsInPackageJson` | `boolean` | - | `true` | Whether to update the buildable project dependencies in `package.json`. |
Expand Down Expand Up @@ -566,9 +566,19 @@ This is the equivalent of using `graphql-mesh validate`.

<br/>

## Compatibility

| `nx-mesh` | Nx |
| --------- | --------- |
| `^3.0.0` | `^15.4.0` |

<br/>

## Credits

[GraphQL Mesh](https://github.com/Urigo/graphql-mesh) is made by the awesome team at [The Guild](https://www.the-guild.dev). If you love GraphQL Mesh give them a ⭐!
[GraphQL Mesh](https://github.com/Urigo/graphql-mesh) is made by the awesome team at [The Guild](https://www.the-guild.dev).

If you love GraphQL Mesh give them a ⭐!

<br/>
<br/>
Expand Down
Empty file removed examples/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
e2e: {
...nxE2EPreset(__dirname),
/**
* TODO(@nrwl/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
testIsolation: false,
},
});
11 changes: 10 additions & 1 deletion examples/sdk-nextjs-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
e2e: {
...nxE2EPreset(__dirname),
/**
* TODO(@nrwl/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
testIsolation: false,
},
});
9 changes: 8 additions & 1 deletion examples/sdk-odata--trippin/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
"presets": [
[
"@nrwl/js/babel",
{
"useBuiltIns": "usage"
}
]
]
}
9 changes: 8 additions & 1 deletion examples/sdk-openapi--stackexchange/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
"presets": [
[
"@nrwl/js/babel",
{
"useBuiltIns": "usage"
}
]
]
}
10 changes: 10 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
"generators": {
"@nrwl/react": {
"application": {
"style": "css",
"linter": "eslint",
"bundler": "webpack",
"babel": true
},
"library": {
"style": "css",
"linter": "eslint"
},
"component": {
"style": "css"
}
},
"@nrwl/next": {
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ci": "pnpm lint:fix --parallel=1 && pnpm build --parallel=1 && pnpm test --parallel=1 && pnpm e2e --parallel=1",
"e2e": "nx run-many --target=e2e --all --parallel=1 && nx run-many --target=e2e --all --configuration=start --parallel=1 && nx run-many --target=e2e --all --configuration=serve --parallel=1 && nx run-many --target=e2e --all --configuration=serve-dev",
"lint:fix": "nx format:write && nx run-many --target=lint --all --fix",
"lint": "nx workspace-lint && nx format && nx run-many --target=lint --all",
"lint": "nx format && nx run-many --target=lint --all",
"nx:update": "./tools/scripts/nx-update.sh",
"postinstall": "husky install",
"test": "nx run-many --target=test --all",
Expand All @@ -28,11 +28,11 @@
"@envelop/disable-introspection": "4.0.3",
"@envelop/response-cache": "4.0.3",
"@graphql-codegen/cli": "2.16.1",
"@graphql-codegen/client-preset": "^1.2.3",
"@graphql-mesh/cache-file": "^0.9.44",
"@graphql-codegen/client-preset": "^1.3.0",
"@graphql-mesh/cache-file": "^0.9.47",
"@graphql-mesh/cli": "0.79.3",
"@graphql-mesh/graphql": "0.31.31",
"@graphql-mesh/json-schema": "^0.35.33",
"@graphql-mesh/json-schema": "^0.35.38",
"@graphql-mesh/mysql": "0.17.30",
"@graphql-mesh/neo4j": "0.20.34",
"@graphql-mesh/new-openapi": "0.8.2",
Expand All @@ -43,22 +43,22 @@
"@graphql-mesh/runtime": "0.44.31",
"@graphql-mesh/soap": "0.16.0",
"@graphql-mesh/utils": "0.42.6",
"@graphql-typed-document-node/core": "^3.1.1",
"@graphql-typed-document-node/core": "^3.1.2",
"@graphql-yoga/node": "2.13.13",
"@microsoft/eslint-formatter-sarif": "^3.0.0",
"@nrwl/devkit": "15.4.1",
"@nrwl/js": "15.4.1",
"@nrwl/next": "15.4.1",
"@nrwl/nx-plugin": "15.4.1",
"@nrwl/devkit": "15.7.1",
"@nrwl/js": "15.7.1",
"@nrwl/next": "15.7.1",
"@nrwl/nx-plugin": "15.7.1",
"@swc-node/register": "1.5.1",
"@swc/helpers": "0.4.11",
"@types/watchpack": "^2.4.0",
"core-js": "^3.6.5",
"core-js": "^3.29.0",
"encoding": "0.1.13",
"get-port": "5.1.1",
"graphql": "16.6.0",
"jest-environment-jsdom": "29.3.0",
"next": "13.0.0",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.2.0",
Expand All @@ -69,18 +69,18 @@
"watchpack": "^2.4.0"
},
"devDependencies": {
"@nrwl/cli": "15.4.1",
"@nrwl/cypress": "15.4.1",
"@nrwl/devkit": "15.4.1",
"@nrwl/eslint-plugin-nx": "15.4.1",
"@nrwl/jest": "15.4.1",
"@nrwl/js": "15.4.1",
"@nrwl/linter": "15.4.1",
"@nrwl/node": "15.4.1",
"@nrwl/nx-cloud": "15.0.2",
"@nrwl/react": "15.4.1",
"@nrwl/web": "15.4.1",
"@nrwl/workspace": "15.4.1",
"@nrwl/cli": "15.7.1",
"@nrwl/cypress": "15.7.1",
"@nrwl/devkit": "15.7.1",
"@nrwl/eslint-plugin-nx": "15.7.1",
"@nrwl/jest": "15.7.1",
"@nrwl/js": "15.7.1",
"@nrwl/linter": "15.7.1",
"@nrwl/node": "15.7.1",
"@nrwl/nx-cloud": "15.2.1",
"@nrwl/react": "15.7.1",
"@nrwl/web": "15.7.1",
"@nrwl/workspace": "15.7.1",
"@swc/cli": "0.1.55",
"@swc/core": "1.2.173",
"@swc/jest": "0.2.20",
Expand All @@ -96,9 +96,9 @@
"@typescript-eslint/parser": "5.42.1",
"babel-jest": "28.1.3",
"babel-plugin-styled-components": "1.10.7",
"cypress": "^11.0.0",
"cypress": "^12.2.0",
"eslint": "8.15.0",
"eslint-config-next": "13.0.0",
"eslint-config-next": "13.1.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-import": "2.26.0",
Expand All @@ -108,9 +108,9 @@
"fs-extra": "10.1.0",
"husky": "8.0.2",
"jest": "28.1.3",
"jsonc-eslint-parser": "^2.1.0",
"jsonc-eslint-parser": "^2.2.0",
"lint-staged": "13.1.0",
"nx": "15.4.1",
"nx": "15.7.1",
"prettier": "2.7.1",
"react-test-renderer": "18.2.0",
"ts-jest": "28.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-mesh/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
[
"@nrwl/web/babel",
"@nrwl/js/babel",
{
"useBuiltIns": "usage"
}
Expand Down
File renamed without changes.
16 changes: 9 additions & 7 deletions packages/nx-mesh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"peerDependencies": {
"@graphql-mesh/cli": ">=0.71.0",
"@swc-node/register": "^1.5.1",
"graphql": "^16.6.0",
"@swc/core": "^0.1.55",
"@swc/helpers": "^0.4.11",
"nx": ">= 14 <= 16"
Expand All @@ -26,16 +27,17 @@
}
},
"dependencies": {
"@nrwl/cypress": "^15.4.1",
"@nrwl/devkit": "^15.4.1",
"@nrwl/js": "^15.4.1",
"@nrwl/linter": "^15.4.1",
"@nrwl/node": "^15.4.1",
"@nrwl/workspace": "^15.4.1",
"@nrwl/cypress": "^15.7.1",
"@nrwl/devkit": "^15.7.1",
"@nrwl/js": "^15.7.1",
"@nrwl/linter": "^15.7.1",
"@nrwl/node": "^15.7.1",
"@nrwl/workspace": "^15.7.1",
"fs-extra": "^10.1.0",
"get-port": "5.1.1",
"tslib": "^2.4.0",
"type-fest": "^2.18.0"
"type-fest": "^2.18.0",
"watchpack": "^2.4.0"
},
"keywords": [
"Monorepo",
Expand Down
1 change: 1 addition & 0 deletions packages/nx-mesh/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"outputPath": "dist/packages/nx-mesh",
"main": "packages/nx-mesh/src/index.ts",
"tsConfig": "packages/nx-mesh/tsconfig.lib.json",
"updateBuildableProjectDepsInPackageJson": false,
"assets": [
"README.md",
"CHANGELOG.md",
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-mesh/src/executors/build-swc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"swcrc": {
"type": "string",
"description": "The path to the SWC configuration file. Default: .lib.swcrc"
"description": "The path to the SWC configuration file. Default: .swcrc"
},
"skipTypeCheck": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Modifed version of Nx SWC executor
// https://github.com/nrwl/nx/blob/master/packages/js/src/executors/swc/swc.impl.ts
// @ts-nocheck

import { ExecutorContext } from '@nrwl/devkit';
import {
assetGlobsToFiles,
Expand Down Expand Up @@ -104,7 +103,8 @@ export async function* swcExecutor(
_options: SwcExecutorOptions,
context: ExecutorContext
) {
const { sourceRoot, root } = context.workspace.projects[context.projectName];
const { sourceRoot, root } =
context.projectsConfigurations.projects[context.projectName];
const options = normalizeOptions(_options, context.root, sourceRoot, root);
const { tmpTsConfig, dependencies } = checkDependencies(
context,
Expand Down
1 change: 0 additions & 1 deletion packages/nx-mesh/src/generators/application/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface AppGeneratorSchema {
name: string;
setParserOptionsProject?: boolean;
skipFormat?: boolean;
skipWorkspaceJson?: boolean;
standaloneConfig?: boolean;
tags?: string;
unitTestRunner?: 'jest' | 'none';
Expand Down
Loading