Skip to content

Commit

Permalink
feat: support nx >= 16.0.0. Issue #26 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
osmolovyk authored Oct 29, 2023
1 parent f37a65c commit 453c355
Show file tree
Hide file tree
Showing 17 changed files with 19,133 additions and 24,458 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Integrate Cypress with alternative cloud services like Currents or Sorry Cypress.

The plugin is designed for CI environments and runs Cypress in headless mode. Please use `@nrwl/cypress` for running cypress in interactive mode.
The plugin is designed for CI environments and runs Cypress in headless mode. Please use `@nx/cypress` for running cypress in interactive mode.

## Example

Expand Down Expand Up @@ -64,7 +64,7 @@ module.exports = {
Add `cypress-cloud/plugin` to `cypress.config.{js|ts|mjs}`
```ts
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';
import cloudPlugin from 'cypress-cloud/plugin';

Expand Down Expand Up @@ -120,7 +120,7 @@ You can set the project Id as follows:
### Version `1.0.0`
- `@nrwl/cypress` no longer required - the plugin is a standalone implementation that is not dependent on `@nrwl/cypress`. Use the available configuration options to configure the execution of cypress runs.
- `@nx/cypress` no longer required - the plugin is a standalone implementation that is not dependent on `@nx/cypress`. Use the available configuration options to configure the execution of cypress runs.
## Release
Expand Down
2 changes: 1 addition & 1 deletion apps/web-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';
import cloudPlugin from 'cypress-cloud/plugin';

Expand Down
3 changes: 2 additions & 1 deletion apps/web-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"executor": "@currents/nx:currents",
"options": {
"projectRoot": "apps/web-e2e",
"cypressConfig": "apps/web-e2e/cypress.config.ts",
"parallel": true,
"record": true,
"tag": "nx",
Expand All @@ -23,7 +24,7 @@
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/web-e2e/**/*.{js,ts}"]
"lintFilePatterns": ["apps/web-e2e/**/*.ts"]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["@nrwl/js/babel"]
"presets": ["@nx/js/babel"]
}
8 changes: 4 additions & 4 deletions apps/web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": [],
"targets": {
"build": {
"executor": "@nrwl/vite:build",
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand All @@ -22,7 +22,7 @@
}
},
"serve": {
"executor": "@nrwl/vite:dev-server",
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "web:build"
Expand All @@ -39,7 +39,7 @@
}
},
"preview": {
"executor": "@nrwl/vite:preview-server",
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "web:build"
Expand All @@ -61,7 +61,7 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/web/jest.config.ts",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/app.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ export class AppElement extends HTMLElement {
Add UI library
</summary>
<pre><span># Generate UI lib</span>
nx g @nrwl/angular:lib ui
nx g @nx/angular:lib ui
<span># Add a component</span>
nx g @nrwl/angular:component button --project ui</pre>
nx g @nx/angular:component button --project ui</pre>
</details>
<details>
<summary>
Expand Down
6 changes: 2 additions & 4 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';

import viteTsConfigPaths from 'vite-tsconfig-paths';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

export default defineConfig({
cacheDir: '../../node_modules/.vite/web',
Expand All @@ -17,9 +17,7 @@ export default defineConfig({
},

plugins: [
viteTsConfigPaths({
root: '../../',
}),
nxViteTsPaths(),
],

// Uncomment this if you are using workers.
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getJestProjects } from '@nrwl/jest';
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
Expand Down
8 changes: 4 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nrwl/web"
"defaultCollection": "@nx/web"
},
"implicitDependencies": {
"package.json": {
Expand All @@ -15,7 +15,7 @@
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"runner": "@nx/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
Expand All @@ -31,13 +31,13 @@
},
"defaultProject": "web",
"generators": {
"@nrwl/web:application": {
"@nx/web:application": {
"style": "css",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
},
"@nrwl/web:library": {
"@nx/web:library": {
"style": "css",
"linter": "eslint",
"unitTestRunner": "jest"
Expand Down
Loading

0 comments on commit 453c355

Please sign in to comment.