Skip to content

Commit cac3f8f

Browse files
authored
feat!: upgrade to @rbxts/react (#9)
* refactor: migrate to react-ts * build: set up for publish * fix: support new react binding impl * fix: add default project file * fix: change path to out * fix: rename to pretty-react-hooks * v0.1.2 * build: accept any `react-ts` version * v0.1.3 * ci: use yarn * build: accept any roact version * v0.1.4 * refactor: use ReactRoblox & StrictMode in hoarcekat * v0.2.0 * chore: bump version number * 0.3.0 * fix: add react-roblox to peer deps * v0.3.1 * fix: silence react dev warning * v0.3.2 * chore: merge v3.2.1 from upstream to react (#7) * 3.2.0 * fix: `as const` not required in `joinAnyBindings` * 3.2.1 * v0.3.3 * feat!: upgrade to @rbxts/react * fix(ci): install dependencies * v0.4.0-alpha.0 * v0.4.0 * build: migrate to pnpm * 0.4.1
1 parent 4ce4b13 commit cac3f8f

File tree

70 files changed

+478
-827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+478
-827
lines changed

.eslintrc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@
77
"sourceType": "module",
88
"project": "./tsconfig.json"
99
},
10-
"ignorePatterns": [
11-
"/out"
12-
],
13-
"plugins": [
14-
"@typescript-eslint",
15-
"roblox-ts",
16-
"prettier"
17-
],
10+
"ignorePatterns": ["/out"],
11+
"plugins": ["@typescript-eslint", "roblox-ts", "prettier"],
1812
"extends": [
1913
"eslint:recommended",
2014
"plugin:@typescript-eslint/recommended",
2115
"plugin:roblox-ts/recommended",
2216
"plugin:prettier/recommended"
2317
],
2418
"rules": {
25-
"prettier/prettier": "warn"
19+
"prettier/prettier": "warn",
20+
"@typescript-eslint/no-explicit-any": "off",
21+
"@typescript-eslint/no-unused-vars": "warn"
2622
}
27-
}
23+
}

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: GitHub Checkout
18-
uses: actions/checkout@v3
19-
20-
- name: Setup PNPM
21-
uses: pnpm/action-setup@v2.2.4
17+
- uses: actions/checkout@v4
18+
- uses: pnpm/action-setup@v3
2219
with:
23-
version: 8.6.1
24-
run_install: true
20+
version: 8.15.3
21+
22+
- name: Install Dependencies
23+
run: pnpm install
2524

2625
- name: Run ESLint
2726
run: pnpm eslint src

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/include
44
*.tsbuildinfo
55
.DS_Store
6+
yarn-error.log

.npmignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-linker=hoisted

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"tabWidth": 4,
44
"trailingComma": "all",
55
"useTabs": true
6-
}
6+
}

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-present Richard
3+
Copyright (c) 2024 Littensy
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
## 🌺 [pretty-roact-hooks](https://npmjs.com/package/@rbxts/pretty-roact-hooks)
1+
## 🌺 [pretty-react-hooks](https://npmjs.com/package/@rbxts/pretty-react-hooks)
22

