Skip to content

Commit 0e770c8

Browse files
authored
Ponyfill clock functions via ponyfill prop (#4662)
* Ponyfill clock * Add .eslintrc.production.yml * Bind to globalThis * Fix ESBuild * Temporary rollback sleep * Remove deprecated useLastTypingAt and useLocalize * Add actPostActivity * Use fake clock * Don't emit undefined values * Remove useLastTypingAt test * Fix emulator * Do not emit undefined values * Fake local clock for DirectLineEmulator * Modernize timestamp.js * Use local fake timer * Typo * Fix createClock options * Fix tests * Fix tests * Fix tests * Typo * Fix test * Fix test * Use local fake timer * Rename * Flush * Revert * Modernize tests * Fix test * Fix test * Modernize * Modernize * Modernize * Modernize * Add ponyfill check * createDirectLineEmulator will call createStore * Add entry * Fix test * Add entry * Update PR number * Use Hong Kong timezone
1 parent 7c84458 commit 0e770c8

File tree

198 files changed

+2587
-1870
lines changed

Some content is hidden

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

198 files changed

+2587
-1870
lines changed

.eslintrc.production.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
overrides:
2+
- files:
3+
- '__tests__/**/*.js'
4+
- '*.spec.js'
5+
- '*.test.js'
6+
7+
rules:
8+
no-restricted-globals: off
9+
10+
rules:
11+
no-restricted-globals:
12+
- error
13+
- name: cancelAnimationFrame
14+
message: Use clock functions from ponyfill
15+
- name: cancelIdleCallback
16+
message: Use clock functions from ponyfill
17+
- name: clearImmediate
18+
message: Use clock functions from ponyfill
19+
- name: clearInterval
20+
message: Use clock functions from ponyfill
21+
- name: clearTimeout
22+
message: Use clock functions from ponyfill
23+
- name: Date
24+
message: Use clock functions from ponyfill
25+
- name: requestAnimationFrame
26+
message: Use clock functions from ponyfill
27+
- name: requestIdleCallback
28+
message: Use clock functions from ponyfill
29+
- name: setImmediate
30+
message: Use clock functions from ponyfill
31+
- name: setInterval
32+
message: Use clock functions from ponyfill
33+
- name: setTimeout
34+
message: Use clock functions from ponyfill

.eslintrc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ parserOptions:
1818

1919
overrides:
2020
- files:
21-
- '__tests__/**/*.js'
22-
- '*.spec.js'
23-
- '*.test.js'
21+
- '__tests__/**/*.js'
22+
- '*.spec.js'
23+
- '*.test.js'
2424

2525
env:
2626
jest: true

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2727
- Resolved [#4643](https://github.com/microsoft/BotFramework-WebChat/issues/4643). Decoupling `botframework-directlinejs` from business logic of Web Chat for better tree-shaking, by [@compulim](https://github.com/compulim), in PR [#4645](https://github.com/microsoft/BotFramework-WebChat/pull/4645) and PR [#4648](https://github.com/microsoft/BotFramework-WebChat/pull/4648)
2828
- Related to [#4650](https://github.com/microsoft/BotFramework-WebChat/issues/4650). Added automated accessibility check using [`axe-core`](https://npmjs.com/package/axe-core)
2929
- HTML test: using `<main>` for the root container, by [@compulim](https://github.com/compulim), in PR [#4684](https://github.com/microsoft/BotFramework-WebChat/pull/4684)
30+
- HTML test: changed contrast ratio in tests that use different background colors, by [@compulim](https://github.com/compulim), in PR [#4686](https://github.com/microsoft/BotFramework-WebChat/pull/4686)
31+
- Added `ponyfill` prop to `<ReactWebChat>`/`<Composer>` and `createStoreWithOptions`, by [@compulim](https://github.com/compulim), in PR [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662)
32+
- This is for development scenarios where fake timer is needed and will only applies to Web Chat only
3033

3134
### Fixed
3235

3336
- Fixes [#4557](https://github.com/microsoft/BotFramework-WebChat/issues/4557). Flipper buttons in carousels and suggested actions is now renamed to "next/previous" from "left/right", by [@compulim](https://github.com/compulim), in PR [#4646](https://github.com/microsoft/BotFramework-WebChat/pull/4646)
3437
- Fixes [#4652](https://github.com/microsoft/BotFramework-WebChat/issues/4652). Keyboard help screen, activity focus traps, and chat history terminator should not be hidden behind `aria-hidden` because they are focusable, by [@compulim](https://github.com/compulim), in PR [#4659](https://github.com/microsoft/BotFramework-WebChat/pull/4659)
35-
- Related to [#4650](https://github.com/microsoft/BotFramework-WebChat/issues/4650). Added automated accessibility check using [`axe-core`](https://npmjs.com/package/axe-core)
36-
- HTML test: changed contrast ratio in tests that use different background colors, by [@compulim](https://github.com/compulim), in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX)
38+
- Fixes [#4665](https://github.com/microsoft/BotFramework-WebChat/issues/4665). Updated development server with latest ESBuild API, by [@compulim](https://github.com/compulim), in PR [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662).
3739

3840
### Changed
3941

0 commit comments

Comments
 (0)