Skip to content

Modernize build tooling: retire Bower, upgrade Gulp 3 to 5#7

Open
anisul wants to merge 3 commits into
omicronlab:masterfrom
anisul:chore/npm-gulp5-migration
Open

Modernize build tooling: retire Bower, upgrade Gulp 3 to 5#7
anisul wants to merge 3 commits into
omicronlab:masterfrom
anisul:chore/npm-gulp5-migration

Conversation

@anisul

@anisul anisul commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Replace Bower with npm-managed vendor dependencies, copied into src/vendor via a new gulp vendor task (runs on postinstall, same trigger point Bower used)
  • Upgrade Gulp 3 → 5, rewriting gulpfile.js for its ESM API and swapping unmaintained plugins for maintained equivalents
  • Fix a regression this introduced: jQuery 2.1 → 3.7 broke At.js's suggestion popup (mispositioned, keyboard nav dead) — root cause and fix in the second commit
  • Drop the app.appcache manifest — AppCache has been removed from all major browsers for years

Why

Bower has been unmaintained for years and is increasingly painful to install on current Node. Standardizing on npm removes a second package manager and a second lockfile format.

Testing

  • npm install && npx gulp server; exercised the typing/suggestion flow manually
  • Verified the At.js fix by driving the dev server with a real headless Chrome instance: no console exceptions, popup lands correctly under the caret, arrow keys move the highlighted suggestion
  • npx gulp build to confirm the production bundle still builds

Notes for reviewers

Doesn't touch dark mode (see #3) — that'll follow as a separate PR rebased on this one.

🤖 Generated with Claude Code

anisul and others added 3 commits July 17, 2026 23:12
Bower is unmaintained and increasingly hard to install on modern
Node. Vendor libraries (jQuery, At.js, autosize, touchSwipe,
device.js) are now regular npm dependencies, copied into
src/vendor by a new `gulp vendor` task run via postinstall --
mirroring what Bower used to do. Yarn's lockfile is dropped in
favor of a single npm-managed package-lock.json.

Gulp 3's task API and its plugins (gulp-manifest, gulp-minify-css,
opn, chalk) are unmaintained; gulpfile.js is rewritten for Gulp 5's
ESM-based API using maintained replacements (gulp-clean-css, open,
node:util's styleText).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
At.js v0.4.10's Controller.rect() calls
$inputor.caret({iframe}).caret('offset', pos) -- a two-call chain
that depends on Caret.js treating a bare object argument as
context configuration. The Caret.js version fetched fresh from
upstream for this migration dropped that legacy branch, so the
first call threw "Method [object Object] does not exist on
jQuery.caret".

That exception aborted View.show() before it could reposition the
popup, and aborted App.dispatch() before it could set the current
controller context -- breaking both popup placement and
arrow/tab/enter navigation.

Restore the legacy object-argument branch in $.fn.caret, matching
Caret.js v0.0.9 (contemporaneous with At.js v0.4.10, verified
against upstream history).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AppCache has been removed from all major browsers for years; the
manifest attribute and the app's applicationCache event handling
are dead code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant