Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jwm0 committed Jun 15, 2021
2 parents 0faccb9 + 9aaacc7 commit 6a5a4e8
Show file tree
Hide file tree
Showing 209 changed files with 38,209 additions and 21,704 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ NEXT_PUBLIC_DEMO_MODE=false
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_SENTRY_APM=0
NEXT_PUBLIC_SENTRY_DSN=
# ssr envs
INCREMENTAL_STATIC_REGENERATION_REVALIDATE=3600 # 1 hour
NEXT_PUBLIC_STATIC_PATHS_FALLBACK=blocking
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
["^[^. ]"],
// ALiases.
[
"^(@components|@paths|@pages|@utils|@hooks|@types|@app|@locale|@temp|@styles)(/.*|$)"
"^(@components|@paths|@pages|@utils|@hooks|@types|@app|@locale|@temp|@styles|@graphql)(/.*|$)"
],
// Relative imports.
// Anything that starts with a dot.
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ greatly reduce the amount of work needed to review your work. -->
<!-- Do not remove this section. It is required to properly setup test instance.
Modify API_URI if you want test instance to use custom backend. -->

API_URI=https://master.staging.saleor.cloud/graphql/
API_URI=https://qa.staging.saleor.cloud/graphql/
41 changes: 0 additions & 41 deletions .github/workflows/deploy-staging.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-env-cleanup.yml

This file was deleted.

112 changes: 0 additions & 112 deletions .github/workflows/test-env-deploy.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
!.env.development
!.env.production
!.nvmrc
schema.graphql

dist
node_modules
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12
v14.16
4 changes: 2 additions & 2 deletions .storybook/.babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"env": {
"test": {
"presets": [["@babel/preset-env", { "modules": "commonjs" }]],
"presets": ["next/babel"],
"plugins": ["require-context-hook"]
}
},
"presets": ["@babel/preset-env", "@babel/preset-react"]
"presets": ["next/babel"]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable, unreleased changes to this project will be documented in this file.

## [Unreleased]

- Add EditorJS embeded renderer - SALEOR-3354 by @mociepka
- Handle Order confirmation at Thank You page - #956 by @mmarkusik
- Add EditorJS renderer - #947 by @krzysztofwolski
- New cart sidebar - #907 by @orzechdev
Expand All @@ -13,6 +14,9 @@ All notable, unreleased changes to this project will be documented in this file.
- Use only selection attributes in variant picker - #963 by @orzechdev
- Drop deprecated `ProductVariant.isAvailable` field - #965 by @maarcingebala
- Add eslint import sort - #979 by @pitorgrundas
- Enable incremental server-side regeneration for store pages - #988 by @pitorgrundas
- Update account mutations with channel slug - #1039 by @orzechdev
- Update register mutation with channel slug - #1045 by @orzechdev

## 2.11.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![1 copy 2x](https://user-images.githubusercontent.com/5421321/47798207-30aeea00-dd28-11e8-9398-3d8426836a83.png)

_**Note:** This project is beta quality. We don't advise using it in production._
_**Note:** This project is a demonstration on how Saleor can be used. It’s not ready to be a starter but rather show how different cases can be handled and could be used as a recipe book. There **will** be breaking changes and the code is constantly evolving, so use at your own risk._

A GraphQL-powered, PWA, single-page application storefront for [Saleor](https://github.com/mirumee/saleor/).

Expand All @@ -28,12 +28,12 @@ These instructions will get you a copy of the project up and running on your loc

### Prerequisites

- Node.js 12.0+
- Node.js 14.16
- A running instance of Saleor.

To run the storefront, you have to set the `NEXT_PUBLIC_API_URI` environment variable to point to the Saleor GraphQL API.
If you are running Saleor locally, with the default settings, `NEXT_PUBLIC_API_URI` is set to: `http://localhost:8000/graphql/`.
To change it, either create a [.env.local` file](https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables) and add it there or set an env variable using `export` command.
To change it, either create a [`.env.local` file](https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables) and add it there or set an env variable using `export` command.

### Installing

Expand Down
10 changes: 8 additions & 2 deletions apollo.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
const dotenv = require("dotenv");

const config = {
...dotenv.config().parsed,
...dotenv.config({ path: ".env.local" }).parsed,
};

module.exports = {
client: {
excludes: ["**/__tests__/**/*", "**/@sdk/**/*"],
service: {
name: "saleor",
url: "http://localhost:8000/graphql/",
url: config.NEXT_PUBLIC_API_URI,
},
},
};
31 changes: 8 additions & 23 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,15 @@ module.exports = api => {
isTest || isStorybook
? []
: ["**/*.test.ts", "**/*.test.tsx", "src/storybook"];
const presets = [
"@babel/preset-env",
"@babel/preset-react",
const presets = ["next/babel"];
const plugins = [
[
"@babel/preset-typescript",
"styled-components",
{
allowNamespaces: true,
ssr: true,
displayName: true,
},
],
];
const plugins = [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-typescript",
"babel-plugin-styled-components",
"transform-class-properties",
"@babel/transform-runtime",
"@babel/plugin-proposal-optional-chaining",
[
"react-intl-auto",
{
Expand All @@ -32,21 +24,14 @@ module.exports = api => {
removePrefix: "src/",
},
],
];
if (isExtract) {
plugins.push([
isExtract && [
"react-intl",
{
extractFromFormatMessageCall: true,
messagesDir: "dist/locale/",
},
]);
}
if (isStorybook) {
plugins.push("babel-plugin-styled-components");
}

plugins.push("macros");
],
].filter(Boolean);

return {
ignore,
Expand Down
Loading

1 comment on commit 6a5a4e8

@vercel
Copy link

@vercel vercel bot commented on 6a5a4e8 Jun 15, 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.