3-
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/littensy/pretty-roact-hooks/ci.yml?branch=master&style=for-the-badge&logo=github)
4-
[![npm version](https://img.shields.io/npm/v/@rbxts/pretty-roact-hooks.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/pretty-roact-hooks)
5-
[![npm downloads](https://img.shields.io/npm/dt/@rbxts/pretty-roact-hooks.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/pretty-roact-hooks)
6-
[![GitHub license](https://img.shields.io/github/license/littensy/pretty-roact-hooks?style=for-the-badge)](LICENSE.md)
3+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/littensy/pretty-react-hooks/ci.yml?branch=master&style=for-the-badge&logo=github)
4+
[![npm version](https://img.shields.io/npm/v/@rbxts/pretty-react-hooks.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/pretty-react-hooks)
5+
[![npm downloads](https://img.shields.io/npm/dt/@rbxts/pretty-react-hooks.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/pretty-react-hooks)
6+
[![GitHub license](https://img.shields.io/github/license/littensy/pretty-react-hooks?style=for-the-badge)](LICENSE.md)
77

8-
An opinionated collection of useful hooks and utilites for Roblox-TS and [Roact Hooked](https://github.com/littensy/rbxts-roact-hooked/).
8+
An opinionated collection of useful hooks and utilites for Roblox-TS and [React TS](https://github.com/littensy/rbxts-react).
99

10-
Every hook has documentation and tests. If you find a bug or have a feature request, please [open an issue](https://github.com/littensy/pretty-roact-hooks/issues/new/).
10+
If you find a bug or have a feature request, please [open an issue](https://github.com/littensy/pretty-react-hooks/issues/new/).
1111

1212
 
1313

@@ -21,8 +21,7 @@ Check out some featured hooks:
2121

2222
This package also exports some useful utilities:
2323

24-
- [🧪 `renderHook`](src/utils/testez.tsx) - Render a hook in a test environment
25-
- [📕 `hoarcekat`](src/utils/hoarcekat.tsx) - Create a Hoarcekat story with hook detection
24+
- [📕 `hoarcekat`](src/utils/hoarcekat.tsx) - Create a Hoarcekat story
2625
- [📦 `binding utils`](src/utils/binding.ts) - Work with values that may or may not be bindings
2726

2827
Or, see the [full list of hooks](src/).
@@ -31,16 +30,12 @@ Or, see the [full list of hooks](src/).
3130

3231
## 📦 Installation
3332

34-
This package is available for Roblox TypeScript projects on [NPM](https://www.npmjs.com/package/@rbxts/pretty-roact-hooks).
33+
This package is available for Roblox TypeScript projects on [NPM](https://www.npmjs.com/package/@rbxts/pretty-react-hooks).
3534

3635
```sh
37-
npm install @rbxts/pretty-roact-hooks @rbxts/flipper @rbxts/roact-hooked
38-
```
39-
40-
or
41-
42-
```sh
43-
pnpm add @rbxts/pretty-roact-hooks @rbxts/flipper @rbxts/roact-hooked
36+
npm install @rbxts/pretty-react-hooks
37+
yarn add @rbxts/pretty-react-hooks
38+
pnpm add @rbxts/pretty-react-hooks
4439
```
4540

4641
 
@@ -49,10 +44,10 @@ pnpm add @rbxts/pretty-roact-hooks @rbxts/flipper @rbxts/roact-hooked
4944

5045
Contributions are welcome! Note that if you make a change to a hook, you should also check the tests and documentation.
5146

52-
To get started, clone the repository and run `npm install` or `pnpm install`. Then, you can run the following commands:
47+
To get started, clone the repository and run `pnpm install`. Then, you can run the following commands:
5348

54-
- `pnpm dev` - Enable watch mode with the `game` project type
55-
- `pnpm build` - Build the package
49+
- `pnpm dev` - Enable watch mode with support for TestEZ Companion
50+
- `pnpm build` - Compile the package's `out` directory
5651

5752
You will likely need the following extensions:
5853

@@ -63,4 +58,4 @@ You will likely need the following extensions:
6358

6459
## 📝 License
6560

66-
pretty-roact-hooks is licensed under the [MIT License](LICENSE.md).
61+
pretty-react-hooks is licensed under the [MIT License](LICENSE.md).

aftman.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
# To add a new tool, add an entry to this table.
55
[tools]
6-
rojo = "rojo-rbx/rojo@7.3.0"
6+
rojo = "rojo-rbx/rojo@7.4.0"
77
# rojo = "rojo-rbx/rojo@6.2.0"

default.project.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "pretty-react-hooks",
3+
"tree": {
4+
"$path": "out/"
5+
}
6+
}

0 commit comments

Comments
 (0)