Skip to content

Commit

Permalink
chore(deps): update all dependencies (#2199)
Browse files Browse the repository at this point in the history
* chore(deps): update all dependencies

* chore: format with prettier

* Create thin-camels-knock.md

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: tdeekens <tobias.deekens@commercetools.com>
  • Loading branch information
3 people authored May 11, 2021
1 parent 9b9cf92 commit 0bfa161
Show file tree
Hide file tree
Showing 66 changed files with 985 additions and 1,046 deletions.
12 changes: 12 additions & 0 deletions .changeset/thin-camels-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@commercetools-frontend/actions-global": patch
"@commercetools-frontend/application-components": patch
"@commercetools-frontend/application-config": patch
"@commercetools-frontend/application-shell-connectors": patch
"@commercetools-frontend/application-shell": patch
"@commercetools-frontend/babel-preset-mc-app": patch
"@commercetools-backend/express": patch
"merchant-center-application-template-starter": patch
---

chore(deps): update all dependencies
4 changes: 2 additions & 2 deletions application-templates/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prop-types": "15.7.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "5.17.4",
"react-intl": "5.17.5",
"react-redux": "7.2.4",
"react-router-dom": "5.2.0",
"redux": "4.1.0"
Expand All @@ -39,7 +39,7 @@
"@commercetools-frontend/jest-preset-mc-app": "20.0.1",
"@commercetools-frontend/mc-dev-authentication": "19.0.0",
"@commercetools-frontend/mc-scripts": "20.1.1",
"@formatjs/cli": "4.2.11",
"@formatjs/cli": "4.2.12",
"@manypkg/cli": "0.17.0",
"@testing-library/react": "11.2.6",
"jest": "26.6.3"
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@commercetools/github-labels": "1.1.0",
"@commitlint/cli": "12.1.1",
"@commitlint/config-conventional": "12.1.1",
"@formatjs/cli": "4.2.11",
"@formatjs/cli": "4.2.12",
"@graphql-cli/codegen": "1.17.23",
"@graphql-cli/coverage": "2.1.0",
"@graphql-cli/validate": "2.1.0",
Expand All @@ -115,20 +115,20 @@
"@graphql-codegen/typescript-graphql-files-modules": "1.18.1",
"@graphql-codegen/typescript-operations": "1.17.16",
"@manypkg/cli": "0.17.0",
"@percy/cli": "1.0.0-beta.48",
"@percy/cli": "1.0.0-beta.49",
"@percy/cypress": "3.1.0",
"@percy/puppeteer": "2.0.0",
"@preconstruct/cli": "2.0.7",
"@preconstruct/cli": "2.1.0",
"@sindresorhus/slugify": "1.1.2",
"@svgr/cli": "5.5.0",
"@svgr/plugin-jsx": "5.5.0",
"@svgr/plugin-svgo": "5.5.0",
"@testing-library/cypress": "7.0.6",
"@testing-library/react": "11.2.6",
"@types/faker": "5.5.3",
"@types/faker": "5.5.5",
"@types/jest-environment-puppeteer": "4.4.1",
"@types/jquery": "3.5.5",
"@types/node": "14.14.43",
"@types/node": "14.14.44",
"@types/puppeteer": "5.4.3",
"@types/uuid": "8.3.0",
"@types/webpack-env": "1.16.0",
Expand All @@ -138,9 +138,9 @@
"babel-plugin-transform-rename-import": "2.3.0",
"babel-plugin-typescript-to-proptypes": "1.4.2",
"cross-env": "7.0.3",
"cypress": "7.2.0",
"dotenv": "9.0.2",
"eslint": "7.25.0",
"cypress": "7.3.0",
"dotenv": "8.6.0",
"eslint": "7.26.0",
"eslint-formatter-pretty": "4.0.0",
"eslint-plugin-graphql": "4.0.0",
"faker": "5.5.3",
Expand All @@ -155,11 +155,11 @@
"jest-watch-typeahead": "0.6.3",
"lint-staged": "10.5.4",
"mri": "1.1.6",
"postcss": "8.2.13",
"postcss": "8.2.15",
"postcss-load-config": "3.0.1",
"postcss-modules": "4.0.0",
"prettier": "2.2.1",
"puppeteer": "9.0.0",
"prettier": "2.3.0",
"puppeteer": "9.1.1",
"rcfile": "1.0.3",
"replace": "1.2.1",
"rosie": "2.1.0",
Expand All @@ -175,17 +175,17 @@
},
"resolutions": {
"@babel/core": "7.14.0",
"@babel/preset-env": "7.14.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-beta.4",
"@babel/preset-env": "7.14.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-beta.7",
"@types/puppeteer": "5.4.3",
"@types/react-router": "5.1.13",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"@types/react-router": "5.1.14",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"graphql": "15.5.0",
"intl-messageformat-parser": "6.4.4",
"**/intl-messageformat-parser": "6.4.4",
"pretty-format": "26.6.2",
"react-intl": "5.17.4"
"react-intl": "5.17.5"
},
"engines": {
"node": ">=12 || >=14",
Expand Down
2 changes: 1 addition & 1 deletion packages-backend/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@babel/runtime": "7.14.0",
"@babel/runtime-corejs3": "7.14.0",
"@types/node": "14.14.43",
"@types/node": "14.14.44",
"express": "4.17.1",
"express-jwt": "6.0.0",
"jwks-rsa": "2.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import type { TSessionMiddlewareOptions } from '../types';
import { createSessionAuthVerifier } from '../auth';

function createSessionMiddleware(options: TSessionMiddlewareOptions) {
const sessionAuthVerifier = createSessionAuthVerifier<Request, Response>(
options
);
const sessionAuthVerifier =
createSessionAuthVerifier<Request, Response>(options);

return async (request: Request, response: Response, next: NextFunction) => {
try {
Expand Down
3 changes: 2 additions & 1 deletion packages-backend/express/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export type TAudience = string;

export type TIssuer = string;

export type TCloudIdentifier = typeof CLOUD_IDENTIFIERS[keyof typeof CLOUD_IDENTIFIERS];
export type TCloudIdentifier =
typeof CLOUD_IDENTIFIERS[keyof typeof CLOUD_IDENTIFIERS];

export type TSessionMiddlewareOptions = {
// The public-facing URL used to connect to the server / serverless function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { hideAllPageNotifications } from '../actions';

export default function useHideAllPageNotifications() {
const dispatch = useDispatch();
return React.useCallback(() => dispatch(hideAllPageNotifications()), [
dispatch,
]);
return React.useCallback(
() => dispatch(hideAllPageNotifications()),
[dispatch]
);
}
4 changes: 2 additions & 2 deletions packages/application-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@commercetools-uikit/secondary-icon-button": "^12.0.4",
"@commercetools-uikit/spacings": "^12.0.0",
"@commercetools-uikit/text": "^12.0.0",
"@emotion/react": "11.1.5",
"@emotion/react": "11.4.0",
"@emotion/styled": "11.3.0",
"@types/lodash": "^4.14.167",
"@types/prop-types": "^15.7.3",
Expand All @@ -66,7 +66,7 @@
"devDependencies": {
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "5.17.4"
"react-intl": "5.17.5"
},
"peerDependencies": {
"react": "17.x",
Expand Down
4 changes: 2 additions & 2 deletions packages/application-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"dependencies": {
"@babel/runtime": "7.14.0",
"@babel/runtime-corejs3": "7.14.0",
"ajv": "8.2.0",
"core-js": "3.11.1",
"ajv": "8.3.0",
"core-js": "3.12.1",
"cosmiconfig": "7.0.0",
"lodash": "4.17.21",
"omit-empty-es": "1.1.3"
Expand Down
14 changes: 8 additions & 6 deletions packages/application-config/src/process-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ const processConfig = ({

const loadedAppConfig = configJson ?? loadConfig();
validateConfig(loadedAppConfig);
const validatedLoadedAppConfig = loadedAppConfig as JSONSchemaForCustomApplicationConfigurationFiles;

const appConfig = substituteEnvVariablePlaceholders<JSONSchemaForCustomApplicationConfigurationFiles>(
validatedLoadedAppConfig,
{ processEnv }
);
const validatedLoadedAppConfig =
loadedAppConfig as JSONSchemaForCustomApplicationConfigurationFiles;

const appConfig =
substituteEnvVariablePlaceholders<JSONSchemaForCustomApplicationConfigurationFiles>(
validatedLoadedAppConfig,
{ processEnv }
);
const additionalAppEnv = appConfig.additionalEnv ?? {};
const revision = (additionalAppEnv.revision as string) ?? '';

Expand Down
6 changes: 4 additions & 2 deletions packages/application-config/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schema'

import { CLOUD_IDENTIFIERS } from './constants';

export type TJSONSchemaForCustomApplicationConfigurationFiles = JSONSchemaForCustomApplicationConfigurationFiles;
export type TJSONSchemaForCustomApplicationConfigurationFiles =
JSONSchemaForCustomApplicationConfigurationFiles;

export type CloudIdentifier = typeof CLOUD_IDENTIFIERS[keyof typeof CLOUD_IDENTIFIERS];
export type CloudIdentifier =
typeof CLOUD_IDENTIFIERS[keyof typeof CLOUD_IDENTIFIERS];

// Supported environment variables
export type ApplicationConfigEnv = 'production' | 'development';
Expand Down
9 changes: 5 additions & 4 deletions packages/application-config/src/validate-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ type ErrorAdditionalProperty = ErrorObject<
type ErrorEnum = ErrorObject<'enum', { allowedValues: string[] }>;

const ajv = new Ajv({ strict: true });
const validate = ajv.compile<JSONSchemaForCustomApplicationConfigurationFiles>(
schemaJson
);
const validate =
ajv.compile<JSONSchemaForCustomApplicationConfigurationFiles>(schemaJson);

const printErrors = (errors?: ErrorObject[] | null) => {
if (!errors) {
Expand All @@ -29,7 +28,9 @@ const printErrors = (errors?: ErrorObject[] | null) => {
(error as ErrorAdditionalProperty).params.additionalProperty
}`;
case 'enum':
return `${baseMessage}: ${(error as ErrorEnum).params.allowedValues.toString()}`;
return `${baseMessage}: ${(
error as ErrorEnum
).params.allowedValues.toString()}`;
default:
return baseMessage;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/application-shell-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@babel/runtime-corejs3": "7.14.0",
"@commercetools-frontend/constants": "20.0.1",
"@commercetools-frontend/sentry": "20.0.1",
"@emotion/react": "11.1.5",
"@emotion/react": "11.4.0",
"@types/lodash": "^4.14.167",
"@types/prop-types": "^15.7.3",
"@types/react": "^17.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ const ApplicationContext = <AdditionalEnvironmentProperties extends {}>(
// we ensure that, when we read from the context, we always get actual
// context object and not the initial value.
// Therefore, we can safely cast the value to be out `TApplicationContext` type.
const applicationContext = context as TApplicationContext<AdditionalEnvironmentProperties>;
const applicationContext =
context as TApplicationContext<AdditionalEnvironmentProperties>;
return props.render(applicationContext);
}}
</Context.Consumer>
Expand Down Expand Up @@ -241,7 +242,8 @@ function useApplicationContextHook<
// we ensure that, when we read from the context, we always get actual
// context object and not the initial value.
// Therefore, we can safely cast the value to be out `TApplicationContext` type.
const applicationContext = context as TApplicationContext<AdditionalEnvironmentProperties>;
const applicationContext =
context as TApplicationContext<AdditionalEnvironmentProperties>;
return selector ? selector(applicationContext) : applicationContext;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ import type {
TDataFences as NormalizedDataFences,
} from './normalizers';

export type TProviderProps<
AdditionalEnvironmentProperties extends {}
> = ProviderProps<AdditionalEnvironmentProperties>;
export type TApplicationContext<
AdditionalEnvironmentProperties extends {}
> = ApplicationContext<AdditionalEnvironmentProperties>;
export type TProviderProps<AdditionalEnvironmentProperties extends {}> =
ProviderProps<AdditionalEnvironmentProperties>;
export type TApplicationContext<AdditionalEnvironmentProperties extends {}> =
ApplicationContext<AdditionalEnvironmentProperties>;

export type TNormalizedMenuVisibilities = NormalizedMenuVisibilities;
export type TNormalizedPermissions = NormalizedPermissions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,36 +120,41 @@ export const normalizeAllAppliedActionRights = (
const normalizeAppliedDataFencesForStoresByResourceType = (
dataFences: TStoreDataFence[]
): TDataFenceGroupedByResourceType => {
const groupedByResourceType = dataFences.reduce<TDataFenceStoresGroupByResourceType>(
(previousGroupsOfSameType, appliedDataFence) => {
if (!appliedDataFence) return previousGroupsOfSameType;
const previousGroup = previousGroupsOfSameType[appliedDataFence.group];
return {
...previousGroupsOfSameType,
[appliedDataFence.group]: [...(previousGroup || []), appliedDataFence],
};
},
{}
);
const groupedByResourceType =
dataFences.reduce<TDataFenceStoresGroupByResourceType>(
(previousGroupsOfSameType, appliedDataFence) => {
if (!appliedDataFence) return previousGroupsOfSameType;
const previousGroup = previousGroupsOfSameType[appliedDataFence.group];
return {
...previousGroupsOfSameType,
[appliedDataFence.group]: [
...(previousGroup || []),
appliedDataFence,
],
};
},
{}
);
return Object.entries(
groupedByResourceType
).reduce<TDataFenceGroupedByResourceType>(
(previousGroupedByResourceType, [resourceType, dataFences]) => {
const groupByDataFenceName = dataFences.reduce<TDataFenceGroupedByPermission>(
(nextDataFenceValues, dataFence) => {
const dataFenceByName = nextDataFenceValues[dataFence.name] || {
values: [],
};
return {
...nextDataFenceValues,
[dataFence.name]: {
...dataFenceByName,
values: [...dataFenceByName.values, dataFence.value],
},
};
},
{}
);
const groupByDataFenceName =
dataFences.reduce<TDataFenceGroupedByPermission>(
(nextDataFenceValues, dataFence) => {
const dataFenceByName = nextDataFenceValues[dataFence.name] || {
values: [],
};
return {
...nextDataFenceValues,
[dataFence.name]: {
...dataFenceByName,
values: [...dataFenceByName.values, dataFence.value],
},
};
},
{}
);
return {
...previousGroupedByResourceType,
[resourceType]: groupByDataFenceName,
Expand Down Expand Up @@ -196,17 +201,18 @@ export const normalizeAllAppliedDataFences = (
if (!allAppliedDataFences || allAppliedDataFences.length === 0) {
return null;
}
const groupedByType = allAppliedDataFences.reduce<TDataFenceStoresGroupByResourceType>(
(previousGroupsOfSameType, appliedDataFence) => {
if (!appliedDataFence) return previousGroupsOfSameType;
const previousGroup = previousGroupsOfSameType[appliedDataFence.type];
return {
...previousGroupsOfSameType,
[appliedDataFence.type]: [...(previousGroup || []), appliedDataFence],
};
},
{}
);
const groupedByType =
allAppliedDataFences.reduce<TDataFenceStoresGroupByResourceType>(
(previousGroupsOfSameType, appliedDataFence) => {
if (!appliedDataFence) return previousGroupsOfSameType;
const previousGroup = previousGroupsOfSameType[appliedDataFence.type];
return {
...previousGroupsOfSameType,
[appliedDataFence.type]: [...(previousGroup || []), appliedDataFence],
};
},
{}
);
const normalizedDataFences = {
...('store' in groupedByType
? {
Expand Down
Loading

1 comment on commit 0bfa161

@vercel
Copy link

@vercel vercel bot commented on 0bfa161 May 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.