Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update contribute guide doc to node.js 18 #9730

Merged
merged 6 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions packages/api/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`)
Expand Down
20 changes: 9 additions & 11 deletions packages/cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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
---
Expand Down Expand Up @@ -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
---

Expand Down
6 changes: 3 additions & 3 deletions packages/function-extension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
16 changes: 9 additions & 7 deletions packages/fx-core/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`)
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
13 changes: 7 additions & 6 deletions packages/sdk/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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".
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions packages/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -597,7 +598,7 @@ Also see [Credential](#Credential) for furthur description.

From `[email protected]`, `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
Expand Down
5 changes: 3 additions & 2 deletions packages/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions packages/vscode-extension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).



<table>
<tr>
<td><img src="https://raw.githubusercontent.com/OfficeDev/TeamsFx/main/packages/vscode-extension/media/landingPage_nodejs.png"></td>
Copy link
Contributor Author

@wenytang-ms wenytang-ms Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the image link is invalid, so removed.

<td><h3>Node.js</h3>As a fundamental runtime context for Teams app, Node.js v10.x, v12.x or v14.x is required (v14.x is recommended).</td>
<td><h3>Node.js and PNPM</h3>As a fundamental runtime context for Teams app, Node.js v18 or higher, PNPM v8 or higher.</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/OfficeDev/TeamsFx/main/packages/vscode-extension/media/landingPage_m365.png"></td>
<td><h3>Microsoft 365</h3>The Teams Toolkit requires a Microsoft 365 organizational account where Teams is running and has been registered.</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/OfficeDev/TeamsFx/main/packages/vscode-extension/media/landingPage_azure.png"></td>
<td><h3>Azure</h3> The Teams Toolkit may require an Azure account and subscription to deploy the Azure resources for your project.</td>
</tr>
</table>
Expand All @@ -29,14 +28,16 @@ Verify you have the right prerequisites for building Teams apps and install some

1. Clone this repo locally. (`git clone https://github.com/OfficeDev/TeamsFx.git`)
1. Open a terminal and move into your local copy. (`cd TeamsFx`)
1. 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.
1. Build the vsix package. (`cd packages/vscode-extension && npm run build`)
1. Because the monorepo is managed by PNPM, you need to setup the project at the first time. (`npm run setup` or `pnpm install && npm run build` at root folder) All dependencies will be installed.

### Debug the project

1. Open project in VS Code (`cd packages/vscode-extension && code .`)
1. Press `F5` in VS Code.

### Add or remove dependecy in vscode-extension
run `pnpm install XXX` to add dependency, run `pnpm remove XXX` to remove dependency.

## Test the project

Mannully test UI in VS Code extenion for now.
Expand All @@ -47,6 +48,6 @@ The project already enabled StyleCop. Please fix the style warnings before commi

## Pull Request Process

1. Check out a new branch from `main` branch.
1. Check out a new branch from `dev` branch.
1. Make sure all the checks in pull request are passed.
1. At least one approver from [CODEOWNER](../../.github/CODEOWNERS) is required.
Loading