-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: adding redis APL #374
Conversation
🦋 Changeset detectedLatest commit: 3fa3866 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Good job 👏🏻 I added a couple of suggestion / questions 😄
@JannikZed please update your branch - it should now have pnpm 9.12.3 :) |
src/APL/index.ts
Outdated
@@ -1,5 +1,6 @@ | |||
export * from "./apl"; | |||
export * from "./env-apl"; | |||
export * from "./file-apl"; | |||
export * from "./redis"; |
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.
@JannikZed let's avoid that, now importing any other APL will evaluate redis, this causes issues, e.g. next is poor at tree shaking, possibly fail because it can't import redis sdk
Please check package.json and add exports
key with new path, like vercel-kv. For example
"./APL/redis": {
"types": "./APL/redis/index.d.ts",
"import": "./APL/redis/index.mjs",
"require": "./APL/redis/index.js"
},
also new entry point will be needed
https://github.com/saleor/app-sdk/blob/main/tsup.config.ts#L13
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.
@IKarbowiak alright, check it out, if that works for you.
Is there a very easy way to test also if the package got build correctly and we can actually use the different APLs? are you spinning up an example saleor app and installing it locally or how are you doing that?
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.
I would do this
- build sdk
- set up app-template
- add sdk locally like
pnpm add ../saleor-app-sdk
- pnpm install
- try it
of course other APLs must work if redis package is not installed
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.
LGTM
@krzysztofzuraw @lkostrowski I added redis integration tests now as well. They don't run automatically, as they need a running redis instance. I think it can help a lot to keep the quality high, as we test if the build is working and the final package can actually work with a real redis. Let me know, what you think. I can quickly remove it again, if that is not what you are expecting. |
@JannikZed I'm fine with integration, but it has to be at least in readme how to run it. Best if you prepare docker-compose and document how to run it from scratch (run docker container, then run tests etc) |
@lkostrowski got it - included that now |
@andrzejewsky so it is just you remaining :) |
this PR is used to bring native redis support as APL. It is fully tested and working.