From bfb68cbdf33799d6b5e5d582804bb3e210492129 Mon Sep 17 00:00:00 2001 From: Sylwia Vargas Date: Sat, 15 Oct 2022 15:03:18 +0100 Subject: [PATCH 1/8] adds a monorepo support info --- docs/codeflow/codeflow-faq.md | 4 ++ docs/codeflow/working-in-codeflow-ide.md | 62 ++++++++++++++++++- package-lock.json | 76 +++++++++++------------- 3 files changed, 100 insertions(+), 42 deletions(-) diff --git a/docs/codeflow/codeflow-faq.md b/docs/codeflow/codeflow-faq.md index 72caac73..622177f1 100644 --- a/docs/codeflow/codeflow-faq.md +++ b/docs/codeflow/codeflow-faq.md @@ -53,6 +53,10 @@ Yes. Private repositories are available for free during beta through 2022. Start At this moment we only support GitHub.com repositories. +### Can I run monorepos? Does Codeflow support workspaces? + +Yes! Please see the walkthrough at [the "Working in Codeflow IDE" page](/codeflow/working-in-codeflow-ide#running-monorepos-in-codeflow-ide). + ### Which files can be opened in Web Publisher? Any file type can be opened in Web Publisher. diff --git a/docs/codeflow/working-in-codeflow-ide.md b/docs/codeflow/working-in-codeflow-ide.md index 084327de..65678008 100644 --- a/docs/codeflow/working-in-codeflow-ide.md +++ b/docs/codeflow/working-in-codeflow-ide.md @@ -81,7 +81,6 @@ Follow these steps: To integrate the bot, please follow the instructions on [Integrating CodeflowApp bot](./integrating-codeflowapp-bot.md). - ## Troubleshooting ### Out of memory error @@ -108,4 +107,63 @@ Check in the terminal if the dev server is still running. If you want to restart ### Reopening the Preview panel -If you close the Preview by accident, you can reopen it by selecting the icon of a plug entitled "Ports in use" from the left-side navigation bar. Note that you can open the Preview in a separate tab or as a split screen. \ No newline at end of file +If you close the Preview by accident, you can reopen it by selecting the icon of a plug entitled "Ports in use" from the left-side navigation bar. Note that you can open the Preview in a separate tab or as a split screen. + +## Running monorepos in Codeflow IDE + +Codeflow IDE supports workspaces. Follow a walkthrough below to get your monorepo running in Codeflow. + +### npm + +To define a workspace, add the `workspaces` field to the `package.json`: + +``` +"workspaces": [ + "packages/*" +], +``` + +This refers to every sub-directory inside `packages` which contains a `package.json`. + +Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information. + + +### pnpm + +To configure a workspace with pnpm, add the `pnpm-workspace.yaml` file to the root of the project: + +```yaml +packages: + - 'packages/*' +``` + +Next, add a package from the workspace as a dependency to another package. In the example below we define `frontend` as dependent on `common`: + +```json +"dependencies": { + "common": "workspace:^1.0.0" +} +``` + +The `workspace:` protocol ensures the correct package from the workspace is used. However, this is not required because, by default, pnpm will link packages from the workspace if the available packages match the declared ranges. + +Check [pnpm documentation](https://pnpm.io/workspaces) for more information. + + +### Yarn + +To define a workspace with yarn, add the `workspaces` field to our `package.json`: + +``` +"workspaces": [ + "packages/*" +], +``` + +This refers to every sub-directory inside `packages` which contains a `package.json`. + +:::info +Note that a yarn workspace looks somewhat identical to an npm workspace. For the most parts that's true, but yarn also has [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). +::: + +Check [yarn documentation](https://classic.yarnpkg.com/lang/en/docs/workspaces) for more information. diff --git a/package-lock.json b/package-lock.json index e8f6dd31..40ebe5fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -499,7 +499,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -512,7 +512,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" } @@ -526,7 +526,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -538,7 +538,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "funding": [ { "type": "individual", @@ -920,7 +920,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -950,7 +950,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -973,13 +973,13 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -1002,7 +1002,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1011,7 +1011,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -1023,7 +1023,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.12.0" } @@ -1056,7 +1056,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1075,7 +1075,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8.6" }, @@ -1134,7 +1134,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -1176,7 +1176,7 @@ "version": "1.55.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz", "integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -1235,7 +1235,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -1523,8 +1523,7 @@ "@vitejs/plugin-vue": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.1.2.tgz", - "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==", - "requires": {} + "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==" }, "@vue/compiler-core": { "version": "3.2.40", @@ -1634,8 +1633,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.1.3.tgz", "integrity": "sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==", - "dev": true, - "requires": {} + "dev": true }, "@vueuse/core": { "version": "9.3.0", @@ -1651,8 +1649,7 @@ "vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "requires": {} + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==" } } }, @@ -1672,8 +1669,7 @@ "vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "requires": {} + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==" } } }, @@ -1702,7 +1698,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1712,7 +1708,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true + "dev": true }, "body-scroll-lock": { "version": "4.0.0-beta.0", @@ -1723,7 +1719,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1732,7 +1728,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1913,7 +1909,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -1933,7 +1929,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -1950,13 +1946,13 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -1973,13 +1969,13 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true + "dev": true }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -1988,7 +1984,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true + "dev": true }, "jsonc-parser": { "version": "3.1.0", @@ -2012,7 +2008,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true + "dev": true }, "path-parse": { "version": "1.0.7", @@ -2028,7 +2024,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true + "dev": true }, "postcss": { "version": "8.4.17", @@ -2055,7 +2051,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -2082,7 +2078,7 @@ "version": "1.55.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz", "integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==", - "devOptional": true, + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -2123,7 +2119,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "requires": { "is-number": "^7.0.0" } From a2ad4f8d7572d761aa23ed16a77faab9e492a368 Mon Sep 17 00:00:00 2001 From: Sylwia Vargas Date: Sat, 15 Oct 2022 15:08:10 +0100 Subject: [PATCH 2/8] adds switching to remote branch troubleshooting --- docs/codeflow/working-in-codeflow-ide.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/codeflow/working-in-codeflow-ide.md b/docs/codeflow/working-in-codeflow-ide.md index 65678008..8e2d0726 100644 --- a/docs/codeflow/working-in-codeflow-ide.md +++ b/docs/codeflow/working-in-codeflow-ide.md @@ -91,6 +91,10 @@ It may happen that having a few Codeflow IDE or StackBlitz projects open at the +### Can't switch to a remote branch + +Currently, when you load your repository, Codeflow only pulls in the branch you are trying to open or the default one. For now, to switch to a remote branch you can either fetch the branches (by running `git fetch` in the terminal) or immediately open the desired branch through its URL by following this pattern: `http://pr.new/github/${owner}/${repo}/tree/${branchName}` + ### Preview doesn't work If the Preview doesn't work, oftentimes browser configuration or browser incompatibility is the culprit. Please see [this page for troubleshooting](/platform/webcontainers/browser-support). From e30fc7f363cded94356ae6062cd1885f54ae7222 Mon Sep 17 00:00:00 2001 From: Sylwia Vargas Date: Mon, 17 Oct 2022 11:11:30 +0100 Subject: [PATCH 3/8] adds examples --- docs/codeflow/working-in-codeflow-ide.md | 26 +++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/codeflow/working-in-codeflow-ide.md b/docs/codeflow/working-in-codeflow-ide.md index 8e2d0726..0d4e8f3f 100644 --- a/docs/codeflow/working-in-codeflow-ide.md +++ b/docs/codeflow/working-in-codeflow-ide.md @@ -115,10 +115,27 @@ If you close the Preview by accident, you can reopen it by selecting the icon of ## Running monorepos in Codeflow IDE -Codeflow IDE supports workspaces. Follow a walkthrough below to get your monorepo running in Codeflow. +Codeflow IDE supports workspaces. Follow a walkthrough below to get your monorepo running in Codeflow. You can also see demos for each of the package managers in this [monorepo demo collection](https://stackblitz.com/@d3lm/collections/workspaces). ### npm +Your project repository may look like this: + +``` +workspace-project +├─ packages +│ ├─ backend +│ │ ├─ package.json +│ │ └─ index.js +│ ├─ frontend +│ │ ├─ package.json +│ │ └─ index.js +│ └─ common +│ ├─ package.json +│ └─ index.js +└─ package.json +``` + To define a workspace, add the `workspaces` field to the `package.json`: ``` @@ -129,8 +146,7 @@ To define a workspace, add the `workspaces` field to the `package.json`: This refers to every sub-directory inside `packages` which contains a `package.json`. -Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information. - +Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information or [this npm-based monorepo demo](https://stackblitz.com/edit/node-4cygsf?file=README.md) for reference. ### pnpm @@ -151,7 +167,7 @@ Next, add a package from the workspace as a dependency to another package. In th The `workspace:` protocol ensures the correct package from the workspace is used. However, this is not required because, by default, pnpm will link packages from the workspace if the available packages match the declared ranges. -Check [pnpm documentation](https://pnpm.io/workspaces) for more information. +Check [pnpm documentation](https://pnpm.io/workspaces) for more information or [this pnpm-based monorepo demo](https://stackblitz.com/edit/node-gw1rvh?file=README.md) for reference. ### Yarn @@ -170,4 +186,4 @@ This refers to every sub-directory inside `packages` which contains a `package.j Note that a yarn workspace looks somewhat identical to an npm workspace. For the most parts that's true, but yarn also has [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). ::: -Check [yarn documentation](https://classic.yarnpkg.com/lang/en/docs/workspaces) for more information. +Check [yarn documentation](https://classic.yarnpkg.com/lang/en/docs/workspaces) for more information or [this Yarn-based monorepo demo](https://stackblitz.com/edit/node-av3xqf?file=README.md) for reference. From b3f1a741a80ded400cbf1a8ad83dedaa042f6a4b Mon Sep 17 00:00:00 2001 From: Sylwia Vargas Date: Mon, 7 Nov 2022 15:57:40 +0000 Subject: [PATCH 4/8] adds monorepo support page in the docs --- docs/codeflow/working-in-codeflow-ide.md | 70 +---------------- docs/data.ts | 1 + docs/parts/monorepo-support.md | 70 +++++++++++++++++ .../webcontainers/monorepo-support.md | 8 ++ package-lock.json | 76 +++++++++---------- 5 files changed, 116 insertions(+), 109 deletions(-) create mode 100644 docs/parts/monorepo-support.md create mode 100644 docs/platform/webcontainers/monorepo-support.md diff --git a/docs/codeflow/working-in-codeflow-ide.md b/docs/codeflow/working-in-codeflow-ide.md index dfd529d3..ea5333e4 100644 --- a/docs/codeflow/working-in-codeflow-ide.md +++ b/docs/codeflow/working-in-codeflow-ide.md @@ -115,74 +115,6 @@ If you close the Preview by accident, you can reopen it by selecting the icon of ## Running monorepos in Codeflow IDE -Codeflow IDE supports workspaces. Follow a walkthrough below to get your monorepo running in Codeflow. You can also see demos for each of the package managers in this [monorepo demo collection](https://stackblitz.com/@d3lm/collections/workspaces). +Codeflow IDE supports workspaces. Follow a walkthrough below to get your monorepo running in Codeflow. -### npm - -Your project repository may look like this: - -``` -workspace-project -├─ packages -│ ├─ backend -│ │ ├─ package.json -│ │ └─ index.js -│ ├─ frontend -│ │ ├─ package.json -│ │ └─ index.js -│ └─ common -│ ├─ package.json -│ └─ index.js -└─ package.json -``` - -To define a workspace, add the `workspaces` field to the `package.json`: - -``` -"workspaces": [ - "packages/*" -], -``` - -This refers to every sub-directory inside `packages` which contains a `package.json`. - -Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information or [this npm-based monorepo demo](https://stackblitz.com/edit/node-4cygsf?file=README.md) for reference. - -### pnpm - -To configure a workspace with pnpm, add the `pnpm-workspace.yaml` file to the root of the project: - -```yaml -packages: - - 'packages/*' -``` - -Next, add a package from the workspace as a dependency to another package. In the example below we define `frontend` as dependent on `common`: - -```json -"dependencies": { - "common": "workspace:^1.0.0" -} -``` - -The `workspace:` protocol ensures the correct package from the workspace is used. However, this is not required because, by default, pnpm will link packages from the workspace if the available packages match the declared ranges. - -Check [pnpm documentation](https://pnpm.io/workspaces) for more information or [this pnpm-based monorepo demo](https://stackblitz.com/edit/node-gw1rvh?file=README.md) for reference. - - -### Yarn - -To define a workspace with yarn, add the `workspaces` field to our `package.json`: - -``` -"workspaces": [ - "packages/*" -], -``` - -This refers to every sub-directory inside `packages` which contains a `package.json`. - -:::info -Note that a yarn workspace looks somewhat identical to an npm workspace. For the most parts that's true, but yarn also has [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). -::: diff --git a/docs/data.ts b/docs/data.ts index b5160780..dd998ff2 100644 --- a/docs/data.ts +++ b/docs/data.ts @@ -48,6 +48,7 @@ export const webcontainersLinks = [ { text: 'Browser configuration', link: '/platform/webcontainers/browser-config' }, { text: 'Project configuration', link: '/platform/webcontainers/project-config' }, { text: 'Turbo package manager', link: '/platform/webcontainers/turbo-package-manager' }, + { text: 'Monorepo support', link: '/platform/webcontainers/monorepo-support' }, { text: 'Troubleshooting', link: '/platform/webcontainers/troubleshooting-webcontainers' }, ]; diff --git a/docs/parts/monorepo-support.md b/docs/parts/monorepo-support.md new file mode 100644 index 00000000..4e76e9a1 --- /dev/null +++ b/docs/parts/monorepo-support.md @@ -0,0 +1,70 @@ +You can also see demos for each of the package managers in this [monorepo demo collection](https://stackblitz.com/@d3lm/collections/workspaces). + +### npm + +Your project repository may look like this: + +``` +workspace-project +├─ packages +│ ├─ backend +│ │ ├─ package.json +│ │ └─ index.js +│ ├─ frontend +│ │ ├─ package.json +│ │ └─ index.js +│ └─ common +│ ├─ package.json +│ └─ index.js +└─ package.json +``` + +To define a workspace, add the `workspaces` field to the `package.json`: + +``` +"workspaces": [ + "packages/*" +], +``` + +This refers to every sub-directory inside `packages` which contains a `package.json`. + +Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information or [this npm-based monorepo demo](https://stackblitz.com/edit/node-4cygsf?file=README.md) for reference. + +### pnpm + +To configure a workspace with pnpm, add the `pnpm-workspace.yaml` file to the root of the project: + +```yaml +packages: + - 'packages/*' +``` + +Next, add a package from the workspace as a dependency to another package. In the example below we define `frontend` as dependent on `common`: + +```json +"dependencies": { + "common": "workspace:^1.0.0" +} +``` + +The `workspace:` protocol ensures the correct package from the workspace is used. However, this is not required because, by default, pnpm will link packages from the workspace if the available packages match the declared ranges. + +Check [pnpm documentation](https://pnpm.io/workspaces) for more information or [this pnpm-based monorepo demo](https://stackblitz.com/edit/node-gw1rvh?file=README.md) for reference. + + +### Yarn + +To define a workspace with yarn, add the `workspaces` field to our `package.json`: + +``` +"workspaces": [ + "packages/*" +], +``` + +This refers to every sub-directory inside `packages` which contains a `package.json`. + +:::info +Note that a yarn workspace looks somewhat identical to an npm workspace. For the most parts that's true, but yarn also has [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). +::: \ No newline at end of file diff --git a/docs/platform/webcontainers/monorepo-support.md b/docs/platform/webcontainers/monorepo-support.md new file mode 100644 index 00000000..8b44c2eb --- /dev/null +++ b/docs/platform/webcontainers/monorepo-support.md @@ -0,0 +1,8 @@ +--- +title: Monorepo support in WebContainers +--- + +# {{ $frontmatter.title }} + + +WebContainers support workspaces. Follow a walkthrough below to get your monorepo running in WebContainers. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 52ebde8f..b782f766 100644 --- a/package-lock.json +++ b/package-lock.json @@ -500,7 +500,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -513,7 +513,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" } @@ -527,7 +527,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -539,7 +539,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "funding": [ { "type": "individual", @@ -921,7 +921,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -951,7 +951,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -974,13 +974,13 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -1003,7 +1003,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1012,7 +1012,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -1024,7 +1024,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.12.0" } @@ -1063,7 +1063,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1082,7 +1082,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8.6" }, @@ -1141,7 +1141,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -1183,7 +1183,7 @@ "version": "1.56.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.0.tgz", "integrity": "sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -1242,7 +1242,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -1530,8 +1530,7 @@ "@vitejs/plugin-vue": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.1.2.tgz", - "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==", - "requires": {} + "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==" }, "@vue/compiler-core": { "version": "3.2.41", @@ -1641,8 +1640,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.1.3.tgz", "integrity": "sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==", - "dev": true, - "requires": {} + "dev": true }, "@vueuse/core": { "version": "9.4.0", @@ -1658,8 +1656,7 @@ "vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "requires": {} + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==" } } }, @@ -1679,8 +1676,7 @@ "vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "requires": {} + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==" } } }, @@ -1709,7 +1705,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1719,7 +1715,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true + "dev": true }, "body-scroll-lock": { "version": "4.0.0-beta.0", @@ -1730,7 +1726,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1739,7 +1735,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1920,7 +1916,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -1940,7 +1936,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -1957,13 +1953,13 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -1980,13 +1976,13 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true + "dev": true }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -1995,7 +1991,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true + "dev": true }, "jsonc-parser": { "version": "3.1.0", @@ -2025,7 +2021,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true + "dev": true }, "path-parse": { "version": "1.0.7", @@ -2041,7 +2037,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true + "dev": true }, "postcss": { "version": "8.4.17", @@ -2068,7 +2064,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -2095,7 +2091,7 @@ "version": "1.56.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.0.tgz", "integrity": "sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw==", - "devOptional": true, + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -2136,7 +2132,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "requires": { "is-number": "^7.0.0" } From 9aba28977701083aaf31feed8f439bee2a18334d Mon Sep 17 00:00:00 2001 From: Sylwia Vargas <45401242+sylwiavargas@users.noreply.github.com> Date: Wed, 9 Nov 2022 13:34:17 +0000 Subject: [PATCH 5/8] Update docs/codeflow/working-in-codeflow-ide.md Co-authored-by: Florens Verschelde --- docs/codeflow/working-in-codeflow-ide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeflow/working-in-codeflow-ide.md b/docs/codeflow/working-in-codeflow-ide.md index ea5333e4..60367a9f 100644 --- a/docs/codeflow/working-in-codeflow-ide.md +++ b/docs/codeflow/working-in-codeflow-ide.md @@ -93,7 +93,7 @@ It may happen that having a few Codeflow IDE or StackBlitz projects open at the ### Can't switch to a remote branch -Currently, when you load your repository, Codeflow only pulls in the branch you are trying to open or the default one. For now, to switch to a remote branch you can either fetch the branches (by running `git fetch` in the terminal) or immediately open the desired branch through its URL by following this pattern: `http://pr.new/github/${owner}/${repo}/tree/${branchName}` +Currently, when you load your repository, Codeflow only pulls in the branch you are trying to open or the default one. To switch to a remote branch you can either fetch the branches (by running `git fetch` in the terminal) or immediately open the desired branch through its URL by following this pattern: `https://pr.new/github/${owner}/${repo}/tree/${branchName}` ### Preview doesn't work From 480cd22f0adc6891d36cda48484feb8ebfef615b Mon Sep 17 00:00:00 2001 From: Sylwia Vargas <45401242+sylwiavargas@users.noreply.github.com> Date: Wed, 9 Nov 2022 13:34:57 +0000 Subject: [PATCH 6/8] Update docs/parts/monorepo-support.md --- docs/parts/monorepo-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parts/monorepo-support.md b/docs/parts/monorepo-support.md index 4e76e9a1..eaf9f04b 100644 --- a/docs/parts/monorepo-support.md +++ b/docs/parts/monorepo-support.md @@ -21,7 +21,7 @@ workspace-project To define a workspace, add the `workspaces` field to the `package.json`: -``` +```json "workspaces": [ "packages/*" ], From ea80e3bb567b33958e4ce1ef7e19471c5a732e53 Mon Sep 17 00:00:00 2001 From: Sylwia Vargas <45401242+sylwiavargas@users.noreply.github.com> Date: Wed, 9 Nov 2022 13:35:44 +0000 Subject: [PATCH 7/8] Update docs/parts/monorepo-support.md --- docs/parts/monorepo-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parts/monorepo-support.md b/docs/parts/monorepo-support.md index eaf9f04b..920ca4ca 100644 --- a/docs/parts/monorepo-support.md +++ b/docs/parts/monorepo-support.md @@ -29,7 +29,7 @@ To define a workspace, add the `workspaces` field to the `package.json`: This refers to every sub-directory inside `packages` which contains a `package.json`. -Check [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information or [this npm-based monorepo demo](https://stackblitz.com/edit/node-4cygsf?file=README.md) for reference. +Check the [npm documentation](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for more information or [this npm-based monorepo demo](https://stackblitz.com/edit/node-4cygsf?file=README.md) for reference. ### pnpm From a484f755e2e81192f2a9e6ed578249848cfbe9ea Mon Sep 17 00:00:00 2001 From: Sylwia Vargas <45401242+sylwiavargas@users.noreply.github.com> Date: Wed, 9 Nov 2022 13:35:57 +0000 Subject: [PATCH 8/8] Update docs/parts/monorepo-support.md Co-authored-by: Florens Verschelde --- docs/parts/monorepo-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parts/monorepo-support.md b/docs/parts/monorepo-support.md index 920ca4ca..56abe84f 100644 --- a/docs/parts/monorepo-support.md +++ b/docs/parts/monorepo-support.md @@ -66,5 +66,5 @@ To define a workspace with yarn, add the `workspaces` field to our `package.json This refers to every sub-directory inside `packages` which contains a `package.json`. :::info -Note that a yarn workspace looks somewhat identical to an npm workspace. For the most parts that's true, but yarn also has [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). +Note that a yarn workspace looks somewhat identical to an npm workspace. For the most part that's true, but yarn also adds useful features such as [`nohoist`](https://classic.yarnpkg.com/blog/2018/02/15/nohoist). ::: \ No newline at end of file