Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into user/bentsai/suppor…
Browse files Browse the repository at this point in the history
…tSSOForSharePoint
  • Loading branch information
ceciliaavila committed Jan 13, 2025
2 parents 87fc178 + adca2e0 commit 453e4eb
Show file tree
Hide file tree
Showing 608 changed files with 4,541 additions and 4,862 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/depcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-repoutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: use node 20.x
- name: use node 22.x
uses: actions/setup-node@v2-beta
with:
node-version: 20.x
node-version: 22.x

- name: yarn cache dir
id: yarn-cache-dir
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node20.x-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }}

- name: npm install @microsoft/botframework-cli@next --global
run: npm install @microsoft/botframework-cli@next --global
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu, windows]
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
run: yarn test:github

- name: coveralls
if: matrix.node-version == '20.x'
if: matrix.node-version == '22.x' && matrix.os == 'windows'
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,6 @@ coverage
# typescript assets
*.tsbuildinfo
*.js.map

# tsup vendors folders
libraries/**/vendors
2 changes: 1 addition & 1 deletion build/yaml/botbuilder-js-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pool:
vmImage: 'ubuntu-latest'

variables:
NodeVersion: 20.x
NodeVersion: 22.x
Packaging.EnableSBOMSigning: true
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
# SDK_JS_org_registry_Url: define this in Azure
Expand Down
1 change: 1 addition & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = [
'**/*.lu',
'**/*.dialog',
'**/*.js.map',
'**/vendors'
],
},

