Skip to content

Commit c26c76a

Browse files
authored
[🚑️]: Hotfix critical bugs (#89)
* Fix an issue related to the accessibility name being calculated wrong * Update github files * Fix an issue with `document is not defined` * Update `README.md` * Add `semver` * Updating contributing docs * Opt-in `semver` * Update pnpm version * Remove `packageManager`
1 parent 78aa444 commit c26c76a

File tree

11 files changed

+3907
-3187
lines changed

11 files changed

+3907
-3187
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ Choose the right checklist for the change that you're making:
1616
- [ ] Tests added
1717
- [ ] Documentation added
1818
- [ ] Telemetry added. In case of a feature if it's used or not.
19-
20-
## Documentation / Examples
21-
22-
- [ ] Make sure the linting passes by running `yarn lint`

.github/workflows/development.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: pnpm/action-setup@v3
2121
with:
22-
version: 8
22+
version: 9
2323

2424
- uses: actions/setup-node@v4
2525
with:
@@ -43,7 +43,7 @@ jobs:
4343
- name: "🔧 setup pnpm"
4444
uses: pnpm/action-setup@v3
4545
with:
46-
version: 8
46+
version: 9
4747

4848
- name: "🔧 setup node"
4949
uses: actions/setup-node@v4

.github/workflows/npm-publish.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: pnpm/action-setup@v3
1414
with:
15-
version: 8
15+
version: 9
1616

1717
- uses: actions/setup-node@v4
1818
with:
@@ -25,17 +25,37 @@ jobs:
2525
- name: "🧱 build package"
2626
run: pnpm build
2727

28+
- name: "🗄️ archive package"
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: dist
32+
path: dist
33+
2834
publish-npm:
2935
needs: build
3036
runs-on: ubuntu-latest
3137
steps:
3238
- uses: actions/checkout@v4
3339

40+
- uses: pnpm/action-setup@v3
41+
with:
42+
version: 9
43+
3444
- uses: actions/setup-node@v4
3545
with:
3646
node-version: 20
47+
cache: "pnpm"
3748
registry-url: https://registry.npmjs.org/
3849

50+
- name: "📦 install dependencies"
51+
run: pnpm install
52+
53+
- name: "🚚 download package"
54+
uses: actions/download-artifact@v4
55+
with:
56+
name: dist
57+
path: dist
58+
3959
- name: "🚀 publish package"
4060
run: npx tsx ./scripts/ci/publish-package.ts
4161
env:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following is a set of guidelines for contributing to StylelessUi and its pac
66

77
## Code of Conduct
88

9-
This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/styleless-ui/react-styleless-ui/blob/next/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
9+
This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/styleless-ui/react-styleless-ui/blob/stable/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
1010

1111
## A large spectrum of contributions
1212

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ Our project [roadmap](https://github.com/orgs/styleless-ui/projects/1/views/1?vi
1818

1919
## Contributing
2020

21-
Read the [contributing guide](https://github.com/styleless-ui/react-styleless-ui/blob/next/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
21+
Read the [contributing guide](https://github.com/styleless-ui/react-styleless-ui/blob/stable/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
2222

2323
Contributing to styleless-ui is about more than just issues and pull requests! There are many other ways to support the project beyond contributing to the code base.
2424

25-
2625
## License
2726

28-
This project is licensed under the terms of the [MIT license](https://github.com/styleless-ui/react-styleless-ui/blob/next/LICENSE).
27+
This project is licensed under the terms of the [MIT license](https://github.com/styleless-ui/react-styleless-ui/blob/stable/LICENSE).

lib/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const ButtonBase = <
113113
(node as HTMLButtonElement).disabled = disabled;
114114
}
115115

116-
const accessibleName = computeAccessibleName(node);
116+
const accessibleName = computeAccessibleName(node, { hidden: true });
117117

118118
if (!accessibleName) {
119119
logger(

lib/Dialog/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const DialogBase = (props: Props, ref: React.Ref<HTMLDivElement>) => {
120120

121121
const context: DialogContextValue = { open, role, emitClose };
122122

123-
if (document) {
123+
if (typeof document !== "undefined") {
124124
// eslint-disable-next-line react-hooks/rules-of-hooks
125125
useEventListener(
126126
{

lib/Toggle/Toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const ToggleBase = (props: Props, ref: React.Ref<HTMLButtonElement>) => {
160160

161161
if (!node) return;
162162

163-
const accessibleName = computeAccessibleName(node);
163+
const accessibleName = computeAccessibleName(node, { hidden: true });
164164

165165
if (!accessibleName) {
166166
logger(

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@styleless-ui/react",
3-
"version": "1.0.0-rc.0",
3+
"version": "1.0.0-rc.1",
44
"description": "Completely unstyled, headless and accessible React UI components.",
55
"author": "mimshins <mostafa.sh.coderino@gmail.com>",
66
"license": "MIT",
@@ -14,8 +14,7 @@
1414
},
1515
"publishConfig": {
1616
"access": "public",
17-
"registry": "https://registry.npmjs.org/",
18-
"tag": "rc"
17+
"registry": "https://registry.npmjs.org/"
1918
},
2019
"keywords": [
2120
"ui",
@@ -53,6 +52,7 @@
5352
"@types/react": "^18.2.70",
5453
"@types/react-dom": "^18.2.22",
5554
"@types/react-is": "^18.2.4",
55+
"@types/semver": "^7.5.8",
5656
"@typescript-eslint/eslint-plugin": "^7.3.1",
5757
"@typescript-eslint/parser": "^7.3.1",
5858
"classnames": "^2.5.1",
@@ -75,6 +75,7 @@
7575
"react": "^18.2.0",
7676
"react-dom": "^18.2.0",
7777
"rimraf": "^5.0.5",
78+
"semver": "^7.6.0",
7879
"terser": "^5.29.2",
7980
"ts-jest": "^29.1.2",
8081
"tsx": "^4.7.1",

0 commit comments

Comments
 (0)