@graphcommerce/magento-store 3.0.25 → 3.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.29](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-store@3.0.28...@graphcommerce/magento-store@3.0.29) (2021-10-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * compatibility with venia theme ([c0bcdd5](https://github.com/ho-nl/m2-pwa/commit/c0bcdd511de5679f185f0984816b1f0cafa449e0))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.0.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-store@3.0.6...@graphcommerce/magento-store@3.0.7) (2021-09-30)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-store",
3
- "version": "3.0.25",
3
+ "version": "3.0.29",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -14,23 +14,23 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@graphcommerce/browserslist-config-pwa": "^3.0.2",
17
- "@graphcommerce/eslint-config-pwa": "^3.0.7",
17
+ "@graphcommerce/eslint-config-pwa": "^3.1.0",
18
18
  "@graphcommerce/prettier-config-pwa": "^3.0.3",
19
19
  "@graphcommerce/typescript-config-pwa": "^3.1.1",
20
20
  "@playwright/test": "^1.15.2"
21
21
  },
22
22
  "dependencies": {
23
23
  "@apollo/client": "^3.4.16",
24
- "@graphcommerce/graphql": "^2.103.7",
25
- "@graphcommerce/image": "^2.104.10",
26
- "@graphcommerce/next-ui": "^3.5.0",
24
+ "@graphcommerce/graphql": "^2.104.0",
25
+ "@graphcommerce/image": "^2.104.12",
26
+ "@graphcommerce/next-ui": "^3.8.0",
27
27
  "@graphql-typed-document-node/core": "^3.1.0",
28
28
  "@material-ui/core": "^4.12.3",
29
29
  "@material-ui/lab": "^4.0.0-alpha.60",
30
30
  "next": "^11.1.2",
31
31
  "react": "^17.0.2",
32
32
  "react-dom": "^17.0.2",
33
- "type-fest": "^2.5.0"
33
+ "type-fest": "^2.5.1"
34
34
  },
35
- "gitHead": "08f4dbe739a38ece2c47aa1e94c10f8397da27fa"
35
+ "gitHead": "5a288cb32af2e48278c330ffb36d72be03700ffd"
36
36
  }
@@ -20,7 +20,7 @@ export type StoreSwitcherButtonProps = UseStyles<typeof useStyles>
20
20
 
21
21
  export default function StoreSwitcherButton(props) {
22
22
  const config = useQuery(StoreConfigDocument)
23
- const country = config.data?.storeConfig?.store_code?.split('_')?.[1].toLowerCase() ?? ''
23
+ const country = config.data?.storeConfig?.store_code?.split('_')?.[1]?.toLowerCase() ?? ''
24
24
 
25
25
  const classes = useStyles(props)
26
26
  return (
@@ -1,7 +0,0 @@
1
- declare namespace NodeJS {
2
- interface ProcessEnv {
3
- readonly NEXT_PUBLIC_MAGENTO_CONFIG: {
4
- [storeCode: string]: NonNullable<NonNullable<EnvConfigQuery['envConfig']>[0]>
5
- }
6
- }
7
- }
@@ -1,33 +0,0 @@
1
- query EnvConfig {
2
- envConfig: availableStores {
3
- absolute_footer
4
- allow_guests_to_write_product_reviews
5
- allow_items
6
- allow_order
7
- autocomplete_on_storefront
8
- base_currency_code
9
-
10
- store_code
11
- store_name
12
-
13
- locale
14
- base_currency_code
15
- default_display_currency_code
16
-
17
- title_suffix
18
- title_prefix
19
- title_separator
20
- default_title
21
-
22
- cms_home_page
23
-
24
- catalog_default_sort_by
25
- category_url_suffix
26
- product_url_suffix
27
- base_link_url
28
-
29
- root_category_uid
30
-
31
- weight_unit
32
- }
33
- }
@@ -1,38 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
- import fs from 'fs'
3
- import { FetchResult } from '@apollo/client'
4
- import { config } from 'dotenv'
5
- import { print } from 'graphql'
6
- import fetch from 'node-fetch'
7
- import { EnvConfigDocument, EnvConfigQuery } from './EnvConfig.gql'
8
-
9
- config()
10
-
11
- async function configToPublicEnv() {
12
- const req = await fetch('http://localhost:3001/api/graphql', {
13
- headers: {
14
- accept: '*/*',
15
- 'content-type': 'application/json',
16
- },
17
- body: JSON.stringify({
18
- operationName: null,
19
- variables: null,
20
- query: print(EnvConfigDocument),
21
- }),
22
- // '{"operationName":null,"variables":{},"query":"{\\n availableStores {\\n absolute_footer\\n allow_guests_to_write_product_reviews\\n allow_items\\n allow_order\\n autocomplete_on_storefront\\n base_currency_code\\n store_code\\n store_name\\n locale\\n base_currency_code\\n default_display_currency_code\\n title_suffix\\n title_prefix\\n title_separator\\n default_title\\n cms_home_page\\n catalog_default_sort_by\\n category_url_suffix\\n product_url_suffix\\n base_link_url\\n root_category_uid\\n weight_unit\\n }\\n}\\n"}',
23
- method: 'POST',
24
- })
25
- const response = ((await req.json()) || {}) as FetchResult<EnvConfigQuery>
26
-
27
- const data = Object.fromEntries(
28
- (response.data!.envConfig || []).map((entry) => [entry!.store_code, entry]),
29
- )
30
- fs.writeFile('./global-manifest.json', JSON.stringify(data), (err) => {
31
- if (err) throw err
32
- console.info('Global data manifest written to file')
33
- })
34
- }
35
-
36
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
37
- // eslint-disable-next-line no-console
38
- configToPublicEnv().then(console.log).catch(console.error)