-
Notifications
You must be signed in to change notification settings - Fork 70
[LG-5464] chore(code-editor): remove unused dependencies and standardize test syntax #3065
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
Conversation
|
There was a problem hiding this 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 performs comprehensive cleanup and standardization tasks on the CodeEditor package to improve code quality and maintainability. The changes include removing unused dependencies, standardizing test syntax across the codebase, and setting up proper TypeScript configuration for the new package.
Key improvements:
- Package registration: Added CodeEditor to the ALL_PACKAGES list for proper installation tooling
- TypeScript configuration: Set up comprehensive tsconfig.json with proper paths and references
- Test standardization: Updated all test files to use
test()
instead ofit()
for consistency with project conventions - Complete component implementation: Added full CodeEditor implementation with hooks, extensions, formatting capabilities, and comprehensive test coverage
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tools/install/src/ALL_PACKAGES.ts | Registers code-editor package in installation tooling |
packages/code-editor/tsconfig.json | Complete TypeScript configuration with dependencies and paths |
packages/code-editor/src/index.ts | Main package exports for public API |
packages/code-editor/src/Panel/* | Panel component with comprehensive props, styling, and tests |
packages/code-editor/src/CodeEditorCopyButton* | Copy button components with clipboard functionality and tests |
packages/code-editor/src/CodeEditor/* | Core editor implementation with hooks, extensions, and test utilities |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Size Change: 0 B Total Size: 2.03 MB ℹ️ View Unchanged
|
981bdc5
to
697843a
Compare
08f40b0
to
d1d676f
Compare
e5f6ed4
to
cb2fe2e
Compare
98a1647
to
0568216
Compare
- Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project.
- Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
0568216
to
878344d
Compare
…ize test syntax (#3065) * refactor(tests): update test cases to use 'test' instead of 'it' - Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project. * chore: remove unused Codemirror dependencies and clean up imports - Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
…ize test syntax (#3065) * refactor(tests): update test cases to use 'test' instead of 'it' - Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project. * chore: remove unused Codemirror dependencies and clean up imports - Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
…ize test syntax (#3065) * refactor(tests): update test cases to use 'test' instead of 'it' - Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project. * chore: remove unused Codemirror dependencies and clean up imports - Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
…ize test syntax (#3065) * refactor(tests): update test cases to use 'test' instead of 'it' - Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project. * chore: remove unused Codemirror dependencies and clean up imports - Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
…ize test syntax (#3065) * refactor(tests): update test cases to use 'test' instead of 'it' - Replaced all instances of 'it' with 'test' in the test files for consistency across the codebase. - This change improves readability and aligns with the preferred testing syntax in the project. * chore: remove unused Codemirror dependencies and clean up imports - Removed '@uiw/react-codemirror' from package.json and pnpm-lock.yaml as it is no longer needed. - Cleaned up imports in useThemeExtension.ts to eliminate references to the removed dependency. - Updated testUtils.tsx to use ChangeSpec from '@codemirror/state' instead of the removed '@uiw/react-codemirror'.
✍️ Proposed changes
This PR performs cleanup tasks on the CodeEditor package to improve code quality and maintainability. The changes include removing unused dependencies that were previously part of the CodeMirror integration and standardizing test syntax across the codebase.
Key improvements:
@uiw/react-codemirror
and related packages that are no longer needed after recent CodeMirror integration changestest()
instead ofit()
for consistency with the project's testing conventionsThese changes reduce bundle size, eliminate potential security vulnerabilities from unused dependencies, and improve code consistency across the test suite.
🎟 Jira ticket: LG-5464
🧪 How to test changes
yarn test
in thepackages/code-editor
directory to ensure all test cases continue to function correctly with thetest()
syntaxyarn fix:eslint
to confirm that the standardized test syntax passes linting rules