Skip to content

refactor: use rollup to compile transform mode#713

Merged
XGHeaven merged 1 commit intonextfrom
feat/use-preserve-module
Apr 7, 2026
Merged

refactor: use rollup to compile transform mode#713
XGHeaven merged 1 commit intonextfrom
feat/use-preserve-module

Conversation

@XGHeaven
Copy link
Copy Markdown
Collaborator

@XGHeaven XGHeaven commented Apr 3, 2026

No description provided.

@XGHeaven XGHeaven force-pushed the feat/use-preserve-module branch from bfc8432 to 045baaf Compare April 3, 2026 04:07
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

More templates

@ice/create-pkg

npm i https://pkg.pr.new/ice-lab/icepkg/@ice/create-pkg@713

ice-npm-utils

npm i https://pkg.pr.new/ice-lab/icepkg/ice-npm-utils@713

@ice/pkg

npm i https://pkg.pr.new/ice-lab/icepkg/@ice/pkg@713

@ice/pkg-plugin-jsx-plus

npm i https://pkg.pr.new/ice-lab/icepkg/@ice/pkg-plugin-jsx-plus@713

@ice/pkg-plugin-mf

npm i https://pkg.pr.new/ice-lab/icepkg/@ice/pkg-plugin-mf@713

commit: 68a8331

@XGHeaven XGHeaven force-pushed the feat/use-preserve-module branch from 045baaf to ecc482d Compare April 3, 2026 06:47
@XGHeaven XGHeaven mentioned this pull request Apr 3, 2026
30 tasks
@XGHeaven XGHeaven requested a review from Copilot April 3, 2026 07:39
Copy link
Copy Markdown

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 refactors @ice/pkg transform mode to compile via Rollup (preserveModules) instead of the previous custom plugin-container pipeline, and introduces transform.entryRoot (and pkgs[].entryRoot) to control transform output path mapping. It also updates docs and adds new integration/unit tests to cover copying non-script assets, multi-entry behavior, watch incremental updates, and the new entryRoot semantics.

Changes:

  • Refactor transform task implementation to use Rollup rollup() + preserveModules, plus shared Rollup output/warn helpers.
  • Add entryRoot to transform config (global + per-pkg) and document the behavior.
  • Add/adjust integration tests and snapshots for new transform output structure and watch behavior.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
website/docs/reference/config.md Documents transform.entryRoot and updates examples/formatting.
website/docs/guide/abilities.md Explains transform multi-entry scope and entryRoot output mapping.
packages/pkg/src/tasks/transform.ts Replaces per-file plugin container transform with Rollup preserveModules + incremental copy/delete logic.
packages/pkg/src/helpers/getTaskIO.ts Adds common-ancestor and entryRoot resolution helpers.
packages/pkg/src/core/init.ts Resolves/validates entryRoot for transform tasks (supports pkg override).
packages/pkg/src/types.ts Adds entryRoot to user/task config types.
packages/pkg/src/engine/rollup/output.ts Introduces a shared Rollup output → OutputFile normalization helper.
packages/pkg/src/engine/rollup/warn.ts Adds filtered Rollup warning wrapper (ignores empty chunk warnings).
packages/pkg/src/engine/rollup/build.ts Uses new output normalization helper.
packages/pkg/src/helpers/pluginContainer.ts Removes legacy plugin container implementation.
tests/helpers/watch.ts Adds a test helper to run/watch ice-pkg start and assert incremental outputs.
tests/integration/transform/* Adds new transform integration fixture, configs, tests, and snapshots.
packages/pkg/tests/* Adds unit coverage for entryRoot computation and initTask entryRoot behavior.
tests/integration//snapshots/.snap Updates expected compiled output snapshots to match Rollup preserveModules output.
pnpm-lock.yaml Adds the new integration test workspace package.
.changeset/four-meals-cough.md Declares a major version bump for the transform-mode refactor.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@XGHeaven XGHeaven force-pushed the feat/use-preserve-module branch from ecc482d to 3e6534b Compare April 7, 2026 04:14
Copy link
Copy Markdown

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

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@XGHeaven XGHeaven merged commit fb0a276 into next Apr 7, 2026
7 checks passed
@XGHeaven XGHeaven deleted the feat/use-preserve-module branch April 7, 2026 08:06
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.

2 participants