diff --git a/packages/api/CONTRIBUTING.md b/packages/api/CONTRIBUTING.md index e7c446728d..8a6ea6f0bb 100644 --- a/packages/api/CONTRIBUTING.md +++ b/packages/api/CONTRIBUTING.md @@ -6,17 +6,21 @@ Welcome and thank you for your interest in contributing to **@microsoft/teamsfx- Follow the official documents to install the required softwares: 1. [Git](https://git-scm.com/) -2. [Node.js and NPM](https://nodejs.org/), **x64**, Node version >= 10.x, <= 14.x -3. [Visual Studio Code](https://code.visualstudio.com/) +2. [Node.js and NPM](https://nodejs.org/), **x64**, Node version >= 18.x +3. [PNPM](https://pnpm.io/), PNPM version >= 8.x +4. [Visual Studio Code](https://code.visualstudio.com/) + ## Built the project 1. Clone this repo locally. (`git clone https://github.com/OfficeDev/TeamsFx.git`) 2. Open a terminal and move into your local copy. (`cd TeamsFx`) -3. Because the monorepo is managed by [Lerna](https://github.com/lerna/lerna), you need to bootstrap at the first time. (`npm run setup` or `npm install && npm run bootstrap`) All dependencies will be installed and linked locally. +3. Because the monorepo is managed by [pnpm](https://pnpm.io/), you need to setup the project at the first time at root folder. (`npm run setup` or `pnpm install && npm run build`) All dependencies will be installed and linked locally. 4. Build the `@microsoft/teamsfx-api` package. (`cd packages/api && npm run build`) -**_NOTE:_** If you meet the error showing that some package cannot install, you can delete this package's `package-lock.json` file and try `npm run bootstrap` under `TeamsFx` folder again. +### Add or remove dependency in API +run `pnpm install XXX` to add dependency, run `pnpm remove XXX` to remove dependecy. + ## Test the project @@ -37,7 +41,7 @@ After running `npm run setup` in the root folder of the monorepo, a [Precommit G ## Pull Request Process -1. Checkout your local branch from the latest `main` branch and make your changes to your local branch. +1. Checkout your local branch from the latest `dev` branch and make your changes to your local branch. 2. Before creating a pull request, make sure: - Use eslint plugin to check whether there is any error or warning that breaks the rule. (`npm run lint`) - Make sure modified functions are covered by unit tests. (`npm run test:unit`) diff --git a/packages/cli/CONTRIBUTING.md b/packages/cli/CONTRIBUTING.md index cdc7c1ea94..0689226eb9 100644 --- a/packages/cli/CONTRIBUTING.md +++ b/packages/cli/CONTRIBUTING.md @@ -21,8 +21,8 @@ The TeamsFx CLI may require an Azure account and subscription to deploy the Azur ## Setup Development Environment --- -1. Install Node v14 or later -2. Install NPM v6 or later +1. Install Node v18 or later +2. Install PNPM v8 or later ## Build the project --- @@ -32,16 +32,8 @@ The TeamsFx CLI may require an Azure account and subscription to deploy the Azur 2. `cd TeamsFx` 3. `npm run setup` -This will run "lerna bootstrap" to link packages in monorepo locally. +This will run "pnpm install && npm run build" to link packages in monorepo locally. -### Build CLI package alone -1. `cd packages/cli/` -2. `npm install` -2. `npm run build` - -This will install the dependent packages from public registry and build CLI package alone. - -**_NOTE:_** If you meet the error showing that some package cannot install, you can delete this package's `package-lock.json` file and try `npm run bootstrap` under `TeamsFx` folder again. ## Debug the project --- @@ -93,6 +85,12 @@ The project setup ESLINT and prettier for coding style and formating, please fol ### Format the code `npm run format` +### Add dependency for CLI +`pnpm install XXX` + +### Delete dependency for CLI +`pnpm remove XXX` + ## Opening PR and PR review --- diff --git a/packages/function-extension/CONTRIBUTING.md b/packages/function-extension/CONTRIBUTING.md index c79af09c66..3932b2858e 100644 --- a/packages/function-extension/CONTRIBUTING.md +++ b/packages/function-extension/CONTRIBUTING.md @@ -8,7 +8,7 @@ Welcome and thank you for your interest in contributing to **Microsoft.Azure.Web 2. Install Function Core Tools v3 [[REF](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=linux%2Ccsharp%2Cbash#install-the-azure-functions-core-tools)] -3. Install Node v12 +3. Install Node v18 and PNPM v8 ## How to Build @@ -53,9 +53,9 @@ This project uses FxCop to check code style. You can find style warnings in Visu ## Pull Request Process -1. Check out a new branch from "main". +1. Check out a new branch from "dev". 2. Add your features and commit to the new branch. 3. Make sure your changes are covered by tests. [How to Run Test Cases](#how-to-run-test-cases) 4. Ensure code style check has no warning or error. [Style Guidelines](#style-guidelines) -5. Create a pull request to merge your changes to "main" branch. +5. Create a pull request to merge your changes to "dev" branch. 6. At least one approve from code owners is required. \ No newline at end of file diff --git a/packages/fx-core/CONTRIBUTING.md b/packages/fx-core/CONTRIBUTING.md index 266e5f59e8..9322152f8e 100644 --- a/packages/fx-core/CONTRIBUTING.md +++ b/packages/fx-core/CONTRIBUTING.md @@ -7,24 +7,26 @@ Welcome and thank you for your interest in contributing to **fx-core**! Before c Follow the official documents to install the required softwares: 1. [Git](https://git-scm.com/) -2. [Node.js and NPM](https://nodejs.org/), **x64**, Node version >= 10.x, <= 14.x -3. [Visual Studio Code](https://code.visualstudio.com/) +2. [Node.js and NPM](https://nodejs.org/), **x64**, Node version >= 18 +3. [PNPM](https://pnpm.io/), PNPM version >=8 +4. [Visual Studio Code](https://code.visualstudio.com/) + ## Built the project 1. Clone this repo locally. (`git clone https://github.com/OfficeDev/TeamsFx.git`) 2. Open a terminal and move into your local copy. (`cd TeamsFx`) -3. Because the monorepo is managed by Lerna, you need to bootstrap at the first time. (`npm run setup` or `npm install && npm run bootstrap`) All dependencies will be installed and linked locally. -4. Build the `fx-core` package. (`cd packages/fx-core && npm run build`) +3. Because the monorepo is managed by PNPM, you need to setup at the first time in root folder. (`npm run setup` or `pnpm install && npm run build`) All dependencies will be installed and linked locally. -**_NOTE:_** If you meet the error showing that some package cannot install, you can delete this package's `package-lock.json` file and try `npm run bootstrap` under `TeamsFx` folder again. +## Add or remove dependency in FxCore +run `pnpm install XXX` to add dependency, run `pnpm remove XXX` to remove dependecy. ## Test the project Add tests under tests/ folder. The filename should end with .test.ts. Because other packages depends on `fx-core`, the change may break functionalities of other packages. -Please also run `npx lerna run test:unit --since origin/main` in the root folder of TeamsFx project, it will run all unit tests. +Please also run `pnpm -r run test:unit` in the root folder of TeamsFx project, it will run all unit tests. ## Style Guidelines @@ -35,7 +37,7 @@ After running `npm run setup` in the root folder of the monorepo, a [Precommit G ## Pull Request Process -1. Checkout your local branch from the latest `main` branch and make your changes to your local branch. +1. Checkout your local branch from the latest `dev` branch and make your changes to your local branch. 2. Before creating a pull request, make sure: - Use eslint plugin to check whether there is any error or warning that breaks the rule. (`npm run lint`) - Make sure modified functions are covered by unit tests. (`npm run test`) diff --git a/packages/sdk-react/README.md b/packages/sdk-react/README.md index 2f9d9e63b4..3dac3f8192 100644 --- a/packages/sdk-react/README.md +++ b/packages/sdk-react/README.md @@ -20,7 +20,8 @@ Please check the [README](https://github.com/OfficeDev/TeamsFx/blob/main/package ### Prerequisites -- Node.js version 10.x.x or higher +- Node.js version 18.x.x or higher +- PNPM version 8.x.x or higher - TeamsFx SDK version 0.6.0 or higher - A project created by the Teams Toolkit VS Code extension or `teamsfx` CLI tool. diff --git a/packages/sdk/CONTRIBUTING.md b/packages/sdk/CONTRIBUTING.md index d2f53e82cd..52225dc849 100644 --- a/packages/sdk/CONTRIBUTING.md +++ b/packages/sdk/CONTRIBUTING.md @@ -10,14 +10,14 @@ To test the SDK, you'd better install [Visual Studio Code](https://code.visualst ## Prerequisites - Git -- Node 10.x or higher (Node 14 is recommended) +- Node 18 or higher (Node 18 is recommended) +- PNPM 8 or higher # Building SDK 1. Clone this repo locally. (`git clone https://github.com/OfficeDev/TeamsFx.git`) 2. Open a terminal and move into your local copy. (`cd TeamsFx`) -3. Because the monorepo is managed by Lerna, you need to bootstrap at the first time. (`npm run setup` or `npm install && npm run bootstrap`) All dependencies will be installed. -4. Build the SDK package. (`cd packages/sdk && npm run build`) +3. Because the monorepo is managed by PNPM, you need to setup at the first time. (`npm run setup` or `pnpm install && npm run build` in root folder) All dependencies will be installed. # Debugging SDK @@ -32,7 +32,8 @@ npm install ../microsoft-teamsfx-x.x.x.tgz # install the local built package ``` Run `npm run build` and `npm pack` under `packages/sdk` after any updates of SDK. - +## Add or remove dependency for SDK +run `pnpm install XXX` to add dependency, run `pnpm remove XXX` to remove dependency. # Running test cases All tests are under `test/` folder. The filename ends with ".spec.ts". @@ -170,12 +171,12 @@ Use `npm run format` to fix format issues and `npm run lint` to check lint issue # Pull Request Process -1. Check out a new branch from "main". +1. Check out a new branch from "dev". 2. Update code in correct place. [Supporting Browser and NodeJS](#supporting-browser-and-nodejs) 3. Make sure modified codes are covered by unit tests. [Running test cases](#running-test-cases) 4. Ensure code style check has no error. [Style Guidelines](#style-guidelines) 5. Add comment for public class/method. Please check [comment template](API_COMMENT.md) for details. -6. Merge your changes to "main" branch. +6. Merge your changes to "dev" branch. 7. At least one approve from code owners is required. ## Supporting Browser and NodeJS diff --git a/packages/sdk/README.md b/packages/sdk/README.md index ece62a95a6..96db8ac874 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -21,7 +21,8 @@ Please check the [README](https://github.com/OfficeDev/TeamsFx/blob/main/package ### Prerequisites -- Node.js version 10.x.x or higher +- Node.js version 18 or higher +- PNPM version 8 or higher - A project created by the Teams Toolkit VS Code extension or `teamsfx` CLI tool. - If your project has installed `botbuilder` related [packages](https://github.com/Microsoft/botbuilder-js#packages) as dependencies, ensure they are of the same version and the version `>= 4.18.0`. ([Issue - all of the BOTBUILDER packages should be the same version](https://github.com/BotBuilderCommunity/botbuilder-community-js/issues/57#issuecomment-508538548)) @@ -597,7 +598,7 @@ Also see [Credential](#Credential) for furthur description. From `botbuilder@4.16.0`, `BotFrameworkAdapter` is deprecated, and `CloudAdapter` is recommended to be used instead. You can import `ConversationBot` from `BotBuilderCloudAdapter` to use the latest SDK implemented with `CloudAdapter`. -1. Install `@microsoft/teamsfx @^2.2.0`, `botbuilder @^4.18.0`, (and `@types/node @^14.0.0` for TS projects) via `npm install` as follows. +1. Install `@microsoft/teamsfx @^2.2.0`, `botbuilder @^4.18.0`, (and `@types/node @^18.0.0` for TS projects) via `npm install` as follows. ```sh npm install @microsoft/teamsfx diff --git a/packages/tests/README.md b/packages/tests/README.md index 9e7a4a665b..4d43305e1c 100644 --- a/packages/tests/README.md +++ b/packages/tests/README.md @@ -6,14 +6,15 @@ A UI Test Project based on [Vscode Extension Tester](https://github.com/redhat-d ### Prerequisites -- node >= 16 +- node >= 18 +- NPM >= 8 - m365 account - azure account ### Setup - (**Required**) Run `npm install @microsoft/teamsfx-cli@alpha` to download latest CLI -- (**Required**) Run `npm install` +- (**Required**) Run `pnpm install` - (**Required**) Run `npm run build` - (**Required**) Login your m365 account via TeamsFx extension - (**Required**) Login your azure account via TeamsFx extension diff --git a/packages/vscode-extension/CONTRIBUTING.md b/packages/vscode-extension/CONTRIBUTING.md index be0cf580a7..cb16abf36c 100644 --- a/packages/vscode-extension/CONTRIBUTING.md +++ b/packages/vscode-extension/CONTRIBUTING.md @@ -8,17 +8,16 @@ Welcome and thank you for your interest in contributing to **VSCode Extension**! Verify you have the right prerequisites for building Teams apps and install some recommended development tools. [Read more details](https://docs.microsoft.com/en-us/microsoftteams/platform/build-your-first-app/build-first-app-overview). + +
- | Node.jsAs a fundamental runtime context for Teams app, Node.js v10.x, v12.x or v14.x is required (v14.x is recommended). |
+ Node.js and PNPMAs a fundamental runtime context for Teams app, Node.js v18 or higher, PNPM v8 or higher. |
Microsoft 365The Teams Toolkit requires a Microsoft 365 organizational account where Teams is running and has been registered. |
||
AzureThe Teams Toolkit may require an Azure account and subscription to deploy the Azure resources for your project. |