From b58ba798972661b7f3191cc818c3855aa53893ad Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 15 Sep 2023 13:37:25 +0200 Subject: Merging upstream version 5.3.2+dfsg. Signed-off-by: Daniel Baumann --- build/banner.js | 15 ------- build/banner.mjs | 20 +++++++++ build/build-plugins.js | 103 ------------------------------------------ build/build-plugins.mjs | 105 +++++++++++++++++++++++++++++++++++++++++++ build/change-version.js | 101 ------------------------------------------ build/change-version.mjs | 113 +++++++++++++++++++++++++++++++++++++++++++++++ build/generate-sri.js | 63 -------------------------- build/generate-sri.mjs | 64 +++++++++++++++++++++++++++ build/postcss.config.js | 19 -------- build/postcss.config.mjs | 17 +++++++ build/rollup.config.js | 57 ------------------------ build/rollup.config.mjs | 59 +++++++++++++++++++++++++ build/vnu-jar.js | 61 ------------------------- build/vnu-jar.mjs | 59 +++++++++++++++++++++++++ build/zip-examples.js | 98 ---------------------------------------- build/zip-examples.mjs | 101 ++++++++++++++++++++++++++++++++++++++++++ 16 files changed, 538 insertions(+), 517 deletions(-) delete mode 100644 build/banner.js create mode 100644 build/banner.mjs delete mode 100644 build/build-plugins.js create mode 100644 build/build-plugins.mjs delete mode 100644 build/change-version.js create mode 100644 build/change-version.mjs delete mode 100644 build/generate-sri.js create mode 100644 build/generate-sri.mjs delete mode 100644 build/postcss.config.js create mode 100644 build/postcss.config.mjs delete mode 100644 build/rollup.config.js create mode 100644 build/rollup.config.mjs delete mode 100644 build/vnu-jar.js create mode 100644 build/vnu-jar.mjs delete mode 100644 build/zip-examples.js create mode 100644 build/zip-examples.mjs (limited to 'build') diff --git a/build/banner.js b/build/banner.js deleted file mode 100644 index a022f1c..0000000 --- a/build/banner.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const pkg = require('../package.json') - -const year = new Date().getFullYear() - -function getBanner(pluginFilename) { - return `/*! - * Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage}) - * Copyright 2011-${year} ${pkg.author} - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */` -} - -module.exports = getBanner diff --git a/build/banner.mjs b/build/banner.mjs new file mode 100644 index 0000000..3fea93c --- /dev/null +++ b/build/banner.mjs @@ -0,0 +1,20 @@ +import fs from 'node:fs/promises' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +const pkgJson = path.join(__dirname, '../package.json') +const pkg = JSON.parse(await fs.readFile(pkgJson, 'utf8')) + +const year = new Date().getFullYear() + +function getBanner(pluginFilename) { + return `/*! + * Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage}) + * Copyright 2011-${year} ${pkg.author} + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */` +} + +export default getBanner diff --git a/build/build-plugins.js b/build/build-plugins.js deleted file mode 100644 index b2833a3..0000000 --- a/build/build-plugins.js +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to build our plugins to use them separately. - * Copyright 2020-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ - -'use strict' - -const path = require('node:path') -const rollup = require('rollup') -const globby = require('globby') -const { babel } = require('@rollup/plugin-babel') -const banner = require('./banner.js') - -const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/') -const jsFiles = globby.sync(`${sourcePath}/**/*.js`) - -// Array which holds the resolved plugins -const resolvedPlugins = [] - -// Trims the "js" extension and uppercases => first letter, hyphens, backslashes & slashes -const filenameToEntity = filename => filename.replace('.js', '') - .replace(/(?:^|-|\/|\\)[a-z]/g, str => str.slice(-1).toUpperCase()) - -for (const file of jsFiles) { - resolvedPlugins.push({ - src: file, - dist: file.replace('src', 'dist'), - fileName: path.basename(file), - className: filenameToEntity(path.basename(file)) - // safeClassName: filenameToEntity(path.relative(sourcePath, file)) - }) -} - -const build = async plugin => { - const globals = {} - - const bundle = await rollup.rollup({ - input: plugin.src, - plugins: [ - babel({ - // Only transpile our source code - exclude: 'node_modules/**', - // Include the helpers in each file, at most one copy of each - babelHelpers: 'bundled' - }) - ], - external(source) { - // Pattern to identify local files - const pattern = /^(\.{1,2})\// - - // It's not a local file, e.g a Node.js package - if (!pattern.test(source)) { - globals[source] = source - return true - } - - const usedPlugin = resolvedPlugins.find(plugin => { - return plugin.src.includes(source.replace(pattern, '')) - }) - - if (!usedPlugin) { - throw new Error(`Source ${source} is not mapped!`) - } - - // We can change `Index` with `UtilIndex` etc if we use - // `safeClassName` instead of `className` everywhere - globals[path.normalize(usedPlugin.src)] = usedPlugin.className - return true - } - }) - - await bundle.write({ - banner: banner(plugin.fileName), - format: 'umd', - name: plugin.className, - sourcemap: true, - globals, - generatedCode: 'es2015', - file: plugin.dist - }) - - console.log(`Built ${plugin.className}`) -} - -(async () => { - try { - const basename = path.basename(__filename) - const timeLabel = `[${basename}] finished` - - console.log('Building individual plugins...') - console.time(timeLabel) - - await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin))) - - console.timeEnd(timeLabel) - } catch (error) { - console.error(error) - process.exit(1) - } -})() diff --git a/build/build-plugins.mjs b/build/build-plugins.mjs new file mode 100644 index 0000000..77e6307 --- /dev/null +++ b/build/build-plugins.mjs @@ -0,0 +1,105 @@ +#!/usr/bin/env node + +/*! + * Script to build our plugins to use them separately. + * Copyright 2020-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { babel } from '@rollup/plugin-babel' +import globby from 'globby' +import { rollup } from 'rollup' +import banner from './banner.mjs' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/') +const jsFiles = globby.sync(`${sourcePath}/**/*.js`) + +// Array which holds the resolved plugins +const resolvedPlugins = [] + +// Trims the "js" extension and uppercases => first letter, hyphens, backslashes & slashes +const filenameToEntity = filename => filename.replace('.js', '') + .replace(/(?:^|-|\/|\\)[a-z]/g, str => str.slice(-1).toUpperCase()) + +for (const file of jsFiles) { + resolvedPlugins.push({ + src: file, + dist: file.replace('src', 'dist'), + fileName: path.basename(file), + className: filenameToEntity(path.basename(file)) + // safeClassName: filenameToEntity(path.relative(sourcePath, file)) + }) +} + +const build = async plugin => { + const globals = {} + + const bundle = await rollup({ + input: plugin.src, + plugins: [ + babel({ + // Only transpile our source code + exclude: 'node_modules/**', + // Include the helpers in each file, at most one copy of each + babelHelpers: 'bundled' + }) + ], + external(source) { + // Pattern to identify local files + const pattern = /^(\.{1,2})\// + + // It's not a local file, e.g a Node.js package + if (!pattern.test(source)) { + globals[source] = source + return true + } + + const usedPlugin = resolvedPlugins.find(plugin => { + return plugin.src.includes(source.replace(pattern, '')) + }) + + if (!usedPlugin) { + throw new Error(`Source ${source} is not mapped!`) + } + + // We can change `Index` with `UtilIndex` etc if we use + // `safeClassName` instead of `className` everywhere + globals[path.normalize(usedPlugin.src)] = usedPlugin.className + return true + } + }) + + await bundle.write({ + banner: banner(plugin.fileName), + format: 'umd', + name: plugin.className, + sourcemap: true, + globals, + generatedCode: 'es2015', + file: plugin.dist + }) + + console.log(`Built ${plugin.className}`) +} + +(async () => { + try { + const basename = path.basename(__filename) + const timeLabel = `[${basename}] finished` + + console.log('Building individual plugins...') + console.time(timeLabel) + + await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin))) + + console.timeEnd(timeLabel) + } catch (error) { + console.error(error) + process.exit(1) + } +})() diff --git a/build/change-version.js b/build/change-version.js deleted file mode 100644 index 9685df5..0000000 --- a/build/change-version.js +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to update version number references in the project. - * Copyright 2017-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ - -'use strict' - -const fs = require('node:fs').promises -const path = require('node:path') -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) { - return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&') -} - -function regExpQuoteReplacement(string) { - return string.replace(/\$/g, '$$') -} - -async function replaceRecursively(file, oldVersion, newVersion) { - const originalString = await fs.readFile(file, 'utf8') - const newString = originalString - .replace( - new RegExp(regExpQuote(oldVersion), 'g'), - regExpQuoteReplacement(newVersion) - ) - // Also replace the version used by the rubygem, - // which is using periods (`.`) instead of hyphens (`-`) - .replace( - new RegExp(regExpQuote(oldVersion.replace(/-/g, '.')), 'g'), - regExpQuoteReplacement(newVersion.replace(/-/g, '.')) - ) - - // No need to move any further if the strings are identical - if (originalString === newString) { - return - } - - if (VERBOSE) { - console.log(`FILE: ${file}`) - } - - if (DRY_RUN) { - return - } - - await fs.writeFile(file, newString, 'utf8') -} - -function showUsage(args) { - console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]') - console.error('Got arguments:', args) - process.exit(1) -} - -async function main(args) { - let [oldVersion, newVersion] = args - - if (!oldVersion || !newVersion) { - showUsage(args) - } - - // Strip any leading `v` from arguments because - // otherwise we will end up with duplicate `v`s - [oldVersion, newVersion] = [oldVersion, newVersion].map(arg => { - return arg.startsWith('v') ? arg.slice(1) : arg - }) - - if (oldVersion === newVersion) { - showUsage(args) - } - - 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)) diff --git a/build/change-version.mjs b/build/change-version.mjs new file mode 100644 index 0000000..3c1e706 --- /dev/null +++ b/build/change-version.mjs @@ -0,0 +1,113 @@ +#!/usr/bin/env node + +/*! + * Script to update version number references in the project. + * Copyright 2017-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +import { execFile } from 'node:child_process' +import fs from 'node:fs/promises' +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 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' +] + +// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 +function regExpQuote(string) { + return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&') +} + +function regExpQuoteReplacement(string) { + return string.replace(/\$/g, '$$') +} + +async function replaceRecursively(file, oldVersion, newVersion) { + const originalString = await fs.readFile(file, 'utf8') + const newString = originalString + .replace( + new RegExp(regExpQuote(oldVersion), 'g'), + regExpQuoteReplacement(newVersion) + ) + // Also replace the version used by the rubygem, + // which is using periods (`.`) instead of hyphens (`-`) + .replace( + new RegExp(regExpQuote(oldVersion.replace(/-/g, '.')), 'g'), + regExpQuoteReplacement(newVersion.replace(/-/g, '.')) + ) + + // No need to move any further if the strings are identical + if (originalString === newString) { + return + } + + if (VERBOSE) { + console.log(`Found ${oldVersion} in ${file}`) + } + + if (DRY_RUN) { + return + } + + 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) + process.exit(1) +} + +async function main(args) { + let [oldVersion, newVersion] = args + + if (!oldVersion || !newVersion) { + showUsage(args) + } + + // Strip any leading `v` from arguments because + // otherwise we will end up with duplicate `v`s + [oldVersion, newVersion] = [oldVersion, newVersion].map(arg => { + return arg.startsWith('v') ? arg.slice(1) : arg + }) + + if (oldVersion === newVersion) { + showUsage(args) + } + + bumpNpmVersion(newVersion) + + try { + await Promise.all( + FILES.map(file => replaceRecursively(file, oldVersion, newVersion)) + ) + } catch (error) { + console.error(error) + process.exit(1) + } +} + +main(process.argv.slice(2)) diff --git a/build/generate-sri.js b/build/generate-sri.js deleted file mode 100644 index 2e22924..0000000 --- a/build/generate-sri.js +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to generate SRI hashes for use in our docs. - * Remember to use the same vendor files as the CDN ones, - * otherwise the hashes won't match! - * - * Copyright 2017-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ - -'use strict' - -const crypto = require('node:crypto') -const fs = require('node:fs') -const path = require('node:path') -const sh = require('shelljs') - -sh.config.fatal = true - -const configFile = path.join(__dirname, '../hugo.yml') - -// Array of objects which holds the files to generate SRI hashes for. -// `file` is the path from the root folder -// `configPropertyName` is the hugo.yml variable's name of the file -const files = [ - { - file: 'dist/css/bootstrap.min.css', - configPropertyName: 'css_hash' - }, - { - file: 'dist/css/bootstrap.rtl.min.css', - configPropertyName: 'css_rtl_hash' - }, - { - file: 'dist/js/bootstrap.min.js', - configPropertyName: 'js_hash' - }, - { - file: 'dist/js/bootstrap.bundle.min.js', - configPropertyName: 'js_bundle_hash' - }, - { - file: 'node_modules/@popperjs/core/dist/umd/popper.min.js', - configPropertyName: 'popper_hash' - } -] - -for (const { file, configPropertyName } of files) { - fs.readFile(file, 'utf8', (error, data) => { - if (error) { - throw error - } - - const algo = 'sha384' - const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64') - const integrity = `${algo}-${hash}` - - console.log(`${configPropertyName}: ${integrity}`) - - sh.sed('-i', new RegExp(`^(\\s+${configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile) - }) -} diff --git a/build/generate-sri.mjs b/build/generate-sri.mjs new file mode 100644 index 0000000..e2b1554 --- /dev/null +++ b/build/generate-sri.mjs @@ -0,0 +1,64 @@ +#!/usr/bin/env node + +/*! + * Script to generate SRI hashes for use in our docs. + * Remember to use the same vendor files as the CDN ones, + * otherwise the hashes won't match! + * + * Copyright 2017-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +import crypto from 'node:crypto' +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import sh from 'shelljs' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +sh.config.fatal = true + +const configFile = path.join(__dirname, '../hugo.yml') + +// Array of objects which holds the files to generate SRI hashes for. +// `file` is the path from the root folder +// `configPropertyName` is the hugo.yml variable's name of the file +const files = [ + { + file: 'dist/css/bootstrap.min.css', + configPropertyName: 'css_hash' + }, + { + file: 'dist/css/bootstrap.rtl.min.css', + configPropertyName: 'css_rtl_hash' + }, + { + file: 'dist/js/bootstrap.min.js', + configPropertyName: 'js_hash' + }, + { + file: 'dist/js/bootstrap.bundle.min.js', + configPropertyName: 'js_bundle_hash' + }, + { + file: 'node_modules/@popperjs/core/dist/umd/popper.min.js', + configPropertyName: 'popper_hash' + } +] + +for (const { file, configPropertyName } of files) { + fs.readFile(file, 'utf8', (error, data) => { + if (error) { + throw error + } + + const algorithm = 'sha384' + const hash = crypto.createHash(algorithm).update(data, 'utf8').digest('base64') + const integrity = `${algorithm}-${hash}` + + console.log(`${configPropertyName}: ${integrity}`) + + sh.sed('-i', new RegExp(`^(\\s+${configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile) + }) +} diff --git a/build/postcss.config.js b/build/postcss.config.js deleted file mode 100644 index 7f8186d..0000000 --- a/build/postcss.config.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const mapConfig = { - inline: false, - annotation: true, - sourcesContent: true -} - -module.exports = context => { - return { - map: context.file.dirname.includes('examples') ? false : mapConfig, - plugins: { - autoprefixer: { - cascade: false - }, - rtlcss: context.env === 'RTL' - } - } -} diff --git a/build/postcss.config.mjs b/build/postcss.config.mjs new file mode 100644 index 0000000..7717cfc --- /dev/null +++ b/build/postcss.config.mjs @@ -0,0 +1,17 @@ +const mapConfig = { + inline: false, + annotation: true, + sourcesContent: true +} + +export default context => { + return { + map: context.file.dirname.includes('examples') ? false : mapConfig, + plugins: { + autoprefixer: { + cascade: false + }, + rtlcss: context.env === 'RTL' + } + } +} diff --git a/build/rollup.config.js b/build/rollup.config.js deleted file mode 100644 index f01918e..0000000 --- a/build/rollup.config.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict' - -const path = require('node:path') -const { babel } = require('@rollup/plugin-babel') -const { nodeResolve } = require('@rollup/plugin-node-resolve') -const replace = require('@rollup/plugin-replace') -const banner = require('./banner.js') - -const BUNDLE = process.env.BUNDLE === 'true' -const ESM = process.env.ESM === 'true' - -let fileDestination = `bootstrap${ESM ? '.esm' : ''}` -const external = ['@popperjs/core'] -const plugins = [ - babel({ - // Only transpile our source code - exclude: 'node_modules/**', - // Include the helpers in the bundle, at most one copy of each - babelHelpers: 'bundled' - }) -] -const globals = { - '@popperjs/core': 'Popper' -} - -if (BUNDLE) { - fileDestination += '.bundle' - // Remove last entry in external array to bundle Popper - external.pop() - delete globals['@popperjs/core'] - plugins.push( - replace({ - 'process.env.NODE_ENV': '"production"', - preventAssignment: true - }), - nodeResolve() - ) -} - -const rollupConfig = { - input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`), - output: { - banner: banner(), - file: path.resolve(__dirname, `../dist/js/${fileDestination}.js`), - format: ESM ? 'esm' : 'umd', - globals, - generatedCode: 'es2015' - }, - external, - plugins -} - -if (!ESM) { - rollupConfig.output.name = 'bootstrap' -} - -module.exports = rollupConfig diff --git a/build/rollup.config.mjs b/build/rollup.config.mjs new file mode 100644 index 0000000..dd6c7d1 --- /dev/null +++ b/build/rollup.config.mjs @@ -0,0 +1,59 @@ +import path from 'node:path' +import process from 'node:process' +import { fileURLToPath } from 'node:url' +import { babel } from '@rollup/plugin-babel' +import { nodeResolve } from '@rollup/plugin-node-resolve' +import replace from '@rollup/plugin-replace' +import banner from './banner.mjs' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +const BUNDLE = process.env.BUNDLE === 'true' +const ESM = process.env.ESM === 'true' + +let destinationFile = `bootstrap${ESM ? '.esm' : ''}` +const external = ['@popperjs/core'] +const plugins = [ + babel({ + // Only transpile our source code + exclude: 'node_modules/**', + // Include the helpers in the bundle, at most one copy of each + babelHelpers: 'bundled' + }) +] +const globals = { + '@popperjs/core': 'Popper' +} + +if (BUNDLE) { + destinationFile += '.bundle' + // Remove last entry in external array to bundle Popper + external.pop() + delete globals['@popperjs/core'] + plugins.push( + replace({ + 'process.env.NODE_ENV': '"production"', + preventAssignment: true + }), + nodeResolve() + ) +} + +const rollupConfig = { + input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`), + output: { + banner: banner(), + file: path.resolve(__dirname, `../dist/js/${destinationFile}.js`), + format: ESM ? 'esm' : 'umd', + globals, + generatedCode: 'es2015' + }, + external, + plugins +} + +if (!ESM) { + rollupConfig.output.name = 'bootstrap' +} + +export default rollupConfig diff --git a/build/vnu-jar.js b/build/vnu-jar.js deleted file mode 100644 index 22956cb..0000000 --- a/build/vnu-jar.js +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to run vnu-jar if Java is available. - * Copyright 2017-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ - -'use strict' - -const { execFile, spawn } = require('node:child_process') -const vnu = require('vnu-jar') - -execFile('java', ['-version'], (error, stdout, stderr) => { - if (error) { - console.error('Skipping vnu-jar test; Java is probably missing.') - console.error(error) - return - } - - console.log('Running vnu-jar validation...') - - const is32bitJava = !/64-Bit/.test(stderr) - - // vnu-jar accepts multiple ignores joined with a `|`. - // Also note that the ignores are string regular expressions. - const ignores = [ - // "autocomplete" is included in