FlatFilers / flatfile-node

Official Node.js SDK for the Flatfile API
MIT License
9 stars 5 forks source link

Fix: Resolve a Type conflict on FlatfileClient #52

Closed theycallmeswift closed 3 months ago

theycallmeswift commented 4 months ago

Currently we have a conflict between the FlatfileClient type namespace and the class itself. If you try to instantiate a FlatfileClient object, you will get the following error:

Type 'typeof FlatfileClient' has no construct signatures.

  const client = new FlatfileClient();

I've also added a Jest test that will fail if this regresses in the future.

coderabbitai[bot] commented 4 months ago

[!WARNING]

Rate limit exceeded

@theycallmeswift has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 33 seconds before requesting another review.

How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.
Commits Files that changed from the base of the PR and between 4d1788ca2bef5dbe7ed21f53cc009d0afc0ad875 and 254773c0a8d6c394d766f242dce04d88fa6027f3.

Walkthrough

The recent updates introduce significant enhancements to the CI workflow, formatting rules for YAML files, and the FlatfileClient API. A new testing step has been added to the CI process to ensure that tests are executed immediately after building, improving code quality. Additionally, the visibility of internal interfaces in the FlatfileClient has been enhanced by exporting them, and the test suite for FlatfileClient has been restructured to ensure effective coverage.

Changes

File Change Summary
.github/workflows/ci.yml Added a "Run tests" job to execute yarn run test after the "Compile" job, enhancing CI processes.
.prettierrc.yml Introduced overrides to set tabWidth: 2 for *.yml files, while maintaining the default tabWidth: 4 for others.
src/Client.ts Exported Options and RequestOptions interfaces in the FlatfileClient namespace for better modularity.
tests/client.test.ts Replaced previous content with a focused test suite to verify instantiation of FlatfileClient.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
theycallmeswift commented 3 months ago

This is actually a non-issue. Closing!