@graphcommerce/magento-category 4.0.15 → 4.1.2

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
@@ -1,5 +1,29 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]:
8
+ - @graphcommerce/graphql@3.1.2
9
+ - @graphcommerce/magento-product@4.3.1
10
+ - @graphcommerce/magento-store@4.2.1
11
+ - @graphcommerce/next-ui@4.7.1
12
+ - @graphcommerce/framer-scroller@2.1.9
13
+
14
+ ## 4.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`669a17a97`](https://github.com/graphcommerce-org/graphcommerce/commit/669a17a973c47c00fed4a649a9da0bfc5670c5da)]:
19
+ - @graphcommerce/magento-product@4.3.0
20
+
21
+ ## 4.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [#1434](https://github.com/graphcommerce-org/graphcommerce/pull/1434) [`3c1c9ce2a`](https://github.com/graphcommerce-org/graphcommerce/commit/3c1c9ce2a947386515df019c31d697114a87dc07) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Add page number to meta title and description
26
+
3
27
  ## 4.0.15
4
28
 
5
29
  ### Patch Changes
@@ -6,16 +6,22 @@ import { CategoryMetaFragment } from './CategoryMeta.gql'
6
6
  type CategoryMetaProps = CategoryMetaFragment &
7
7
  Omit<PageMetaProps, 'title' | 'metaDescription'> & {
8
8
  params?: ProductListParams
9
+ current_page?: number | null | undefined
9
10
  }
10
11
 
11
12
  export function CategoryMeta(props: CategoryMetaProps) {
12
- const { name, meta_title, meta_description, params, ...pageMetaProps } = props
13
+ const { name, meta_title, meta_description, current_page, params, ...pageMetaProps } = props
14
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
13
15
  const anyFilterActive = Object.keys(params?.filters ?? {}).length > 0
14
16
 
15
17
  return (
16
18
  <PageMeta
17
- title={meta_title ?? name ?? ''}
18
- metaDescription={meta_description ?? undefined}
19
+ title={`${meta_title ?? name ?? ''} ${
20
+ current_page && current_page > 1 ? `- Page ${current_page}` : ''
21
+ }`}
22
+ metaDescription={`${meta_description ?? undefined} ${
23
+ current_page && current_page > 1 ? `- Page ${current_page}` : ''
24
+ }`}
19
25
  metaRobots={anyFilterActive ? ['noindex'] : undefined}
20
26
  canonical={`/${params?.url}${
21
27
  (params?.currentPage ?? 1) > 1 ? `/q/page/${params?.currentPage}` : ''
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-category",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.0.15",
5
+ "version": "4.1.2",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,12 +19,12 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "2.1.8",
23
- "@graphcommerce/graphql": "3.1.1",
22
+ "@graphcommerce/framer-scroller": "2.1.9",
23
+ "@graphcommerce/graphql": "3.1.2",
24
24
  "@graphcommerce/image": "3.1.5",
25
- "@graphcommerce/magento-product": "4.2.0",
26
- "@graphcommerce/magento-store": "4.2.0",
27
- "@graphcommerce/next-ui": "4.7.0"
25
+ "@graphcommerce/magento-product": "4.3.1",
26
+ "@graphcommerce/magento-store": "4.2.1",
27
+ "@graphcommerce/next-ui": "4.7.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@lingui/macro": "^3.13.2",