Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 1, 2024
1 parent 1288eb7 commit dabeceb
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 95 deletions.
5 changes: 0 additions & 5 deletions .changeset/chilled-singers-return.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/empty-queens-hide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fifty-points-push.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/fresh-bottles-tell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/friendly-laws-yell.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/lucky-cooks-glow.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/proud-knives-happen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/serious-bears-brake.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sixty-boxes-matter.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wild-vans-carry.md

This file was deleted.

105 changes: 56 additions & 49 deletions packages/shopify-app-remix/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @shopify/shopify-app-remix

## 2.4.1

### Patch Changes

- 8811faa: Updated the `@shopify/admin-api-client` dependency
- 37dff44: Updated Remix dependencies to v2.5.1

## 2.4.0

### Minor Changes
Expand Down Expand Up @@ -117,11 +124,11 @@
When using variables, `data` needs to be an object containing `query` and `variables`.

```ts
import {json, ActionFunctionArgs} from '@remix-run/node';
import {authenticate} from '../shopify.server';
import { json, ActionFunctionArgs } from "@remix-run/node";
import { authenticate } from "../shopify.server";

export async function action({request}: ActionFunctionArgs) {
const {admin} = await authenticate.webhook(request);
export async function action({ request }: ActionFunctionArgs) {
const { admin } = await authenticate.webhook(request);

const response = await admin?.graphql.query<any>({
data: {
Expand All @@ -133,23 +140,23 @@
}
}
}`,
variables: {input: {title: 'Product Name'}},
variables: { input: { title: "Product Name" } },
},
});

const productData = response?.body.data;
return json({data: productData.data});
return json({ data: productData.data });
}
```

With the `v3_webhookContext` flag enabled, `graphql` _is_ a function that takes in the query string and an optional settings object, including `variables`.

```ts
import {ActionFunctionArgs} from '@remix-run/node';
import {authenticate} from '../shopify.server';
import { ActionFunctionArgs } from "@remix-run/node";
import { authenticate } from "../shopify.server";

