Skip to content

Commit

Permalink
Change Nx detection to the new npm scope (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
beaussan committed Oct 17, 2023
1 parent 6cd5a1d commit 4d6dea8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions fixtures/plugins/nx/apps/b/project.json
@@ -0,0 +1,18 @@
{
"sourceRoot": "apps/b",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/next:build"
},
"serve": {
"executor": "@nx/next:server"
},
"lint": {
"executor": "@nx/linter:eslint"
},
"test": {
"executor": "@js/cypress:cypress"
}
}
}
3 changes: 3 additions & 0 deletions fixtures/plugins/nx/package.json
Expand Up @@ -4,6 +4,9 @@
"nx": "nx"
},
"devDependencies": {
"@nx/next": "*",
"@nx/linter": "*",
"@nx/cypress": "*",
"@nrwl/cypress": "*",
"@nrwl/devkit": "*",
"@nrwl/jest": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/nx/index.ts
Expand Up @@ -8,7 +8,7 @@ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types
export const NAME = 'Nx';

/** @public */
export const ENABLERS = ['nx', /^@nrwl\//];
export const ENABLERS = ['nx', /^@nrwl\//, /^@nx\//];

export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDependency(dependencies, ENABLERS);

Expand Down

0 comments on commit 4d6dea8

Please sign in to comment.