Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common add assert() function #898

Merged

Conversation

PiusKariuki
Copy link
Collaborator

Summary

Added an 'assert' function to the common adaptor

Fixes #876

Details

Created an assert function that aborts execution when it fails.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

@josephjclark josephjclark self-requested a review January 12, 2025 09:18
Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Thanks @PiusKariuki - what a pleasant surprise! Thank you for such a fully-featured and comprehensive PR, we really appreciate it.

There's one big issue with the return which we'll need to resolve, plus a couple of minor comments which it would be nice to address 🙏

packages/common/src/Adaptor.js Outdated Show resolved Hide resolved
packages/common/src/Adaptor.js Outdated Show resolved Hide resolved
packages/common/test/index.test.js Show resolved Hide resolved
packages/common/src/Adaptor.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Thank you @PiusKariuki!

As on the other PR, can you please generate a changeset file - pnpm changeset. This will also be a minor release.

Tomorrow I'll merge both of these changes to a branch in the repo, run a bit of QA, and release to the world!

@PiusKariuki
Copy link
Collaborator Author

Thank you for the very helpful reviews @josephjclark !
I'll keep contributing!

@josephjclark josephjclark self-assigned this Jan 12, 2025
@josephjclark josephjclark changed the base branch from main to release/next January 14, 2025 11:43
@josephjclark josephjclark merged commit 46860a9 into OpenFn:release/next Jan 14, 2025
@josephjclark josephjclark mentioned this pull request Jan 16, 2025
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.

common: add assert() function
2 participants