Skip to content

Commit 39f5f00

Browse files
authored
Merge branch 'react-component:master' into master
2 parents 91437a2 + 10c5697 commit 39f5f00

Some content is hidden

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

59 files changed

+867
-1156
lines changed
Lines changed: 5 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,6 @@
1-
name: CI
2-
3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
8-
1+
name: ✅ test
2+
on: [push, pull_request]
93
jobs:
10-
setup:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: checkout
14-
uses: actions/checkout@master
15-
16-
- uses: actions/setup-node@v1
17-
with:
18-
node-version: '12'
19-
20-
- name: cache package-lock.json
21-
uses: actions/cache@v2
22-
with:
23-
path: package-temp-dir
24-
key: lock-${{ github.sha }}
25-
26-
- name: create package-lock.json
27-
run: npm i --package-lock-only
28-
29-
- name: hack for singe file
30-
run: |
31-
if [ ! -d "package-temp-dir" ]; then
32-
mkdir package-temp-dir
33-
fi
34-
cp package-lock.json package-temp-dir
35-
36-
- name: cache node_modules
37-
id: node_modules_cache_id
38-
uses: actions/cache@v2
39-
with:
40-
path: node_modules
41-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
42-
43-
- name: install
44-
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
45-
run: npm ci
46-
47-
lint:
48-
runs-on: ubuntu-latest
49-
needs: setup
50-
steps:
51-
- name: checkout
52-
uses: actions/checkout@master
53-
54-
- name: restore cache from package-lock.json
55-
uses: actions/cache@v2
56-
with:
57-
path: package-temp-dir
58-
key: lock-${{ github.sha }}
59-
60-
- name: restore cache from node_modules
61-
uses: actions/cache@v2
62-
with:
63-
path: node_modules
64-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
65-
66-
- name: lint
67-
run: npm run lint
68-
69-
compile:
70-
runs-on: ubuntu-latest
71-
needs: setup
72-
steps:
73-
- name: checkout
74-
uses: actions/checkout@master
75-
76-
- name: restore cache from package-lock.json
77-
uses: actions/cache@v2
78-
with:
79-
path: package-temp-dir
80-
key: lock-${{ github.sha }}
81-
82-
- name: restore cache from node_modules
83-
uses: actions/cache@v2
84-
with:
85-
path: node_modules
86-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
87-
88-
- name: compile
89-
run: npm run compile
90-
91-
coverage:
92-
runs-on: ubuntu-latest
93-
needs: setup
94-
steps:
95-
- name: checkout
96-
uses: actions/checkout@master
97-
98-
- name: restore cache from package-lock.json
99-
uses: actions/cache@v2
100-
with:
101-
path: package-temp-dir
102-
key: lock-${{ github.sha }}
103-
104-
- name: restore cache from node_modules
105-
uses: actions/cache@v2
106-
with:
107-
path: node_modules
108-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
109-
110-
- name: coverage
111-
run: npm run coverage && bash <(curl -s https://codecov.io/bash)
4+
test:
5+
uses: react-component/rc-test/.github/workflows/test-npm.yml@main
6+
secrets: inherit

.github/workflows/site-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: setup node
1919
uses: actions/setup-node@v1
2020
with:
21-
node-version: 14
21+
node-version: 20
2222

2323
- name: create package-lock.json
2424
run: npm i --package-lock-only --ignore-scripts

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ node_modules
2424
build
2525
lib
2626
coverage
27-
yarn.lock
2827
/es/
2928
package-lock.json
29+
pnpm-lock.yaml
30+
yarn.lock
3031
.doc
32+
bun.lockb
3133

3234
# umi
3335
.umi

now.json

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

package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "rc-util",
3-
"version": "5.39.1",
2+
"name": "@rc-component/util",
3+
"version": "1.3.0",
44
"description": "Common Utils For React Component",
55
"keywords": [
66
"react",
@@ -25,9 +25,9 @@
2525
"build": "dumi build",
2626
"compile": "father build",
2727
"coverage": "npm test -- --coverage",
28-
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .js",
28+
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .tsx,.ts",
2929
"prepare": "husky install",
30-
"prepublishOnly": "npm run compile && np --yolo --no-publish",
30+
"prepublishOnly": "npm run compile && rc-np",
3131
"start": "dumi dev",
3232
"test": "rc-test"
3333
},
@@ -38,36 +38,40 @@
3838
]
3939
},
4040
"dependencies": {
41-
"@babel/runtime": "^7.18.3",
41+
"is-mobile": "^5.0.0",
4242
"react-is": "^18.2.0"
4343
},
4444
"devDependencies": {
45-
"@rc-component/father-plugin": "1.0.0",
46-
"@testing-library/react": "^14.1.2",
45+
"@rc-component/father-plugin": "^2.0.1",
46+
"@rc-component/np": "^1.0.3",
47+
"@testing-library/react": "^16.0.0",
4748
"@types/jest": "^29.4.0",
49+
"@types/node": "^22.5.5",
4850
"@types/react": "^18.0.0",
4951
"@types/react-dom": "^18.0.0",
52+
"@types/react-is": "^19.0.0",
5053
"@types/responselike": "^1.0.0",
5154
"@types/warning": "^3.0.0",
5255
"@umijs/fabric": "^3.0.0",
53-
"create-react-class": "^15.6.3",
5456
"cross-env": "^7.0.2",
5557
"dumi": "^2.1.3",
5658
"eslint": "^8.54.0",
57-
"eslint-plugin-jest": "^27.6.0",
58-
"eslint-plugin-unicorn": "^50.0.1",
59+
"eslint-plugin-jest": "^28.2.0",
60+
"eslint-plugin-unicorn": "^56.0.1",
5961
"father": "^4.1.3",
6062
"glob": "^9.2.1",
61-
"husky": "^8.0.3",
63+
"husky": "^9.1.6",
6264
"lint-staged": "^15.1.0",
63-
"np": "^9.0.0",
65+
"prettier": "^3.3.2",
6466
"rc-test": "^7.0.14",
6567
"react": "^18.0.0",
68+
"react-19": "npm:react@19.0.0",
6669
"react-dom": "^18.0.0",
70+
"react-dom-19": "npm:react-dom@19.0.0",
6771
"typescript": "^5.3.2"
6872
},
6973
"peerDependencies": {
70-
"react": ">=16.9.0",
71-
"react-dom": ">=16.9.0"
74+
"react": ">=18.0.0",
75+
"react-dom": ">=18.0.0"
7276
}
7377
}

src/Children/mapSelf.js

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

src/Children/toArray.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import isFragment from '../React/isFragment';
12
import React from 'react';
2-
import { isFragment } from 'react-is';
33

44
export interface Option {
55
keepEmpty?: boolean;

src/ContainerRender.js

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

src/Dom/addEventListener.js

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

src/Dom/class.js

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

0 commit comments

Comments
 (0)