Skip to content

@cubejs-client/core "internalDayjs" config affects all dayjs imports #10165

@benskz

Description

@benskz

Describe the bug
While packages/cubejs-client-core/src/time.tstries to customize an internal dayjs instance, these options are also applied to the default dayjs instance.

To Reproduce

import dayjs from 'dayjs';
import { internalDayjs } from '@cubejs-client/core'

console.log(dayjs().startOf('week').format('dddd'); // Sunday

const cubeDayjs = internalDayjs(); // sets weekStart to 1

console.log(dayjs().startOf('week').format('dddd'); // Monday

Expected behavior
Cube Client's dayjs internal instance options should not be reflected in the default dayjs instance.

Version:
"@cubejs-client/core": "^1.5.4",

Metadata

Metadata

Assignees

No one assigned

    Labels

    client:coreIssues relating to the JavaScript client SDKhelp wantedCommunity contributions are welcome.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions