Visitar URL original
docs: fix JavaScript ULID import example by deepanshupal · Pull Request #1386 · openfga/openfga.dev · GitHub
Skip to content

docs: fix JavaScript ULID import example - #1386

Open
deepanshupal wants to merge 2 commits into
openfga:docs-nextfrom
deepanshupal:docs/fix-javascript-ulid-import
Open

deepanshupal wants to merge 2 commits into
openfga:docs-nextfrom
deepanshupal:docs/fix-javascript-ulid-import

Conversation

@deepanshupal

@deepanshupal deepanshupal commented Oct 4, 2026 •

Copy link
Copy Markdown

Description

What problem is being solved?

The ULID timestamp example is presented as JavaScript but uses TypeScript import-equals syntax, so JavaScript rejects it before it can decode the timestamp.

How is it being solved?

Use a JavaScript namespace import, keeping the existing ulid.decodeTime(id) call.

What changes are made to solve it?

One import line in the immutable authorization models guide.

References

PR #686 renames "configuration language" to "modeling language" across the docs and touches this page under its old path. It has no change to this import line.

Validation: the original example fails Node's JavaScript syntax check. The corrected example parses and decodes a public example ULID to its expected timestamp using ulid 3.0.2. The full documentation build and repository suite were not run.

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality.
  • The correct base branch is being used, if not main.
  • I have added tests to validate the change.

Summary by CodeRabbit

  • Documentation
    • Updated the JavaScript ULID example to use ES module import syntax.

@deepanshupal
deepanshupal requested a review from a team as a code owner October 4, 2026 15:41
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

CLA Not Signed

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ad8bb08-1982-495a-b047-355e0ab80b78

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The immutable models guide now uses an ES module namespace import in its JavaScript ULID example instead of CommonJS require syntax.

Changes

Guide example

Layer / File(s) Summary
Update the ULID import example
docs-site/getting-started/immutable-models.mdx
The JavaScript example replaces the CommonJS-style ULID import with an ES module namespace import.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

Suggested reviewers: siddhant-k-code

Merge Risk: Minimal · previous review 3dba8

The guide’s ULID example uses a supported import form, and this documentation-only change presents no identified merge risk.

Architecture risk: Low · up to 3dba8

The change affects 1 system.

Changed systems: docs-site

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs-site (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs-site/getting-started/immutable-models.mdx: The example replaces the CommonJS-style ULID import with an ES module namespace import.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the change: fixing the JavaScript ULID import example in the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches
Fix failing CI checks
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fafdbfe-1f31-47e9-b254-3d8effd66171
📥 Commits

Reviewing files that changed from the base of the PR and between 4105e2c and 3dba863.

📒 Files selected for processing (1)
  • docs-site/getting-started/immutable-models.mdx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@Siddhant-K-code Siddhant-K-code left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, can you please sign the CLA?

@mintlify

mintlify Bot commented Nov 3, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 3fb83f2.

Approve preview

This branch has not been deployed

No deployments
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.

2 participants