RepoNecromancer
morgue / specimen / ghost-todo-api

ghost-todo-api

A JSON todo API that died when Express 4 dropped Connect and Node 12 dropped util.puts.
era Express 3 · Node 0.10† 2014-10-31files 5 · lines 159
pulse · before
16%
pulse · after
—
☠
cause of death
Bundled Connect middleware removed in Express 4 (app.js:11)
7
dependencies audited
3
dead or deprecated
18
breaking call sites
5
config fossils

Dependency graveyard

live npm registry · 2026-11-27
packagedeclaredlateststatusdiagnosistreatment
node-uuid1.4.11.4.8deadRenamed to `uuid` in 2016; Node 14.17+ has crypto.randomUUID().remove
express3.4.85.3.0outdatedExpress 3 → 5: bundled Connect middleware removed, app.configure/app.router gone, res.send(status, body) and req.param() removed.→ ^5.3.0
moment2.5.12.31.0deprecatedMoment is in maintenance mode and recommends lighter, immutable alternatives.→ dayjs@^1.11.23
request2.34.02.88.2deprecatedDeprecated since Feb 2020. Node 18+ ships a native fetch().remove
jshint dev2.4.42.13.6fossilSuperseded by ESLint flat config.→ eslint@^10.15.0
mocha dev1.17.112.0.3fossilLegacy test runner; node:test is built into Node 20+.remove
should dev3.1.213.2.3fossilPrototype-extending assertion library; node:assert is built in.remove

Config fossils

5
  • Travis CI config
    travis-ci.org shut down in 2021; targets Node 0.10, 0.8. CI has been silently dead.
    → Replace with a GitHub Actions workflow on Node 20/22.
    .travis.yml
  • JSHint config
    JSHint does not understand modern syntax and is superseded by ESLint.
    → Translate options and globals into an ESLint 9 flat config.
    .jshintrc
  • engines.node "0.10.x"
    Pinned to a Node.js release that reached end-of-life years ago.
    → Set engines.node to ">=20".
    package.json
  • No lockfile
    Installs are not reproducible; the dependency tree drifts on every install.
    → Commit the package-lock.json generated by the first `npm install`.
    (none)
  • No license
    Nobody can legally reuse the resurrected code.
    → Add an OSI license (MIT/Apache-2.0).
    (none)

Breaking changes in the code

22 patchable · 0 flagged
  • app.configure() removed in Express 4
    app.configure(function () {
    app.js:10
  • Bundled Connect middleware removed in Express 4
    app.use(express.logger('dev'));
    app.js:11
  • Bundled Connect middleware removed in Express 4
    app.use(express.bodyParser());
    app.js:12
  • Bundled Connect middleware removed in Express 4
    app.use(express.methodOverride());
    app.js:13
  • app.use(app.router) throws in Express 4+
    app.use(app.router);
    app.js:14
  • util.puts/print/debug/error (removed in Node 12)
    util.puts('Ghost Todo API haunting port ' + port);
    server.js:7
  • new Buffer() → Buffer.from()/Buffer.alloc()
    var decoded = new Buffer(token, 'base64').toString();
    app.js:20
  • res.send(status, body) removed in Express 5
    return res.send(401, { error: 'the spirits do not know you' });
    app.js:22
  • req.param() removed in Express 5
    var todo = store.get(req.param('id'));
    app.js:36
  • res.send(status, body) removed in Express 5
    return res.send(404, { error: 'no such haunting' });
    app.js:38
  • req.param() removed in Express 5
    var title = req.param('title');
    app.js:44
  • res.send(status, body) removed in Express 5
    return res.send(400, { error: 'title required' });
    app.js:46
  • res.send(status, body) removed in Express 5
    res.json(201, format.todo(todo));
    app.js:54
  • app.del() → app.delete()
    app.del('/todos/:id', auth, function (req, res) {
    app.js:57
  • req.param() removed in Express 5
    store.remove(req.param('id'));
    app.js:58
  • res.send(status, body) removed in Express 5
    res.send(204);
    app.js:59
  • res.send(status, body) removed in Express 5
    return res.send(502, { error: 'the oracle is silent' });
    app.js:65
  • request / request-promise → native fetch compat shim
    var request = require('request');
    lib/quotes.js:1
  • node-uuid → crypto.randomUUID()
    var uuid = require('node-uuid');
    app.js:2
  • moment → dayjs (+ plugins)
    var moment = require('moment');
    app.js:3
  • node-uuid → crypto.randomUUID()
    id: uuid.v4(),
    app.js:49
  • moment → dayjs (+ plugins)
    var moment = require('moment');
    lib/format.js:1

Migration plan

generated from .kiro/specs/migration-plan

01Exhume config fossils

  • Travis CI config: Replace with a GitHub Actions workflow on Node 20/22.
  • JSHint config: Translate options and globals into an ESLint 9 flat config.
  • engines.node "0.10.x": Set engines.node to ">=20".

02Transplant dependencies

  • express@3.4.8 → express@^5.3.0 — Breaking changes patched by 6 codemods.
  • moment@2.5.1 → dayjs@^1.11.23 — Swapped by moment-to-dayjs.
  • node-uuid@1.4.1 → removed — Call sites migrated by node-uuid-to-crypto.
  • request@2.34.0 → removed — Call sites migrated by request-to-fetch-shim.
  • jshint@2.4.4 → eslint@^10.15.0 — Use eslint instead.
  • mocha@1.17.1 → removed — Replaced by the generated node:test suite.
  • should@3.1.2 → removed — Replaced by the generated node:test suite.
  • + morgan@^1.12.1 — Replaces express.logger()
  • + method-override@^3.0.0 — Unbundled from Express 3
  • + @eslint/js@^10.0.1 — ESLint recommended rules

03Suture breaking changes (AST codemods)

  • node-uuid → crypto.randomUUID() — 2 patched
  • moment → dayjs (+ plugins) — 2 patched
  • Bundled Connect middleware removed in Express 4 — 3 patched
  • app.use(app.router) throws in Express 4+ — 1 patched
  • new Buffer() → Buffer.from()/Buffer.alloc() — 1 patched
  • res.send(status, body) removed in Express 5 — 6 patched
  • req.param() removed in Express 5 — 3 patched
  • app.del() → app.delete() — 1 patched
  • app.configure() removed in Express 4 — 1 patched
  • request / request-promise → native fetch compat shim — 1 patched
  • util.puts/print/debug/error (removed in Node 12) — 1 patched

04Galvanize regression tests

  • test/necro/examples.test.cjs: 6 jsdoc-example cases
  • test/necro/modules.test.cjs: 4 module-load cases
  • test/necro/routes.test.cjs: 6 route-smoke cases
  • test/necro/boot.test.cjs: 1 entrypoint-boot case

05Verify pulse

  • npm install on Node 20/22
  • npm test → node --test test/necro/examples.test.cjs test/necro/modules.test.cjs test/necro/routes.test.cjs test/necro/boot.test.cjs
  • npm run lint