Skip to content

Commit 3d09177

Browse files
authored
Bump deps after release of 4.16.0 (#4974)
* Fix Prettier * Ignore mime * Fix Jest config * Add jest.config.js * Add entry * Bump deps * Update entry * Use tsd * Shard unit tests into 3 * Don't collect coverage * Try using babel-jest * Revert and shard 20 * Move to HTML tests * 20 -> 2 * Better name * Temporarily disable test * Shard unit tests into 20 * Shard to 10 * Add full and minimal * Move createAdaptiveCardsStyleSet to HTML tests * Fix tests * Fix tests * Reduce unit tests shards to 2 * Reduce shards to improve parallelism * Fix merge result and add timeout to Terrapin * Remove strategy
1 parent d642b89 commit 3d09177

File tree

149 files changed

+26805
-12865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+26805
-12865
lines changed

.eslintrc.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,25 @@ parserOptions:
2020

2121
overrides:
2222
- files:
23-
- '__tests__/**/*.js'
24-
- '*.spec.js'
25-
- '*.test.js'
23+
- '__tests__/**/*.js'
24+
- '*.spec.js'
25+
- '*.test.js'
2626

2727
env:
2828
jest: true
2929

30+
- files:
31+
- 'jest.config.js'
32+
33+
env:
34+
node: true
35+
36+
parserOptions:
37+
sourceType: commonjs
38+
39+
rules:
40+
no-magic-numbers: off
41+
3042
- files:
3143
- '*.ts'
3244
- '*.tsx'

.github/workflows/pull-request-validation.yml

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- if: "env.skip-secure-feed != 'true'"
3737
name: Enable secure feed
3838
run: npx https://aka.ms/EnableSecureFeed
39+
timeout-minutes: 8 # Terrapin normally finish within 4 minutes but sometimes hang
3940

4041
- name: Use Node.js ${{ env.node-version }}
4142
uses: actions/setup-node@v4
@@ -87,6 +88,7 @@ jobs:
8788
- if: "env.skip-secure-feed != 'true'"
8889
name: Enable secure feed
8990
run: npx https://aka.ms/EnableSecureFeed
91+
timeout-minutes: 8 # Terrapin normally finish within 4 minutes but sometimes hang
9092

9193
- name: Use Node.js ${{ env.node-version }}
9294
uses: actions/setup-node@v4
@@ -112,6 +114,7 @@ jobs:
112114
- if: "env.skip-secure-feed != 'true'"
113115
name: Enable secure feed
114116
run: npx https://aka.ms/EnableSecureFeed
117+
timeout-minutes: 8 # Terrapin normally finish within 4 minutes but sometimes hang
115118

116119
- name: Use Node.js ${{ env.node-version }}
117120
uses: actions/setup-node@v4
@@ -128,12 +131,12 @@ jobs:
128131
- name: Run jest --testPathPattern packages/
129132
run: |
130133
./node_modules/.bin/jest \
131-
--ci \
132-
--coverage true \
133-
--forceExit \
134-
--logHeapUsage \
135-
--runInBand \
136-
--testPathPattern=/packages/\
134+
--ci \
135+
--coverage true \
136+
--forceExit \
137+
--logHeapUsage \
138+
--runInBand \
139+
--testPathPattern=/packages/\
137140
timeout-minutes: 10
138141

139142
- if: always()
@@ -158,6 +161,38 @@ jobs:
158161
./coverage/nunit3-*.xml
159162
./coverage/result-*.trx
160163
164+
type-definitions-test:
165+
name: Type definitions test
166+
runs-on: ubuntu-latest
167+
168+
steps:
169+
- uses: actions/checkout@v4
170+
171+
- if: "env.skip-secure-feed != 'true'"
172+
name: Enable secure feed
173+
run: npx https://aka.ms/EnableSecureFeed
174+
timeout-minutes: 8 # Terrapin normally finish within 4 minutes but sometimes hang
175+
176+
- name: Use Node.js ${{ env.node-version }}
177+
uses: actions/setup-node@v4
178+
with:
179+
node-version: ${{ env.node-version }}
180+
cache: npm
181+
182+
- run: npm clean-install
183+
184+
- run: npm run bootstrap
185+
186+
- run: npm run build --if-present
187+
188+
- name: Run tsd under packages/bundle
189+
run: ./node_modules/.bin/tsd
190+
working-directory: ./packages/bundle
191+
192+
- name: Run tsd under packages/core
193+
run: ./node_modules/.bin/tsd
194+
working-directory: ./packages/core
195+
161196
html-test:
162197
name: HTML test (${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }})
163198
needs:
@@ -166,13 +201,14 @@ jobs:
166201
strategy:
167202
fail-fast: false
168203
matrix:
169-
shard-index: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
170-
shard-count: [20]
204+
shard-index: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
205+
shard-count: [17]
171206

