@fluentui/react-theme
Advanced tools
Comparing version 9.0.0-alpha.10 to 9.0.0-alpha.11
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Fri, 30 Apr 2021 07:35:40 GMT", | ||
"date": "Thu, 13 May 2021 07:33:37 GMT", | ||
"tag": "@fluentui/react-theme_v9.0.0-alpha.11", | ||
"version": "9.0.0-alpha.11", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"comment": "perf: avoid deep merge in mergeThemes() if possible", | ||
"author": "olfedias@microsoft.com", | ||
"commit": "d1d73e5ea7be50ad93077fad7d3b05af4db1cc94", | ||
"package": "@fluentui/react-theme" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 30 Apr 2021 07:42:23 GMT", | ||
"tag": "@fluentui/react-theme_v9.0.0-alpha.10", | ||
@@ -8,0 +23,0 @@ "version": "9.0.0-alpha.10", |
# Change Log - @fluentui/react-theme | ||
This log was last generated on Fri, 30 Apr 2021 07:35:40 GMT and should not be manually modified. | ||
This log was last generated on Thu, 13 May 2021 07:33:37 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-theme_v9.0.0-alpha.11) | ||
Thu, 13 May 2021 07:33:37 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-theme_v9.0.0-alpha.10..@fluentui/react-theme_v9.0.0-alpha.11) | ||
### Changes | ||
- perf: avoid deep merge in mergeThemes() if possible ([PR #18156](https://github.com/microsoft/fluentui/pull/18156) by olfedias@microsoft.com) | ||
## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-theme_v9.0.0-alpha.10) | ||
Fri, 30 Apr 2021 07:35:40 GMT | ||
Fri, 30 Apr 2021 07:42:23 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-theme_v9.0.0-alpha.9..@fluentui/react-theme_v9.0.0-alpha.10) | ||
@@ -11,0 +20,0 @@ |
@@ -8,2 +8,2 @@ import { PartialTheme, Theme } from '../types'; | ||
export declare function merge<T = {}>(target: Partial<T>, ...args: (Partial<T> | null | undefined | false)[]): T; | ||
export declare function mergeThemes(a: Theme, b: PartialTheme | Theme): Theme; | ||
export declare function mergeThemes(a: Theme | undefined, b: PartialTheme | Theme | undefined): Theme; |
@@ -55,3 +55,10 @@ define(["require", "exports"], function (require, exports) { | ||
function mergeThemes(a, b) { | ||
return merge({}, a, b); | ||
// Deep merge impacts perf: we should like to avoid it if it's possible | ||
if (a && b) { | ||
return merge({}, a, b); | ||
} | ||
if (a) { | ||
return a; | ||
} | ||
return b; | ||
} | ||
@@ -58,0 +65,0 @@ exports.mergeThemes = mergeThemes; |
@@ -8,2 +8,2 @@ import { PartialTheme, Theme } from '../types'; | ||
export declare function merge<T = {}>(target: Partial<T>, ...args: (Partial<T> | null | undefined | false)[]): T; | ||
export declare function mergeThemes(a: Theme, b: PartialTheme | Theme): Theme; | ||
export declare function mergeThemes(a: Theme | undefined, b: PartialTheme | Theme | undefined): Theme; |
@@ -54,5 +54,12 @@ "use strict"; | ||
function mergeThemes(a, b) { | ||
return merge({}, a, b); | ||
// Deep merge impacts perf: we should like to avoid it if it's possible | ||
if (a && b) { | ||
return merge({}, a, b); | ||
} | ||
if (a) { | ||
return a; | ||
} | ||
return b; | ||
} | ||
exports.mergeThemes = mergeThemes; | ||
//# sourceMappingURL=mergeThemes.js.map |
@@ -8,2 +8,2 @@ import { PartialTheme, Theme } from '../types'; | ||
export declare function merge<T = {}>(target: Partial<T>, ...args: (Partial<T> | null | undefined | false)[]): T; | ||
export declare function mergeThemes(a: Theme, b: PartialTheme | Theme): Theme; | ||
export declare function mergeThemes(a: Theme | undefined, b: PartialTheme | Theme | undefined): Theme; |
@@ -50,4 +50,11 @@ // TODO | ||
export function mergeThemes(a, b) { | ||
return merge({}, a, b); | ||
// Deep merge impacts perf: we should like to avoid it if it's possible | ||
if (a && b) { | ||
return merge({}, a, b); | ||
} | ||
if (a) { | ||
return a; | ||
} | ||
return b; | ||
} | ||
//# sourceMappingURL=mergeThemes.js.map |
{ | ||
"name": "@fluentui/react-theme", | ||
"version": "9.0.0-alpha.10", | ||
"version": "9.0.0-alpha.11", | ||
"description": "Fluent UI themes", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
556437
6325