Skip to content

Make dependencies zero#55

Open
tats-u wants to merge 1 commit into
hugomd:masterfrom
tats-u:0dep
Open

Make dependencies zero#55
tats-u wants to merge 1 commit into
hugomd:masterfrom
tats-u:0dep

Conversation

@tats-u
Copy link
Copy Markdown

@tats-u tats-u commented Dec 9, 2025

All added dependencies are legacy and can be replaced with features built in modern versions of Node.js.

  • nodemonnode --watch
  • mz/fsfs/promises
  • colorsutil.styleText

Now you do not have to run npm i or need package-lock.json.

Bonus:

  1. Since url.parse emits an annoying warning, I replaced it with the standard new URL(...).searchParams.
  2. The prefix node: is added. It will make non-Node runtimes easier to run the program.

@tats-u
Copy link
Copy Markdown
Author

tats-u commented Dec 9, 2025

If you convert index.js to ESM (add "type": "module" to package.json), Deno can run index.js.

PS I:\parrot.live> deno --allow-read --allow-env --allow-net ./index.js
Listening on http://localhost:3000

@tats-u
Copy link
Copy Markdown
Author

tats-u commented Dec 9, 2025

node:stream cannot be deleted because we will have to install https://www.npmjs.com/package/@remix-run/node-fetch-server?activeTab=readme instead.

@priyaranjansilu
Copy link
Copy Markdown

gdrg

@tats-u tats-u mentioned this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants