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

fix: remove dependencies #149

Merged
merged 3 commits into from
Feb 6, 2024
Merged

fix: remove dependencies #149

merged 3 commits into from
Feb 6, 2024

Conversation

mew-ton
Copy link
Contributor

@mew-ton mew-ton commented Feb 6, 2024

Summary by CodeRabbit

  • リファクタ
    • ObjectModifier インターフェースの getset メソッドが、一般的な K extends string から string キーを受け入れるように変更されました。
  • テスト
    • ベンチマークテストの型インポートを type-fest からローカルの ~/type に変更し、TestCase インターフェースの object プロパティの型を JsonObject から Dictionary に更新しました。

Copy link

changeset-bot bot commented Feb 6, 2024

🦋 Changeset detected

Latest commit: 6cef2cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
json-origami Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

coderabbitai bot commented Feb 6, 2024

Warning

Rate Limit Exceeded

@mew-ton has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 17 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 for further information.

Commits Files that changed from the base of the PR and between f0dcf1d and 6cef2cd.

Walkthrough

全体としての変更は、型の扱いを簡素化し、より具体的な型指定に移行することに焦点を当てています。特に、JsonObjectからDictionaryへの型変更が複数のファイルにわたって行われ、インターフェースのメソッドシグネチャの簡略化が見られます。

Changes

ファイル 変更概要
src/lib/modifier.ts ObjectModifiergetsetメソッドがstringキーを受け入れるように変更されました。
test/omit.bench.ts
test/pick.bench.ts
type-festから~/typeへの型インポートを更新し、TestCaseインターフェースのobjectプロパティの型をJsonObjectからDictionaryに変更。
test/utils/factory.ts 戻り値と型参照をJsonObject, JsonArray, JsonValueからDictionaryに更新しました。

🐰✨
変更が来た、新しい朝
型は変われど、コードは流れる川
簡素なシグネチャ、明日への扉
🌟🐇💻

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

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 4fc864f and f0dcf1d.
Files ignored due to path filters (3)
  • package.json is excluded by: !**/*.json
  • tsconfig.json is excluded by: !**/*.json
  • yarn.lock is excluded by: !**/*.lock
Files selected for processing (4)
  • src/lib/modifier.ts (3 hunks)
  • test/omit.bench.ts (2 hunks)
  • test/pick.bench.ts (2 hunks)
  • test/utils/factory.ts (6 hunks)
Additional comments: 9
test/omit.bench.ts (2)
  • 4-4: Dictionary 型のインポートが追加されました。この変更は、外部依存性を削除し、型の明確性を向上させる目的で行われています。
  • 27-27: TestCase インターフェースの object プロパティの型が Dictionary に更新されました。これにより、型の内部一貫性が向上しています。
test/pick.bench.ts (2)
  • 4-4: Dictionary 型のインポートが追加されました。この変更は、外部依存性を削除し、型の明確性を向上させる目的で行われています。
  • 27-27: TestCase インターフェースの object プロパティの型が Dictionary に更新されました。これにより、型の内部一貫性が向上しています。
test/utils/factory.ts (3)
  • 1-1: Dictionary 型のインポートが追加されました。この変更は、型の明確性を向上させる目的で行われています。
  • 10-10: createRandomObject 関数の戻り値の型が Dictionary に更新されました。これにより、型の明確性が向上しています。
  • 34-34: createObject 関数の戻り値の型が Dictionary に更新されました。これにより、型の明確性が向上しています。
src/lib/modifier.ts (2)
  • 1-1: Dictionary および DictionaryLeaf 型のインポートが確認されました。これは型の明確性を向上させるための変更です。
  • 1-1: ObjectModifier インターフェースのメソッドシグネチャが簡素化され、string キーを直接受け入れるように変更されました。これにより、キーの取り扱いが標準化されます。

@@ -52,8 +52,8 @@ export function createRandomObject({ leafs }: RandomObjectOption): JsonObject {
return obj
}

function createArray(): JsonArray {
const arr: Writable<JsonArray> = []
function createArray(): Dictionary {
Copy link

Choose a reason for hiding this comment

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

createArray 関数の戻り値の型が誤って Dictionary になっています。配列を返すべき関数の戻り値の型が辞書型になっているため、これは不適切です。

- function createArray(): Dictionary {
+ function createArray(): any[] {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
function createArray(): Dictionary {
function createArray(): any[] {

@@ -67,7 +67,7 @@ export function createRandomObject({ leafs }: RandomObjectOption): JsonObject {
return arr
}

function createValue(): JsonValue {
function createValue(): Dictionary {
Copy link

Choose a reason for hiding this comment

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

createValue 関数の戻り値の型が Dictionary に更新されましたが、この関数は複数の異なる型の値を返す可能性があるため、Dictionary 型は適切ではありません。

- function createValue(): Dictionary {
+ function createValue(): any {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
function createValue(): Dictionary {
function createValue(): any {

Copy link

codspeed-hq bot commented Feb 6, 2024

CodSpeed Performance Report

Merging #149 will not alter performance

Comparing fix/remove-typefest (f0dcf1d) with main (4fc864f)

Summary

✅ 22 untouched benchmarks

@mew-ton mew-ton merged commit afde67c into main Feb 6, 2024
9 checks passed
@mew-ton mew-ton deleted the fix/remove-typefest branch February 6, 2024 06:44
@github-actions github-actions bot mentioned this pull request Feb 6, 2024
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.

1 participant