-
#2680
3c15d48c
Thanks @emmenko! - Fix parsing of CLI options casing -
Updated dependencies []:
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2613
20e648d2
Thanks @emmenko! - Migrate CLI to TypeScript.Internally, the CLI now uses cac to handle CLI commands and options.
Importing the function
createPostcssConfig
from the main entry point@commercetools-frontend/mc-scripts
is now deprecated. Use the entry point@commercetools-frontend/mc-scripts/postcss
instead.const { createPostcssConfig, -} = require('@commercetools-frontend/mc-scripts'); +} = require('@commercetools-frontend/mc-scripts/postcss');
Importing the functions
createWebpackConfigForDevelopment
andcreateWebpackConfigForProduction
from the main entry point@commercetools-frontend/mc-scripts
is now deprecated. Use the entry point@commercetools-frontend/mc-scripts/webpack
instead.const { createWebpackConfigForDevelopment, createWebpackConfigForProduction, -} = require('@commercetools-frontend/mc-scripts'); +} = require('@commercetools-frontend/mc-scripts/webpack');
-
#2661
43a9df21
Thanks @emmenko! - Drop the copyright year from the license files -
Updated dependencies [
d6bfecf1
,43a9df21
,20e648d2
,81df396d
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2626
eea4f5fa
Thanks @emmenko! - Fix dev middleware usage for local login flow (internal usage only)"
-
#2630
c0516c5b
Thanks @emmenko! - > These changes are only relevant when using the experimental Vite bundler (ENABLE_EXPERIMENTAL_VITE_BUNDLER=true
).Allow to load a Vite config in addition to the default config. This is useful for using extra Rollup/Vite plugins, or other Vite options.
-
Updated dependencies [
0b3ea758
,eea4f5fa
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2535
dc5b02eb
Thanks @Rhotimee! - Theconfig:sync
command now shows the diff changes before updating an existing Custom Application config.
- #2585
8d3b7dd5
Thanks @Rhotimee! - Remove automatically updating local config application ID after a Custom Application is created. Instruct users to update the application ID themselves. - Updated dependencies [
b1515054
,5d0a461d
,dc5b02eb
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
3094da2f
,b38854ec
,3180de7f
,3180de7f
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2568
5bcf106a
Thanks @emmenko! - Enable opt-in support for using Vite.js bundler. To enable it, set the environment variableENABLE_EXPERIMENTAL_VITE_BUNDLER="true"
in your dotenv file.Vite (French word for "quick", pronounced /vit/, like "veet") is a build tool that aims to provide a faster and leaner development experience for modern web projects.
You can learn more about the rationale behind the project in the Why Vite documentation.
Vite is optimized for using native ES Modules via
<script type="module">
tags and ES Modules dynamic import.All the
mc-scripts
CLI commands are fully compatible with the new bundler, so you can continue using them as before.The
cdnUrl
value is not supported at the moment when using Vite.Vite relies on the file extensions to determine how to process the file in the best possible way. For example, a file using JSX should use the extension
.jsx
, or.tsx
for TypeScript.Up until now we didn't enforce this with Webpack, so using
.js
or.jsx
works in both cases. If you are still using.js
for files including the JSX syntax, you need to rename the file to.jsx
.To help with the renaming, you can use our codemod
rename-js-to-jsx
:npx @commercetools-frontend/codemod rename-js-to-jsx 'src/**/*.js'
- Updated dependencies [
5bcf106a
,5bcf106a
,5bcf106a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2544
08a689bb
Thanks @emmenko! - Fix problem with file name in Windows when name contains characters like:
.
-
Updated dependencies [
dc76e5a9
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
602822c0
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
cc7c19d0
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2534
6b25e4ee
Thanks @emmenko! - Downgradereact-refresh
tov0.11.0
. This fixes a problem with starting the development server.
-
#2524
ea1bee4c
Thanks @Rhotimee! - Add new CLI commandmc-script config:sync
This command allows users to synchronize the local Custom Application config with the Merchant Center. The sync implies that a new Custom Application will be created or an existing one will be updated.
Developers can use the
config:sync
command to automatically manage the configuration of a Custom Application from the config file instead of having to manually fill out the information in the Merchant Center.If a new Custom Application needs to be created, an interactive prompt will ask the user to select the Organization where the Custom Application should be configured to.
Additionally, the Custom Application ID is automatically synced when running the
config:sync
command.Note that this command requires a valid API token. You can get one by using the
mc-scripts login
command.The command also supports a
--dry-run
option. If enabled, the command is exectured but does not send any mutation request. Instead, the request payload is logged.
-
#2506
b842c498
Thanks @Rhotimee! - Add a new CLI commandmc-scripts login
.This command enables users to log in to their Merchant Center account through the CLI. An interactive prompt will be displayed asking the user to enter the login credentials.
Upon login, an API token is stored in the user's home directory
$HOME/.commercetools/mc-credentials.json
. The API token will be used by other CLI commands that require a valid API token.
-
Updated dependencies [
bf57dc32
,6f3a2083
,ea1bee4c
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2510
50232472
Thanks @emmenko! - Updatedotenv
dependencies -
Updated dependencies [
dc02733d
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
78ab6456
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
e4eeccb1
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2430
bb1f7d75
Thanks @emmenko! - Following breaking changes were introduced:- In
mc-scripts
, thebuild
command additionally compiles theindex.html
by default. - Running the
compile-html
command by default should not be necessary anymore. However, you can pass--build-only
to thebuild
command to opt-out of the compilation step, in case you want to run it separately, for example to use the--transformer
. - Running the
compile-html
command by default does not print tostdout
the JSON string with the security headers. You can opt into the old behavior by passing the--print-security-headers
option. - The
--inline-csp
ofcompile-html
has been dropped, as it's now the built-in behavior. - The
dist
folder created by thebuild
command has been removed. Instead, thebuild
command writes the production bundles directly into thepublic
folder.
For more information see Release notes v21.
- In
-
#2430
bb1f7d75
Thanks @emmenko! - Upgrade Stylelint and PostCSS dependencies.The peer dependency min version for
stylelint
is now14
. If your project has a Stylelint config file, we recommend to follow the Migrating to 14.0.0 guide.Note that the syntax support for CSS-in-JS languages has been removed from Stylelint and therefore is not available by default in the
jest-stylelint-runner
.Moreover, the
postcss-color-mod-function
dependency has been removed, as thecolor-mod()
function is not part of the CSS Color spec anymore. If you were relying on this function you need to find another solution.
- #2430
bb1f7d75
Thanks @emmenko! - Updatecss-loader
tov6
. Support both.mod.css
and.module.css
for CSS module files.
- #2430
bb1f7d75
Thanks @emmenko! - Include fallback polyfills in Webpack config forurl
andquerystring
.
-
#2430
bb1f7d75
Thanks @emmenko! - Adjust webpack dev server error message for/api/graphql
endpoint. -
Updated dependencies [
bb1f7d75
,eb8f5b2c
,bb1f7d75
,bb1f7d75
,bb1f7d75
,bb1f7d75
,bb1f7d75
,bb1f7d75
,bb1f7d75
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2467
1763f30b
Thanks @emmenko! - Updatecss-loader
tov6
. Support both.mod.css
and.module.css
for CSS module files.
-
#2465
91331314
Thanks @emmenko! - Upgrade Stylelint and PostCSS dependencies.The peer dependency min version for
stylelint
is now14
. If your project has a Stylelint config file, we recommend to follow the Migrating to 14.0.0 guide.Note that the syntax support for CSS-in-JS languages has been removed from Stylelint and therefore is not available by default in the
jest-stylelint-runner
.Moreover, the
postcss-color-mod-function
dependency has been removed, as thecolor-mod()
function is not part of the CSS Color spec anymore. If you were relying on this function you need to find another solution.
-
#2430
504fe229
Thanks @emmenko! - Adjust webpack dev server error message for/api/graphql
endpoint. -
Updated dependencies [
71171d65
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
8c189ad3
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2430
6d3b7ba3
Thanks @emmenko! - Fix WebpackDevServer deprecation warnings -
Updated dependencies [
5e3ee854
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies []:
- @commercetools-frontend/[email protected]
- #2430
d8e36891
Thanks @emmenko! - Include fallback polyfills in Webpack config forurl
andquerystring
.
-
#2430
5ea8baf1
Thanks @emmenko! - Use version range for Babel packages. -
Updated dependencies [
5ea8baf1
,1bee4f25
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2430
07f5b00f
Thanks @emmenko! - Following breaking changes were introduced:- In
mc-scripts
, thebuild
command additionally compiles theindex.html
by default. - Running the
compile-html
command by default should not be necessary anymore. However, you can pass--build-only
to thebuild
command to opt-out of the compilation step, in case you want to run it separately, for example to use the--transformer
. - Running the
compile-html
command by default does not print tostdout
the JSON string with the security headers. You can opt into the old behavior by passing the--print-security-headers
option. - The
--inline-csp
ofcompile-html
has been dropped, as it's now the built-in behavior. - The
dist
folder created by thebuild
command has been removed. Instead, thebuild
command writes the production bundles directly into thepublic
folder.
For more information see Release notes v21.
- In
-
Updated dependencies [
eb8f5b2c
,b8fb4cbb
,1c363fad
,07f5b00f
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2433
d65e29e4
Thanks @emmenko! - Replacets-jest/utils
withjest-mock
, for using themocked
function.
-
Updated dependencies [
630ee1b5
,d65e29e4
,d65e29e4
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
6f02335c
,cf914004
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
f549637b
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2400
fc7f62ba
Thanks @emmenko! - Add experimental flag--inline-csp
tocompile-html
command. If defined, theContent-Security-Policy
header is injected in theindex.html
as a meta tag. -
Updated dependencies [
fc7f62ba
,59b72adf
,fc7f62ba
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2386
d7fcf6fc
Thanks @emmenko! - Allow to pass a relative path for transformer option -
Updated dependencies [
d7fcf6fc
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
7fa4d7d0
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2376
9d879503
Thanks @emmenko! - > For commercetools only.Allow to use OIDC login when developing against a local running MC API.
-
Updated dependencies [
9d879503
,f6b3ae02
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#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/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2331
670ec977
Thanks @emmenko! - Upgrade to Apollo Client v3.4.
-
Updated dependencies [
d7b712e4
,8c6c13a7
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2334
869a3b6d
Thanks @emmenko! - Fix web socket configuration to make HMR work. -
Updated dependencies [
83f2add2
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
9e6e31f4
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
b2d58de3
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
487fcca6
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2300
b3437eab
Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
ca4e1441
,ca4e1441
,ca4e1441
,b3437eab
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2289
af5d6c3d
Thanks @renovate! - fix(deps): update dependency mini-css-extract-plugin to v2 -
Updated dependencies [
f5aa350a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2273
b96d4f3d
Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
bdc1330f
,b96d4f3d
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2268
c370f242
Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
e0ea1333
,c370f242
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2261
481fb8f8
Thanks @tdeekens! - Adds the ability to explicitly disable core-js formc-scripts
and the webpack configsSome environments or build targets might not require core-js. In order to opt-out of it you can specify a
disableCoreJs
option.
- Updated dependencies [
481fb8f8
,9aba0c49
]:- @commercetools-frontend/[email protected]
-
#2247
f8f759b6
Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
f8f759b6
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
dc994692
,118efedd
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2234
4dd3398a
Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
4dd3398a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2213
665961f8
Thanks @renovate! - fix(deps): update dependency css-minimizer-webpack-plugin to v3 -
Updated dependencies [
6de28034
,5961c019
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2200
9b9cf924
Thanks @renovate! - fix(deps): update dependency dotenv to v9 -
Updated dependencies [
0bfa1613
,99ea52d3
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2191
b5058130
Thanks @emmenko! - New CLI options! 🎉The
mc-script
CLI now supports loading environment variables from dotenv files.Previously, we recommended to use
dotenv-cli
to load environment variables before executing themc-scripts
command. For example:dotenv -c development -- mc-scripts start NODE_ENV=production dotenv -- mc-scripts compile-html NODE_ENV=production dotenv -e .env.gcp-production-eu -- mc-scripts compile-html
Now the
mc-scripts
CLI has the dotenv features built-in, so you don't need to install and usedotenv-cli
anymore.By default, the following dotenv files are loaded according to the current environment values specified on each command:
process.MC_APP_ENV
orprocess.NODE_ENV
. The priority of how the files are merged and overwritten goes from top to bottom (highest defined variable overrides lower)..env.development.local
,.env.test.local
,.env.production.local
: Local overrides of environment-specific settings..env.development
,.env.test
,.env.production
: Environment-specific settings..env.local
: Local overrides. This file is loaded for all environments except test..env
Please refer to the dotenv documentation for more details.
Furthermore, you can pass additional dotenv files by using the following option:
--env <path>
: Parses the file path as a dotenv file and adds the variables to the environment. Multiple flags are allowed.
These files will take higher priority over the standard environment dotenv files.
The example above can then be refactored as following:
-dotenv -c development -- mc-scripts start +mc-scripts start -NODE_ENV=production dotenv -- mc-scripts compile-html +NODE_ENV=production mc-scripts compile-html -NODE_ENV=production dotenv -e .env.gcp-production-eu -- mc-scripts compile-html +NODE_ENV=production mc-scripts --env .env.gcp-production-eu compile-html
If you are developing multiple Custom Applications in the same repository, chances are that you use a mono-repository setup.
If that's the case, you can now run the
mc-scripts start
command from the workspace root folder and pass the option--match <glob>
. The option will attempt to gather a list of packages in the repository that match the glob pattern and show it as a prompt. You can then select the application that you want to start from that list.We hope you find it useful.
- #2189
b8cc7c9f
Thanks @dgoemans! - Temporary fix for parsing Webpack error messages untilreact-dev-utils
supports Webpack v5.
- Updated dependencies [
6c951d70
]:- @commercetools-frontend/[email protected]
-
#2178
26d4487a
Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
149af138
,26d4487a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
4d4b1f9f
]:- @commercetools-frontend/[email protected]
-
#2165
d019bc54
Thanks @tdeekens! - Adds support for the*.mjs
and*.cjs
JavaScript file extensions.Updates the webpack configurations, Jest and ESLint presets to support the
*.mjs
and*.cjs
extensions. This allows better integration with packages using ES modules.
-
#2157
e757dd2b
Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
e757dd2b
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#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.
- Updated dependencies [
53b27b0b
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
598d3bb5
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- #2041
a240f657
Thanks @emmenko! - - Changes required Node.js engine version to>=12 || >=14
inpackage.json
.- Uses
webpack@5
.
- Uses
- Updated dependencies [
a240f657
,a240f657
,a240f657
,a240f657
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
#2110
c850d6dc
Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
8eed86e9
,c850d6dc
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
d09a154b
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
88e2b817
]:- @commercetools-frontend/[email protected]
b48e11d8
#2094 Thanks @renovate! - fix(deps): update dependency react-dev-utils to v11.0.4 [security]
-
ca4ea6eb
#2085 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
ca4ea6eb
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
d44f5b69
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
7514a4f3
#2072 Thanks @tdeekens! - fix(webpack): to pass parallelism to thread-loader -
Updated dependencies [
7f26c54e
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
bb2ceac2
#2062 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
bb2ceac2
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
074ec33d
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
f940273d
#2042 Thanks @emmenko! - Improve the Webpack configuration ofmc-scripts
.If you are using the
createWebpackConfigForDevelopment
andcreateWebpackConfigForProduction
functions, the following options are now optional:distPath
: it defaults to the./dist
folder.entryPoint
: it defaults to the file./src/index
, with the file extension being one ofjs | jsx | ts | tsx
.sourceFolders
: it defaults to the folders[./src]
.
All paths are relative to the Custom Application folder.
Additionally, there is a new option that can be used to enhance the Postcss configuration:
postcssOptions
postcssOptions.postcssImportPaths
: a list of paths where to look for files used by the@import
statements.postcssOptions.postcssCustomMediaPaths
: a list of paths where to look for files with custom media queries.postcssOptions.postcssCustomPropertiesPaths
: a list of paths where to look for files with custom properties.postcssOptions.postcssColorModPaths
: a list of paths where to look for files with color-mod properties.
Furthermore, the
postcss.config.js
file that was shipped with themc-scripts
package has been removed in favor of the factory functioncreatePostcssConfig
, which accepts the samepostcssOptions
described above.In case you have your own
postcss.config.js
file in the root of your repository, you can use thecreatePostcssConfig
function to have a pre-configured setup.# postcss.config.js -const postcssConfig = require('@commercetools-frontend/mc-scripts/postcss.config.js'); +const { createPostcssConfig } = require('@commercetools-frontend/mc-scripts'); -module.exports = postcssConfig; +module.exports = createPostcssConfig();
-
Updated dependencies [
eb2fbb22
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
7fbe0c71
#2018 Thanks @emmenko! - Include apostcss.config.js
, which is used by thepostcss-loader
Webpack plugin.
-
c9589f5e
#2020 Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
c9589f5e
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
3bf32993
#1971 Thanks @tdeekens! - Add internal opt-in support for combining feature flag adapters. -
Updated dependencies [
3bf32993
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
b38cb57f
#1991 Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
fa151b6a
]:- @commercetools-frontend/[email protected]
- Updated dependencies [
83c5cf37
,2869d6c1
]:- @commercetools-frontend/[email protected]
- Updated dependencies [
7f8b219
]:- @commercetools-frontend/[email protected]
-
Updated dependencies [
5557c5c
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
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.
- Updated dependencies [
d86c2e8
,2d6dbaa
,dc7a443
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
4f7e081
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
bb65fa1
#1949 Thanks @emmenko! - Thewebpack.config.dev.js
andwebpack.config.prod.js
files are not required anymore to be defined in the application folder and can be removed. The default behavior is now implicitly implemented in case the config file is not found. The default behavior requires the following paths to exist:<application_folder>/dist
<application_folder>/src
<application_folder>/src/index.js
You can still use the config files if you need to configure more specific behaviors.
-
4971a78
#1952 Thanks @tdeekens! - chore: add and apply fixes via manypkg for automatic mono-repo validation -
Updated dependencies [
48a9886
,4971a78
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
9cbebcf
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
fab682b
]:- @commercetools-frontend/[email protected]
-
f6f3c5e
#1935 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
99558e7
,f6f3c5e
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
1ec4379
#1923 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
d74addd
,1ec4379
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
63440c4
#1825 Thanks @renovate! - fix(deps): update dependency postcss-import to v13 -
Updated dependencies [
1a96e83
,e4dc8f8
,c7b321a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
2287813
#1871 Thanks @emmenko! - Compile and bundle packages using preconstruct -
Updated dependencies [
2287813
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
d832bd4
,ec9e10f
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
09cc4b4
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
89c4464
#1872 Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
89c4464
]:- @commercetools-frontend/[email protected]
-
Updated dependencies [
71c9111
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
310e98c
Thanks @emmenko! - Update dependencies (commercetools#1857) -
Updated dependencies [
310e98c
,9003354
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
e0ec004
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
56d4361
]:- @commercetools-frontend/[email protected]
-
Updated dependencies [
016f84c
]:- @commercetools-frontend/[email protected]
-
eb545e0
#1819 Thanks @tdeekens! - feat: adds the ability to opt into the newautomatic
JSX runtimeRecent React versions support a new JSX runtime. Read more about it here.
You may opt into the new runtime in
automatic
mode by setting theENABLE_NEW_JSX_TRANSFORM
environment variable totrue
. Please note you need at least React v17 or v16.14 in your application. Opting into the new JSX transform automatically also changes the Babel, Jest and ESLint configurations. As a consequence ESLint will warn whenever it discovers React being in scope by importing it asimport React from 'react
'. You have to remove those imports using the respective codemod by runningnpx react-codemod update-react-imports
.Lastly, all code of the Merchant Center Application Kit will continue to be bundled in
classic
mode to support older versions of React.
da0b4aa
#1818 Thanks @emmenko! - Add support for experimental Fast Refresh for React. To enable it, set the enviornment variableFAST_REFRESH=true
. More info here.
-
e824e89
#1797 Thanks @renovate! - update dependency postcss-safe-parser to v5 -
Updated dependencies [
05672a2
,eb545e0
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
Updated dependencies [
71c5f78
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
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
-
Updated dependencies [
0e0efc6
,e706232
,633d8c7
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
57be02b
]:- @commercetools-frontend/[email protected]
-
9bc8558
#1704 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
178ff31
,9bc8558
,1fdde03
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
9d62b85
#1703 Thanks @mohib0306! - Fix console warning. Replacedconsole.warning
withconsole.warn
-
f23655a
#1552 Thanks @renovate! - chore(deps): update dependency graphql-cli to v4 -
Updated dependencies [
bc15ac2
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
4216b92
#1685 Thanks @emmenko! - Refactor i18n package to consume compiled data from ui-kit translation messages. Furthermore, the@commercetools-frontend/i18n
now exposes acompiled-data
folder as well:@commercetools-frontend/i18n/compiled-data
. This can be used the load pre-compiled messages and thus improving the runtime performance.Furthermore, the
mc-scripts extract-intl
command has been deprecated in favor of the more official message extraction with the@formatjs/cli
: https://formatjs.io/docs/getting-started/message-extraction.
-
f144292
#1673 Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
879b4d6
,f144292
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
c62261f
#1653 Thanks @renovate! - Update dependencies and regenerate l10n data based on CLDR v37 -
Updated dependencies [
43fdb3d
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
0182cd3
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
6d98245
#1643 Thanks @emmenko! - Update copyright date to 2020 in LICENSE files -
Updated dependencies [
6d98245
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
77eb38a
#1641 Thanks @emmenko! - Unify login/logout dev routes for http servers -
Updated dependencies [
0f3dcc3
,77eb38a
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- Updated dependencies [
96b3af7
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
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.
-
cc8b37b
#1627 Thanks @renovate! - chore: update dependencies -
Updated dependencies [
72c42f4
,33baf25
,394380d
,728024c
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
4168061
#1618 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
4168061
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
fa6386c
#1587 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
fa6386c
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
f8f8609
#1573 Thanks @renovate! - fix(deps): update all dependencies -
Updated dependencies [
58b1b26
]:- @commercetools-frontend/[email protected]
-
f92ec54
#1551 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
f92ec54
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
96ab311
#1533 Thanks @emmenko! - Upgrade toreact-intl
v4. See also https://formatjs.io/docs/react-intl/upgrade-guide-4xWe updated the peer dependency range to support both
v3
andv4
.
-
0925da6
#1537 Thanks @renovate! - chore(deps): update all dependencies -
Updated dependencies [
0925da6
,8600676
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
9391762
#1530 Thanks @emmenko! - Update@commercetools-uikit/*
packages to10.21.0
-
Updated dependencies [
9391762
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]
-
b96aa31
#1485 Thanks @emmenko! - Missing@babel/runtime-corejs3
dependency, causing the docker image of themc-http-server
to fail. -
Updated dependencies [
4c15deb
,b96aa31
]:- @commercetools-frontend/[email protected]
- @commercetools-frontend/[email protected]