HackerTrans
TopNewTrendsCommentsPastAskShowJobs

gkiely

no profile record

Submissions

Show HN: Pack.sh – Self-host single-file apps

pack.sh
1 points·by gkiely·2 tháng trước·1 comments

Show HN: Safe-install – safer NPM installs with trusted build dependencies

npmjs.com
19 points·by gkiely·2 tháng trước·5 comments

comments

gkiely
·2 tháng trước·discuss
The simplest reason might be that it's not the default so people use npm out of habit.

Personally, I use volta and switch between node versions in different projects, so I prefer to just use npm.
gkiely
·2 tháng trước·discuss
Yeah, this is just for anyone using node on their local machine.

Enabling `ignore-scripts=true` protects you from almost all of the recent compromises `min-release-age=3` protects you from the rest. But you still typically need trusted dependency builds, which this script solves.

I hope that npm enables this by default in the future.
gkiely
·9 tháng trước·discuss
Jobs would’ve went all-in on Siri. He acquired it and loved it.
gkiely
·9 tháng trước·discuss
A HTML page, web components and no build process solves this.

Pinned package versions in npm solves this.

If you want to use the latest dependencies then yes there is ongoing management required. There are tools to help with this.
gkiely
·10 tháng trước·discuss
bun test is a killer feature
gkiely
·4 năm trước·discuss
For non-critical stylistic or refactoring I prefix with "Consider".

> Consider extracting this to a separate function to make this more re-usable.

This gives the developer the option to disregard the comment. Essentially I am trusting that they will consider it. It shows that I trust their judgment instead of ordering them.

For stuff that is more important but not critical I prefix with "I'd recommend".

I'd recommend doing [current approach] [migration statement] [your suggestion]. It will [benefit].

> I'd recommend testing UI components in a similar way that a user would interact with it. It will make your tests more resilient and prevent other developers from breaking your code.

> I'd recommend moving this logic into it's own function, it will allow this code to be used by future developers and allow you to test it easier.

This both declares the recommendation and explains why it was recommended.

For stuff that is critical, I might just write it more directly:

> We need to extract this into it's own function so it doesn't lead to/cause X.