Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dwarvesf/react-toolkit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @dwarvesf/[email protected]
Choose a base ref
...
head repository: dwarvesf/react-toolkit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 15, 2022

  1. feat: usePagination (#39)

    * feat: usePagination
    
    * chore: resolve comments
    
    Co-authored-by: Tuan Dao <tdao@search.io>
    tuanddd and Tuan Dao authored Feb 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d4774a9 View commit details

Commits on Feb 16, 2022

  1. release: bump package(s) (#40)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Feb 16, 2022
    Copy the full SHA
    4222226 View commit details

Commits on Mar 30, 2022

  1. Copy the full SHA
    3a94e00 View commit details

Commits on May 25, 2022

  1. chore: remove lerna (#41)

    zlatanpham authored May 25, 2022
    Copy the full SHA
    43e1fe0 View commit details

Commits on Jul 23, 2022

  1. Copy the full SHA
    c282b18 View commit details

Commits on Apr 19, 2023

  1. refactor: migrate yarn to pnpm (#46)

    * chore: upgrade turbo
    
    * feat: mig yarn to pnpm
    
    * feat: add test deps
    
    * feat: fix some command
    
    * feat: add example as a package
    
    * chore: update CI/CD
    
    * fix: ci/cd
    
    * chore: update docs
    
    ---------
    
    Co-authored-by: Ngo Lap Nguyen <ngolap.nguyen@gmail.com>
    toanbku and ngolapnguyen authored Apr 19, 2023
    Copy the full SHA
    9ffbfb4 View commit details
  2. fix: release ci/cd (#48)

    toanbku authored Apr 19, 2023
    Copy the full SHA
    4866cb3 View commit details

Commits on May 29, 2023

  1. Copy the full SHA
    63ccdbc View commit details

Commits on Aug 14, 2023

  1. Copy the full SHA
    1b55afb View commit details
  2. release: bump package(s) (#52)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Aug 14, 2023
    Copy the full SHA
    f4df9c3 View commit details
  3. Copy the full SHA
    9da4c20 View commit details
  4. release: bump package(s) (#55)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Aug 14, 2023
    Copy the full SHA
    8aca054 View commit details
  5. Copy the full SHA
    339f37b View commit details

Commits on Nov 29, 2023

  1. feat(hooks): expose onOpenChange in useDisclosure (#56)

    zlatanpham authored Nov 29, 2023
    Copy the full SHA
    b4f230f View commit details
  2. release: bump package(s) (#57)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Nov 29, 2023
    Copy the full SHA
    cd279dc View commit details
  3. chore: enable auto install peers to avoid CI fail

    zlatanpham committed Nov 29, 2023
    Copy the full SHA
    fd86175 View commit details

Commits on Nov 30, 2023

  1. chore(hooks): release packages (#58)

    * chore(hooks): release packages
    
    * chore(all): update lock file
    
    * chore(all): update lock file
    
    * chore(all): update lock file
    
    * chore(all): upgrade pnpm version
    
    * chore(all): upgrade pnpm version in lockfile
    
    * chore(all): update compress size action
    
    * chore(all): exclude docs
    
    * chore(all): exclude docs
    zlatanpham authored Nov 30, 2023
    Copy the full SHA
    6d52deb View commit details
  2. release: bump package(s) (#60)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Nov 30, 2023
    Copy the full SHA
    a9ca4f2 View commit details

Commits on Dec 27, 2023

  1. fix: module export entry (#61)

    chinhld12 authored Dec 27, 2023
    Copy the full SHA
    01bce8c View commit details
  2. fix: packages dependency (#63)

    chinhld12 authored Dec 27, 2023
    Copy the full SHA
    6df38b0 View commit details
  3. fix: packages dependency (#64)

    chinhld12 authored Dec 27, 2023
    Copy the full SHA
    90761b2 View commit details
  4. release: bump package(s) (#62)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Dec 27, 2023
    Copy the full SHA
    94ac657 View commit details
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['12.x', '14.x']
node: ['16.x']
os: [ubuntu-latest]

steps:
@@ -20,7 +20,12 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
uses: pnpm/action-setup@v2
with:
version: 8.5.1
- run: pnpm i
- run: pnpm build
- run: rm -rf .next

- name: Test
run: yarn test:ci
run: pnpm test:ci
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -15,18 +15,23 @@ jobs:
# This makes action fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
version: 14.x
version: 16.x

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.5.1

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
with:
publish: yarn release
publish: pnpm release
commit: 'release: bump package(s)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 13 additions & 3 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
@@ -2,14 +2,24 @@ name: Compressed Size

on: [pull_request]

env:
HUSKY: 0

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Node.js 16
uses: actions/setup-node@v4
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
fetch-depth: 1
- uses: preactjs/compressed-size-action@v2
version: 8.5.1
run_install: false
- uses: actions/checkout@v3
- uses: preactjs/compressed-size-action@2.5.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
build-script: 'build:packages'
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ prepare your contribution.

## Code of Conduct

Radix has adopted the
React Toolkit has adopted the
[Contributor Covenant](https://www.contributor-covenant.org/) as its Code of
Conduct, and we expect project participants to adhere to it.

@@ -29,15 +29,15 @@ git clone https://github.com/<your_github_username>/react-toolkit.git
cd react-toolkit
```

3. Setup all the dependencies and packages by running `yarn prestart`. This
command will install dependencies and bootstrap the repo using `lerna`
1. Setup all the dependencies and packages by running `pnpm install`. This
command will install dependencies and bootstrap the repo using `turborepo`

## Development workflow

In one terminal, run tsdx watch in parallel:

```sh
yarn dev
pnpm dev
```

This builds each package to `<packages>/<package>/dist` and runs the project in
@@ -47,8 +47,8 @@ terminal.

### Tooling

- [Lerna](https://lerna.js.org/) to manage installation of dependencies and
running various scripts. We also have yarn workspaces enabled by default.
- [Turbo](https://turborepo.org/) to manage installation of dependencies and
running various scripts. We also have pnpm workspaces enabled by default.
- [Testing Library](https://testing-library.com/) for testing components and
hooks
- [Nextjs](https://www.nextjs.org/) for a blazing fast documentation website.
@@ -61,10 +61,10 @@ terminal.
You can play with local packages in the Parcel-powered example/playground.

```sh
yarn start:app
pnpm start:app
```

This will start the example/playground on `localhost:1234`. If you have lerna
This will start the example/playground on `localhost:1234`. If you have Turbo
running watch in parallel mode in one terminal, and then you run parcel, your
playground will hot reload when you make changes to any imported module whose
source is inside of `packages/*/src/*`. Note that to accomplish this, each
@@ -81,7 +81,7 @@ Don't forget to setup your IDE with `eslint` and `prettier`.
## Documentation

The documentation site is built with Next.js. If you'd like to contribute to the
docs, simply run `yarn build`, and `yarn docs:dev`
docs, simply run `pnpm build`, and `pnpm docs:dev`

## Making a Pull Request?

@@ -127,19 +127,19 @@ https://www.conventionalcommits.org/ or check out the

3. Make and commit your changes following the
[commit convention](https://github.com/dwarvesf/react-toolkit/blob/master/CONTRIBUTING.md#commit-convention).
As you develop, you can run `yarn pkg <module> build` and
`yarn pkg <module> test` to make sure everything works as expected. Please
note that you might have to run `yarn boot` first in order to build all
As you develop, you can run `pnpm pkgs <module> build` and
`pnpm pkgs <module> test` to make sure everything works as expected. Please
note that you might have to run `pnpm build` first in order to build all
dependencies.

4. Run `yarn changeset` to create a detailed description of your changes. This
4. Run `pnpm changeset` to create a detailed description of your changes. This
will be used to generate a changelog when we publish an update.
[Learn more about Changeset](https://github.com/atlassian/changesets/tree/master/packages/cli).
Please note that you might have to run `git fetch origin main:master` (where
origin will be your fork on GitHub) before `yarn changeset` works.
origin will be your fork on GitHub) before `pnpm changeset` works.

> If you made minor changes like CI config, prettier, etc, you can run
> `yarn changeset add --empty` to generate an empty changeset file to document
> `pnpm changeset add --empty` to generate an empty changeset file to document
> your changes.
### Tests
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# React Toolkit
<h1 align="center">
React Toolkit
</h1>
<p align="center">
<a href="https://github.com/dwarvesf">
<img src="https://img.shields.io/badge/-make%20by%20dwarves-%23e13f5e?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAAD1BMVEUAAAD///////////////+PQt5oAAAABXRSTlMAQL//gOnhmfMAAAAJcEhZcwAAHsIAAB7CAW7QdT4AAACYSURBVHicndLRDYJAEIThMbGAI1qAYAO6bAGXYP81uSGBk+O/h3Mev4dhWJCkYZqreOi1xoh0eSIvoCaBRjc1B9+I31g9Z2aJ5jkOsYScBW8zDerO/fObnY/FiTl3caOEH2nMzpyZhezIlgqXr2OlOX617Up/nHnPUg0+LHl18YO50d3ghOy1ioeIq1ceTypsjpvYeJohfQEE5WtH+OEYkwAAAABJRU5ErkJggg==&&logoColor=white" alt="Dwarves Foundation" />
</a>
<a href="https://discord.gg/dwarvesv">
<img src="https://img.shields.io/badge/-join%20the%20community-%235865F2?style=for-the-badge&logo=discord&&logoColor=white" alt="Dwarves Foundation Discord" />
</a>
</p>

A library of React hooks and utilities for building robust React applications.

37 changes: 37 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# @dwarvesf/react-toolkit-docs

## 0.3.1

### Patch Changes

- Updated dependencies
[[`01bce8c`](https://github.com/dwarvesf/react-toolkit/commit/01bce8cba4145584b5e4e78978e2b7cb2e3bdb22)]:
- @dwarvesf/react-hooks@0.8.2
- @dwarvesf/react-utils@0.4.2

## 0.3.0

### Minor Changes

- [#56](https://github.com/dwarvesf/react-toolkit/pull/56)
[`b4f230f`](https://github.com/dwarvesf/react-toolkit/commit/b4f230f017bc54be899c21165d22d22e2c87a7bb)
Thanks [@zlatanpham](https://github.com/zlatanpham)! - Expose onOpenChange

### Patch Changes

- Updated dependencies
[[`b4f230f`](https://github.com/dwarvesf/react-toolkit/commit/b4f230f017bc54be899c21165d22d22e2c87a7bb)]:
- @dwarvesf/react-hooks@0.8.0

## 0.2.0

### Minor Changes

- [#39](https://github.com/dwarvesf/react-toolkit/pull/39)
[`d4774a9`](https://github.com/dwarvesf/react-toolkit/commit/d4774a969704ce0b012c0c0b455d756d1de75cd7)
Thanks [@tuanddd](https://github.com/tuanddd)! - Add `usePagination` hook

### Patch Changes

- Updated dependencies
[[`d4774a9`](https://github.com/dwarvesf/react-toolkit/commit/d4774a969704ce0b012c0c0b455d756d1de75cd7)]:
- @dwarvesf/react-hooks@0.7.0

## 0.1.3

### Patch Changes
8 changes: 8 additions & 0 deletions docs/configs/docs-sidebar.json
Original file line number Diff line number Diff line change
@@ -69,6 +69,10 @@
{
"title": "useHasMounted",
"path": "/hooks/use-has-mounted"
},
{
"title": "usePagination",
"path": "/hooks/use-pagination"
}
]
},
@@ -99,6 +103,10 @@
{
"title": "cleanChildren",
"path": "/utils/clean-children"
},
{
"title": "sleep",
"path": "/utils/sleep"
}
]
}
Loading