Commit Alpine.js to the repo instead of unpacking it at build time (closes #163) #564

Merged
clawbot merged 1 commits from alpine-committed into next 2026-10-26 05:16:07 +01:00
Collaborator

static/js/alpine.min.js is now committed. It is package/dist/cdn.min.js from the @alpinejs/csp 3.14.9 npm package, byte for byte, taken once from the package file in 3p/. This follows the ruling in #163.

The build no longer touches the file, so these are removed:

  • script/assets and the assets make target, which build and dev ran first
  • the two RUN script/assets steps in Dockerfile, and make assets in Dockerfile.browser
  • the entries for the file in .gitignore and .dockerignore
  • 3p/alpinejs-csp-3.14.9.tgz, which nothing reads any more

What the diff does not show:

  • The Docker build context now carries the file. The existing ESLint ignore entry is what keeps it out of the lint stage.
  • .prettierignore now lists it, so a prettier run over the whole tree leaves it alone.
  • Tailwind never reads it: static/css/input.css names only static/js/app.js under static/js/.

The comments in static/static.go, eslint.config.mjs, internal/server/static_assets_test.go and Dockerfile now describe the committed file, and so does the README.

Besides the images and packages pinned in Dockerfile, go.sum and yarn.lock, the build still downloads one file. It is the Tailwind CSS standalone binary, fetched by ADD --checksum in Dockerfile, and it is unchanged.

Judgement call: the package file in 3p/ goes too, as the plan on the issue says. It ships no licence file, and no licence changes.

Model: opus-5-5

`static/js/alpine.min.js` is now committed. It is `package/dist/cdn.min.js` from the `@alpinejs/csp` 3.14.9 npm package, byte for byte, taken once from the package file in `3p/`. This follows the ruling in https://git.eeqj.de/sneak/webhooker/issues/163. The build no longer touches the file, so these are removed: - `script/assets` and the `assets` make target, which `build` and `dev` ran first - the two `RUN script/assets` steps in `Dockerfile`, and `make assets` in `Dockerfile.browser` - the entries for the file in `.gitignore` and `.dockerignore` - `3p/alpinejs-csp-3.14.9.tgz`, which nothing reads any more What the diff does not show: - The Docker build context now carries the file. The existing ESLint ignore entry is what keeps it out of the lint stage. - `.prettierignore` now lists it, so a `prettier` run over the whole tree leaves it alone. - Tailwind never reads it: `static/css/input.css` names only `static/js/app.js` under `static/js/`. The comments in `static/static.go`, `eslint.config.mjs`, `internal/server/static_assets_test.go` and `Dockerfile` now describe the committed file, and so does the README. Besides the images and packages pinned in `Dockerfile`, `go.sum` and `yarn.lock`, the build still downloads one file. It is the Tailwind CSS standalone binary, fetched by `ADD --checksum` in `Dockerfile`, and it is unchanged. Judgement call: the package file in `3p/` goes too, as the plan on the issue says. It ships no licence file, and no licence changes. Model: opus-5-5
clawbot added the needs-review label 2026-10-26 04:52:10 +01:00
clawbot self-assigned this 2026-10-26 04:52:10 +01:00
Author
Collaborator

FAIL: needs-rework.

  1. Dockerfile lines 207–209: "Builds through the Makefile's build target, which builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below as it is." The edit joined two sentences into one that has no subject, carries two ideas and says "builds … which builds". Acceptable: one plain sentence, such as "The Makefile's build target builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below."
  2. internal/server/static_assets_test.go line 16: "This is the check that each page gets the JavaScript it asks for." The reason this sentence followed is gone, so it now only restates the sentence before it. Acceptable: delete it.

Model: opus-5-5

**FAIL: needs-rework.** 1. `Dockerfile` lines 207–209: "Builds through the Makefile's build target, which builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below as it is." The edit joined two sentences into one that has no subject, carries two ideas and says "builds … which builds". Acceptable: one plain sentence, such as "The Makefile's build target builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below." 2. `internal/server/static_assets_test.go` line 16: "This is the check that each page gets the JavaScript it asks for." The reason this sentence followed is gone, so it now only restates the sentence before it. Acceptable: delete it. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-26 04:59:50 +01:00
clawbot added 1 commit 2026-10-26 05:05:56 +01:00
static/js/alpine.min.js is now committed: package/dist/cdn.min.js from
the @alpinejs/csp 3.14.9 npm package, byte for byte, taken once from the
package file that was in 3p/. The build no longer unpacks it, so
script/assets, the assets make target, its Dockerfile steps and the
ignore entries for the file are gone, and so is the package file.
Prettier and ESLint both ignore the file, so it stays as published.
Comments and the README now describe the committed file.

Model: opus-5-5
clawbot force-pushed alpine-committed from 6e652a223a to f3e5442676 2026-10-26 05:05:56 +01:00 Compare
Author
Collaborator

Rework for #564 (comment):

  1. Dockerfile: the comment above RUN make build now reads "The Makefile's build target builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below."
  2. internal/server/static_assets_test.go: deleted the sentence that restated the one before it.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/webhooker/pulls/564#issuecomment-155077: 1. `Dockerfile`: the comment above `RUN make build` now reads "The Makefile's build target builds with cgo off, so the binary is statically linked and runs on the Alpine runtime image below." 2. `internal/server/static_assets_test.go`: deleted the sentence that restated the one before it. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-26 05:06:03 +01:00
Author
Collaborator

PASS

Both findings from #564 (comment) are fixed, and nothing else needs rework.

Model: opus-5-5

**PASS** Both findings from https://git.eeqj.de/sneak/webhooker/pulls/564#issuecomment-155077 are fixed, and nothing else needs rework. Model: opus-5-5
clawbot merged commit e584718eb5 into next 2026-10-26 05:16:07 +01:00
clawbot deleted branch alpine-committed 2026-10-26 05:16:07 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#564