Skip to content

Commit 68af5ca

Browse files
author
Alok Kumar
committed
IV [ENHANCE] -> updated to support every version of react/next
1 parent 61ecd87 commit 68af5ca

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Package to NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Run tests
24+
run: npm test
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Publish to NPM
30+
run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@th3hero/input-validator",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"type": "module",
55
"description": "A validation module for frontend in react.js & next.js where we will be validating the user input as per the requirement weather they are required, string, integer, boolean etc. with state management for errors in useState purely built on typescript.",
66
"main": "dist/index.js",
@@ -35,7 +35,7 @@
3535
"moment": "^2.30.1"
3636
},
3737
"peerDependencies": {
38-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
38+
"react": "*"
3939
},
4040
"devDependencies": {
4141
"@babel/preset-env": "^7.27.2",

0 commit comments

Comments
 (0)