Subject: [bug#78183] [PATCH 1/1] gnu: node-esbuild: Replace esbuild-node with node-esbuild.

From: "dan" <[email-masked]>
Date: Mon, 5 May 2025 03:35:15 +0000

There were a few other reasons this patch was created, it was a while ago so I had to dig those up, but here they are:

- node-esbuild conforms to the name of node packages.
- Uses (guix build-system node) instead of (guix build-system go) which is more appropriate because this is a node package.
- Uses esbuild as an input to use its binary so that it isn't rebuilt.
- Does not include the go-lang source by default.
- Does not include the lib/node_modules/esbuild/bin/esbuild shim javascript file, but instead uses the actual binary. The shim file is supposed to be replaced as part of the node module build process.

Here is the structure of node-esbuild:
├── bin
│   └── esbuild -> ../lib/node_modules/esbuild/bin/esbuild
├── etc
│   └── ld.so.cache
├── lib
│   └── node_modules
│       └── esbuild
│           ├── bin
│           │   └── esbuild <- Actual binary
│           ├── lib
│           │   ├── main.d.ts
│           │   └── main.js
│           ├── LICENSE.md
│           ├── package.json
│           └── README.md
└── share
    └── doc
        └── node-esbuild-0.24.0
            └── LICENSE.md

Structure of esbuild-node
├── bin
│   └── esbuild <- Actual binary
├── etc
│   └── ld.so.cache
├── lib
│   └── node_modules
│       └── esbuild
│           ├── bin
│           │   └── esbuild <- Javascript file which tries to run /bin/esbuild
│           ├── install.js
│           ├── lib
│           │   ├── main.d.ts
│           │   └── main.js
│           ├── package.json
│           └── README.md
├── share
│   └── doc
│       └── esbuild-node-0.14.0
│           └── LICENSE.md
└── src
    └── github.com
        └── evanw
            └── esbuild
                └── cmd
                    └── esbuild
                        ├── main.go
                        ├── main_other.go
                        ├── main_wasm.go
                        ├── service.go
                        ├── stdio_protocol.go
                        └── version.go

Structure of the NPM package:
├── bin
│   └── esbuild <- Actual binary
├── install.js
├── lib
│   ├── main.d.ts
│   └── main.js
├── LICENSE.md
├── package.json
└── README.md

I've added this information to the attached patch now.

Cheers,
- Daniel Khodabakhsh