- Updated dependencies []:
- @commercetools-frontend/constants@22.41.0
- Updated dependencies []:
- @commercetools-frontend/constants@22.40.0
- Updated dependencies []:
- @commercetools-frontend/constants@22.39.1
- Updated dependencies []:
- @commercetools-frontend/constants@22.39.0
- Updated dependencies []:
- @commercetools-frontend/constants@22.38.3
- Updated dependencies [
f158094
]:- @commercetools-frontend/constants@22.38.2
- Updated dependencies []:
- @commercetools-frontend/constants@22.38.1
-
#3671
a435e7f
Thanks @renovate! - Update UI Kit dependencies to v19.20.1 -
#3688
9fde2af
Thanks @emmenko! - Adjust links to docs in schema files. Markheaders.strictTransportSecurity
as deprecated. -
Updated dependencies [
9fde2af
]:- @commercetools-frontend/constants@22.38.0
-
#3669
5583f0c
Thanks @emmenko! - Upgradeconsmiconfig
tov9
.This is mostly an internal change to load the config using async/await and to use the
cosmiconfig-typescript-loader
.
- Updated dependencies []:
- @commercetools-frontend/constants@22.37.0
-
#3666
57ef01b
Thanks @emmenko! - Remove unsupported cloud identifiers -
#3636
1f67b19
Thanks @mustafaasif2! - Remove support for localezh-CN
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.36.0
- @commercetools-frontend/constants@22.36.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.35.1
- @commercetools-frontend/constants@22.35.1
-
#3628
8e5b0cf
Thanks @emmenko! - The cloud identifiers for AWS regions have been renamed toaws-eu
andaws-us
.For backwards compatibility the value
aws-fra
andaws-ohio
still work. -
Updated dependencies [
be08ecc
]:- @commercetools-frontend/constants@22.35.0
- @commercetools-frontend/babel-preset-mc-app@22.35.0
- Updated dependencies [
e27a447
]:- @commercetools-frontend/constants@22.34.0
- @commercetools-frontend/babel-preset-mc-app@22.34.0
- #3610
c699f1b
Thanks @mustafaasif2! - Extends the cloudIdentifier configuration property enabling Custom Applications and Custom Views to use the Azure EU environment
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.33.0
- @commercetools-frontend/constants@22.33.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.32.2
- @commercetools-frontend/constants@22.32.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.32.1
- @commercetools-frontend/constants@22.32.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.32.0
- @commercetools-frontend/constants@22.32.0
-
#3584
2fe2e11
Thanks @emmenko! - Keep JS comments in type declarations -
Updated dependencies [
d4a26cd
]:- @commercetools-frontend/constants@22.31.0
- @commercetools-frontend/babel-preset-mc-app@22.31.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.30.3
- @commercetools-frontend/constants@22.30.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.30.2
- @commercetools-frontend/constants@22.30.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.30.1
- @commercetools-frontend/constants@22.30.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.30.0
- @commercetools-frontend/constants@22.30.0
- #3558
5363548
Thanks @CarlosCortizasCT! - Includes a new target for the cloudIdentifier configuration property so both Custom Applications and Custom Views can use the upcoming Azure US environment.
-
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.29.0
- @commercetools-frontend/constants@22.29.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.28.0
- @commercetools-frontend/constants@22.28.0
-
Updated dependencies [
4f00d48
]:- @commercetools-frontend/constants@22.27.0
- @commercetools-frontend/babel-preset-mc-app@22.27.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.26.0
- @commercetools-frontend/constants@22.26.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.25.1
- @commercetools-frontend/constants@22.25.1
-
#3502
b55d4e6
Thanks @Rombelirk! - Replace fs.exists with fs.access -
Updated dependencies [
b5e797f
]:- @commercetools-frontend/constants@22.25.0
- @commercetools-frontend/babel-preset-mc-app@22.25.0
-
Updated dependencies [
2431917
,c2bba1d
]:- @commercetools-frontend/constants@22.24.0
- @commercetools-frontend/babel-preset-mc-app@22.24.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.23.3
- @commercetools-frontend/constants@22.23.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.23.2
- @commercetools-frontend/constants@22.23.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.23.1
- @commercetools-frontend/constants@22.23.1
-
Updated dependencies [
5fa5dd6
,aa60c8e
]:- @commercetools-frontend/constants@22.23.0
- @commercetools-frontend/babel-preset-mc-app@22.23.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.22.0
- @commercetools-frontend/constants@22.22.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.21.0
- @commercetools-frontend/constants@22.21.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.20.0
- @commercetools-frontend/constants@22.20.0
- Updated dependencies [
dc2b492db
,325224ea5
]:- @commercetools-frontend/constants@22.19.0
- @commercetools-frontend/babel-preset-mc-app@22.19.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.18.0
- @commercetools-frontend/constants@22.18.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.17.2
- @commercetools-frontend/constants@22.17.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.17.1
- @commercetools-frontend/constants@22.17.1
- #3379
d2e3a2236
Thanks @tylermorrisford! - Update all logos inassets/logos/
, all logos inassets/images/
and embedded logo inapplication.html
.
-
#3387
047e44e01
Thanks @emmenko! - Include missing JSON schema files in package bundle. -
Updated dependencies [
d2e3a2236
]:- @commercetools-frontend/babel-preset-mc-app@22.17.0
- @commercetools-frontend/constants@22.17.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.16.0
- @commercetools-frontend/constants@22.16.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.15.1
- @commercetools-frontend/constants@22.15.1
-
#3351
72ae1d305
Thanks @emmenko! - Re-export regex for backwards compatibility -
Updated dependencies [
48f11f9dd
,72ae1d305
]:- @commercetools-frontend/constants@22.15.0
- @commercetools-frontend/babel-preset-mc-app@22.15.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.14.3
- @commercetools-frontend/constants@22.14.3
- Updated dependencies [
483fae792
]:- @commercetools-frontend/constants@22.14.2
- @commercetools-frontend/babel-preset-mc-app@22.14.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.14.1
- @commercetools-frontend/constants@22.14.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.14.0
- @commercetools-frontend/constants@22.14.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.13.2
- @commercetools-frontend/constants@22.13.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.13.1
- @commercetools-frontend/constants@22.13.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.13.0
- @commercetools-frontend/constants@22.13.0
-
#3292
5de8c88ed
Thanks @CarlosCortizasCT! - Add new helper functionscomputeCustomViewPermissionsKeys
andcomputeCustomViewResourceAccesses
to compute the permission names for Custom Views. -
#3291
d3f4c91f1
Thanks @kark! - Enhance the functionality of themc-scripts config:sync
command to support custom views.
- Updated dependencies [
d3f4c91f1
]:- @commercetools-frontend/constants@22.12.0
- @commercetools-frontend/babel-preset-mc-app@22.12.0
- Updated dependencies [
0375328b1
]:- @commercetools-frontend/constants@22.11.0
- @commercetools-frontend/babel-preset-mc-app@22.11.0
- #3272
deed7bafc
Thanks @CarlosCortizasCT! - We refactored the formatter functions to transform entry points to resource access names so it uses simplified names only for Custom Views (upcoming feature).
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.10.0
- @commercetools-frontend/constants@22.10.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.9.1
- @commercetools-frontend/constants@22.9.1
- Updated dependencies [
6023ff29e
]:- @commercetools-frontend/constants@22.9.0
- @commercetools-frontend/babel-preset-mc-app@22.9.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.8.4
- @commercetools-frontend/constants@22.8.4
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.8.3
- @commercetools-frontend/constants@22.8.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.8.2
- @commercetools-frontend/constants@22.8.2
-
#3235
ec2c26677
Thanks @emmenko! - Fix regression when parsing links for the account applications -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.8.1
- @commercetools-frontend/constants@22.8.1
- #3175
bd9df94b5
Thanks @CarlosCortizasCT! - Support loading and parsing of new config for Custom Views
-
Updated dependencies [
bd9df94b5
,e29ab64b6
,e29ab64b6
]:- @commercetools-frontend/constants@22.8.0
- @commercetools-frontend/babel-preset-mc-app@22.8.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.7.1
-
#3181
69667013c
Thanks @emmenko! - Update UI Kit dependencies -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.7.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.6.0
- #3143
6b6f15623
Thanks @kark! - Enable readingapplicationId
value from Custom Application config and sending it as a newapplication_id
claim (whenteam_id
claim is also provided)
-
#3147
bcfe23393
Thanks @kark! - ReadapplicationId
fromenv.production
rather thanenv.development
-
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.5.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.4.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.3.4
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.3.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.3.2
-
#3098
d8b48486a
Thanks @Rhotimee! - Add cloud identifier for CN prod -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.3.1
- #2976
9add8f46b
Thanks @emmenko! - We migrate from Yarn to Pnpm as the package manager for the App Kit repository. As a result of it there were several packages that didn't specify all the needed dependencies. This is fixed now.
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.3.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.2.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.2.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.1.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@22.0.1
-
#3026
968c3c4d2
Thanks @emmenko! - Upgrade following dependencies to major versions:jest
tov29.x
.jsdom
tov21.x
.eslint-plugin-jest
tov27.x
.
The package
@commercetools-frontend/jest-preset-mc-app
contains most of the updates and migration changes.We don't expect any specific migration effort besides updating all Jest dependencies to their latest version (including possible Jest plugins being used).
However, there are a couple of possible necessary updates to consider:
- Jest snapshots format changed a bit. You might need to update your snapshots by passing the option
-u
to the Jest command. - The ESLint plugin for Jest might yield some new errors due to its breaking changes. See changelog.
For more detailed information about upgrading Jest, please refer to the official guides:
-
#3039
76ba54c16
Thanks @emmenko! - Drop support for Node.jsv14
. Make sure you use Node.jsv16
or>=v18
.
- Updated dependencies [
76ba54c16
]:- @commercetools-frontend/babel-preset-mc-app@22.0.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.25.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.25.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.25.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.24.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.24.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.24.1
- #3012
7074d035c
Thanks @emmenko! - Support referencing Intl messages${intl:}
that use Transifex's Structured JSON format.
-
Updated dependencies [
a78e9684d
]:- @commercetools-frontend/babel-preset-mc-app@21.24.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.10
-
#2979
6dcd48525
Thanks @emmenko! - Refine engine version requirements for Nodejs to be14.x || >=16.0.0
-
Updated dependencies [
6dcd48525
]:- @commercetools-frontend/babel-preset-mc-app@21.23.9
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.8
-
Updated dependencies [
4377b3642
]:- @commercetools-frontend/babel-preset-mc-app@21.23.7
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.6
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.5
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.4
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.23.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.22.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.22.0
-
#2918
e52e8a782
Thanks @emmenko! - Revert usingworkspace:
protocol -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.21.2
-
#2914
63dc7cd5f
Thanks @emmenko! - Remove deprecated and experimental support forFeature-Policy
header -
#2881
e3ffe6c11
Thanks @emmenko! - Useworkspace:
version syntax for link workspace packages -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.21.1
-
#2799
033d95e08
Thanks @kark! - Enable configuring granular permissions in Custom Applications.Additional permissions are defined by adding permission groups in the Custom Application config. See docs.
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.21.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.5
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.4
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.3
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.2
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.20.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.19.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.18.1
-
#2834
84c29cebe
Thanks @kark! - Enable proper type inference inentryPointUriPathToResourceAccesses
andentryPointUriPathToPermissionKeys
functions -
#2862
836c86aa1
Thanks @emmenko! - Sanitize SVG icon only when comparing diffs, as the icon is sanitized in the API. Expose thesanitizeSvg
logic from the@commercetools-frontend/application-config
. -
#2860
53d2c287f
Thanks @CarlosCortizasCT! - Fix CSP headers processing at Custom Application build time when using a deployment URL without an ending backslash -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.18.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.17.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.16.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.15.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.14.3
-
Updated dependencies [
00d9edcb4
]:- @commercetools-frontend/babel-preset-mc-app@21.14.2
-
#2796
91c0da4f9
Thanks @emmenko! - Allow to pass additional permission group names to the "entry point formatters". Additionally, refine the inferred types. -
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.14.1
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.14.0
-
482ad98ee
Thanks @emmenko! - Nothing changed, the previous release21.13.0
had an issue publishing to NPM so we're bumping versions to trigger a new release. -
Updated dependencies [
482ad98ee
]:- @commercetools-frontend/babel-preset-mc-app@21.13.1
- #2761
d012420e5
Thanks @CarlosCortizasCT! - Update all dependencies
-
#2771
7d97b459e
Thanks @emmenko! - Downgradejsdom
tov16
, until we are able to upgrade to Jestv28+
-
Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.13.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.12.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.11.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.10.0
- #2701
22fcb200
Thanks @emmenko! - Simplify JSON schema and move validation out of schema. Export some constant values.
-
#2691
8367e1b7
Thanks @emmenko! - Add support in Vite config (experimental feature) to load.react.svg
files as React components using the SVGR plugin. -
Updated dependencies [
69a1fe13
]:- @commercetools-frontend/babel-preset-mc-app@21.9.0
- Updated dependencies []:
- @commercetools-frontend/babel-preset-mc-app@21.8.1
-
#2615
d6bfecf1
Thanks @kark! - Provide better support for developing Custom Applications in TypeScript.A shared TSConfig file is now available to be used as a base config in your
tsconfig.json
file:{ "extends": "@commercetools-frontend/application-config/tsconfig-mc-app.json" }
Furthermore, we provide a
client.d.ts
declaration file with some basic type shims for importing media assets:.mod.css
and.module.css
.png
.svg
You can include this using the TypeScript triple-slash directives:
/// <reference types="@commercetools-frontend/application-config/client" />
By default, this is included in the TypeScript starter template
src/index.tsx
entry point file.You can also include this in the
tsconfig.json
file in thecompilerOptions.types
field but we don't recommend to use that unless you are very familiar with the implications of using thetypes
field.
-
#2661
43a9df21
Thanks @emmenko! - Drop the copyright year from the license files -
Updated dependencies [
43a9df21
]:- @commercetools-frontend/babel-preset-mc-app@21.8.0
-
#2628
0b3ea758
Thanks @kark! - Expose a basetsconfig-mc-app.json
file to be used in a Custom Application TypeScript project.In your
tsconfig.json
file, extend the base config from the@commercetools-frontend/application-config
package:{ "extends": "@commercetools-frontend/application-config/tsconfig-mc-app.json" }
- #2601
5d0a461d
Thanks @ddouglasz! - validating entry point uri path should allow two characters
-
#2578
3180de7f
Thanks @emmenko! - Allow to extend the environment types of theApplicationRuntimeConfig
. This is useful if you want to have theadditionalEnv
properties typed.For example, given the following config:
{ "additionalEnv": { "trackingSentry": "https://000@sentry.io/000" } }
You can extend the type as following:
import type { ApplicationRuntimeConfig } from '@commercetools-frontend/application-config'; type TMyApplicationRuntimeConfig = ApplicationRuntimeConfig<{ trackingSentry: string; }>;
-
Updated dependencies [
dc76e5a9
]:- @commercetools-frontend/babel-preset-mc-app@21.3.4
- #2540
602822c0
Thanks @emmenko! - Fix computing submenu linkuriPath
when parsing local Custom Application config.
- Updated dependencies [
cc7c19d0
]:- @commercetools-frontend/babel-preset-mc-app@21.3.2
- #2524
ea1bee4c
Thanks @Rhotimee! - Expose a new functiongetConfigPath
to return the absolute file path of the Custom Application config file.
- #2522
bf57dc32
Thanks @emmenko! - Parsing the application config now exposes a new fielddata
that contains the mapped Custom Application data representation.
-
Updated dependencies [
6f3a2083
]:- @commercetools-frontend/babel-preset-mc-app@21.3.0
- #2501
78ab6456
Thanks @CarlosCortizasCT! - Fixed an issue when loading application config file in Windows OS
- #2474
e4eeccb1
Thanks @CarlosCortizasCT! - Allow to use environment variable placeholders for theentryPointUriPath
field.
-
#2430
bb1f7d75
Thanks @emmenko! - Following breaking changes were introduced:- New required fields in the Custom Application config.
- Menu links structure in Custom Application config changed a bit.
- The
ENABLE_OIDC_FOR_DEVELOPMENT
is now the default behavior. - The deprecated
menu.json
file and theDEV_ONLY_
props have been removed.
Note that if you were testing your Custom Application with Cypress, you need to use the
@commercetools-frontend/cypress
package to be able to use thecy.loginByOidc
command.For more information see Release notes v21.
-
#2430
bb1f7d75
Thanks @emmenko! - Use version range for Babel packages. -
Updated dependencies [
bb1f7d75
,eb8f5b2c
,bb1f7d75
,bb1f7d75
]:- @commercetools-frontend/babel-preset-mc-app@21.0.0
- Updated dependencies [
71171d65
]:- @commercetools-frontend/babel-preset-mc-app@21.0.0-rc.7
- Updated dependencies [
8c189ad3
]:- @commercetools-frontend/babel-preset-mc-app@21.0.0-rc.5
-
#2430
5ea8baf1
Thanks @emmenko! - Use version range for Babel packages. -
Updated dependencies [
5ea8baf1
]:- @commercetools-frontend/babel-preset-mc-app@21.0.0-rc.1
-
#2430
b8fb4cbb
Thanks @emmenko! - Following breaking changes were introduced:- New required fields in the Custom Application config.
- Menu links structure in Custom Application config changed a bit.
- The
ENABLE_OIDC_FOR_DEVELOPMENT
is now the default behavior. - The deprecated
menu.json
file and theDEV_ONLY_
props have been removed.
Note that if you were testing your Custom Application with Cypress, you need to use the
@commercetools-frontend/cypress
package to be able to use thecy.loginByOidc
command.For more information see Release notes v21.
-
Updated dependencies [
eb8f5b2c
]:- @commercetools-frontend/babel-preset-mc-app@21.0.0-rc.0
- #2433
d65e29e4
Thanks @emmenko! - Replacets-jest/utils
withjest-mock
, for using themocked
function.
-
Updated dependencies [
cf914004
]:- @commercetools-frontend/babel-preset-mc-app@20.12.1
- #2416
f549637b
Thanks @emmenko! - Add new SVG icons for Custom Applications. Test icon colors with VRT.
- #2403
59b72adf
Thanks @Rhotimee! - Allow to use the "frame-src" directive forheaders.csp
in the Custom Application config.
-
Updated dependencies [
d7fcf6fc
]:- @commercetools-frontend/babel-preset-mc-app@20.10.6
-
Updated dependencies [
7fa4d7d0
]:- @commercetools-frontend/babel-preset-mc-app@20.10.4
-
#2376
9d879503
Thanks @emmenko! - > For commercetools only.Allow to use OIDC login when developing against a local running MC API.
-
Updated dependencies [
f6b3ae02
]:- @commercetools-frontend/babel-preset-mc-app@20.10.3
-
#2356
e34fe076
Thanks @ByronDWall! - set node version to 16.8 in nvmrc to avoid a bug in node/v8 -
Updated dependencies [
3247e604
,91ba0910
,e34fe076
]:- @commercetools-frontend/babel-preset-mc-app@20.10.1
- #2333
d7b712e4
Thanks @emmenko! - Localized label field of menu links is optional and defaults to empty array.
-
Updated dependencies [
8c6c13a7
]:- @commercetools-frontend/babel-preset-mc-app@20.9.4
-
Updated dependencies [
83f2add2
]:- @commercetools-frontend/babel-preset-mc-app@20.9.3
-
#2317
487fcca6
Thanks @emmenko! - Add support for defining the Custom Application config as JS files.Until now a Custom Application config file had to be defined as a JSON file with one of the following names:
.custom-application-configrc
.custom-application-config.json
custom-application-config.json
On top of that, we built some "syntax features" to allow variable placeholders as a way to inject dynamic information into the static configuration file.
However, there are still some use cases where the information you need to provide must be imported from another file, for example a constants file or something similar.
To support such use cases, we now allow additional JS files to be used as a Custom Application config, specifically the following file extensions:
.js
.cjs
.mjs
.ts
The file must obviously return the configuration object.
NOTE that you can still use variable placeholders.
For example:
// constants.js const entryPointUriPath = 'test'; module.exports = { entryPointUriPath }; // custom-application-config.js const { entryPointUriPath } = require('./constants'); const name = 'Test application'; /** * @type {import('@commercetools-frontend/application-config').ConfigOptions} */ const config = { name, cloudIdentifier: 'gcp-eu', entryPointUriPath, env: { production: { url: '${env:APP_URL}', }, }, }; module.exports = config;
- Updated dependencies [
487fcca6
]:- @commercetools-frontend/babel-preset-mc-app@20.9.0
-
#2312
ca4e1441
Thanks @emmenko! - Introduce a new configuration option for defining menu links when developing a Custom Application.At the moment, menu links are expected to be defined in a
menu.json
file and loaded by the Custom Application using a special propDEV_ONLY__loadNavbarMenuConfig
passed to the<ApplicationShell>
. Something like this:<ApplicationShell // ... DEV_ONLY__loadNavbarMenuConfig={() => import('../../../menu.json').then((data) => data.default || data) } />
This poses some issues and confusion:
- The prop
DEV_ONLY__loadNavbarMenuConfig
is confusing, and users have to explicitly load themenu.json
with code splitting, to avoid having the content in the production bundles. - The content of the
menu.json
is not validated at all, relying on try-error approaches from the users. - The
menu.json
is not really documented. - Having an extra
menu.json
file besides thecustom-application-config.json
is not ideal.
Now we support defining the menu links in the
custom-application-config.json
itself, which aims to solve all the issues mentioned before. It also comes with some additional improvements such as:- Less configuration fields.
- Support for two new variable placeholders:
intl
: Given that menu labels are translated, you can reference a translation using the following syntax:${intl:<local>:<translation_key>}
, for example${intl:en:Menu.Avengers}
.path
: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example${path:./app.svg}
, or from a module, for example${path:@commercetools-frontend/assets/application-icons/rocket.svg}
.
NOTE: This is an opt-in feature and is meant to replace the
menu.json
approach. For now it's fully backwards compatible.The menu links can be defined in the
custom-application-config.json
using the fieldmenuLinks
. You can check the JSON schema to inspect the supported fields.Example:
{ // ... "menuLinks": { "icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}", "defaultLabel": "${intl:en:Menu.StateMachines}", "labelAllLocales": [ { "locale": "en", "value": "${intl:en:Menu.StateMachines}" }, { "locale": "de", "value": "${intl:de:Menu.StateMachines}" } ], "submenuLinks": [ { "uriPath": "echo-server", "defaultLabel": "${intl:en:Menu.EchoServer}", "labelAllLocales": [ { "locale": "en", "value": "${intl:en:Menu.EchoServer}" }, { "locale": "de", "value": "${intl:de:Menu.EchoServer}" } ] } ] } }
- The prop
-
#2244
118efedd
Thanks @tdeekens! - Allow configuration ofStrict-Transport-Security
header through custom application config.Similar to the
Feature-Policies
header use thestrictTransportSecurity
property of the custom application config to add to the defaults.headers: { strictTransportSecurity: ['includeSubDomains']; }
-
#2143
53b27b0b
Thanks @tdeekens! - Adds support for specifying thePermissions-Policy
header supported in Chrome 90.Similar to the
Feature-Policies
header an application config now support apermissionsPolicies
field.headers: { permissionPolicies: { mircophone: '()'; } }
More information about supported permission policies can be found here.
- #2041
a240f657
Thanks @emmenko! - - Changes required Node.js engine version to>=12 || >=14
inpackage.json
.
-
d86c2e8
#1934 Thanks @emmenko! - Introduce a new experimental opt-in feature to authenticate the application for local development, using an OIDC-like workflow.Disclaimer: this is an opt-in experimental feature. Use it at your own risk. We want to test this feature internally first. Until then, we discourage you to try it out.
The feature can be enabled by setting the
ENABLE_OIDC_FOR_DEVELOPMENT=true
environment variable.In addition to that, we have a new package
@commercetools-frontend/cypress
, to include some useful commands for testing Custom Applications.
2d6dbaa
#1980 Thanks @emmenko! - UseMC_API_URL
env variable and allow passing empty strings to the application config.
-
4f7e081
#1948 Thanks @emmenko! - Allow to pass the application routes aschildren
of<ApplicationShell>
, instead of using therender
prop. When doing so, the application entry point routes are automatically configured according to theentryPointUriPath
defined in thecustom-application-config.json
.Note that it's still possible to use the
render
prop. However, for most of the cases it should suffice to rely on the pre-configured routes.const AsyncApplicationRoutes = React.lazy( () => import('../../routes' /* webpackChunkName: "starter-routes" */) ); -export const ApplicationStarter = () => ( - <Switch> - { - /* For development, it's useful to redirect to the actual - application routes when you open the browser at http://localhost:3001 */ - process.env.NODE_ENV === 'production' ? null : ( - <Redirect - exact={true} - from="/:projectKey" - to="/:projectKey/examples-starter" - /> - ) - } - <Route - path="/:projectKey/examples-starter" - component={AsyncApplicationRoutes} - /> - {/* Catch-all route */} - <RouteCatchAll /> - </Switch> -); -ApplicationStarter.displayName = 'ApplicationStarter'; const EntryPoint = () => ( <ApplicationShell environment={window.app} onRegisterErrorListeners={({ dispatch }) => { Sdk.Get.errorHandler = (error) => globalActions.handleActionError(error, 'sdk')(dispatch); }} applicationMessages={loadMessages} DEV_ONLY__loadNavbarMenuConfig={() => import('../../../menu.json').then((data) => data.default || data) } featureFlags={FEATURE_FLAGS} - render={() => <ApplicationStarter />} - /> + > + <AsyncApplicationRoutes /> + </ApplicationShell> );
Furthermore, the
test-utils
of the@commercetools-frontend/application-shell
have now a new option to enable this opt-in behavior of rendering the application with pre-configured routes. To enable this option, pass thedisableAutomaticEntryPointRoutes: false
to therenderApp
orrenderAppWithRedux
functions.Note that you also need to provide the
environment.entryPointUriPath
in order for the routes to be correctly configured.-renderApp(<ApplicationStarter />, { +renderApp(<AsyncApplicationRoutes />, { route: '/my-project/examples-starter' + environment: { + entryPointUriPath: 'examples-starter', + }, + disableAutomaticEntryPointRoutes: false, });
d74addd
#1914 Thanks @adnasa! - add experimental application-components/product-picker, generate new types in application-config, application-shell
2287813
#1871 Thanks @emmenko! - Compile and bundle packages using preconstruct
09cc4b4
#1880 Thanks @emmenko! - Make theapplicationId
a combination of the Custom Applicationid
andentryPointUriPath
.
-
e706232
#1805 Thanks @emmenko! - Removemc-scripts extract-intl
command in favor of the official@formatjs/cli
package. We recommend to update your script to extract Intl messages to use theformatjs extract
command.See full release notes: https://docs.commercetools.com/custom-applications/releases/2020-10-14-custom-applications-v17
-
633d8c7
#1805 Thanks @emmenko! - Remove the CLI flag--use-local-assets
. The default behavior ofmc-scripts compile-html
now is to compile the assets locally, which is the only reasonable thing to do.Furthermore, the
@commercetools-frontend/mc-http-server
package has been deprecated and won't be published anymore. With thecompile-html
command there is no need to have a pre-configured HTTP server anymore.When running the
mc-scripts compile-html
command, theindex.html
is compiled for production usage and it lives in thepublic
folder, together with the other static assets. This is all you need to deploy your application. You can decide to deploy the Custom Application statically to one of the popular cloud providers, or serve the files on your own using a static server.For example, to run locally the Custom Application using the production bundles:
NODE_ENV=production MC_APP_ENV=development dotenv -- \ mc-scripts compile-html \ --transformer @commercetools-frontend/mc-dev-authentication/transformer-local.js mc-scripts serve
-
0182cd3
#1645 Thanks @emmenko! - refactor(application-config): be more strict on deriving the prod env based on the MC_APP_ENV.TL;DR: in case the
MC_APP_ENV
is defined, we consider that it's a production environment unless it's one ofdevelopment
ortest
. This allows to use for example thestaging
value, which from the application perspective is still considered a production environment.
96b3af7
#1636 Thanks @emmenko! - Fix parsing of application config to preserve full URLs when inferring CSP directives. Furthermore, every environment variable referenced within the application config that has an empty value will be parsed as-is and it will not be rejected. Additionally, the fields passed to theadditionalEnv
object that are empty will be removed from the resulting environment andwindow.app
.
-
728024c
#1626 Thanks @emmenko! - This release introduces the usage of a new configuration file format and marks the deprecation of theenv.json
andheaders.json
files.For all the necessary information about migrating to the new configuration file, please read the release notes.