Skip to content

Comments

[BLOCKED] Rolldown + vite 8(rolldown based)#1424

Open
AStaroverov wants to merge 9 commits intomainfrom
feat/tsdown
Open

[BLOCKED] Rolldown + vite 8(rolldown based)#1424
AStaroverov wants to merge 9 commits intomainfrom
feat/tsdown

Conversation

@AStaroverov
Copy link
Contributor

This pull request introduces several improvements and refactors across the codebase, focusing on updating build tooling, improving transaction tracking logic, and making minor bug fixes and dependency upgrades. The most impactful changes include replacing the Rollup build system with Rolldown in several places, refactoring the transaction tracking implementation in PlTransaction, and updating dependencies to newer versions for better compatibility and features.

Build System and Tooling Updates:

  • Switched from Rollup to Rolldown in build configurations for multiple packages, including lib/node/pl-middle-layer, lib/ptabler/schema, and tools/block-tools, updating relevant config files and options (rollupOptionsrolldownOptions). [1] [2] [3] [4]
  • Upgraded TypeScript, Vite, and related dependencies in pnpm-workspace.yaml for improved compatibility and features. [1] [2]
  • Added typescript.experimental.useTsgo setting in .vscode/settings.json to enable experimental TypeScript features.

Core Logic Refactoring:

  • Removed the @tracked decorator and refactored all tracked methods in PlTransaction to explicitly wrap their logic using this.track(...), improving clarity and maintainability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Bug Fixes and Minor Improvements:

  • Fixed incorrect SCSS variable usage for icon color in PlAutocomplete and PlDropdownLegacy components. [1] [2]
  • Improved type handling and compatibility in utility and helper functions, such as downloadContent and calculateSha256. [1] [2]
  • Updated the export map in sdk/model/package.json to include ./render/internal for better module resolution.
  • Removed unused imports from several SDK files for code cleanliness. [1] [2] [3]
  • Fixed type and conversion issues in content handling in tools/block-tools.

Other Maintenance:

  • Updated test descriptions for clarity in events-sequence.test.ts.
  • Updated plugin versions and removed unnecessary plugins in build configs. (tools/build-configs/package.jsonL46-R46, F34afbb2L1)

These changes collectively modernize the build process, clarify asynchronous transaction tracking, and resolve minor bugs and type issues throughout the project.

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: 3b8613a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AStaroverov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing the project's build infrastructure by transitioning from Rollup to Rolldown, which aims to improve build performance and maintainability. Concurrently, it refactors core transaction tracking mechanisms to be more explicit and easier to understand, alongside crucial dependency updates and various code quality improvements. The changes collectively enhance the development experience and ensure the codebase remains current with modern tooling standards.

Highlights

  • Build System Migration to Rolldown: The build system has been significantly updated, replacing Rollup with Rolldown across various packages including lib/node/pl-middle-layer, lib/ptabler/schema, and tools/block-tools. This involves updating configuration files, build scripts, and dependencies to leverage Rolldown's capabilities.
  • Refactored Transaction Tracking in PlTransaction: The @tracked decorator has been removed from PlTransaction methods. Instead, asynchronous operations are now explicitly wrapped with this.track(...), enhancing clarity and maintainability of transaction tracking logic.
  • Dependency Upgrades and Tooling Enhancements: Key dependencies such as TypeScript (to ~5.9.3), Vite (to 8.0.0-beta.13), and @vitejs/plugin-vue (to ^6.0.4) have been upgraded. Additionally, experimental TypeScript features are enabled in VS Code settings, and new build-related dependencies like tsconfig-paths and tsup were added.
  • Improved Type Handling and Code Cleanliness: Type handling has been refined in utility functions like downloadContent and calculateSha256 for better compatibility. Unused imports were removed from several SDK files, and the sdk/model/package.json export map was updated for better module resolution.
  • Minor Bug Fixes and SCSS Variable Correction: Incorrect SCSS variable usage for icon colors in PlAutocomplete and PlDropdownLegacy components has been fixed, and test descriptions were updated for clarity.
