Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/vite-4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lkostrowski authored Sep 6, 2023
2 parents b51861e + b4c258f commit 5ed8b88
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .changeset/kind-jeans-double.md

This file was deleted.

11 changes: 11 additions & 0 deletions .changeset/tender-news-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@saleor/app-sdk": minor
---

Changed the "query" field in the AppManifest webhook to be required. Previously, this field was optional.

For subscription events, Saleor rejects webhooks without query, so this field was valid only with legacy non-subscription webhooks.

Now, the query is obligatory.

Warning: This can be a breaking change for some scenarios where legacy webhooks were used!
5 changes: 0 additions & 5 deletions .changeset/two-maps-divide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-wombats-bake.md

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
run: pnpm test:ci
- name: Generate coverage report
uses: irongut/[email protected]
if: ${{ github.actor != 'dependabot[bot]' }}
with:
filename: coverage/cobertura-coverage.xml
format: markdown
Expand Down Expand Up @@ -68,19 +69,24 @@ jobs:
- name: Build project
run: pnpm build
- name: Creating .npmrc
if: ${{ github.actor != 'dependabot[bot]' }}
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release on @dev tag in npm
if: ${{ github.actor != 'dependabot[bot]' }}
run: npx changeset version --snapshot pr && pnpm publish --tag dev --no-git-checks
# Store package.json version in env
- run: echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV
if: ${{ github.actor != 'dependabot[bot]' }}
- run: echo '${{ fromJson(env.PACKAGE_JSON).version }}'
if: ${{ github.actor != 'dependabot[bot]' }}
# Post a comment with released snapshot
- name: Create with released tag
if: ${{ github.actor != 'dependabot[bot]' }}
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @saleor/app-sdk

## 0.43.1

### Patch Changes

- 357557a: Removed unused package.json's index and typing, which were never built and bundled
- 8db1d56: Updated dependencies
- 357557a: Removed exported "util" that was never bundled

## 0.43.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saleor/app-sdk",
"version": "0.43.0",
"version": "0.43.1",
"description": "SDK for building great Saleor Apps",
"scripts": {
"prepublishOnly": "pnpm build",
Expand Down
13 changes: 11 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,17 @@ export interface WebhookManifest {
name: string;
asyncEvents?: AsyncWebhookEventType[];
syncEvents?: SyncWebhookEventType[];
/** If query is not provided, the default webhook payload will be used */
query?: string;
/**
* Query is required for a subscription.
* If you don't need a payload, you can provide empty query like this:
*
* subscription {
* event {
* __typename
* }
* }
*/
query: string;
/** The full URL of the endpoint where request will be sent */
targetUrl: string;
isActive?: boolean;
Expand Down

0 comments on commit 5ed8b88

Please sign in to comment.