-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We're making some updates to Next.js Commerce. Everything prior to this commit marks what we're calling [`v1`](https://github.com/vercel/commerce/releases/tag/v1) as a point in time to be able to reference and still use going into the future. The current architecture of Commerce is a multi-vendor, interoperable solution, including: - [Shopify](https://shopify.vercel.store/) - [Swell](https://swell.vercel.store/) - [BigCommerce](https://bigcommerce.vercel.store/) - [Vendure](https://vendure.vercel.store/) - [Saleor](https://saleor.vercel.store/) - [Ordercloud](https://ordercloud.vercel.store/) - [Spree](https://spree.vercel.store/) - [Kibo Commerce](https://kibocommerce.vercel.store/) - [Commerce.js](https://commercejs.vercel.store/) - [SalesForce Cloud Commerce](https://salesforce-cloud-commerce.vercel.store/) All features can be toggled on or off, and it's easy to change between commerce providers. To support this, we needed to create a ["commerce metaframework"](https://github.com/vercel/commerce/blob/d1d9e8c4343e70d72df6e00ec95f6ea4efbb7c54/packages/commerce/new-provider.md) where providers could confirm to an API spec to add support for Next.js Commerce. While this worked and was successful for `v1`, we have different design goals and ambitions for `v2`. **What You Need To Know** - `v1` will not be updated moving forward. If you need to reference `v1`, you will still be able to clone and deploy the version tagged at this release. - `v2` will be shifting to be a single provider vs. provider agnostic. Other providers are welcome to fork this repository and swap out the underlying `lib/` implementation that connects to the selected commerce provider (Shopify). This architecture was chosen to reduce the surface area of the codebase, remove the intermediate metaframework layer for provider-interoperability, and enable usage with the latest Next.js and React features. - We will be sharing more about `v2` in the future as we continue to iterate before the marked release.
- Loading branch information
Showing
1,288 changed files
with
6,079 additions
and
149,538 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
SHOPIFY_STOREFRONT_ACCESS_TOKEN= | ||
SHOPIFY_STORE_DOMAIN= | ||
SHOPIFY_REVALIDATION_TOKEN= |
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,23 @@ | ||
module.exports = { | ||
extends: ['next', 'prettier'], | ||
plugins: ['unicorn'], | ||
rules: { | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
args: 'after-used', | ||
caughtErrors: 'none', | ||
ignoreRestSiblings: true, | ||
vars: 'all' | ||
} | ||
], | ||
'prefer-const': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'unicorn/filename-case': [ | ||
'error', | ||
{ | ||
case: 'kebabCase' | ||
} | ||
] | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
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,49 @@ | ||
name: e2e | ||
on: | ||
schedule: | ||
# Runs "at 09:00 and 15:00, Monday through Friday" (see https://crontab.guru) | ||
- cron: '0 9,15 * * 1-5' | ||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel running workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set node version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Set pnpm version | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: false | ||
version: 7 | ||
- name: Cache node_modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: node-modules-cache-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
- name: Install dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: pnpm install | ||
- name: Get playwright version | ||
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./node_modules/@playwright/test/package.json').version)")" >> $GITHUB_ENV | ||
- name: Cache playwright | ||
uses: actions/cache@v3 | ||
id: playwright-cache | ||
with: | ||
path: '~/.cache/ms-playwright' | ||
key: playwright-cache-${{ env.PLAYWRIGHT_VERSION }} | ||
- name: Install playwright browsers | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
run: npx playwright install --with-deps | ||
- name: Install playwright browser dependencies | ||
if: steps.playwright-cache.outputs.cache-hit == 'true' | ||
run: npx playwright install-deps | ||
- name: Run tests | ||
run: pnpm test:e2e |
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,32 @@ | ||
name: test | ||
on: pull_request | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel running workflows | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set node version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Set pnpm version | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: false | ||
version: 7 | ||
- name: Cache node_modules | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: node-modules-cache-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
- name: Install dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: pnpm install | ||
- name: Run tests | ||
run: pnpm test |
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,39 +1,38 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.pnpm-debug.log | ||
|
||
# testing | ||
coverage | ||
/coverage | ||
.playwright | ||
|
||
# next.js | ||
.next | ||
out | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
build | ||
dist | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
.idea | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env* | ||
!.env.example | ||
|
||
# vercel | ||
.vercel | ||
|
||
# Turborepo | ||
.turbo | ||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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 @@ | ||
16 |
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,5 +1,3 @@ | ||
# Every package defines its prettier config | ||
node_modules | ||
dist | ||
.vercel | ||
.next | ||
public | ||
pnpm-lock.yaml |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.