{
  "schemaVersion": "ebb.rule.v1",
  "id": "nodejs.symbol.fs.exists",
  "ecosystem": "nodejs",
  "purl": "pkg:generic/nodejs",
  "affectedVersions": "vers:semver/>=1.0.0",
  "event": "deprecated",
  "severity": "low",
  "title": "fs.exists is deprecated",
  "summary": "Node.js documents fs.exists(path, callback) as deprecated (DEP0034, documentation-only since v1.0.0).",
  "replacement": "fs.stat() or fs.access()",
  "sources": [
    {
      "title": "Node.js deprecations: DEP0034 fs.exists",
      "url": "https://nodejs.org/api/deprecations.html",
      "accessedAt": "2026-10-21"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-21",
    "reviewedAt": "2026-10-21",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the behavior of the call unchanged; check the replacement's argument and error handling differences."
    ],
    "steps": [
      {
        "id": "replace-symbol",
        "title": "Replace fs.exists",
        "instructions": "Replace each reported fs.exists call with fs.access or fs.stat and handle the error instead of the boolean.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "npm run test --if-present",
        "purpose": "Run the repository tests when defined."
      }
    ]
  }
}
