Skip to content

Commit

Permalink
Merge pull request #650 from Orange-OpenSource/chore/merge-main@220139a
Browse files Browse the repository at this point in the history
Prepare 5.0.0-beta3 - will fix sample accessibility errors later
  • Loading branch information
Lausselloic committed Apr 29, 2021
2 parents bca3a33 + 0196f1d commit b19e453
Show file tree
Hide file tree
Showing 200 changed files with 12,667 additions and 10,139 deletions.
8 changes: 2 additions & 6 deletions .browserslistrc
Expand Up @@ -5,11 +5,7 @@ last 2 major versions
not dead
Chrome >= 60
Firefox >= 60
# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version
# should be removed in the future when its usage drops or when it's moved to dead browsers
not Edge < 79
Firefox ESR
iOS >= 10
Safari >= 10
Android >= 6
iOS >= 12
Safari >= 12
not Explorer <= 11
4 changes: 2 additions & 2 deletions .bundlewatch.config.json
Expand Up @@ -26,11 +26,11 @@
},
{
"path": "./dist/css/boosted.css",
"maxSize": "26.6 kB"
"maxSize": "26.7 kB"
},
{
"path": "./dist/css/boosted.min.css",
"maxSize": "24.3 kB"
"maxSize": "24.4 kB"
},
{
"path": "./dist/js/boosted.bundle.js",
Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md
@@ -1,3 +1,27 @@
# [5.0.0-beta3](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0-beta2...v5.0.0-beta3) (2021-04-28)


### Bug Fixes

* **accordion:** apply changes requested on MR ([ee89ce2](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/ee89ce2dcc814574680fc559c58277d16e671a39))
* **accordion:** Repare visual regressions ([b547626](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/b54762642cdc4a8a5aca7438906a4b6e6b766e20))
* **build:** delete useless build.sh file ([2d051ba](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/2d051ba453f60de793b11b379ea48d44b54f4f3b))
* **changelog:** correct version numbers following version bump (via npm command) ([698f647](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/698f6478e39ae3397aaf7cce3645167db9830861))
* **config:** correct ruby version ([e64e101](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/e64e101fc2617d9192540697c01796b242779ff4))
* **docs:** Use shield.io badge in the readme ([c34b3d7](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/c34b3d793bf321aea3ee1c2707e7e55914a49a55))
* **examples:** Correct the bootstrap logo into orange logo ([94e27fa](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/94e27faab389fdbd28459cb228e990968b099569))
* **lint:** repare lint execution ([54055d4](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/54055d437bc3230001a5637b08c2674537d95670))
* **list-group:** Hide the link of the doc for the component (for now) ([48ccdff](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/48ccdffa484c31b2b29c51f11a3631dc3001510a))
* **list-group:** revert the link in the menu ([e10518b](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/e10518b1ff7aa8b1cb38070811e34bfc34c3828b))
* **popper:** manually change popper version ([1d87421](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/1d87421b711f4bddbeb5e39aaec5a42b328ca6ad))


### Features

* **stepped process:** add the component from v4 ([2f353e3](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/2f353e3ac9905b9834798062fa20f9a6c273ea44))



<a name="5.0.0-beta2"></a>
# [5.0.0-beta2](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0-beta1...v5.0.0-beta2) (2021-02-12)

Expand Down Expand Up @@ -44,7 +68,7 @@


<a name="5.0.0-beta1"></a>
# [5.0.0-beta1](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0-alpha3...v5.0.0-beta2) (2020-12-10)
# [5.0.0-beta1](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0-alpha3...v5.0.0-beta1) (2020-12-10)

### Features

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -36,19 +36,19 @@

Several quick start options are available:

- [Download the latest release](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.0-beta2.zip)
- [Download the latest release](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.0-beta3.zip)
- Clone the repo: `git clone https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install boosted@next`
- Install with [yarn](https://yarnpkg.com/): `yarn add boosted@next`
- Install with [Composer](https://getcomposer.org/): `composer require Orange-OpenSource/Orange-Boosted-Bootstrap:5.0.0-beta2`
- Install with [Composer](https://getcomposer.org/): `composer require Orange-OpenSource/Orange-Boosted-Bootstrap:5.0.0-beta3`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package boosted` Sass: `Install-Package boosted.sass`

Read the [Getting started page](https://v5-dev--boosted.netlify.app/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.


## Status

[![Build Status](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/workflows/JS%20Tests/badge.svg?branch=v5-dev)](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av5-dev)
[![Build Status](https://img.shields.io/github/workflow/status/Orange-OpenSource/Orange-Boosted-Bootstrap/JS%20Tests/v5-dev?label=JS%20Tests&logo=github)](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av5-dev)
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/Boosted/Boosted)
[![npm version](https://img.shields.io/npm/v/boosted)](https://www.npmjs.com/package/boosted)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/Orange-OpenSource/Orange-Boosted-Bootstrap.svg)](https://packagist.org/packages/Orange-OpenSource/Orange-Boosted-Bootstrap)
Expand Down
4 changes: 2 additions & 2 deletions build/build-plugins.js
Expand Up @@ -35,7 +35,7 @@ const bsPlugins = {
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'),
Modal: path.resolve(__dirname, '../js/src/modal.js'),
OffCanvas: path.resolve(__dirname, '../js/src/offcanvas.js'),
Offcanvas: path.resolve(__dirname, '../js/src/offcanvas.js'),
Popover: path.resolve(__dirname, '../js/src/popover.js'),
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
Tab: path.resolve(__dirname, '../js/src/tab.js'),
Expand Down Expand Up @@ -72,7 +72,7 @@ const getConfigByPluginKey = pluginKey => {
}
}

if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'OffCanvas') {
if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') {
return defaultPluginConfig
}

Expand Down
121 changes: 45 additions & 76 deletions build/change-version.js
Expand Up @@ -9,11 +9,21 @@

'use strict'

const fs = require('fs')
const fs = require('fs').promises
const path = require('path')
const sh = require('shelljs')

sh.config.fatal = true
const globby = require('globby')

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}'
]
const GLOBBY_OPTIONS = {
cwd: path.join(__dirname, '..'),
gitignore: true
}

// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
Expand All @@ -24,89 +34,48 @@ function regExpQuoteReplacement(string) {
return string.replace(/\$/g, '$$')
}

const DRY_RUN = false
async function replaceRecursively(file, oldVersion, newVersion) {
const originalString = await fs.readFile(file, 'utf8')
const newString = originalString.replace(
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
)

function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) {
// No need to move any further if the strings are identical
if (originalString === newString) {
return
}

fs.readdir(directory, (err, names) => {
if (err) {
errback(err)
return
}

names.forEach(name => {
const filepath = path.join(directory, name)
fs.lstat(filepath, (err, stats) => {
if (err) {
process.nextTick(errback, err)
return
}

if (stats.isDirectory()) {
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
} else if (stats.isFile()) {
process.nextTick(fileCallback, filepath)
}
})
})
})
}
if (VERBOSE) {
console.log(`FILE: ${file}`)
}

function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(regExpQuote(original), 'g')
replacement = regExpQuoteReplacement(replacement)
const updateFile = DRY_RUN ?
filepath => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log(`FILE: ${filepath}`)
} else {
console.log(`EXCLUDED:${filepath}`)
}
} :
filepath => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sh.sed('-i', original, replacement, filepath)
}
}

walkAsync(directory, excludedDirectories, updateFile, err => {
console.error('ERROR while traversing directory!:')
console.error(err)
process.exit(1)
})
if (DRY_RUN) {
return
}

await fs.writeFile(file, newString, 'utf8')
}

