-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Explain the problems with publishing to npm #12
Comments
I mean, you're totally free to use any newer payload version in your project. I don't quite understand how that would interfere. But generally, I agree, it's no optimal solution. As of recently, installing the plugin via npm actually works mostly! The only issue left to fix is that the drawer for upload fields does not work yet. So if you don't care about images in your editor, feel free to install it like that! Definitely want to fix that last issue too, so I can finally recommend installing it via npm ^^ |
Ok;) I thought because you specified an exact version of payload and other dependencies ("1.6.15" instead of "^1.6.15") there might be problems with newer versions. If that's not the case I recommend changing the versions to the latter |
Mind publishing the plugin already and fixing that bug later in a PATCH version? If you release it as a <1.0.0 version no-one should expect stability/production-readiness |
Oh I only did that because I like having more control over what exact version installs. Just personal preference. But you're pretty much free to use any payload version you want in your own project! These would be the dependencies you would need to copy over: @lexical/clipboard @lexical/code @lexical/file @lexical/hashtag @lexical/headless @lexical/html @lexical/link @lexical/list @lexical/mark @lexical/markdown @lexical/overflow @lexical/plain-text @lexical/react @lexical/rich-text @lexical/selection @lexical/table @lexical/utils katex lodash |
It's already online! But I think it's better to release a 1.0.0 once I get uploads to work when it's installed via npm. Don't wanna release a 1.0 if it throws an error every time you try to open the upload modal. Maybe I can take a closer look later today and see if I can fix it |
The problem is if you have an exact version as a peerDependency in a (npm) library I'm not really free to use a newer version;( |
Oh, my bad, didn't see it. And yeah, that's exactly what I was saying, publishing it as a version below 1 (<1.0.0) |
Aaah now I understand - you're totally right! Just fixed that and published that as 0.0.23 :) |
Perfect;) I would still suggest you to either explain the problems (the problem with the Modal) or remove the "[maybe someone can help to fix the publishing]" from the README.md. I would recommend to leave this issue open until it's fixed/published in case other newcomers are wondering the same thing as I did |
@johannesschaffer Just fixed that! You can now, finally install the plugin using yarn! Let me know if any issues pop up when you do that |
Only with yarn? Does it work with npm? |
Should work with npm as well! I do think yarn works better with payload in general, though. Images / uploads should now work as well! Not sure how to fix the SCSS issue as of now. Will have to experiment with that! |
Maybe bundle the scss from payload, so it doesn't need it as a peer dependency? Just have to make sure tree shaking works good or maybe exclude the other files via package.json? Regardless, that's not the right place to discuss that 😅 |
If it's all working now, why didn't you release it as 1.0.0? |
I was thinking I'll wait until #5 is fixed until I release 1.0.0. Hopefully #4 as well. Both bugs in lexical itself which are kinda annoying. Also wanted to look at potentially fixing #1 . Felt a bit bad releasing it as 1.0.0 with those open |
Sounds good;) Hope you (or lexical) will get there soon 🚀. Love the plugin, but obviously can't use it in production until it reaches 1.0.0. Looks very promising though. |
Thank you!! I'm wondering: can I technically even release a 1.0.0 then, considering lexical itself didn't even reach 1.0.0? 😅 I'd say it's better to evaluate if it's production-ready on a case-by-case basis (=> can you live with the current issues?) Will definitely strive towards full modularity as well! |
Also: thank you a lot for opening all these issues. Helps me a lot to keep track of things! |
You can of course release 1.0.0 even when dependencies are not production ready. If you, as the plugin developer, can guarantee stability of the plugin, nothing else matters (no matter how you do it). Look at Next.js (which is HUGE). They vendor the experimental version of React (@next) with the stable version of Next |
No problem (like actually not;). I usually stop raising issued when repos start requiring repro URLs;) (like payload now). I'm also working on a bit more comprehensive serializer library for lexical, which might be a replacement for copy/pasting the code from your serializer-example, eventually 🤷 - BTW, I noticed you're from Germany. Me too;) |
@AlessioGr Just to follow up on my previous comment: I published my serializer to |
I quickly tried it locally to make the source code here a library and didn't have any problems (couldn't fully test however because of the previous issue I raised here)
The main problem with the current approach of copying the source code over are the dependencies. Not only do they clutter the package.json but you also use outdated version for e.g. payload, which potentially interfere / break your plugin
The text was updated successfully, but these errors were encountered: