diff --git a/adapter/package.json b/adapter/package.json index 4579081ab..232f1697d 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -11,8 +11,12 @@ "publishConfig": { "access": "public" }, - "main": "build/cjs/lib.js", - "module": "build/es/lib.js", + "main": "./build/cjs/index.js", + "module": "./build/es/index.js", + "exports": { + "import": "./build/es/index.js", + "require": "./build/cjs/index.js" + }, "files": [ "build" ], @@ -22,7 +26,9 @@ "devDependencies": { "@dhis2/cli-app-scripts": "5.5.3", "enzyme": "^3.11.0", - "enzyme-adapter-react-16": "^1.15.5" + "enzyme-adapter-react-16": "^1.15.5", + "react": "^16.8", + "react-dom": "^16.8" }, "scripts": { "build": "d2-app-scripts build", diff --git a/cli/config/app.babel.config.js b/cli/config/app.babel.config.js deleted file mode 100644 index 6286e15a0..000000000 --- a/cli/config/app.babel.config.js +++ /dev/null @@ -1,43 +0,0 @@ -module.exports = { - plugins: [ - /* - * These plugins don't do any transformations. - * They just prevent a blow-up for syntax supported by Create React App - */ - - // Adds syntax support for arrow-function class properties - // class { handleClick = () => { } } - require('@babel/plugin-syntax-class-properties'), - - // Adds syntax support for import() - require('@babel/plugin-syntax-dynamic-import').default, - - // Adds syntax support for optional chaining (?.) - require('@babel/plugin-syntax-optional-chaining').default, - - // Adds syntax support for default value using ?? operator - require('@babel/plugin-syntax-nullish-coalescing-operator').default, - - /* - * These plugins actually transform code - */ - - // Automatically include a React import when JSX is present - require('babel-plugin-react-require'), - ], - env: { - production: { - plugins: [ - [require('styled-jsx/babel'), { optimizeForSpeed: true }], - ], - }, - development: { - plugins: [ - [require('styled-jsx/babel'), { optimizeForSpeed: true }], - ], - }, - test: { - plugins: [require('styled-jsx/babel-test')], - }, - }, -} diff --git a/cli/config/babel.config.js b/cli/config/babel.config.js deleted file mode 100644 index 2e58a9aa2..000000000 --- a/cli/config/babel.config.js +++ /dev/null @@ -1,32 +0,0 @@ -const path = require('path') -const browserTargets = require('./.browserlistrc') -const jestTargets = { node: 'current' } - -const isTest = process.env.NODE_ENV === 'test' - -const appBabelConfig = path.resolve(__dirname, 'app.babel.config') - -module.exports = { - extends: appBabelConfig, - presets: [ - require('@babel/preset-react'), - require('@babel/preset-typescript'), - [ - require('@babel/preset-env'), - { - modules: isTest ? 'commonjs' : 'auto', - targets: isTest ? jestTargets : browserTargets, - }, - ], - ], - plugins: [ - /* - * Actually transform all the things we added syntax support for in app.babel.config.js - */ - - // plugin-proposal-dynamic-import will be handled by the bundler - require('@babel/plugin-proposal-class-properties'), - require('@babel/plugin-proposal-optional-chaining'), - require('@babel/plugin-proposal-nullish-coalescing-operator'), - ], -} diff --git a/cli/config/jest.transform.js b/cli/config/jest.transform.js index 0cf3b3bd5..9ab355c4d 100644 --- a/cli/config/jest.transform.js +++ b/cli/config/jest.transform.js @@ -1,2 +1,4 @@ -const babelConfig = require('./babel.config') -module.exports = require('babel-jest').createTransformer(babelConfig) +const makeBabelConfig = require('./makeBabelConfig.js') +module.exports = require('babel-jest').createTransformer( + makeBabelConfig({ mode: 'test' }) +) diff --git a/cli/config/makeBabelConfig.js b/cli/config/makeBabelConfig.js new file mode 100644 index 000000000..8fde30c6a --- /dev/null +++ b/cli/config/makeBabelConfig.js @@ -0,0 +1,74 @@ +const browserTargets = require('./.browserlistrc') +const jestTargets = { node: 'current' } + +const getBabelModuleType = moduleType => { + switch (moduleType) { + case 'cjs': + case 'commonjs': + return 'commonjs' + case 'systemjs': + case 'umd': + case 'amd': + return moduleType + case 'es': + default: + return false + } +} +const makeBabelConfig = ({ moduleType, mode }) => { + const isTest = mode === 'test' + + return { + presets: [ + require('@babel/preset-react'), + require('@babel/preset-typescript'), + [ + require('@babel/preset-env'), + { + modules: isTest + ? 'commonjs' + : getBabelModuleType(moduleType), + targets: isTest ? jestTargets : browserTargets, + }, + ], + ], + plugins: [ + // Adds syntax support for import() + require('@babel/plugin-syntax-dynamic-import').default, + + /* + * These plugins actually transform code + */ + + // Automatically include a React import when JSX is present + require('babel-plugin-react-require'), + + // Adds support for arrow-function class properties + // class { handleClick = () => { } } + require('@babel/plugin-proposal-class-properties'), + + // Adds syntax support for optional chaining (?.) + require('@babel/plugin-proposal-optional-chaining'), + + // Adds support for default value using ?? operator + require('@babel/plugin-proposal-nullish-coalescing-operator'), + ], + env: { + production: { + plugins: [ + [require('styled-jsx/babel'), { optimizeForSpeed: true }], + ], + }, + development: { + plugins: [ + [require('styled-jsx/babel'), { optimizeForSpeed: true }], + ], + }, + test: { + plugins: [require('styled-jsx/babel-test')], + }, + }, + } +} + +module.exports = makeBabelConfig diff --git a/cli/package.json b/cli/package.json index 23ac9a966..2674c0feb 100644 --- a/cli/package.json +++ b/cli/package.json @@ -25,15 +25,11 @@ "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-proposal-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/preset-env": "^7.9.0", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", "@dhis2/app-shell": "5.5.3", - "@dhis2/cli-helpers-engine": "^1.5.0", + "@dhis2/cli-helpers-engine": "^2.1.1", "archiver": "^3.1.1", "axios": "^0.20.0", "babel-jest": "^24.9.0", @@ -53,14 +49,6 @@ "lodash": "^4.17.11", "parse-author": "^2.0.0", "parse-gitignore": "^1.0.1", - "rollup": "^1.21.4", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-commonjs": "^10.1.0", - "rollup-plugin-json": "^4.0.0", - "rollup-plugin-node-resolve": "^5.0.1", - "rollup-plugin-postcss": "^2.0.3", - "rollup-plugin-replace": "^2.2.0", - "rollup-plugin-visualizer": "^3.2.2", "styled-jsx": "<3.3.3" }, "bin": { diff --git a/cli/src/commands/build.js b/cli/src/commands/build.js index 7722a86e3..1b0a2300e 100644 --- a/cli/src/commands/build.js +++ b/cli/src/commands/build.js @@ -10,6 +10,7 @@ const loadEnvFiles = require('../lib/loadEnvFiles') const parseConfig = require('../lib/parseConfig') const makePaths = require('../lib/paths') const makeShell = require('../lib/shell') +const { validatePackage } = require('../lib/validatePackage') const buildModes = ['development', 'production'] @@ -51,6 +52,7 @@ const handler = async ({ watch, standalone, shell: shellSource, + verify, force, }) => { const paths = makePaths(cwd) @@ -72,6 +74,20 @@ const handler = async ({ await exitOnCatch( async () => { + if ( + !(await validatePackage({ + config, + paths, + offerFix: !process.env.CI, + noVerify: !verify, + })) + ) { + reporter.error( + 'Failed to validate package, use --no-verify to skip these checks' + ) + process.exit(1) + } + reporter.info('Generating internationalization strings...') await i18n.extract({ input: paths.src, output: paths.i18nStrings }) await i18n.generate({ @@ -88,16 +104,33 @@ const handler = async ({ reporter.info( `Building ${config.type} ${chalk.bold(config.name)}...` ) - await compile({ - config, - paths, - mode, - watch, - }) if (config.type === 'app') { + await compile({ + config, + paths, + mode, + watch, + }) reporter.info('Building appShell...') await shell.build() + } else { + await Promise.all([ + compile({ + config, + paths, + moduleType: 'es', + mode, + watch, + }), + compile({ + config, + paths, + moduleType: 'cjs', + mode, + watch, + }), + ]) } }, { @@ -146,6 +179,11 @@ const command = { description: 'Build in development mode', conflicts: 'mode', }, + verify: { + type: 'boolean', + description: 'Validate package before building', + default: true, + }, watch: { type: 'boolean', description: 'Watch source files for changes', diff --git a/cli/src/commands/start.js b/cli/src/commands/start.js index 451a2807a..0e86f4f69 100644 --- a/cli/src/commands/start.js +++ b/cli/src/commands/start.js @@ -7,6 +7,7 @@ const loadEnvFiles = require('../lib/loadEnvFiles') const parseConfig = require('../lib/parseConfig') const makePaths = require('../lib/paths') const makeShell = require('../lib/shell') +const { validatePackage } = require('../lib/validatePackage') const defaultPort = 3000 @@ -35,6 +36,17 @@ const handler = async ({ await exitOnCatch( async () => { + if (!(await validatePackage({ config, paths, offerFix: false }))) { + reporter.print( + 'Package validation issues are ignored when running "d2-app-scripts start"' + ) + reporter.print( + `${chalk.bold( + 'HINT' + )}: Run "d2-app-scripts build" to automatically fix some of these issues` + ) + } + reporter.info('Generating internationalization strings...') await i18n.extract({ input: paths.src, output: paths.i18nStrings }) await i18n.generate({ diff --git a/cli/src/lib/compiler/compile.js b/cli/src/lib/compiler/compile.js index 9873d73e3..d166cb8d3 100644 --- a/cli/src/lib/compiler/compile.js +++ b/cli/src/lib/compiler/compile.js @@ -1,17 +1,139 @@ -const compileApp = require('./compileApp') -const compileLibrary = require('./compileLibrary') +const path = require('path') +const babel = require('@babel/core') +const { reporter, chalk } = require('@dhis2/cli-helpers-engine') +const chokidar = require('chokidar') +const fs = require('fs-extra') +const makeBabelConfig = require('../../../config/makeBabelConfig.js') + +const overwriteEntrypoint = async ({ config, paths }) => { + const isApp = config.type === 'app' + const entrypoint = isApp ? config.entryPoints.app : config.entryPoints.lib + if (!entrypoint.match(/^(\.\/)?src\//)) { + const msg = `App entrypoint ${chalk.bold( + entrypoint + )} must be located within the ${chalk.bold('./src')} directory` + reporter.error(msg) + throw new Error(msg) + } + + const relativeEntrypoint = entrypoint.replace(/^(\.\/)?src\//, '') + + try { + require.resolve(path.join(paths.base, entrypoint)) + } catch (e) { + const msg = `Could not resolve app entrypoint ${chalk.bold(entrypoint)}` + reporter.error(msg) + throw new Error(msg) + } + + if (isApp) { + const shellAppSource = await fs.readFile(paths.shellSourceEntrypoint) + await fs.writeFile( + paths.shellAppEntrypoint, + shellAppSource + .toString() + .replace(/'.\/D2App\/app'/g, `'./D2App/${relativeEntrypoint}'`) + ) + } +} + +const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => { + const compileFile = async source => { + const relative = path.relative(inputDir, source) + const destination = path.join(outputDir, relative) + reporter.debug( + `File ${relative} changed or added... dest: `, + path.relative(inputDir, relative) + ) + await fs.ensureDir(path.dirname(destination)) + await processFileCallback(source, destination) + } + + const removeFile = async file => { + const relative = path.relative(inputDir, file) + const outFile = path.join(outputDir, relative) + reporter.debug(`File ${relative} removed... removing: `, outFile) + fs.remove(outFile) + } + + return new Promise((resolve, reject) => { + const watcher = chokidar.watch(inputDir, { persistent: true }) + + watcher + .on('ready', async () => { + if (watch) { + reporter.debug('watching...') + } else { + await watcher.close() + } + resolve() + }) + .on('add', compileFile) + .on('change', compileFile) + .on('unlink', removeFile) + .on('error', error => { + reporter.debugErr('Chokidar error:', error) + reject('Chokidar error!') + }) + + process.on('SIGINT', async () => { + reporter.debug('Caught interrupt signal') + await watcher.close() + }) + }) +} const compile = async ({ config, paths, + moduleType = 'es', mode = 'development', watch = false, -} = {}) => { - if (config.type === 'lib') { - return await compileLibrary({ config, paths, mode, watch }) - } else { - return await compileApp({ config, paths, mode, watch }) +}) => { + await overwriteEntrypoint({ config, paths }) + + const isApp = config.type === 'app' + const outDir = isApp + ? paths.shellApp + : path.join(paths.buildOutput, moduleType) + + fs.removeSync(outDir) + fs.ensureDirSync(outDir) + + if (isApp) { + fs.removeSync(paths.shellPublic) + fs.copySync(paths.shellSourcePublic, paths.shellPublic) + } + + const babelConfig = makeBabelConfig({ moduleType, mode }) + + const copyFile = async (source, destination) => { + await fs.copy(source, destination) + } + const compileFile = async (source, destination) => { + if (source.match(/\.[jt]sx?$/)) { + const result = await babel.transformFileAsync(source, babelConfig) + await fs.writeFile(destination, result.code) + } else { + await copyFile(source, destination) + } } + + return Promise.all([ + watchFiles({ + inputDir: paths.src, + outputDir: outDir, + processFileCallback: compileFile, + watch, + }), + isApp && + watchFiles({ + inputDir: paths.public, + outputDir: paths.shellPublic, + processFileCallback: copyFile, + watch, + }), + ]) } module.exports = compile diff --git a/cli/src/lib/compiler/compileApp.js b/cli/src/lib/compiler/compileApp.js deleted file mode 100644 index 86a4bef8f..000000000 --- a/cli/src/lib/compiler/compileApp.js +++ /dev/null @@ -1,121 +0,0 @@ -const path = require('path') -const babel = require('@babel/core') -const { reporter, chalk } = require('@dhis2/cli-helpers-engine') -const chokidar = require('chokidar') -const fs = require('fs-extra') -const babelOptions = require('../../../config/app.babel.config') - -const overwriteEntrypoint = async ({ config, paths }) => { - const shellAppSource = await fs.readFile(paths.shellSourceEntrypoint) - - const entrypoint = config.entryPoints.app - if (!entrypoint.match(/^(\.\/)?src\//)) { - const msg = `App entrypoint ${chalk.bold( - entrypoint - )} must be located within the ${chalk.bold('./src')} directory` - reporter.error(msg) - throw new Error(msg) - } - - const relativeEntrypoint = entrypoint.replace(/^(\.\/)?src\//, '') - - try { - require.resolve(path.join(paths.base, entrypoint)) - } catch (e) { - const msg = `Could not resolve app entrypoint ${chalk.bold(entrypoint)}` - reporter.error(msg) - throw new Error(msg) - } - - await fs.writeFile( - paths.shellAppEntrypoint, - shellAppSource - .toString() - .replace(/'.\/D2App\/app'/g, `'./D2App/${relativeEntrypoint}'`) - ) -} - -const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => { - const compileFile = async source => { - const relative = path.relative(inputDir, source) - const destination = path.join(outputDir, relative) - reporter.debug( - `File ${relative} changed or added... dest: `, - path.relative(inputDir, relative) - ) - await fs.ensureDir(path.dirname(destination)) - await processFileCallback(source, destination) - } - - const removeFile = async file => { - const relative = path.relative(inputDir, file) - const outFile = path.join(outputDir, relative) - reporter.debug(`File ${relative} removed... removing: `, outFile) - fs.remove(outFile) - } - - return new Promise((resolve, reject) => { - const watcher = chokidar.watch(inputDir, { persistent: true }) - - watcher - .on('ready', async () => { - if (watch) { - reporter.debug('watching...') - } else { - await watcher.close() - } - resolve() - }) - .on('add', compileFile) - .on('change', compileFile) - .on('unlink', removeFile) - .on('error', error => { - reporter.debugErr('Chokidar error:', error) - reject('Chokidar error!') - }) - - process.on('SIGINT', async () => { - reporter.debug('Caught interrupt signal') - await watcher.close() - }) - }) -} - -const compileApp = async ({ config, paths, watch }) => { - await overwriteEntrypoint({ config, paths }) - - fs.removeSync(paths.shellApp) - fs.ensureDirSync(paths.shellApp) - - fs.removeSync(paths.shellPublic) - fs.copySync(paths.shellSourcePublic, paths.shellPublic) - - const copyFile = async (source, destination) => { - await fs.copy(source, destination) - } - const compileFile = async (source, destination) => { - if (path.extname(source) === '.js') { - const result = await babel.transformFileAsync(source, babelOptions) - await fs.writeFile(destination, result.code) - } else { - await copyFile(source, destination) - } - } - - return Promise.all([ - watchFiles({ - inputDir: paths.src, - outputDir: paths.shellApp, - processFileCallback: compileFile, - watch, - }), - watchFiles({ - inputDir: paths.public, - outputDir: paths.shellPublic, - processFileCallback: copyFile, - watch, - }), - ]) -} - -module.exports = compileApp diff --git a/cli/src/lib/compiler/compileLibrary.js b/cli/src/lib/compiler/compileLibrary.js deleted file mode 100644 index 4f37cf81f..000000000 --- a/cli/src/lib/compiler/compileLibrary.js +++ /dev/null @@ -1,119 +0,0 @@ -const path = require('path') -const { reporter, chalk } = require('@dhis2/cli-helpers-engine') -const fs = require('fs-extra') -const rollup = require('rollup') -const rollupConfigBuilder = require('../../../config/rollup.config') - -const printRollupError = error => { - reporter.debug('Rollup error', error) - reporter.error(String(error)) - try { - const file = path.relative(process.cwd(), error.loc.file) - reporter.error( - chalk.dim( - `\tAt ${chalk.bold(file)}:${error.loc.line}:${error.loc.column}` - ) - ) - } catch (e) { - // ignore - } -} - -const compileLibrary = async ({ config, paths, mode, watch }) => { - const input = - (config.entryPoints && config.entryPoints[config.type]) || - 'src/index.js' - const outDir = paths.buildOutput - - const pkg = require(paths.package) - - const rollupConfig = rollupConfigBuilder({ - cwd: paths.base, - entryPointName: config.type, - entryPoint: path.join(paths.base, input), - outDir, - mode, - bundleDeps: false, - pkg, - }) - - reporter.print(chalk.green(' - Entrypoint :'), chalk.yellow(input)) - reporter.print( - chalk.green(' - Output Directory :'), - chalk.yellow(path.relative(paths.base, outDir)) - ) - - reporter.debug('Rollup config', rollupConfig) - - if (!watch) { - fs.removeSync(outDir) - fs.ensureDirSync(outDir) - - // create a bundle - try { - const bundle = await rollup.rollup(rollupConfig) - - // or write the bundle to disk - const outputs = Array.isArray(rollupConfig.output) - ? rollupConfig.output - : [rollupConfig.output] - reporter.debug('outputs', outputs) - - await Promise.all( - outputs.map(async outputConfig => { - const { output } = await bundle.generate(outputConfig) - for (const chunkOrAsset of output) { - reporter.debug( - chunkOrAsset.isAsset - ? `[${outputConfig.format}] - ASSET - ` - : `[${outputConfig.format}] - CHUNK ${chunkOrAsset.name} - MODULES - `, - chunkOrAsset.isAsset - ? chunkOrAsset - : Object.keys(chunkOrAsset.modules) - ) - } - return await bundle.write(outputConfig) - }) - ) - } catch (e) { - printRollupError(e) - process.exit(1) - } - } else { - fs.ensureDirSync(outDir) - - return new Promise((resolve, reject) => { - reporter.debug('watching...') - const watcher = rollup.watch({ - ...rollupConfig, - }) - - watcher.on('event', async event => { - reporter.debug('[watch]', event.code, event) - if (event.code === 'START') { - reporter.print(chalk.dim('Compiling...')) - } else if (event.code === 'END') { - reporter.print(chalk.dim(' Compiled successfully!')) - resolve() // This lets us wait for the first successful compilation - } else if (event.code === 'ERROR') { - printRollupError(event.error) - } else if (event.code === 'FATAL') { - printRollupError(event.error) - reject('Fatal error, aborting...') - } else { - reporter.debug( - '[watch] Encountered an unknown event', - event - ) - } - }) - - process.on('SIGINT', function () { - reporter.debug('Caught interrupt signal') - watcher.close() - }) - }) - } -} - -module.exports = compileLibrary diff --git a/cli/src/lib/validatePackage.js b/cli/src/lib/validatePackage.js new file mode 100644 index 000000000..1eee01460 --- /dev/null +++ b/cli/src/lib/validatePackage.js @@ -0,0 +1,28 @@ +const { reporter, chalk } = require('@dhis2/cli-helpers-engine') +const { + validatePackageExports, +} = require('./validators/validatePackageExports') + +module.exports.validatePackage = async ({ + config, + paths, + offerFix = true, + noVerify = false, +} = {}) => { + if (noVerify) { + reporter.print(chalk.dim('Skipping package validation (--no-verify)')) + return true + } + + let pkg + try { + pkg = require(paths.package) + } catch (e) { + reporter.error(`Failed to load package manifest at ${paths.package}`) + return false + } + + reporter.debug('Validating package...', { pkg, offerFix, noVerify }) + + return await validatePackageExports(pkg, { config, paths, offerFix }) +} diff --git a/cli/src/lib/validators/validatePackageExports.js b/cli/src/lib/validators/validatePackageExports.js new file mode 100644 index 000000000..76663304b --- /dev/null +++ b/cli/src/lib/validators/validatePackageExports.js @@ -0,0 +1,122 @@ +const path = require('path') +const { reporter, prompt } = require('@dhis2/cli-helpers-engine') +const { writeJSON } = require('fs-extra') + +/* + * Ensure that package.main, package.module, and package.exports are valid + */ + +const fixPackage = async (pkg, expectedPackage, { paths }) => { + const newPkg = { + ...pkg, + ...expectedPackage, + exports: { + ...pkg.exports, + ...expectedPackage.exports, + }, + } + + await writeJSON(paths.package, newPkg, { spaces: 4 }) +} + +module.exports.validatePackageExports = async ( + pkg, + { config, paths, offerFix } +) => { + if (config.type !== 'lib' || !config.entryPoints.lib) { + return true + } + + const baseDir = path.dirname(paths.package) + + let valid = true + const entrypointBasename = path.basename(config.entryPoints.lib) + + const expectedESMExport = + './' + + path.relative( + baseDir, + path.join(paths.buildOutput, 'es', entrypointBasename) + ) + const expectedCJSExport = + './' + + path.relative( + baseDir, + path.join(paths.buildOutput, 'cjs', entrypointBasename) + ) + + const expectedPackage = { + main: expectedCJSExport, + module: expectedESMExport, + exports: { + import: expectedESMExport, + require: expectedCJSExport, + }, + } + + const checkField = (field, value, expectedValue) => { + if (!value) { + reporter.warn(`Package.json is missing "${field}" field`) + return false + } + if (Array.isArray(expectedValue) && !expectedValue.includes(value)) { + reporter.warn( + `Invalid "${field}" field in package.json, expected ${expectedValue + .map(option => `"${option}"`) + .join(' or ')} (got "${value}")` + ) + return false + } else if (!Array.isArray(expectedValue) && value !== expectedValue) { + reporter.warn( + `Invalid "${field}" field in package.json, expected "${expectedValue}" (got "${value}")` + ) + return false + } + return true + } + + valid &= checkField('main', pkg.main, expectedCJSExport) + valid &= checkField('module', pkg.module, expectedESMExport) + + if (typeof pkg.exports === 'string') { + valid &= + checkField('pkg.exports', pkg.exports, [ + expectedCJSExport, + expectedESMExport, + ]) || checkField('pkg.exports', pkg.exports, expectedESMExport) + } else if (pkg.exports) { + const exportContext = pkg.exports['.'] || pkg.exports + const fieldPrefix = pkg.exports['.'] + ? 'pkg.exports[.].' + : 'pkg.exports.' + valid &= checkField( + fieldPrefix + 'import', + exportContext.import, + expectedESMExport + ) + valid &= checkField( + fieldPrefix + 'require', + exportContext.require, + expectedCJSExport + ) + } else { + reporter.warn(`Package.json is missing "exports" field`) + valid = false + } + + if (!valid && offerFix) { + const { fix } = await prompt({ + name: 'fix', + type: 'confirm', + message: + 'There are invalid or missing export declarations in package.json, would you like to correct them now?', + }) + + if (!fix) { + return false + } + await fixPackage(pkg, expectedPackage, { paths }) + valid = true + } + return valid +} diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 904aec613..2d6225176 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -15,6 +15,16 @@ For testing purposes, `https://play.dhis2.org/dev` will NOT work because it is c If you have a local instance running with [`d2 cluster`](https://github.com/dhis2/cli/tree/master/packages/cluster), you can specify `http://localhost:8080` in the **Server** field. +## Upgrading to v5.6 (for libraries only) - correcting package.json export declarations + +In `@dhis2/cli-app-scripts` version 5.6.0 library compilation was changed to build each file individually, rather than bundling the entire library into a single `lib.js` file. This change improves the chances that the library can be tree-shaken when built with an application. + +As a result of this change, the name of the main entrypoints built by `d2-app-scripts build` will likely change - instead of `build/es/lib.js` and `build/cjs/lib.js` it will likely be `build/es/index.js` and `build/cjs/index.js` (replace `index.js` with the name of the `lib` entrypoint defined in `d2.config.js`). Since libraries installed through `npm` use the `main`, `module`, and (more recently) `exports` fields in `package.json` to determine where to look for commonjs and ES module entrypoints, this could cause issues if your `package.json` isn't updated. To make this easier, we include strict package validation in the build script. `d2-app-scripts build` will warn you (and fail to build) if the `main`, `module`, or `exports` declarations in your `package.json` don't match what the compiler will output. The build script will also offer to automatically fix the issue, if desired. This should cause builds with a naïvely-upgraded `@dhis2/cli-app-scripts` to "fail fast" when a build is run on CI (rather than silently succeeding and potentially causing an invalid package to be published), while offering a painless way to fix the issue locally. + +> _NOTE_ - it is important, also, to specify `build/es/locales/index.js` and `build/cjs/locales/index.js` in the `sideEffects` array in `package.json`! Without this, the locales for the library might be tree-shaken out of your application's final bundle. This shouldn't be necessary for long (i18n should be improved in v6), but it's important to take into account when upgrading to >= v5.6 + +If you know what you're doing and want to use a different `main`, `module`, or `exports` value, run `d2-app-scripts build --no-verify` to skip this check at build time + --- ## Named Import Compilation Error diff --git a/yarn.lock b/yarn.lock index f06790563..9a86545a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -980,7 +980,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-dynamic-import@^7.8.0", "@babel/plugin-syntax-dynamic-import@^7.8.3": +"@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== @@ -2301,6 +2301,19 @@ update-notifier "^3.0.0" yargs "^13.1.0" +"@dhis2/cli-helpers-engine@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@dhis2/cli-helpers-engine/-/cli-helpers-engine-2.1.1.tgz#34a15866b1bc16ae5c4997d79256ee787b40c11a" + integrity sha512-7HrpYwenDzPFUMRsIuStQRu7SzwVRq6NCy4k8CbZ4/VTFaWnpkncTAz+C8ztkEQQSYTW7mDLLenJ9qpkhXgoTA== + dependencies: + chalk "^3.0.0" + fs-extra "^8.0.1" + inquirer "^7.3.3" + request "^2.88.0" + tar "^4.4.8" + update-notifier "^3.0.0" + yargs "^13.1.0" + "@dhis2/cli-helpers-template@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@dhis2/cli-helpers-template/-/cli-helpers-template-1.0.2.tgz#537904af58f0965e67a5b490fb2737c148ff24d0" @@ -2364,17 +2377,17 @@ dependencies: prop-types "^15" -"@dhis2/ui-constants@5.7.3": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-5.7.3.tgz#6c484133fdb17e0b71ddb6d621c472b510b3093f" - integrity sha512-bs7Y9KPtC/7z9usIUSJxtNqNMGW3f1gZ3tYqGdHnPNknr3RyKPVzgF9VH8r5bNVZUJqSN4EbwtjB2i53EsNHFA== +"@dhis2/ui-constants@5.7.8": + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-5.7.8.tgz#3356de03c5e9ddc0b5fac5087df8ccd97f0dc3c0" + integrity sha512-Ca9PvKP8s0jcWtqLl5tyAyhoy0F6rAohAiLvoJvRmx1M7lXzxwpHjLZnaQ4b1js3tn7BPB7HRdvv+SREqYY+PA== dependencies: "@dhis2/prop-types" "^1.6.4" -"@dhis2/ui-core@5.7.3": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui-core/-/ui-core-5.7.3.tgz#0b20723de22b1ac2ef4a7d9a91bd909573d044a8" - integrity sha512-2kP/D61amgCrr0FZZBTniWLGLCdMlQbQxAC7WCP1NVYufFmIHcjLyRvhGLZbHfqsFppHF0CNiQOxZB6oKI3gvg== +"@dhis2/ui-core@5.7.8": + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui-core/-/ui-core-5.7.8.tgz#063f8a10e583803d8b85d168ddbfb52e1f72750b" + integrity sha512-ijmXT8QlBS6RjHsbPOsBzaAb9j5DOvQeoLkhFo5eQZswavug2gW+S/Vh2tgxfNP8gybZ0tHKaJXeXN3bkg7Xnw== dependencies: "@dhis2/prop-types" "^1.6.4" "@popperjs/core" "^2.5.3" @@ -2382,41 +2395,41 @@ react-popper "^2.2.3" resize-observer-polyfill "^1.5.1" -"@dhis2/ui-forms@5.7.3": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-5.7.3.tgz#cb84339089234d9565654937611fd70dbacdd9c9" - integrity sha512-sKBvolbcffC01+t1krDrA2y8oEmsenkLSFi6AyXmQN8M8YD2x8SECoJILLGUVVaeMXQ81tvgFzfnjh1XZjaI4A== +"@dhis2/ui-forms@5.7.8": + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-5.7.8.tgz#7b4489b796e2a79bebd1a24b8c1df59103e566c0" + integrity sha512-8c7IKJAqGL+IIZ7sjUbTrlwGHFpwX6KfF8eToDxXkkNONyyRIiFo7uVI43+rHii7+WmFwEhacWWjeYhfVBICfg== dependencies: "@dhis2/prop-types" "^1.6.4" classnames "^2.2.6" final-form "^4.20.1" react-final-form "^6.5.1" -"@dhis2/ui-icons@5.7.3": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-5.7.3.tgz#d6df117b0001a405caa874d5f887c4f088bc1357" - integrity sha512-UGBhF41JmVrZcz2Acliv7TCJhTP1tu7zv3iQQgzm9QG4iwXj6sD0veiLgOUwenw12gqPcv0HfErqjigYflyVLw== +"@dhis2/ui-icons@5.7.8": + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-5.7.8.tgz#cb18c1bfbbcf49b2dae4c2b3ff7a3aeff46aa7f2" + integrity sha512-3P/Ptsf6HEdi0q8q6ba4Hcr8yuK+Y29PJn1Z56IZNZ+sZmFYiU7vxk5aMwA+s1EnjcPWQjrdwLzqqBAJE2W3Qg== dependencies: "@dhis2/prop-types" "^1.6.4" -"@dhis2/ui-widgets@5.7.3": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui-widgets/-/ui-widgets-5.7.3.tgz#89fdb5a693968da53cb673df22d27dee7bec8164" - integrity sha512-J5xHpR502/yi+mZl4x19PxlRnFlcparIgICD0FuAhwWazbjWKi2xJr3fcff2kej+qWdPQx+oum2d4UYPfkUOCg== +"@dhis2/ui-widgets@5.7.8": + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui-widgets/-/ui-widgets-5.7.8.tgz#77318381dd92848f9ab2cbc5414a2b57599309fe" + integrity sha512-QVLOdB836uUXBRw4OT6x/z1WR7j2ykxpMyat4g9sOXngj6t9+2UXZUO7Zegudj/HsZjTMDiN9A285zwxsd+khQ== dependencies: "@dhis2/prop-types" "^1.6.4" classnames "^2.2.6" "@dhis2/ui@^5.7.2": - version "5.7.3" - resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-5.7.3.tgz#78c6abdf2482a9ebb487f6d6666111a59f4ebb06" - integrity sha512-MXc9JxTJ5Z9tmDJbzNKsjcTJfvUWkypdTV2fGmaMpx3HInx+w8Y3FhivUrcsFXtpARmG/58YerWwYZaWS0OyBQ== + version "5.7.8" + resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-5.7.8.tgz#17604580d02cd4a7756552154a089e730a0fdf02" + integrity sha512-FHyTP6geAkR/jwX1/xG8yl8PvGaNhms8zUmaNiBLQ0mUmD9oJb47U8YXhJ5nVd0SFJnmuckOWgAWMt3meZGJTA== dependencies: - "@dhis2/ui-constants" "5.7.3" - "@dhis2/ui-core" "5.7.3" - "@dhis2/ui-forms" "5.7.3" - "@dhis2/ui-icons" "5.7.3" - "@dhis2/ui-widgets" "5.7.3" + "@dhis2/ui-constants" "5.7.8" + "@dhis2/ui-core" "5.7.8" + "@dhis2/ui-forms" "5.7.8" + "@dhis2/ui-icons" "5.7.8" + "@dhis2/ui-widgets" "5.7.8" "@eslint/eslintrc@^0.2.1": version "0.2.1" @@ -2858,9 +2871,9 @@ source-map "^0.7.3" "@popperjs/core@^2.5.3": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.5.4.tgz#de25b5da9f727985a3757fd59b5d028aba75841a" - integrity sha512-ZpKr+WTb8zsajqgDkvCEWgp6d5eJT6Q63Ng2neTbzBO76Lbe91vX/iVIW9dikq+Fs3yEo+ls4cxeXABD2LtcbQ== + version "2.7.1" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.7.1.tgz#1231033b163612bee45921ab9566efc4b59449b6" + integrity sha512-XIZz4RLgu+Kzeq5l/YQ/ULd0hKSEXJ8hZg7YdPyxuZDXEkljhCOx6rIZl7FKrbPgZV+usJtro8kuCQ9T8nAEyA== "@rollup/plugin-node-resolve@^7.1.1": version "7.1.3" @@ -3866,11 +3879,6 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -5002,17 +5010,6 @@ chalk@4.1.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -5485,13 +5482,6 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concat-with-sourcemaps@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - concurrently@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.2.0.tgz#ead55121d08a0fc817085584c123cedec2e08975" @@ -5853,18 +5843,6 @@ css-loader@4.3.0: schema-utils "^2.7.1" semver "^7.3.2" -css-modules-loader-core@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" - integrity sha1-WQhmgpShvs0mGuCkziGwtVHyHRY= - dependencies: - icss-replace-symbols "1.1.0" - postcss "6.0.1" - postcss-modules-extract-imports "1.1.0" - postcss-modules-local-by-default "1.2.0" - postcss-modules-scope "1.1.0" - postcss-modules-values "1.3.0" - css-prefers-color-scheme@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4" @@ -5897,15 +5875,6 @@ css-select@^2.0.0: domutils "^1.7.0" nth-check "^1.0.2" -css-selector-tokenizer@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.2.tgz#11e5e27c9a48d90284f22d45061c303d7a25ad87" - integrity sha512-yj856NGuAymN6r8bn8/Jl46pR+OC3eEvAhfGYDUe7YPtTPAYrSSw4oAniZ9Y8T5B92hjhwTBLUen0/vKPxf6pw== - dependencies: - cssesc "^3.0.0" - fastparse "^1.1.2" - regexpu-core "^4.6.0" - css-tree@1.0.0-alpha.37: version "1.0.0-alpha.37" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" @@ -6880,11 +6849,6 @@ escalade@^3.0.2, escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-goat@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" - integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== - escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -6895,7 +6859,7 @@ escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -7536,11 +7500,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fastparse@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" - integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== - fastq@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" @@ -7996,13 +7955,6 @@ gaze@^1.1.3: dependencies: globule "^1.0.0" -generic-names@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" - integrity sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ== - dependencies: - loader-utils "^1.1.0" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -8278,18 +8230,6 @@ harmony-reflect@^1.4.6: resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.1.tgz#c108d4f2bb451efef7a37861fdbdae72c9bdefa9" integrity sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA== -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -8658,11 +8598,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: dependencies: safer-buffer ">= 2.1.2 < 3" -icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - icss-utils@^4.0.0, icss-utils@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" @@ -8709,13 +8644,6 @@ import-cwd@^2.0.0: dependencies: import-from "^2.1.0" -import-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" - integrity sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg== - dependencies: - import-from "^3.0.0" - import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -8739,13 +8667,6 @@ import-from@^2.1.0: dependencies: resolve-from "^3.0.0" -import-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" - import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -9176,13 +9097,6 @@ is-potential-custom-element-name@^1.0.0: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-reference@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" - integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== - dependencies: - "@types/estree" "0.0.39" - is-regex@^1.0.4, is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -10885,7 +10799,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -magic-string@^0.25.0, magic-string@^0.25.2, magic-string@^0.25.7: +magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -11351,11 +11265,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nanoid@^2.1.6: - version "2.1.11" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" - integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== - nanoid@^3.1.15: version "3.1.16" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.16.tgz#b21f0a7d031196faf75314d7c65d36352beeef64" @@ -11775,13 +11684,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -open@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== - dependencies: - is-wsl "^1.1.0" - open@^7.0.2, open@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/open/-/open-7.0.3.tgz#db551a1af9c7ab4c7af664139930826138531c48" @@ -11948,14 +11850,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-queue@^6.3.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.4.0.tgz#5050b379393ea1814d6f9613a654f687d92c0466" - integrity sha512-X7ddxxiQ+bLR/CUt3/BVKrGcJDNxBr0pEEFKHHB6vTPWNUhgDv36GpIH18RmGM3YGPpBT+JWGjDDqsVGuF0ERw== - dependencies: - eventemitter3 "^4.0.0" - p-timeout "^3.1.0" - p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -11968,13 +11862,6 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" -p-timeout@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -12225,11 +12112,6 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" - integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -12537,7 +12419,7 @@ postcss-lab-function@^2.0.1: postcss "^7.0.2" postcss-values-parser "^2.0.0" -postcss-load-config@^2.0.0, postcss-load-config@^2.1.0: +postcss-load-config@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q== @@ -12631,13 +12513,6 @@ postcss-minify-selectors@^4.0.2: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -postcss-modules-extract-imports@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" - integrity sha1-thTJcgvmgW6u41+zpfqh26agXds= - dependencies: - postcss "^6.0.1" - postcss-modules-extract-imports@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" @@ -12645,14 +12520,6 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" -postcss-modules-local-by-default@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - integrity sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk= - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - postcss-modules-local-by-default@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" @@ -12663,14 +12530,6 @@ postcss-modules-local-by-default@^3.0.3: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" -postcss-modules-scope@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - integrity sha1-1upkmUx5+XtipytCb75gVqGUu5A= - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - postcss-modules-scope@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" @@ -12679,14 +12538,6 @@ postcss-modules-scope@^2.2.0: postcss "^7.0.6" postcss-selector-parser "^6.0.0" -postcss-modules-values@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - integrity sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA= - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - postcss-modules-values@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" @@ -12695,17 +12546,6 @@ postcss-modules-values@^3.0.0: icss-utils "^4.0.0" postcss "^7.0.6" -postcss-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-2.0.0.tgz#473d0d7326651d8408585c2a154115d5cb36cce0" - integrity sha512-eqp+Bva+U2cwQO7dECJ8/V+X+uH1HduNeITB0CPPFAu6d/8LKQ32/j+p9rQ2YL1QytVcrNU0X+fBqgGmQIA1Rw== - dependencies: - css-modules-loader-core "^1.1.0" - generic-names "^2.0.1" - lodash.camelcase "^4.3.0" - postcss "^7.0.1" - string-hash "^1.1.1" - postcss-nesting@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-7.0.1.tgz#b50ad7b7f0173e5b5e3880c3501344703e04c052" @@ -13002,15 +12842,6 @@ postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: indexes-of "^1.0.1" uniq "^1.0.1" -postcss@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" - integrity sha1-AA29H47vIXqjaLmiEsX8QLKo8/I= - dependencies: - chalk "^1.1.3" - source-map "^0.5.6" - supports-color "^3.2.3" - postcss@7.0.21: version "7.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" @@ -13020,15 +12851,6 @@ postcss@7.0.21: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^6.0.1: - version "6.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" - integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== - dependencies: - chalk "^2.4.1" - source-map "^0.6.1" - supports-color "^5.4.0" - postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: version "7.0.29" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.29.tgz#d3a903872bd52280b83bce38cdc83ce55c06129e" @@ -13147,11 +12969,6 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -promise.series@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" - integrity sha1-LMfr6Vn8OmYZwEq029yeRS2GS70= - promise@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" @@ -13265,13 +13082,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pupa@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726" - integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== - dependencies: - escape-goat "^2.0.0" - q@^1.1.2, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -13417,10 +13227,10 @@ react-dev-utils@^11.0.0: strip-ansi "6.0.0" text-table "0.2.0" -react-dom@^16.8.6: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" - integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== +react-dom@^16.8, react-dom@^16.8.6: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" + integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -13542,10 +13352,10 @@ react-test-renderer@^16.0.0-0, react-test-renderer@^16.8.6: react-is "^16.8.6" scheduler "^0.19.1" -react@^16.8.6: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" - integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== +react@^16.8, react@^16.8.6: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" + integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -13783,7 +13593,7 @@ regexpp@^3.0.0, regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== -regexpu-core@^4.6.0, regexpu-core@^4.7.0: +regexpu-core@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== @@ -14053,7 +13863,7 @@ resolve@1.18.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1: is-core-module "^2.0.0" path-parse "^1.0.6" -resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.16.0, resolve@^1.3.2, resolve@^1.8.1: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -14142,7 +13952,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-babel@^4.3.2, rollup-plugin-babel@^4.3.3: +rollup-plugin-babel@^4.3.3: version "4.4.0" resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb" integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw== @@ -14150,63 +13960,6 @@ rollup-plugin-babel@^4.3.2, rollup-plugin-babel@^4.3.3: "@babel/helper-module-imports" "^7.0.0" rollup-pluginutils "^2.8.1" -rollup-plugin-commonjs@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb" - integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== - dependencies: - estree-walker "^0.6.1" - is-reference "^1.1.2" - magic-string "^0.25.2" - resolve "^1.11.0" - rollup-pluginutils "^2.8.1" - -rollup-plugin-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e" - integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow== - dependencies: - rollup-pluginutils "^2.5.0" - -rollup-plugin-node-resolve@^5.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - -rollup-plugin-postcss@^2.0.3: - version "2.9.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-2.9.0.tgz#e6ea0a1b8fdc4a49fc0385da58804e332750c282" - integrity sha512-Y7qDwlqjZMBexbB1kRJf+jKIQL8HR6C+ay53YzN+nNJ64hn1PNZfBE3c61hFUhD//zrMwmm7uBW30RuTi+CD0w== - dependencies: - chalk "^4.0.0" - concat-with-sourcemaps "^1.1.0" - cssnano "^4.1.10" - import-cwd "^3.0.0" - p-queue "^6.3.0" - pify "^5.0.0" - postcss "^7.0.27" - postcss-load-config "^2.1.0" - postcss-modules "^2.0.0" - promise.series "^0.2.0" - resolve "^1.16.0" - rollup-pluginutils "^2.8.2" - safe-identifier "^0.4.1" - style-inject "^0.3.0" - -rollup-plugin-replace@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz#f41ae5372e11e7a217cde349c8b5d5fd115e70e3" - integrity sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA== - dependencies: - magic-string "^0.25.2" - rollup-pluginutils "^2.6.0" - rollup-plugin-terser@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz#8c650062c22a8426c64268548957463bf981b413" @@ -14218,26 +13971,14 @@ rollup-plugin-terser@^5.3.1: serialize-javascript "^4.0.0" terser "^4.6.2" -rollup-plugin-visualizer@^3.2.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-3.3.2.tgz#0778ef23785cbdf1d0f8dd8f697b5d211b8ced1e" - integrity sha512-jAJxpC97jHoWU5mQkGw5MroguV8fbZsLPxdV7MdE/fX7lAR+t1UDLpSH41rqdxyJCtqi2/UoDOBuADCyZdHaYA== - dependencies: - mkdirp "^0.5.1" - nanoid "^2.1.6" - open "^6.0.0" - pupa "^2.0.0" - source-map "^0.7.3" - yargs "^15.0.0" - -rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: +rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== dependencies: estree-walker "^0.6.1" -rollup@^1.21.4, rollup@^1.31.1: +rollup@^1.31.1: version "1.32.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4" integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A== @@ -14300,11 +14041,6 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== -safe-identifier@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.1.tgz#b6516bf72594f03142b5f914f4c01842ccb1b678" - integrity sha512-73tOz5TXsq3apuCc3vC8c9QRhhdNZGiBhHmPPjqpH4TO5oCDqk8UIsDcSs/RG6dYcFAkOOva0pqHS3u7hh7XXA== - safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -15001,7 +14737,7 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= -string-hash@1.1.3, string-hash@^1.1.1: +string-hash@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= @@ -15223,11 +14959,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -style-inject@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" - integrity sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== - style-loader@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.3.0.tgz#828b4a3b3b7e7aa5847ce7bae9e874512114249e" @@ -15283,19 +15014,7 @@ stylis@3.5.4: resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -16915,7 +16634,7 @@ yargs@^13.1.0, yargs@^13.3.0, yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.0.0, yargs@^15.1.0, yargs@^15.3.1: +yargs@^15.1.0, yargs@^15.3.1: version "15.3.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==