build(react): reorder package.json exports fields for consistency #5856
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.
📝 Description
Reorder
package.jsonexports fields for consistency across the@heroui/reactpackage.This change ensures that
typesis always placed first anddefaultis always placed last in the exports field ordering, following Node.js package exports best practices.⛳️ Current behavior (updates)
The exports fields in
package.jsonand related build scripts had inconsistent ordering:importbeforetypesdefaultbeforestyle🚀 New behavior
All exports fields now follow a consistent ordering convention:
typesalways comes first (for better TypeScript resolution)defaultalways comes last (as per Node.js resolution algorithm best practices)package.jsonafter runningcd packages/react && pnpm turbo run build && pnpm run prepack{ "name": "@heroui/react", "version": "3.0.0-alpha.35", "description": "🚀 Beautiful and modern React UI library built with Tailwind CSS 4.0.", "license": "MIT", "type": "module", "sideEffects": false, "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "author": "HeroUI <[email protected]>", "homepage": "https://heroui.com", "keywords": [ "next", "next ui", "hero ui", "components", "modern components", "react components", "react ui" ], "files": [ "dist" ], "publishConfig": { "access": "public" }, "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" }, "./styles": { "style": "./dist/styles.css", "default": "./dist/styles.css" }, "./package.json": "./package.json" }, "repository": { "type": "git", "url": "git+https://github.com/heroui-inc/heroui.git", "directory": "packages/react" }, "bugs": { "url": "https://github.com/heroui-inc/heroui/issues" }, "dependencies": { "@internationalized/date": "3.10.0", "@radix-ui/react-avatar": "1.1.10", "@radix-ui/react-slot": "1.2.3", "@react-aria/ssr": "3.9.10", "@react-aria/utils": "3.31.0", "@react-types/shared": "3.32.1", "clsx": "2.1.1", "input-otp": "1.4.2", "react-aria-components": "1.13.0", "tailwind-merge": "3.3.1", "tailwind-variants": "3.1.1" }, "peerDependencies": { "react": ">=19.0.0", "react-dom": ">=19.0.0", "tailwindcss": ">=4.0.0" } }💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
This change improves consistency across the codebase and follows the official Node.js package exports best practices as documented at https://nodejs.org/api/packages.html.
typesdefault