Skip to content

Commit 69026cd

Browse files
committed
chore: 🤖 Semantic release
1 parent 70be467 commit 69026cd

File tree

8 files changed

+3038
-51
lines changed

8 files changed

+3038
-51
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta
8+
- alpha
9+
10+
defaults:
11+
run:
12+
shell: sh
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Wait on tests
20+
uses: lewagon/wait-on-check-action@v1.1.2
21+
with:
22+
ref: ${{ github.ref }}
23+
check-name: "Run tests"
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
wait-interval: 10
26+
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Set up Node
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: "16"
34+
cache: "yarn"
35+
36+
- name: Install packages
37+
run: yarn install --frozen-lockfile
38+
39+
- name: Build
40+
run: yarn build
41+
42+
- name: Publish
43+
run: yarn release
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on: push
4+
5+
jobs:
6+
tests:
7+
name: Run tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: "16"
17+
cache: "yarn"
18+
19+
- name: Install packages
20+
run: yarn install --frozen-lockfile
21+
22+
- name: Build
23+
run: yarn build
24+
25+
- name: Lint
26+
run: yarn lint
27+
28+
- name: Clear Jest
29+
run: yarn jest --clearCache
30+
31+
- name: Test
32+
run: yarn test --coverage
33+
34+
# - name: Send Report
35+
# uses: paambaati/codeclimate-action@v3.0.0
36+
# env:
37+
# CC_TEST_REPORTER_ID: c206a2ed5aa86c7480a13634e91e440a27a98a5d134653f8ea9a7d5f987e68c3
38+
# with:
39+
# coverageLocations: |
40+
# ${{github.workspace}}/packages/core/coverage/lcov.info:lcov
41+
# ${{github.workspace}}/packages/react/coverage/lcov.info:lcov

.releaserc.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
{
5+
"name": "main"
6+
},
7+
{
8+
"name": "beta",
9+
"prerelease": true
10+
},
11+
{
12+
"name": "alpha",
13+
"prerelease": true
14+
}
15+
],
16+
"release": {
17+
"plugins": [
18+
[
19+
"@semantic-release/commit-analyzer",
20+
{
21+
"releaseRules": [
22+
{
23+
"scope": "no-release",
24+
"release": false
25+
},
26+
{
27+
"breaking": true,
28+
"release": "major"
29+
},
30+
{
31+
"type": "feat",
32+
"release": "minor"
33+
},
34+
{
35+
"type": "refactor",
36+
"scope": "core-*",
37+
"release": "minor"
38+
},
39+
{
40+
"type": "*",
41+
"release": "patch"
42+
}
43+
]
44+
}
45+
],
46+
[
47+
"@semantic-release/changelog",
48+
{
49+
"changelogFile": "CHANGELOG.md"
50+
}
51+
],
52+
"@semantic-release/release-notes-generator",
53+
"@semantic-release/npm",
54+
[
55+
"@semantic-release/git",
56+
{
57+
"assets": ["CHANGELOG.md"]
58+
}
59+
],
60+
"@semantic-release/github"
61+
]
62+
}
63+
}

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# React Window Hooks
22

3-
[![NPM](https://img.shields.io/npm/v/@better-typed/react-window-hooks.svg)](https://www.npmjs.com/package/@better-typed/react-window-hooks)
4-
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@better-typed/react-window-hooks)
5-
![npm type definitions](https://img.shields.io/npm/types/@better-typed/react-window-hooks)
6-
![NPM](https://img.shields.io/npm/l/@better-typed/react-window-hooks)
7-
![npm](https://img.shields.io/npm/dm/@better-typed/react-window-hooks)
3+
[![NPM](https://img.shields.io/npm/v/@better-hooks/window.svg)](https://www.npmjs.com/package/@better-hooks/window)
4+
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@better-hooks/window)
5+
![npm type definitions](https://img.shields.io/npm/types/@better-hooks/window)
6+
![NPM](https://img.shields.io/npm/l/@better-hooks/window)
7+
![npm](https://img.shields.io/npm/dm/@better-hooks/window)
88
![GitHub stars](https://img.shields.io/github/stars/BetterTyped/react-window-hooks?style=social)
99

1010
> Handle window events and observe window size
@@ -20,20 +20,20 @@
2020
## Install
2121

2222
```bash
23-
npm install --save @better-typed/react-window-hooks
23+
npm install --save @better-hooks/window
2424
```
2525

2626
or
2727

2828
```bash
29-
yarn add @better-typed/react-window-hooks
29+
yarn add @better-hooks/window
3030
```
3131

3232
## useWindowEvent
3333

3434
```tsx
3535
import React from "react";
36-
import { useWindowEvent } from "@better-typed/react-window-hooks";
36+
import { useWindowEvent } from "@better-hooks/window";
3737

3838
const MyComponent: React.FC = () => {
3939
// Unmounts event with component lifecycle
@@ -50,7 +50,7 @@ const MyComponent: React.FC = () => {
5050

5151
```tsx
5252
import React from "react";
53-
import { useWindowEvent } from "@better-typed/react-window-hooks";
53+
import { useWindowEvent } from "@better-hooks/window";
5454

5555
const MyComponent: React.FC = () => {
5656
// Unmounts event with component lifecycle
@@ -69,7 +69,7 @@ const MyComponent: React.FC = () => {
6969

7070
```tsx
7171
import React from "react";
72-
import { useWindowSize } from "@better-typed/react-window-hooks";
72+
import { useWindowSize } from "@better-hooks/window";
7373

7474
const MyComponent: React.FC = () => {
7575
// Updates with resizing

package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@better-typed/react-window-hooks",
2+
"name": "@better-hooks/window",
33
"version": "0.9.0",
44
"author": "prc5",
55
"license": "MIT",
@@ -45,6 +45,12 @@
4545
"@rollup/plugin-babel": "^5.3.1",
4646
"@rollup/plugin-commonjs": "^22.0.2",
4747
"@rollup/plugin-node-resolve": "^14.1.0",
48+
"@semantic-release/changelog": "^6.0.1",
49+
"@semantic-release/commit-analyzer": "^9.0.2",
50+
"@semantic-release/git": "^10.0.1",
51+
"@semantic-release/github": "^8.0.6",
52+
"@semantic-release/npm": "^9.0.1",
53+
"@semantic-release/release-notes-generator": "^10.0.3",
4854
"@svgr/rollup": "^6.3.1",
4955
"@testing-library/jest-dom": "^5.16.5",
5056
"@testing-library/react": "^13.4.0",
@@ -67,9 +73,9 @@
6773
"rollup-plugin-terser": "^7.0.2",
6874
"rollup-plugin-typescript2": "^0.34.0",
6975
"rollup-plugin-url": "^3.0.1",
76+
"semantic-release": "^19.0.5",
7077
"tslib": "^2.4.0",
71-
"typescript": "^4.8.4",
72-
"yarn-upgrade-all": "^0.7.1"
78+
"typescript": "^4.8.4"
7379
},
7480
"files": [
7581
"dist"
@@ -91,6 +97,7 @@
9197
"useWillUnmount"
9298
],
9399
"dependencies": {
94-
"@better-typed/react-lifecycle-hooks": "^1.0.5"
100+
"@better-typed/react-lifecycle-hooks": "^1.0.5",
101+
"react-spring": "^9.5.5"
95102
}
96103
}

0 commit comments

Comments
 (0)