#1 Implement V1#2
Conversation
d5b657c to
a563685
Compare
fd97731 to
568d596
Compare
timea-solid
left a comment
There was a problem hiding this comment.
I would need to see it in action in a pane to understand fully. SO I approve it.
What I would like to know already is:
- explain usage of pnpm
- I see peerDependencies on major versions... 1) why? 2) I am not sure if we are actually going away from peer dependencies or what.
I just opened a PR in
pnpm is almost the same as npm, but it has better performance and security features. You can learn more about it in the official documentation, but pretty much is a drop-in replacement for npm. Most commands are the same, you just have to run "pnpm" instead of "npm"... Although this repository uses Vite+, so actually you need to run
Yeah, this should probably be changed. It doesn't matter too much until we do a release, though (not a prerelease). But no, we shouldn't go away from peerDependencies. We'll have to talk with @bourgeoa to see why his CI scripts are removing them. |
5e863a0 to
54286c8
Compare
|
Here's some additional documentation about this PR, and some comments before tomorrow's meeting: PrereleasesPrereleases are published automatically with any new commits in The prerelease tags are
See the ReleasesThis isn't configured in the repository yet, but releases should be published automatically to npm every time a release is tagged in github. In my projects, I also have a dedicated workflow that I use to publish versions manually, but I rarely use it. peerDependenciesIt is important to declare these for a couple of reasons. First of all, strict package managers (see Tooling) can throw errors if they aren't declared. And build tools like Vite can also use them to detect whether a dependency is external or not. However, it's not straightforward to declare them when they depend on prereleases. I thought the "peerDependencies": {
"solid-ui": "^3.1.2 || ^3.1.3-0",
},This will match 3.X releases and any prerelease from 3.1.3. Unfortunately, I don't think there is a way to make it match any prerelease, so every time we release a dependency, we'll have to update it (we would probably be updating the package.json anyways). ToolingThe repository uses the pnpm package manager. For the most part, it's a drop-in replacement for It also uses Vite+, which is a unified toolchain to orchestrate pnpm, Vite, and other tooling. The added benefit is that everything is configured in Updating dependenciesIn my projects, I never update any dependency automatically. Here's my reasons for each type. SolidOS dependenciesIf we need to use a new version of a package across the stack, we should update it manually. Otherwise, merging a broken package will cripple the CIs for all its dependants. In fact, we can see this happening in CI right now. But this is just one example. Imagine I introduce a breaking change in Instead of updating dependencies automatically, if we want this we'll probably need an ecosystem-ci. The real solution, though, would be to use a monorepo. But as we've mentioned before, that's a lot more work. npm audit / dependabotThese seem very important, but in practice they're rarely so. I could write more about this, but Dan Abramov already did so check out his blog post: npm audit: Broken by Design. TLDR: most of these vulnerability reports may not apply to our project, because they only see if a dependency is installed in our project, not how it's used or even if it's a dev dependency. Other dependency updatesIt may seem a good idea to update dependencies just to "stay up to date", but actually this has been one of the main security issues recently. WIth the advent of AI, one of the most common attacks are Supply chain attacks. Like the infamous Shai-Hulud 2.0. Because of that, I think we should only upgrade dependencies at regular intervals (every few months), and consiciously looking at the impact of doing so. Some upgrades do introduce breaking changes, even if they are technically not breaking according Semver (not all packages follow it perfectly, and some can also introduce breaking changes by mistake). Some package managers, like pnpm, have some built-in mechanisms to avoid some of these. For example, they don't run postinstall scripts automatically, and ignore updates that don't have a minimum release age. Global workflows & scriptsI noticed we now have some global workflows that are reused in different repositories. I don't think this is a good idea for the rule of thumb I mentioned previously, CIs shouldn't be broken by external changes in a different repository. Of course, things can break if a dependency changes; but if dependency updates are not automated, this will not break the rule of thumb. Instead, if we want to reuse scripts or workflow configurations, we should keep them in a package. They will still be reused, but updates won't break other packages if we don't have automatic updates. I also do this for my own projects, in @noeldemartin/scripts, and here we could encapsulate all of this inside of |
First version of the toolkit including the following:
dev.tssandbox).solid-uias well, such as removing the duplication of configuring Lit components.