@graphcommerce/magento-cart-email 3.0.17 → 3.0.18

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,55 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.18
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-product@4.3.3
49
+ - @graphcommerce/magento-store@4.2.2
50
+ - @graphcommerce/next-ui@4.7.2
51
+ - @graphcommerce/graphql@3.1.3
52
+
3
53
  ## 3.0.17
4
54
 
5
55
  ### Patch Changes
@@ -11,7 +11,7 @@ import {
11
11
  } from '@graphcommerce/magento-customer'
12
12
  import { AnimatedRow, extendableComponent, FormDiv, FormRow } from '@graphcommerce/next-ui'
13
13
  import { emailPattern, useFormCompose, UseFormComposeOptions } from '@graphcommerce/react-hook-form'
14
- import { Trans } from '@lingui/macro'
14
+ import { Trans } from '@lingui/react'
15
15
  import {
16
16
  CircularProgress,
17
17
  TextField,
@@ -67,14 +67,14 @@ export function EmailForm(props: EmailFormProps) {
67
67
  if (mode === 'signin') {
68
68
  endAdornment = (
69
69
  <Button color='secondary' style={{ whiteSpace: 'nowrap' }} onClick={() => setExpand(!expand)}>
70
- {expand ? <Trans>Close</Trans> : <Trans>Sign in</Trans>}
70
+ {expand ? <Trans id='Close' /> : <Trans id='Sign in' />}
71
71
  </Button>
72
72
  )
73
73
  }
74
74
  if (mode === 'signup') {
75
75
  endAdornment = (
76
76
  <Button color='secondary' style={{ whiteSpace: 'nowrap' }} onClick={() => setExpand(!expand)}>
77
- {expand ? <Trans>Close</Trans> : <Trans>Create Account</Trans>}
77
+ {expand ? <Trans id='Close' /> : <Trans id='Create Account' />}
78
78
  </Button>
79
79
  )
80
80
  }
@@ -87,7 +87,7 @@ export function EmailForm(props: EmailFormProps) {
87
87
  <form noValidate onSubmit={submit}>
88
88
  <FormRow>
89
89
  <Typography variant='h5' component='h2' gutterBottom>
90
- <Trans>Log in or create an account</Trans>
90
+ <Trans id='Log in or create an account' />
91
91
  </Typography>
92
92
  </FormRow>
93
93
  <FormRow className={classes.formRow} sx={{ py: 0 }}>
@@ -96,7 +96,7 @@ export function EmailForm(props: EmailFormProps) {
96
96
  type='email'
97
97
  error={formState.isSubmitted && !!formState.errors.email}
98
98
  helperText={formState.isSubmitted && formState.errors.email?.message}
99
- label={<Trans>Email</Trans>}
99
+ label={<Trans id='Email' />}
100
100
  required={required.email}
101
101
  {...muiRegister('email', {
102
102
  required: required.email,
@@ -132,7 +132,7 @@ export function EmailForm(props: EmailFormProps) {
132
132
  {mode === 'session-expired' && (
133
133
  <FormRow>
134
134
  <Alert severity='error'>
135
- <Trans>You must sign in to continue</Trans>
135
+ <Trans id='You must sign in to continue' />
136
136
  </Alert>
137
137
  </FormRow>
138
138
  )}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-email",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.17",
5
+ "version": "3.0.18",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,23 +12,24 @@
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-product": "4.3.2",
26
- "@graphcommerce/magento-store": "4.2.1",
27
- "@graphcommerce/next-ui": "4.7.1",
28
- "@graphcommerce/react-hook-form": "3.1.2"
23
+ "@graphcommerce/magento-cart": "4.2.13",
24
+ "@graphcommerce/magento-customer": "4.2.11",
25
+ "@graphcommerce/magento-product": "4.3.3",
26
+ "@graphcommerce/magento-store": "4.2.2",
27
+ "@graphcommerce/next-ui": "4.7.2",
28
+ "@graphcommerce/react-hook-form": "3.1.3"
29
29
  },
30
30
  "peerDependencies": {
31
- "@lingui/macro": "^3.13.2",
31
+ "@lingui/react": "^3.13.2",
32
+ "@lingui/core": "^3.13.2",
32
33
  "@mui/material": "5.5.3",
33
34
  "framer-motion": "^6.2.4",
34
35
  "next": "12.1.2",