Skip to content

Commit 355b667

Browse files
chore: add release it (#1546)
* chore: add release-it * chore: basic release it setup * chore: reorder package.json sections
1 parent edf52b6 commit 355b667

File tree

3 files changed

+1631
-96
lines changed

3 files changed

+1631
-96
lines changed

.release-it.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore: release ${version}",
4+
"tagName": "v${version}"
5+
},
6+
"npm": {
7+
"publish": true
8+
},
9+
"github": {
10+
"release": true
11+
},
12+
"plugins": {
13+
"@release-it/conventional-changelog": {
14+
"preset": "angular"
15+
}
16+
}
17+
}

package.json

+38-33
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@
2323
"test",
2424
"integration"
2525
],
26+
"scripts": {
27+
"clean": "del build",
28+
"test": "jest",
29+
"test:ci": "jest --maxWorkers=2 --collectCoverage=true --coverage-provider=v8",
30+
"test:react-17": "scripts/test_react_17",
31+
"typecheck": "tsc",
32+
"flow": "flow",
33+
"copy-flowtypes": "cp typings/index.flow.js build",
34+
"lint": "eslint src --cache",
35+
"validate": "yarn lint && yarn typecheck && yarn test",
36+
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
37+
"build:js:watch": "yarn build:js --watch",
38+
"build:ts": "tsc --build tsconfig.release.json",
39+
"build:ts:watch": "yarn build:ts --watch --preserveWatchOutput",
40+
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
41+
"prepare": "yarn build",
42+
"prepublish": "yarn build",
43+
"publish": "release-it"
44+
},
2645
"files": [
2746
"build/",
2847
"jest-preset/",
@@ -33,6 +52,22 @@
3352
"dont-cleanup-after-each.js",
3453
"typings/index.flow.js"
3554
],
55+
"dependencies": {
56+
"jest-matcher-utils": "^29.7.0",
57+
"pretty-format": "^29.7.0",
58+
"redent": "^3.0.0"
59+
},
60+
"peerDependencies": {
61+
"jest": ">=28.0.0",
62+
"react": ">=16.8.0",
63+
"react-native": ">=0.59",
64+
"react-test-renderer": ">=16.8.0"
65+
},
66+
"peerDependenciesMeta": {
67+
"jest": {
68+
"optional": true
69+
}
70+
},
3671
"devDependencies": {
3772
"@babel/cli": "^7.23.4",
3873
"@babel/core": "^7.23.3",
@@ -57,42 +92,12 @@
5792
"react": "18.2.0",
5893
"react-native": "0.72.7",
5994
"react-test-renderer": "18.2.0",
95+
"release-it": "^17.0.1",
6096
"strip-ansi": "^6.0.1",
6197
"typescript": "^5.3.2"
6298
},
63-
"dependencies": {
64-
"jest-matcher-utils": "^29.7.0",
65-
"pretty-format": "^29.7.0",
66-
"redent": "^3.0.0"
67-
},
68-
"peerDependencies": {
69-
"jest": ">=28.0.0",
70-
"react": ">=16.8.0",
71-
"react-native": ">=0.59",
72-
"react-test-renderer": ">=16.8.0"
73-
},
74-
"peerDependenciesMeta": {
75-
"jest": {
76-
"optional": true
77-
}
78-
},
79-
"scripts": {
80-
"clean": "del build",
81-
"test": "jest",
82-
"test:ci": "jest --maxWorkers=2 --collectCoverage=true --coverage-provider=v8",
83-
"test:react-17": "scripts/test_react_17",
84-
"typecheck": "tsc",
85-
"flow": "flow",
86-
"copy-flowtypes": "cp typings/index.flow.js build",
87-
"lint": "eslint src --cache",
88-
"validate": "yarn lint && yarn typecheck && yarn test",
89-
"prepublish": "yarn build",
90-
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
91-
"build:js:watch": "yarn build:js --watch",
92-
"build:ts": "tsc --build tsconfig.release.json",
93-
"build:ts:watch": "yarn build:ts --watch --preserveWatchOutput",
94-
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
95-
"prepare": "yarn build"
99+
"publishConfig": {
100+
"registry": "https://registry.npmjs.org"
96101
},
97102
"packageManager": "[email protected]"
98103
}

0 commit comments

Comments
 (0)