From ca00486fdd8702d91ee955adc8adb675f2fa90c8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 14 Jan 2025 18:33:33 +0100 Subject: [PATCH] feat: Allow to import without `dist` The individual import path of components, composables, directives, and functions was changed. The type of import is (e.g. `components`) is now lowercase and the `dist` will be omitted. Signed-off-by: Ferdinand Thiessen --- CHANGELOG.md | 12 ++++++++++++ docs/composables.md | 4 ++-- docs/composables/useHotKey.md | 2 +- docs/composables/useIsDarkTheme.md | 2 +- docs/directives.md | 6 +++--- docs/directives/focus.md | 2 +- docs/directives/linkify.md | 2 +- docs/directives/tooltip.md | 2 +- docs/functions/a11y.md | 2 +- docs/functions/emoji.md | 2 +- docs/functions/isDarkTheme.md | 2 +- docs/functions/spawnDialog.md | 2 +- docs/functions/usernameToColor.md | 2 +- docs/index.md | 2 +- package.json | 16 ++++++++++++++++ 15 files changed, 44 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 630f0842a0..e27ab7f3f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ # Changelog +## [v8.23.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.23.0) (UNRELEASED) +[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.22.0...v8.23.0) + +### 🚀 Enhancements +* The individual import path of components, composables, directives, and functions was changed. + The type of import is (e.g. `components`) is now lowercase and the `dist` will be omitted. + For example to import the `NcButton` component the path has changed: + - from `import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'`. + - to `import NcButton from '@nextcloud/vue/components/NcButton'` + + The old import paths are still valid, but deprecated and will be removed in version 9. + ## [v8.22.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.22.0) (2024-12-20) [Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.21.0...v8.22.0) diff --git a/docs/composables.md b/docs/composables.md index 07980cfcdc..5666b3b5a1 100644 --- a/docs/composables.md +++ b/docs/composables.md @@ -8,7 +8,7 @@ To use any composable, import and use it according to documentation or Vue guidelines, for example: ```js static -import { useIsMobile } from '@nextcloud/vue/dist/composables/useIsMobile.js' +import { useIsMobile } from '@nextcloud/vue/composables/useIsMobile' export default { setup() { @@ -21,7 +21,7 @@ export default { or in `