function main(args) {
if (args.length !== 2) {
console.error('USAGE: change-version old_version new_version')
async function main(args) {
const [oldVersion, newVersion] = args

if (!oldVersion || !newVersion) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
console.error('Got arguments:', args)
process.exit(1)
}

const oldVersion = args[0]
const newVersion = args[1]
const EXCLUDED_DIRS = new Set([
'.git',
'_site',
'node_modules',
'resources'
])
const INCLUDED_EXTENSIONS = new Set([
// This extension allowlist is how we avoid modifying binary files
'',
'.css',
'.html',
'.js',
'.json',
'.md',
'.scss',
'.txt',
'.yml'
])
replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion)
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
[oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)

try {
const files = await globby(GLOB, GLOBBY_OPTIONS)

await Promise.all(files.map(file => replaceRecursively(file, oldVersion, newVersion)))
} catch (error) {
console.error(error)
process.exit(1)
}
}

main(process.argv.slice(2))
8 changes: 7 additions & 1 deletion build/rollup.config.js
Expand Up @@ -28,7 +28,13 @@ if (BUNDLE) {
// Remove last entry in external array to bundle Popper
external.pop()
delete globals['@popperjs/core']
plugins.push(replace({ 'process.env.NODE_ENV': '"production"' }), nodeResolve())
plugins.push(
replace({
'process.env.NODE_ENV': '"production"',
preventAssignment: true
}),
nodeResolve()
)
}

