Skip to content

Commit 7b861e4

Browse files
chore(release): 24.0.0 [skip ci]
# [24.0.0](v23.1.0...v24.0.0) (2023-12-20) ### Features * switch package to module type ([#1472](#1472)) ([50921ef](50921ef)) ### BREAKING CHANGES * Hooks are now distrubutes as JS built form TS with target ESNext and ESM module resolution. There is no more sense to distribute CJS version as package is ESM-only. Consequent of above - no more esm and cjs subfolders - hooks are importable from index.js or its own directory which don't have a prefix anymore, thanks to exports directive. All of below examples will lead to same result, choose any on your taste: import { useFirstMountState } from '@react-hookz/web'; import { useFirstMountState } from '@react-hookz/web/'; import { useFirstMountState } from '@react-hookz/web/useFirstMountState/'; import { useFirstMountState } from '@react-hookz/web/useFirstMountState/index.js'; Thought is seems not to have subfolder, it is only due to exports directive, in real it is @react-hookz/web/dist/useFirstMountState/index.js. Pakage uses imports directive to define path alias #root - it stays so even in distributed code, thus, some may be affected in case their bundler configured to somehow handle such alias. Those developer shoud configure import rewriter not to handle node_modules or @react-hookz/web package exclusively. Side-effect for current PR - documentation is broken, as storybook 6 is not working within ESM packages and I'm planning to switch to another domenting engine anyway.
1 parent 03538a9 commit 7b861e4

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# [24.0.0](https://github.com/react-hookz/web/compare/v23.1.0...v24.0.0) (2023-12-20)
2+
3+
4+
### Features
5+
6+
* switch package to module type ([#1472](https://github.com/react-hookz/web/issues/1472)) ([50921ef](https://github.com/react-hookz/web/commit/50921efda58aefcd52d50bfff27c31755c9253d9))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* Hooks are now distrubutes as JS built form TS with target ESNext and ESM module resolution. There is no more sense to distribute CJS version as package is ESM-only.
12+
13+
Consequent of above - no more esm and cjs subfolders - hooks are importable from index.js or its own directory which don't have a prefix anymore, thanks to exports directive. All of below examples will lead to same result, choose any on your taste:
14+
15+
import { useFirstMountState } from '@react-hookz/web';
16+
import { useFirstMountState } from '@react-hookz/web/';
17+
import { useFirstMountState } from '@react-hookz/web/useFirstMountState/';
18+
import { useFirstMountState } from '@react-hookz/web/useFirstMountState/index.js';
19+
Thought is seems not to have subfolder, it is only due to exports directive, in real it is
20+
@react-hookz/web/dist/useFirstMountState/index.js.
21+
22+
Pakage uses imports directive to define path alias #root - it stays so even in distributed code, thus, some may be affected in case their bundler configured to somehow handle such alias. Those developer shoud configure import rewriter not to handle node_modules or @react-hookz/web package exclusively.
23+
24+
Side-effect for current PR - documentation is broken, as storybook 6 is not working within ESM packages and I'm planning to switch to another domenting engine anyway.
25+
126
# [23.1.0](https://github.com/react-hookz/web/compare/v23.0.1...v23.1.0) (2023-06-30)
227

328

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-hookz/web",
3-
"version": "23.1.0",
3+
"version": "24.0.0",
44
"description": "React hooks done right, for browser and SSR.",
55
"keywords": [
66
"react",

0 commit comments

Comments
 (0)