From ede728c7a1e8ca84940b580917b80cfd2eaf5b33 Mon Sep 17 00:00:00 2001 From: ismay <7355199+ismay@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:11:30 +0200 Subject: [PATCH] ci: replace semantic commit checks with new workflow (#715) * ci: replace semantic commit checks with new workflow * style: fix prettier errors * style: fix linting errors --- .github/semantic.yml | 4 - .github/workflows/dhis2-verify-commits.yml | 32 + adapter/src/components/Alerts.js | 6 +- adapter/src/components/ErrorBoundary.js | 4 +- adapter/src/components/LoginModal.js | 14 +- adapter/src/components/PWAUpdateManager.js | 4 +- .../src/components/ServerVersionProvider.js | 6 +- .../__tests__/ErrorBoundary.test.js | 2 +- adapter/src/index.js | 4 +- adapter/src/utils/api.js | 6 +- adapter/src/utils/parseServerVersion.js | 2 +- adapter/src/utils/useLocale.js | 6 +- adapter/src/utils/useVerifyLatestUser.js | 2 +- cli/config/makeBabelConfig.js | 2 +- cli/src/commands/clean.js | 2 +- cli/src/commands/deploy.js | 6 +- cli/src/commands/init.js | 12 +- cli/src/commands/pack.js | 4 +- cli/src/commands/publish.js | 16 +- cli/src/index.js | 2 +- cli/src/lib/compiler/compile.js | 6 +- cli/src/lib/compiler/entrypoints.js | 2 +- cli/src/lib/compiler/entrypoints.test.js | 6 +- cli/src/lib/compiler/extensionHelpers.js | 2 +- cli/src/lib/finalArchivePath.js | 2 +- cli/src/lib/generateManifests.js | 6 +- cli/src/lib/i18n/extract.js | 4 +- cli/src/lib/i18n/generate.js | 8 +- cli/src/lib/i18n/helpers.js | 4 +- cli/src/lib/loadEnvFiles.js | 2 +- cli/src/lib/makeBundle.js | 2 +- cli/src/lib/parseConfig.js | 8 +- cli/src/lib/paths.js | 2 +- cli/src/lib/proxy.js | 12 +- cli/src/lib/proxy.test.js | 2 +- cli/src/lib/publishVersion.js | 2 +- cli/src/lib/pwa/compileServiceWorker.js | 2 +- cli/src/lib/pwa/getPWAEnvVars.js | 2 +- cli/src/lib/pwa/injectPrecacheManifest.js | 2 +- cli/src/lib/shell/bootstrap.js | 4 +- cli/src/lib/shell/env.js | 6 +- cli/src/lib/validators/validateLockfile.js | 2 +- .../lib/validators/validateLockfile.test.js | 2 +- .../lib/validators/validatePackageExports.js | 2 +- cli/src/lib/yarnDeduplicate.js | 12 +- examples/pwa-app/src/App.js | 2 +- examples/pwa-app/src/App.test.js | 2 +- .../pwa-app/src/components/SectionWrapper.js | 2 +- .../src/components/VisualizationsList.js | 6 +- examples/simple-app/src/Alerter.js | 2 +- examples/simple-app/src/App.js | 4 +- package.json | 2 +- pwa/src/lib/registration.js | 12 +- .../offline-interface/offline-interface.js | 16 +- pwa/src/service-worker/recording-mode.js | 22 +- pwa/src/service-worker/service-worker.js | 18 +- pwa/src/service-worker/utils.js | 20 +- shell/public/service-worker.js | 4 +- shell/src/App.test.js | 2 +- shell/src/index.js | 2 +- yarn.lock | 672 ++++++++++++++---- 61 files changed, 713 insertions(+), 315 deletions(-) delete mode 100644 .github/semantic.yml create mode 100644 .github/workflows/dhis2-verify-commits.yml diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index 756b8b5aa..000000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,4 +0,0 @@ -titleOnly: true -commitsOnly: false -titleAndCommits: false -allowMergeCommits: false diff --git a/.github/workflows/dhis2-verify-commits.yml b/.github/workflows/dhis2-verify-commits.yml new file mode 100644 index 000000000..ae7831b56 --- /dev/null +++ b/.github/workflows/dhis2-verify-commits.yml @@ -0,0 +1,32 @@ +name: 'dhis2: verify (commits)' + +on: + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] + +jobs: + lint-pr-title: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: JulienKode/pull-request-name-linter-action@v0.5.0 + with: + configuration-path: ${{ steps.commitlint.outputs.config_path }} + + lint-commits: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: ${{ steps.commitlint.outputs.config_path }} diff --git a/adapter/src/components/Alerts.js b/adapter/src/components/Alerts.js index 5ffde7bb8..d7cb04444 100644 --- a/adapter/src/components/Alerts.js +++ b/adapter/src/components/Alerts.js @@ -17,10 +17,10 @@ import React, { useState, useEffect } from 'react' const Alerts = () => { const alertManagerAlerts = useAlerts() const [alertStackAlerts, setAlertStackAlerts] = useState(alertManagerAlerts) - const removeAlertStackAlert = id => + const removeAlertStackAlert = (id) => setAlertStackAlerts( alertStackAlerts.filter( - alertStackAlert => alertStackAlert.id !== id + (alertStackAlert) => alertStackAlert.id !== id ) ) @@ -42,7 +42,7 @@ const Alerts = () => { onHidden={() => { onHidden && onHidden() removeAlertStackAlert(id) - if (alertManagerAlerts.some(a => a.id === id)) { + if (alertManagerAlerts.some((a) => a.id === id)) { remove() } }} diff --git a/adapter/src/components/ErrorBoundary.js b/adapter/src/components/ErrorBoundary.js index fdf314868..36d7ce92d 100644 --- a/adapter/src/components/ErrorBoundary.js +++ b/adapter/src/components/ErrorBoundary.js @@ -2,8 +2,8 @@ import i18n from '@dhis2/d2-i18n' import cx from 'classnames' import PropTypes from 'prop-types' import React, { Component } from 'react' -import buttonStyles from './styles/Button.style' -import styles from './styles/ErrorBoundary.style' +import buttonStyles from './styles/Button.style.js' +import styles from './styles/ErrorBoundary.style.js' // In order to avoid using @dhis2/ui components in the error boundary - as anything // that breaks within it will not be caught properly - we define a component diff --git a/adapter/src/components/LoginModal.js b/adapter/src/components/LoginModal.js index d26d1ce02..cb5c2d136 100644 --- a/adapter/src/components/LoginModal.js +++ b/adapter/src/components/LoginModal.js @@ -7,8 +7,8 @@ import { InputField, } from '@dhis2/ui' import React, { useState } from 'react' -import i18n from '../locales' -import { post } from '../utils/api' +import i18n from '../locales/index.js' +import { post } from '../utils/api.js' const staticUrl = process.env.REACT_APP_DHIS2_BASE_URL @@ -20,9 +20,9 @@ export const LoginModal = () => { const [password, setPassword] = useState('') const [isDirty, setIsDirty] = useState(false) - const isValid = val => val && val.length >= 2 + const isValid = (val) => val && val.length >= 2 - const onSubmit = async e => { + const onSubmit = async (e) => { e.preventDefault() setIsDirty(true) if (isValid(server) && isValid(username) && isValid(password)) { @@ -61,7 +61,7 @@ export const LoginModal = () => { name="server" type="text" value={server} - onChange={input => setServer(input.value)} + onChange={(input) => setServer(input.value)} /> )} @@ -72,7 +72,7 @@ export const LoginModal = () => { name="j_username" type="text" value={username} - onChange={input => setUsername(input.value)} + onChange={(input) => setUsername(input.value)} /> { name="j_password" type="password" value={password} - onChange={input => setPassword(input.value)} + onChange={(input) => setPassword(input.value)} /> diff --git a/adapter/src/components/PWAUpdateManager.js b/adapter/src/components/PWAUpdateManager.js index 696fa33d0..ccdd0b465 100644 --- a/adapter/src/components/PWAUpdateManager.js +++ b/adapter/src/components/PWAUpdateManager.js @@ -9,7 +9,7 @@ import { } from '@dhis2/ui' import PropTypes from 'prop-types' import React, { useState, useEffect } from 'react' -import i18n from '../locales' +import i18n from '../locales/index.js' function ConfirmReloadModal({ clientsCount, onCancel, onConfirm }) { return ( @@ -77,7 +77,7 @@ export default function PWAUpdateManager({ offlineInterface }) { setConfirmReloadModalOpen(true) } }) - .catch(reason => { + .catch((reason) => { // Didn't get clients info console.warn(reason) // Go ahead with confirmation modal with `null` as clientsCount diff --git a/adapter/src/components/ServerVersionProvider.js b/adapter/src/components/ServerVersionProvider.js index e32fd0d29..be03f6986 100644 --- a/adapter/src/components/ServerVersionProvider.js +++ b/adapter/src/components/ServerVersionProvider.js @@ -23,13 +23,13 @@ export const ServerVersionProvider = ({ return } - setState(state => (state.loading ? state : { loading: true })) + setState((state) => (state.loading ? state : { loading: true })) const request = get(`${url}/api/system/info`) request - .then(systemInfo => { + .then((systemInfo) => { setState({ loading: false, systemInfo }) }) - .catch(e => { + .catch((e) => { setState({ loading: false, error: e }) }) diff --git a/adapter/src/components/__tests__/ErrorBoundary.test.js b/adapter/src/components/__tests__/ErrorBoundary.test.js index 30f4bbdaf..bd56b8325 100644 --- a/adapter/src/components/__tests__/ErrorBoundary.test.js +++ b/adapter/src/components/__tests__/ErrorBoundary.test.js @@ -1,6 +1,6 @@ import { shallow } from 'enzyme' import React from 'react' -import { ErrorBoundary } from '../ErrorBoundary' +import { ErrorBoundary } from '../ErrorBoundary.js' const Something = () => { // Placeholder diff --git a/adapter/src/index.js b/adapter/src/index.js index 1cc7ddad8..9492ec9d9 100644 --- a/adapter/src/index.js +++ b/adapter/src/index.js @@ -2,8 +2,8 @@ import { checkForSWUpdateAndReload, OfflineInterface } from '@dhis2/pwa' import PropTypes from 'prop-types' import React from 'react' import { AppWrapper } from './components/AppWrapper.js' -import { ErrorBoundary } from './components/ErrorBoundary' -import { ServerVersionProvider } from './components/ServerVersionProvider' +import { ErrorBoundary } from './components/ErrorBoundary.js' +import { ServerVersionProvider } from './components/ServerVersionProvider.js' const offlineInterface = new OfflineInterface() diff --git a/adapter/src/utils/api.js b/adapter/src/utils/api.js index c244a3330..cef437793 100644 --- a/adapter/src/utils/api.js +++ b/adapter/src/utils/api.js @@ -12,7 +12,7 @@ const request = (url, options) => { }, signal: abortController.signal, }) - .then(response => { + .then((response) => { if (response.status !== 200) { reject('Request failed', response.statusText) return @@ -23,7 +23,7 @@ const request = (url, options) => { resolve(response.text()) } }) - .catch(e => { + .catch((e) => { console.error('Network error: ', e) reject('Network error') }) @@ -33,7 +33,7 @@ const request = (url, options) => { return promise } -export const get = url => request(url, { method: 'GET' }) +export const get = (url) => request(url, { method: 'GET' }) export const post = (url, body) => request(url, { method: 'POST', diff --git a/adapter/src/utils/parseServerVersion.js b/adapter/src/utils/parseServerVersion.js index 18cb18f32..70b65e836 100644 --- a/adapter/src/utils/parseServerVersion.js +++ b/adapter/src/utils/parseServerVersion.js @@ -1,4 +1,4 @@ -export const parseServerVersion = versionString => { +export const parseServerVersion = (versionString) => { const [mainVersion, tag] = versionString?.split('-') || [] const [major, minor, patch] = mainVersion?.split('.') || [] diff --git a/adapter/src/utils/useLocale.js b/adapter/src/utils/useLocale.js index e5e2a899a..2c34bc94f 100644 --- a/adapter/src/utils/useLocale.js +++ b/adapter/src/utils/useLocale.js @@ -5,7 +5,7 @@ import { useState, useEffect } from 'react' i18n.setDefaultNamespace('default') -const simplifyLocale = locale => { +const simplifyLocale = (locale) => { const idx = locale.indexOf('-') if (idx === -1) { return locale @@ -13,7 +13,7 @@ const simplifyLocale = locale => { return locale.substr(0, idx) } -const setGlobalLocale = locale => { +const setGlobalLocale = (locale) => { if (locale !== 'en' && locale !== 'en-us') { import( /* webpackChunkName: "moment-locales/[request]" */ `moment/locale/${locale}` @@ -27,7 +27,7 @@ const setGlobalLocale = locale => { i18n.changeLanguage(simplifiedLocale) } -export const useLocale = locale => { +export const useLocale = (locale) => { const [result, setResult] = useState(undefined) useEffect(() => { if (!locale) { diff --git a/adapter/src/utils/useVerifyLatestUser.js b/adapter/src/utils/useVerifyLatestUser.js index 6a13d1d7a..4207247aa 100644 --- a/adapter/src/utils/useVerifyLatestUser.js +++ b/adapter/src/utils/useVerifyLatestUser.js @@ -23,7 +23,7 @@ export function useVerifyLatestUser() { const { pwaEnabled } = useConfig() const [finished, setFinished] = useState(false) const { loading, error } = useDataQuery(USER_QUERY, { - onComplete: async data => { + onComplete: async (data) => { const latestUserId = localStorage.getItem(LATEST_USER_KEY) const currentUserId = data.user.id if (currentUserId !== latestUserId) { diff --git a/cli/config/makeBabelConfig.js b/cli/config/makeBabelConfig.js index 8fde30c6a..0907fdc4f 100644 --- a/cli/config/makeBabelConfig.js +++ b/cli/config/makeBabelConfig.js @@ -1,7 +1,7 @@ const browserTargets = require('./.browserlistrc') const jestTargets = { node: 'current' } -const getBabelModuleType = moduleType => { +const getBabelModuleType = (moduleType) => { switch (moduleType) { case 'cjs': case 'commonjs': diff --git a/cli/src/commands/clean.js b/cli/src/commands/clean.js index 04289deee..d4eda5a21 100644 --- a/cli/src/commands/clean.js +++ b/cli/src/commands/clean.js @@ -8,7 +8,7 @@ const handler = async ({ cwd }) => { const dirsToClean = [paths.d2, paths.buildOutput] reporter.info('Cleaning intermediate directories and build output...') - dirsToClean.forEach(dir => { + dirsToClean.forEach((dir) => { reporter.print(' * ' + dir) fs.removeSync(dir) }) diff --git a/cli/src/commands/deploy.js b/cli/src/commands/deploy.js index 768a8ebd0..d9b897d0e 100644 --- a/cli/src/commands/deploy.js +++ b/cli/src/commands/deploy.js @@ -25,7 +25,7 @@ const dumpHttpError = (message, response) => { reporter.debugErr('Error details', response.data) } -const promptForDhis2Config = async params => { +const promptForDhis2Config = async (params) => { if ( process.env.CI && (!params.baseUrl || !params.username || !params.password) @@ -36,7 +36,7 @@ const promptForDhis2Config = async params => { ) } - const isValidUrl = input => + const isValidUrl = (input) => input && input.length && input.match(/^https?:\/\/[^/.]+/) const responses = await inquirer.prompt([ @@ -45,7 +45,7 @@ const promptForDhis2Config = async params => { name: 'baseUrl', message: 'DHIS2 instance URL:', when: () => !params.baseUrl, - validate: input => + validate: (input) => isValidUrl(input) ? true : 'Please enter a valid URL, it must start with http:// or https://', diff --git a/cli/src/commands/init.js b/cli/src/commands/init.js index f12d10df0..9447776e9 100644 --- a/cli/src/commands/init.js +++ b/cli/src/commands/init.js @@ -6,21 +6,21 @@ const makePaths = require('../lib/paths') const ignorePatterns = ['node_modules', '.d2', 'src/locales', 'build'] -const parseGitignore = gitignoreFile => { +const parseGitignore = (gitignoreFile) => { const newSection = { name: 'DHIS2 Platform', patterns: [] } if (fs.existsSync(gitignoreFile)) { const content = fs.readFileSync(gitignoreFile) const parsed = gitignore.parse(content) const existingSection = parsed.sections.filter( - section => section.name === newSection.name + (section) => section.name === newSection.name )[0] if (existingSection) { newSection.patterns = existingSection.patterns } - ignorePatterns.forEach(pattern => { + ignorePatterns.forEach((pattern) => { if (!parsed.patterns.includes(pattern)) { newSection.patterns.push(pattern) } @@ -36,9 +36,9 @@ const parseGitignore = gitignoreFile => { const defaultSection = { name: null, - patterns: parsed.patterns.filter(pattern => { + patterns: parsed.patterns.filter((pattern) => { if ( - parsed.sections.some(section => + parsed.sections.some((section) => section.patterns.includes(pattern) ) ) { @@ -57,7 +57,7 @@ const parseGitignore = gitignoreFile => { } const writeGitignore = (gitignoreFile, sections) => { - const format = section => { + const format = (section) => { if (section.name === null && section.patterns.length) { return section.patterns.join('\n') + '\n\n' } diff --git a/cli/src/commands/pack.js b/cli/src/commands/pack.js index b8ebe5991..b5196485f 100644 --- a/cli/src/commands/pack.js +++ b/cli/src/commands/pack.js @@ -10,7 +10,7 @@ exports.command = 'pack [source]' exports.describe = 'Create a .zip archive of a built application' -exports.builder = yargs => +exports.builder = (yargs) => yargs .positional('source', { describe: 'The source directory to pack relative to cwd.', @@ -39,7 +39,7 @@ exports.builder = yargs => defaultDescription: '${config.version}', }) -exports.handler = async argv => { +exports.handler = async (argv) => { const { cwd = process.cwd(), source, diff --git a/cli/src/commands/publish.js b/cli/src/commands/publish.js index 6fa3ba7f1..40594ef3a 100644 --- a/cli/src/commands/publish.js +++ b/cli/src/commands/publish.js @@ -9,13 +9,13 @@ const publishVersion = require('../lib/publishVersion.js') const updateManifest = require('../lib/updateManifest.js') const { handler: pack } = require('./pack.js') -const isValidServerVersion = v => !!/(\d+)\.(\d+)/.exec(v) +const isValidServerVersion = (v) => !!/(\d+)\.(\d+)/.exec(v) const requiredFields = new Set(['id', 'version', 'minDHIS2Version']) const configFieldValidations = { - minDHIS2Version: v => + minDHIS2Version: (v) => isValidServerVersion(v) ? true : 'Invalid server version', - maxDHIS2Version: v => + maxDHIS2Version: (v) => isValidServerVersion(v) ? true : 'Invalid server version', } @@ -23,7 +23,7 @@ const validateFields = ( config, fieldNames = ['id', 'version', 'minDHIS2Version'] ) => { - fieldNames.forEach(fieldName => { + fieldNames.forEach((fieldName) => { const fieldValue = config[fieldName] if ( requiredFields.has(fieldName) && @@ -98,7 +98,7 @@ const resolveBundle = ({ cwd, params, config }) => { return resolveBundleFromAppConfig(cwd, config) } -const promptForConfig = async params => { +const promptForConfig = async (params) => { if (!params.token) { exit(1, 'Missing API token.') } @@ -127,7 +127,7 @@ const promptForConfig = async params => { name: 'minDHIS2Version', message: 'Minimum DHIS2 version supported', when: () => params.file && !params.minDHIS2Version, - validate: v => + validate: (v) => isValidServerVersion(v) ? true : 'Invalid server version', }, { @@ -135,7 +135,7 @@ const promptForConfig = async params => { name: 'maxDHIS2Version', message: 'Maximum DHIS2 version supported', when: () => params.file && !params.maxDHIS2Version, - validate: v => + validate: (v) => !v || isValidServerVersion(v) ? true : 'Invalid server version', }, ]) @@ -209,7 +209,7 @@ const command = { command: 'publish', alias: 'p', desc: 'Deploy the built application to a specific DHIS2 instance', - builder: yargs => + builder: (yargs) => yargs .options({ apikey: { diff --git a/cli/src/index.js b/cli/src/index.js index ccb3f9fa0..e42c4c40c 100644 --- a/cli/src/index.js +++ b/cli/src/index.js @@ -2,7 +2,7 @@ const { namespace } = require('@dhis2/cli-helpers-engine') module.exports = namespace('scripts', { desc: 'Scripts for development of DHIS2 applications', - builder: yargs => + builder: (yargs) => yargs .option('cwd', { description: 'working directory to use (defaults to cwd)', diff --git a/cli/src/lib/compiler/compile.js b/cli/src/lib/compiler/compile.js index 4716870c1..c56036897 100644 --- a/cli/src/lib/compiler/compile.js +++ b/cli/src/lib/compiler/compile.js @@ -14,7 +14,7 @@ const { } = require('./extensionHelpers.js') const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => { - const compileFile = async source => { + const compileFile = async (source) => { const relative = normalizeExtension(path.relative(inputDir, source)) const destination = path.join(outputDir, relative) reporter.debug( @@ -25,7 +25,7 @@ const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => { await processFileCallback(source, destination) } - const removeFile = async file => { + const removeFile = async (file) => { const relative = path.relative(inputDir, file) const outFile = path.join(outputDir, relative) reporter.debug(`File ${relative} removed... removing: `, outFile) @@ -47,7 +47,7 @@ const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => { .on('add', compileFile) .on('change', compileFile) .on('unlink', removeFile) - .on('error', error => { + .on('error', (error) => { reporter.debugErr('Chokidar error:', error) reject('Chokidar error!') }) diff --git a/cli/src/lib/compiler/entrypoints.js b/cli/src/lib/compiler/entrypoints.js index bc575111b..69314fd68 100644 --- a/cli/src/lib/compiler/entrypoints.js +++ b/cli/src/lib/compiler/entrypoints.js @@ -35,7 +35,7 @@ exports.verifyEntrypoints = ({ return } - const verifyLibraryEntrypoint = entrypoint => { + const verifyLibraryEntrypoint = (entrypoint) => { switch (typeof entrypoint) { case 'string': verifyEntrypoint({ diff --git a/cli/src/lib/compiler/entrypoints.test.js b/cli/src/lib/compiler/entrypoints.test.js index 68ac1f8ee..b70a938cb 100644 --- a/cli/src/lib/compiler/entrypoints.test.js +++ b/cli/src/lib/compiler/entrypoints.test.js @@ -3,7 +3,7 @@ const { verifyEntrypoints } = require('./entrypoints.js') jest.mock('@dhis2/cli-helpers-engine', () => ({ chalk: { - bold: string => string, + bold: (string) => string, }, reporter: { error: jest.fn(), @@ -96,7 +96,7 @@ describe('verifyEntrypoints', () => { app: './src/SomeApp.js', }, } - const resolveModule = jest.fn(path => { + const resolveModule = jest.fn((path) => { throw new Error(`Cannot find module '${path}'`) }) @@ -201,7 +201,7 @@ describe('verifyEntrypoints', () => { lib: './src/index.js', }, } - const resolveModule = jest.fn(path => { + const resolveModule = jest.fn((path) => { throw new Error(`Cannot find module '${path}'`) }) diff --git a/cli/src/lib/compiler/extensionHelpers.js b/cli/src/lib/compiler/extensionHelpers.js index 7577c755e..70997a0c4 100644 --- a/cli/src/lib/compiler/extensionHelpers.js +++ b/cli/src/lib/compiler/extensionHelpers.js @@ -1,5 +1,5 @@ const extensionPattern = /\.[jt]sx?$/ -const normalizeExtension = ext => ext.replace(extensionPattern, '.js') +const normalizeExtension = (ext) => ext.replace(extensionPattern, '.js') module.exports.extensionPattern = extensionPattern module.exports.normalizeExtension = normalizeExtension diff --git a/cli/src/lib/finalArchivePath.js b/cli/src/lib/finalArchivePath.js index 3862ea9e6..042ee8910 100644 --- a/cli/src/lib/finalArchivePath.js +++ b/cli/src/lib/finalArchivePath.js @@ -1,6 +1,6 @@ module.exports = ({ filepath, name, version }) => { // for scoped names in package.json - const clean = str => str.replace(/@/, '').replace(/\//, '-') + const clean = (str) => str.replace(/@/, '').replace(/\//, '-') // replace placeholder within names defined in lib/paths.js return filepath.replace(/{name}/, clean(name)).replace(/{version}/, version) diff --git a/cli/src/lib/generateManifests.js b/cli/src/lib/generateManifests.js index 2bbdd52ae..abacfdb54 100644 --- a/cli/src/lib/generateManifests.js +++ b/cli/src/lib/generateManifests.js @@ -1,13 +1,13 @@ const { reporter, chalk } = require('@dhis2/cli-helpers-engine') const fs = require('fs-extra') -const parseCustomAuthorities = authorities => { +const parseCustomAuthorities = (authorities) => { if (!authorities) { return undefined } if ( !Array.isArray(authorities) || - !authorities.every(auth => typeof auth === 'string') + !authorities.every((auth) => typeof auth === 'string') ) { reporter.warn( `Invalid value ${chalk.bold( @@ -20,7 +20,7 @@ const parseCustomAuthorities = authorities => { } return authorities } -const parseDataStoreNamespace = namespace => { +const parseDataStoreNamespace = (namespace) => { if (!namespace) { return undefined } diff --git a/cli/src/lib/i18n/extract.js b/cli/src/lib/i18n/extract.js index 2ba5915c5..928ca7241 100644 --- a/cli/src/lib/i18n/extract.js +++ b/cli/src/lib/i18n/extract.js @@ -36,7 +36,7 @@ const extract = async ({ input, output, paths }) => { reporter.debug(`[i18n-extract] Parsing ${files.length} files...`) - files.forEach(filePath => { + files.forEach((filePath) => { var contents = fs.readFileSync(filePath, 'utf8') parser.parseFuncFromString(contents).get() }) @@ -44,7 +44,7 @@ const extract = async ({ input, output, paths }) => { var parsed = parser.get() var en = {} Object.keys(parsed.en.translation).forEach( - str => (en[str] = parsed.en.translation[str]) + (str) => (en[str] = parsed.en.translation[str]) ) if (Object.keys(en).length === 0) { diff --git a/cli/src/lib/i18n/generate.js b/cli/src/lib/i18n/generate.js index 60c213011..a67b7cbfd 100644 --- a/cli/src/lib/i18n/generate.js +++ b/cli/src/lib/i18n/generate.js @@ -34,16 +34,16 @@ const generate = async ({ input, output, namespace, paths }) => { reporter.debug(`[i18n-generate] Reading translation sources...`) const files = fs.readdirSync(input) - const langs = files.map(f => path.basename(f, path.extname(f))) + const langs = files.map((f) => path.basename(f, path.extname(f))) const locales = langs - .filter(lang => lang !== 'en') - .map(lang => langToLocale[lang]) + .filter((lang) => lang !== 'en') + .map((lang) => langToLocale[lang]) const outFile = path.join(dst, 'index.js') writeTemplate(outFile, { locales, langs, namespace }) reporter.debug(`[i18n-generate] Generating translation .json files...`) - const promises = files.map(async f => { + const promises = files.map(async (f) => { const ext = path.extname(f) const lang = path.basename(f, ext) diff --git a/cli/src/lib/i18n/helpers.js b/cli/src/lib/i18n/helpers.js index 17c30e5db..6cd044fb5 100644 --- a/cli/src/lib/i18n/helpers.js +++ b/cli/src/lib/i18n/helpers.js @@ -4,7 +4,7 @@ const fs = require('fs-extra') const supportedExtensions = ['.js', '.jsx', '.ts', '.tsx'] -module.exports.checkDirectoryExists = dir => { +module.exports.checkDirectoryExists = (dir) => { const dirPath = path.normalize(dir) try { const stat = fs.lstatSync(dirPath) @@ -29,7 +29,7 @@ module.exports.arrayEqual = (arr1, arr2) => function walkDirectory(dirPath, files = []) { const list = fs.readdirSync(dirPath) - list.forEach(fileName => { + list.forEach((fileName) => { const filePath = path.join(dirPath, fileName) const stat = fs.lstatSync(filePath) diff --git a/cli/src/lib/loadEnvFiles.js b/cli/src/lib/loadEnvFiles.js index fa3092686..ca05f5c80 100644 --- a/cli/src/lib/loadEnvFiles.js +++ b/cli/src/lib/loadEnvFiles.js @@ -19,7 +19,7 @@ module.exports = (paths, NODE_ENV) => { dotenvFiles .filter(Boolean) .filter(fs.existsSync) - .forEach(dotenvFile => { + .forEach((dotenvFile) => { dotenvExpand( dotenv.config({ path: dotenvFile, diff --git a/cli/src/lib/makeBundle.js b/cli/src/lib/makeBundle.js index 15fd3fd5b..3bde2bdc3 100644 --- a/cli/src/lib/makeBundle.js +++ b/cli/src/lib/makeBundle.js @@ -35,7 +35,7 @@ module.exports = (inDir, outFile) => { const files = fs .readdirSync(inDir) .filter( - f => path.resolve(inDir, f) !== path.resolve(inDir, outFile) + (f) => path.resolve(inDir, f) !== path.resolve(inDir, outFile) ) reporter.debug('Pack list', files) diff --git a/cli/src/lib/parseConfig.js b/cli/src/lib/parseConfig.js index 688370026..6de328646 100644 --- a/cli/src/lib/parseConfig.js +++ b/cli/src/lib/parseConfig.js @@ -8,7 +8,7 @@ const requiredConfigFields = { lib: ['name', 'version', 'entryPoints.lib'], } -const parseAuthor = author => { +const parseAuthor = (author) => { if (isPlainObject(author)) { return { name: author.name, @@ -24,7 +24,7 @@ const parseAuthor = author => { return undefined } -const validateConfig = config => { +const validateConfig = (config) => { if (!requiredConfigFields[config.type]) { reporter.error( `Unknown type ${chalk.bold(config.type)} specified in d2.config.js.` @@ -32,7 +32,7 @@ const validateConfig = config => { reporter.error(`\tValid types:`, Object.keys(requiredConfigFields)) process.exit(1) } - requiredConfigFields[config.type].forEach(field => { + requiredConfigFields[config.type].forEach((field) => { if (!has(config, field)) { reporter.error( `Required config field ${chalk.bold( @@ -45,7 +45,7 @@ const validateConfig = config => { return true } -const parseConfig = paths => { +const parseConfig = (paths) => { try { let config = {} // if (!fs.existsSync(paths.config)) { diff --git a/cli/src/lib/paths.js b/cli/src/lib/paths.js index 903e19107..93111cabe 100644 --- a/cli/src/lib/paths.js +++ b/cli/src/lib/paths.js @@ -7,7 +7,7 @@ const shellSource = path.dirname( ) const shellAppDirname = 'src/D2App' -const findYarnLock = base => { +const findYarnLock = (base) => { if (base === '/') { return null } diff --git a/cli/src/lib/proxy.js b/cli/src/lib/proxy.js index 4ff78ea75..6dc9c18c7 100644 --- a/cli/src/lib/proxy.js +++ b/cli/src/lib/proxy.js @@ -4,10 +4,10 @@ const httpProxy = require('http-proxy') const _ = require('lodash') const transformProxyResponse = require('node-http-proxy-json') -const stripCookieSecure = cookie => { +const stripCookieSecure = (cookie) => { return cookie .split(';') - .filter(v => v.trim().toLowerCase() !== 'secure') + .filter((v) => v.trim().toLowerCase() !== 'secure') .join('; ') } @@ -32,7 +32,7 @@ const rewriteLocation = ({ location, target, baseUrl }) => { return location } -const isUrl = string => { +const isUrl = (string) => { try { const { protocol } = new URL(string) return protocol === 'http:' || protocol === 'https:' @@ -50,7 +50,7 @@ const transformJsonResponse = (res, { target, baseUrl }) => { return res case 'object': if (Array.isArray(res)) { - return res.map(r => + return res.map((r) => transformJsonResponse(r, { target, baseUrl }) ) } @@ -104,7 +104,7 @@ exports = module.exports = ({ target, baseUrl, port, shellPort }) => { proxyRes.headers['content-type'] && proxyRes.headers['content-type'].includes('application/json') ) { - transformProxyResponse(res, proxyRes, body => { + transformProxyResponse(res, proxyRes, (body) => { if (body) { return transformJsonResponse(body, { target, @@ -116,7 +116,7 @@ exports = module.exports = ({ target, baseUrl, port, shellPort }) => { } }) - proxyServer.on('error', error => { + proxyServer.on('error', (error) => { reporter.warn(error) }) diff --git a/cli/src/lib/proxy.test.js b/cli/src/lib/proxy.test.js index 291e89e03..eb34ecec4 100644 --- a/cli/src/lib/proxy.test.js +++ b/cli/src/lib/proxy.test.js @@ -84,7 +84,7 @@ describe('rewriteLocation', () => { target: 'http://server.com:5678', baseUrl: 'http://localhost:8080', }, - ].forEach(args => { + ].forEach((args) => { expect(rewriteLocation(args)).toBe(args.location) }) }) diff --git a/cli/src/lib/publishVersion.js b/cli/src/lib/publishVersion.js index 73abe5692..1c4b2274b 100644 --- a/cli/src/lib/publishVersion.js +++ b/cli/src/lib/publishVersion.js @@ -3,7 +3,7 @@ const FormData = require('form-data') const fs = require('fs-extra') const { createClient } = require('../lib/httpClient') -const constructUploadUrl = appId => `/api/v1/apps/${appId}/versions` +const constructUploadUrl = (appId) => `/api/v1/apps/${appId}/versions` const dumpHttpError = (message, response) => { if (!response) { diff --git a/cli/src/lib/pwa/compileServiceWorker.js b/cli/src/lib/pwa/compileServiceWorker.js index 00aee2e1c..148c173e4 100644 --- a/cli/src/lib/pwa/compileServiceWorker.js +++ b/cli/src/lib/pwa/compileServiceWorker.js @@ -61,7 +61,7 @@ function compileServiceWorker({ config, paths, mode }) { } return new Promise((resolve, reject) => { - const logErr = err => { + const logErr = (err) => { reporter.debugErr(err.stack || err) if (err.details) { reporter.debugErr(err.details) diff --git a/cli/src/lib/pwa/getPWAEnvVars.js b/cli/src/lib/pwa/getPWAEnvVars.js index cd98421e6..6b88710bd 100644 --- a/cli/src/lib/pwa/getPWAEnvVars.js +++ b/cli/src/lib/pwa/getPWAEnvVars.js @@ -10,7 +10,7 @@ function escapeForRegex(string) { * @param {Object} config */ function stringifyPatterns(patternsList) { - const stringsList = patternsList.map(pattern => { + const stringsList = patternsList.map((pattern) => { if (typeof pattern === 'string') { return escapeForRegex(pattern) } else if (pattern instanceof RegExp) { diff --git a/cli/src/lib/pwa/injectPrecacheManifest.js b/cli/src/lib/pwa/injectPrecacheManifest.js index 13e5e86e4..0e97074d4 100644 --- a/cli/src/lib/pwa/injectPrecacheManifest.js +++ b/cli/src/lib/pwa/injectPrecacheManifest.js @@ -21,7 +21,7 @@ const { injectManifest } = require('workbox-build') function logManifestOutput({ count, filePaths, size, warnings }) { reporter.debug('The service worker precache manifest was written to:') - filePaths.forEach(filePath => reporter.debug(' * ', filePath)) + filePaths.forEach((filePath) => reporter.debug(' * ', filePath)) reporter.debug( `The service worker will precache ${count} URLs, totaling ${size} bytes.` ) diff --git a/cli/src/lib/shell/bootstrap.js b/cli/src/lib/shell/bootstrap.js index bb9bbb687..de8ff43ab 100644 --- a/cli/src/lib/shell/bootstrap.js +++ b/cli/src/lib/shell/bootstrap.js @@ -3,7 +3,7 @@ const currentShellVersion = require('@dhis2/app-shell/package.json').version const { reporter, chalk } = require('@dhis2/cli-helpers-engine') const fs = require('fs-extra') -const getShellVersion = shellDir => { +const getShellVersion = (shellDir) => { const shellPkg = path.join(shellDir, 'package.json') if (fs.existsSync(shellPkg)) { try { @@ -58,7 +58,7 @@ const bootstrapShell = async (paths, { shell, force = false } = {}) => { await fs.copy(source, dest, { dereference: true, - filter: src => + filter: (src) => src.indexOf('node_modules', source.length) === -1 && src.indexOf('.pnp', source.length) === -1 && src.indexOf(paths.shellAppDirname) === -1, diff --git a/cli/src/lib/shell/env.js b/cli/src/lib/shell/env.js index d732db712..962517191 100644 --- a/cli/src/lib/shell/env.js +++ b/cli/src/lib/shell/env.js @@ -2,7 +2,7 @@ const { reporter } = require('@dhis2/cli-helpers-engine') const filterEnv = () => Object.keys(process.env) - .filter(key => key.indexOf('DHIS2_') === 0) + .filter((key) => key.indexOf('DHIS2_') === 0) .reduce( (out, key) => ({ ...out, @@ -11,7 +11,7 @@ const filterEnv = () => {} ) -const prefixEnvForCRA = env => +const prefixEnvForCRA = (env) => Object.keys(env).reduce( (out, key) => ({ ...out, @@ -20,7 +20,7 @@ const prefixEnvForCRA = env => {} ) -const makeShellEnv = vars => +const makeShellEnv = (vars) => Object.entries(vars).reduce( (out, [key, value]) => ({ ...out, diff --git a/cli/src/lib/validators/validateLockfile.js b/cli/src/lib/validators/validateLockfile.js index 53c92d41d..a6abfef40 100644 --- a/cli/src/lib/validators/validateLockfile.js +++ b/cli/src/lib/validators/validateLockfile.js @@ -10,7 +10,7 @@ const singletonDependencies = [ 'styled-jsx', ] -const listSingletonDuplicates = yarnLock => +const listSingletonDuplicates = (yarnLock) => listDuplicates(yarnLock, { includePackages: singletonDependencies, singleton: true, diff --git a/cli/src/lib/validators/validateLockfile.test.js b/cli/src/lib/validators/validateLockfile.test.js index 93bdbe6eb..b94fb9c46 100644 --- a/cli/src/lib/validators/validateLockfile.test.js +++ b/cli/src/lib/validators/validateLockfile.test.js @@ -10,7 +10,7 @@ describe('validateLockfile', () => { jest.clearAllMocks() }) - const mockYarnLock = yarnLock => { + const mockYarnLock = (yarnLock) => { fs.readFileSync.mockReturnValue(yarnLock) } diff --git a/cli/src/lib/validators/validatePackageExports.js b/cli/src/lib/validators/validatePackageExports.js index b5def5940..d757b0f2d 100644 --- a/cli/src/lib/validators/validatePackageExports.js +++ b/cli/src/lib/validators/validatePackageExports.js @@ -28,7 +28,7 @@ const checkField = (field, value, expectedValue) => { if (Array.isArray(expectedValue) && !expectedValue.includes(value)) { reporter.warn( `Invalid "${field}" field in package.json, expected ${expectedValue - .map(option => `"${option}"`) + .map((option) => `"${option}"`) .join(' or ')} (got "${value}")` ) return false diff --git a/cli/src/lib/yarnDeduplicate.js b/cli/src/lib/yarnDeduplicate.js index 49f908592..71a149127 100644 --- a/cli/src/lib/yarnDeduplicate.js +++ b/cli/src/lib/yarnDeduplicate.js @@ -8,7 +8,7 @@ const lockfile = require('@yarnpkg/lockfile') const semver = require('semver') -const parseYarnLock = file => lockfile.parse(file).object +const parseYarnLock = (file) => lockfile.parse(file).object const extractPackages = ({ json, @@ -19,7 +19,7 @@ const extractPackages = ({ const packages = {} const re = /^(.*)@([^@]*?)$/ - Object.keys(json).forEach(name => { + Object.keys(json).forEach((name) => { const pkg = json[name] const match = name.match(re) @@ -41,7 +41,7 @@ const extractPackages = ({ // If there is a list of scopes, only process those. if ( includeScopes.length > 0 && - !includeScopes.find(scope => packageName.startsWith(`${scope}/`)) + !includeScopes.find((scope) => packageName.startsWith(`${scope}/`)) ) { return } @@ -96,9 +96,9 @@ const computePackageInstances = ({ }, {}) // Link each package instance with all the versions it could satisfy. - Object.keys(versions).forEach(version => { + Object.keys(versions).forEach((version) => { const satisfies = versions[version].satisfies - packageInstances.forEach(packageInstance => { + packageInstances.forEach((packageInstance) => { // We can assume that the installed version always satisfied the requested version. packageInstance.satisfiedBy.add(packageInstance.installedVersion) // In some cases the requested version is invalid form a semver point of view (for @@ -123,7 +123,7 @@ const computePackageInstances = ({ }) // Sort the list of satisfied versions - packageInstances.forEach(packageInstance => { + packageInstances.forEach((packageInstance) => { // Save all versions for future reference packageInstance.versions = versions diff --git a/examples/pwa-app/src/App.js b/examples/pwa-app/src/App.js index 1f5851ea1..006f193d6 100644 --- a/examples/pwa-app/src/App.js +++ b/examples/pwa-app/src/App.js @@ -1,6 +1,6 @@ import React from 'react' import classes from './App.module.css' -import SectionWrapper from './components/SectionWrapper' +import SectionWrapper from './components/SectionWrapper.js' const MyApp = () => (
diff --git a/examples/pwa-app/src/App.test.js b/examples/pwa-app/src/App.test.js index fe9b67174..7cb1f8eca 100644 --- a/examples/pwa-app/src/App.test.js +++ b/examples/pwa-app/src/App.test.js @@ -1,6 +1,6 @@ import React from 'react' import ReactDOM from 'react-dom' -import App from './App' +import App from './App.js' it('renders without crashing', () => { const div = document.createElement('div') diff --git a/examples/pwa-app/src/components/SectionWrapper.js b/examples/pwa-app/src/components/SectionWrapper.js index 38c8ad740..55f040a86 100644 --- a/examples/pwa-app/src/components/SectionWrapper.js +++ b/examples/pwa-app/src/components/SectionWrapper.js @@ -30,7 +30,7 @@ function Controls({ id }) { function handleRecording() { const onStarted = () => {} - const onError = err => + const onError = (err) => show({ message: `Error during recording: ${err.message}`, props: { critical: true }, diff --git a/examples/pwa-app/src/components/VisualizationsList.js b/examples/pwa-app/src/components/VisualizationsList.js index 85d3fcd8b..9c40cb3d6 100644 --- a/examples/pwa-app/src/components/VisualizationsList.js +++ b/examples/pwa-app/src/components/VisualizationsList.js @@ -13,8 +13,8 @@ const query = { } // Usage: 'await wait(500)' -const wait = ms => - new Promise(resolve => { +const wait = (ms) => + new Promise((resolve) => { setTimeout(resolve, ms) }) @@ -38,7 +38,7 @@ export default function VisualizationsList() { variables: { page: i + 1 }, }) - setVizList(prev => + setVizList((prev) => prev.concat(res.visualizations.visualizations) ) } diff --git a/examples/simple-app/src/Alerter.js b/examples/simple-app/src/Alerter.js index 214039af7..f7973eee0 100644 --- a/examples/simple-app/src/Alerter.js +++ b/examples/simple-app/src/Alerter.js @@ -7,7 +7,7 @@ export const Alerter = () => { const [critical, setCritical] = useState(false) const { show, hide } = useAlert( - str => str, + (str) => str, () => ({ critical }) ) diff --git a/examples/simple-app/src/App.js b/examples/simple-app/src/App.js index e410a3ef1..3e1a3c037 100644 --- a/examples/simple-app/src/App.js +++ b/examples/simple-app/src/App.js @@ -2,8 +2,8 @@ import { useDataQuery } from '@dhis2/app-runtime' import moment from 'moment' import React from 'react' import { Alerter } from './Alerter.js' -import style from './App.style' -import i18n from './locales' +import style from './App.style.js' +import i18n from './locales/index.js' const query = { me: { diff --git a/package.json b/package.json index df1c805a3..42decada9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ] }, "devDependencies": { - "@dhis2/cli-style": "^9.2.0", + "@dhis2/cli-style": "^10.4.1", "@dhis2/cli-utils-docsite": "^3.0.0", "concurrently": "^6.0.0", "serve": "^12.0.0" diff --git a/pwa/src/lib/registration.js b/pwa/src/lib/registration.js index ec815e0e2..4e9e43769 100644 --- a/pwa/src/lib/registration.js +++ b/pwa/src/lib/registration.js @@ -102,7 +102,7 @@ export async function checkForSWUpdateAndReload() { // 3. If updates are ready, wait for them, _then_ reload checkForUpdates({ - onUpdate: reg => { + onUpdate: (reg) => { navigator.serviceWorker.oncontrollerchange = reload reg.waiting.postMessage({ type: 'SKIP_WAITING' }) }, @@ -165,7 +165,7 @@ async function registerValidSW(swUrl /* config */) { // Will likely cause another refresh due to .oncontrollerchange event await unregister() } - navigator.serviceWorker.register(swUrl).catch(error => { + navigator.serviceWorker.register(swUrl).catch((error) => { console.error('Error during service worker registration:', error) }) } @@ -175,7 +175,7 @@ function checkValidSW(swUrl, config) { fetch(swUrl, { headers: { 'Service-Worker': 'script' }, }) - .then(response => { + .then((response) => { // Ensure service worker exists, and that we really are getting a JS file. const contentType = response.headers.get('content-type') if ( @@ -184,7 +184,7 @@ function checkValidSW(swUrl, config) { contentType.indexOf('javascript') === -1) ) { // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { + navigator.serviceWorker.ready.then((registration) => { registration.unregister().then(() => { window.location.reload() }) @@ -217,10 +217,10 @@ function checkValidSW(swUrl, config) { export function unregister() { if ('serviceWorker' in navigator) { return navigator.serviceWorker.ready - .then(registration => { + .then((registration) => { registration.unregister() }) - .catch(error => { + .catch((error) => { console.error(error.message) }) } diff --git a/pwa/src/offline-interface/offline-interface.js b/pwa/src/offline-interface/offline-interface.js index 5239661b9..a75e350bf 100644 --- a/pwa/src/offline-interface/offline-interface.js +++ b/pwa/src/offline-interface/offline-interface.js @@ -1,7 +1,7 @@ import EventEmitter from 'events' -import { swMsgs } from '../lib/constants' -import { register, unregister, checkForUpdates } from '../lib/registration' -import { openSectionsDB, SECTIONS_STORE } from '../lib/sections-db' +import { swMsgs } from '../lib/constants.js' +import { register, unregister, checkForUpdates } from '../lib/registration.js' +import { openSectionsDB, SECTIONS_STORE } from '../lib/sections-db.js' /** Helper to simplify SW message sending */ function swMessage(type, payload) { @@ -48,7 +48,7 @@ export class OfflineInterface { // This event emitter helps coordinate with service worker messages this.offlineEvents = new EventEmitter() // Receives messages from service worker and forwards to event emitter - const handleSWMessage = event => { + const handleSWMessage = (event) => { if (!event.data) { return } @@ -70,7 +70,7 @@ export class OfflineInterface { */ getClientsInfo() { return new Promise((resolve, reject) => { - navigator.serviceWorker.getRegistration().then(registration => { + navigator.serviceWorker.getRegistration().then((registration) => { if (!registration || !registration.active) { reject('There is no active service worker') } @@ -93,7 +93,7 @@ export class OfflineInterface { * or claim clients if it's the first SW activation */ useNewSW() { - navigator.serviceWorker.getRegistration().then(registration => { + navigator.serviceWorker.getRegistration().then((registration) => { if (!registration) { throw new Error('No service worker is registered') } @@ -160,7 +160,7 @@ export class OfflineInterface { swMsgs.recordingCompleted, swMsgs.confirmRecordingCompletion, ] - messageTypes.forEach(messageType => + messageTypes.forEach((messageType) => this.offlineEvents.removeAllListeners(messageType) ) } @@ -206,7 +206,7 @@ export class OfflineInterface { const sections = await db.getAll(SECTIONS_STORE) const cacheKeys = await caches.keys() // Validate that each section in IDB has cached data - const validSections = sections.filter(section => + const validSections = sections.filter((section) => cacheKeys.includes(section.sectionId) ) diff --git a/pwa/src/service-worker/recording-mode.js b/pwa/src/service-worker/recording-mode.js index c4e174a74..5f6152dd4 100644 --- a/pwa/src/service-worker/recording-mode.js +++ b/pwa/src/service-worker/recording-mode.js @@ -1,12 +1,12 @@ -import { swMsgs } from '../lib/constants' -import { openSectionsDB, SECTIONS_STORE } from '../lib/sections-db' +import { swMsgs } from '../lib/constants.js' +import { openSectionsDB, SECTIONS_STORE } from '../lib/sections-db.js' // '[]' Fallback prevents error when switching from pwa enabled to disabled const CACHEABLE_SECTION_URL_FILTER_PATTERNS = JSON.parse( process.env .REACT_APP_DHIS2_APP_PWA_CACHING_PATTERNS_TO_OMIT_FROM_CACHEABLE_SECTIONS || '[]' -).map(pattern => new RegExp(pattern)) +).map((pattern) => new RegExp(pattern)) // Triggered on 'START_RECORDING' message export function startRecording(event) { @@ -37,7 +37,7 @@ export function startRecording(event) { self.clientRecordingStates[clientId] = newClientRecordingState // Send confirmation message to client - self.clients.get(clientId).then(client => { + self.clients.get(clientId).then((client) => { client.postMessage({ type: swMsgs.recordingStarted }) }) } @@ -67,7 +67,7 @@ export function shouldRequestBeRecorded({ url, event }) { // Don't cache if url matches filter in pattern list from d2.config.js const urlMatchesFilter = CACHEABLE_SECTION_URL_FILTER_PATTERNS.some( - pattern => pattern.test(url.href) + (pattern) => pattern.test(url.href) ) if (urlMatchesFilter) { return false @@ -84,10 +84,10 @@ export function handleRecordedRequest({ request, event }) { recordingState.pendingRequests.add(request) fetch(request) - .then(response => { + .then((response) => { return handleRecordedResponse(request, response, event.clientId) }) - .catch(error => { + .catch((error) => { stopRecording(error, event.clientId) }) } @@ -145,7 +145,7 @@ function stopRecording(error, clientId) { // In case of error, notify client and remove recording. // Post message even if !recordingState to ensure client stops. if (error) { - self.clients.get(clientId).then(client => { + self.clients.get(clientId).then((client) => { // use plain object instead of Error for firefox compatibility client.postMessage({ type: swMsgs.recordingError, @@ -169,7 +169,7 @@ function getCacheKey(...args) { function addToCache(cacheKey, request, response) { if (response.ok) { const responseClone = response.clone() - caches.open(cacheKey).then(cache => cache.put(request, responseClone)) + caches.open(cacheKey).then((cache) => cache.put(request, responseClone)) } } @@ -239,7 +239,7 @@ export async function completeRecording(clientId) { const sectionCache = await caches.open(recordingState.sectionId) const tempCache = await caches.open(getCacheKey('temp', clientId)) const tempCacheItemKeys = await tempCache.keys() - tempCacheItemKeys.forEach(async request => { + tempCacheItemKeys.forEach(async (request) => { const response = await tempCache.match(request) sectionCache.put(request, response) }) @@ -248,7 +248,7 @@ export async function completeRecording(clientId) { removeRecording(clientId) // Send confirmation message to client - self.clients.get(clientId).then(client => { + self.clients.get(clientId).then((client) => { client.postMessage({ type: swMsgs.recordingCompleted }) }) } catch (err) { diff --git a/pwa/src/service-worker/service-worker.js b/pwa/src/service-worker/service-worker.js index f6078f0f3..6f934f6ba 100644 --- a/pwa/src/service-worker/service-worker.js +++ b/pwa/src/service-worker/service-worker.js @@ -5,13 +5,13 @@ import { StaleWhileRevalidate, Strategy, } from 'workbox-strategies' -import { swMsgs } from '../lib/constants' +import { swMsgs } from '../lib/constants.js' import { startRecording, completeRecording, handleRecordedRequest, shouldRequestBeRecorded, -} from './recording-mode' +} from './recording-mode.js' import { urlMeetsAppShellCachingCriteria, createDB, @@ -19,7 +19,7 @@ import { setUpKillSwitchServiceWorker, getClientsInfo, claimClients, -} from './utils' +} from './utils.js' export function setUpServiceWorker() { const pwaEnabled = process.env.REACT_APP_DHIS2_APP_PWA_ENABLED === 'true' @@ -98,7 +98,7 @@ export function setUpServiceWorker() { const indexUrl = process.env.PUBLIC_URL + '/index.html' const navigationRouteHandler = ({ request }) => { return fetch(request) - .then(response => { + .then((response) => { if (response.type === 'opaqueredirect') { // It's sending a redirect to the login page. Return // that to the client @@ -117,7 +117,7 @@ export function setUpServiceWorker() { // Handle the rest of files in the manifest const restOfManifest = precacheManifest.filter( - e => e !== indexHtmlManifestEntry + (e) => e !== indexHtmlManifestEntry ) precacheAndRoute(restOfManifest) @@ -157,9 +157,9 @@ export function setUpServiceWorker() { // but don't add anything to cache class NetworkAndTryCache extends Strategy { _handle(request, handler) { - return handler.fetch(request).catch(fetchErr => { + return handler.fetch(request).catch((fetchErr) => { // handler.cacheMatch doesn't work b/c it doesn't check all caches - return caches.match(request).then(res => { + return caches.match(request).then((res) => { // If not found in cache, throw original fetchErr // (if there's a cache err, that will be returned) if (!res) { @@ -175,7 +175,7 @@ export function setUpServiceWorker() { // Service Worker event handlers - self.addEventListener('message', event => { + self.addEventListener('message', (event) => { if (!event.data) { return } @@ -205,7 +205,7 @@ export function setUpServiceWorker() { }) // Open DB on activation - self.addEventListener('activate', event => { + self.addEventListener('activate', (event) => { event.waitUntil(createDB().then(removeUnusedCaches)) }) } diff --git a/pwa/src/service-worker/utils.js b/pwa/src/service-worker/utils.js index 2c48667a9..8e71063b8 100644 --- a/pwa/src/service-worker/utils.js +++ b/pwa/src/service-worker/utils.js @@ -1,9 +1,9 @@ -import { swMsgs } from '../lib/constants' +import { swMsgs } from '../lib/constants.js' import { deleteSectionsDB, openSectionsDB, SECTIONS_STORE, -} from '../lib/sections-db' +} from '../lib/sections-db.js' const CACHE_KEEP_LIST = ['other-assets', 'app-shell'] // '[]' Fallback prevents error when switching from pwa enabled to disabled @@ -13,7 +13,7 @@ const APP_SHELL_URL_FILTER_PATTERNS = JSON.parse( // A deprecated fallback option: process.env.REACT_APP_DHIS2_APP_PWA_CACHING_PATTERNS_TO_OMIT || '[]' -).map(pattern => new RegExp(pattern)) +).map((pattern) => new RegExp(pattern)) const OMIT_EXTERNAL_REQUESTS_FROM_APP_SHELL = process.env .REACT_APP_DHIS2_APP_PWA_CACHING_OMIT_EXTERNAL_REQUESTS_FROM_APP_SHELL === @@ -36,12 +36,12 @@ export function setUpKillSwitchServiceWorker() { self.registration.unregister() // Delete all caches const keys = await self.caches.keys() - await Promise.all(keys.map(key => self.caches.delete(key))) + await Promise.all(keys.map((key) => self.caches.delete(key))) // Delete DB await deleteSectionsDB() // Force refresh all windows const clients = await self.clients.matchAll({ type: 'window' }) - clients.forEach(client => client.navigate(client.url)) + clients.forEach((client) => client.navigate(client.url)) }) } @@ -55,7 +55,7 @@ export function urlMeetsAppShellCachingCriteria(url) { } // Don't cache if url matches filter in pattern list from d2.config.js - const urlMatchesFilter = APP_SHELL_URL_FILTER_PATTERNS.some(pattern => + const urlMatchesFilter = APP_SHELL_URL_FILTER_PATTERNS.some((pattern) => pattern.test(url.href) ) if (urlMatchesFilter) { @@ -76,10 +76,10 @@ export function createDB() { export async function removeUnusedCaches() { const cacheKeys = await caches.keys() return Promise.all( - cacheKeys.map(async key => { + cacheKeys.map(async (key) => { const isWorkboxKey = /workbox/.test(key) const isInKeepList = !!CACHE_KEEP_LIST.find( - keepKey => keepKey === key + (keepKey) => keepKey === key ) const db = await self.dbPromise const isASavedSection = !!(await db.get(SECTIONS_STORE, key)) @@ -108,7 +108,7 @@ export async function getClientsInfo(event) { includeUncontrolled: true, }) - self.clients.get(clientId).then(client => { + self.clients.get(clientId).then((client) => { client.postMessage({ type: swMsgs.clientsInfo, payload: { @@ -128,5 +128,5 @@ export async function claimClients() { self.clients.claim() // Important to use includeUncontrolled option here: const clients = await self.clients.matchAll({ includeUncontrolled: true }) - clients.forEach(client => client.navigate(client.url)) + clients.forEach((client) => client.navigate(client.url)) } diff --git a/shell/public/service-worker.js b/shell/public/service-worker.js index bb67a2d11..85d8297a4 100644 --- a/shell/public/service-worker.js +++ b/shell/public/service-worker.js @@ -13,8 +13,8 @@ self.addEventListener('activate', async () => { self.registration.unregister() // Delete all caches const keys = await self.caches.keys() - await Promise.all(keys.map(key => self.caches.delete(key))) + await Promise.all(keys.map((key) => self.caches.delete(key))) // Force refresh all windows const clients = await self.clients.matchAll({ type: 'window' }) - clients.forEach(client => client.navigate(client.url)) + clients.forEach((client) => client.navigate(client.url)) }) diff --git a/shell/src/App.test.js b/shell/src/App.test.js index fe9b67174..7cb1f8eca 100644 --- a/shell/src/App.test.js +++ b/shell/src/App.test.js @@ -1,6 +1,6 @@ import React from 'react' import ReactDOM from 'react-dom' -import App from './App' +import App from './App.js' it('renders without crashing', () => { const div = document.createElement('div') diff --git a/shell/src/index.js b/shell/src/index.js index f0af4aa88..d72868e70 100644 --- a/shell/src/index.js +++ b/shell/src/index.js @@ -1,7 +1,7 @@ import { CssReset } from '@dhis2/ui' import React from 'react' import ReactDOM from 'react-dom' -import App from './App' +import App from './App.js' import 'typeface-roboto' import './index.css' diff --git a/yarn.lock b/yarn.lock index 8f8836dd9..be2d5f2e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1217,141 +1217,142 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@commitlint/cli@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-11.0.0.tgz#698199bc52afed50aa28169237758fa14a67b5d3" - integrity sha512-YWZWg1DuqqO5Zjh7vUOeSX76vm0FFyz4y0cpGMFhrhvUi5unc4IVfCXZ6337R9zxuBtmveiRuuhQqnRRer+13g== - dependencies: - "@babel/runtime" "^7.11.2" - "@commitlint/format" "^11.0.0" - "@commitlint/lint" "^11.0.0" - "@commitlint/load" "^11.0.0" - "@commitlint/read" "^11.0.0" - chalk "4.1.0" - core-js "^3.6.1" - get-stdin "8.0.0" +"@commitlint/cli@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.4.tgz#af4d9dd3c0122c7b39a61fa1cd2abbad0422dbe0" + integrity sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg== + dependencies: + "@commitlint/format" "^12.1.4" + "@commitlint/lint" "^12.1.4" + "@commitlint/load" "^12.1.4" + "@commitlint/read" "^12.1.4" + "@commitlint/types" "^12.1.4" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" - yargs "^15.1.0" + yargs "^16.2.0" -"@commitlint/config-conventional@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-11.0.0.tgz#3fa300a1b639273946de3c3f15e1cda518333422" - integrity sha512-SNDRsb5gLuDd2PL83yCOQX6pE7gevC79UPFx+GLbLfw6jGnnbO9/tlL76MLD8MOViqGbo7ZicjChO9Gn+7tHhA== +"@commitlint/config-conventional@^13.1.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-13.2.0.tgz#2ad24fecc56ae9619dbe0934b98a98b18ace0bec" + integrity sha512-7u7DdOiF+3qSdDlbQGfpvCH8DCQdLFvnI2+VucYmmV7E92iD6t9PBj+UjIoSQCaMAzYp27Vkall78AkcXBh6Xw== dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/ensure@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-11.0.0.tgz#3e796b968ab5b72bc6f8a6040076406306c987fb" - integrity sha512-/T4tjseSwlirKZdnx4AuICMNNlFvRyPQimbZIOYujp9DSO6XRtOy9NrmvWujwHsq9F5Wb80QWi4WMW6HMaENug== +"@commitlint/ensure@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.4.tgz#287ae2dcc5ccb086e749705b1bd9bdb99773056f" + integrity sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.1.4" lodash "^4.17.19" -"@commitlint/execute-rule@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-11.0.0.tgz#3ed60ab7a33019e58d90e2d891b75d7df77b4b4d" - integrity sha512-g01p1g4BmYlZ2+tdotCavrMunnPFPhTzG1ZiLKTCYrooHRbmvqo42ZZn4QMStUEIcn+jfLb6BRZX3JzIwA1ezQ== +"@commitlint/execute-rule@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz#9973b02e9779adbf1522ae9ac207a4815ec73de1" + integrity sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg== -"@commitlint/format@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-11.0.0.tgz#ac47b0b9ca46540c0082c721b290794e67bdc51b" - integrity sha512-bpBLWmG0wfZH/svzqD1hsGTpm79TKJWcf6EXZllh2J/LSSYKxGlv967lpw0hNojme0sZd4a/97R3qA2QHWWSLg== +"@commitlint/format@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.4.tgz#db2d46418a6ae57c90e5f7f65dff46f0265d9f24" + integrity sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.1.4" chalk "^4.0.0" -"@commitlint/is-ignored@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-11.0.0.tgz#7b803eda56276dbe7fec51eb1510676198468f39" - integrity sha512-VLHOUBN+sOlkYC4tGuzE41yNPO2w09sQnOpfS+pSPnBFkNUUHawEuA44PLHtDvQgVuYrMAmSWFQpWabMoP5/Xg== +"@commitlint/is-ignored@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz#4c430bc3b361aa9be5cd4ddb252c1559870ea7bc" + integrity sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw== dependencies: - "@commitlint/types" "^11.0.0" - semver "7.3.2" + "@commitlint/types" "^12.1.4" + semver "7.3.5" -"@commitlint/lint@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-11.0.0.tgz#01e062cd1b0e7c3d756aa2c246462e0b6a3348a4" - integrity sha512-Q8IIqGIHfwKr8ecVZyYh6NtXFmKw4YSEWEr2GJTB/fTZXgaOGtGFZDWOesCZllQ63f1s/oWJYtVv5RAEuwN8BQ== - dependencies: - "@commitlint/is-ignored" "^11.0.0" - "@commitlint/parse" "^11.0.0" - "@commitlint/rules" "^11.0.0" - "@commitlint/types" "^11.0.0" - -"@commitlint/load@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-11.0.0.tgz#f736562f0ffa7e773f8808fea93319042ee18211" - integrity sha512-t5ZBrtgvgCwPfxmG811FCp39/o3SJ7L+SNsxFL92OR4WQxPcu6c8taD0CG2lzOHGuRyuMxZ7ps3EbngT2WpiCg== - dependencies: - "@commitlint/execute-rule" "^11.0.0" - "@commitlint/resolve-extends" "^11.0.0" - "@commitlint/types" "^11.0.0" - chalk "4.1.0" +"@commitlint/lint@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.4.tgz#856b7fd2b2e6367b836cb84a12f1c1b3c0e40d22" + integrity sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA== + dependencies: + "@commitlint/is-ignored" "^12.1.4" + "@commitlint/parse" "^12.1.4" + "@commitlint/rules" "^12.1.4" + "@commitlint/types" "^12.1.4" + +"@commitlint/load@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.4.tgz#e3c2dbc0e7d8d928f57a6878bd7219909fc0acab" + integrity sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA== + dependencies: + "@commitlint/execute-rule" "^12.1.4" + "@commitlint/resolve-extends" "^12.1.4" + "@commitlint/types" "^12.1.4" + chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-11.0.0.tgz#83554c3cbbc884fd07b473593bc3e94bcaa3ee05" - integrity sha512-01ObK/18JL7PEIE3dBRtoMmU6S3ecPYDTQWWhcO+ErA3Ai0KDYqV5VWWEijdcVafNpdeUNrEMigRkxXHQLbyJA== +"@commitlint/message@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.4.tgz#3895edcc0709deca5945f3d55f5ea95a9f1f446d" + integrity sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA== -"@commitlint/parse@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-11.0.0.tgz#d18b08cf67c35d02115207d7009306a2e8e7c901" - integrity sha512-DekKQAIYWAXIcyAZ6/PDBJylWJ1BROTfDIzr9PMVxZRxBPc1gW2TG8fLgjZfBP5mc0cuthPkVi91KQQKGri/7A== +"@commitlint/parse@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.4.tgz#ba03d54d24ef84f6fd2ff31c5e9998b22d7d0aa1" + integrity sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw== dependencies: - conventional-changelog-angular "^5.0.0" + "@commitlint/types" "^12.1.4" + conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-11.0.0.tgz#f24240548c63587bba139fa5a364cab926077016" - integrity sha512-37V0V91GSv0aDzMzJioKpCoZw6l0shk7+tRG8RkW1GfZzUIytdg3XqJmM+IaIYpaop0m6BbZtfq+idzUwJnw7g== +"@commitlint/read@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.4.tgz#552fda42ef185d5b578beb6f626a5f8b282de3a6" + integrity sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg== dependencies: - "@commitlint/top-level" "^11.0.0" + "@commitlint/top-level" "^12.1.4" + "@commitlint/types" "^12.1.4" fs-extra "^9.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-11.0.0.tgz#158ecbe27d4a2a51d426111a01478e216fbb1036" - integrity sha512-WinU6Uv6L7HDGLqn/To13KM1CWvZ09VHZqryqxXa1OY+EvJkfU734CwnOEeNlSCK7FVLrB4kmodLJtL1dkEpXw== +"@commitlint/resolve-extends@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz#e758ed7dcdf942618b9f603a7c28a640f6a0802a" + integrity sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-11.0.0.tgz#bdb310cc6fc55c9f8d7d917a22b69055c535c375" - integrity sha512-2hD9y9Ep5ZfoNxDDPkQadd2jJeocrwC4vJ98I0g8pNYn/W8hS9+/FuNpolREHN8PhmexXbkjrwyQrWbuC0DVaA== +"@commitlint/rules@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.4.tgz#0e141b08caa3d7bdc48aa784baa8baff3efd64db" + integrity sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg== dependencies: - "@commitlint/ensure" "^11.0.0" - "@commitlint/message" "^11.0.0" - "@commitlint/to-lines" "^11.0.0" - "@commitlint/types" "^11.0.0" + "@commitlint/ensure" "^12.1.4" + "@commitlint/message" "^12.1.4" + "@commitlint/to-lines" "^12.1.4" + "@commitlint/types" "^12.1.4" -"@commitlint/to-lines@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-11.0.0.tgz#86dea151c10eea41e39ea96fa4de07839258a7fe" - integrity sha512-TIDTB0Y23jlCNubDROUVokbJk6860idYB5cZkLWcRS9tlb6YSoeLn1NLafPlrhhkkkZzTYnlKYzCVrBNVes1iw== +"@commitlint/to-lines@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.4.tgz#caa582dbf121f377a0588bb64e25c4854843cd25" + integrity sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw== -"@commitlint/top-level@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-11.0.0.tgz#bb2d1b6e5ed3be56874633b59e1f7de118c32783" - integrity sha512-O0nFU8o+Ws+py5pfMQIuyxOtfR/kwtr5ybqTvR+C2lUPer2x6lnQU+OnfD7hPM+A+COIUZWx10mYQvkR3MmtAA== +"@commitlint/top-level@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.4.tgz#96d5c715bfc1bdf86dfcf11b67fc2cf7658c7a6e" + integrity sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg== dependencies: find-up "^5.0.0" -"@commitlint/types@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-11.0.0.tgz#719cf05fcc1abb6533610a2e0f5dd1e61eac14fe" - integrity sha512-VoNqai1vR5anRF5Tuh/+SWDFk7xi7oMwHrHrbm1BprYXjB2RJsWLhUrStMssDxEl5lW/z3EUdg8RvH/IUBccSQ== +"@commitlint/types@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.4.tgz#9618a5dc8991fb58e6de6ed89d7bf712fa74ba7e" + integrity sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw== + dependencies: + chalk "^4.0.0" "@csstools/convert-colors@^1.4.0": version "1.4.0" @@ -2010,28 +2011,28 @@ handlebars "^4.7.3" isbinaryfile "^4.0.4" -"@dhis2/cli-style@^9.2.0": - version "9.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/cli-style/-/cli-style-9.2.0.tgz#0b342838207abb0189c654a4d2e71304062b6a5c" - integrity sha512-CbKcpvqtYy2OGpjbQP3HS8AxLHIVn6EBTeno1V9zhGGfzttNDuyghRapmY+/Cr9Ay/9b327n6zeOrAPv1AM6Tw== +"@dhis2/cli-style@^10.4.1": + version "10.4.1" + resolved "https://registry.yarnpkg.com/@dhis2/cli-style/-/cli-style-10.4.1.tgz#1186d79f4b4ef2802832a116562041ae50c596dc" + integrity sha512-4INZ2T67kZXkykUuNr9TqL0B88HYRYvtc2ctDV0IemK5bSNiwoQrgM6lqMIFHE5T48DEaFTQ3rvrd0nLjsW6Ng== dependencies: - "@commitlint/cli" "^11.0.0" - "@commitlint/config-conventional" "^11.0.0" + "@commitlint/cli" "^12.1.4" + "@commitlint/config-conventional" "^13.1.0" "@dhis2/cli-helpers-engine" "^3.0.0" - "@ls-lint/ls-lint" "^1.9.2" + "@ls-lint/ls-lint" "^1.10.0" babel-eslint "^10.1.0" - eslint "^7.18.0" - eslint-config-prettier "^7.2.0" + eslint "^7.32.0" + eslint-config-prettier "^8.3.0" eslint-plugin-import "^2.22.1" - eslint-plugin-react "^7.22.0" + eslint-plugin-react "^7.26.0" fast-glob "^3.2.5" find-up "^5.0.0" - fs-extra "^9.1.0" - husky "^5.2.0" + fs-extra "^10.0.0" + husky "^7.0.2" micromatch "^4.0.4" perfy "^1.1.5" - prettier "^2.2.1" - semver "^7.3.4" + prettier "^2.4.1" + semver "^7.3.5" yargs "^16.2.0" "@dhis2/cli-utils-docsite@^3.0.0": @@ -2167,6 +2168,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@hapi/address@2.x.x", "@hapi/address@^2.1.2": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -2220,6 +2236,20 @@ dependencies: "@hapi/hoek" "^8.3.0" +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2581,10 +2611,10 @@ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.3.1.tgz#b50a781709c81e10701004214340f25475a171a0" integrity sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw== -"@ls-lint/ls-lint@^1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" - integrity sha512-sugEjWjSSy9OHF6t1ZBLZCAROj52cZthB9dIePmzZzzMwmWwy3qAEMSdJheHeS1FOwDZI7Ipm1H/bWgzJNnSAw== +"@ls-lint/ls-lint@^1.10.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.11.0.tgz#fff074121e72bbbf6f1e5da05b916196039479df" + integrity sha512-YwVzEaGDM5LvRN7fn+8hYLTgcXsyksAr3V1x76/V3mWyaqKUAo4llcCd8lYoBCo4bxVgFq2pzPDQpeunZejLQg== "@nodelib/fs.scandir@2.1.3": version "2.1.3" @@ -4012,6 +4042,17 @@ array-includes@^3.1.1, array-includes@^3.1.3: get-intrinsic "^1.1.1" is-string "^1.0.5" +array-includes@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -4060,6 +4101,16 @@ array.prototype.flatmap@^1.2.4: es-abstract "^1.18.0-next.1" function-bind "^1.1.1" +array.prototype.flatmap@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz#a7e8ed4225f4788a70cd910abcf0791e76a5534f" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -5028,14 +5079,6 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@4.1.0, chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -5044,6 +5087,14 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -5592,10 +5643,10 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.0: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== +conventional-changelog-angular@^5.0.11: + version "5.0.13" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" + integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== dependencies: compare-func "^2.0.0" q "^1.5.1" @@ -5679,7 +5730,7 @@ core-js@^2.4.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== -core-js@^3.6.1, core-js@^3.6.5: +core-js@^3.6.5: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== @@ -6213,6 +6264,14 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -6778,11 +6837,47 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstrac string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.0.tgz#b2d526489cceca004588296334726329e0a6bfb6" + integrity sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.1" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + es-module-lexer@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.6.0.tgz#e72ab05b7412e62b9be37c37a09bdb6000d706f0" integrity sha512-f8kcHX1ArhllUtb/wVSyvygoKCznIjnxhLxy7TCvIiMdT7fL4ZDTIKaadMe6eLvOXg6Wk02UeoFgUoZ2EKZZUA== +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -6855,10 +6950,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" - integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== +eslint-config-prettier@^8.3.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-config-react-app@^6.0.0: version "6.0.0" @@ -6939,7 +7034,7 @@ eslint-plugin-react-hooks@^4.2.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ== -eslint-plugin-react@^7.21.5, eslint-plugin-react@^7.22.0: +eslint-plugin-react@^7.21.5: version "7.24.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz#eadedfa351a6f36b490aa17f4fa9b14e842b9eb4" integrity sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q== @@ -6957,6 +7052,26 @@ eslint-plugin-react@^7.21.5, eslint-plugin-react@^7.22.0: resolve "^2.0.0-next.3" string.prototype.matchall "^4.0.5" +eslint-plugin-react@^7.26.0: + version "7.29.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz#4717de5227f55f3801a5fd51a16a4fa22b5914d2" + integrity sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ== + dependencies: + array-includes "^3.1.4" + array.prototype.flatmap "^1.2.5" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.0" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.6" + eslint-plugin-testing-library@^3.9.2: version "3.10.0" resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.0.tgz#8c3c9c475bb4e5794446920d363403ae5bcf7f1c" @@ -7009,7 +7124,7 @@ eslint-webpack-plugin@^2.5.2: normalize-path "^3.0.0" schema-utils "^3.0.0" -eslint@^7.11.0, eslint@^7.18.0: +eslint@^7.11.0: version "7.28.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820" integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g== @@ -7054,6 +7169,52 @@ eslint@^7.11.0, eslint@^7.18.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" @@ -7092,6 +7253,11 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== +estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" @@ -7670,6 +7836,15 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -7688,7 +7863,7 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.0, fs-extra@^9.0.1, fs-extra@^9.1.0: +fs-extra@^9.0.0, fs-extra@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -7772,6 +7947,16 @@ function.prototype.name@^1.1.2: es-abstract "^1.17.0-next.1" functions-have-names "^1.2.0" +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" @@ -7782,6 +7967,11 @@ functions-have-names@^1.2.0: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.1.tgz#a981ac397fa0c9964551402cdc5533d7a4d52f91" integrity sha512-j48B/ZI7VKs3sgeI2cZp7WXWmZXu7Iq5pl5/vptV5N2mq+DGFuS/ulaDjtaoLpYzuD6u8UgrUKHfgo7fDTSiBA== +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gaze@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" @@ -7818,11 +8008,6 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-stdin@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" - integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -7847,6 +8032,14 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -8076,6 +8269,11 @@ has-bigints@^1.0.1: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -8086,11 +8284,30 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -8386,10 +8603,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.2.0.tgz#fc5e1c2300d34855d47de4753607d00943fc0802" - integrity sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg== +husky@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" + integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== i18next-conv@^9: version "9.2.1" @@ -8730,6 +8947,11 @@ is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -8879,6 +9101,11 @@ is-negative-zero@^2.0.1: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-npm@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053" @@ -8962,6 +9189,14 @@ is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.3: call-bind "^1.0.2" has-symbols "^1.0.2" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" @@ -8984,6 +9219,13 @@ is-root@2.1.0: resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -8999,6 +9241,13 @@ is-string@^1.0.5, is-string@^1.0.6: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== +is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" @@ -9047,6 +9296,13 @@ is-valid-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -10917,6 +11173,13 @@ minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist-options@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" @@ -11368,6 +11631,11 @@ object-inspect@^1.10.3, object-inspect@^1.7.0, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" + integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== + object-is@^1.0.1, object-is@^1.0.2, object-is@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" @@ -11412,6 +11680,15 @@ object.entries@^1.1.0, object.entries@^1.1.1, object.entries@^1.1.2, object.entr define-properties "^1.1.3" es-abstract "^1.18.2" +object.entries@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + object.fromentries@^2.0.2, object.fromentries@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.4.tgz#26e1ba5c4571c5c6f0890cef4473066456a120b8" @@ -11422,6 +11699,15 @@ object.fromentries@^2.0.2, object.fromentries@^2.0.4: es-abstract "^1.18.0-next.2" has "^1.0.3" +object.fromentries@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -11430,6 +11716,14 @@ object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0 define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +object.hasown@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.19.5" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -11446,6 +11740,15 @@ object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.4: define-properties "^1.1.3" es-abstract "^1.18.2" +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + oblivious-set@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.0.0.tgz#c8316f2c2fb6ff7b11b6158db3234c49f733c566" @@ -12662,10 +12965,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== +prettier@^2.4.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" + integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== pretty-bytes@^5.3.0: version "5.4.1" @@ -12758,6 +13061,15 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + proxy-addr@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" @@ -13328,6 +13640,15 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" +regexp.prototype.flags@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" @@ -13895,15 +14216,22 @@ semver@7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@7.3.5, semver@^7.2.1, semver@^7.3.2: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@^7.3.5: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" @@ -14524,6 +14852,20 @@ string.prototype.matchall@^4.0.5: regexp.prototype.flags "^1.3.1" side-channel "^1.0.4" +string.prototype.matchall@^4.0.6: + version "4.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + string.prototype.trim@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz#141233dff32c82bfad80684d7e5f0869ee0fb782" @@ -14541,6 +14883,15 @@ string.prototype.trimend@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string.prototype.trimstart@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" @@ -14549,6 +14900,15 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -15337,6 +15697,16 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -16538,7 +16908,7 @@ yargs@^13.1.0, yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.1.0, yargs@^15.3.1, yargs@^15.4.1: +yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==