From ba449604ce324211eec18525f3d16a653fd20b5b Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 21 Aug 2023 09:03:09 +0300 Subject: [PATCH 001/296] Improve change-version script (#38983) Only replace the version in specific files instead of blindly all repo files --- build/change-version.mjs | 43 +++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/build/change-version.mjs b/build/change-version.mjs index 2a16f2f210..3c1e706689 100644 --- a/build/change-version.mjs +++ b/build/change-version.mjs @@ -6,24 +6,22 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ +import { execFile } from 'node:child_process' import fs from 'node:fs/promises' -import path from 'node:path' -import { fileURLToPath } from 'node:url' -import globby from 'globby' - -const __dirname = path.dirname(fileURLToPath(import.meta.url)) +import process from 'node:process' const VERBOSE = process.argv.includes('--verbose') const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-run') -// These are the filetypes we only care about replacing the version -const GLOB = [ - '**/*.{css,html,js,json,md,scss,txt,yml}' +// These are the files we only care about replacing the version +const FILES = [ + 'README.md', + 'hugo.yml', + 'js/src/base-component.js', + 'package.js', + 'scss/mixins/_banner.scss', + 'site/data/docs-versions.yml' ] -const GLOBBY_OPTIONS = { - cwd: path.join(__dirname, '..'), - gitignore: true -} // Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 function regExpQuote(string) { @@ -54,7 +52,7 @@ async function replaceRecursively(file, oldVersion, newVersion) { } if (VERBOSE) { - console.log(`FILE: ${file}`) + console.log(`Found ${oldVersion} in ${file}`) } if (DRY_RUN) { @@ -64,6 +62,19 @@ async function replaceRecursively(file, oldVersion, newVersion) { await fs.writeFile(file, newString, 'utf8') } +function bumpNpmVersion(newVersion) { + if (DRY_RUN) { + return + } + + execFile('npm', ['version', newVersion, '--no-git-tag'], { shell: true }, error => { + if (error) { + console.error(error) + process.exit(1) + } + }) +} + function showUsage(args) { console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]') console.error('Got arguments:', args) @@ -87,11 +98,11 @@ async function main(args) { showUsage(args) } - try { - const files = await globby(GLOB, GLOBBY_OPTIONS) + bumpNpmVersion(newVersion) + try { await Promise.all( - files.map(file => replaceRecursively(file, oldVersion, newVersion)) + FILES.map(file => replaceRecursively(file, oldVersion, newVersion)) ) } catch (error) { console.error(error) From 1be3057230831b60f25044583a05b6682baead79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ate=C5=9F=20Uzun?= Date: Mon, 21 Aug 2023 09:06:39 +0300 Subject: [PATCH 002/296] Dropdown: reuse variable (#39046) Co-authored-by: XhmikosR --- js/src/tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/tab.js b/js/src/tab.js index 5598e15c02..dfaef0ffa2 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -40,7 +40,7 @@ const CLASS_DROPDOWN = 'dropdown' const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle' const SELECTOR_DROPDOWN_MENU = '.dropdown-menu' -const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)' +const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})` const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]' const SELECTOR_OUTER = '.nav-item, .list-group-item' From 47da803f0845aa0d0f41d1e1a0092319794ec90b Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 21 Aug 2023 10:49:52 +0300 Subject: [PATCH 003/296] Migration: add back v5.0.0 heading (#39060) * Migrations: add back v5.0.0 heading * Update migration.md * Update migration.md --- site/content/docs/5.3/migration.md | 70 +++++++++++++++--------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/site/content/docs/5.3/migration.md b/site/content/docs/5.3/migration.md index ab486c6a5a..aab038fd2b 100644 --- a/site/content/docs/5.3/migration.md +++ b/site/content/docs/5.3/migration.md @@ -349,20 +349,22 @@ For a complete list of changes, [see the v5.2.0 project on GitHub](https://githu Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.com/2021/08/04/bootstrap-5-1-0/) -
+## v5.0.0 + +
{{< callout info >}} **Hey there!** Changes to our first major release of Bootstrap 5, v5.0.0, are documented below. They don't reflect the additional changes shown above. {{< /callout >}} -## Dependencies +### Dependencies - Dropped jQuery. - Upgraded from Popper v1.x to Popper v2.x. - Replaced Libsass with Dart Sass as our Sass compiler given Libsass was deprecated. - Migrated from Jekyll to Hugo for building our documentation -## Browser support +### Browser support - Dropped Internet Explorer 10 and 11 - Dropped Microsoft Edge < 16 (Legacy Edge) @@ -373,7 +375,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co
-## Documentation changes +### Documentation changes - Redesigned homepage, docs layout, and footer. - Added [new Parcel guide]({{< docsref "/getting-started/parcel" >}}). @@ -385,7 +387,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - Redesigned the navbar and added a new subnav to make it easier to get around our sites and docs versions. - Added new keyboard shortcut for the search field: Ctrl + /. -## Sass +### Sass - We've ditched the default Sass map merges to make it easier to remove redundant values. Keep in mind you now have to define all values in the Sass maps like `$theme-colors`. Check out how to deal with [Sass maps]({{< docsref "/customize/sass#maps-and-loops" >}}). @@ -423,7 +425,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - The `border-radius()` mixin now has a default value. -## Color system +### Color system - The color system which worked with `color-level()` and `$theme-color-interval` was removed in favor of a new color system. All `lighten()` and `darken()` functions in our codebase are replaced by `tint-color()` and `shade-color()`. These functions will mix the color with either white or black instead of changing its lightness by a fixed amount. The `shift-color()` will either tint or shade a color depending on whether its weight parameter is positive or negative. [See #30622](https://github.com/twbs/bootstrap/pull/30622) for more details. @@ -433,7 +435,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - To support our color system, we've added new custom `tint-color()` and `shade-color()` functions to mix our colors appropriately. -## Grid updates +### Grid updates - **New breakpoint!** Added new `xxl` breakpoint for `1400px` and up. No changes to all other breakpoints. @@ -453,7 +455,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - Updated the `make-col` mixin to default to equal columns without a specified size. -## Content, Reboot, etc +### Content, Reboot, etc - **[RFS]({{< docsref "/getting-started/rfs" >}}) is now enabled by default.** Headings using the `font-size()` mixin will automatically adjust their `font-size` to scale with the viewport. _This feature was previously opt-in with v4._ @@ -485,11 +487,11 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - Added `$enable-smooth-scroll`, which applies `scroll-behavior: smooth` globally—except for users asking for reduced motion through `prefers-reduced-motion` media query. [See #31877](https://github.com/twbs/bootstrap/pull/31877) -## RTL +### RTL - Horizontal direction specific variables, utilities, and mixins have all been renamed to use logical properties like those found in flexbox layouts—e.g., `start` and `end` in lieu of `left` and `right`. -## Forms +### Forms - **Added new floating forms!** We've promoted the Floating labels example to fully supported form components. [See the new Floating labels page.]({{< docsref "/forms/floating-labels" >}}) @@ -520,21 +522,21 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co
-## Components +### Components - Unified `padding` values for alerts, breadcrumbs, cards, dropdowns, list groups, modals, popovers, and tooltips to be based on our `$spacer` variable. [See #30564](https://github.com/twbs/bootstrap/pull/30564). -### Accordion +#### Accordion - Added [new accordion component]({{< docsref "/components/accordion" >}}). -### Alerts +#### Alerts - Alerts now have [examples with icons]({{< docsref "/components/alerts#icons" >}}). - Removed custom styles for `
`s in each alert since they already use `currentColor`. -### Badges +#### Badges - Breaking Dropped all `.badge-*` color classes for background utilities (e.g., use `.bg-primary` instead of `.badge-primary`). @@ -544,13 +546,13 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co - Increased default padding for badges from `.25em`/`.5em` to `.35em`/`.65em`. -### Breadcrumbs +#### Breadcrumbs - Simplified the default appearance of breadcrumbs by removing `padding`, `background-color`, and `border-radius`. - Added new CSS custom property `--bs-breadcrumb-divider` for easy customization without needing to recompile CSS. -### Buttons +#### Buttons - Breaking **[Toggle buttons]({{< docsref "/forms/checks-radios#toggle-buttons" >}}), with checkboxes or radios, no longer require JavaScript and have new markup.** We no longer require a wrapping element, add `.btn-check` to the ``, and pair it with any `.btn` classes on the `