Skip to content

Commit 0a892e3

Browse files
authored
Merge branch 'dev' into patch-1
2 parents f74ef89 + a1cebda commit 0a892e3

File tree

231 files changed

+2155
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+2155
-1206
lines changed

.eslintrc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ module.exports = {
1515
es6: true,
1616
'jest/globals': true
1717
},
18-
globals: {
19-
Vue: true
20-
},
2118
rules: {
2219
'no-unused-vars': [
2320
'error',

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- dev
1111
- master
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
build:
1518
runs-on: ${{ matrix.os }}
@@ -24,7 +27,7 @@ jobs:
2427
uses: actions/checkout@v3
2528

2629
- name: Set Node.js version
27-
uses: actions/setup-node@v3.1.1
30+
uses: actions/setup-node@v3.5.1
2831
with:
2932
node-version: ${{ matrix.node }}
3033

@@ -33,7 +36,7 @@ jobs:
3336
run: echo "::set-output name=dir::$(yarn cache dir)"
3437

3538
- name: Cache node_modules
36-
uses: actions/cache@v3.0.2
39+
uses: actions/cache@v3.0.11
3740
with:
3841
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3942
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}

.github/workflows/codeql.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ on:
1515
schedule:
1616
- cron: "0 2 * * 5"
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
analyze:
23+
permissions:
24+
actions: read # for github/codeql-action/init to get workflow details
25+
contents: read # for actions/checkout to fetch code
26+
security-events: write # for github/codeql-action/autobuild to send a status report
2027
name: Analyze
2128
runs-on: ubuntu-latest
2229

@@ -26,12 +33,12 @@ jobs:
2633

2734
# Initializes the CodeQL tools for scanning.
2835
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v1
36+
uses: github/codeql-action/init@v2
3037
with:
3138
languages: "javascript"
3239

3340
- name: Autobuild
34-
uses: github/codeql-action/autobuild@v1
41+
uses: github/codeql-action/autobuild@v2
3542

3643
- name: Perform CodeQL Analysis
37-
uses: github/codeql-action/analyze@v1
44+
uses: github/codeql-action/analyze@v2

.github/workflows/test.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- dev
1111
- master
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
lint:
1518
runs-on: ${{ matrix.os }}
@@ -24,7 +27,7 @@ jobs:
2427
uses: actions/checkout@v3
2528

2629
- name: Set Node.js version
27-
uses: actions/setup-node@v3.1.1
30+
uses: actions/setup-node@v3.5.1
2831
with:
2932
node-version: ${{ matrix.node }}
3033

@@ -33,7 +36,7 @@ jobs:
3336
run: echo "::set-output name=dir::$(yarn cache dir)"
3437

3538
- name: Cache node_modules
36-
uses: actions/cache@v3.0.2
39+
uses: actions/cache@v3.0.11
3740
with:
3841
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3942
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -61,7 +64,7 @@ jobs:
6164
uses: actions/checkout@v3
6265

6366
- name: Set Node.js version
64-
uses: actions/setup-node@v3.1.1
67+
uses: actions/setup-node@v3.5.1
6568
with:
6669
node-version: ${{ matrix.node }}
6770

@@ -70,7 +73,7 @@ jobs:
7073
run: echo "::set-output name=dir::$(yarn cache dir)"
7174

7275
- name: Cache node_modules
73-
uses: actions/cache@v3.0.2
76+
uses: actions/cache@v3.0.11
7477
with:
7578
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
7679
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -98,7 +101,7 @@ jobs:
98101
uses: actions/checkout@v3
99102

100103
- name: Set Node.js version
101-
uses: actions/setup-node@v3.1.1
104+
uses: actions/setup-node@v3.5.1
102105
with:
103106
node-version: ${{ matrix.node }}
104107

@@ -107,7 +110,7 @@ jobs:
107110
run: echo "::set-output name=dir::$(yarn cache dir)"
108111

109112
- name: Cache node_modules
110-
uses: actions/cache@v3.0.2
113+
uses: actions/cache@v3.0.11
111114
with:
112115
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
113116
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -122,8 +125,19 @@ jobs:
122125
- name: Test unit
123126
run: yarn run test:unit --coverage --maxWorkers=2
124127

128+
- name: Test unit (Vue 3)
129+
run: yarn run test:unit --coverage --maxWorkers=2
130+
env:
131+
USE_VUE3: '1'
132+
133+
- name: Merge coverage
134+
run:
135+
npx istanbul-merge --out ./coverage-final.json coverage/coverage-final.json
136+
coverage-vue3/coverage-final.json
137+
125138
- name: CodeCov
126-
uses: codecov/codecov-action@v3.0.0
139+
uses: codecov/codecov-action@v3.1.1
127140
with:
128141
token: ${{ secrets.CODECOV_TOKEN }}
129142
flags: unittests
143+
files: ./coverage-final.json

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.vercel/
55
.vscode/
66
coverage/
7+
coverage-vue3/
78
dist/
89
docs-dist/
910
esm/

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. See
44
[standard-version](https://github.com/conventional-changelog/standard-version) for commit
55
guidelines.
66

7+
## [2.23.1](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.23.0...v2.23.1) (2022-10-26)
8+
9+
### Bug Fixes
10+
11+
- correctly pass parent relations for Vue.js2
12+
([58e2d7e](https://github.com/bootstrap-vue/bootstrap-vue/commit/58e2d7e4f5e883207c4f7baa856532d3ae924a0c))
13+
14+
## [2.23.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.22.0...v2.23.0) (2022-10-25)
15+
16+
### Bug Fixes
17+
18+
- **vue3:** do not rely on \_\_vueParentComponent in tooltip
19+
([fe13503](https://github.com/bootstrap-vue/bootstrap-vue/commit/fe13503f7aa6d0bd6f7e1ed4f4a2e7acff421106))
20+
- update refs inside v-for to work for @vue/compat
21+
([ae4bac8](https://github.com/bootstrap-vue/bootstrap-vue/commit/ae4bac8a4327a1f293afbcf571e84ed1de4497f8))
22+
23+
### Other v2.23.0
24+
25+
- add support for @vue/compat
26+
727
## [2.22.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.21.2...v2.22.0) (2022-04-17)
828

929
### Features

docs/components/header.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<div class="navbar-nav-scroll">
3232
<b-navbar-nav class="bd-navbar-nav flex-row">
3333
<b-nav-item to="/docs" active-class="active" exact no-prefetch>Docs</b-nav-item>
34+
<b-nav-item to="/vue3" active-class="active" exact no-prefetch>Vue.js 3</b-nav-item>
3435
<b-nav-item to="/docs/components" active-class="active" no-prefetch>Components</b-nav-item>
3536
<b-nav-item to="/docs/directives" active-class="active" no-prefetch>Directives</b-nav-item>
3637
<b-nav-item to="/docs/icons" active-class="active" no-prefetch>Icons</b-nav-item>

docs/markdown/intro/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The online documentation comprises:
3131

3232
## Prerequisites
3333

34-
This BootstrapVue documentation assumes you are familiar with Vue and and Bootstrap
34+
This BootstrapVue documentation assumes you are familiar with Vue and Bootstrap
3535
v{{ bootstrapVersionMajor }} CSS. Good starting points for these:
3636

3737
- [Vue Guide](https://vuejs.org/v2/guide/)
@@ -44,8 +44,8 @@ v{{ bootstrapVersionMajor }} CSS. Good starting points for these:
4444

4545
In many of the examples shown in BootstrapVue's documentation, you may see the use of CSS classes
4646
such as <code class="text-nowrap">ml-2</code>, <code class="text-nowrap">py-1</code>, etc. These are
47-
Bootstrap v{{bootstrapVersionMinor}} utility classes that help control padding, margins, positioning
48-
and more. You can find information on these classes in the
47+
Bootstrap v{{bootstrapVersionMinor}} utility classes that help control padding, margins,
48+
positioning, and more. You can find information on these classes in the
4949
[Utility Classes](/docs/reference/utility-classes) reference section.
5050

5151
Many of the examples in this documentation are _live_ and can be edited in-place for an enhanced

docs/pages/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<b-col tag="aside" cols="12" md="4" order-md="2" class="logo-aside mb-4 mb-md-0">
88
<BvLogo></bvLogo>
99
</b-col>
10-
1110
<b-col tag="header" cols="12" md="8" order-md="1">
1211
<h1 class="mb-3 text-center text-md-left bd-text-purple-bright">
1312
Bootstrap<span class="text-vue-green">Vue</span>

docs/pages/vue3.vue

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<template>
2+
<b-container id="content" fluid="lg" tag="main" class="py-5">
3+
<header class="pb-4 bd-content">
4+
<h1>Vue.js 3.x initial support</h1>
5+
<p class="bd-lead">
6+
BootstrapVue meets <code class="text-nowrap" translate="no">@vue-compat</code>!
7+
</p>
8+
</header>
9+
<section class="bd-content">
10+
With the release of <b>v2.23.0</b> you can now use <span class="bd-text-purple-bright">BootstrapVue</span> with <a href="https://v3-migration.vuejs.org/migration-build.html" target="_blank">migration build</a> of Vue.js 3
11+
12+
<b-alert show variant="warning" class="mt-3">
13+
@vue/compat support is designed for early migration to Vue.js 3 and will be eventually replaced with bootstrap-vue 3.0
14+
</b-alert>
15+
<h2 id="limitations" class="bv-no-focus-ring mb-3">
16+
<span class="bd-content-title">Important limitations<a href="#prerequisites" aria-labelledby="limitations" class="anchorjs-link"></a></span>
17+
</h2>
18+
<p><code class="text-nowrap" translate="no">@vue-compat</code> support is currently limited to <code class="text-nowrap" translate="no">{ MODE: 2 }</code> configuration both for compiler and Vue.js itself.
19+
You can find more details in <a href="https://v3-migration.vuejs.org/migration-build.html#compat-configuration" target="_blank">compat configuration</a> section of migration guide.
20+
</p>
21+
<p>That means that you can manually configure each your component with <code class="text-nowrap" translate="no">{ compatConfig: { MODE: 3 }}</code> to be ready for switching to Vue.js 3, however global configuration should be kept in legacy mode in order for all BootstrapVue functions to work</p>
22+
23+
<pre class="hljs language-html text-monospace p-2 notranslate" translate="no">{{ cmpCode }}</pre>
24+
25+
26+
<h2 id="start" class="bv-no-focus-ring">
27+
<span class="bd-content-title">Getting started<a href="#prerequisites" aria-labelledby="start" class="anchorjs-link"></a></span>
28+
</h2>
29+
30+
<ul>
31+
<li>Configure your application according to <a target="_blank" href="https://v3-migration.vuejs.org/migration-build.html#upgrade-workflow">upgrade workflow</a></li>
32+
<li>Upgrade bootstrap-vue to <b>v2.23.0</b> or higher</li>
33+
<li>Make sure you're still on bootstrap <b>v4</b></li>
34+
</ul>
35+
36+
<p>You can use this <a href="https://stackblitz.com/edit/bootstrap-vue-with-compat">sandbox</a> for reference or reporting issues with @vue/compat</p>
37+
38+
</section>
39+
</b-container>
40+
</template>
41+
42+
<script>
43+
import hljs from '../utils/hljs'
44+
45+
export default {
46+
head() {
47+
const title = `Vue.js 3 support | BootstrapVue`
48+
return {
49+
title
50+
}
51+
},
52+
computed: {
53+
cmpCode() {
54+
return [
55+
`<template>...</template>`,
56+
`<script>`,
57+
`export default {`,
58+
` data() { /* ... */ },`,
59+
``,
60+
` // This will disable all Vue.js 2 legacy features for your component`,
61+
` compatConfig: { MODE: 3 }`,
62+
``,
63+
` // ... rest of your component configuration ... `,
64+
`}`,
65+
// eslint-disable-next-line no-useless-escape
66+
`<\/script>`
67+
].join('\n')
68+
}
69+
},
70+
mounted() {
71+
// Highlight code blocks
72+
;[...this.$el.querySelectorAll('pre.hljs')].forEach(pre => {
73+
hljs.highlightBlock(pre)
74+
})
75+
}
76+
}
77+
</script>

jest.config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
const useVue3 = 'USE_VUE3' in process.env
2+
3+
const moduleNameMapper = useVue3
4+
? {
5+
'^vue$': '@vue/compat',
6+
'^@vue/test-utils$': '@vue/test-utils-vue3'
7+
}
8+
: {}
9+
110
module.exports = {
211
testRegex: 'spec.js$',
312
moduleFileExtensions: ['js', 'vue'],
13+
moduleNameMapper,
414
transform: {
5-
'^.+\\.js$': 'babel-jest',
6-
'.*\\.(vue)$': 'vue-jest'
15+
'^.+\\.js$': 'babel-jest'
716
},
8-
coverageDirectory: './coverage/',
17+
transformIgnorePatterns: ['/node_modules(?![\\\\/]vue-test-utils-compat[\\\\/])'],
18+
coverageDirectory: useVue3 ? './coverage-vue3' : './coverage/',
919
testEnvironmentOptions: {
1020
pretendToBeVisual: true
1121
},

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap-vue",
3-
"version": "2.22.0",
3+
"version": "2.23.1",
44
"description": "With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extensive and automated WAI-ARIA accessibility markup.",
55
"main": "./dist/bootstrap-vue.common.js",
66
"web": "./dist/bootstrap-vue.js",
@@ -66,7 +66,7 @@
6666
"docs-gen": "cross-env NODE_ENV=docs nuxt generate -c docs/nuxt.config.js",
6767
"lint": "eslint --ext .js,.md,.vue ./",
6868
"postinstall": "opencollective || exit 0",
69-
"prepare": "husky install",
69+
"prepare": "husky install && yarn run build",
7070
"prettify": "prettier --write '**/*.{js,json,md,scss,ts,vue}'",
7171
"release": "yarn run prettify && yarn run test && yarn run build && yarn run release-notes && standard-version",
7272
"release-notes": "jiti ./scripts/release-notes",
@@ -87,7 +87,7 @@
8787
"vue-functional-data-merge": "^3.1.0"
8888
},
8989
"devDependencies": {
90-
"@babel/cli": "^7.13.16",
90+
"@babel/cli": "^7.19.3",
9191
"@babel/core": "^7.16.5",
9292
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
9393
"@babel/plugin-transform-runtime": "^7.16.5",
@@ -99,7 +99,10 @@
9999
"@nuxtjs/robots": "^2.5.0",
100100
"@nuxtjs/sitemap": "^2.4.0",
101101
"@testing-library/jest-dom": "^5.12.0",
102+
"@vue/compat": "^3.2.40",
103+
"@vue/compiler-dom": "^3.2.40",
102104
"@vue/test-utils": "^1.3.0",
105+
"@vue/test-utils-vue3": "npm:@vue/test-utils@2.2.0",
103106
"autoprefixer": "^10.4.0",
104107
"babel-core": "^7.0.0-bridge.0",
105108
"babel-eslint": "^10.1.0",
@@ -146,12 +149,12 @@
146149
"sass": "^1.45.0",
147150
"sass-loader": "^10.1.1",
148151
"standard-version": "^9.3.0",
149-
"terser": "^5.10.0",
152+
"terser": "^5.15.0",
150153
"vue": "^2.6.12",
151-
"vue-jest": "^3.0.7",
152154
"vue-router": "^3.5.1",
153155
"vue-server-renderer": "^2.6.12",
154-
"vue-template-compiler": "^2.6.12"
156+
"vue-template-compiler": "^2.6.12",
157+
"vue-test-utils-compat": "0.0.6"
155158
},
156159
"keywords": [
157160
"Bootstrap",

0 commit comments

Comments
 (0)