Made a JS API & CLI for npm package settings
Now you can easily update Trusted Publisher and Publishing Access settings from the CLI or in bulk with a script
github.com/privatenumber/npm-pkg-settings
Made a JS API & CLI for npm package settings
Now you can easily update Trusted Publisher and Publishing Access settings from the CLI or in bulk with a script
github.com/privatenumber/npm-pkg-settings
New package: doctor-json π¨π»ββοΈ
An util to manipulate JSON/JSONC while preserving their formatting and comments
The API is so simpleβmanipulate the parsed object just like you would any plain object, and stringify!
github.com/privatenumber/doctor-json
Made a little tool because I've wasted too much time waiting for `rm -rf node_modules` in large repos
Now I can just do `poof node_modules` π¨
github.com/privatenumber/poof
`oxc-minify` is now the recommended minifier when using @rolldown.rs!
While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size.
Check out the benchmark by @hirok.io for perf comparison.
github.com/privatenumbe...
Yep!
Limit depends on the model:
docs.github.com/en/github-mo...
It's so crazy I can do this for free now
If you're interested in how I do this, I'm querying GPT 4o on @github.com Models via GH Actions on every PR π
Here's the system prompt:
github.com/privatenumbe...
π€ Minification Benchmarks now includes an AI analysis with clear recommendations
No more manual analysisβread which minifier is best for your needs
It's also really entertaining to read:
github.com/privatenumbe...
Hmm yeah I think the conversation happened around there
I think it was kind of a hidden exchange on a commit or something...
The closest thing I could find was in the docs where imports is mentioned as a standard replacement for paths:
www.typescriptlang.org/docs/handboo....
I vaguely remember a TypeScript discussion where they were considering deprecating tsconfig#paths in favor of package.json#imports (but concluded it was too early?)
I searched around but couldn't find it...
Does this ring a bell for anyone?
dtsroll is a Type Script declaration file (.d.ts) bundler
Use it to:
- Tree-shake unused types
- Bundle in private monorepo deps
- Improve type-checking perf
π github.com/privatenumber/dtsroll
Great end to 2024 π
π 10k GitHub stars
β¬οΈ 19.5M downloads a month
Thank you everyone β€οΈ
Very cool! Thanks for making this Kevin π
Good point!
Hope that Issue gains more momentum soon
Import Attributes have been supported and stable for a while now
Thanks for sharing! I didnβt know it had better web support
Yep, bundlers conventionally use query parameters for this: vite.dev/guide/assets
But ImportAttributes has been around for a while now and can work seamlessly across platforms. I wonder why it hasn't caught on
In your TS project, enabling verbatimModuleSyntax is highly recommended for predictable compilation
If you haven't yet because of the errors it produces, I made an auto-fixer:
github.com/privatenumbe...
Why haven't Import Attributes taken off? Seems it stopped at JSON support
It would be great to be able to import text files and create a run-time dependency on it:
```ts
import fileContent from './file.txt' with { type: 'text' }
```
nodejs.org/api/esm.html...
Youβre killing it π₯
Thank you and HNY!
Good year π
vite-css-modules now supports Vite 6!
π github.com/privatenumber/vite-css-modules
Unsure what you mean by "tree-shake the external dependencies"
Externalized deps are excluded from the bundle, so it's never tree-shaken
Webpack relies heavily on Terser to handle dead code elimination: webpack.js.org/guides/tree-...
SWC works as an alternative because it's the Rust port of Terser: github.com/swc-project/...
Are you using tsx to import source files across workspace packages?
You may be making expensive trade-offs without realizing it
Here's a breakdown of the risks and better alternatives:
π hirok.io/posts/importing-source-files-in-dev
Do yourself a favor and delete those hacks & brittle build steps you cobbled together, for your library to be consumable from both esm & cjs.
Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest!
What a delightful little tool β€οΈ
Hey PostCSS experts, folks have requested the ability to parse PostCSS-specific syntax in ESLint, but I really don't know how to accomplish that. Your comments on this issue would be appreciated:
github.com/eslint/css/i...
Love the distinction between link and file:// hard linking
I supported this in my βlinkβ package as βpublish modeβ
Is there a Watch mode to keep file:// dependencies up to date during development? (e.g. new files)
I think this makes my point
A beginner shouldn't need to understand all that to wrap their head around
useEffect(() => {}, []) === onMounted(() => {})
This is about empathizing with beginners, not trivializing concepts we already get
That would trigger on server as well, which may be undesired
And may even build up server memory via closure
Yeah, things make sense once they click
But I think theres room for improvement in how long it takes to get there
With unsemantic conventions like this, thereβs more to learn before a beginner can read code without pausing to check the docs
What if youβre not dealing with a DOM element?
In the case I saw, it was used to trigger i18n initialization
Not sure why it had to be on mountβmaybe to distinguish from server?