chore(repo): remove workspace.json (#13040)

This commit is contained in:
Craigory Coppola 2022-11-08 13:12:31 -05:00 committed by GitHub
parent 000eebdbe1
commit f311ecbdd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 93 additions and 98 deletions

View File

@ -1,4 +1,5 @@
{
"name": "docs",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "docs",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-add-nx-to-monorepo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/add-nx-to-monorepo",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-angular-core",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/angular-core",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-angular-extensions",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/angular-extensions",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-cypress",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/cypress",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-detox",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/detox",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-esbuild",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/esbuild",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-expo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/expo",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-jest",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/jest",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-js",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/js",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-linter",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/linter",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-make-angular-cli-faster",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/make-angular-cli-faster",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-next",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/next",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-node",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/node",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-nx-init",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/nx-init",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-nx-misc",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/nx-misc",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-nx-plugin",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/nx-plugin",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-nx-run",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/nx-run",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-react-native",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/react-native",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-react",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/react",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-rollup",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/rollup",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-storybook-angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/storybook-angular",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-storybook",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/storybook",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-utils",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/utils",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-vite",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/vite",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-web",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/web",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-webpack",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/webpack",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-workspace-create",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/workspace-create",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "e2e-graph-client",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "graph/client-e2e/src",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "graph-client",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "graph/client/src",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-data-access-documents",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/data-access-documents/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-data-access-menu",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/data-access-menu/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-data-access-packages",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/data-access-packages/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-feature-analytics",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/feature-analytics/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-feature-doc-viewer",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/feature-doc-viewer/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-feature-package-schema-viewer",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/feature-package-schema-viewer/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-feature-search",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/feature-search/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-models-document",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/models-document/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-models-menu",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/models-menu/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-models-package",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/models-package/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/nx-dev-e2e/src",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/nx-dev",
"projectType": "application",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-commands",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-commands/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-common",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-common/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-community",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-community/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-conference",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-conference/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-home",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-home/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-markdoc",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-markdoc/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-member-card",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-member-card/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-references",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-references/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-sponsor-card",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-sponsor-card/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-dev-ui-theme",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nx-dev/ui-theme/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "add-nx-to-monorepo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/add-nx-to-monorepo/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/angular",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "cli",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/cli",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "cra-to-nx",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/cra-to-nx/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "create-nx-plugin",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/create-nx-plugin",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "create-nx-workspace",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/create-nx-workspace",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "cypress",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/cypress",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "detox",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/detox/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "devkit",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/devkit",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "esbuild",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/esbuild",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "eslint-plugin-nx",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/eslint-plugin-nx",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "expo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/expo/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "express",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/express",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "jest",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/jest",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "js",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "linter",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/linter",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "make-angular-cli-faster",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/make-angular-cli-faster/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nest",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/nest",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "next",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/next",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "node",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/node",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx-plugin",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/nx-plugin",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "nx",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/nx",
"projectType": "library",

View File

@ -339,6 +339,7 @@ describe('project configuration', () => {
updateProjectConfiguration(tree, 'test', expectedProjectConfig);
expect(readJson(tree, 'libs/test/project.json')).toEqual({
name: 'test',
...expectedProjectConfig,
root: undefined,
});
@ -589,6 +590,7 @@ describe('project configuration', () => {
updateProjectConfiguration(tree, 'test', expectedProjectConfig);
expect(readJson(tree, 'libs/test/project.json')).toEqual({
name: 'test',
...expectedProjectConfig,
root: undefined,
});

View File

@ -353,18 +353,18 @@ function addProjectToWorkspaceJson(
);
}
const configFile =
const projectConfigFile =
(mode === 'create' && standalone) || !workspaceConfigPath
? joinPathFragments(project.root, 'project.json')
: getProjectFileLocation(tree, projectName);
const jsonSchema =
configFile && mode === 'create'
projectConfigFile && mode === 'create'
? { $schema: getRelativeProjectJsonSchemaPath(tree, project) }
: {};
if (configFile) {
if (projectConfigFile) {
if (mode === 'delete') {
tree.delete(configFile);
tree.delete(projectConfigFile);
delete workspaceJson.projects[projectName];
} else {
// keep real workspace up to date
@ -373,9 +373,9 @@ function addProjectToWorkspaceJson(
}
// update the project.json file
writeJson(tree, configFile, {
writeJson(tree, projectConfigFile, {
...jsonSchema,
name: mode === 'create' ? projectName : project.name,
name: mode === 'create' ? projectName : project.name ?? projectName,
...project,
root: undefined,
});

View File

@ -1,4 +1,5 @@
{
"name": "react-native",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/react-native/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "react",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/react",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "rollup",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/rollup",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "storybook",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/storybook",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "tao",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/tao",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "vite",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/vite",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "web",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/web",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "webpack",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/webpack",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "workspace",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/workspace/src",
"projectType": "library",

View File

@ -1,4 +1,5 @@
{
"name": "eslint-rules",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "tools/eslint-rules",
"targets": {

View File

@ -1,4 +1,5 @@
{
"name": "typedoc-theme",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "typedoc-theme/src",
"projectType": "library",

View File

@ -1,92 +0,0 @@
{
"version": 2,
"projects": {
"add-nx-to-monorepo": "packages/add-nx-to-monorepo",
"angular": "packages/angular",
"cli": "packages/cli",
"cra-to-nx": "packages/cra-to-nx",
"create-nx-plugin": "packages/create-nx-plugin",
"create-nx-workspace": "packages/create-nx-workspace",
"cypress": "packages/cypress",
"detox": "packages/detox",
"devkit": "packages/devkit",
"docs": "docs",
"e2e-add-nx-to-monorepo": "e2e/add-nx-to-monorepo",
"e2e-angular-core": "e2e/angular-core",
"e2e-angular-extensions": "e2e/angular-extensions",
"e2e-cypress": "e2e/cypress",
"e2e-detox": "e2e/detox",
"e2e-esbuild": "e2e/esbuild",
"e2e-expo": "e2e/expo",
"e2e-graph-client": "graph/client-e2e",
"e2e-jest": "e2e/jest",
"e2e-js": "e2e/js",
"e2e-linter": "e2e/linter",
"e2e-make-angular-cli-faster": "e2e/make-angular-cli-faster",
"e2e-next": "e2e/next",
"e2e-node": "e2e/node",
"e2e-nx-init": "e2e/nx-init",
"e2e-nx-misc": "e2e/nx-misc",
"e2e-nx-plugin": "e2e/nx-plugin",
"e2e-nx-run": "e2e/nx-run",
"e2e-react": "e2e/react",
"e2e-react-native": "e2e/react-native",
"e2e-rollup": "e2e/rollup",
"e2e-storybook": "e2e/storybook",
"e2e-storybook-angular": "e2e/storybook-angular",
"e2e-utils": "e2e/utils",
"e2e-vite": "e2e/vite",
"e2e-web": "e2e/web",
"e2e-webpack": "e2e/webpack",
"e2e-workspace-create": "e2e/workspace-create",
"esbuild": "packages/esbuild",
"eslint-plugin-nx": "packages/eslint-plugin-nx",
"eslint-rules": "tools/eslint-rules",
"expo": "packages/expo",
"express": "packages/express",
"graph-client": "graph/client",
"graph-ui-graph": "graph/ui-graph",
"jest": "packages/jest",
"js": "packages/js",
"linter": "packages/linter",
"make-angular-cli-faster": "packages/make-angular-cli-faster",
"nest": "packages/nest",
"next": "packages/next",
"node": "packages/node",
"nx": "packages/nx",
"nx-dev": "nx-dev/nx-dev",
"nx-dev-data-access-documents": "nx-dev/data-access-documents",
"nx-dev-data-access-menu": "nx-dev/data-access-menu",
"nx-dev-data-access-packages": "nx-dev/data-access-packages",
"nx-dev-e2e": "nx-dev/nx-dev-e2e",
"nx-dev-feature-analytics": "nx-dev/feature-analytics",
"nx-dev-feature-doc-viewer": "nx-dev/feature-doc-viewer",
"nx-dev-feature-package-schema-viewer": "nx-dev/feature-package-schema-viewer",
"nx-dev-feature-search": "nx-dev/feature-search",
"nx-dev-models-document": "nx-dev/models-document",
"nx-dev-models-menu": "nx-dev/models-menu",
"nx-dev-models-package": "nx-dev/models-package",
"nx-dev-ui-commands": "nx-dev/ui-commands",
"nx-dev-ui-common": "nx-dev/ui-common",
"nx-dev-ui-community": "nx-dev/ui-community",
"nx-dev-ui-conference": "nx-dev/ui-conference",
"nx-dev-ui-home": "nx-dev/ui-home",
"nx-dev-ui-markdoc": "nx-dev/ui-markdoc",
"nx-dev-ui-member-card": "nx-dev/ui-member-card",
"nx-dev-ui-references": "nx-dev/ui-references",
"nx-dev-ui-sponsor-card": "nx-dev/ui-sponsor-card",
"nx-dev-ui-theme": "nx-dev/ui-theme",
"nx-plugin": "packages/nx-plugin",
"react": "packages/react",
"react-native": "packages/react-native",
"rollup": "packages/rollup",
"storybook": "packages/storybook",
"tao": "packages/tao",
"typedoc-theme": "typedoc-theme",
"vite": "packages/vite",
"web": "packages/web",
"webpack": "packages/webpack",
"workspace": "packages/workspace"
},
"$schema": "./node_modules/nx/schemas/workspace-schema.json"
}