https://dev.to/hmans/how-i-monorepo-october-2022-edition-1ib4 - Tools for #Monorepos: 1. #pnpm, 2. ... 3. ... 4. #GitHub Actions, 5. ... 6. Nice collection https://www.linkedin.com/in/hmans/.
Hoping to spare others a headache. If your project...
(a.) uses pnpm
(b.) uses `npm-run-all`
(c.) has a `package.json` with a `config` object and a `name` item
... you’ll have bugs with any scripts using `npm-run-all`. (https://github.com/mysticatea/npm-run-all/issues/249)
Until this bug is fixed:
(1.) Remove the `name` item.
(2.) Remove the `config` object.
(3.) Use `concurrently` for parallel stuff **or** the old `&&` thingy for sequential stuff. (My recommendation.)
Why everyone should switch to #pnpm: it’s fast.
…that’s it. Don’t discount the power of a minute (or more) saved everywhere—in every CI, every container, every developer on your team. Seconds matter when the end result is the same.
#node version: 20.9.0 & #npm is 10.1.0. Tried installing #svelte with npm for comparison & got a similar error, so it's a local issue? When using "npm install" to install #11ty it works with no issues.
Could anyone point me to a direction how to fix this? I'm not very familiar with debugging these kind of things...
OK #pnpm is pretty cool... Guess there are now 2 good #Typescript programs out there. I love how fast it is, and I love that it FINALLY prevents me from accidentally importing stuff from the wrong package because the language server just happens to see a similar item in an indirect dependency. It's great. Sanity restored.
I don't know what #pnpm is doing, but on Windows NTFS, this test project takes 30s+ to install from a hot cache, but the same project on ReFS (thus, with clonefile support) takes 3-4s.
At the same time, I'm not seeing any DeviceIoControl calls in the flamegraph for pnpm, which makes me wonder if they're doing something completely different.
Check out the changelog, there are a couple of minor breaking changes:
And if you have a Deno project you've been wanting to use SimpleWebAuthn with (without having to resort to
npm: specifiers) you can find the project on deno.land here:
Time to rest 😮💨
I opened an "old" project that was using #YarnPkg (classic) as package manager, with the aim of updating a couple of dependencies.
It turns out that Yarn "decided" to jump straight ahead to its newest version (Berry 3.6.1) without asking.
It broke my flow: it's unable to interpret a POSIX shell `if` inside a command of the `scripts` section.
It was easy to fix, but certainly quite annoying.
I was considering switching to #PNPM, now I'll do that for sure.
Just lost a whole night of productivity trying to bump *one* dependency exactly *one* version.
2 hours later I've done at least 3 bisecting operations on 3 different repos, can't get #pnpm to install the same thing twice, and still haven't got the lockfile updated to the latest version.
This isn't entirely the fault of #NPM / pnpm. But I manage dependencies very precisely and deliberately with a reproducible build system using pinned dependencies.
If I'm having this much trouble with it, I don't know how typical web devs can manage at all. I didn't make any meaningful progress on the problem I was *actually* trying to solve. All I have to show for my efforts is a red CI.
Before, with Yarn, the size was 958M.
After, pnpm, the size was 923M.
The number of installed versions of Bluebird dropped from 8 to 3, so it did flatten that dep. 👍
The 3% savings isn't necessarily compelling enough on its own to switch, though.
hsml compile # compiles all .hsml files to .html inside current folder and recursive below
hsml compile ./example.hsml # just compiles the given file
hsml fmt # formats
hsml fmt # just formats given file
hsml parse ./example.hsml # parses the given file and std::out as json AST
But I'm not sure if this fulfills all need or if I need to change something
People who are working with #npm #monorepo's, if I have a package (eslint config) in the monorepo that is used as `devDependency` in other package from the same repo, and that other package is going to be published. Does this `devDependency` has to be published too? Or can it stay private? I really don't see sense publishing it, but also couldn't find information whether npm cares about devDeps...
“Flat node_modules is not the only way” by @zkochan
[How pnpm manages node_modules]
#NodeJS #npm #pnpm
Read the announcement for the deets on all the goodies like:
🦸♀️Im Konsum besprechen wir dann mal noch fix die ersten drei Phasen des MCU (und das ist der kurze Teil der Folge).
🎉 Ach, und wir haben einen Rabattcode für die #enterJS (auch in den Shownotes)
However, I am not 100% convinced that it's the best decision as it's yet another thing that the whole team has to install. One more barrier before you can get the code up and running as a new dev on the team.
Is it worth it? I'm 50/50, can't really decide.
Pro tip time 🧑💻⏱
Now that we have automatic unstable releases for embroider packages you can update all of your dependencies in a pnpm monorepo with the following command:
pnpm -r update @embroider/test-setup@unstable @embroider/addon-shim@unstable @embroider/addon-dev@unstable @embroider/webpack@unstable
This can be super useful to test the upcoming release on a branch in your CI or staging environments 🎉
Do you use pnpm in your projects?
I just made my first GitHub action that combines 3 common steps into one line, saving you over 10 lines per workflow file!
(in some cases, you could convert 50+ lines to 5!)
Am 22.06. darf ich auf der #enterjs in Darmstadt erzählen, wie wir unser Projekt auf #pnpm umgestellt haben. Wird ein Praxisbericht mit einigen Dingen, die wir gelernt haben. https://enterjs.de/veranstaltung-20055-0-heute-hoist-ich-morgen-bau-ich--dependency-management-aber-richtig-mit-pnpm.html
So I finally figured out how to deal with some mystery slowness during file extraction in #orogene, and managed to get full extraction working and it is:
...and these are just some initial numbers! There's still some stuff I'm sure I haven't tried to do yet that could bump that further.
On my machine, this means it can fully resolve and install a react app in 11 seconds.
v v exciting results so far.
wish #pnpm had ‘bt’ command which would run build and then test scripts...
Why is it so unreasonably hard to get #PNPM to generate a damn lockfile? Even if I don't have any dependencies, I still want a lockfile!
[New Post] ✍🏼 Failing to debug pnpm workspaces
New Misskey v13 with rewriten backend released but avoid it. Build issues with new installations and possibly other issues with upgrades as well
If you still want to proceed here's the link to v13: https://github.com/misskey-dev/misskey/releases/tag/13.0.0
`pnpx sb@next init` to try it out.
Use `pnpx sb@next init` to add Storybook to a project, or `pnpx sb@next upgrade --prerelease` to upgrade an existing Storybook project.
Let me know if you experience any issues.
The holidays are a good time to experiment with new things, so give it a whirl today. And feel free to let me know if you have any trouble, I'm happy to help out.
It's https://github.com/storybookjs/storybook/pull/19689 if anyone wants to follow along and try it out once it's released in the next 7.0 alpha.