Skip to content

Commit

Permalink
Merge pull request #9982 from OfficeDev/wenyt/mian
Browse files Browse the repository at this point in the history
build: merge main back to dev
  • Loading branch information
adashen authored Sep 19, 2023
2 parents dba5c10 + 63ca7b0 commit c8e3be5
Show file tree
Hide file tree
Showing 67 changed files with 1,046 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/fxcore-sync-up-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (!semver.prerelease(templateVersion)) {
console.log(
"================== template config version is not match with template latest release version, need bump up config version ^${templateVersion} =================="
);
templateConfigFile.version = `^${result.major}.${result.minor}.0`;
templateConfigFile.version = `${result.major}.${result.minor}.x`;
fse.writeFileSync(
templateConfig,
JSON.stringify(templateConfigFile, null, 4)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
exit 1
- name: Validate inputs for release
if: ${{ github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/release/') && github.event.inputs.preid != 'stable'}}
if: ${{ github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/release/') && (github.event.inputs.preid != 'stable' && github.event.inputs.preid != 'rc')}}
run: |
echo It's only allowed to release stable on release branch
exit 1
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
npx lerna version prerelease --conventional-prerelease --preid=rc --no-changelog --yes
- name: version rc npm packages to npmjs.org on hotfix
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' && startsWith(github.ref, 'refs/heads/hotfix/') && github.event.inputs.skip-version-rc == 'no'}}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' && (startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/')) && github.event.inputs.skip-version-rc == 'no'}}
run: |
npx lerna version prerelease --conventional-prerelease --preid=rc-hotfix --no-changelog --allow-branch ${GITHUB_REF#refs/*/} --yes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [main, dev, hotfix/**]
branches: [main, dev, hotfix/**, release/**]
pull_request:
# The branches below must be a subset of the branches above
branches: [main, dev, hotfix/**]
branches: [main, dev, hotfix/**, release/**]
schedule:
- cron: "15 20 * * 1"

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
- dev
- hotfix/**/*
- release/**
push:
branches:
- main
- dev
- hotfix/**/*
- release/**

jobs:
unit-test:
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-api",
"version": "0.22.3",
"version": "0.22.5",
"description": "teamsfx framework api",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@azure/core-auth": "^1.4.0",
"@microsoft/teams-manifest": "^0.1.0",
"@microsoft/teams-manifest": "^0.1.2",
"axios": "^0.21.2",
"chai": "^4.3.4",
"jsonschema": "^1.4.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-cli",
"version": "2.0.1",
"version": "2.0.2",
"author": "Microsoft Corporation",
"description": "",
"license": "MIT",
Expand Down Expand Up @@ -98,8 +98,8 @@
"@inquirer/core": "^4.0.0",
"@inquirer/prompts": "^3.0.4",
"@inquirer/type": "^1.1.2",
"@microsoft/teamsfx-api": "^0.22.3",
"@microsoft/teamsfx-core": "^2.0.2",
"@microsoft/teamsfx-api": "^0.22.5",
"@microsoft/teamsfx-core": "^2.0.5",
"ansi-escapes": "^4.3.2",
"applicationinsights": "^1.8.10",
"async-mutex": "^0.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/fx-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-core",
"version": "2.0.3",
"version": "2.0.5",
"main": "build/index.js",
"types": "build/index.d.ts",
"license": "MIT",
Expand Down Expand Up @@ -88,7 +88,7 @@
"@feathersjs/hooks": "^0.6.5",
"@microsoft/dev-tunnels-contracts": "~1.0.7360",
"@microsoft/dev-tunnels-management": "~1.0.7360",
"@microsoft/teamsfx-api": "^0.22.3",
"@microsoft/teamsfx-api": "^0.22.5",
"@npmcli/arborist": "^4.2.0",
"@types/proper-lockfile": "^4.1.1",
"@types/swagger2openapi": "^7.0.0",
Expand Down Expand Up @@ -220,4 +220,4 @@
"npx eslint --cache --fix --quiet"
]
}
}
}
1 change: 1 addition & 0 deletions packages/fx-core/resource/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
"core.copilotPlugin.scaffold.summary.warning.api.optionalParametersOnly.mitigation": " Mitigation: If \"%s\" is not what you need, edit the parameter of command \"%s\" in \"%s\". The parameter name should match what's defined in \"%s\".",
"core.createCapabilityQuestion.titleNew": "Capabilities",
"core.createCapabilityQuestion.placeholder": "Select a capability",
"core.createProjectQuestion.option.description.preview": "Preview",
"core.createProjectQuestion.option.description.previewOnWindow": "Preview on Windows",
"core.createProjectQuestion.option.description.worksInOutlook": "Works in Teams and Outlook",
"core.createProjectQuestion.option.description.worksInOutlookM365": "Works in Teams, Outlook and the Microsoft 365 app",
Expand Down
2 changes: 1 addition & 1 deletion packages/fx-core/src/common/templates-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "^3.0.0",
"version": "4.0.x",
"tagPrefix": "templates@",
"tagListURL": "https://github.com/OfficeDev/TeamsFx/releases/download/template-tag-list/template-tags.txt",
"templateDownloadBaseURL": "https://github.com/OfficeDev/TeamsFx/releases/download",
Expand Down
2 changes: 2 additions & 0 deletions packages/fx-core/src/component/driver/teamsApp/appStudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,10 @@ export async function updateTeamsAppV3ForPublish(
} catch (e) {
validationError = AppStudioResultFactory.UserError(
AppStudioError.ValidationFailedError.name,
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
AppStudioError.ValidationFailedError.message([(e as any).message])
);
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
validationError.stack = (e as any).stack;
}
} else {
Expand Down
23 changes: 8 additions & 15 deletions packages/fx-core/src/question/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,13 @@ export class CapabilityOptions {
};
}
static bots(inputs?: Inputs): OptionItem[] {
return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
? // currently no ai bot for dotnet
[
CapabilityOptions.basicBot(),
CapabilityOptions.notificationBot(),
CapabilityOptions.commandBot(),
CapabilityOptions.workflowBot(inputs),
]
: [
CapabilityOptions.basicBot(),
CapabilityOptions.aiBot(),
CapabilityOptions.notificationBot(),
CapabilityOptions.commandBot(),
CapabilityOptions.workflowBot(inputs),
];
return [
CapabilityOptions.basicBot(),
CapabilityOptions.aiBot(),
CapabilityOptions.notificationBot(),
CapabilityOptions.commandBot(),
CapabilityOptions.workflowBot(inputs),
];
}

static tabs(): OptionItem[] {
Expand Down Expand Up @@ -557,6 +549,7 @@ export class CapabilityOptions {
id: "ai-bot",
label: getLocalizedString("core.aiBotOption.label"),
detail: getLocalizedString("core.aiBotOption.detail"),
description: getLocalizedString("core.createProjectQuestion.option.description.preview"),
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/manifest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teams-manifest",
"version": "0.1.0",
"version": "0.1.2",
"main": "build/index.js",
"types": "build/index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-react",
"version": "3.0.1",
"version": "3.0.2",
"description": "React helper functions for Microsoft TeamsFx",
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx",
"version": "2.2.2",
"version": "2.3.0",
"description": "Microsoft Teams Framework for Node.js and browser.",
"main": "dist/index.node.cjs.js",
"browser": "dist/index.esm2017.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-server",
"version": "2.0.3",
"version": "2.0.4",
"author": "Microsoft Corporation",
"description": "",
"license": "MIT",
Expand Down Expand Up @@ -96,8 +96,8 @@
"@azure/core-auth": "^1.4.0",
"@azure/identity": "^3.1.3",
"@microsoft/dev-tunnels-contracts": "~1.0.7360",
"@microsoft/teamsfx-api": "^0.22.3",
"@microsoft/teamsfx-core": "^2.0.3",
"@microsoft/teamsfx-api": "^0.22.5",
"@microsoft/teamsfx-core": "^2.0.5",
"fs-extra": "^9.1.0",
"underscore": "^1.12.1",
"validator": "^13.7.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/teamsfx-test",
"version": "0.0.1",
"version": "0.0.2",
"description": "A UI Test Project of Teams Toolkit Extension",
"private": true,
"author": "Microsoft Corporation",
Expand All @@ -20,7 +20,7 @@
"@microsoft/dev-tunnels-management": "~1.0.7360",
"@microsoft/dev-tunnels-ssh": "~3.11.1",
"@microsoft/extra-shot-mocha": "0.0.1",
"@microsoft/teamsfx-core": "^2.0.2",
"@microsoft/teamsfx-core": "^2.0.5",
"@types/chai": "^4.2.19",
"@types/fs-extra": "^7.0.0",
"@types/glob": "^7.1.3",
Expand Down Expand Up @@ -66,11 +66,11 @@
"dependencies": {
"@azure/arm-apimanagement": "^8.0.0",
"@azure/arm-resources": "5.0.1",
"@azure/arm-sql": "^9.0.0",
"@azure/identity": "^3.1.3",
"@azure/msal-node": "1.17.3",
"@azure/arm-sql": "^9.0.0",
"@microsoft/teamsfx-api": "^0.22.3",
"@microsoft/teamsfx-cli": "^2.0.1",
"@microsoft/teamsfx-api": "^0.22.5",
"@microsoft/teamsfx-cli": "^2.0.2",
"@types/semver": "^7.3.8",
"axios": "^0.21.1",
"azure-arm-resource": "^7.4.0",
Expand Down
27 changes: 27 additions & 0 deletions packages/vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 5.2.0 - Sep 19, 2023

This minor version update of Teams Toolkit includes new features and bug fixes based on your feedback. The new features include the ability to import an existing SharePoint Framework solution, new project templates for Link Unfurling and AI Chat Bot, and more. We previously shared these incremental changes in the prerelease version and through a series of blog posts:

- [July Prerelease](https://devblogs.microsoft.com/microsoft365dev/teams-toolkit-for-visual-studio-code-update-july-2023): Import an existing SharePoint Framework solution, implement link unfurling in Teams and Outlook.
- [August Prerelease](https://devblogs.microsoft.com/microsoft365dev/teams-toolkit-for-visual-studio-code-update-with-new-ai-chat-bot-template/): Create an AI chat bot with the new AI Chat Bot template.

We've listened to your feedback and included these additional new features, enhancements, and bug fixes to this release.

New features:

- Import an existing SharePoint Framework solution and continue development with Teams Toolkit.
![SPFx Existing App](https://github.com/OfficeDev/TeamsFx/assets/11220663/3944f5c8-6c8c-4b4d-8df8-dc4f45b5967f)
- A new link unfurling project template to help you get started with displaying rich content from links in Teams messages and Outlook emails.
![Link Unfurling](https://github.com/OfficeDev/TeamsFx/assets/11220663/6e8b982a-0531-4ec1-8420-f6f17955ff40)
- A new AI Chat Bot project template to help you get started with building a GPT-like chat bot with AI capabilities using the [Teams AI Library](https://github.com/microsoft/teams-ai).
![AI Bot](https://github.com/OfficeDev/TeamsFx/assets/11220663/86a90d2a-efc3-4d8b-9e8c-5d34a1e8c081)
- The Sample Gallery has a new sample, One Productivity Hub using Graph Toolkit with SPFx, that shows you how to build a Tab for viewing your calendar events, to-do tasks, and files using Microsoft Graph Toolkit components and a SharePoint provider.
![SPFx Sample](https://github.com/OfficeDev/TeamsFx/assets/11220663/084ac508-49ea-4b30-854c-8b4d578ff6ee)
- Run life-cycle commands like Provision, Deploy, and Publish using new CodeLens hints added in-line to `teamsapp.yml`` when editing the file.
![Inline Commands](https://github.com/OfficeDev/TeamsFx/assets/11220663/f6897b26-0e3c-441c-b028-32093e8322a7)

Bug fixes:

- Fixed an issue where the `Preview` tag for the `AI Chat Bot` project template was not included in previous version. ([#9901](https://github.com/OfficeDev/TeamsFx/pull/9901))
- Fixed an issue where sometimes Teams Toolkit may fail to activate due to an unexpected package dependency on `types/keytar`. ([#9910](https://github.com/OfficeDev/TeamsFx/pull/9910))

## 5.0.1 - June 20, 2023

Incremental version for Teams Toolkit with multiple bug fixes:
Expand Down
8 changes: 3 additions & 5 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ms-teams-vscode-extension",
"displayName": "Teams Toolkit",
"description": "Create, debug, and deploy Teams apps with Teams Toolkit",
"version": "5.0.1",
"version": "5.2.0",
"publisher": "TeamsDevApp",
"author": "Microsoft Corporation",
"private": true,
Expand Down Expand Up @@ -1238,7 +1238,6 @@
"devDependencies": {
"@azure/arm-subscriptions": "^5.0.0",
"@azure/core-auth": "^1.4.0",
"@azure/identity-vscode": "^1.0.0",
"@azure/ms-rest-azure-env": "^2.0.0",
"@fluentui/react": "^8.5.1",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
Expand All @@ -1250,7 +1249,6 @@
"@types/express": "^4.17.14",
"@types/fs-extra": "^9.0.5",
"@types/jscodeshift": "^0.11.2",
"@types/keytar": "^4.4.2",
"@types/lodash": "^4.14.181",
"@types/mocha": "^8.0.4",
"@types/node": "^14.14.21",
Expand Down Expand Up @@ -1322,8 +1320,8 @@
"@microsoft/dev-tunnels-contracts": "~1.0.7360",
"@microsoft/dev-tunnels-management": "~1.0.7360",
"@microsoft/dev-tunnels-ssh": "~3.11.1",
"@microsoft/teamsfx-api": "^0.22.3",
"@microsoft/teamsfx-core": "^2.0.2",
"@microsoft/teamsfx-api": "^0.22.5",
"@microsoft/teamsfx-core": "^2.0.5",
"@npmcli/package-json": "^1.0.1",
"@vscode/extension-telemetry": "^0.6.2",
"@vscode/webview-ui-toolkit": "^1.2.2",
Expand Down
8 changes: 3 additions & 5 deletions packages/vscode-extension/src/commonlib/azureLogin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/* eslint-disable @typescript-eslint/no-empty-function */

/* eslint-disable @typescript-eslint/no-empty-function */

Expand Down Expand Up @@ -42,10 +43,7 @@ import { VS_CODE_UI } from "../extension";
import { AzureScopes } from "@microsoft/teamsfx-core";
import { getDefaultString, localize } from "../utils/localizeUtils";
import { TokenCredentialsBase } from "@azure/ms-rest-nodeauth";
import { AccessToken, GetTokenOptions, useIdentityPlugin } from "@azure/identity";
import { vsCodePlugin } from "@azure/identity-vscode";

useIdentityPlugin(vsCodePlugin);
import type { AccessToken, GetTokenOptions } from "@azure/identity";

class TeamsFxTokenCredential implements TokenCredential {
private tokenCredentialBase: TokenCredentialsBase;
Expand All @@ -70,7 +68,7 @@ class TeamsFxTokenCredential implements TokenCredential {
return null;
}
} catch (error) {
if ((error as any).message === "Entry not found in cache.") {
if (error.message === "Entry not found in cache.") {
throw new SystemError(
"Login",
ExtensionErrors.LoginCacheError,
Expand Down
1 change: 0 additions & 1 deletion packages/vscode-extension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const config = {
devtool: "source-map",
externals: {
vscode: "commonjs vscode", // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
keytar: "keytar",
["original-fs"]: "commonjs original-fs", // original-fs package is builtin Electron package which we use to prevent special fs logic for .asar files, 📖 -> https://www.electronjs.org/docs/latest/tutorial/asar-archives#treating-an-asar-archive-as-a-normal-file
},
resolve: {
Expand Down
Loading

0 comments on commit c8e3be5

Please sign in to comment.