Skip to content

Commit c1b8d5b

Browse files
authored
chore: release v2.0.0-rc.22
2 parents 9dad687 + 8aaab7d commit c1b8d5b

Some content is hidden

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

45 files changed

+1128
-798
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.nuxt/
22
dist/
33
docs-dist/
4+
esm/
45
es/
56
node_modules/
6-
nuxt/plugin.template.js
7+
nuxt/plugin.*.js

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
coverage/
99
dist/
1010
docs-dist/
11+
esm/
1112
es/
1213
node_modules/
1314
sw.js

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.nuxt/
22
dist/
33
docs-dist/
4+
esm/
45
es/
56
node_modules/
67
nuxt/plugin.template.js
8+
nuxt/plugin.prod.js
9+
nuxt/plugin.dev.js

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,93 @@
44
> [standard-version](https://github.com/conventional-changelog/standard-version) for commit
55
> guidelines.
66
7+
<a name="2.0.0-rc.22"></a>
8+
9+
## [v2.0.0-rc.22](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.21...v2.0.0-rc.22)
10+
11+
Released 2019-05-31
12+
13+
### Notable Changes v2.0.0-rc.22
14+
15+
- Improved/shortened method for importing of plugins, components, and directives, as top-level
16+
named exports. The ESM and CJS builds now both include these top level named exports:
17+
- Default export is still the BootstrapVue plugin
18+
- Simplified import format for importing components, directives, plugins:<br>
19+
`import { ModalPlugin, CardPlugin, BAlert, BRow, BCol, VBScollspyPlugin } from 'bootstrap-vue'`
20+
- New `esm/` modular build with top-level named exports (tree shakeable)
21+
- New `dist/bootstrap-vue.esm.js` esm bundle with top-level named exports
22+
- New `dist/bootstrap-vue.common.js` cjs bundle with top-level named exports
23+
- No need to cherry-pick from sub directories for plugins/components/directives
24+
- Most package bundlers will pick the appropriate build automatically
25+
- Nuxt module:
26+
- Improved tree shaking using the new import syntax
27+
- Automatically adds `transformAssetUrls` settings for BootstrapVue component props.
28+
- Reverted the `es/` build directory back to mini-commonjs modules (from true ES modules introduced
29+
in v2.0.0-rc.21) due to issues with Nuxt.js and some webpack builds expecting CJS format when
30+
cherry-picking individual components, directives and plugins from sub-directories.
31+
- **DEPRECATION: The `es/` build has been deprecated in favour of the newer `esm` build and `cjs`
32+
bundle, which allow for importing individual components, directives and plugins from top-level
33+
named exports.** Users are encouraged to convert their existing imports to the new syntax.
34+
35+
### Bug Fixes v2.0.0-rc.22
36+
37+
- **b-modal:** use `safeId()` when comparing `id` received by hide/show handler (closes
38+
[#3389](https://github.com/bootstrap-vue/bootstrap-vue/issues/3389)
39+
([#3394](https://github.com/bootstrap-vue/bootstrap-vue/issues/3394)
40+
[fae3d25](https://github.com/bootstrap-vue/bootstrap-vue/commit/fae3d25))
41+
- **b-tabs:** fix regression with dynamically added tabs (fixes
42+
[#3395](https://github.com/bootstrap-vue/bootstrap-vue/issues/3395))
43+
([#3396](https://github.com/bootstrap-vue/bootstrap-vue/issues/3396)
44+
[f254f90](https://github.com/bootstrap-vue/bootstrap-vue/commit/f254f90))
45+
- **form controls:** handle autofocus inside modal or when inside a transition
46+
([#3386](https://github.com/bootstrap-vue/bootstrap-vue/issues/3386)
47+
[c4a8edb](https://github.com/bootstrap-vue/bootstrap-vue/commit/c4a8edb))
48+
- **es:** revert to tranforming `es/` modules into CJS, and simplify main build with top-level
49+
named import/exports
50+
(closes [#3397](https://github.com/bootstrap-vue/bootstrap-vue/issues/3397),
51+
[#3393](https://github.com/bootstrap-vue/bootstrap-vue/issues/3393),
52+
[#3323](https://github.com/bootstrap-vue/bootstrap-vue/issues/3323))
53+
([#3404](https://github.com/bootstrap-vue/bootstrap-vue/issues/3404)
54+
[6c386d3](https://github.com/bootstrap-vue/bootstrap-vue/commit/6c386d3))
55+
- **nuxt:** use new bundle for development mode (closes
56+
[#3397](https://github.com/bootstrap-vue/bootstrap-vue/issues/3397))
57+
([#3399](https://github.com/bootstrap-vue/bootstrap-vue/issues/3399)
58+
[f43097e](https://github.com/bootstrap-vue/bootstrap-vue/commit/f43097e),
59+
[#3404](https://github.com/bootstrap-vue/bootstrap-vue/issues/3404)
60+
[6c386d3](https://github.com/bootstrap-vue/bootstrap-vue/commit/6c386d3))
61+
- **types:** fix typing error for `BvComponent` and `BvPlugin` (closes
62+
[#3390](https://github.com/bootstrap-vue/bootstrap-vue/issues/3390))
63+
([#3391](https://github.com/bootstrap-vue/bootstrap-vue/issues/3391)
64+
[6f0f3fd](https://github.com/bootstrap-vue/bootstrap-vue/commit/6f0f3fd))
65+
66+
### Features v2.0.0-rc.22
67+
68+
- **b-button:** add new `squared` prop for making buttons with square corners
69+
([#3387](https://github.com/bootstrap-vue/bootstrap-vue/issues/3387)
70+
[004963d](https://github.com/bootstrap-vue/bootstrap-vue/commit/004963d))
71+
- **b-tooltip, b-popover:** allow global `delay` customization via config
72+
([#3426](https://github.com/bootstrap-vue/bootstrap-vue/issues/3426)
73+
[2aaec76](https://github.com/bootstrap-vue/bootstrap-vue/commit/2aaec76))
74+
- **nuxt:** handle edge cases where component, directive and plugin names are passed as `camelCase`
75+
or `kebab-case` and convert to new `PascalCase` names
76+
([#3418](https://github.com/bootstrap-vue/bootstrap-vue/issues/3418)
77+
[ce3ba73](https://github.com/bootstrap-vue/bootstrap-vue/commit/ce3ba73))
78+
- **nuxt module:** alias `esm/` and `es/` to `src/` for Nuxt prod mode
79+
([#3423](https://github.com/bootstrap-vue/bootstrap-vue/issues/3423)
80+
[ae2040b](https://github.com/bootstrap-vue/bootstrap-vue/commit/ae2040b))
81+
- add `"source": "src/index.js"` entry in package.json for Parcel bundler
82+
([#3422](https://github.com/bootstrap-vue/bootstrap-vue/issues/3422)
83+
[0878ca6](https://github.com/bootstrap-vue/bootstrap-vue/commit/0878ca6))
84+
785
<a name="2.0.0-rc.21"></a>
886

987
## [v2.0.0-rc.21](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.20...v2.0.0-rc.21)
1088

1189
Released 2019-05-26
1290

91+
Note: this version introduced a bug when using BootstrapVue with Nuxt.js module in dev mode.
92+
Please use version v2.0.0-rc.22 or newer.
93+
1394
### Bug Fixes v2.0.0-rc.21
1495

1596
- **b-alert:** handle case where dismiss countdown changes to a boolean value (closes

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module.exports = api => {
1010
presets,
1111
env: {
1212
es: {
13+
plugins: [['@babel/plugin-transform-modules-commonjs', { loose: true }]]
14+
},
15+
esm: {
1316
presets: [['@babel/env', { modules: false }]]
1417
},
1518
test: {

docs/components/componentdoc.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</b-col>
1414
</b-row>
1515

16-
<article v-if="aliases && aliases.length > 0">
16+
<article v-if="aliases && aliases.length > 0" class="bd-content">
1717
<anchored-heading :id="`comp-ref-${componentName}-aliases`" level="4">
1818
Component aliases
1919
</anchored-heading>
@@ -27,7 +27,7 @@
2727
</p>
2828
</article>
2929

30-
<article v-if="propsItems && propsItems.length > 0">
30+
<article v-if="propsItems && propsItems.length > 0" class="bd-content">
3131
<anchored-heading :id="`comp-ref-${componentName}-props`" level="4">
3232
Properties
3333
</anchored-heading>
@@ -82,7 +82,7 @@
8282
</template>
8383
</article>
8484

85-
<article v-if="slots && slots.length > 0">
85+
<article v-if="slots && slots.length > 0" class="bd-content">
8686
<anchored-heading :id="`comp-ref-${componentName}-slots`" level="4">
8787
Slots
8888
</anchored-heading>
@@ -101,7 +101,7 @@
101101
</b-table>
102102
</article>
103103

104-
<article v-if="events && events.length > 0">
104+
<article v-if="events && events.length > 0" class="bd-content">
105105
<anchored-heading :id="`comp-ref-${componentName}-events`" level="4">
106106
Events
107107
</anchored-heading>
@@ -129,7 +129,7 @@
129129
</b-table>
130130
</article>
131131

132-
<article v-if="rootEventListeners && rootEventListeners.length > 0">
132+
<article v-if="rootEventListeners && rootEventListeners.length > 0" class="bd-content">
133133
<anchored-heading :id="`comp-ref-${componentName}-rootEventListeners`" level="4">
134134
$root Event Listeners
135135
</anchored-heading>

docs/components/importdoc.vue

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
class="bd-content"
55
>
66
<template v-if="components.length > 0">
7-
<article>
7+
<article class="bd-content">
88
<anchored-heading id="importing-individual-components" level="3">
99
Importing individual components
1010
</anchored-heading>
1111

1212
<p>
13-
<b-badge variant="info" class="small">ENHANCED in 2.0.0-rc.20</b-badge> You can
13+
<b-badge variant="info" class="small">CHANGED in 2.0.0-rc.22</b-badge> You can
1414
import individual components into your project via the following named exports:
1515
</p>
1616

@@ -39,13 +39,13 @@
3939
</template>
4040

4141
<template v-if="directives.length > 0">
42-
<article>
42+
<article class="bd-content">
4343
<anchored-heading id="importing-individual-directives" level="3">
4444
Importing individual directives
4545
</anchored-heading>
4646

4747
<p>
48-
<b-badge variant="info" class="small">ENHANCED in 2.0.0-rc.20 </b-badge> You can
48+
<b-badge variant="info" class="small">CHANGED in 2.0.0-rc.22 </b-badge> You can
4949
import individual directives into your project via the following named exports:
5050
</p>
5151

@@ -73,13 +73,13 @@
7373
</article>
7474
</template>
7575

76-
<article>
76+
<article class="bd-content">
7777
<anchored-heading id="importing-as-a-plugin" level="3">
7878
Importing as a Vue.js plugin
7979
</anchored-heading>
8080

8181
<p>
82-
<b-badge variant="info" class="small">ENHANCED in 2.0.0-rc.20</b-badge> Importing plugins
82+
<b-badge variant="info" class="small">CHANGED in 2.0.0-rc.22</b-badge> Importing plugins
8383
has been simplified.
8484
</p>
8585

@@ -123,6 +123,16 @@
123123
<p><strong>Example:</strong></p>
124124
<pre class="hljs js text-monospace p-2">{{ pluginImportCode }}</pre>
125125
</article>
126+
127+
<aside class="alert alert-warning my-4">
128+
<p class="mb-0">
129+
<b-badge variant="warning" tag="strong">Deprecation Warning as of v2.0.0-rc.22:</b-badge>
130+
Importing components, directives and plugins from <code>bootstrap-vue/es/*</code> has been
131+
deprecated. All components, directives and plugins are now available as top-level named
132+
exports in the <code>ESM</code> and <code>CommonJS</code> builds. The <code>es/</code>
133+
directory build will be removed in a future release.
134+
</p>
135+
</aside>
126136
</section>
127137
</template>
128138

@@ -169,14 +179,14 @@ export default {
169179
},
170180
pluginImports() {
171181
const pluginLocation = this.isComponentRoute ? 'components' : 'directives'
172-
const legacyName = this.pluginName.replace(/^VB|Plugin$/g, '')
182+
// const legacyName = this.pluginName.replace(/^VB|Plugin$/g, '')
173183
return [
174184
{
175185
namedExport: this.pluginName,
176-
importPath: `bootstrap-vue/es/${pluginLocation}`
186+
importPath: 'bootstrap-vue'
177187
},
178188
{
179-
namedExport: legacyName,
189+
namedExport: this.pluginName,
180190
importPath: `bootstrap-vue/es/${pluginLocation}`,
181191
legacy: true
182192
},
@@ -216,16 +226,12 @@ export default {
216226
].join('\n')
217227
},
218228
pluginImportCode() {
219-
const pluginLocation = this.isComponentRoute ? 'components' : 'directives'
220-
const legacyName = this.pluginName.replace(/^VB|Plugin$/g, '')
229+
// const pluginLocation = this.isComponentRoute ? 'components' : 'directives'
221230
return [
222231
'// Importing the named export',
223-
`import { ${this.pluginName} } from 'bootstrap-vue/es/${pluginLocation}'`,
224-
`Vue.use(${this.pluginName})`,
225-
'',
226-
'// Or importing the default export (deprecated)',
227-
`import ${legacyName} from 'bootstrap-vue/es/${pluginLocation}/${this.pluginDir}'`,
228-
`Vue.use(${legacyName})`
232+
// `import { ${this.pluginName} } from 'bootstrap-vue/es/${pluginLocation}'`,
233+
`import { ${this.pluginName} } from 'bootstrap-vue'`,
234+
`Vue.use(${this.pluginName})`
229235
].join('\n')
230236
}
231237
},
@@ -245,7 +251,7 @@ export default {
245251
componentPath(component) {
246252
// const componentName = this.componentName(component).replace(/^b-/, '')
247253
// return `bootstrap-vue/es/components/${this.pluginDir}/${componentName}`
248-
return `bootstrap-vue/es/components`
254+
return 'bootstrap-vue'
249255
},
250256
directiveName(directive) {
251257
return kebabCase(directive)
@@ -258,7 +264,7 @@ export default {
258264
directivePath(directive) {
259265
// const directiveName = this.directiveName(directive).replace(/^b-/, '')
260266
// return `bootstrap-vue/es/directives/${directiveName}/${directiveName}`
261-
return `bootstrap-vue/es/directives`
267+
return 'bootstrap-vue'
262268
}
263269
}
264270
}

0 commit comments

Comments
 (0)