-
Notifications
You must be signed in to change notification settings - Fork 21
New handlers: refactored, Web API and AWS Lambda support #380
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
Changes from all commits
84a2d4b
7e1ca85
6ca0c67
37fd731
fa1164d
362c1f6
b2947b2
eca6911
cd7a49a
4ddd53c
09da9c2
d1dc948
9d34b5f
a4f75be
8f9a334
c4eb069
b0a237a
9e5c059
98ace22
1b87494
d5e8785
32bec65
69203aa
bb36e97
631ede1
25c7d89
f0bfe5f
972708b
ebd7405
2833043
2b0486c
ca7543b
a63ed59
3107c0c
b86b665
caf7d0f
bc154bb
2726223
2faa384
0d01b29
2d6bbfb
a9c38e5
1677ba8
383b0f2
09f4f07
b8f0d98
ab1c269
91562da
d52f28b
36d9088
f146bc3
efd0f8d
9462deb
966defe
dd575a1
f7b1aec
f9e0d3f
3d09ac3
6712040
adbbe1c
534b64f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@saleor/app-sdk": minor | ||
| --- | ||
|
|
||
| Added `handlers/fetch-api` which adds support for frameworks that use [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remember to add full changeset and docs
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,13 +42,14 @@ | |
| "@changesets/cli": "2.27.1", | ||
| "@testing-library/dom": "^8.17.1", | ||
| "@testing-library/react": "^13.4.0", | ||
| "@types/aws-lambda": "^8.10.147", | ||
| "@types/debug": "^4.1.7", | ||
| "@types/node": "^18.7.15", | ||
| "@types/react": "18.0.21", | ||
| "@types/react-dom": "^18.0.5", | ||
| "@types/uuid": "^8.3.4", | ||
| "@typescript-eslint/eslint-plugin": "^5.36.1", | ||
| "@typescript-eslint/parser": "^5.36.1", | ||
| "@typescript-eslint/parser": "^7.1.1", | ||
| "@vercel/kv": "1.0.0", | ||
| "@vitejs/plugin-react": "4.3.4", | ||
| "@vitest/coverage-v8": "3.0.4", | ||
|
|
@@ -75,15 +76,19 @@ | |
| "redis": "^4.7.0", | ||
| "tsm": "^2.2.2", | ||
| "tsup": "^6.2.3", | ||
| "typescript": "4.9.5", | ||
| "typescript": "5.4.2", | ||
| "vi-fetch": "^0.8.0", | ||
| "vite": "6.0.11 ", | ||
| "vite-tsconfig-paths": "^5.1.4", | ||
| "vitest": "3.0.4" | ||
| }, | ||
| "peerDependenciesMeta": { | ||
| "@vercel/kv": { | ||
| "optional": true | ||
| }, | ||
| "aws-lambda": { | ||
| "optional": true | ||
| }, | ||
| "redis": { | ||
| "optional": true | ||
| } | ||
|
|
@@ -119,6 +124,11 @@ | |
| "import": "./settings-manager/index.mjs", | ||
| "require": "./settings-manager/index.js" | ||
| }, | ||
| "./fetch-middleware": { | ||
| "types": "./fetch-middleware/index.d.ts", | ||
| "import": "./fetch-middleware/index.mjs", | ||
| "require": "./fetch-middleware/index.js" | ||
| }, | ||
| "./middleware": { | ||
| "types": "./middleware/index.d.ts", | ||
| "import": "./middleware/index.mjs", | ||
|
|
@@ -144,6 +154,26 @@ | |
| "import": "./handlers/next/index.mjs", | ||
| "require": "./handlers/next/index.js" | ||
| }, | ||
| "./handlers/fetch-api": { | ||
| "types": "./handlers/fetch-api/index.d.ts", | ||
| "import": "./handlers/fetch-api/index.mjs", | ||
| "require": "./handlers/fetch-api/index.js" | ||
| }, | ||
| "./handlers/next-app-router": { | ||
| "types": "./handlers/fetch-api/index.d.ts", | ||
| "import": "./handlers/fetch-api/index.mjs", | ||
| "require": "./handlers/fetch-api/index.js" | ||
| }, | ||
|
Comment on lines
+162
to
+166
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. won't it have the same names as fetch api? It would be confusing, probably better to also add alias on export so
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be easier if we see docs at this point
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine, since exported names do not reference Fetch API in any way, names are the same as in Next.js handlers except they are in a different folder. Our exports are:
|
||
| "./handlers/actions": { | ||
| "types": "./handlers/actions/index.d.ts", | ||
| "import": "./handlers/actions/index.mjs", | ||
| "require": "./handlers/actions/index.js" | ||
| }, | ||
| "./handlers/shared": { | ||
| "types": "./handlers/shared/index.d.ts", | ||
| "import": "./handlers/shared/index.mjs", | ||
| "require": "./handlers/shared/index.js" | ||
| }, | ||
| "./saleor-app": { | ||
| "types": "./saleor-app.d.ts", | ||
| "import": "./saleor-app.mjs", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make it major since it has breaking changes