mirror of
https://github.com/apache/superset.git
synced 2026-09-05 15:01:44 +00:00
fix(frontend): remove root's implicit reliance on d3-format's hoisted types
setupFormatters.ts and bootstrapTypes.ts still imported FormatLocaleDefinition directly from d3-format, so root type-checking depended on @types/d3-format being hoisted from @superset-ui/core's devDependencies rather than an explicit root dependency. Re-export the type from core (alongside the existing formatSpecifier re-export) and import it from there instead, removing the last direct root usages of d3-format. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
d18073fb2e
commit
c52cd0af5f
@@ -20,6 +20,7 @@
|
||||
export { default as NumberFormats } from './NumberFormats';
|
||||
export { default as NumberFormatter, PREVIEW_VALUE } from './NumberFormatter';
|
||||
export { formatSpecifier } from 'd3-format';
|
||||
export type { FormatLocaleDefinition } from 'd3-format';
|
||||
export { DEFAULT_D3_FORMAT } from './D3FormatConfig';
|
||||
|
||||
export {
|
||||
|
||||
@@ -32,8 +32,8 @@ import {
|
||||
setCurrencyLocale,
|
||||
createLengthFormatter,
|
||||
createThroughputFormatter,
|
||||
FormatLocaleDefinition,
|
||||
} from '@superset-ui/core';
|
||||
import { FormatLocaleDefinition } from 'd3-format';
|
||||
import { TimeLocaleDefinition } from 'd3-time-format';
|
||||
|
||||
export default function setupFormatters(
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { FormatLocaleDefinition } from 'd3-format';
|
||||
import { TimeLocaleDefinition } from 'd3-time-format';
|
||||
import { isPlainObject } from 'lodash-es';
|
||||
import { Languages } from 'src/features/home/LanguagePicker';
|
||||
@@ -28,6 +27,7 @@ import {
|
||||
import type {
|
||||
ColorSchemeConfig,
|
||||
FeatureFlagMap,
|
||||
FormatLocaleDefinition,
|
||||
JsonObject,
|
||||
SequentialSchemeConfig,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
Reference in New Issue
Block a user