Expand Down
11 changes: 0 additions & 11 deletions libraries/adaptive-expressions-ie11/eslint.config.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion libraries/adaptive-expressions-ie11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build": "npm-run-all clean build:browser",
"build:browser": "tsup --config ../../tsup/browser.config.ts --define.outfile dist/index.js --dts",
"clean": "rimraf dist",
"lint": "eslint ."
"lint": "eslint . --config ../../eslint.config.cjs"
},
"files": [
"dist"
Expand Down
11 changes: 3 additions & 8 deletions libraries/adaptive-expressions/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const onlyWarn = require("eslint-plugin-only-warn");
const sharedConfig = require("../../eslint.config.cjs")
const sharedConfig = require('../../eslint.config.cjs');

module.exports = [
...sharedConfig,
{
ignores: ["**/generated/*", "**/expressionProperty.test.js"],
ignores: ['**/generated/*', '**/expressionProperty.test.js'],
},
{
plugins: {
"only-warn": onlyWarn,
},
}];
];
11 changes: 6 additions & 5 deletions libraries/adaptive-expressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
"big-integer": "^1.6.52",
"@types/xmldom": "^0.1.34",
"btoa-lite": "^1.0.0",
"d3-format": "^2.0.0",
"d3-format": "^3.1.0",
"dayjs": "^1.11.13",
"eslint-plugin-only-warn": "^1.1.0",
"jspath": "^0.4.0",
"lodash": "^4.17.21",
"lru-cache": "^5.1.1",
Expand All @@ -59,18 +58,20 @@
"build:browser": "npm-run-all build:browser:clean build:browser:run",
"build:browser:clean": "rimraf --glob lib/browser.*",
"build:browser:run": "tsup --config ../../tsup/browser.config.ts",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"depcheck": "depcheck --config ../../.depcheckrc --ignores sinon,@types/xmldom",
"clean": "rimraf lib vendors tsconfig.tsbuildinfo",
"depcheck": "depcheck --config ../../.depcheckrc --ignores @types/xmldom,d3-format,sinon",
"build-docs": "typedoc --theme markdown --entryPoint adaptive-expressions --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\adaptive-expressions .\\lib\\index.d.ts --hideGenerator --name \"Bot Builder SDK - Expression\" --readme none",
"test": "yarn build && mocha tests --timeout 60000",
"test:compat": "api-extractor run --verbose",
"lint": "eslint .",
"prebuild": "tsup ./node_modules/d3-format/src/*.js --format cjs --out-dir vendors/d3-format --clean --sourcemap",
"antlr-build-expression": "antlr4ts src/parser/ExpressionAntlrLexer.g4 -o src/parser/generated && antlr4ts src/parser/ExpressionAntlrParser.g4 -visitor -o src/parser/generated",
"antlr-build-commonregex": "antlr4ts src/CommonRegex.g4 -o src/generated -visitor"
},
"files": [
"lib",
"src",
"types"
"types",
"vendors"
]
}
2 changes: 1 addition & 1 deletion libraries/adaptive-expressions/src/builtinFunctions/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Add extends ExpressionEvaluator {
expression,
2,
Number.MAX_SAFE_INTEGER,
ReturnType.String | ReturnType.Number
ReturnType.String | ReturnType.Number,
);
}
}
13 changes: 5 additions & 8 deletions libraries/adaptive-expressions/src/builtinFunctions/addDays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ export class AddDays extends TimeTransformEvaluator {
* Initializes a new instance of the [AddDays](xref:adaptive-expressions.AddDays) class.
*/
constructor() {
super(
ExpressionType.AddDays,
(ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setDate(ts.getDate() + num);
return newDate;
}
);
super(ExpressionType.AddDays, (ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setDate(ts.getDate() + num);
return newDate;
});
}
}
13 changes: 5 additions & 8 deletions libraries/adaptive-expressions/src/builtinFunctions/addHours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ export class AddHours extends TimeTransformEvaluator {
* Initializes a new instance of the [AddHours](xref:adaptive-expressions.AddHours) class.
*/
constructor() {
super(
ExpressionType.AddHours,
(ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setHours(ts.getHours() + num);
return newDate;
}
);
super(ExpressionType.AddHours, (ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setHours(ts.getHours() + num);
return newDate;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ export class AddMinutes extends TimeTransformEvaluator {
* Initializes a new instance of the [AddMinutes](xref:adaptive-expressions.AddMinutes) class.
*/
constructor() {
super(
ExpressionType.AddMinutes,
(ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setMinutes(ts.getMinutes() + num);
return newDate;
}
);
super(ExpressionType.AddMinutes, (ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setMinutes(ts.getMinutes() + num);
return newDate;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AddOrdinal extends ExpressionEvaluator {
private static evaluator(): EvaluateExpressionDelegate {
return FunctionUtils.apply(
(args: any[]): string => AddOrdinal.evalAddOrdinal(args[0]),
FunctionUtils.verifyInteger
FunctionUtils.verifyInteger,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ export class AddSeconds extends TimeTransformEvaluator {
* Initializes a new instance of the [AddSeconds](xref:adaptive-expressions.AddSeconds) class.
*/
constructor() {
super(
ExpressionType.AddSeconds,
(ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setSeconds(ts.getSeconds() + num);
return newDate;
}
);
super(ExpressionType.AddSeconds, (ts: Date, num: number): Date => {
const newDate = new Date(ts);
newDate.setSeconds(ts.getSeconds() + num);
return newDate;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class AddToTime extends ExpressionEvaluator {
interval: number,
timeUnit: string,
format?: string,
locale?: string
locale?: string,
): ValueWithError {
let result: string;
const error = InternalFunctionUtils.verifyISOTimestamp(timeStamp);
Expand All @@ -81,7 +81,7 @@ export class AddToTime extends ExpressionEvaluator {
[ReturnType.String, ReturnType.String],
ReturnType.String,
ReturnType.Number,
ReturnType.String
ReturnType.String,
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class Average extends ExpressionEvaluator {
private static evaluator(): EvaluateExpressionDelegate {
return FunctionUtils.apply(
(args: any[]): number => args[0].reduce((x: number, y: number): number => x + y) / args[0].length,
FunctionUtils.verifyNumericList
FunctionUtils.verifyNumericList,
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Base64ToBinary extends ExpressionEvaluator {
ExpressionType.Base64ToBinary,
Base64ToBinary.evaluator(),
ReturnType.Object,
FunctionUtils.validateUnary
FunctionUtils.validateUnary,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Base64ToString extends ExpressionEvaluator {
ExpressionType.Base64ToString,
Base64ToString.evaluator(),
ReturnType.String,
FunctionUtils.validateUnary
FunctionUtils.validateUnary,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Binary extends ExpressionEvaluator {
private static evaluator(): EvaluateExpressionDelegate {
return FunctionUtils.apply(
(args: any[]): Uint8Array => InternalFunctionUtils.getTextEncoder().encode(args[0]),
FunctionUtils.verifyString
FunctionUtils.verifyString,
);
}
}
Loading

0 comments on commit 453e4eb

Please sign in to comment.