Skip to content

chore: Clean up worklet directive usage#447

Merged
MatiPl01 merged 1 commit into
mainfrom
chore/worklet-directive-cleanup
Aug 15, 2025
Merged

chore: Clean up worklet directive usage#447
MatiPl01 merged 1 commit into
mainfrom
chore/worklet-directive-cleanup

Conversation

@MatiPl01
Copy link
Copy Markdown
Owner

@MatiPl01 MatiPl01 commented Aug 15, 2025

Description

This PR moves the 'worklet' directive to the top of the file where possible (in files which contain only worklet functions).

@MatiPl01 MatiPl01 self-assigned this Aug 15, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
react-native-sortables-docs ⬜️ Ignored Aug 15, 2025 1:17am

@MatiPl01 MatiPl01 requested a review from Copilot August 15, 2025 01:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates the 'worklet' directive placement by moving it to the top of files that contain only worklet functions, improving code organization and consistency.

  • Moved 'worklet' directive from individual functions to file-level scope
  • Converted some function declarations to arrow functions for consistency
  • Removed redundant 'worklet' directives from individual functions within files

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/react-native-sortables/src/utils/operations.ts Moved worklet directive to top and converted to arrow function
packages/react-native-sortables/src/utils/misc.ts Moved worklet directive from function to file level
packages/react-native-sortables/src/utils/logs.ts Moved worklet directive to top and converted functions to arrow functions
packages/react-native-sortables/src/utils/layout.ts Moved worklet directive to top and converted functions to arrow functions
packages/react-native-sortables/src/utils/equality.ts Moved worklet directive to top and converted functions to arrow functions
packages/react-native-sortables/src/utils/dimensions.ts Moved worklet directive to top and converted functions to arrow functions
packages/react-native-sortables/src/utils/arrays.ts Moved worklet directive to top and converted function to arrow function
packages/react-native-sortables/src/providers/shared/utils.ts Moved worklet directive from function to file level
packages/react-native-sortables/src/providers/shared/AutoScrollProvider/utils.ts Moved worklet directive to top and removed from individual functions
packages/react-native-sortables/src/providers/grid/layout/utils/helpers.ts Moved worklet directive to top and removed from individual functions
packages/react-native-sortables/src/providers/flex/layout/utils/layout.ts Moved worklet directive to top and removed from individual functions
packages/react-native-sortables/src/providers/flex/layout/updates/insert/utils.ts Moved worklet directive to top and removed from individual functions
packages/react-native-sortables/src/integrations/reanimated/utils/animatedTimeout.ts Moved worklet directive to top and removed from individual functions
packages/react-native-sortables/src/constants/layoutAnimations.ts Moved worklet directive to top and removed from individual functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MatiPl01 MatiPl01 merged commit cdf6962 into main Aug 15, 2025
7 checks passed
@MatiPl01 MatiPl01 deleted the chore/worklet-directive-cleanup branch August 15, 2025 01:20
@MatiPl01
Copy link
Copy Markdown
Owner Author

🎉 This issue has been resolved in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants