-
Notifications
You must be signed in to change notification settings - Fork 96
chore(deps): bump @vuepic/vue-datepicker from 11.0.2 to 12.0.1 #7767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7c6bf4c
113e2d7
f192123
04a434b
fa0c031
32fb0b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need it in a shared util if this is only used by a single component (for its internal dependency)?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Basically just to clean the component
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but was discussed in another PR, if this is not a shared util, but only a part of |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /*! | ||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| import type { Locale } from 'date-fns' | ||
|
|
||
| import { logger } from './logger.ts' | ||
|
|
||
| // this is a fix only for the styleguide as webpack does not have glob import | ||
| let modules: Record<string, () => Promise<{ default: Locale }>> | ||
|
Comment on lines
+10
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Webpack does have glob import |
||
| try { | ||
| modules = import.meta.glob('/node_modules/date-fns/locale/*.js') | ||
| } catch { | ||
| modules = {} | ||
| } | ||
ShGKme marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * Load a date-fns locale module. | ||
| * | ||
| * @param locale - The canonical locale to load | ||
| */ | ||
| export async function loadDateFnsLocale(locale: string): Promise<Locale | undefined> { | ||
| logger.debug(`Loading date-fns locale for '${locale}'`) | ||
| const modulePath = `/node_modules/date-fns/locale/${locale}.js` | ||
| if (modules[modulePath]) { | ||
| logger.debug(`Import date-fns locale for '${locale}'`) | ||
| const mod = await modules[modulePath]() | ||
| return mod.default | ||
| } | ||
|
|
||
| if (locale.includes('-')) { | ||
| // Try without region | ||
| const shortLocale = locale.split('-')[0]! | ||
| return await loadDateFnsLocale(shortLocale) | ||
| } | ||
|
|
||
| logger.debug(`No date-fns locale found for '${locale}'`) | ||
| } | ||
susnux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.