Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 Upgrade #131

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.DS_Store
node_modules
/build
/dist
/.svelte-kit
/package
.env
.vercel_build_output
/.env.development
/.vercel
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ node_modules
/build
/.svelte-kit
/package
/.vercel
/dist

/pnpm-lock.yaml
/README.md
11 changes: 10 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ The following components are provided:
- `<CardExpiry/>`: Input field for the card's expiration date.
- `<CardCvc/>`: Input field for Card Verification Value.
- `<Card/>`: All-in-one component that has inputs for card number, expiry, cvc, and zip code.
- `<PaymentRequestButton/>`: A GooglePay, ApplePay, or Link checkout button, depending on browser and user preferences.
- `<Iban/>`: Input field for IBAN (International bank account number).
- `<Ideal/>`: Input field for iDEAL (payment system used in the Netherlands).
- `<PaymentElement/>`: All-in-one component that allows the user to choose the type of payment.
- `<ExpressCheckout/>`: Pay with a wallet without leaving the page.
- `<ExpressCheckout/>`: Pay with a wallet without leaving the page using GooglePay, ApplePay, or Link.
- `<LinkAuthenticationElement/>`: Ability to use saved payment methods stored in [Link](https://link.co).
- `<Address/>`: Component for collecting billing and shipping addresses.

Expand All @@ -32,9 +31,9 @@ There is example code for:
- [Embedded Checkout](src/routes/examples/embedded-checkout)
- [Link](src/routes/examples/payment-element)
- [Credit card](src/routes/examples/credit-card)
- [GooglePay](src/routes/examples/payment-request)
- [ApplePay](src/routes/examples/payment-request)
- [MicrosoftPay](src/routes/examples/payment-request)
- [GooglePay](src/routes/examples/express-checkout)
- [ApplePay](src/routes/examples/express-checkout)
- [MicrosoftPay](src/routes/examples/express-checkout)
- [SEPA direct deposit](src/routes/examples/sepa)
- [iDEAL](src/routes/examples/ideal)
- [Alipay](src/routes/examples/alipay)
Expand Down
189 changes: 30 additions & 159 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,40 @@
"scripts": {
"dev": "dotenv -c development -- vite dev",
"build": "dotenv -c development vite build",
"package": "svelte-package -o package",
"publish": "npm run package && npm publish",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"preview": "dotenv -c development vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .prettierignore --check --plugin-search-dir=. . && eslint --ignore-path .prettierignore .",
"format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. .",
"semantic-release": "semantic-release"
"format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. ."
},
"devDependencies": {
"@stripe/stripe-js": "^3.3.0",
"@stripe/stripe-js": "^5.2.0",
"@sveltejs/adapter-vercel": "^5.3.0",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/package": "^2.3.1",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@vitejs/plugin-basic-ssl": "^1.1.0",
"@sveltejs/kit": "^2.5.27",
"@sveltejs/package": "^2.3.7",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@vitejs/plugin-basic-ssl": "^1.2.0",
"dotenv-cli": "^7.4.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-svelte": "^2.38.0",
"eslint-plugin-svelte": "^2.45.1",
"mdsvex": "^0.11.0",
"prettier": "~3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-svelte": "^3.2.6",
"prismjs": "^1.29.0",
"publint": "^0.2.12",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
"semantic-release": "23.0.8",
"stripe": "^8.222.0",
"svelte": "^4.2.15",
"svelte-eslint-parser": "^0.35.0",
"typescript": "^5.4.5",
"vite": "^5.2.11"
"stripe": "^17",
"svelte": "^5.0.0",
"svelte-check": "^4.1.0",
"svelte-eslint-parser": "^0.42.0",
"typescript": "^5.5.0",
"typescript-eslint": "^8.17.0",
"vite": "^5.4.4"
},
"peerDependencies": {
"@stripe/stripe-js": "^3 || ^4",
Expand All @@ -53,153 +56,21 @@
"release": {
"branches": [
"main",
"next"
"next",
"svelte-5"
]
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
"./Address.svelte": {
"types": "./package/Address.svelte.d.ts",
"svelte": "./package/Address.svelte",
"default": "./package/Address.svelte"
},
"./Card.svelte": {
"types": "./package/Card.svelte.d.ts",
"svelte": "./package/Card.svelte",
"default": "./package/Card.svelte"
},
"./CardCvc.svelte": {
"types": "./package/CardCvc.svelte.d.ts",
"svelte": "./package/CardCvc.svelte",
"default": "./package/CardCvc.svelte"
},
"./CardExpiry.svelte": {
"types": "./package/CardExpiry.svelte.d.ts",
"svelte": "./package/CardExpiry.svelte",
"default": "./package/CardExpiry.svelte"
},
"./CardNumber.svelte": {
"types": "./package/CardNumber.svelte.d.ts",
"svelte": "./package/CardNumber.svelte",
"default": "./package/CardNumber.svelte"
},
"./Container.svelte": {
"types": "./package/Container.svelte.d.ts",
"svelte": "./package/Container.svelte",
"default": "./package/Container.svelte"
},
"./Elements.svelte": {
"types": "./package/Elements.svelte.d.ts",
"svelte": "./package/Elements.svelte",
"default": "./package/Elements.svelte"
},
"./EmbeddedCheckout.svelte": {
"types": "./package/EmbeddedCheckout.svelte.d.ts",
"svelte": "./package/EmbeddedCheckout.svelte",
"default": "./package/EmbeddedCheckout.svelte"
},
"./ExpressCheckout.svelte": {
"types": "./package/ExpressCheckout.svelte.d.ts",
"svelte": "./package/ExpressCheckout.svelte",
"default": "./package/ExpressCheckout.svelte"
},
"./Iban.svelte": {
"types": "./package/Iban.svelte.d.ts",
"svelte": "./package/Iban.svelte",
"default": "./package/Iban.svelte"
},
"./Ideal.svelte": {
"types": "./package/Ideal.svelte.d.ts",
"svelte": "./package/Ideal.svelte",
"default": "./package/Ideal.svelte"
},
"./LinkAuthenticationElement.svelte": {
"types": "./package/LinkAuthenticationElement.svelte.d.ts",
"svelte": "./package/LinkAuthenticationElement.svelte",
"default": "./package/LinkAuthenticationElement.svelte"
},
"./PaymentElement.svelte": {
"types": "./package/PaymentElement.svelte.d.ts",
"svelte": "./package/PaymentElement.svelte",
"default": "./package/PaymentElement.svelte"
},
"./PaymentMethodMessaging.svelte": {
"types": "./package/PaymentMethodMessaging.svelte.d.ts",
"svelte": "./package/PaymentMethodMessaging.svelte",
"default": "./package/PaymentMethodMessaging.svelte"
},
"./PaymentRequestButton.svelte": {
"types": "./package/PaymentRequestButton.svelte.d.ts",
"svelte": "./package/PaymentRequestButton.svelte",
"default": "./package/PaymentRequestButton.svelte"
},
".": {
"types": "./package/index.d.ts",
"svelte": "./package/index.js",
"default": "./package/index.js"
},
"./util": {
"types": "./package/util.d.ts",
"default": "./package/util.js"
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
}
},
"files": [
"package"
],
"svelte": "./package/index.js",
"typesVersions": {
">4.0": {
"Address.svelte": [
"./package/Address.svelte.d.ts"
],
"Card.svelte": [
"./package/Card.svelte.d.ts"
],
"CardCvc.svelte": [
"./package/CardCvc.svelte.d.ts"
],
"CardExpiry.svelte": [
"./package/CardExpiry.svelte.d.ts"
],
"CardNumber.svelte": [
"./package/CardNumber.svelte.d.ts"
],
"Container.svelte": [
"./package/Container.svelte.d.ts"
],
"Elements.svelte": [
"./package/Elements.svelte.d.ts"
],
"EmbeddedCheckout.svelte": [
"./package/EmbeddedCheckout.svelte.d.ts"
],
"ExpressCheckout.svelte": [
"./package/ExpressCheckout.svelte.d.ts"
],
"Iban.svelte": [
"./package/Iban.svelte.d.ts"
],
"Ideal.svelte": [
"./package/Ideal.svelte.d.ts"
],
"LinkAuthenticationElement.svelte": [
"./package/LinkAuthenticationElement.svelte.d.ts"
],
"PaymentElement.svelte": [
"./package/PaymentElement.svelte.d.ts"
],
"PaymentMethodMessaging.svelte": [
"./package/PaymentMethodMessaging.svelte.d.ts"
],
"PaymentRequestButton.svelte": [
"./package/PaymentRequestButton.svelte.d.ts"
],
"index.d.ts": [
"./package/index.d.ts"
],
"util": [
"./package/util.d.ts"
]
}
}
"dist",
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
]
}
Loading