@graphcommerce/magento-cart-shipping-address 3.0.15 → 3.0.16

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,54 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc.
8
+
9
+ Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react.
10
+
11
+ All occurences of `<Trans>` and `t` need to be replaced:
12
+
13
+ ```tsx
14
+ import { Trans, t } from '@lingui/macro'
15
+
16
+ function MyComponent() {
17
+ const foo = 'bar'
18
+ return (
19
+ <div aria-label={t`Account ${foo}`}>
20
+ <Trans>My Translation {foo}</Trans>
21
+ </div>
22
+ )
23
+ }
24
+ ```
25
+
26
+ Needs to be replaced with:
27
+
28
+ ```tsx
29
+ import { Trans } from '@lingui/react'
30
+ import { i18n } from '@lingui/core'
31
+
32
+ function MyComponent() {
33
+ const foo = 'bar'
34
+ return (
35
+ <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
36
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
37
+ </div>
38
+ )
39
+ }
40
+ ```
41
+
42
+ [More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros)
43
+
44
+ - Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]:
45
+ - @graphcommerce/react-hook-form@3.1.3
46
+ - @graphcommerce/magento-cart@4.2.13
47
+ - @graphcommerce/magento-customer@4.2.11
48
+ - @graphcommerce/magento-store@4.2.2
49
+ - @graphcommerce/next-ui@4.7.2
50
+ - @graphcommerce/graphql@3.1.3
51
+
3
52
  ## 3.0.15
4
53
 
5
54
  ### Patch Changes
@@ -14,7 +14,8 @@ import {
14
14
  UseFormComposeOptions,
15
15
  useFormPersist,
16
16
  } from '@graphcommerce/react-hook-form'
17
- import { t, Trans } from '@lingui/macro'
17
+ import { i18n } from '@lingui/core'
18
+ import { Trans } from '@lingui/react'
18
19
  import { TextField } from '@mui/material'
19
20
  import { AnimatePresence } from 'framer-motion'
20
21
  import React from 'react'
@@ -100,10 +101,10 @@ export function ShippingAddressForm(props: ShippingAddressFormProps) {
100
101
  type='text'
101
102
  error={!!formState.errors.telephone}
102
103
  required={required.telephone}
103
- label={<Trans>Telephone</Trans>}
104
+ label={<Trans id='Telephone' />}
104
105
  {...muiRegister('telephone', {
105
106
  required: required.telephone,
106
- pattern: { value: phonePattern, message: t`Invalid phone number` },
107
+ pattern: { value: phonePattern, message: i18n._(/* i18n */ `Invalid phone number`) },
107
108
  })}
108
109
  helperText={formState.isSubmitted && formState.errors.telephone?.message}
109
110
  InputProps={{
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-shipping-address",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.15",
5
+ "version": "3.0.16",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,22 +12,23 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.6",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.7",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
- "@graphcommerce/typescript-config-pwa": "^4.0.2",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.3",
18
18
  "@playwright/test": "^1.21.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "3.1.2",
21
+ "@graphcommerce/graphql": "3.1.3",
22
22
  "@graphcommerce/image": "3.1.5",
23
- "@graphcommerce/magento-cart": "4.2.12",
24
- "@graphcommerce/magento-customer": "4.2.10",
25
- "@graphcommerce/magento-store": "4.2.1",
26
- "@graphcommerce/next-ui": "4.7.1",
27
- "@graphcommerce/react-hook-form": "3.1.2"
23
+ "@graphcommerce/magento-cart": "4.2.13",
24
+ "@graphcommerce/magento-customer": "4.2.11",
25
+ "@graphcommerce/magento-store": "4.2.2",
26
+ "@graphcommerce/next-ui": "4.7.2",
27
+ "@graphcommerce/react-hook-form": "3.1.3"
28
28
  },
29
29
  "peerDependencies": {
30
- "@lingui/macro": "^3.13.2",
30
+ "@lingui/react": "^3.13.2",
31
+ "@lingui/core": "^3.13.2",
31
32
  "@mui/material": "5.5.3",
32
33
  "framer-motion": "^6.2.4",
33
34
  "next": "12.1.2",