const rollupConfig = {
Expand Down
55 changes: 0 additions & 55 deletions build/ship.sh

This file was deleted.

38 changes: 19 additions & 19 deletions config.yml
Expand Up @@ -53,8 +53,8 @@ params:
social_image_path: /docs/5.0/assets/brand/orange-social.png
social_logo_path: /docs/5.0/assets/brand/orange-social-logo.png

current_version: "5.0.0-beta2"
current_ruby_version: "5.0.0.beta2"
current_version: "5.0.0-beta3"
current_ruby_version: "5.0.0.beta3"
docs_version: "5.0"
rfs_version: "9.0.3"
repo: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap"
Expand All @@ -63,25 +63,25 @@ params:
bootstrap: "https://getbootstrap.com"

download:
source: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.0-beta2.zip"
dist: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/download/v5.0.0-beta2/boosted-5.0.0-beta2-dist.zip"
dist_examples: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/download/v5.0.0-beta2/boosted-5.0.0-beta2-examples.zip"
source: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.0-beta3.zip"
dist: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/download/v5.0.0-beta3/boosted-5.0.0-beta3-dist.zip"
dist_examples: "https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/download/v5.0.0-beta3/boosted-5.0.0-beta3-examples.zip"

cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/css/boosted.min.css"
css_hash: "sha384-W2o49ENLT+DBWaKVqWtw/XBJz9PJBOF02ro9QBp2CGs45l8vRt0mY81zZNjSLxnU"
css_rtl: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/css/boosted.rtl.min.css"
css_rtl_hash: "sha384-hMAI+Pu7i4aPZaAfiGni7UwYKsGytZlffHihgERbYLtSYyjMldGGdEJQatII2Vvk"
helvetica: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/css/orange-helvetica.min.css"
helvetica_hash: "sha384-2W6Ddgejs+ZLUHWL9OWpfdx8K+DR+e1Muc2B220lXZmOgfxlJhYwD4YAC3AY5Kdx"
helvetica_rtl: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/css/orange-helvetica.rtl.min.css"
helvetica_rtl_hash: "sha384-2N+Axfck8AYLrpdsZD0N1m7VB20fwJPh1SzLbOhtlxThb8GEzCaX4uJwMHLxCyxh"
js: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/js/boosted.min.js"
js_hash: "sha384-VzJG8txEnR93rWKSsWA5q4qsd8HzVgTF9D8j96AfQRwWr9a5M6IFgeJnd4Sbpg4P"
js_bundle: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta2/dist/js/boosted.bundle.min.js"
js_bundle_hash: "sha384-Vc9TemN3pAGe1Yu1xsF6n3b8t65sxppt3SP/znqPkSmcNdTD9kKa3XqdlegP0jqP"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.8.2/dist/umd/popper.min.js"
popper_hash: "sha384-5NBtAFTWLj8v+rxAqtn79BzIUkVXZ5OqJSbJkm3Ecsz50gRFn/TIftqXqzOufNcO"
css: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/css/boosted.min.css"
css_hash: "sha384-PQtS7LAzfkcCBB3K/7miQfefwt7lWGIbMeL/LOzVW6sxQ/B1PrMGFgxI/HwUHJ1G"
css_rtl: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/css/boosted.rtl.min.css"
css_rtl_hash: "sha384-e9/oI7Bprgh/XctVvsXWplX4L/MI6ePmdbJ/TK9a9SBNB76J5FuarTxjhnuN0H3Y"
helvetica: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/css/orange-helvetica.min.css"
helvetica_hash: "sha384-tSxM4wLu3j8sRc/UX0jo54uHzJ0J5bceaL/CwiWufYMj25GlX7VxwGD9HdwpLfGw"
helvetica_rtl: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/css/orange-helvetica.rtl.min.css"
helvetica_rtl_hash: "sha384-uhGgAReLIrTu2fwUCxCv2rf9/lfYM7ohT2QoVCbv3jd685mZkxEgHq/mBn8pdpzf"
js: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/js/boosted.min.js"
js_hash: "sha384-7PWTYtCU2BZMMDnCZ+2VMrMtjK99BKOv1UfeOG4mgZNMC9cgGxwzccqFofYzHjT0"
js_bundle: "https://cdn.jsdelivr.net/npm/boosted@5.0.0-beta3/dist/js/boosted.bundle.min.js"
js_bundle_hash: "sha384-3pZoGeuGuppkOcTDkPFSq3eCeByOZjj3CQ2PRI7hTL8gCUSPno1ZKZo2yeta2U1D"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js"
popper_hash: "sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG"
focus_visible: "https://cdn.jsdelivr.net/npm/focus-visible@5.1.0/dist/focus-visible.min.js"
focus_visible_hash: "sha384-xRa5B8rCDfdg0npZcxAh+RXswrbFk3g6dlHVeABeluN8EIwdyljz/LqJgc2R3KNA"
4 changes: 2 additions & 2 deletions dist/css/boosted-grid.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/boosted-grid.css.map

Large diffs are not rendered by default.

0 comments on commit b19e453

Please sign in to comment.