morgue / specimen / bower-zombie-widget
jquery-zombie-countdown
A Halloween countdown plugin entombed in Bower, Grunt and PhantomJS. npm install fails.
era jQuery 1.11 · Bower · Grunt† 2014-10-13files 3 · lines 111
pulse · before
31%
pulse · after
—
☠
cause of death
$.browser removed in jQuery 1.9 (src/jquery.zombie.js:8)
6
dependencies audited
4
dead or deprecated
6
breaking call sites
6
config fossils
Dependency graveyard
| package | declared | latest | status | diagnosis | treatment |
|---|---|---|---|---|---|
| bower dev | 1.3.1 | 1.8.14 | dead | Bower itself recommends migrating to npm/yarn. | remove |
| grunt dev | 0.4.2 | 1.6.3 | dead | Grunt task runner is effectively unmaintained; npm scripts replace it. | remove |
| grunt-contrib-qunit dev | 0.4.0 | 11.0.0 | dead | Depends on PhantomJS, abandoned in 2018. | remove |
| grunt-contrib-uglify dev | 0.3.2 | 5.2.2 | dead | UglifyJS cannot parse modern syntax; esbuild minifies faster. | → esbuild@^0.28.2 |
| jquery | ~1.11.0 | 4.1.0 | outdated | From bower.json. jQuery 1.x → 4.x: $.browser, .live and .size removed; .bind/.delegate deprecated; $.trim/$.isArray/$.parseJSON gone in 4.0. | → ^4.1.0 |
| grunt-contrib-jshint dev | 0.8.0 | 3.2.0 | fossil | Grunt + JSHint pipeline superseded by ESLint. | → eslint@^10.15.0 |
Config fossils
- .travis.ymlTravis CI configtravis-ci.org shut down in 2021; targets Node 0.10. CI has been silently dead.→ Replace with a GitHub Actions workflow on Node 20/22.
- bower.jsonBower package manifestBower is deprecated and its registry is read-only; front-end deps must come from npm.→ Move jquery into package.json.
- Gruntfile.jsGrunt build pipelineGrunt 0.4 plugins are unmaintained; grunt-contrib-qunit pulls PhantomJS which no longer installs.→ jshint → `npm run lint` (ESLint); uglify → `npm run build` (esbuild); qunit (PhantomJS) → generated node:test suite
- .jshintrcJSHint configJSHint does not understand modern syntax and is superseded by ESLint.→ Translate options and globals into an ESLint 9 flat config.
- (none)No lockfileInstalls are not reproducible; the dependency tree drifts on every install.→ Commit the package-lock.json generated by the first `npm install`.
- (none)No licenseNobody can legally reuse the resurrected code.→ Add an OSI license (MIT/Apache-2.0).
Breaking changes in the code
- src/jquery.zombie.js:8$.browser removed in jQuery 1.9if ($.browser.msie && parseInt($.browser.version, 10) < 9) {
- src/jquery.zombie.js:8$.browser removed in jQuery 1.9if ($.browser.msie && parseInt($.browser.version, 10) < 9) {
- src/jquery.zombie.js:6$.trim/$.isArray/$.parseJSON/$.now/$.isFunction removed in jQuery 4settings.label = $.trim(settings.label);
- src/jquery.zombie.js:31.delegate()/.live() → .on()$el.delegate('.zc-brains', 'click', function () {
- src/jquery.zombie.js:35.size() → .length (removed in jQuery 3)if ($el.find('.zc-days').size() === 0) {
- src/jquery.zombie.js:41.delegate()/.live() → .on()$('.zombie-countdown').live('mouseenter', function () {
- src/jquery.zombie.js:26.bind()/.unbind() → .on()/.off()$el.bind('zombie:stop', function () {
- src/jquery.zombie.js:28.bind()/.unbind() → .on()/.off()$el.unbind('zombie:stop');
Migration plan
01Exhume config fossils
- Travis CI config: Replace with a GitHub Actions workflow on Node 20/22.
- Bower package manifest: Move jquery into package.json.
- Grunt build pipeline: jshint → `npm run lint` (ESLint); uglify → `npm run build` (esbuild); qunit (PhantomJS) → generated node:test suite
- JSHint config: Translate options and globals into an ESLint 9 flat config.
02Transplant dependencies
- bower@1.3.1 → removed — No longer needed.
- grunt@0.4.2 → removed — No longer needed.
- grunt-contrib-jshint@0.8.0 → eslint@^10.15.0 — Use eslint instead.
- grunt-contrib-qunit@0.4.0 → removed — No longer needed.
- grunt-contrib-uglify@0.3.2 → esbuild@^0.28.2 — Use esbuild instead.
- jquery@~1.11.0 → jquery@^4.1.0 — Breaking changes patched by 5 codemods.
- + @eslint/js@^10.0.1 — ESLint recommended rules
03Suture breaking changes (AST codemods)
- $.trim/$.isArray/$.parseJSON/$.now/$.isFunction removed in jQuery 4 — 1 patched
- $.browser removed in jQuery 1.9 — 2 patched
- .bind()/.unbind() → .on()/.off() — 2 patched
- .delegate()/.live() → .on() — 2 patched
- .size() → .length (removed in jQuery 3) — 1 patched
04Galvanize regression tests
- test/necro/examples.test.cjs: 6 jsdoc-example cases
- test/necro/modules.test.cjs: 1 module-load case
05Verify pulse
- npm install on Node 20/22
- npm test → node --test test/necro/examples.test.cjs test/necro/modules.test.cjs
- npm run lint
- npm run build