chore: refactor core and server packages #4373
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This PR refactors the
core
andserver
packages to eliminate unused dependencies. It also bundles the packages using rolldown to maintain consistency with the new extensions refactoring.Fixes Issues
Self Checklist
This pull request includes significant updates to the build configuration and dependency management across multiple packages. The changes involve transitioning from Rollup to Rolldown, updating dependencies, and refactoring code for better readability and maintainability.
Build Configuration Updates:
core/package.json
: Updated build script to userolldown
instead ofrollup
and modified output paths forbrowser
,main
, andmodule
fields. [1] [2] [3]core/rolldown.config.mjs
: Added new Rolldown configuration file to replace Rollup configuration.server/package.json
: Updated build script to userolldown
and modified output path formain
field. [1] [2]server/rolldown.config.mjs
: Added new Rolldown configuration file for the server package.Dependency Management:
core/package.json
: Updated several dependencies, including downgrading@npmcli/arborist
and@types/pacote
. [1] [2]electron/package.json
: Upgradedpacote
dependency.server/package.json
: Removed unused dependencies and addedrolldown
. [1] [2]Code Refactoring:
core/src/browser/core.ts
: Reformatted code for better readability by breaking long lines and aligning parameters. [1] [2] [3] [4] [5] [6] [7] [8]core/src/node/extension/extension.ts
: Simplified import statements and improved error handling in theExtension
class. [1] [2] [3] [4]Configuration Adjustments:
core/tsconfig.json
: UpdatedoutDir
and adjustedexclude
pattern for test files.server/tsconfig.json
: ModifiedoutDir
and adjustedstrict
setting.Removal of Unused Code:
server/main.ts
: Removed unused setup and start server code.