@fluentui/priority-overflow 9.1.10 → 9.1.11
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -2
- package/lib/debounce.js +5 -0
- package/lib/debounce.js.map +1 -1
- package/lib-commonjs/debounce.js +5 -0
- package/lib-commonjs/debounce.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
# Change Log - @fluentui/priority-overflow
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 14 Dec 2023 09:51:32 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.11](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.11)
|
8
|
+
|
9
|
+
Thu, 14 Dec 2023 09:51:32 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.1.10..@fluentui/priority-overflow_v9.1.11)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: updates should be synchronous in unit tests ([PR #30014](https://github.com/microsoft/fluentui/pull/30014) by lingfangao@hotmail.com)
|
15
|
+
|
7
16
|
## [9.1.10](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.10)
|
8
17
|
|
9
|
-
Mon, 20 Nov 2023 09:
|
18
|
+
Mon, 20 Nov 2023 09:55:08 GMT
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.1.9..@fluentui/priority-overflow_v9.1.10)
|
11
20
|
|
12
21
|
### Patches
|
package/lib/debounce.js
CHANGED
@@ -5,6 +5,11 @@
|
|
5
5
|
* @returns debounced function
|
6
6
|
*/ export function debounce(fn) {
|
7
7
|
let pending;
|
8
|
+
// React testing platforms will often output errors when state updates happen outside `act`
|
9
|
+
// Since there is nothing obvious to wait for we just avoid debouncing in unit test environments
|
10
|
+
if (process.env.NODE_ENV === 'test') {
|
11
|
+
return fn;
|
12
|
+
}
|
8
13
|
return ()=>{
|
9
14
|
if (!pending) {
|
10
15
|
pending = true;
|
package/lib/debounce.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["debounce.ts"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */\nexport function debounce(fn: Function) {\n let pending: boolean;\n return () => {\n if (!pending) {\n pending = true;\n queueMicrotask(() => {\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","queueMicrotask"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,SAASC,EAAY;IACnC,IAAIC;
|
1
|
+
{"version":3,"sources":["debounce.ts"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */\nexport function debounce(fn: Function) {\n let pending: boolean;\n\n // React testing platforms will often output errors when state updates happen outside `act`\n // Since there is nothing obvious to wait for we just avoid debouncing in unit test environments\n if (process.env.NODE_ENV === 'test') {\n return fn as () => void;\n }\n\n return () => {\n if (!pending) {\n pending = true;\n queueMicrotask(() => {\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","process","env","NODE_ENV","queueMicrotask"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,SAASC,EAAY;IACnC,IAAIC;IAEJ,2FAA2F;IAC3F,gGAAgG;IAChG,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,QAAQ;QACnC,OAAOJ;IACT;IAEA,OAAO;QACL,IAAI,CAACC,SAAS;YACZA,UAAU;YACVI,eAAe;gBACb,uEAAuE;gBACvE,gEAAgE;gBAChEJ,UAAU;gBACVD;YACF;QACF;IACF;AACF"}
|
package/lib-commonjs/debounce.js
CHANGED
@@ -15,6 +15,11 @@ Object.defineProperty(exports, "debounce", {
|
|
15
15
|
});
|
16
16
|
function debounce(fn) {
|
17
17
|
let pending;
|
18
|
+
// React testing platforms will often output errors when state updates happen outside `act`
|
19
|
+
// Since there is nothing obvious to wait for we just avoid debouncing in unit test environments
|
20
|
+
if (process.env.NODE_ENV === 'test') {
|
21
|
+
return fn;
|
22
|
+
}
|
18
23
|
return ()=>{
|
19
24
|
if (!pending) {
|
20
25
|
pending = true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["debounce.js"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */ export function debounce(fn) {\n let pending;\n return ()=>{\n if (!pending) {\n pending = true;\n queueMicrotask(()=>{\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","queueMicrotask"],"mappings":"AAAA;;;;;CAKC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,SAASC,EAAE;IAC3B,IAAIC;IACJ,OAAO;QACH,IAAI,
|
1
|
+
{"version":3,"sources":["debounce.js"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */ export function debounce(fn) {\n let pending;\n // React testing platforms will often output errors when state updates happen outside `act`\n // Since there is nothing obvious to wait for we just avoid debouncing in unit test environments\n if (process.env.NODE_ENV === 'test') {\n return fn;\n }\n return ()=>{\n if (!pending) {\n pending = true;\n queueMicrotask(()=>{\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","process","env","NODE_ENV","queueMicrotask"],"mappings":"AAAA;;;;;CAKC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,SAASC,EAAE;IAC3B,IAAIC;IACJ,2FAA2F;IAC3F,gGAAgG;IAChG,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,QAAQ;QACjC,OAAOJ;IACX;IACA,OAAO;QACH,IAAI,CAACC,SAAS;YACVA,UAAU;YACVI,eAAe;gBACX,uEAAuE;gBACvE,gEAAgE;gBAChEJ,UAAU;gBACVD;YACJ;QACJ;IACJ;AACJ"}
|