@bootstrap-vue-next/nuxt 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { Composables } from 'bootstrap-vue-next';
3
3
 
4
+ type ComposableType = keyof typeof Composables;
5
+ type ConfigurationOption<T extends string> = Partial<Record<T, boolean>> & {
6
+ all: boolean;
7
+ };
4
8
  interface ModuleOptions {
5
- composables: (Partial<Record<keyof typeof Composables, boolean>> & {
6
- all: boolean;
7
- }) | boolean;
9
+ composables: ConfigurationOption<ComposableType> | boolean;
8
10
  }
9
11
 
10
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "0.1.3"
8
+ "version": "0.2.0"
9
9
  }
package/dist/module.mjs CHANGED
@@ -13,12 +13,14 @@ const useComponents = () => {
13
13
 
14
14
  const parseActiveImports = (options, values) => {
15
15
  const { all, ...others } = options;
16
- const valuesCopy = { ...values };
17
- Object.keys(valuesCopy).forEach((el) => {
18
- valuesCopy[el] = all;
19
- });
16
+ const valuesCopy = {};
17
+ if (all) {
18
+ values.forEach((el) => {
19
+ valuesCopy[el] = all;
20
+ });
21
+ }
20
22
  const merge = { ...valuesCopy, ...others };
21
- return Object.entries(merge).filter(([, value]) => value === true).map(([name]) => name);
23
+ return Object.entries(merge).filter(([name, value]) => !!value && values.includes(name)).map(([name]) => name);
22
24
  };
23
25
 
24
26
  const module = defineNuxtModule({
@@ -41,10 +43,10 @@ const module = defineNuxtModule({
41
43
  useComponents();
42
44
  const arr = [];
43
45
  if (Object.values(normalizedComposables).some((el) => el === true)) {
44
- const imports = parseActiveImports(normalizedComposables, {
45
- useBreadcrumb: false,
46
- useColorMode: false
47
- }).map(
46
+ const imports = parseActiveImports(normalizedComposables, [
47
+ "useBreadcrumb",
48
+ "useColorMode"
49
+ ]).map(
48
50
  (el) => ({
49
51
  from: resolver.resolve("./runtime/composables"),
50
52
  name: el
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bootstrap-vue-next/nuxt",
3
3
  "description": "Nuxt Module for BootstrapVueNext",
4
- "version": "0.1.3",
4
+ "version": "0.2.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Issayah",
@@ -21,24 +21,24 @@
21
21
  ],
22
22
  "types": "./dist/types.d.ts",
23
23
  "peerDependencies": {
24
- "bootstrap-vue-next": "^0.9.17"
24
+ "bootstrap-vue-next": "^0.11.0"
25
25
  },
26
26
  "dependencies": {
27
- "@nuxt/kit": "^3.6.1"
27
+ "@nuxt/kit": "^3.6.5"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@nuxt/eslint-config": "^0.1.1",
31
31
  "@nuxt/module-builder": "^0.4.0",
32
- "@nuxt/schema": "^3.6.1",
32
+ "@nuxt/schema": "^3.6.5",
33
33
  "@rushstack/eslint-patch": "^1.3.2",
34
- "@vue/eslint-config-prettier": "^7.1.0",
35
- "eslint": "^8.43.0",
34
+ "@vue/eslint-config-prettier": "^8.0.0",
35
+ "eslint": "^8.45.0",
36
36
  "eslint-define-config": "^1.21.0",
37
- "nuxt": "^3.6.1",
38
- "prettier": "^2.8.8",
39
- "unimport": "^3.0.10",
37
+ "nuxt": "^3.6.5",
38
+ "prettier": "^3.0.0",
39
+ "unimport": "^3.1.0",
40
40
  "vue": "^3.3.4",
41
- "bootstrap-vue-next": "^0.9.17"
41
+ "bootstrap-vue-next": "^0.11.0"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",