Skip to content

feat(micro-frontend): dispose app resources on last session close - #360

Merged
leegeunhyeok merged 1 commit into
v2from
feat/micro-frontend-dispose-v3
Aug 20, 2026
Merged

feat(micro-frontend): dispose app resources on last session close#360
leegeunhyeok merged 1 commit into
v2from
feat/micro-frontend-dispose-v3

Conversation

@leegeunhyeok

@leegeunhyeok leegeunhyeok commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add app-scoped dispose callbacks to the micro-frontend runtime.
  • Run dispose callbacks when the app’s last session closes while retaining its evaluated container and modules.
  • Inject the remote app name at build time through the shared Metro/Mpack transformer path.
  • Document the lifecycle contract and generalize test fixtures.

Test Plan

  • Unit tests: 54 passed
  • Typecheck passed
  • ESLint passed
  • Package build and pack dry-run passed
  • Verified repeated mount/unmount cycles without linear JS heap growth

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 58dd176

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
@granite-js/micro-frontend Major
babel-preset-granite Major
create-granite-app Major
@granite-js/blur-view Major
@granite-js/brownfield-module Major
@granite-js/cli Major
@granite-js/cookies Major
@granite-js/screen Major
@granite-js/image Major
@granite-js/jest Major
@granite-js/lottie Major
@granite-js/mpack Major
@granite-js/native Major
@granite-js/naver-map Major
@granite-js/plugin-core Major
@granite-js/plugin-env Major
@granite-js/plugin-hermes Major
@granite-js/plugin-micro-frontend Major
@granite-js/plugin-router Major
@granite-js/plugin-rozenite Major
@granite-js/plugin-sentry Major
@granite-js/react-native Major
@granite-js/style-utils Major
@granite-js/utils Major
@granite-js/video Major
@granite-js/vitest Major
@granite-js/deployment-manager Major
@granite-js/forge-cli Major
@granite-js/pulumi-aws Major

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
granite-docs Ready Ready Preview Aug 20, 2026 5:55am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown
@granite-js/deployment-manager

yarn add https://pkg.pr.new/@granite-js/deployment-manager@360.tgz

@granite-js/forge-cli

yarn add https://pkg.pr.new/@granite-js/forge-cli@360.tgz

@granite-js/pulumi-aws

yarn add https://pkg.pr.new/@granite-js/pulumi-aws@360.tgz

babel-preset-granite

yarn add https://pkg.pr.new/babel-preset-granite@360.tgz

@granite-js/blur-view

yarn add https://pkg.pr.new/@granite-js/blur-view@360.tgz

@granite-js/brownfield-module

yarn add https://pkg.pr.new/@granite-js/brownfield-module@360.tgz

@granite-js/cli

yarn add https://pkg.pr.new/@granite-js/cli@360.tgz

@granite-js/cookies

yarn add https://pkg.pr.new/@granite-js/cookies@360.tgz

create-granite-app

yarn add https://pkg.pr.new/create-granite-app@360.tgz

@granite-js/screen

yarn add https://pkg.pr.new/@granite-js/screen@360.tgz

@granite-js/image

yarn add https://pkg.pr.new/@granite-js/image@360.tgz

@granite-js/jest

yarn add https://pkg.pr.new/@granite-js/jest@360.tgz

@granite-js/lottie

yarn add https://pkg.pr.new/@granite-js/lottie@360.tgz

@granite-js/micro-frontend

yarn add https://pkg.pr.new/@granite-js/micro-frontend@360.tgz

@granite-js/mpack

yarn add https://pkg.pr.new/@granite-js/mpack@360.tgz

@granite-js/native

yarn add https://pkg.pr.new/@granite-js/native@360.tgz

@granite-js/naver-map

yarn add https://pkg.pr.new/@granite-js/naver-map@360.tgz

@granite-js/plugin-core

yarn add https://pkg.pr.new/@granite-js/plugin-core@360.tgz

@granite-js/plugin-env

yarn add https://pkg.pr.new/@granite-js/plugin-env@360.tgz

@granite-js/plugin-hermes

yarn add https://pkg.pr.new/@granite-js/plugin-hermes@360.tgz

@granite-js/plugin-micro-frontend

yarn add https://pkg.pr.new/@granite-js/plugin-micro-frontend@360.tgz

@granite-js/plugin-router

yarn add https://pkg.pr.new/@granite-js/plugin-router@360.tgz

@granite-js/plugin-rozenite

yarn add https://pkg.pr.new/@granite-js/plugin-rozenite@360.tgz

@granite-js/plugin-sentry

yarn add https://pkg.pr.new/@granite-js/plugin-sentry@360.tgz

@granite-js/react-native

yarn add https://pkg.pr.new/@granite-js/react-native@360.tgz

@granite-js/style-utils

yarn add https://pkg.pr.new/@granite-js/style-utils@360.tgz

@granite-js/utils

yarn add https://pkg.pr.new/@granite-js/utils@360.tgz

@granite-js/video

yarn add https://pkg.pr.new/@granite-js/video@360.tgz

@granite-js/vitest

yarn add https://pkg.pr.new/@granite-js/vitest@360.tgz

commit: 58dd176

@leegeunhyeok
leegeunhyeok marked this pull request as ready for review August 20, 2026 08:53
@leegeunhyeok
leegeunhyeok merged commit 0d72b4d into v2 Aug 20, 2026
9 checks passed
@leegeunhyeok
leegeunhyeok deleted the feat/micro-frontend-dispose-v3 branch August 20, 2026 08:54
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