diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json new file mode 100644 index 00000000000..04027852ea9 --- /dev/null +++ b/.bundlewatch.config.json @@ -0,0 +1,71 @@ +{ + "files": [ + { + "path": "./dist/bootstrap-vue-icons.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.min.js", + "maxSize": "55 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.common.js", + "maxSize": "65 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.common.min.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.esm.js", + "maxSize": "65 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.esm.min.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.css", + "maxSize": "1.5 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.min.css", + "maxSize": "1 kB" + }, + { + "path": "./dist/bootstrap-vue.js", + "maxSize": "230 kB" + }, + { + "path": "./dist/bootstrap-vue.min.js", + "maxSize": "100 kB" + }, + { + "path": "./dist/bootstrap-vue.common.js", + "maxSize": "260 kB" + }, + { + "path": "./dist/bootstrap-vue.common.min.js", + "maxSize": "145 kB" + }, + { + "path": "./dist/bootstrap-vue.esm.js", + "maxSize": "260 kB" + }, + { + "path": "./dist/bootstrap-vue.esm.min.js", + "maxSize": "145 kB" + }, + { + "path": "./dist/bootstrap-vue.css", + "maxSize": "15 kB" + }, + { + "path": "./dist/bootstrap-vue.min.css", + "maxSize": "10 kB" + } + ], + "ci": { + "trackBranches": ["master", "dev"] + } +} diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 68c15216797..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,114 +0,0 @@ -version: 2 - -defaults: &defaults - working_directory: ~/project - docker: - - image: circleci/node:latest - environment: - NODE_ENV: test - NODE_OPTIONS: --max_old_space_size=4096 - -jobs: - # -------------------------------------------------------------------------- - # Phase 1: Setup - # -------------------------------------------------------------------------- - setup: - <<: *defaults - steps: - # Checkout repository - - checkout - - # Restore cache - - restore_cache: - key: lock-{{ checksum "yarn.lock" }} - - # Install dependencies - - run: - name: Install dependencies - command: yarn --frozen-lockfile --non-interactive - - # Save cache - - save_cache: - key: lock-{{ checksum "yarn.lock" }} - paths: - - node_modules - - # Persist workspace - - persist_to_workspace: - root: ~/project - paths: - - node_modules - - # -------------------------------------------------------------------------- - # Phase 2: Lint + Audit + Build Nuxt and fixtures - # -------------------------------------------------------------------------- - lint: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Lint - command: yarn lint - - audit: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Security audit - command: yarn audit - - build: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Build - command: yarn build - - # -------------------------------------------------------------------------- - # Phase 3: Tests - # -------------------------------------------------------------------------- - test: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Tests - command: yarn test -w=2 --coverage && yarn codecov - - # -------------------------------------------------------------------------- - # Phase 4: Publish docs (master branch only) - # -------------------------------------------------------------------------- - docs: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Publish docs - command: yarn docs-publish - -# Workflow definition -workflows: - version: 2 - - # Build and test after each commit - commit: - jobs: - - setup - - lint: { requires: [setup] } - # - audit: { requires: [setup] } - - build: { requires: [setup] } - - lint: { requires: [setup] } - - test: { requires: [setup] } - - docs: { requires: [setup], filters: { branches: { only: [master] } } } diff --git a/.eslintignore b/.eslintignore index 9348be6b01b..d4f1f0b75d8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,8 @@ .nuxt/ +coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ nuxt/plugin.*.js +sw.js diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md index 959612282b1..2c8a731ed4c 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md @@ -37,7 +37,7 @@ A clear and concise description of what you expected to happen. If applicable, add a minimal demo link to help explain your problem. Some options for that are [CodePen](https://codepen.io/), [CodeSandbox](https://codesandbox.io/), [JS Bin](https://jsbin.com/) or [JSFiddle](https://jsfiddle.net/). -You can also export markup from the [Online Playground](https://bootstrap-vue.js.org/play) to _CodePen_, _CodeSandbox_ or _JSFiddle_. +You can also export markup from the [Online Playground](https://bootstrap-vue.org/play) to _CodePen_, _CodeSandbox_ or _JSFiddle_. ### Additional context diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0cf04588611..b07f6a1582b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,32 +8,33 @@ A clear and concise description of what the pull request does. **What kind of change does this PR introduce?** (check at least one) -- [ ] Bugfix -- [ ] Feature -- [ ] Enhancement -- [ ] ARIA accessibility -- [ ] Documentation update +- [ ] Bugfix (fixes a boo-boo in the code) - `fix(...)`, requires a patch version update +- [ ] Feature (adds a new feature to BootstrapVue) - `feat(...)`, requires a minor version update +- [ ] Enhancement (augments an existing feature) - `feat(...)`, requires a minor version update +- [ ] ARIA accessibility (fixes or improves ARIA accessibility) - `fix(...)`, requires a patch or minor version update +- [ ] Documentation update (improves documentation or typo fixes) - `chore(docs)`, requires a patch version update - [ ] Other (please describe) **Does this PR introduce a breaking change?** (check one) - [ ] No -- [ ] Yes (please describe) +- [ ] Yes (please describe since breaking changes require a minor version update) **The PR fulfills these requirements:** - [ ] It's submitted to the `dev` branch, **not** the `master` branch - [ ] When resolving a specific issue, it's referenced in the PR's title (i.e. `[...] (fixes #xxx[,#xxx])`, where "xxx" is the issue number) - [ ] It should address only one issue or feature. If adding multiple features or fixing a bug and adding a new feature, break them into separate PRs if at all possible. -- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc). **This is very important, as the `CHANGELOG` is generated from these messages.** +- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc). **This is very important, as the `CHANGELOG` is generated from these messages, and determines the next version type (patch or minor).** **If new features/enhancement/fixes are added or changed:** -- [ ] Includes documentation updates (including updating the component's `package.json` for slot and event changes) +- [ ] Includes documentation updates +- [ ] Includes component package.json meta section updates (prop, slot and event changes/updates) - [ ] Includes any needed TypeScript declaration file updates -- [ ] New/updated tests are included and passing (if required) +- [ ] New/updated tests are included and passing (required for new features and enhancements) - [ ] Existing test suites are passing -- [ ] CodeCov for patch has met target +- [ ] CodeCov for patch has met target (all changes/updates have been tested) - [ ] The changes have not impacted the functionality of other components or directives - [ ] ARIA Accessibility has been taken into consideration (Does it affect screen reader users or keyboard only users? Clickable items should be in the tab index, etc.) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..ca8e8197411 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,238 @@ +name: Tests + +on: + push: + branches: + - dev + - master + pull_request: + branches: + - dev + - master + +jobs: + setup: + runs-on: ${{ matrix.os }} + if: github.event_name == 'push' || !(github.base_ref == 'master' && github.head_ref == 'dev') + + strategy: + matrix: + os: [ubuntu-latest] + node: [10, 12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache node_modules + uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('yarn.lock') }} + ${{ runner.OS }}-node-v${{ matrix.node }}- + ${{ runner.OS }}- + + - name: Install dependencies + run: yarn install --check-files --frozen-lockfile --non-interactive + + - name: Cache workspace + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + lint: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Lint + run: yarn run test:lint + + audit: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Audit + run: yarn run audit + + test-unit: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [10, 12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Test unit + run: yarn run test:unit --coverage --maxWorkers=2 + + - name: CodeCov + uses: codecov/codecov-action@v1 + if: matrix.node == '10' + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + + build: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Build + run: yarn run build + + - name: Upload build files + uses: actions/upload-artifact@v1 + with: + name: build-files + path: dist + + bundlewatch: + needs: build + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Download build files + uses: actions/download-artifact@v1 + with: + name: build-files + path: dist + + - name: BundleWatch + run: yarn run bundlewatch + env: + BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}" + CI_BRANCH_BASE: "${{ github.base_ref }}" + + docs: + needs: setup + runs-on: ${{ matrix.os }} + if: github.event_name == 'push' && github.ref == 'master' + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Publish docs + run: yarn run docs-publish diff --git a/.gitignore b/.gitignore index 25ce638276c..3910aea3ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -*.iml -*.log -*.swp -.DS_Store .idea/ .nuxt/ .vscode/ @@ -9,7 +5,10 @@ coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ +*.iml +*.log +*.swp +.DS_Store sw.js workbox*.js* diff --git a/.prettierignore b/.prettierignore index 41ded7ff67a..0febdfb7bd5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,8 @@ .nuxt/ +coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ nuxt/plugin.template.js nuxt/plugin.prod.js diff --git a/CHANGELOG-OLD.md b/CHANGELOG-OLD.md index fb4cab34e9c..5c95794070d 100644 --- a/CHANGELOG-OLD.md +++ b/CHANGELOG-OLD.md @@ -2454,8 +2454,7 @@ Notable changes: v1.0.0 introduces a new source code structure. For those users that are importing individual components, the path to the individual components has changed. Please reference the [GitHub repo](https://github.com/bootstrap-vue/bootstrap-vue/) and -[documentation](https://bootstrap-vue.js.org/docs) for the new structure and information on -importing. +[documentation](https://bootstrap-vue.org/docs) for the new structure and information on importing. ### Bug Fixes v1.0.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a38b92d55b..dff6fe666ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,68 @@ > All notable changes to this project will be documented in this file. + + +## [v2.12.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.11.0...v2.12.0) + +Released: 2020-04-20 + +### Features v2.12.0 + +- **b-avatar:** add support for badges on avatars + ([#5124](https://github.com/bootstrap-vue/bootstrap-vue/issues/5124)) + ([a2e465b](https://github.com/bootstrap-vue/bootstrap-vue/commit/a2e465b6457cabb88e42bcefd86a86e36c4602de)) +- **b-avatar:** if `variant` is empty string, then remove spacing around image (closes + [#5154](https://github.com/bootstrap-vue/bootstrap-vue/issues/5154)) + ([#5156](https://github.com/bootstrap-vue/bootstrap-vue/issues/5156)) + ([7ff87fc](https://github.com/bootstrap-vue/bootstrap-vue/commit/7ff87fc560a2ad005bdca394cccf1fafa9d5e696)) +- **b-calendar, b-form-datepicker:** add prop `weekday-header-format` to specify weekday header + length (closes [#5171](https://github.com/bootstrap-vue/bootstrap-vue/issues/5171)) + ([#5175](https://github.com/bootstrap-vue/bootstrap-vue/issues/5175)) + ([8241644](https://github.com/bootstrap-vue/bootstrap-vue/commit/8241644477b174042bb163ba1741c3066165d9f9)) +- **b-calendar, b-form-datepicker:** add scoped slots for date navigation buttons (closes + [#5117](https://github.com/bootstrap-vue/bootstrap-vue/issues/5117)) + ([#5147](https://github.com/bootstrap-vue/bootstrap-vue/issues/5147)) + ([5f69864](https://github.com/bootstrap-vue/bootstrap-vue/commit/5f69864497a13a9b18a96b508af6b9ba89a43add)) +- **b-form-datepicker:** add pass through prop `date-info-fn` (closes + [#4826](https://github.com/bootstrap-vue/bootstrap-vue/issues/4826)) + ([#5150](https://github.com/bootstrap-vue/bootstrap-vue/issues/5150)) + ([bf35f80](https://github.com/bootstrap-vue/bootstrap-vue/commit/bf35f80d1c4619cf4494dc8a6256d093140d4052)) +- **b-form-rating:** new `b-form-rating` custom component + ([#5132](https://github.com/bootstrap-vue/bootstrap-vue/issues/5132)) + ([30ad7fe](https://github.com/bootstrap-vue/bootstrap-vue/commit/30ad7fe746cd6187311c86319abf6e9519b81f15)) +- **b-sidebar:** add optional backdrop support + ([#5182](https://github.com/bootstrap-vue/bootstrap-vue/issues/5182)) + ([c6375e5](https://github.com/bootstrap-vue/bootstrap-vue/commit/c6375e5513cb0ec33a9bc9fc894a123d74cf7768)) +- **custom components:** avoid using padding/margin utility classes where possible (closes + [#5117](https://github.com/bootstrap-vue/bootstrap-vue/issues/5117)) + ([#5121](https://github.com/bootstrap-vue/bootstrap-vue/issues/5121)) + ([8c6cfe0](https://github.com/bootstrap-vue/bootstrap-vue/commit/8c6cfe0af919a4e54667bcb4b29d2ba6b6576b67)) +- **icons:** new `throb` and `fade` animations + ([#5122](https://github.com/bootstrap-vue/bootstrap-vue/issues/5122)) + ([bc0117c](https://github.com/bootstrap-vue/bootstrap-vue/commit/bc0117cc794c948b202daf2e17f22eb4c36235cc)) + +### Bug Fixes v2.12.0 + +- **b-alert:** fix memory leak by using the correct method to clear the countdown timeout + ([#5158](https://github.com/bootstrap-vue/bootstrap-vue/issues/5158)) + ([7a7f33d](https://github.com/bootstrap-vue/bootstrap-vue/commit/7a7f33d74f906e5feecf2bf177636c7f85bc4537)) +- **b-avatar:** fix button type font size inheritance + ([#5177](https://github.com/bootstrap-vue/bootstrap-vue/issues/5177)) + ([441ebdc](https://github.com/bootstrap-vue/bootstrap-vue/commit/441ebdc8a262c6c6ed494ddc6a6c0c06604045ef)) +- **b-calendar:** use `Intl.NumberFormat` for formatting the number in the date buttons (closes + [#5171](https://github.com/bootstrap-vue/bootstrap-vue/issues/5171)) + ([#5179](https://github.com/bootstrap-vue/bootstrap-vue/issues/5179)) + ([cbf2cd0](https://github.com/bootstrap-vue/bootstrap-vue/commit/cbf2cd007cce81a5f664fa649b08af6735fe16e4)) +- **b-form-datepicker:** make datepicker respect `no-highlight-today` prop + ([#5159](https://github.com/bootstrap-vue/bootstrap-vue/issues/5159)) + ([c4ead33](https://github.com/bootstrap-vue/bootstrap-vue/commit/c4ead3302b176e4a90fbfcfe6380de0edc22640f)) + +### Other v2.12.0 + +- documentation updates +- dev dependency updates + ## [v2.11.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.10.1...v2.11.0) @@ -901,8 +963,8 @@ Read the following migration guide for more details. `$bv-popover-color-level` have been removed. Use variables `$b-popover-bg-level`, `$b-popover-border-level`, and `$b-popover-color-level` (respectively) instead. -Please refer to the [documentation](https://bootstrap-vue.js.org/) for the latest usage and -examples, and below for a list of fixes and new features. +Please refer to the [documentation](https://bootstrap-vue.org/) for the latest usage and examples, +and below for a list of fixes and new features. ### Bug Fixes v2.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab7bc6ccc0b..3f2fe93edb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ ## Playground & Issue reports If you want to play with BootstrapVue components without any local setup just head to our -[Online Playground](https://bootstrap-vue.js.org/play) and you can interactively play and test +[Online Playground](https://bootstrap-vue.org/play) and you can interactively play and test components with a fresh Vue instance. If you want to keep your changes or make PRs reporting a component's misbehaviour you can save them to _CodePen_, _CodeSandbox_ or _JSFiddle_ and provide that link in issues. diff --git a/README.md b/README.md index 14f94efb4ab..3912462cebc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-
+
{{ value }}
+ Hosting provided by + + + +
+ +Designed and built with all the love in the world. Maintained by the core team @@ -53,14 +97,24 @@
Currently v{{ version }}. Code licensed MIT. - Docs generated with Nuxt.js - and proudly hosted on Netlify. + Docs generated with + Nuxt.js. + + and proudly hosted on Netlify. + + + and proudly hosted on Zeit. +
Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value10 }}
+ + +Value: {{ value7 }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+Value: {{ value }}
+