Skip to content

Commit

Permalink
ci(changesets): version packages (#2206)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
CT Release Bot and github-actions[bot] authored May 11, 2021
1 parent 864ce38 commit 8ce9d3f
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 62 deletions.
54 changes: 0 additions & 54 deletions .changeset/seven-chefs-rush.md

This file was deleted.

7 changes: 7 additions & 0 deletions application-templates/starter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# merchant-center-application-template-starter

## 18.1.2

### Patch Changes

- Updated dependencies [[`864ce386`](https://github.com/commercetools/merchant-center-application-kit/commit/864ce386995a417f3bff2fd0ab052b5f2f59a196)]:
- @commercetools-frontend/application-shell@20.2.0

## 18.1.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions application-templates/starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "merchant-center-application-template-starter",
"version": "18.1.1",
"version": "18.1.2",
"description": "A starter example for the bare minimum setup to develop a Merchant Center Application",
"private": true,
"scripts": {
Expand All @@ -19,7 +19,7 @@
"@apollo/client": "3.3.16",
"@commercetools-frontend/actions-global": "20.1.2",
"@commercetools-frontend/application-components": "20.1.2",
"@commercetools-frontend/application-shell": "20.1.2",
"@commercetools-frontend/application-shell": "20.2.0",
"@commercetools-frontend/assets": "18.5.4",
"@commercetools-frontend/i18n": "20.0.1",
"@commercetools-frontend/permissions": "20.1.2",
Expand Down
59 changes: 59 additions & 0 deletions packages/application-shell/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# @commercetools-frontend/application-shell

## 20.2.0

### Minor Changes

- [#2198](https://github.com/commercetools/merchant-center-application-kit/pull/2198) [`864ce386`](https://github.com/commercetools/merchant-center-application-kit/commit/864ce386995a417f3bff2fd0ab052b5f2f59a196) Thanks [@emmenko](https://github.com/emmenko)! - Add support for sending custom HTTP headers when using the `/proxy/forward-to` endpoint.

See the examples below on how to configure the HTTP headers for both scenarios.

All custom HTTP headers are sent to the Merchant Center API with a prefix `x-forward-header-`, as it allows the Merchant Center API to allow requests with those headers to be forwarded. However, the request forwarded to the external API contains the correct headers without the prefix.

## Usage for Apollo

The `createApolloContextForProxyForwardTo` function now supports passing custom HTTP headers.

```diff
import React from 'react';
import {
createApolloContextForProxyForwardTo,
useMcQuery,
} from '@commercetools-frontend/application-shell';
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';

const Fetcher = () => {
// Assuming that the `custom-application-config.json` contains the custom value:
// `{ additionalEnv: { externalApiUrl: 'https://my-custom-app.com/graphql'} }`
const externalApiUrl = useApplicationContext(
context => context.environment.externalApiUrl
);
const { loading, data, error } = useMcQuery(MyQuery, {
context: createApolloContextForProxyForwardTo({
// The URL to your external API
uri: externalApiUrl,
+ headers: {
+ 'x-foo': 'bar'
+ }
}),
});
// ...
};
```

## Usage for SDK actions

All `forwardTo` proxy actions supports sending custom HTTP headers.

```diff
actions.forwardTo.get({
uri: 'https://my-custom-app.com/graphql',
+ headers: {
+ 'x-foo': 'bar',
+ },
});
```

### Patch Changes

- Updated dependencies [[`864ce386`](https://github.com/commercetools/merchant-center-application-kit/commit/864ce386995a417f3bff2fd0ab052b5f2f59a196)]:
- @commercetools-frontend/[email protected]

## 20.1.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/application-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commercetools-frontend/application-shell",
"version": "20.1.2",
"version": "20.2.0",
"description": "React component to bootstrap the general MC application logic",
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
"repository": {
Expand Down Expand Up @@ -39,7 +39,7 @@
"@commercetools-frontend/notifications": "20.0.1",
"@commercetools-frontend/permissions": "20.1.2",
"@commercetools-frontend/react-notifications": "20.1.2",
"@commercetools-frontend/sdk": "20.0.1",
"@commercetools-frontend/sdk": "20.2.0",
"@commercetools-frontend/sentry": "20.0.1",
"@commercetools-frontend/url-utils": "20.0.1",
"@commercetools-uikit/avatar": "^12.0.0",
Expand Down
54 changes: 54 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# @commercetools-frontend/sdk

## 20.2.0

### Minor Changes

- [#2198](https://github.com/commercetools/merchant-center-application-kit/pull/2198) [`864ce386`](https://github.com/commercetools/merchant-center-application-kit/commit/864ce386995a417f3bff2fd0ab052b5f2f59a196) Thanks [@emmenko](https://github.com/emmenko)! - Add support for sending custom HTTP headers when using the `/proxy/forward-to` endpoint.

See the examples below on how to configure the HTTP headers for both scenarios.

All custom HTTP headers are sent to the Merchant Center API with a prefix `x-forward-header-`, as it allows the Merchant Center API to allow requests with those headers to be forwarded. However, the request forwarded to the external API contains the correct headers without the prefix.

## Usage for Apollo

The `createApolloContextForProxyForwardTo` function now supports passing custom HTTP headers.

```diff
import React from 'react';
import {
createApolloContextForProxyForwardTo,
useMcQuery,
} from '@commercetools-frontend/application-shell';
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';

const Fetcher = () => {
// Assuming that the `custom-application-config.json` contains the custom value:
// `{ additionalEnv: { externalApiUrl: 'https://my-custom-app.com/graphql'} }`
const externalApiUrl = useApplicationContext(
context => context.environment.externalApiUrl
);
const { loading, data, error } = useMcQuery(MyQuery, {
context: createApolloContextForProxyForwardTo({
// The URL to your external API
uri: externalApiUrl,
+ headers: {
+ 'x-foo': 'bar'
+ }
}),
});
// ...
};
```

## Usage for SDK actions

All `forwardTo` proxy actions supports sending custom HTTP headers.

```diff
actions.forwardTo.get({
uri: 'https://my-custom-app.com/graphql',
+ headers: {
+ 'x-foo': 'bar',
+ },
});
```

## 20.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commercetools-frontend/sdk",
"version": "20.0.1",
"version": "20.2.0",
"description": "Tools for declarative fetching",
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions playground/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# playground

## 18.1.2

### Patch Changes

- Updated dependencies [[`864ce386`](https://github.com/commercetools/merchant-center-application-kit/commit/864ce386995a417f3bff2fd0ab052b5f2f59a196)]:
- @commercetools-frontend/application-shell@20.2.0
- @commercetools-frontend/sdk@20.2.0

## 18.1.1

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playground",
"version": "18.1.1",
"version": "18.1.2",
"description": "A playground application to get started developing Merchant Center Applications",
"private": true,
"scripts": {
Expand All @@ -17,14 +17,14 @@
"@commercetools-docs/ui-kit": "16.2.0",
"@commercetools-frontend/actions-global": "20.1.2",
"@commercetools-frontend/application-components": "20.1.2",
"@commercetools-frontend/application-shell": "20.1.2",
"@commercetools-frontend/application-shell": "20.2.0",
"@commercetools-frontend/application-shell-connectors": "20.1.2",
"@commercetools-frontend/assets": "18.5.4",
"@commercetools-frontend/constants": "20.0.1",
"@commercetools-frontend/i18n": "20.0.1",
"@commercetools-frontend/l10n": "20.0.1",
"@commercetools-frontend/permissions": "20.1.2",
"@commercetools-frontend/sdk": "20.0.1",
"@commercetools-frontend/sdk": "20.2.0",
"@commercetools-uikit/checkbox-input": "^12.0.4",
"@commercetools-uikit/constraints": "^12.0.0",
"@commercetools-uikit/data-table": "^12.0.4",
Expand Down

1 comment on commit 8ce9d3f

@vercel
Copy link

@vercel vercel bot commented on 8ce9d3f 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.