export async function action({request}: ActionFunctionArgs) {
const {admin} = await authenticate.webhook(request);
export async function action({ request }: ActionFunctionArgs) {
const { admin } = await authenticate.webhook(request);

const response = await admin?.graphql(
`#graphql
Expand All @@ -160,11 +167,11 @@
}
}
}`,
{variables: {input: {title: 'Product Name'}}},
{ variables: { input: { title: "Product Name" } } },
);

const productData = await response.json();
return json({data: productData.data});
return json({ data: productData.data });
}
```

Expand All @@ -190,12 +197,12 @@
<summary>App Proxy</summary>

```ts
import {json} from '@remix-run/node';
import {authenticate} from '~/shopify.server';
import { json } from "@remix-run/node";
import { authenticate } from "~/shopify.server";

export async function loader({request}) {
const {storefront} = await authenticate.public.appProxy(request);
const response = await storefront.graphql('{blogs(first: 10) {nodes{id}}}');
export async function loader({ request }) {
const { storefront } = await authenticate.public.appProxy(request);
const response = await storefront.graphql("{blogs(first: 10) {nodes{id}}}");

return json(await response.json());
}
Expand All @@ -207,17 +214,17 @@
<summary>Unauthenticated Storefront</summary>

```ts
import {json} from '@remix-run/node';
import {unauthenticated} from '~/shopify.server';
import {customAuthenticateRequest} from '~/helpers';
import { json } from "@remix-run/node";
import { unauthenticated } from "~/shopify.server";
import { customAuthenticateRequest } from "~/helpers";

export async function loader({request}) {
export async function loader({ request }) {
await customAuthenticateRequest(request);

const {storefront} = await unauthenticated.storefront(
'my-shop.myshopify.com',
const { storefront } = await unauthenticated.storefront(
"my-shop.myshopify.com",
);
const response = await storefront.graphql('{blogs(first: 10) {nodes{id}}}');
const response = await storefront.graphql("{blogs(first: 10) {nodes{id}}}");

return json(await response.json());
}
Expand All @@ -233,17 +240,17 @@
<summary>Override billing configs when calling <code>request</code></summary>

```ts
import {json} from '@remix-run/node';
import {authenticate} from '~/shopify.server';
import { json } from "@remix-run/node";
import { authenticate } from "~/shopify.server";

export async function loader({request}) {
const {billing} = await authenticate.admin(request);
export async function loader({ request }) {
const { billing } = await authenticate.admin(request);

await billing.require({
plans: ['plan1', 'plan2'],
plans: ["plan1", "plan2"],
onFailure: async () =>
await billing.request({
plan: 'plan1',
plan: "plan1",
trialDays: 5, // Override the trialDays config value
}),
});
Expand Down Expand Up @@ -275,12 +282,12 @@

```ts
// app/routes/**\/.ts
import {authenticate} from '~/shopify.server';
import { authenticate } from "~/shopify.server";

export async function loader({request}) {
const {liquid, admin} = authenticate.public.appProxy(request);
export async function loader({ request }) {
const { liquid, admin } = authenticate.public.appProxy(request);

return liquid('Hello {{shop.name}}');
return liquid("Hello {{shop.name}}");
}
```

Expand All @@ -291,12 +298,12 @@

```ts
// app/routes/**\/.ts
import {authenticate} from '~/shopify.server';
import { authenticate } from "~/shopify.server";

export async function loader({request}) {
const {liquid, admin} = authenticate.public.appProxy(request);
export async function loader({ request }) {
const { liquid, admin } = authenticate.public.appProxy(request);

const response = await admin.graphql('QUERY');
const response = await admin.graphql("QUERY");
const json = await response.json();

return json(json);
Expand Down Expand Up @@ -333,8 +340,8 @@

```ts
// app/shopify.server.ts
import {shopifyApp} from '@shopify/shopify-app-remix';
import {restResources} from '@shopify/shopify-api/rest/admin/2023-04';
import { shopifyApp } from "@shopify/shopify-app-remix";
import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";

const shopify = shopifyApp({
restResources,
Expand All @@ -344,15 +351,15 @@
export default shopify;

// app/routes/\/.jsx
import {json} from '@remix-run/node';
import {authenticateExternalRequest} from '~/helpers/authenticate';
import shopify from '../../shopify.server';
import { json } from "@remix-run/node";
import { authenticateExternalRequest } from "~/helpers/authenticate";
import shopify from "../../shopify.server";

export async function loader({request}) {
export async function loader({ request }) {
const shop = await authenticateExternalRequest(request);
const {admin, session} = await shopify.unauthenticated.admin(shop);
const { admin, session } = await shopify.unauthenticated.admin(shop);

return json(await admin.rest.resources.Product.count({session}));
return json(await admin.rest.resources.Product.count({ session }));
}
```

Expand All @@ -366,10 +373,10 @@
<summary>See an example</summary>

```ts
export const loader = async ({request}) => {
const {redirect} = await authenticate.admin(request);
export const loader = async ({ request }) => {
const { redirect } = await authenticate.admin(request);

return redirect('https://www.example.com', {target: '_top'});
return redirect("https://www.example.com", { target: "_top" });
};
```

Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-remix/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-remix",
"version": "2.4.0",
"version": "2.4.1",
"description": "Shopify Remix - to simplify the building of Shopify Apps with Remix",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/shopify-app-session-storage-dynamodb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @shopify/shopify-app-session-storage-dynamodb

## 2.0.5

### Patch Changes

- 2b54692: Update @aws-sdk/client-dynamodb from 3.470.0 to 3.504.0.
- e2a8fd8: Updated the `@aws-sdk/util-dynamodb` dependency to v3.499.0

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-dynamodb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-session-storage-dynamodb",
"version": "2.0.4",
"version": "2.0.5",
"description": "Shopify App Session Storage for DynamoDB",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/shopify-app-session-storage-postgresql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @shopify/shopify-app-session-storage-postgresql

## 2.0.5

### Patch Changes

- 79193cc: Updated the `pg` dependency to v8.11.3

## 2.0.4

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-session-storage-postgresql",
"version": "2.0.4",
"version": "2.0.5",
"description": "Shopify App Session Storage for PostgreSQL",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/shopify-app-session-storage-redis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @shopify/shopify-app-session-storage-redis

## 2.0.5

### Patch Changes

- 106d459: Updates redis from 4.6.11 to 4.6.12.

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-redis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-session-storage-redis",
"version": "2.0.4",
"version": "2.0.5",
"description": "Shopify App Session Storage for Redis",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/shopify-app-session-storage-sqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @shopify/shopify-app-session-storage-sqlite

## 2.0.5

### Patch Changes

- 042182c: Updated `sqlite3` dependency to v5.1.7

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-session-storage-sqlite",
"version": "2.0.4",
"version": "2.0.5",
"description": "Shopify App Session Storage for SQLite",
"repository": {
"type": "git",
Expand Down

0 comments on commit dabeceb

Please sign in to comment.