Skip to content

Commit

Permalink
Merge pull request #413 from commercelayer/fix/avoid-saving-a-custome…
Browse files Browse the repository at this point in the history
…r-payment-source-on-subscription

Avoid saving a customer payment source twice with an order including an item with `frequency`
  • Loading branch information
malessani authored Jan 4, 2024
2 parents d193a33 + 99e6872 commit 529114a
Show file tree
Hide file tree
Showing 11 changed files with 598 additions and 2,372 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"less.validate": false,
"scss.validate": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
2 changes: 1 addition & 1 deletion @typings/checkout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface HSLProps {
interface CheckoutSettings {
accessToken: string
orderId: string
orderNumber: number
orderNumber: number | string
validCheckout: true
isGuest: boolean
isShipmentRequired: boolean
Expand Down
2 changes: 1 addition & 1 deletion components/composite/Checkout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Logo } from "components/ui/Logo"
interface Props {
logoUrl: NullableType<string>
primaryColor: string
orderNumber: number
orderNumber: number | string
companyName: string
supportEmail: NullableType<string>
supportPhone: NullableType<string>
Expand Down
2 changes: 1 addition & 1 deletion components/composite/MainHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from "styled-components"
import tw from "twin.macro"

interface Props {
orderNumber: number
orderNumber: number | string
}

export const MainHeader: React.FC<Props> = ({ orderNumber }) => {
Expand Down
2 changes: 1 addition & 1 deletion components/composite/StepComplete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface Props {
companyName: string
supportEmail: NullableType<string>
supportPhone: NullableType<string>
orderNumber: number
orderNumber: number | string
}

export const StepComplete: React.FC<Props> = ({
Expand Down
5 changes: 2 additions & 3 deletions components/composite/StepCustomer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ export const StepCustomer: React.FC<Props> = () => {
setCustomerEmail,
} = appCtx

const [shipToDifferentAddress, setShipToDifferentAddress] = useState(
!hasSameAddresses
)
const [shipToDifferentAddress, setShipToDifferentAddress] =
useState(!hasSameAddresses)

useEffect(() => {
setShipToDifferentAddress(!hasSameAddresses)
Expand Down
2 changes: 1 addition & 1 deletion components/data/GTMProvider/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface EcommerceProps {
items?: (DataLayerItemProps | undefined)[]
value?: NullableType<number>
shipping_tier?: NullableType<string>
transaction_id?: NullableType<number>
transaction_id?: NullableType<string | number>
payment_type?: NullableType<string>
tax?: NullableType<number>
}
Expand Down
45 changes: 22 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mfe-checkout",
"version": "4.4.2",
"engines": {
"node": "18.x"
"node": ">=18.x"
},
"private": true,
"scripts": {
Expand Down Expand Up @@ -71,42 +71,41 @@
"commercelayer"
],
"dependencies": {
"@commercelayer/react-components": "^4.8.4",
"@commercelayer/sdk": "5.21.1",
"@commercelayer/react-components": "^4.8.5",
"@commercelayer/sdk": "^5.26.0",
"@faker-js/faker": "^8.3.1",
"@headlessui/react": "^1.7.17",
"@next/bundle-analyzer": "14.0.2",
"@next/eslint-plugin-next": "14.0.2",
"@next/bundle-analyzer": "^14.0.4",
"@next/eslint-plugin-next": "^14.0.4",
"@playwright/test": "^1.40.1",
"@tailwindcss/forms": "^0.5.7",
"@types/async-retry": "1.4.8",
"@types/jsonwebtoken": "^9.0.5",
"@types/node": "^20.10.5",
"@types/react": "^18.2.45",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-gtm-module": "^2.0.3",
"@types/styled-components": "^5.1.34",
"async-retry": "^1.3.3",
"autoprefixer": "^10.4.16",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-styled-components": "^2.1.4",
"classnames": "^2.3.2",
"classnames": "^2.5.1",
"cron-parser": "^4.9.0",
"cronstrue": "^2.47.0",
"dotenv": "^16.3.1",
"i18next": "^23.7.11",
"i18next": "^23.7.15",
"jsonwebtoken": "^9.0.2",
"jwt-decode": "^4.0.0",
"lerna": "^7.4.2",
"next": "14.0.2",
"next": "^14.0.4",
"next-build-id": "^3.0.0",
"next-i18next": "^15.1.1",
"next-i18next": "^15.1.2",
"postcss": "^8.4.32",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-gtm-module": "^2.0.11",
"react-i18next": "^13.5.0",
"react-i18next": "^14.0.0",
"react-router-dom": "^6.21.1",
"styled-components": "^6.1.2",
"styled-components": "^6.1.6",
"tailwindcss": "^3.4.0",
"twin.macro": "^3.4.0",
"typescript": "^5.3.3"
Expand All @@ -115,32 +114,32 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^11.1.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.5",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.2",
"@semantic-release/release-notes-generator": "^12.1.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.56.0",
"eslint-config-next": "^14.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.5.0",
"eslint-plugin-n": "^16.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.1",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-tailwind": "^0.2.1",
"npm-check-updates": "^16.14.12",
"prettier": "^3.1.1",
"semantic-release": "^22.0.12",
"serve": "^14.2.1",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0"
"stylelint": "^16.1.0",
"stylelint-config-standard": "^36.0.0"
},
"resolutions": {
"npm": "^8.18.0",
"dset": "^3.1.2",
"npm": ">=8.18.0",
"dset": ">=3.1.2",
"semver": ">=7.5.2",
"word-break": ">=1.2.5",
"zod": ">=3.22.4"
Expand Down
Loading

0 comments on commit 529114a

Please sign in to comment.