172207
steps:
173208
- if: "env.skip-secure-feed != 'true'"
174209
name: Enable secure feed
175210
run: npx https://aka.ms/EnableSecureFeed
211+
timeout-minutes: 8 # Terrapin normally finish within 4 minutes but sometimes hang
176212

177213
- name: Use Node.js ${{ env.node-version }}
178214
uses: actions/setup-node@v4
@@ -292,9 +328,6 @@ jobs:
292328
--add-tracefile lcov-15.info \
293329
--add-tracefile lcov-16.info \
294330
--add-tracefile lcov-17.info \
295-
--add-tracefile lcov-18.info \
296-
--add-tracefile lcov-19.info \
297-
--add-tracefile lcov-20.info \
298331
--add-tracefile lcov-unit.info \
299332
--output-file lcov.info
300333

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2525
### Changed
2626

2727
- Moved pull request validation pipeline to GitHub Actions, by [@compulim](https://github.com/compulim), in PR [#4976](https://github.com/microsoft/BotFramework-WebChat/pull/4976)
28+
- Bumped all dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#4973](https://github.com/microsoft/BotFramework-WebChat/pull/4973)
29+
- Production dependencies
30+
- [`[email protected]`](https://npmjs.com/package/core-js)
31+
- [`[email protected]`](https://npmjs.com/package/jwt-decode)
32+
- [`[email protected]`](https://npmjs.com/package/markdown-it)
33+
- [`[email protected]`](https://npmjs.com/package/markdown-it-for-inline)
34+
- [`[email protected]`](https://npmjs.com/package/merge-refs)
35+
- [`[email protected]`](https://npmjs.com/package/mime)
36+
- [`[email protected]`](https://npmjs.com/package/redux)
37+
- [`[email protected]`](https://npmjs.com/package/url-search-params-polyfill)
38+
- [`[email protected]`](https://npmjs.com/package/use-ref-from)
39+
- [`[email protected]`](https://npmjs.com/package/whatwg-fetch)
40+
- Development dependencies
41+
- [`@types/[email protected]`](https://npmjs.com/package/@types/dom-speech-recognition)
42+
- [`@types/[email protected]`](https://npmjs.com/package/@types/node)
43+
- [`@types/[email protected]`](https://npmjs.com/package/@types/react)
44+
- [`@typescript-eslint/[email protected]`](https://npmjs.com/package/@typescript-eslint/eslint-plugin)
45+
- [`@typescript-eslint/[email protected]`](https://npmjs.com/package/@typescript-eslint/parser)
46+
- [`[email protected]`](https://npmjs.com/package/axe-core)
47+
- [`[email protected]`](https://npmjs.com/package/babel-jest)
48+
- [`[email protected]`](https://npmjs.com/package/concurrently)
49+
- [`[email protected]`](https://npmjs.com/package/esbuild)
50+
- [`[email protected]`](https://npmjs.com/package/eslint-config-prettier)
51+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-import)
52+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-prettier)
53+
- [`[email protected]`](https://npmjs.com/package/eslint)
54+
- [`[email protected]`](https://npmjs.com/package/istanbul-lib-coverage)
55+
- [`[email protected]`](https://npmjs.com/package/jest-image-snapshot)
56+
- [`[email protected]`](https://npmjs.com/package/jest)
57+
- [`[email protected]`](https://npmjs.com/package/lint-staged)
58+
- [`[email protected]`](https://npmjs.com/package/nodemon)
59+
- [`[email protected]`](https://npmjs.com/package/prettier)
60+
- [`[email protected]`](https://npmjs.com/package/read-pkg-up)
61+
- [`[email protected]`](https://npmjs.com/package/read-pkg)
62+
- [`[email protected]`](https://npmjs.com/package/selenium-webdriver)
63+
- [`[email protected]`](https://npmjs.com/package/typescript)
64+
- [`[email protected]`](https://npmjs.com/package/webpack)
2865

2966
## [4.16.0] - 2023-11-16
3067

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<script crossorigin="anonymous" src="/test-harness.js"></script>
6+
<script crossorigin="anonymous" src="/test-page-object.js"></script>
7+
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
8+
</head>
9+
<body>
10+
<main id="webchat"></main>
11+
<script>
12+
run(async function () {
13+
const directLine = WebChat.createDirectLine({});
14+
15+
expect(directLine._botAgent).toMatch(/(^|\s)WebChat\/\d+\.\d+\.\d+(-[^\s]+)? \(ES5\)/u);
16+
});
17+
</script>
18+
</body>
19+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */
2+
3+
describe('Meta tag for Direct Line', () => {
4+
test('should contains build variant for ES5', () => runHTML('metaTag.directLine.es5.html'));
5+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<script crossorigin="anonymous" src="/test-harness.js"></script>
6+
<script crossorigin="anonymous" src="/test-page-object.js"></script>
7+
<script crossorigin="anonymous" src="/__dist__/webchat.js"></script>
8+
</head>
9+
<body>
10+
<main id="webchat"></main>
11+
<script>
12+
run(async function () {
13+
const directLine = WebChat.createDirectLine({});
14+
15+
expect(directLine._botAgent).toMatch(/(^|\s)WebChat\/\d+\.\d+\.\d+(-[^\s]+)? \(Full\)/u);
16+
});
17+
</script>
18+
</body>
19+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */
2+
3+
describe('Meta tag for Direct Line', () => {
4+
test('should contains build variant for full', () => runHTML('metaTag.directLine.full.html'));
5+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<script crossorigin="anonymous" src="/test-harness.js"></script>
6+
<script crossorigin="anonymous" src="/test-page-object.js"></script>
7+
<script crossorigin="anonymous" src="/__dist__/webchat-minimal.js"></script>
8+
</head>
9+
<body>
10+
<main id="webchat"></main>
11+
<script>
12+
run(async function () {
13+
const directLine = WebChat.createDirectLine({});
14+
15+
expect(directLine._botAgent).toMatch(/(^|\s)WebChat\/\d+\.\d+\.\d+(-[^\s]+)? \(Minimal\)/u);
16+
});
17+
</script>
18+
</body>
19+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */
2+
3+
describe('Meta tag for Direct Line', () => {
4+
test('should contains build variant for minimal', () => runHTML('metaTag.directLine.minimal.html'));
5+
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<script crossorigin="anonymous" src="/test-harness.js"></script>
6+
<script crossorigin="anonymous" src="/test-page-object.js"></script>
7+
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
8+
</head>
9+
<body>
10+
<main id="webchat"></main>
11+
<script>
12+
run(async function () {
13+
expect(document.querySelector('head > meta[name="botframework-webchat:bundle:variant"]').content).toBe(
14+
'full-es5'
15+
);
16+
17+
expect(document.querySelector('head > meta[name="botframework-webchat:bundle:version"]').content).toMatch(
18+
/^\d+\.\d+\.\d+($|-)/u
19+
);
20+
});
21+
</script>
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)