Home / Function/ updateTimestamps() — supabase Function Reference

updateTimestamps() — supabase Function Reference

Architecture documentation for the updateTimestamps() function in last-changed.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  c4ba6037_4ea4_e34c_3bed_9d9cf63274e8["updateTimestamps()"]
  65532f97_bc9f_6f02_810b_e5b4e021fa6f["updateContentDates()"]
  65532f97_bc9f_6f02_810b_e5b4e021fa6f -->|calls| c4ba6037_4ea4_e34c_3bed_9d9cf63274e8
  c6ba9fcb_19c2_0847_332c_187b52d1c2d6["processMdx()"]
  c4ba6037_4ea4_e34c_3bed_9d9cf63274e8 -->|calls| c6ba9fcb_19c2_0847_332c_187b52d1c2d6
  77b76736_2d89_a5d1_7e2a_c8558785ff1e["updateTimestampsWithLastCommitDate()"]
  c4ba6037_4ea4_e34c_3bed_9d9cf63274e8 -->|calls| 77b76736_2d89_a5d1_7e2a_c8558785ff1e
  bfa6040a_06bc_52d3_f5eb_be9bce7bd5d0["updateTimestampsWithChecksumMatch()"]
  c4ba6037_4ea4_e34c_3bed_9d9cf63274e8 -->|calls| bfa6040a_06bc_52d3_f5eb_be9bce7bd5d0
  style c4ba6037_4ea4_e34c_3bed_9d9cf63274e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/scripts/last-changed.ts lines 147–164

async function updateTimestamps(
  filePath: string,
  { reset, timestamp, ctx }: { reset: boolean; timestamp: Date; ctx: Ctx }
) {
  try {
    const content = await readFile(filePath, 'utf-8')
    const sections = processMdx(content)
    return sections.map((section) => {
      if (reset) {
        return updateTimestampsWithLastCommitDate(filePath, section, timestamp, ctx)
      } else {
        return updateTimestampsWithChecksumMatch(filePath, section, timestamp, ctx)
      }
    })
  } catch (err) {
    console.error(`Failed to update sections for file ${filePath}`)
  }
}

Subdomains

Frequently Asked Questions

What does updateTimestamps() do?
updateTimestamps() is a function in the supabase codebase.
What does updateTimestamps() call?
updateTimestamps() calls 3 function(s): processMdx, updateTimestampsWithChecksumMatch, updateTimestampsWithLastCommitDate.
What calls updateTimestamps()?
updateTimestamps() is called by 1 function(s): updateContentDates.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free