-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into typescript-snippets
- Loading branch information
Showing
202 changed files
with
18,067 additions
and
20,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
'@commercetools-frontend/application-shell-connectors': patch | ||
--- | ||
|
||
There is a new React hook which you can use to access the Project Images rewrite configuration [see documentation](https://docs.commercetools.com/custom-applications/api-reference/commercetools-frontend-application-shell-connectors#project-image-settings). | ||
|
||
You would use it like this: | ||
|
||
```js | ||
function MyComponent() { | ||
const { isLoading, imageRegex } = useProjectExtensionImageRegex(); | ||
|
||
if (isLoading) return <LoadingSpinner />; | ||
|
||
return ( | ||
<div> | ||
<h1>Project images regex: {imageRegex}</h1> | ||
</div> | ||
); | ||
} | ||
|
||
function MyApp() { | ||
return ( | ||
<ProjectExtensionProviderForImageRegex> | ||
<MyComponent /> | ||
</ProjectExtensionProviderForImageRegex> | ||
); | ||
} | ||
``` | ||
|
||
Both `GetProjectExtensionImageRegex` component and `withProjectExtensionImageRegex` still exists for backwards compatibility but have been marked as deprecated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
'@commercetools-backend/eslint-config-node': patch | ||
'@commercetools-backend/express': patch | ||
'@commercetools-backend/loggers': patch | ||
'@commercetools-frontend/actions-global': patch | ||
'@commercetools-frontend/application-config': patch | ||
'@commercetools-frontend/application-shell': patch | ||
'@commercetools-frontend/application-shell-connectors': patch | ||
'@commercetools-frontend/assets': patch | ||
'@commercetools-frontend/babel-preset-mc-app': patch | ||
'@commercetools-frontend/browser-history': patch | ||
'@commercetools-frontend/constants': patch | ||
'@commercetools-frontend/create-mc-app': patch | ||
'@commercetools-frontend/eslint-config-mc-app': patch | ||
'@commercetools-frontend/i18n': patch | ||
'@commercetools-frontend/jest-preset-mc-app': patch | ||
'@commercetools-frontend/l10n': patch | ||
'@commercetools-frontend/mc-html-template': patch | ||
'@commercetools-frontend/mc-scripts': patch | ||
'@commercetools-frontend/notifications': patch | ||
'@commercetools-frontend/permissions': patch | ||
'@commercetools-frontend/react-notifications': patch | ||
'@commercetools-frontend/sdk': patch | ||
'@commercetools-frontend/sentry': patch | ||
'@commercetools-frontend/url-utils': patch | ||
--- | ||
|
||
Drop the copyright year from the license files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/l10n': minor | ||
--- | ||
|
||
The localized data has been updated. In particular, the time zones data has been updated and restructured to be more usable and readable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/application-components': patch | ||
--- | ||
|
||
Accessibility improvements of the `TabHeader` component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
'@commercetools-frontend/mc-scripts': minor | ||
--- | ||
|
||
Migrate CLI to TypeScript. | ||
|
||
Internally, the CLI now uses [cac](https://github.com/cacjs/cac) to handle CLI commands and options. | ||
|
||
# Deprecated entry points | ||
|
||
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. | ||
|
||
```diff | ||
const { | ||
createPostcssConfig, | ||
-} = require('@commercetools-frontend/mc-scripts'); | ||
+} = require('@commercetools-frontend/mc-scripts/postcss'); | ||
``` | ||
|
||
Importing the functions `createWebpackConfigForDevelopment` and `createWebpackConfigForProduction` from the main entry point `@commercetools-frontend/mc-scripts` is now deprecated. Use the entry point `@commercetools-frontend/mc-scripts/webpack` instead. | ||
|
||
```diff | ||
const { | ||
createWebpackConfigForDevelopment, | ||
createWebpackConfigForProduction, | ||
-} = require('@commercetools-frontend/mc-scripts'); | ||
+} = require('@commercetools-frontend/mc-scripts/webpack'); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@commercetools-frontend/application-shell': patch | ||
--- | ||
|
||
Fixed aria role names. | ||
|
||
We were using invalid role names in some of the component's elements. | ||
|
||
Special mention to the element wrapping the notifications as it now uses the aria-live [attribute](https://www.w3.org/TR/wai-aria/#aria-live) (with **polite** value). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/assets': patch | ||
--- | ||
|
||
Convert entry point to typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@commercetools-frontend/application-shell": patch | ||
--- | ||
|
||
Fix `ApplicationShell` header selectors a11y issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/application-shell-connectors': patch | ||
--- | ||
|
||
Export `TImageRegexContext` type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/mc-html-template': patch | ||
--- | ||
|
||
Removed _user-scalable=no_ property from `viewport` meta tag as it is a problem from the [accessibility point of view](https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#viewport_basics). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-frontend/application-shell': patch | ||
--- | ||
|
||
Fix `ApplicationShell` header a11y issues in user menu dropdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: commercetools Platform Support | ||
- name: commercetools Support | ||
url: https://jira.commercetools.com/servicedesk/customer/portal/1 | ||
about: Have an issue or question that contains sensitive or customer information? Ask our support team! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
description: Shared action with basic setup for each job | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Setup Node (uses version in .nvmrc) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
shell: bash | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-v1- | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
env: | ||
# https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L14-L18 | ||
# https://github.com/marketplace/actions/cypress-io#custom-install | ||
CYPRESS_INSTALL_BINARY: "0" | ||
shell: bash | ||
|
||
- name: Building packages | ||
run: yarn build | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy_playground: | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies and build packages | ||
uses: ./.github/actions/ci | ||
|
||
- name: Building Playground application | ||
run: yarn playground:build | ||
env: | ||
APP_ID: ${{ secrets.APP_ID_PLAYGROUND }} | ||
MC_API_URL: ${{ secrets.MC_API_URL }} | ||
CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | ||
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }} | ||
|
||
- name: Deploying Playground application to Vercel (production) | ||
run: | | ||
yarn workspace playground run deploy --prod --token="${{ secrets.VERCEL_TOKEN_PLAYGROUND }}" | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_PLAYGROUND }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_PLAYGROUND }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.