Skip to content

Commit 1faa7a5

Browse files
committed
feat: add lerna
1 parent 21e6d07 commit 1faa7a5

File tree

1,106 files changed

+5484
-2380
lines changed

Some content is hidden

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

1,106 files changed

+5484
-2380
lines changed

.eslintrc.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@
1818
"allow": [],
1919
"depConstraints": [
2020
{
21-
"sourceTag": "*",
22-
"onlyDependOnLibsWithTags": ["*"]
21+
"sourceTag": "scope:shared",
22+
"onlyDependOnLibsWithTags": ["scope:shared"]
23+
},
24+
{
25+
"sourceTag": "scope:icons",
26+
"onlyDependOnLibsWithTags": ["scope:shared", "scope:icons"]
27+
},
28+
{
29+
"sourceTag": "scope:ui",
30+
"onlyDependOnLibsWithTags": ["scope:shared", "scope:icons", "scope:ui"]
31+
},
32+
{
33+
"sourceTag": "scope:site",
34+
"onlyDependOnLibsWithTags": ["scope:shared", "scope:icons", "scope:ui", "scope:site"]
2335
}
2436
]
2537
}
@@ -43,6 +55,12 @@
4355
},
4456
"warnOnUnassignedImports": true
4557
}
58+
],
59+
"react-hooks/exhaustive-deps": [
60+
"warn",
61+
{
62+
"additionalHooks": "(useIsomorphicLayoutEffect)"
63+
}
4664
]
4765
}
4866
},

.github/workflows/tagged-release.yml

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

.stylelintrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828
{
2929
"files": ["*.scss", "**/*.scss"],
3030
"rules": {
31-
"function-no-unknown": null
31+
"function-no-unknown": null,
32+
"annotation-no-unknown": [
33+
true,
34+
{
35+
"ignoreAnnotations": ["default", "global"]
36+
}
37+
]
3238
}
3339
},
3440
{

.versionrc

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

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44

55
const message = process.env['HUSKY_GIT_PARAMS'];
66
const types = ['feat', 'fix', 'chore', 'docs', 'style', 'refactor', 'perf', 'test'];
7-
const scopes = ['site', 'ui'];
7+
const scopes = ['hooks', 'icons', 'site', 'ui', 'utils'];
88

99
function parseMessage(message) {
1010
const PATTERN = /^(\w*)(?:\((.*)\))?!?: (.*)$/;
File renamed without changes.

lerna.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"useNx": true,
4+
"useWorkspaces": true,
5+
"version": "0.0.0",
6+
"command": {
7+
"version": {
8+
"conventionalCommits": true,
9+
"message": "chore: release %v",
10+
"createRelease": "github"
11+
},
12+
"publish": {
13+
"yes": true
14+
}
15+
}
16+
}

package.json

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2+
"private": true,
23
"name": "react-devui",
34
"version": "0.0.0",
45
"license": "MIT",
56
"description": "React Component Library",
67
"homepage": "https://github.com/xiejay97/react-devui",
7-
"private": true,
88
"engines": {
99
"node": "14.x || 16.x",
1010
"yarn": ">=1.22.4 <2",
1111
"npm": "Please use yarn instead of NPM to install dependencies"
1212
},
1313
"scripts": {
1414
"site:serve": "nx serve site",
15-
"lint:affected": "nx affected --target=lint --parallel=2",
15+
"lint:affected": "nx affected --target=lint --parallel=5",
1616
"lint:affected:fix": "yarn lint:affected --fix",
1717
"lint:style": "stylelint **/*.{css,scss,html,md}",
1818
"lint:style:fix": "yarn lint:style --fix",
19-
"test:affected": "nx affected --target=test --parallel=2",
20-
"build:affected": "nx affected --target=build --parallel=2",
19+
"test:affected": "nx affected --target=test --parallel=5",
20+
"build:affected": "nx affected --target=build --parallel=5",
2121
"build:ui": "nx build ui",
2222
"build:site": "nx build site",
2323
"build:executors": "tsc --project tools/tsconfig.json",
2424
"build:helper": "node ./tools/ui-helper.js",
2525
"build:icons": "node ./tools/ui-icons.js",
26-
"release": "standard-version",
26+
"check-update": "yarn upgrade-interactive --latest",
2727
"prepare": "husky install && chmod ug+x .husky/*",
28-
"prepublishOnly": "nx build ui",
29-
"check-update": "yarn upgrade-interactive --latest"
28+
"prepublishOnly": "nx run-many --all --target=build --parallel=5 --exclude=site",
29+
"version": "npx prettier lerna.json --write"
3030
},
3131
"dependencies": {
3232
"@ant-design/icons-svg": "^4.2.1",
3333
"core-js": "^3.24.1",
34-
"dayjs": "^1.11.4",
34+
"dayjs": "^1.11.5",
3535
"highlight.js": "^11.6.0",
36-
"i18next": "^21.8.16",
36+
"i18next": "^21.9.0",
3737
"immer": "^9.0.15",
3838
"lodash": "^4.17.21",
3939
"marked": "^4.0.18",
@@ -50,33 +50,33 @@
5050
"devDependencies": {
5151
"@commitlint/cli": "^17.0.3",
5252
"@commitlint/config-conventional": "^17.0.3",
53-
"@nrwl/cli": "13.8.8",
54-
"@nrwl/eslint-plugin-nx": "13.8.8",
55-
"@nrwl/jest": "13.8.8",
56-
"@nrwl/linter": "13.8.8",
57-
"@nrwl/nx-cloud": "13.1.6",
58-
"@nrwl/react": "13.8.8",
59-
"@nrwl/tao": "13.8.8",
60-
"@nrwl/web": "13.8.8",
61-
"@nrwl/workspace": "13.8.8",
53+
"@nrwl/cli": "14.5.6",
54+
"@nrwl/eslint-plugin-nx": "14.5.6",
55+
"@nrwl/jest": "14.5.6",
56+
"@nrwl/linter": "14.5.6",
57+
"@nrwl/nx-cloud": "14.3.0",
58+
"@nrwl/react": "14.5.6",
59+
"@nrwl/tao": "14.5.6",
60+
"@nrwl/web": "14.5.6",
61+
"@nrwl/workspace": "14.5.6",
6262
"@testing-library/jest-dom": "^5.16.5",
6363
"@testing-library/react": "13.3.0",
6464
"@testing-library/react-hooks": "^8.0.1",
6565
"@types/fs-extra": "^9.0.13",
6666
"@types/jest": "^28.1.6",
6767
"@types/lodash": "^4.14.182",
6868
"@types/marked": "^4.0.3",
69-
"@types/node": "^18.6.4",
70-
"@types/react": "^18.0.16",
69+
"@types/node": "^18.7.3",
70+
"@types/react": "^18.0.17",
7171
"@types/react-dom": "^18.0.6",
72-
"@typescript-eslint/eslint-plugin": "^5.32.0",
73-
"@typescript-eslint/parser": "^5.32.0",
72+
"@typescript-eslint/eslint-plugin": "^5.33.0",
73+
"@typescript-eslint/parser": "^5.33.0",
7474
"babel-jest": "^28.1.3",
7575
"dotenv": "^16.0.1",
76-
"eslint": "^8.21.0",
76+
"eslint": "^8.22.0",
7777
"eslint-config-prettier": "^8.5.0",
7878
"eslint-plugin-import": "^2.26.0",
79-
"eslint-plugin-jsdoc": "^39.3.4",
79+
"eslint-plugin-jsdoc": "^39.3.6",
8080
"eslint-plugin-jsx-a11y": "^6.6.1",
8181
"eslint-plugin-markdown": "^3.0.0",
8282
"eslint-plugin-prettier": "^4.2.1",
@@ -86,22 +86,25 @@
8686
"fs-extra": "^10.1.0",
8787
"husky": "^8.0.1",
8888
"jest": "^28.1.3",
89+
"lerna": "^5.4.2",
8990
"postcss-html": "^1.5.0",
9091
"postcss-markdown": "^1.2.0",
9192
"prettier": "^2.7.1",
9293
"react-test-renderer": "^18.2.0",
9394
"rxjs-for-await": "^1.0.0",
94-
"sass": "^1.54.3",
95-
"standard-version": "^9.5.0",
96-
"stylelint": "^14.9.1",
95+
"sass": "^1.54.4",
96+
"stylelint": "^14.10.0",
9797
"stylelint-config-prettier": "^9.0.3",
9898
"stylelint-config-recess-order": "^3.0.0",
9999
"stylelint-config-recommended-scss": "^7.0.0",
100-
"stylelint-config-standard": "^26.0.0",
100+
"stylelint-config-standard": "^27.0.0",
101101
"stylelint-scss": "^4.3.0",
102-
"ts-jest": "^28.0.7",
102+
"ts-jest": "^28.0.8",
103103
"ts-node": "^10.9.1",
104104
"typescript": "~4.7.4",
105105
"yaml-front-matter": "^4.1.1"
106-
}
106+
},
107+
"workspaces": [
108+
"packages/*"
109+
]
107110
}

packages/hooks/.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
[
4+
"@nrwl/react/babel",
5+
{
6+
"runtime": "automatic",
7+
"useBuiltIns": "usage"
8+
}
9+
]
10+
],
11+
"plugins": []
12+
}

packages/hooks/.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)