Skip to content

Commit

Permalink
fix(react): add types field to esm exports map (#6945)
Browse files Browse the repository at this point in the history
Co-authored-by: Segun Adebayo <[email protected]>
  • Loading branch information
anddoutoi and segunadebayo authored Nov 7, 2022
1 parent 7a1716a commit 75eaba9
Show file tree
Hide file tree
Showing 92 changed files with 312 additions and 95 deletions.
94 changes: 94 additions & 0 deletions .changeset/rich-moles-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
"@chakra-ui/accordion": patch
"@chakra-ui/alert": patch
"@chakra-ui/anatomy": patch
"@chakra-ui/avatar": patch
"@chakra-ui/breadcrumb": patch
"@chakra-ui/button": patch
"@chakra-ui/checkbox": patch
"@chakra-ui/clickable": patch
"@chakra-ui/close-button": patch
"@chakra-ui/color-mode": patch
"@chakra-ui/control-box": patch
"@chakra-ui/counter": patch
"@chakra-ui/css-reset": patch
"@chakra-ui/descendant": patch
"@chakra-ui/editable": patch
"@chakra-ui/react-env": patch
"@chakra-ui/focus-lock": patch
"@chakra-ui/form-control": patch
"@chakra-ui/icon": patch
"@chakra-ui/icons": patch
"@chakra-ui/image": patch
"@chakra-ui/input": patch
"@chakra-ui/layout": patch
"@chakra-ui/live-region": patch
"@chakra-ui/media-query": patch
"@chakra-ui/menu": patch
"@chakra-ui/modal": patch
"@chakra-ui/number-input": patch
"@chakra-ui/pin-input": patch
"@chakra-ui/popover": patch
"@chakra-ui/popper": patch
"@chakra-ui/portal": patch
"@chakra-ui/progress": patch
"@chakra-ui/provider": patch
"@chakra-ui/radio": patch
"@chakra-ui/react": patch
"@chakra-ui/select": patch
"@chakra-ui/skeleton": patch
"@chakra-ui/skip-nav": patch
"@chakra-ui/slider": patch
"@chakra-ui/spinner": patch
"@chakra-ui/stat": patch
"@chakra-ui/styled-system": patch
"@chakra-ui/switch": patch
"@chakra-ui/system": patch
"@chakra-ui/table": patch
"@chakra-ui/tabs": patch
"@chakra-ui/tag": patch
"@chakra-ui/textarea": patch
"@chakra-ui/theme": patch
"@chakra-ui/theme-tools": patch
"@chakra-ui/toast": patch
"@chakra-ui/tooltip": patch
"@chakra-ui/transition": patch
"@chakra-ui/visually-hidden": patch
"@chakra-ui/react-context": patch
"@chakra-ui/react-use-animation-state": patch
"@chakra-ui/react-use-callback-ref": patch
"@chakra-ui/react-use-controllable-state": patch
"@chakra-ui/react-use-disclosure": patch
"@chakra-ui/react-use-event-listener": patch
"@chakra-ui/react-use-focus-effect": patch
"@chakra-ui/react-use-focus-on-pointer-down": patch
"@chakra-ui/react-use-interval": patch
"@chakra-ui/react-use-latest-ref": patch
"@chakra-ui/react-use-merge-refs": patch
"@chakra-ui/react-use-outside-click": patch
"@chakra-ui/react-use-pan-event": patch
"@chakra-ui/react-use-previous": patch
"@chakra-ui/react-use-safe-layout-effect": patch
"@chakra-ui/react-use-size": patch
"@chakra-ui/react-use-timeout": patch
"@chakra-ui/react-use-update-effect": patch
"@chakra-ui/hooks": patch
"@chakra-ui/react-utils": patch
"@chakra-ui/utils": patch
"@chakra-ui/breakpoint-utils": patch
"@chakra-ui/dom-utils": patch
"@chakra-ui/event-utils": patch
"@chakra-ui/lazy-utils": patch
"@chakra-ui/merge-utils": patch
"@chakra-ui/number-utils": patch
"@chakra-ui/object-utils": patch
"@chakra-ui/react-children-utils": patch
"@chakra-ui/react-types": patch
"@chakra-ui/shared-utils": patch
"@chakra-ui/theme-utils": patch
"@chakra-ui/storybook-addon": patch
---

Fix issue where using `@chakra-ui/react` in a TypeScript project with
`"type": "module"` in `package.json` and `"moduleResolution": "Node16"` in
`tsconfig.json` cannot find the types.
3 changes: 2 additions & 1 deletion packages/components/accordion/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/alert/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/anatomy/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/avatar/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/breadcrumb/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/button/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/checkbox/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/clickable/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/close-button/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/color-mode/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/control-box/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/counter/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/css-reset/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/descendant/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/editable/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/env/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/focus-lock/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/form-control/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/icon/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/icons/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/image/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/input/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/layout/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/live-region/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/media-query/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/menu/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/modal/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/number-input/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/pin-input/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/popover/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
}
Expand Down
Loading

1 comment on commit 75eaba9

@vercel
Copy link

@vercel vercel bot commented on 75eaba9 Nov 7, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.