Skip to content

Conversation

@Abishek-Newar
Copy link
Contributor

@Abishek-Newar Abishek-Newar commented Oct 22, 2025

Description

Added a standardized Makefile would make it much easier to test and lint the code locally with simple, consistent commands which would make it easy for contrubuters.

What problem is being solved?

How is it being solved?

What changes are made to solve it?

Added a Makefile to it

References

Closes #272

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Added project automation targets for common development tasks including build, test, lint, and audit operations.

@Abishek-Newar Abishek-Newar requested a review from a team as a code owner October 22, 2025 17:05
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

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.

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

Walkthrough

A new Makefile is added to define common project automation targets for installation, building, testing, linting, auditing, and cleanup operations. The all target orchestrates a complete workflow sequence.

Changes

Cohort / File(s) Summary
Project Automation
Makefile
New file with nine automation targets: help (displays targets), install (runs npm ci), build (runs npm run build), test (runs npm test), lint (runs npm run lint), lint-fix (runs npm run lint:fix), audit (runs npm audit), clean (removes dist/ directory), and all (composite target running install, build, lint, audit, clean, and test with a success message).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore: Added a top-level Makefile in js-sdk to simplify running tests and li…" directly and accurately reflects the main change in the changeset. The title clearly identifies the primary modification (adding a Makefile), specifies its location (top-level in js-sdk), and explains its purpose (simplifying running tests and lint commands). The title is concise, specific, and avoids vague terminology, making it immediately clear to reviewers what the PR accomplishes.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Abishek-Newar Abishek-Newar changed the title Added a top-level Makefile in js-sdk to simplify running tests and li… Chore: Added a top-level Makefile in js-sdk to simplify running tests and li… Oct 22, 2025
@Abishek-Newar Abishek-Newar changed the title Chore: Added a top-level Makefile in js-sdk to simplify running tests and li… chore: Added a top-level Makefile in js-sdk to simplify running tests and li… Oct 22, 2025
@SoulPancake
Copy link
Member

Thanks for your PR @Abishek-Newar

Copy link
Member

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

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

@Abishek-Newar Could you possibly add one more which would help to quickly do a local sanity of the checks in the generator https://github.com/openfga/sdk-generator/blob/d15c31eff4abeda628a03e7b82da593d2ea53b15/Makefile#L66

so essentially test audit run-lint together

- Added check target that runs lint, test, and audit
- Updated all target to include the new check target
- Updated help text to reflect changes

Closes openfga#272
@Abishek-Newar
Copy link
Contributor Author

@SoulPancake Done with changes that you have suggested , is there any more changes that i should make

Abishek-Newar and others added 3 commits October 25, 2025 18:14
more clean make all command

Co-authored-by: Raghd Hamzeh <[email protected]>
more clean make check command

Co-authored-by: Raghd Hamzeh <[email protected]>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.88%. Comparing base (351b3d0) to head (520ccb7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #277   +/-   ##
=======================================
  Coverage   88.88%   88.88%           
=======================================
  Files          23       23           
  Lines        1260     1260           
  Branches      230      230           
=======================================
  Hits         1120     1120           
  Misses         84       84           
  Partials       56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

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

LG, Thanks

@SoulPancake SoulPancake added this pull request to the merge queue Oct 25, 2025
Merged via the queue into openfga:main with commit ab47bd4 Oct 25, 2025
12 checks passed
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.

Add a top-level Makefile in js-sdk to simplify running tests and linters

4 participants