Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/canary' into fix/validate-signin
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni-Schroevers committed Dec 3, 2024
2 parents 6d7c50c + e528743 commit b9ea034
Show file tree
Hide file tree
Showing 352 changed files with 3,323 additions and 2,267 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-ants-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

Hide ProductScroller components when no items are available
6 changes: 6 additions & 0 deletions .changeset/neat-timers-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphcommerce/docs': patch
'@graphcommerce/service-worker': patch
---

Moved to serwist for service workers
5 changes: 5 additions & 0 deletions .changeset/olive-windows-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-customer': patch
---

fix session expired email not always available in cache
5 changes: 5 additions & 0 deletions .changeset/pink-goats-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/ecommerce-ui': patch
---

Omit disableUnderline prop for ‘outlined’ variant, because its not supported.
11 changes: 10 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@
"@graphcommerce/algolia-recommend": "9.0.0-canary.76",
"@graphcommerce/hygraph-ui": "9.0.0-canary.102",
"@graphcommerce/magento-open-source": "9.0.0-canary.103",
"@graphcommerce/google-playstore": "9.0.0-canary.106"
"@graphcommerce/google-playstore": "9.0.0-canary.106",
"@graphcommerce/service-worker": "9.0.0-canary.107"
},
"changesets": [
"afraid-ants-shout",
"afraid-islands-remain",
"afraid-rockets-rule",
"angry-badgers-carry",
Expand Down Expand Up @@ -205,6 +207,7 @@
"moody-vans-juggle",
"nasty-coins-dream",
"neat-frogs-hide",
"neat-timers-unite",
"nervous-bulldogs-relax",
"new-squids-clean",
"nice-socks-occur",
Expand All @@ -219,7 +222,9 @@
"old-dodos-listen",
"olive-days-brush",
"olive-pumas-perform",
"olive-windows-tickle",
"perfect-wombats-raise",
"pink-goats-shop",
"pink-students-greet",
"polite-crabs-cry",
"polite-kiwis-wash",
Expand Down Expand Up @@ -260,6 +265,7 @@
"sixty-rockets-fix",
"slimy-swans-repair",
"slow-kiwis-exercise",
"small-onions-marry",
"small-pans-cry",
"smooth-jars-walk",
"soft-cycles-drop",
Expand All @@ -268,6 +274,7 @@
"sour-falcons-yawn",
"sour-weeks-beam",
"spotty-ads-live",
"spotty-moons-jog",
"stale-coins-explode",
"stale-dogs-prove",
"strange-tools-kiss",
Expand All @@ -283,6 +290,7 @@
"tasty-glasses-tan",
"tasty-phones-begin",
"tasty-queens-hunt",
"ten-camels-repeat",
"tender-ads-rest",
"tender-mangos-flow",
"thick-snakes-explode",
Expand All @@ -303,6 +311,7 @@
"weak-falcons-repair",
"wild-news-notice",
"witty-apes-rescue",
"witty-beers-fail",
"witty-carpets-flow",
"witty-geckos-flash",
"yellow-ladybugs-exist",
Expand Down
28 changes: 28 additions & 0 deletions .changeset/small-onions-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
'@graphcommerce/magento-cart-shipping-address': patch
'@graphcommerce/magento-cart-shipping-method': patch
'@graphcommerce/magento-product-configurable': patch
'@graphcommerce/magento-product-downloadable': patch
'@graphcommerce/magento-product-grouped': patch
'@graphcommerce/magento-product-bundle': patch
'@graphcommerce/mollie-magento-payment': patch
'@graphcommerce/magento-pagebuilder': patch
'@graphcommerce/magento-cart-items': patch
'@graphcommerce/magento-newsletter': patch
'@graphcommerce/magento-category': patch
'@graphcommerce/magento-customer': patch
'@graphcommerce/magento-wishlist': patch
'@graphcommerce/framer-scroller': patch
'@graphcommerce/magento-compare': patch
'@graphcommerce/magento-product': patch
'@graphcommerce/algolia-search': patch
'@graphcommerce/magento-review': patch
'@graphcommerce/magento-search': patch
'@graphcommerce/magento-store': patch
'@graphcommerce/ecommerce-ui': patch
'@graphcommerce/magento-cart': patch
'@graphcommerce/graphcms-ui': patch
'@graphcommerce/next-ui': patch
---

Made all component prop types exported
5 changes: 5 additions & 0 deletions .changeset/spotty-moons-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product-configurable': patch
---

Respect configurableVariantValues.gallery config when selecting a configurable variant. The image should only change to the simple product image when the config is set to true, otherwise the configurable image should remain. To keep this functionality, please set `configurableVariantValues: { gallery: true }` in your graphcommerce.config.js
5 changes: 5 additions & 0 deletions .changeset/ten-camels-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

Allow adding elements after/between product list items (e.g. banners)
11 changes: 11 additions & 0 deletions .changeset/witty-beers-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@graphcommerce/magento-cart-shipping-method': patch
'@graphcommerce/magento-product-configurable': patch
'@graphcommerce/magento-customer': patch
'@graphcommerce/magento-wishlist': patch
'@graphcommerce/magento-product': patch
'@graphcommerce/ecommerce-ui': patch
'@graphcommerce/next-ui': patch
---

Allow changing various props for internal components
7 changes: 4 additions & 3 deletions .github/workflows/bundlesize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 20
cache: yarn
cache-dependency-path: package.json
- run: yarn install
- run: cd examples/magento-graphcms && yarn codegen && cd ../..
- run: yarn test
Expand All @@ -31,11 +32,11 @@ jobs:
ref: ${{ github.base_ref }}
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: '@graphcommerce'
cache-dependency-path: ./old/yarn.lock
cache: yarn
cache-dependency-path: new/package.json
- run: cd new && yarn install && cd ..
- run: cd new/examples/magento-graphcms && yarn build > ../../../new.txt && cd ../../..
- run: cat new.txt
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/periodic-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
branches:
- 'canary'
concurrency:
group: release-canary
group: periodic-build
cancel-in-progress: true
jobs:
notify-start:
name: Notify release start
Expand Down Expand Up @@ -60,5 +61,5 @@ jobs:
time: ${{ needs.notify-start.outputs.time }}
result: ${{ needs.publish.result }}
channel: graphcommerce-build
message: "One or more Node.js versions failed in the periodic build"
message: 'One or more Node.js versions failed in the periodic build'
notifyOnlyOnFailure: true
6 changes: 4 additions & 2 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: release-canary
on:
push:
branches:
Expand All @@ -19,7 +19,8 @@ jobs:
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 18
node-version: 20
cache-dependency-path: package.json
registry-url: 'https://registry.npmjs.org'
scope: '@graphcommerce'
- name: yarn install && yarn postinstall
Expand All @@ -46,6 +47,7 @@ jobs:
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=date::$(date +"%B %d, %Y")"
- name: release
id: changesets
uses: paales/changesets-action@main
with:
publish: 'yarn release'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: release-main
on:
push:
branches:
Expand All @@ -19,6 +19,7 @@ jobs:
with:
cache: yarn
node-version: 20
cache-dependency-path: package.json
registry-url: 'https://registry.npmjs.org'
scope: '@graphcommerce'
- name: yarn install && yarn postinstall
Expand Down
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ enableImmutableInstalls: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 9.0.0-canary.108

### Patch Changes

- [#2439](https://github.com/graphcommerce-org/graphcommerce/pull/2439) [`6061226`](https://github.com/graphcommerce-org/graphcommerce/commit/60612265466e4c508a2d3f478ff679251e7819de) - Moved to serwist for service workers ([@paales](https://github.com/paales))

## 9.0.0-canary.107

## 9.0.0-canary.106
Expand Down
29 changes: 20 additions & 9 deletions docs/framework/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,33 @@ cache.

The service worker caches:

- [static fonts](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L28)
- [static images](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L39)
- [\_next/image](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L50)
- [js](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L85)
- [static fonts](https://github.com/serwist/serwist/blob/main/packages/next/src/index.worker.ts#L27):
Google fonts and webfonts with StaleWhileRevalidate strategy
- [static images](https://github.com/serwist/serwist/blob/main/packages/next/src/index.worker.ts#L64):
jpg, jpeg, gif, png, svg, ico, webp with StaleWhileRevalidate strategy
- [\_next/image](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/service-worker/runtimeCaching.ts#L6):
Custom implementation with StaleWhileRevalidate and nextImagePlugin
- js and css files: Only for files outside of `_next/static` with
StaleWhileRevalidate strategy

Notable differences from previous implementation:

- All `_next/static` files (js, css) are excluded from runtime caching as they
are handled by the precache mechanism
- Cross-origin requests use NetworkOnly strategy instead of NetworkFirst
- Image caching has been optimized with custom configuration for better
performance

Note: When a new deployment is made, the service worker is updated. This means
that all previous caches are cleared and new caches are created.

It does not cache:

- [\_next/data](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L107):
Although it looks like it does, the regex is actually wrong and it does not
cache anything.
- [pages](https://github.com/shadowwalker/next-pwa/blob/master/cache.js#L152)
- [\_next/data](https://github.com/ducanh-99/serwist/blob/main/packages/next/src/index.worker.ts#L137):
Uses NetworkFirst strategy to ensure fresh data
- [pages](https://github.com/ducanh-99/serwist/blob/main/packages/next/src/index.worker.ts#L152):
Uses NetworkFirst strategy, which means it will always try to fetch the
resource from the network first, and only if that fails it will use the cache.
resource from the network first, and only if that fails it will use the cache

## Cache invalidation limitations

Expand Down
38 changes: 27 additions & 11 deletions docs/getting-started/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ metaTitle: Getting started with GraphCommerce
In this guide, you will set up a GraphCommerce app locally, allowing you to
start building.

### Requirements
### Preparations

- Lixux, MacOS or WSL2
- Install and use node 16/18: `nvm install 16` or `nvm use 16`
- MacOS, Windows with WSL2 or Linux
- Install and use node 20: `nvm install 20` or `nvm use 20`
- Install yarn: `corepack enable`

## Step 1: Create a GraphCommerce app
Expand All @@ -26,19 +26,34 @@ mkdir my-project
# Create project folder
```

There are a few starting points to choose from with or without Hygraph:

Option 1: Only Magento Open Source:

```bash
cp -R graphcommerce/examples/magento-graphcms/. my-project && rm -rf graphcommerce && cd my-project
# Copy example, delete repo, navigate to project folder
cp -R graphcommerce/examples/magento-magento-open-source/. my-project && cd my-project
```

Option 2: Magento Open Source + Hygraph:

```bash
cp -R graphcommerce/examples/magento-graphcms/. my-project && cd my-project
```

Option 3: Adobe Commerce:

Please contact us for more information to get access to the Adobe Commerce
starting point.

## Step 2: Configure API keys (optional)

Duplicate and rename the configuration example file to:
`graphcommerce.config.js` and configure the following:

- `magentoEndpoint` [?](../framework/config.md#magentoendpoint-string)
- `hygraphEndpoint` [?](../framework/config.md#hygraphendpoint-string)
- `magentoStoreCode` [?](../framework/config.md#magentostorecode-string)
- `magentoEndpoint` [?](../framework/config.md#magentoendpoint-string-required)
- `hygraphEndpoint` [?](../framework/config.md#hygraphendpoint-string-required)
- `magentoStoreCode`
[?](../framework/config.md#magentostorecode-string-required)

> magentoStoreCode
>
Expand All @@ -55,11 +70,12 @@ Duplicate and rename the configuration example file to:
### Requirements

- Magento version 2.4.3 or higher - Clean install, a production or a development
environment
- Magento version 2.4.5 or higher - Clean install, a production or a development
environment (technically 2.4.3 and 2.4.4 also work, but in practice important
bugfixes have been made in the latest versions.)
- Hygraph - A project with the required schema.
[Clone ↗](https://app.hygraph.com/clone/caddaa93cfa9436a9e76ae9c0f34d257?name=GraphCommerce%20Demo)
the schema as your starting point.
the schema as your starwting point.

## Step 3: Start the app

Expand Down
Loading

0 comments on commit b9ea034

Please sign in to comment.