Skip to content

chore: upgrade dinero.js from v2 alpha to v2 stable#4501

Merged
ScriptedAlchemy merged 8 commits intomodule-federation:mainfrom
sarahdayan:chore/upgrade-dinero-v2
Mar 10, 2026
Merged

chore: upgrade dinero.js from v2 alpha to v2 stable#4501
ScriptedAlchemy merged 8 commits intomodule-federation:mainfrom
sarahdayan:chore/upgrade-dinero-v2

Conversation

@sarahdayan
Copy link
Copy Markdown
Contributor

Description

Upgrades dinero.js from 2.0.0-alpha.10 to 2.0.0 (stable release) in both next-app-router-4000 and next-app-router-4001 example apps.

The stable v2 release includes a few breaking API changes from the alpha:

Alpha API Stable API Reason
toUnit(d) toDecimal(d, ({ value }) => Number(value)) toUnit was removed; toDecimal returns a string by default, transformer converts to number
toUnit(d, { digits: 0, round: up }) toDecimal(d, ({ value }) => Math.ceil(Number(value))) Rounding options removed; use Math.ceil in transformer
toFormat(d, ({ currency }) => currency.code) toSnapshot(d).currency.code toFormat was removed; toSnapshot gives direct access to currency metadata

Other APIs used by this project (dinero, multiply, allocate, Dinero<number>, DineroSnapshot<number>) remain unchanged.

Related Issue

N/A — upstream dependency upgrade.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Migrate the next-app-router example apps from dinero.js 2.0.0-alpha.10
to dinero.js 2.0.0 stable.

Breaking API changes addressed:
- `toUnit()` → `toDecimal()` with transformer
- `toFormat()` → `toSnapshot()` for currency code access
- Removed `up` rounding import (using `Math.ceil` instead)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

⚠️ No Changeset found

Latest commit: 9e7b27e

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

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 5, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 9e7b27e
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69b0a71932a26e000851cb99
😎 Deploy Preview https://deploy-preview-4501--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ee4f17880

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

sarahdayan and others added 3 commits March 5, 2026 06:46
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 10, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@613be1c

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@613be1c

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@613be1c

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@613be1c

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@613be1c

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@613be1c

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@613be1c

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@613be1c

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@613be1c

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@613be1c

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@613be1c

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@613be1c

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@613be1c

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@613be1c

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@613be1c

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@613be1c

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@613be1c

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@613be1c

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@613be1c

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@613be1c

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@613be1c

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@613be1c

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@613be1c

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@613be1c

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@613be1c

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@613be1c

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@613be1c

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@613be1c

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@613be1c

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@613be1c

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@613be1c

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@613be1c

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@613be1c

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@613be1c

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@613be1c

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@613be1c

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@613be1c

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@613be1c

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@613be1c

commit: 613be1c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

Bundle Size Report

3 package(s) changed, 38 unchanged.

Package Total dist Delta ESM gzip Delta
@module-federation/inject-external-runtime-core-plugin 5.4 kB +26 B (+0.5%) 548 B no change
@module-federation/runtime 16.6 kB +13 B (+0.1%) 616 B no change
@module-federation/runtime-core 249.3 kB -8 B (-0.0%) 477 B no change

Total dist: 10.66 MB (+31 B (+0.0%))
Total ESM gzip: 75.2 kB (no change)

@ScriptedAlchemy ScriptedAlchemy merged commit dba9ce5 into module-federation:main Mar 10, 2026
3 of 4 checks passed
@2heal1 2heal1 mentioned this pull request Mar 14, 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.

2 participants