Changelog
  • .vscode/settings.json
    • Added typescript.experimental.useTsgo setting to enable experimental TypeScript features.
  • lib/node/pl-client/src/core/transaction.ts
    • Removed the @tracked decorator.
    • Refactored getResourceData to explicitly wrap its logic with this.track().
    • Refactored getResourceDataIfExists to explicitly wrap its logic with this.track().
    • Refactored getFieldIfExists to explicitly wrap its logic with this.track().
    • Refactored listKeyValues to explicitly wrap its logic with this.track().
    • Refactored listKeyValuesString to explicitly wrap its logic with this.track().
    • Refactored listKeyValuesIfResourceExists to explicitly wrap its logic with this.track().
    • Refactored listKeyValuesStringIfResourceExists to explicitly wrap its logic with this.track().
    • Refactored getKValue to explicitly wrap its logic with this.track().
    • Refactored getKValueString to explicitly wrap its logic with this.track().
    • Refactored getKValueJson to explicitly wrap its logic with this.track().
    • Refactored getKValueIfExists to explicitly wrap its logic with this.track().
    • Refactored getKValueStringIfExists to explicitly wrap its logic with this.track().
    • Refactored getKValueJsonIfExists to explicitly wrap its logic with this.track().
  • lib/node/pl-middle-layer/build.node.config.mjs
    • Replaced createRollupNodeConfig with createRolldownNodeConfig for build configuration.
  • lib/ptabler/schema/vite.config.mts
    • Changed rollupOptions to rolldownOptions in Vite configuration.
  • lib/ui/uikit/src/components/PlAutocomplete/pl-autocomplete.scss
    • Corrected SCSS variable usage for --icon-color.
  • lib/ui/uikit/src/components/PlDropdownLegacy/pl-dropdown-legacy.scss
    • Corrected SCSS variable usage for --icon-color.
  • lib/ui/uikit/src/components/PlFileDialog/Remote.vue
    • Updated import path for defaultData, useVisibleItems, and vTextOverflown from ./remote to ./remote-helpers.
  • lib/ui/uikit/src/components/PlFileDialog/remote.ts
    • Renamed to lib/ui/uikit/src/components/PlFileDialog/remote-helpers.ts.
  • lib/ui/uikit/src/helpers/downloadContent.ts
    • Improved type handling for BlobPart when creating a Blob from ArrayBuffer or ArrayBuffer.isView.
  • pnpm-workspace.yaml
    • Updated typescript from ~5.6.3 to ~5.9.3.
    • Added tsconfig-paths at ^4.2.0.
    • Added tsup at ~8.3.5.
    • Updated vite from ^6.4.1 to 8.0.0-beta.13.
    • Updated @vitejs/plugin-vue from ^5.2.3 to ^6.0.4.
  • sdk/model/package.json
    • Added ./render/internal to the export map for better module resolution.
  • sdk/model/src/env_value.ts
    • Removed unused import from ./global.
  • sdk/model/src/internal.ts
    • Removed unused import from ./global.
  • sdk/model/src/raw_globals.ts
    • Removed unused import from ./global.
  • tests/helper/src/events-sequence.test.ts
    • Updated test description from 'test 1' to '1'.
  • tools/block-tools/src/util.ts
    • Improved type handling for calculateSha256 to accept Uint8Array<ArrayBufferLike> or ArrayBuffer.
  • tools/block-tools/src/v2/model/content_conversion.ts
    • Changed content type from Buffer.from to new Uint8Array(Buffer.from) for explicit byte handling.
  • tools/block-tools/vite.config.mts
    • Removed nodeResolve plugin.
    • Changed rollupOptions to rolldownOptions in Vite configuration.
  • tools/build-configs/package.json
    • Updated vite-plugin-externalize-deps from ^0.9.0 to ^0.10.0.
  • tools/build-configs/src/createViteDevConfig.ts
    • Changed rollupOptions to rolldownOptions in Vite build configuration.
  • tools/build-configs/src/createViteLibConfig.ts
    • Changed rollupOptions to rolldownOptions in Vite build configuration.
  • tools/build-configs/src/vite.ts
    • Removed nodeResolve import.
    • Changed rollupOptions to rolldownOptions in Vite configuration.
    • Removed nodeResolve() from plugins.
  • tools/build-configs/vite.config.mts
    • Removed nodeResolve import.
    • Changed rollupOptions to rolldownOptions in Vite configuration.
    • Removed nodeResolve() from plugins.
  • tools/package-builder/src/test/vite.config.mts
    • Changed rollupOptions to rolldownOptions in build configuration.
  • tools/ts-builder/package.json
    • Updated build scripts to use rolldown -c instead of rollup -c.
    • Added rolldown at ^1.0.0-rc.3 as a dependency.
    • Added rolldown-plugin-dts at ^0.22.1 as a dependency.
    • Removed rollup from dependencies.
  • tools/ts-builder/rolldown.config.mjs
    • Added new Rolldown configuration file for ts-builder.
  • tools/ts-builder/rollup.config.js
    • Removed Rollup configuration file.
  • tools/ts-builder/src/commands/build.ts
    • Replaced resolveRollup with resolveRolldown.
    • Replaced buildWithRollup with buildWithRolldown for build execution.
  • tools/ts-builder/src/commands/utils/config-manager.ts
    • Updated node target filename and output path to rolldown/node.config.mjs.
    • Updated block-model target filename and output path to rolldown/block-model.config.mjs.
  • tools/ts-builder/src/commands/utils/executable-resolver.ts
    • Refactored findPackageRoot function for more robust package root resolution.
    • Renamed resolveRollup to resolveRolldown and updated its implementation to resolve the rolldown executable.
  • tools/ts-builder/src/commands/utils/path-utils.ts
    • Refactored findPackageRoot function for more robust package root resolution.
    • Updated getConfigsDir to resolve configurations from the dist/configs directory within the package root.
  • tools/ts-builder/src/configs/rolldown/block-model.config.mjs
    • Added new Rolldown configuration file for block models.
  • tools/ts-builder/src/configs/rolldown/common.mjs
    • Added common utilities for creating Rolldown build entries, including DTS plugin integration and source condition handling.
  • tools/ts-builder/src/configs/rolldown/create-block-model-config.mjs
    • Added function to create Rolldown block model configurations.
  • tools/ts-builder/src/configs/rolldown/create-node-config.mjs
    • Added function to create Rolldown node configurations.
  • tools/ts-builder/src/configs/rolldown/node.config.mjs
    • Added new Rolldown configuration file for node builds.
  • tools/ts-builder/src/configs/rolldown/plugins.mjs
    • Added dtsResolvePlugin to resolve .d.ts side-effect imports as empty modules.
  • tools/ts-builder/src/configs/rollup.block-model.config.js
    • Renamed to tools/ts-builder/src/configs/rolldown.block-model.config.mjs.
  • tools/ts-builder/src/configs/rollup.node.config.js
    • Renamed to tools/ts-builder/src/configs/rolldown.node.config.mjs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes the build process by migrating from Rollup to Rolldown, updates dependencies, and refactors transaction tracking in PlTransaction. The changes improve tooling compatibility and code clarity, and include minor bug fixes for SCSS variable usage and type handling. No specific vulnerabilities or critical security issues were found in the provided code changes.

@AStaroverov
Copy link
Contributor Author

blocked by rolldown. don't transform using syntax to specific target, keep as is. Node 22 don't support using. Node 24 support

@AStaroverov AStaroverov changed the title [WIP] Rolldown + vite 8(rolldown based) [BLOCKED] Rolldown + vite 8(rolldown based) Feb 18, 2026
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