Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into nest-simple-name
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-hunter committed Mar 31, 2023
2 parents d49e671 + 6e7234c commit 8f5077d
Show file tree
Hide file tree
Showing 46 changed files with 793 additions and 698 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": [],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-imports": ["error", "create-nx-workspace"]
},
"overrides": [
{
Expand Down
8 changes: 8 additions & 0 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -5512,6 +5512,14 @@
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "preset",
"path": "/packages/nx-plugin/generators/preset",
"name": "preset",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
Expand Down
9 changes: 9 additions & 0 deletions docs/generated/manifests/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,15 @@
"originalFilePath": "/packages/nx-plugin/src/generators/lint-checks/schema.json",
"path": "/packages/nx-plugin/generators/plugin-lint-checks",
"type": "generator"
},
"/packages/nx-plugin/generators/preset": {
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nrwl/nx-plugin`.",
"file": "generated/packages/nx-plugin/generators/preset.json",
"hidden": true,
"name": "preset",
"originalFilePath": "/packages/nx-plugin/src/generators/preset/schema.json",
"path": "/packages/nx-plugin/generators/preset",
"type": "generator"
}
},
"path": "/packages/nx-plugin"
Expand Down
9 changes: 9 additions & 0 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,15 @@
"originalFilePath": "/packages/nx-plugin/src/generators/lint-checks/schema.json",
"path": "nx-plugin/generators/plugin-lint-checks",
"type": "generator"
},
{
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nrwl/nx-plugin`.",
"file": "generated/packages/nx-plugin/generators/preset.json",
"hidden": true,
"name": "preset",
"originalFilePath": "/packages/nx-plugin/src/generators/preset/schema.json",
"path": "nx-plugin/generators/preset",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
Expand Down
28 changes: 28 additions & 0 deletions docs/generated/packages/nx-plugin/generators/preset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "preset",
"factory": "./src/generators/preset/generator",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginPreset",
"title": "Generator ran by create-nx-plugin",
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-plugin` or `create-nx-workspace --preset @nrwl/nx-plugin`.",
"type": "object",
"properties": {
"pluginName": {
"type": "string",
"description": "Plugin name",
"aliases": ["name"]
}
},
"required": ["pluginName"],
"presets": []
},
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nrwl/nx-plugin`.",
"hidden": true,
"x-use-standalone-layout": true,
"implementation": "/packages/nx-plugin/src/generators/preset/generator.ts",
"aliases": [],
"path": "/packages/nx-plugin/src/generators/preset/schema.json",
"type": "generator"
}
2 changes: 1 addition & 1 deletion e2e/utils/create-project-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function runCreatePlugin(
} create-nx-plugin@${getPublishedVersion()} ${name}`;

if (pluginName) {
command += ` --pluginName=${pluginName}`;
command += ` --pluginName=${pluginName} --no-nxCloud`;
}

if (packageManager && !useDetectedPm) {
Expand Down
11 changes: 6 additions & 5 deletions e2e/workspace-create/src/create-nx-plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import {
uniq,
runCreatePlugin,
cleanupProject,
tmpProjPath,
} from '@nrwl/e2e/utils';

describe('create-nx-plugin', () => {
const packageManager = getSelectedPackageManager() || 'pnpm';

afterEach(() => cleanupProject());

// TODO: Re-enable to work with pnpm
xit('should be able to create a plugin repo and run plugin e2e', () => {
it('should be able to create a plugin repo and run plugin e2e', () => {
const wsName = uniq('ws-plugin');
const pluginName = uniq('plugin');

Expand All @@ -26,10 +26,11 @@ describe('create-nx-plugin', () => {
checkFilesExist(
'package.json',
packageManagerLockFile[packageManager],
`packages/${pluginName}/package.json`,
`packages/${pluginName}/project.json`
`project.json`,
`generators.json`,
`executors.json`
);

expect(() => runCLI(`e2e ${pluginName}-e2e`)).not.toThrow();
expect(() => runCLI(`e2e e2e`)).not.toThrow();
});
});
12 changes: 11 additions & 1 deletion packages/create-nx-plugin/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"extends": "../../.eslintrc",
"rules": {},
"rules": {
"no-restricted-imports": [
"error",
"@nrwl/workspace",
"@angular-devkit/core",
"@angular-devkit/architect",
"@angular-devkit/schematics",
"nx",
"@nrwl/devkit"
]
},
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
Loading

0 comments on commit 8f5077d

Please sign in to comment.