diff --git a/.eslintrc.json b/.eslintrc.json
index d5a54d46b..680642ac6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -43,6 +43,7 @@
],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
+ "unicorn/import-index": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml
index a12bffcf7..f9b25a231 100644
--- a/.github/workflows/browserstack.yml
+++ b/.github/workflows/browserstack.yml
@@ -5,7 +5,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
browserstack:
diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml
index b2bd5eed5..d43876799 100644
--- a/.github/workflows/bundlewatch.yml
+++ b/.github/workflows/bundlewatch.yml
@@ -8,7 +8,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
bundlewatch:
diff --git a/.github/workflows/css.yml b/.github/workflows/css.yml
index a28059d79..5dfb1f865 100644
--- a/.github/workflows/css.yml
+++ b/.github/workflows/css.yml
@@ -8,7 +8,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
css:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 150e4d16c..126f62e70 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -8,7 +8,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
docs:
diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml
index c56a2dfdd..75fe9c82b 100644
--- a/.github/workflows/js.yml
+++ b/.github/workflows/js.yml
@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- node: [10, 12, 14]
+ node: [10, 12, 14, 15]
steps:
- name: Clone repository
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 369aaced3..495e1ba40 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -8,7 +8,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
lint:
diff --git a/.github/workflows/node-sass.yml b/.github/workflows/node-sass.yml
index ee64b2152..d48bffa43 100644
--- a/.github/workflows/node-sass.yml
+++ b/.github/workflows/node-sass.yml
@@ -8,7 +8,7 @@ on:
env:
FORCE_COLOR: 2
- NODE: 14
+ NODE: 15.x
jobs:
css:
diff --git a/.gitignore b/.gitignore
index 0a0f88d15..6208c57d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,19 @@
# Ignore docs files
/_gh_pages/
+# This is the old Jekyll docs dist folder;
+# keeping it here so that when we switch branches it doesn't show up
+/site/docs/**/dist/
+# Jekyll's cache folder; keeping it for the same reason as above
+/site/.jekyll-cache/
# Hugo resources folder
/resources/
+# Ignore ruby/bundler files;
+# keeping them here so that when we switch branches they don't show up
+/.bundle/
+/vendor/
+/.ruby-version
+
# Numerous always-ignore extensions
*.diff
*.err
diff --git a/.stylelintrc b/.stylelintrc
index c068d30b5..1c9ee1811 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -3,10 +3,6 @@
"stylelint-config-twbs-bootstrap/scss"
],
"rules": {
- "declaration-property-value-disallowed-list": {
- "border": "none",
- "outline": "none"
- },
"function-disallowed-list": [
"calc",
"lighten",
diff --git a/build/build-plugins.js b/build/build-plugins.js
index d1930b855..80a010a7f 100644
--- a/build/build-plugins.js
+++ b/build/build-plugins.js
@@ -29,7 +29,6 @@ const bsPlugins = {
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
Alert: path.resolve(__dirname, '../js/src/alert.js'),
- Base: path.resolve(__dirname, '../js/src/base-component.js'),
Button: path.resolve(__dirname, '../js/src/button.js'),
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
@@ -45,13 +44,11 @@ const bsPlugins = {
const defaultPluginConfig = {
external: [
bsPlugins.Data,
- bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.SelectorEngine
],
globals: {
[bsPlugins.Data]: 'Data',
- [bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.SelectorEngine]: 'SelectorEngine'
}
@@ -76,7 +73,6 @@ const getConfigByPluginKey = pluginKey => {
}
if (
- pluginKey === 'Base' ||
pluginKey === 'Button' ||
pluginKey === 'Carousel' ||
pluginKey === 'Collapse' ||
@@ -116,13 +112,11 @@ const getConfigByPluginKey = pluginKey => {
return {
external: [
bsPlugins.Data,
- bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.Manipulator
],
globals: {
[bsPlugins.Data]: 'Data',
- [bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.Manipulator]: 'Manipulator'
}
diff --git a/build/zip-examples.js b/build/zip-examples.js
index b2f156502..898e5860f 100644
--- a/build/zip-examples.js
+++ b/build/zip-examples.js
@@ -15,64 +15,34 @@ const sh = require('shelljs')
const pkg = require('../package.json')
const versionShort = pkg.config.version_short
-const distFolder = `bootstrap-${pkg.version}-examples`
-const rootDocsDir = '_gh_pages'
-const docsDir = `${rootDocsDir}/docs/${versionShort}/`
-
-// these are the files we need in the examples
-const cssFiles = [
- 'bootstrap.min.css',
- 'bootstrap.min.css.map',
- 'bootstrap.rtl.min.css',
- 'bootstrap.rtl.min.css.map'
-]
-const jsFiles = [
- 'bootstrap.bundle.min.js',
- 'bootstrap.bundle.min.js.map'
-]
-const imgFiles = [
- 'bootstrap-logo.svg',
- 'bootstrap-logo-white.svg'
-]
+const folderName = `bootstrap-${pkg.version}-examples`
sh.config.fatal = true
-if (!sh.test('-d', rootDocsDir)) {
- throw new Error(`The "${rootDocsDir}" folder does not exist, did you forget building the docs?`)
+if (!sh.test('-d', '_gh_pages')) {
+ throw new Error('The "_gh_pages" folder does not exist, did you forget building the docs?')
}
// switch to the root dir
sh.cd(path.join(__dirname, '..'))
-// remove any previously created folder/zip with the same name
-sh.rm('-rf', [distFolder, `${distFolder}.zip`])
-
+// remove any previously created folder with the same name
+sh.rm('-rf', folderName)
// create any folders so that `cp` works
-sh.mkdir('-p', [
- distFolder,
- `${distFolder}/assets/brand/`,
- `${distFolder}/assets/dist/css/`,
- `${distFolder}/assets/dist/js/`
-])
+sh.mkdir('-p', folderName)
+sh.mkdir('-p', `${folderName}/assets/brand/`)
-sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
-
-cssFiles.forEach(file => {
- sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
-})
-
-jsFiles.forEach(file => {
- sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
-})
-
-imgFiles.forEach(file => {
- sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
-})
-
-sh.rm(`${distFolder}/index.html`)
+sh.cp('-Rf', `_gh_pages/docs/${versionShort}/examples/*`, folderName)
+sh.cp('-Rf', `_gh_pages/docs/${versionShort}/dist/`, `${folderName}/assets/`)
+// also copy the two brand images we use in the examples
+sh.cp('-f', [
+ `_gh_pages/docs/${versionShort}/assets/brand/bootstrap-logo.svg`,
+ `_gh_pages/docs/${versionShort}/assets/brand/bootstrap-logo-white.svg`
+], `${folderName}/assets/brand/`)
+sh.rm(`${folderName}/index.html`)
// get all examples' HTML files
-sh.find(`${distFolder}/**/*.html`).forEach(file => {
+sh.find(`${folderName}/**/*.html`).forEach(file => {
const fileContents = sh.cat(file)
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -84,7 +54,7 @@ sh.find(`${distFolder}/**/*.html`).forEach(file => {
})
// create the zip file
-sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
+sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, { fatal: true })
// remove the folder we created
-sh.rm('-rf', distFolder)
+sh.rm('-rf', folderName)
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js
index e3c685530..2ee13bafc 100644
--- a/js/src/dom/event-handler.js
+++ b/js/src/dom/event-handler.js
@@ -112,7 +112,6 @@ function bootstrapDelegationHandler(element, selector, fn) {
event.delegateTarget = target
if (handler.oneOff) {
- // eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, fn)
}
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index bada537c9..008294e9b 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -263,7 +263,7 @@ class Dropdown extends BaseComponent {
typeof config.reference.getBoundingClientRect !== 'function'
) {
// Popper virtual elements require a getBoundingClientRect method
- throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`)
+ throw new Error(`${NAME}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`)
}
return config
diff --git a/js/src/modal.js b/js/src/modal.js
index fe1b5a4c6..87c22943a 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -590,7 +590,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (
data = new Modal(target, config)
}
- data.toggle(this)
+ data.show(this)
})
/**
diff --git a/js/src/util/index.js b/js/src/util/index.js
index 22d0a578b..9ccad1cbb 100644
--- a/js/src/util/index.js
+++ b/js/src/util/index.js
@@ -111,14 +111,15 @@ const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => {
const expectedTypes = configTypes[property]
const value = config[property]
- const valueType = value && isElement(value) ? 'element' : toType(value)
+ const valueType = value && isElement(value) ?
+ 'element' :
+ toType(value)
if (!new RegExp(expectedTypes).test(valueType)) {
- throw new TypeError(
+ throw new Error(
`${componentName.toUpperCase()}: ` +
`Option "${property}" provided type "${valueType}" ` +
- `but expected type "${expectedTypes}".`
- )
+ `but expected type "${expectedTypes}".`)
}
})
}
diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js
index ce3d455a6..d908dd661 100644
--- a/js/src/util/sanitizer.js
+++ b/js/src/util/sanitizer.js
@@ -37,7 +37,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
if (allowedAttributeList.includes(attrName)) {
if (uriAttrs.has(attrName)) {
- return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
}
return true
@@ -47,7 +47,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
// Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
- if (regExp[i].test(attrName)) {
+ if (attrName.match(regExp[i])) {
return true
}
}
diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js
index cd4946525..38c7003bb 100644
--- a/js/tests/karma.conf.js
+++ b/js/tests/karma.conf.js
@@ -1,7 +1,5 @@
/* eslint-env node */
-'use strict'
-
const path = require('path')
const ip = require('ip')
const { babel } = require('@rollup/plugin-babel')
@@ -14,11 +12,10 @@ const {
browsersKeys
} = require('./browsers')
-const ENV = process.env
-const BROWSERSTACK = Boolean(ENV.BROWSERSTACK)
-const DEBUG = Boolean(ENV.DEBUG)
-const JQUERY_TEST = Boolean(ENV.JQUERY)
-
+const { env } = process
+const browserStack = env.BROWSER === 'true'
+const debug = env.DEBUG === 'true'
+const jQueryTest = env.JQUERY === 'true'
const frameworks = [
'jasmine'
]
@@ -33,16 +30,16 @@ const reporters = ['dots']
const detectBrowsers = {
usePhantomJS: false,
postDetection(availableBrowser) {
- if (ENV.CI === true || availableBrowser.includes('Chrome')) {
- return DEBUG ? ['Chrome'] : ['ChromeHeadless']
+ if (env.CI === true || availableBrowser.includes('Chrome')) {
+ return debug ? ['Chrome'] : ['ChromeHeadless']
}
if (availableBrowser.includes('Chromium')) {
- return DEBUG ? ['Chromium'] : ['ChromiumHeadless']
+ return debug ? ['Chromium'] : ['ChromiumHeadless']
}
if (availableBrowser.includes('Firefox')) {
- return DEBUG ? ['Firefox'] : ['FirefoxHeadless']
+ return debug ? ['Firefox'] : ['FirefoxHeadless']
}
throw new Error('Please install Chrome, Chromium or Firefox')
@@ -70,7 +67,7 @@ const conf = {
'node_modules/hammer-simulator/index.js',
{
pattern: 'js/tests/unit/**/!(jquery).spec.js',
- watched: !BROWSERSTACK
+ watched: !browserStack
}
],
preprocessors: {
@@ -104,11 +101,11 @@ const conf = {
}
}
-if (BROWSERSTACK) {
+if (browserStack) {
conf.hostname = ip.address()
conf.browserStack = {
- username: ENV.BROWSER_STACK_USERNAME,
- accessKey: ENV.BROWSER_STACK_ACCESS_KEY,
+ username: env.BROWSER_STACK_USERNAME,
+ accessKey: env.BROWSER_STACK_ACCESS_KEY,
build: `bootstrap-${new Date().toISOString()}`,
project: 'Bootstrap',
retryLimit: 2
@@ -117,7 +114,7 @@ if (BROWSERSTACK) {
conf.customLaunchers = browsers
conf.browsers = browsersKeys
reporters.push('BrowserStack', 'kjhtml')
-} else if (JQUERY_TEST) {
+} else if (jQueryTest) {
frameworks.push('detectBrowsers')
plugins.push(
'karma-chrome-launcher',
@@ -158,7 +155,7 @@ if (BROWSERSTACK) {
}
}
- if (DEBUG) {
+ if (debug) {
conf.hostname = ip.address()
plugins.push('karma-jasmine-html-reporter')
reporters.push('kjhtml')
@@ -172,6 +169,7 @@ conf.plugins = plugins
conf.reporters = reporters
module.exports = karmaConfig => {
- conf.logLevel = karmaConfig.LOG_ERROR
+ // possible values: karmaConfig.LOG_DISABLE || karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN || karmaConfig.LOG_INFO || karmaConfig.LOG_DEBUG
+ conf.logLevel = karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN
karmaConfig.set(conf)
}
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js
index 787a276de..0286762fa 100644
--- a/js/tests/unit/carousel.spec.js
+++ b/js/tests/unit/carousel.spec.js
@@ -1136,9 +1136,11 @@ describe('Carousel', () => {
jQueryMock.fn.carousel = Carousel.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.carousel.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/collapse.spec.js b/js/tests/unit/collapse.spec.js
index ff493cf51..4af21e13f 100644
--- a/js/tests/unit/collapse.spec.js
+++ b/js/tests/unit/collapse.spec.js
@@ -819,9 +819,11 @@ describe('Collapse', () => {
jQueryMock.fn.collapse = Collapse.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.collapse.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/dropdown.spec.js b/js/tests/unit/dropdown.spec.js
index cc4139603..ba1d0f443 100644
--- a/js/tests/unit/dropdown.spec.js
+++ b/js/tests/unit/dropdown.spec.js
@@ -393,13 +393,13 @@ describe('Dropdown', () => {
expect(() => new Dropdown(btnDropdown, {
reference: {}
- })).toThrowError(TypeError, 'DROPDOWN: Option "reference" provided type "object" without a required "getBoundingClientRect" method.')
+ })).toThrow()
expect(() => new Dropdown(btnDropdown, {
reference: {
getBoundingClientRect: 'not-a-function'
}
- })).toThrowError(TypeError, 'DROPDOWN: Option "reference" provided type "object" without a required "getBoundingClientRect" method.')
+ })).toThrow()
// use onFirstUpdate as Poppers internal update is executed async
const dropdown = new Dropdown(btnDropdown, {
@@ -1557,9 +1557,11 @@ describe('Dropdown', () => {
jQueryMock.fn.dropdown = Dropdown.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.dropdown.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js
index 29c90bbf1..f645e9892 100644
--- a/js/tests/unit/modal.spec.js
+++ b/js/tests/unit/modal.spec.js
@@ -870,7 +870,7 @@ describe('Modal', () => {
})
describe('data-api', () => {
- it('should toggle modal', done => {
+ it('should open modal', done => {
fixtureEl.innerHTML = [
' ',
'
'
@@ -885,15 +885,6 @@ describe('Modal', () => {
expect(modalEl.getAttribute('aria-hidden')).toEqual(null)
expect(modalEl.style.display).toEqual('block')
expect(document.querySelector('.modal-backdrop')).toBeDefined()
- setTimeout(() => trigger.click(), 10)
- })
-
- modalEl.addEventListener('hidden.bs.modal', () => {
- expect(modalEl.getAttribute('aria-modal')).toEqual(null)
- expect(modalEl.getAttribute('role')).toEqual(null)
- expect(modalEl.getAttribute('aria-hidden')).toEqual('true')
- expect(modalEl.style.display).toEqual('none')
- expect(document.querySelector('.modal-backdrop')).toEqual(null)
done()
})
@@ -1070,9 +1061,11 @@ describe('Modal', () => {
jQueryMock.fn.modal = Modal.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.modal.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
it('should call show method', () => {
diff --git a/js/tests/unit/popover.spec.js b/js/tests/unit/popover.spec.js
index e5c235e2a..3c04e7ac1 100644
--- a/js/tests/unit/popover.spec.js
+++ b/js/tests/unit/popover.spec.js
@@ -206,9 +206,11 @@ describe('Popover', () => {
jQueryMock.fn.popover = Popover.jQueryInterface
jQueryMock.elements = [popoverEl]
- expect(() => {
+ try {
jQueryMock.fn.popover.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
it('should should call show method', () => {
diff --git a/js/tests/unit/scrollspy.spec.js b/js/tests/unit/scrollspy.spec.js
index 0d175aafa..eab9183aa 100644
--- a/js/tests/unit/scrollspy.spec.js
+++ b/js/tests/unit/scrollspy.spec.js
@@ -625,9 +625,11 @@ describe('ScrollSpy', () => {
jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.scrollspy.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/tab.spec.js b/js/tests/unit/tab.spec.js
index d098ab027..67a85b2e4 100644
--- a/js/tests/unit/tab.spec.js
+++ b/js/tests/unit/tab.spec.js
@@ -397,9 +397,11 @@ describe('Tab', () => {
jQueryMock.fn.tab = Tab.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.tab.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/toast.spec.js b/js/tests/unit/toast.spec.js
index 2920eb2ef..cc873d1fe 100644
--- a/js/tests/unit/toast.spec.js
+++ b/js/tests/unit/toast.spec.js
@@ -368,9 +368,11 @@ describe('Toast', () => {
jQueryMock.fn.toast = Toast.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.toast.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js
index 213dcc91f..8224c3437 100644
--- a/js/tests/unit/tooltip.spec.js
+++ b/js/tests/unit/tooltip.spec.js
@@ -1207,9 +1207,11 @@ describe('Tooltip', () => {
jQueryMock.fn.tooltip = Tooltip.jQueryInterface
jQueryMock.elements = [div]
- expect(() => {
+ try {
jQueryMock.fn.tooltip.call(jQueryMock, action)
- }).toThrowError(TypeError, `No method named "${action}"`)
+ } catch (error) {
+ expect(error.message).toEqual(`No method named "${action}"`)
+ }
})
})
})
diff --git a/js/tests/unit/util/index.spec.js b/js/tests/unit/util/index.spec.js
index 00ab44f1e..d4b09bf77 100644
--- a/js/tests/unit/util/index.spec.js
+++ b/js/tests/unit/util/index.spec.js
@@ -212,7 +212,7 @@ describe('Util', () => {
expect(() => {
Util.typeCheckConfig(namePlugin, config, defaultType)
- }).toThrowError(TypeError, 'COLLAPSE: Option "parent" provided type "number" but expected type "(string|element)".')
+ }).toThrow(new Error('COLLAPSE: Option "parent" provided type "number" but expected type "(string|element)".'))
})
it('should return null stringified when null is passed', () => {
diff --git a/package-lock.json b/package-lock.json
index ca8de9e55..a8d8dd4a9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1253,24 +1253,6 @@
"defer-to-connect": "^1.0.1"
}
},
- "@types/component-emitter": {
- "version": "1.2.10",
- "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz",
- "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==",
- "dev": true
- },
- "@types/cookie": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.0.tgz",
- "integrity": "sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg==",
- "dev": true
- },
- "@types/cors": {
- "version": "2.8.9",
- "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.9.tgz",
- "integrity": "sha512-zurD1ibz21BRlAOIKP8yhrxlqKx6L9VCwkB5kMiP6nZAhoF5MvC7qS1qPA7nRcr1GJolfkQC7/EAL4hdYejLtg==",
- "dev": true
- },
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@@ -1374,6 +1356,12 @@
"integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
"dev": true
},
+ "after": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
+ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
+ "dev": true
+ },
"agent-base": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
@@ -1578,6 +1566,12 @@
"es-abstract": "^1.18.0-next.1"
}
},
+ "arraybuffer.slice": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",
+ "dev": true
+ },
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
@@ -1671,6 +1665,12 @@
"object.assign": "^4.1.0"
}
},
+ "backo2": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
+ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
+ "dev": true
+ },
"bail": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
@@ -1908,6 +1908,12 @@
"safe-buffer": "^5.1.1"
}
},
+ "blob": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
+ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==",
+ "dev": true
+ },
"bluebird": {
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
@@ -2640,12 +2646,24 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
"dev": true
},
+ "component-bind": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
+ "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
+ "dev": true
+ },
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
"dev": true
},
+ "component-inherit": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
+ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
+ "dev": true
+ },
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -2778,16 +2796,6 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
- "cors": {
- "version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
- "dev": true,
- "requires": {
- "object-assign": "^4",
- "vary": "^1"
- }
- },
"cosmiconfig": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
@@ -3340,44 +3348,77 @@
}
},
"engine.io": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.0.6.tgz",
- "integrity": "sha512-rf7HAVZpcRrcKEKddgIzYUnwg0g5HE1RvJaTLwkcfJmce4g+po8aMuE6vxzp6JwlK8FEq/vi0KWN6tA585DjaA==",
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz",
+ "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==",
"dev": true,
"requires": {
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "~0.4.1",
- "cors": "~2.8.5",
- "debug": "~4.3.1",
- "engine.io-parser": "~4.0.0",
+ "debug": "~4.1.0",
+ "engine.io-parser": "~2.2.0",
"ws": "~7.4.2"
},
"dependencies": {
"debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true,
"requires": {
- "ms": "2.1.2"
+ "ms": "^2.1.1"
}
},
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
}
}
},
- "engine.io-parser": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz",
- "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==",
+ "engine.io-client": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.0.tgz",
+ "integrity": "sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA==",
"dev": true,
"requires": {
- "base64-arraybuffer": "0.1.4"
+ "component-emitter": "~1.3.0",
+ "component-inherit": "0.0.3",
+ "debug": "~3.1.0",
+ "engine.io-parser": "~2.2.0",
+ "has-cors": "1.1.0",
+ "indexof": "0.0.1",
+ "parseqs": "0.0.6",
+ "parseuri": "0.0.6",
+ "ws": "~7.4.2",
+ "xmlhttprequest-ssl": "~1.5.4",
+ "yeast": "0.1.2"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ }
+ }
+ },
+ "engine.io-parser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz",
+ "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==",
+ "dev": true,
+ "requires": {
+ "after": "0.8.2",
+ "arraybuffer.slice": "~0.0.7",
+ "base64-arraybuffer": "0.1.4",
+ "blob": "0.0.5",
+ "has-binary2": "~1.0.2"
}
},
"enquirer": {
@@ -3761,17 +3802,17 @@
}
},
"eslint-plugin-unicorn": {
- "version": "26.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-26.0.1.tgz",
- "integrity": "sha512-SWgF9sIVY74zqkkSN2dclSCqRfocWSUGD0haC0NX2oRfmdp9p8dQvJYkYSQePaCyssPUE/pqpsIEEZNTh8crUA==",
+ "version": "25.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.1.tgz",
+ "integrity": "sha512-MEyEWoyou/qhJH6rEER9YHACtCsQT+eewc6Fdxbi2eiTvsGrBR8JZMA6qaeof3oMQeRxOpaERoBKzU7R5c4A/w==",
"dev": true,
"requires": {
"ci-info": "^2.0.0",
"clean-regexp": "^1.0.0",
"eslint-ast-utils": "^1.1.0",
- "eslint-template-visitor": "^2.2.2",
+ "eslint-template-visitor": "^2.2.1",
"eslint-utils": "^2.1.0",
- "import-modules": "^2.1.0",
+ "import-modules": "^2.0.0",
"lodash": "^4.17.20",
"pluralize": "^8.0.0",
"read-pkg-up": "^7.0.1",
@@ -4935,6 +4976,29 @@
"function-bind": "^1.1.1"
}
},
+ "has-binary2": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
+ "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
+ "dev": true,
+ "requires": {
+ "isarray": "2.0.1"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
+ "dev": true
+ }
+ }
+ },
+ "has-cors": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
+ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
+ "dev": true
+ },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@@ -5203,6 +5267,12 @@
"integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
"dev": true
},
+ "indexof": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
+ "dev": true
+ },
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -5856,9 +5926,9 @@
"dev": true
},
"karma": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/karma/-/karma-6.0.0.tgz",
- "integrity": "sha512-Tc9VlrmAlOUjsi+5tyNlo18TWiOps3wo4HJYqfZImyTrek2gUASmW6q+bEIE1U5w9f+sQ97P5PbbUCp3uVNqrQ==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/karma/-/karma-5.2.3.tgz",
+ "integrity": "sha512-tHdyFADhVVPBorIKCX8A37iLHxc6RBRphkSoQ+MLKdAtFn1k97tD8WUGi1KlEtDZKL3hui0qhsY9HXUfSNDYPQ==",
"dev": true,
"requires": {
"body-parser": "^1.19.0",
@@ -5879,22 +5949,13 @@
"qjobs": "^1.2.0",
"range-parser": "^1.2.1",
"rimraf": "^3.0.2",
- "socket.io": "^3.0.4",
+ "socket.io": "^2.3.0",
"source-map": "^0.6.1",
"tmp": "0.2.1",
- "ua-parser-js": "^0.7.23",
- "yargs": "^16.1.1"
+ "ua-parser-js": "0.7.22",
+ "yargs": "^15.3.1"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -5904,32 +5965,6 @@
"fill-range": "^7.0.1"
}
},
- "cliui": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
- "dev": true,
- "requires": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^7.0.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -5959,44 +5994,6 @@
"requires": {
"is-number": "^7.0.0"
}
- },
- "wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "y18n": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz",
- "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==",
- "dev": true
- },
- "yargs": {
- "version": "16.2.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
- "dev": true,
- "requires": {
- "cliui": "^7.0.2",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.0",
- "y18n": "^5.0.5",
- "yargs-parser": "^20.2.2"
- }
- },
- "yargs-parser": {
- "version": "20.2.4",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
- "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
- "dev": true
}
}
},
@@ -7576,6 +7573,18 @@
"parse5": "^6.0.1"
}
},
+ "parseqs": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz",
+ "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==",
+ "dev": true
+ },
+ "parseuri": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz",
+ "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==",
+ "dev": true
+ },
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -9463,69 +9472,125 @@
}
},
"socket.io": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.0.5.tgz",
- "integrity": "sha512-5yWQ43P/4IttmPCGKDQ3CVocBiJWGpibyhYJxgUhf69EHMzmK8XW0DkmHIoYdLmZaVZJyiEkUqpeC7rSCIqekw==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.1.tgz",
+ "integrity": "sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==",
"dev": true,
"requires": {
- "@types/cookie": "^0.4.0",
- "@types/cors": "^2.8.8",
- "@types/node": "^14.14.10",
- "accepts": "~1.3.4",
- "base64id": "~2.0.0",
- "debug": "~4.3.1",
- "engine.io": "~4.0.6",
- "socket.io-adapter": "~2.0.3",
- "socket.io-parser": "~4.0.3"
+ "debug": "~4.1.0",
+ "engine.io": "~3.5.0",
+ "has-binary2": "~1.0.2",
+ "socket.io-adapter": "~1.1.0",
+ "socket.io-client": "2.4.0",
+ "socket.io-parser": "~3.4.0"
},
"dependencies": {
"debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true,
"requires": {
- "ms": "2.1.2"
+ "ms": "^2.1.1"
}
},
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
}
}
},
"socket.io-adapter": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.0.3.tgz",
- "integrity": "sha512-2wo4EXgxOGSFueqvHAdnmi5JLZzWqMArjuP4nqC26AtLh5PoCPsaRbRdah2xhcwTAMooZfjYiNVNkkmmSMaxOQ==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
+ "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==",
"dev": true
},
- "socket.io-parser": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.3.tgz",
- "integrity": "sha512-m4ybFiP4UYVORRt7jcdqf8UWx+ywVdAqqsJyruXxAdD3Sv6MDemijWij34mOWdMJ55bEdIb9jACBhxUgNK6sxw==",
+ "socket.io-client": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz",
+ "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==",
"dev": true,
"requires": {
- "@types/component-emitter": "^1.2.10",
+ "backo2": "1.0.2",
+ "component-bind": "1.0.0",
"component-emitter": "~1.3.0",
- "debug": "~4.3.1"
+ "debug": "~3.1.0",
+ "engine.io-client": "~3.5.0",
+ "has-binary2": "~1.0.2",
+ "indexof": "0.0.1",
+ "parseqs": "0.0.6",
+ "parseuri": "0.0.6",
+ "socket.io-parser": "~3.3.0",
+ "to-array": "0.1.4"
},
"dependencies": {
"debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
- "ms": "2.1.2"
+ "ms": "2.0.0"
}
},
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
+ "dev": true
+ },
+ "socket.io-parser": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.1.tgz",
+ "integrity": "sha512-1QLvVAe8dTz+mKmZ07Swxt+LAo4Y1ff50rlyoEx00TQmDFVQYPfcqGvIDJLGaBdhdNCecXtyKpD+EgKGcmmbuQ==",
+ "dev": true,
+ "requires": {
+ "component-emitter": "~1.3.0",
+ "debug": "~3.1.0",
+ "isarray": "2.0.1"
+ }
+ }
+ }
+ },
+ "socket.io-parser": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz",
+ "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==",
+ "dev": true,
+ "requires": {
+ "component-emitter": "1.2.1",
+ "debug": "~4.1.0",
+ "isarray": "2.0.1"
+ },
+ "dependencies": {
+ "component-emitter": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
+ "dev": true
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
+ "dev": true
+ },
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
}
}
@@ -10362,6 +10427,12 @@
"rimraf": "^3.0.0"
}
},
+ "to-array": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
+ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
+ "dev": true
+ },
"to-buffer": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
@@ -10535,9 +10606,9 @@
}
},
"ua-parser-js": {
- "version": "0.7.23",
- "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.23.tgz",
- "integrity": "sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA==",
+ "version": "0.7.22",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.22.tgz",
+ "integrity": "sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q==",
"dev": true
},
"unbzip2-stream": {
@@ -10901,12 +10972,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
- "dev": true
- },
"vfile": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
@@ -11046,6 +11111,12 @@
"integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
"dev": true
},
+ "xmlhttprequest-ssl": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
+ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=",
+ "dev": true
+ },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
@@ -11109,6 +11180,12 @@
"fd-slicer": "~1.1.0"
}
},
+ "yeast": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
+ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
+ "dev": true
+ },
"yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/package.json b/package.json
index 9ecb9c9dd..531d66861 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"js-test-karma": "karma start js/tests/karma.conf.js",
"js-test-integration-bundle": "rollup --config js/tests/integration/rollup.bundle.js",
"js-test-integration-modularity": "rollup --config js/tests/integration/rollup.bundle-modularity.js",
- "js-test-cloud": "cross-env BROWSERSTACK=true npm run js-test-karma",
+ "js-test-cloud": "cross-env BROWSER=true npm run js-test-karma",
"js-test-jquery": "cross-env JQUERY=true npm run js-test-karma",
"lint": "npm-run-all --parallel js-lint css-lint lockfile-lint",
"docs": "npm-run-all docs-build docs-lint",
@@ -115,14 +115,14 @@
"eslint": "^7.17.0",
"eslint-config-xo": "^0.34.0",
"eslint-plugin-import": "^2.22.1",
- "eslint-plugin-unicorn": "^26.0.1",
+ "eslint-plugin-unicorn": "^25.0.1",
"find-unused-sass-variables": "^3.1.0",
"glob": "^7.1.6",
"hammer-simulator": "0.0.1",
"hugo-bin": "^0.68.0",
"ip": "^1.1.5",
"jquery": "^3.5.1",
- "karma": "^6.0.0",
+ "karma": "^5.2.3",
"karma-browserstack-launcher": "1.4.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
diff --git a/scss/_toasts.scss b/scss/_toasts.scss
index 5c533d7f5..7a1cf7354 100644
--- a/scss/_toasts.scss
+++ b/scss/_toasts.scss
@@ -47,5 +47,4 @@
.toast-body {
padding: $toast-padding-x; // apply to both vertical and horizontal
- word-wrap: break-word;
}
diff --git a/site/assets/scss/_subnav.scss b/site/assets/scss/_subnav.scss
index 8377ff423..8979aa3cd 100644
--- a/site/assets/scss/_subnav.scss
+++ b/site/assets/scss/_subnav.scss
@@ -1,7 +1,7 @@
.bd-subnavbar {
// The position and z-index are needed for the dropdown to stay on top of the content
position: relative;
- z-index: $zindex-sticky;
+ z-index: $bd-navbar-zindex;
background-color: rgba($white, .95);
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .05), inset 0 -1px 0 rgba(0, 0, 0, .15);
diff --git a/site/assets/scss/_variables.scss b/site/assets/scss/_variables.scss
index 110600260..6e1ae2efd 100644
--- a/site/assets/scss/_variables.scss
+++ b/site/assets/scss/_variables.scss
@@ -11,3 +11,6 @@ $bd-warning: #f0ad4e;
$bd-danger: #d9534f;
$dropdown-active-icon: url("data:image/svg+xml, ");
$sidebar-collapse-icon: url("data:image/svg+xml, ");
+
+// Higher than core's $zindex-tooltip, which is 1070
+$bd-navbar-zindex: 1080;
diff --git a/site/content/docs/5.0/components/toasts.md b/site/content/docs/5.0/components/toasts.md
index bd7bcae9c..b6f7e3893 100644
--- a/site/content/docs/5.0/components/toasts.md
+++ b/site/content/docs/5.0/components/toasts.md
@@ -43,7 +43,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
### Translucent
-Toasts are slightly translucent, too, so they blend over whatever they might appear over.
+Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we'll also attempt to blur the elements under a toast.
{{< example class="bg-dark" >}}
@@ -120,7 +120,7 @@ Alternatively, you can also add additional controls and components to toasts.
### Color schemes
-Building on the above example, you can create different toast color schemes with our [color utilities]({{< docsref "/utilities/colors" >}}). Here we've added `.bg-primary` and `.text-white` to the `.toast`, and then added `.btn-close-white` to our close button. For a crisp edge, we remove the default border with `.border-0`.
+Building on the above example, you can create different toast color schemes with our [color utilities]({{< docsref "/utilities/colors" >}}). Here we've added `.bg-primary` and `.text-white` to the `.toast`, and then added `.text-white` to our close button. For a crisp edge, we remove the default border with `.border-0`.
{{< example class="bg-light" >}}
diff --git a/site/content/docs/5.0/customize/overview.md b/site/content/docs/5.0/customize/overview.md
index ce94ebfc4..16847589e 100644
--- a/site/content/docs/5.0/customize/overview.md
+++ b/site/content/docs/5.0/customize/overview.md
@@ -34,18 +34,3 @@ While we cannot go into details here on how to use every package manager, we can
For those who want to use the distribution files, review the [getting started page]({{< docsref "/getting-started/introduction" >}}) for how to include those files and an example HTML page. From there, consult the docs for the layout, components, and behaviors you'd like to use.
As you familiarize yourself with Bootstrap, continue exploring this section for more details on how to utilize our global options, making use of and changing our color system, how we build our components, how to use our growing list of CSS custom properties, and how to optimize your code when building with Bootstrap.
-
-## CSPs and embedded SVGs
-
-Several Bootstrap components include embedded SVGs in our CSS to style components consistently and easily across browsers and devices. **For organizations with more strict
CSP configurations**, we've documented all instances of our embedded SVGs (all of which are applied via `background-image`) so you can more thoroughly review your options.
-
-- [Accordion]({{< docsref "/components/accordion" >}})
-- [Close button]({{< docsref "/components/close-button" >}}) (used in alerts and modals)
-- [Form checkboxes and radio buttons]({{< docsref "/forms/checks-radios" >}})
-- [Form switches]({{< docsref "/forms/checks-radios#switches" >}})
-- [Form validation icons]({{< docsref "/forms/validation#server-side" >}})
-- [Select menus]({{< docsref "/forms/select" >}})
-- [Carousel controls]({{< docsref "/components/carousel#with-controls" >}})
-- [Navbar toggle buttons]({{< docsref "/components/navbar#responsive-behaviors" >}})
-
-Based on [community conversation](https://github.com/twbs/bootstrap/issues/25394), some options for addressing this in your own codebase include replacing the URLs with locally hosted assets, removing the images and using inline images (not possible in all components), and modifying your CSP. Our recommendation is to carefully review your own security policies and decide on a best path forward, if necessary.
\ No newline at end of file
diff --git a/site/content/docs/5.0/customize/sass.md b/site/content/docs/5.0/customize/sass.md
index d21dff7aa..46b822525 100644
--- a/site/content/docs/5.0/customize/sass.md
+++ b/site/content/docs/5.0/customize/sass.md
@@ -6,7 +6,7 @@ group: customize
toc: true
---
-Utilize our source Sass files to take advantage of variables, maps, mixins, and more.
+Utilize our source Sass files to take advantage of variables, maps, mixins, and more. In our build we've increased the Sass rounding precision to 6 (by default it's 5) to prevent issues with browser rounding.
## File structure
diff --git a/site/content/docs/5.0/examples/carousel-rtl/index.html b/site/content/docs/5.0/examples/carousel-rtl/index.html
index def1abde8..a55560e26 100644
--- a/site/content/docs/5.0/examples/carousel-rtl/index.html
+++ b/site/content/docs/5.0/examples/carousel-rtl/index.html
@@ -49,7 +49,7 @@ extra_css:
عنوان المثال.
نهاية الأوضاع ان أضف, هو مما رجوعهم وقدّموا. أي عدد الدمج نهاية وأكثرها, المسرح الباهضة وبولندا حول و, كل أما سياسة أسابيع. مع حيث قُدُماً الكونجرس, بها و خيار ٢٠٠٤, كلا في مكّن وقام. مع يكن زهاء بالفشل, الجوي الصين الشمال إذ على.
-
سجل اليوم
+
سجل اليوم
@@ -59,7 +59,7 @@ extra_css:
عنوان مثال آخر.
ثم تزامناً الفرنسي الإقتصادية دار. لكل عن الضغوط المتّبعة, أن حتى إختار المدن بالإنزال. عن الشمل بالفشل تلك, بل أراض أوزار بلديهما حول. دون لكون والتي ثم, كُلفة ويعزى استطاعوا أن لمّ. جُل بخطوط واحدة البشريةً.
-
أعرف أكثر
+
أعرف أكثر
@@ -69,7 +69,7 @@ extra_css:
واحد أكثر لقياس جيد.
قررت العصبة إيطاليا وتم أن, عن سكان وقامت الحكومة وفي. كان بـ اوروبا اليابانية, ثمّة بوابة يتعلّق عل بعض. عدم رئيس الآلاف أن حدى.
-
تصفح المعرض
+
تصفح المعرض
@@ -97,19 +97,19 @@ extra_css:
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
عنوان
ان وتم عجّل الأجل, قبل نتيجة المشترك بـ, أي جعل جورج أوزار المسرح. أن وإعلان الساحل تلك, مكن ان استبدال الباهضة التكاليف. الى ماذا اليميني الحكومة في, إجلاء نتيجة قبل تم. مساعدة بولندا، أي هذه الحكم.
- عرض التفاصيل
+ عرض التفاصيل
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
عنوان
هو أخر إتفاقية الدولارات الأوروبيّون, ثانية طوكيو و به،, ونتج أعمال مما أم. عن الا يونيو أفريقيا, السيطرة التقليدي ومن ٣٠. هو الغالي الإتفاقية ويكيبيديا، مكن, و الى هُزم اعتداء وايرلندا. وقبل بمباركة الأوروبيّون عن فقد, بتحدّي والفلبين ما كلا.
-
عرض التفاصيل
+
عرض التفاصيل
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
عنوان
غير عن الثقيل وسمّيت الأوضاع, لم تاريخ بالحرب للسيطرة حين, دار اللا تطوير تم. الى بشرية اليابان في. أما الشهيرة الإثنان وايرلندا ما, لإعلان واشتدّت و مدن. في غير والحزب للسيطرة الإكتفاء. ثانية الكونجرس الا من, جُل ٣٠ وبداية الشرقية.
-
عرض التفاصيل
+
عرض التفاصيل
diff --git a/site/content/docs/5.0/examples/carousel/index.html b/site/content/docs/5.0/examples/carousel/index.html
index 2c0bc5129..07d579c43 100644
--- a/site/content/docs/5.0/examples/carousel/index.html
+++ b/site/content/docs/5.0/examples/carousel/index.html
@@ -48,7 +48,7 @@ extra_css:
Example headline.
Some representative placeholder content for the first slide of the carousel.
-
Sign up today
+
Sign up today
@@ -58,7 +58,7 @@ extra_css:
Another example headline.
Some representative placeholder content for the second slide of the carousel.
-
Learn more
+
Learn more
@@ -68,7 +68,7 @@ extra_css:
One more for good measure.
Some representative placeholder content for the third slide of this carousel.
-
Browse gallery
+
Browse gallery
@@ -96,19 +96,19 @@ extra_css:
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
Heading
Some representative placeholder content for the three columns of text below the carousel. This is the first column.
- View details »
+ View details »
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
Heading
Another exciting bit of representative placeholder content. This time, we've moved on to the second column.
-
View details »
+
View details »
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
Heading
And lastly this, the third column of representative placeholder content.
-
View details »
+
View details »
diff --git a/site/content/docs/5.0/extend/approach.md b/site/content/docs/5.0/extend/approach.md
index 32efbf541..552b5f29b 100644
--- a/site/content/docs/5.0/extend/approach.md
+++ b/site/content/docs/5.0/extend/approach.md
@@ -76,11 +76,3 @@ Specifically regarding custom CSS, utilities can help combat increasing file siz
## Flexible HTML
While not always possible, we strive to avoid being overly dogmatic in our HTML requirements for components. Thus, we focus on single classes in our CSS selectors and try to avoid immediate children selectors (`>`). This gives you more flexibility in your implementation and helps keep our CSS simpler and less specific.
-
-## Code conventions
-
-[Code Guide](https://codeguide.co/) (from Bootstrap co-creator, @mdo) documents how we write our HTML and CSS across Bootstrap. It specifices guidelines for general formatting, common sense defaults, property and attribute orders, and more.
-
-We use [Stylelint](https://stylelint.io/) to enforce these standards and more in our Sass/CSS. [Our custom Stylelint config](https://github.com/twbs/stylelint-config-twbs-bootstrap) is open source and available for others to use and extend.
-
-We use [vnu-jar](https://www.npmjs.com/package/vnu-jar) to enforce standard and semantic HTML, as well as detecting common errors.
diff --git a/site/content/docs/5.0/forms/floating-labels.md b/site/content/docs/5.0/forms/floating-labels.md
index 2012a4e82..3163ea8e0 100644
--- a/site/content/docs/5.0/forms/floating-labels.md
+++ b/site/content/docs/5.0/forms/floating-labels.md
@@ -61,7 +61,7 @@ To set a custom height on your `