diff --git a/package.json b/package.json index ffd0705..768adfd 100644 --- a/package.json +++ b/package.json @@ -90,13 +90,10 @@ "@types/jest": "^26.0.14", "@types/lodash": "^4.14.161", "@types/mini-css-extract-plugin": "^0.9.1", - "@types/node": "^14.11.7", - "@types/optimize-css-assets-webpack-plugin": "^5.0.1", + "@types/node": "^14.11.8", "@types/rimraf": "^3.0.0", "@types/sass": "^1.16.0", - "@types/stylelint-webpack-plugin": "^2.1.0", "@types/terser-webpack-plugin": "^4.2.0", - "@types/webpack": "^4.41.22", "@types/webpack-bundle-analyzer": "^3.8.0", "@types/webpack-config-utils": "^2.3.1", "@types/webpack-dev-server": "^3.11.0", @@ -109,34 +106,33 @@ "chalk": "^4.1.0", "child_process": "^1.0.2", "clean-webpack-plugin": "^3.0.0", - "copy-webpack-plugin": "^6.2.0", + "copy-webpack-plugin": "^6.2.1", "css-loader": "^4.3.0", "cssnano": "^4.1.10", "eslint-loader": "^4.0.2", "eslint-plugin-jest": "^24.1.0", "eslint-webpack-plugin": "^2.1.0", - "exports-loader": "^1.1.0", + "exports-loader": "^1.1.1", "extract-loader": "^5.1.0", "figlet": "^1.5.0", - "file-loader": "^6.1.0", + "file-loader": "^6.1.1", "imports-loader": "^1.2.0", "jest": "^26.5.2", "jest-fetch-mock": "^3.0.3", "jest-mock-console": "^1.0.1", "jest-mock-process": "^1.4.0", "lodash": "^4.17.20", - "mini-css-extract-plugin": "^0.12.0", - "optimize-css-assets-webpack-plugin": "^5.0.4", - "postcss-loader": "^4.0.3", + "mini-css-extract-plugin": "^1.0.0", + "postcss-loader": "^4.0.4", "rimraf": "^3.0.2", "sass": "^1.27.0", - "sass-loader": "^10.0.2", - "style-loader": "^1.3.0", + "sass-loader": "^10.0.3", + "style-loader": "^2.0.0", "stylelint": "^13.7.2", "stylelint-webpack-plugin": "^2.1.0", "terser-webpack-plugin": "^4.2.3", "ts-jest": "^26.4.1", - "webpack": "5.0.0-rc.4", + "webpack": "5.0.0", "webpack-bundle-analyzer": "^3.9.0", "webpack-config-utils": "^2.3.1", "webpack-dev-server": "^3.11.0", @@ -153,18 +149,21 @@ "@typescript-eslint/eslint-plugin": "^4.4.0", "@typescript-eslint/parser": "^4.4.0", "cross-env": "^7.0.2", - "eslint": "^7.10.0", + "eslint": "^7.11.0", "eslint-plugin-import": "^2.22.1", "husky": "^4.3.0", "memfs": "^3.2.0", "mock-fs": "^4.13.0", + "ts-node": "^9.0.0", "ttypescript": "^1.5.12", "typescript": "^4.0.3", "typescript-transform-paths": "^2.0.1" }, "peerDependencies": { - "eslint": "*", - "stylelint": "*", - "webpack": "*" + "@babel/core": "^7.11.0", + "eslint": "^7.0.0", + "postcss": "^7.0.0 || ^8.0.1", + "stylelint": "^13.0.0", + "webpack": "^5.0.0" } } diff --git a/src/bin/cli-service.ts b/src/bin/cli-service.ts index 06d6764..716d995 100644 --- a/src/bin/cli-service.ts +++ b/src/bin/cli-service.ts @@ -122,8 +122,6 @@ executeHook(Hook.COMPILER_READY, HookType.AFTER, args) if (args.watch) { const devServer = new WebpackDevServer( - // TODO: Remove this when fixed - // @ts-expect-error it appears 'webpack-dev-server' and the 'webpack' @types are no compatible at this time. Check again soon! webpackInstance, createConfig(webpackConfiguration, { ...args, diff --git a/src/config.ts b/src/config.ts index b81591d..7e0aea8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -88,6 +88,7 @@ export const mergeStrategy: { [key: string]: CustomizeRule } = { 'devServer.proxy' : CustomizeRule.Prepend, 'module.rules' : CustomizeRule.Append, 'plugins' : CustomizeRule.Append, + 'target' : CustomizeRule.Replace, } /** @@ -177,7 +178,7 @@ export function setupEnvironment(env: WebpackParserOptions, flags: CommandLineFl eslint : flags.eslint ?? (env.eslint || false), hmr : env.watch === true, - mode : env.dev === true ? 'development' : 'production', + mode : env.prod === true ? 'production' : 'development', project : env.project as string, stylelint : flags.stylelint ?? (env.stylelint || false), } as Environment diff --git a/src/plugins/defaults.ts b/src/plugins/defaults.ts index e983b93..53afcc5 100644 --- a/src/plugins/defaults.ts +++ b/src/plugins/defaults.ts @@ -30,12 +30,12 @@ import ComposeMessages from '@/plugins/messages' export default (paths: RuntimePaths): webpack.WebpackPluginInstance[] => { const cssExtractPath = paths.out as string || 'clientlibs-header/css' - // TODO: Remove this when fixed - // @ts-expect-error some plugins haven't been updated with webpack 5 defintions so their exports are mismatched - return removeEmpty([ + return removeEmpty([ getIfUtilsInstance().ifNotWatch(new ComposeMessages()), - getIfUtilsInstance().ifNotMaven(new webpack.ProgressPlugin({})), + getIfUtilsInstance().ifNotMaven(new webpack.ProgressPlugin({ + percentBy: 'entries', + })), /** * Copies static assets from our source folder into the public structure for AEM. @@ -120,5 +120,5 @@ export default (paths: RuntimePaths): webpack.WebpackPluginInstance[] => { openAnalyzer: false, })), - ]) + ]) as webpack.WebpackPluginInstance[] } diff --git a/src/runtime.spec.ts b/src/runtime.spec.ts index d6571cd..4b9f002 100644 --- a/src/runtime.spec.ts +++ b/src/runtime.spec.ts @@ -1,6 +1,7 @@ import path from 'path' import mockConsole, { RestoreConsole } from 'jest-mock-console' import mockFS from 'mock-fs' +import { mockProcessExit } from 'jest-mock-process' import { createFsFromVolume, IFs, Volume } from 'memfs' import webpack from 'webpack' @@ -35,12 +36,17 @@ describe('runtime', () => { }, }) - let memoryFileSystem: IFs let restoreConsoleMock: RestoreConsole beforeAll(() => { const mockedFileSystem = { - // aemdesign/compose-webpack package.json + // .browserslistrc + [resolve('.browserslistrc')]: JSON.stringify(['defaults']), + + // src/runtime.ts + // [resolve('src/runtime.ts')]: 'webpack caching', + + // @aemdesign/compose-webpack package.json [resolve('node_modules/@aem-design/compose-webpack/package.json')]: JSON.stringify({ version: '0.0.0-mock.0' }), @@ -65,7 +71,6 @@ describe('runtime', () => { }) beforeEach(() => { - memoryFileSystem = createFsFromVolume(new Volume) restoreConsoleMock = mockConsole() }) @@ -129,60 +134,118 @@ describe('runtime', () => { project : 'mock', }) + expect(config.mode).toStrictEqual('production') + expect(config.output.chunkFilename).toContain('[contenthash:8]') }) - test('can compile es6 javascript entry', async (done) => { - const config = configuration(composeConfiguration({ - standard: { - projects: { - 'mock': { - entryFile : 'basic-es6.js', - outputName : 'mock', + describe('webpack compile', () => { + test('can compile es6 javascript entry', async (done) => { + const memoryFileSystem = createFsFromVolume(new Volume) + const mockExit = mockProcessExit() + + const config = configuration(composeConfiguration({ + standard: { + projects: { + 'mock': { + entryFile : 'basic-es6.js', + outputName : 'mock', + }, }, }, - }, - }), { project: 'mock' }) - const compiler = webpack(config) + webpack: { + target: ['browserslist'], + }, + }), { project: 'mock' }) - // @ts-expect-error known that the webpack type and 'memory-fs' aren't compatible - compiler.outputFileSystem = memoryFileSystem + const compiler = webpack(config) - const stats = await compile(compiler) + // @ts-expect-error known that the webpack type and 'memfs' aren't compatible + compiler.outputFileSystem = memoryFileSystem - expect(stats.hasErrors()).toBe(false) + const stats = await compile(compiler) - const fileSystemOutput = memoryFileSystem.readdirSync('public/mock/clientlibs-footer/js') + expect(mockExit).toHaveBeenCalledTimes(0) - expect(fileSystemOutput).toHaveLength(1) - expect(fileSystemOutput).toStrictEqual(['mock.js']) + expect(stats.hasErrors()).toBe(false) - done() - }) + const fileSystemOutput = memoryFileSystem.readdirSync('public/mock/clientlibs-footer/js') - test('error is thrown when disallowed webpack prop is set', () => { - const config = () => configuration({ - ...standardComposeConfiguration, + expect(memoryFileSystem.readFileSync('public/mock/clientlibs-footer/js/mock.js').toString()) + .toContain("const foo = 'bar';\\nconsole.log(foo);") - webpack: { - // @ts-expect-error used to prove disallowed webpack props throw an error - entry: 'foo', - }, - }, { project: 'mock' }) + expect(fileSystemOutput).toHaveLength(1) + expect(fileSystemOutput).toStrictEqual(['mock.js']) + + done() + }) + + test('can compile es6 javascript entry for production', async (done) => { + const memoryFileSystem = createFsFromVolume(new Volume) + const mockExit = mockProcessExit() + + const config = configuration(composeConfiguration({ + standard: { + projects: { + 'mock': { + entryFile : 'basic-es6.js', + outputName : 'mock', + }, + }, + }, + + webpack: { + target: ['browserslist'], + }, + }), { + dev : false, + prod : true, + project : 'mock', + }) - expect(config).toThrowError('Forbidden webpack property detected (entry)') + const compiler = webpack(config) + + // @ts-expect-error known that the webpack type and 'memfs' aren't compatible + compiler.outputFileSystem = memoryFileSystem + + const stats = await compile(compiler) + + expect(mockExit).toHaveBeenCalledTimes(0) + + expect(stats.hasErrors()).toBe(false) + + expect(memoryFileSystem.readFileSync('public/mock/clientlibs-footer/js/mock.js').toString()) + .toStrictEqual('(()=>{const e=new Set;e.add("foo"),document.querySelector("body").classList.add("bar"),document.querySelector("body").innerHTML="Bar size: "+e.size})();') + + done() + }) }) - test('error is thrown when pom configuration is invalid', () => { - setConfiguration(ConfigurationType.MAVEN_PROJECT, resolve('pom.invalid.xml')) + describe('error handling', () => { + test('error is thrown when disallowed webpack prop is set', () => { + const config = () => configuration({ + ...standardComposeConfiguration, - const config = () => configuration(standardComposeConfiguration, { - project: 'mock', + webpack: { + // @ts-expect-error used to prove disallowed webpack props throw an error + devtool: 'foo', + }, + }, { project: 'mock' }) + + expect(config).toThrowError('Forbidden webpack property detected (devtool)') }) - expect(config) - .toThrowError('Unable to continue due to missing or invalid Maven configuration values!') + test('error is thrown when pom configuration is invalid', () => { + setConfiguration(ConfigurationType.MAVEN_PROJECT, resolve('pom.invalid.xml')) + + const config = () => configuration(standardComposeConfiguration, { + project: 'mock', + }) + + expect(config) + .toThrowError('Unable to continue due to missing or invalid Maven configuration values!') + }) }) afterEach(() => { diff --git a/src/runtime.ts b/src/runtime.ts index 546dd9a..2bc8e3a 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -14,7 +14,6 @@ import { } from 'webpack-merge' import MiniCssExtractPlugin from 'mini-css-extract-plugin' -import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin' import TerserPlugin from 'terser-webpack-plugin' import { logger } from '@aem-design/compose-support' @@ -249,10 +248,11 @@ export default ( customizeArray : customizeArray(mergeStrategy), customizeObject : customizeObject(mergeStrategy), })({ - context: paths.src, - devtool: getIfUtilsInstance().ifDev(flagHMR ? 'cheap-module-source-map' : 'eval-cheap-module-source-map'), + context : paths.src, + devtool : getIfUtilsInstance().ifDev(flagHMR ? 'cheap-module-source-map' : 'eval-cheap-module-source-map'), entry, mode, + target : ['browserslist', 'web'], output: { chunkFilename : `${paths.out as string || 'clientlibs-footer'}/resources/chunks/[name]${flagProd ? '.[contenthash:8]' : ''}.js`, @@ -262,7 +262,7 @@ export default ( }, performance: { - assetFilter : (assetFilename) => !new RegExp(getConfigurable('assetFilters').join('|')).test(assetFilename), + assetFilter : (assetFilename: string) => !new RegExp(getConfigurable('assetFilters').join('|')).test(assetFilename), hints : getIfUtilsInstance().ifDev(false, 'warning'), maxAssetSize : 300000, maxEntrypointSize : 300000, @@ -311,10 +311,10 @@ export default ( }, optimization: { - moduleIds: 'deterministic', + chunkIds : 'deterministic', + moduleIds : 'deterministic', minimizer: [ - // TODO: Remove this when fixed // @ts-expect-error 'webpack-dev-server' incorrectly taking over the exported 'Plugin' type new TerserPlugin({ cache : true, @@ -336,21 +336,6 @@ export default ( }, }, }), - - // TODO: Remove this when fixed - // @ts-expect-error 'webpack-dev-server' incorrectly taking over the exported 'Plugin' type - new OptimizeCSSAssetsPlugin({ - canPrint : true, - cssProcessor : require('cssnano'), - - cssProcessorPluginOptions: { - preset: ['default', { - discardComments: { - removeAll: true, - }, - }], - }, - }), ], splitChunks: { @@ -370,6 +355,7 @@ export default ( // dependencies which aren't anything to do with our script. modules: [ relative(__dirname, resolve(process.cwd(), 'node_modules')), + relative(__dirname, resolve(process.cwd(), '../node_modules')), // Useful for Yarn workspaces 'node_modules', ], }, diff --git a/src/support/helpers.ts b/src/support/helpers.ts index 34bf68d..063058c 100644 --- a/src/support/helpers.ts +++ b/src/support/helpers.ts @@ -105,11 +105,7 @@ export function getMavenConfigurationValueByPath({ fallback, parser, path: pr * Create an if utilities instance. */ export function getIfUtilsInstance(): ComposeIfUtils { - if (!ifUtilsInstance) { - ifUtilsInstance = getIfUtils(environment, envVars) as ComposeIfUtils - } - - return ifUtilsInstance + return getIfUtils(environment, envVars) as ComposeIfUtils } /** diff --git a/src/types/enums.ts b/src/types/enums.ts index fcba975..eec6afa 100644 --- a/src/types/enums.ts +++ b/src/types/enums.ts @@ -31,7 +31,6 @@ export enum DependencyType { export enum WebpackIgnoredProps { 'devtool', 'devServer.contentBase', - 'entry', 'mode', 'name', 'optimization.splitChunks.cacheGroups.vue', diff --git a/test/fixtures/mock/basic-es6.js b/test/fixtures/mock/basic-es6.js index 1d81d7e..c092839 100644 --- a/test/fixtures/mock/basic-es6.js +++ b/test/fixtures/mock/basic-es6.js @@ -1,3 +1,11 @@ const foo = 'bar' console.log(foo) + +const bar = new Set() +bar.add('foo') + +console.log(bar) + +document.querySelector('body').classList.add(foo) +document.querySelector('body').innerHTML = `Bar size: ${bar.size}` diff --git a/test/helpers/configuration.ts b/test/helpers/configuration.ts index 981893b..839f7e4 100644 --- a/test/helpers/configuration.ts +++ b/test/helpers/configuration.ts @@ -1,3 +1,5 @@ +import _merge from 'lodash/merge' + import { ComposeConfiguration, RuntimeConfiguration, @@ -10,7 +12,7 @@ import { import runtime from '@/runtime' export function composeConfiguration(config: Partial): Partial { - return { + return _merge({ standard: { mergeProjects: false, }, @@ -18,9 +20,7 @@ export function composeConfiguration(config: Partial): Par webpack: { context: process.cwd(), }, - - ...config, - } + }, config) } export default ( @@ -28,7 +28,7 @@ export default ( env: WebpackParserOptions, ): Required => runtime( configuration, - { + _merge({ aem: { port: false, }, @@ -36,7 +36,5 @@ export default ( clean : false, dev : true, maven : true, - - ...env, - }, + }, env), )() as Required diff --git a/yarn.lock b/yarn.lock index 05566d7..aa8e37c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1777,23 +1777,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.13.tgz#ee1128e881b874c371374c1f72201893616417c9" integrity sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA== -"@types/node@^14.11.7": - version "14.11.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.7.tgz#4d9673b8331ce262628ea89d9ef3964b6c1e5489" - integrity sha512-hSEXknS4KiayUdZ7401J/T6eykXHJkDEipnyQMJ4/GstK4kWjbHnwXlcpvIWfPKiEH1JU96DkbzJ1nHRmpmKLw== +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/optimize-css-assets-webpack-plugin@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@types/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.1.tgz#1f437ef9ef937b393687a8819be2d2fddc03b069" - integrity sha512-qyi5xmSl+DTmLFtVtelhso3VnNQYxltfgMa+Ed02xqNZCZBD0uYR6i64FmcwfieDzZRdwkJxt9o2JHq/5PBKQg== - dependencies: - "@types/webpack" "*" - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -1857,13 +1850,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/stylelint-webpack-plugin@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/stylelint-webpack-plugin/-/stylelint-webpack-plugin-2.1.0.tgz#2d07e8c9dee4c34355372e44ffdcffc45111b137" - integrity sha512-yNCBkjgglLZ6+IAwNF/WjgcPR0lHumn2URBt5hAcjxdUvm+2eY+fSz2IzBt6iJGGZ8E56hofg6mUGdU9QaRmjg== - dependencies: - stylelint-webpack-plugin "*" - "@types/tapable@*": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.5.tgz#9adbc12950582aa65ead76bffdf39fe0c27a3c02" @@ -1945,18 +1931,6 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@types/webpack@^4.41.22": - version "4.41.22" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.22.tgz#ff9758a17c6bd499e459b91e78539848c32d0731" - integrity sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ== - dependencies: - "@types/anymatch" "*" - "@types/node" "*" - "@types/tapable" "*" - "@types/uglify-js" "*" - "@types/webpack-sources" "*" - source-map "^0.6.0" - "@types/xml2js@^0.4.5": version "0.4.5" resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.4.5.tgz#d21759b056f282d9c7066f15bbf5c19b908f22fa" @@ -2465,6 +2439,11 @@ anymatch@^3.0.3, anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3955,10 +3934,10 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-webpack-plugin@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.2.0.tgz#dacd3f9b6e51e82132a12fa37410af35ecef0c9e" - integrity sha512-1s/VbhIX73FBFBYF4D0KdeBLkjEnAlCQn0Ufo2a/IyJ41jHpQ9ZzM4JAfbE7yTOhbmwRFkARErJ/XIiLceja6Q== +copy-webpack-plugin@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.2.1.tgz#8015e4d5c5e637ab7b39c76daa9e03c7a4bf1ae5" + integrity sha512-VH2ZTMIBsx4p++Lmpg77adZ0KUyM5gFR/9cuTrbneNnJlcQXUFvsNariPqq2dq2kV3F2skHiDGPQCyKWy1+U0Q== dependencies: cacache "^15.0.5" fast-glob "^3.2.4" @@ -3968,7 +3947,7 @@ copy-webpack-plugin@^6.2.0: loader-utils "^2.0.0" normalize-path "^3.0.0" p-limit "^3.0.2" - schema-utils "^2.7.1" + schema-utils "^3.0.0" serialize-javascript "^5.0.1" webpack-sources "^1.4.3" @@ -4389,6 +4368,11 @@ diff-sequences@^26.5.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -4848,10 +4832,10 @@ eslint-webpack-plugin@^2.1.0: micromatch "^4.0.2" schema-utils "^2.7.0" -eslint@^7.10.0: - version "7.10.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.10.0.tgz#494edb3e4750fb791133ca379e786a8f648c72b9" - integrity sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA== +eslint@^7.11.0: + version "7.11.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.11.0.tgz#aaf2d23a0b5f1d652a08edacea0c19f7fadc0b3b" + integrity sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.1.3" @@ -4863,7 +4847,7 @@ eslint@^7.10.0: enquirer "^2.3.5" eslint-scope "^5.1.1" eslint-utils "^2.1.0" - eslint-visitor-keys "^1.3.0" + eslint-visitor-keys "^2.0.0" espree "^7.3.0" esquery "^1.2.0" esutils "^2.0.2" @@ -5038,13 +5022,13 @@ expect@^26.5.2: jest-message-util "^26.5.2" jest-regex-util "^26.0.0" -exports-loader@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-1.1.0.tgz#26a16706e4cf533145de24c1419baf33b624fb5c" - integrity sha512-zGB2SujiAyO0Rwn4GQ17/HlT8cwmT8abcBeZpr2R3sItJ5sI5Y9BzNzus3H9tH1iWLAoJLi9N3TP54D2+j859Q== +exports-loader@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-1.1.1.tgz#88c9a6877ee6a5519d7c41a016bdd99148421e69" + integrity sha512-CmyhIR2sJ3KOfVsHjsR0Yvo+0lhRhRMAevCbB8dhTVLHsZPs0lCQTvRmR9YNvBXDBxUuhmCE2f54KqEjZUaFrg== dependencies: loader-utils "^2.0.0" - schema-utils "^2.7.0" + schema-utils "^3.0.0" source-map "^0.6.1" express@^4.16.3, express@^4.17.1: @@ -5224,13 +5208,13 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-loader@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.1.0.tgz#65b9fcfb0ea7f65a234a1f10cdd7f1ab9a33f253" - integrity sha512-26qPdHyTsArQ6gU4P1HJbAbnFTyT2r0pG7czh1GFAd9TZbj0n94wWbupgixZH/ET/meqi2/5+F7DhW4OAXD+Lg== +file-loader@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.1.1.tgz#a6f29dfb3f5933a1c350b2dbaa20ac5be0539baa" + integrity sha512-Klt8C4BjWSXYQAfhpYYkG4qHNTna4toMHEbWrI5IuVoxbU6uiDKeKAP99R8mmbJi3lvewn/jQBOgU4+NS3tDQw== dependencies: loader-utils "^2.0.0" - schema-utils "^2.7.1" + schema-utils "^3.0.0" file-uri-to-path@1.0.0: version "1.0.0" @@ -7033,11 +7017,6 @@ kleur@^3.0.0, kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -klona@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.3.tgz#98274552c513583ad7a01456a789a2a0b4a2a538" - integrity sha512-CgPOT3ZadDpXxKcfV56lEQ9OQSZ42Mk26gnozI+uN/k39vzD8toUhRQoqsX0m9Q3eMPEfsLWmtyUpK/yqST4yg== - klona@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" @@ -7048,14 +7027,6 @@ known-css-properties@^0.19.0: resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.19.0.tgz#5d92b7fa16c72d971bda9b7fe295bdf61836ee5b" integrity sha512-eYboRV94Vco725nKMlpkn3nV2+96p9c3gKXRsYqAJSswSENvBhN7n5L+uDhY58xQa0UukWsDMTGELzmD8Q+wTA== -last-call-webpack-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz#9742df0e10e3cf46e5c0381c2de90d3a7a2d7555" - integrity sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w== - dependencies: - lodash "^4.17.5" - webpack-sources "^1.1.0" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -7180,7 +7151,7 @@ lodash.upperfirst@4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= -lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4: version "4.17.19" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== @@ -7236,7 +7207,7 @@ make-dir@^3.0.0, make-dir@^3.0.2: dependencies: semver "^6.0.0" -make-error@1.x: +make-error@1.x, make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -7420,14 +7391,14 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= -mini-css-extract-plugin@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.12.0.tgz#ddeb74fd6304ca9f99c1db74acc7d5b507705454" - integrity sha512-z6PQCe9rd1XUwZ8gMaEVwwRyZlrYy8Ba1gRjFP5HcV51HkXX+XlwZ+a1iAYTjSYwgNBXoNR7mhx79mDpOn5fdw== +mini-css-extract-plugin@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.0.0.tgz#4afb39f3d97b1b92eacb1ac45025416089f831bd" + integrity sha512-IsmrPv1nkdSUtFCDrAsuv5kg0k/27sLxfXqSz8vLjnbRKrNgoRdQrUNA4MppawvD+GHLkNP6L1P93Bw50ALkbg== dependencies: - loader-utils "^1.1.0" + loader-utils "^2.0.0" normalize-url "1.9.1" - schema-utils "^1.0.0" + schema-utils "^3.0.0" webpack-sources "^1.1.0" minimalistic-assert@^1.0.0: @@ -7848,14 +7819,6 @@ opn@^5.5.0: dependencies: is-wsl "^1.1.0" -optimize-css-assets-webpack-plugin@^5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.4.tgz#85883c6528aaa02e30bbad9908c92926bb52dc90" - integrity sha512-wqd6FdI2a5/FdoiCNNkEvLeA//lHHfG24Ln2Xm2qqdIk4aOlsR18jwpyOihqQ8849W3qu2DX8fOYxpvTMj+93A== - dependencies: - cssnano "^4.1.10" - last-call-webpack-plugin "^3.0.0" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -8259,15 +8222,15 @@ postcss-less@^3.1.4: dependencies: postcss "^7.0.14" -postcss-loader@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.0.3.tgz#337f51bbdfb02269fb42f7db9fc7f0a93c1b2e3f" - integrity sha512-jHboC/AOnJLPu8/974hODCJ/rNAa2YhhJOclUeuRlAmFpKmEcBY6az8y1ejHyYc2LThzPl8qPRekh2Yz3CiRKA== +postcss-loader@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.0.4.tgz#b2d005b52e008a44991cf8123bee207e635eb53e" + integrity sha512-pntA9zIR14drQo84yGTjQJg1m7T0DkXR4vXYHBngiRZdJtEeCrojL6lOpqUanMzG375lIJbT4Yug85zC/AJWGw== dependencies: cosmiconfig "^7.0.0" klona "^2.0.4" loader-utils "^2.0.0" - schema-utils "^2.7.1" + schema-utils "^3.0.0" semver "^7.3.2" postcss-media-query-parser@^0.2.3: @@ -9208,15 +9171,15 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sass-loader@^10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.0.2.tgz#c7b73010848b264792dd45372eea0b87cba4401e" - integrity sha512-wV6NDUVB8/iEYMalV/+139+vl2LaRFlZGEd5/xmdcdzQcgmis+npyco6NsDTVOlNA3y2NV9Gcz+vHyFMIT+ffg== +sass-loader@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.0.3.tgz#9e2f1bfdd6355f2adde4e4835d838b020bf800b0" + integrity sha512-W4+FV5oUdYy0PnC11ZoPrcAexODgDCa3ngxoy5X5qBhZYoPz9FPjb6Oox8Aa0ZYEyx34k8AQfOVuvqefOSAAUQ== dependencies: - klona "^2.0.3" + klona "^2.0.4" loader-utils "^2.0.0" neo-async "^2.6.2" - schema-utils "^2.7.1" + schema-utils "^3.0.0" semver "^7.3.2" sass@^1.27.0: @@ -9552,7 +9515,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19: +source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -9856,13 +9819,13 @@ strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -style-loader@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.3.0.tgz#828b4a3b3b7e7aa5847ce7bae9e874512114249e" - integrity sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q== +style-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" + integrity sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ== dependencies: loader-utils "^2.0.0" - schema-utils "^2.7.0" + schema-utils "^3.0.0" style-search@^0.1.0: version "0.1.0" @@ -9878,7 +9841,7 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -stylelint-webpack-plugin@*, stylelint-webpack-plugin@^2.1.0: +stylelint-webpack-plugin@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/stylelint-webpack-plugin/-/stylelint-webpack-plugin-2.1.0.tgz#ea4727d83a6d5e3c8784f2bb147bbd9de8e88ec3" integrity sha512-nx6pF+s4kWuXj2pAhPiMjAsRZqsPphamy2rwUuPiKmb1FRYtXZL0jl+iwoqc/W3hMaia+UMiGJBzkjXKLXmSmA== @@ -10265,6 +10228,17 @@ ts-jest@^26.4.1: semver "7.x" yargs-parser "20.x" +ts-node@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" + integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + tsconfig-paths@^3.9.0: version "3.9.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" @@ -10819,10 +10793,10 @@ webpack-sources@^2.0.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@5.0.0-rc.4: - version "5.0.0-rc.4" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-rc.4.tgz#713b5431414610a3719252f07c78a64acc31470a" - integrity sha512-xR10QF2UkPAOsy1Eqm59QPX1C5huX3+u9N3KIdpSxtKhyz7+w/eyL8KKDLqfPaOAcp6Lou7oaO1Nd1t4qv9e5w== +webpack@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0.tgz#c028b2f0c1db2322de1f4a30cc36f6e373d5a26a" + integrity sha512-OK+Q9xGgda3idw/DgCf75XsVFxRLPu48qPwygqI3W9ls5sDdKif5Ay4SM/1UVob0w4juJy14Zv9nNv0WeyV0aA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.45" @@ -11105,3 +11079,8 @@ yargs@^16.0.3: string-width "^4.2.0" y18n "^5.0.1" yargs-parser "^20.0.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==