Skip to content

Commit a6fa2e5

Browse files
⚙️ Chore(enviroment,oh-my-error): remove unnecessary scripts, make some changes and #2 implementation
1 parent 39284f1 commit a6fa2e5

File tree

3 files changed

+70
-31
lines changed

3 files changed

+70
-31
lines changed

package.json

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
11
{
2-
"name": "oh-my-error-monorepo",
3-
"version": "0.0.0",
2+
"name": "@monorepo/oh-my-error",
43
"private": true,
5-
"description": "",
6-
"main": "index.js",
74
"scripts": {
8-
"dev": "turbo dev",
9-
"build": "turbo build",
10-
"build:npm": "turbo build:npm",
11-
"start": "turbo start",
5+
"------------------------INSTALLATION-------------------": "",
6+
"preinstall": "husky init",
7+
"prepare": "husky",
8+
"pre": "turbo pre",
9+
"pre:husky": "git add . && lint-staged",
10+
"------------------------UTILS--------------------------": "",
1211
"lint": "turbo lint",
1312
"lint:fix": "turbo lint:fix",
14-
"lint:test": "turbo lint:fix",
13+
"lint:next": "turbo lint:next",
14+
"lint:test": "turbo lint:test",
1515
"format": "turbo format",
16-
"bench": "turbo bench",
1716
"clean": "turbo clean",
17+
"link-cli": "turbo link-cli",
18+
"link-cli:dev": "turbo link-cli",
19+
"unlink-cli:dev": "turbo link-cli",
20+
"------------------------BUILDS-------------------------": "",
21+
"dev": "turbo dev",
22+
"build": "turbo build",
23+
"build:dev": "turbo build:dev",
24+
"build:prod": "turbo build:prod",
25+
"build:npm": "turbo build:npm",
26+
"------------------------DEPLOYS------------------------": "",
27+
"start:dev": "turbo start:dev",
28+
"start:prod": "turbo start:prod",
1829
"npm:prepack": "turbo npm:prepack",
1930
"npm:postpack": "turbo npm:postpack",
2031
"npm:version": "changeset version",
2132
"npm:publish": "changeset publish",
22-
"preinstall": "husky init",
23-
"pre": "turbo pre",
24-
"pre:husky": "git add . && lint-staged",
25-
"prepare": "husky",
26-
"test": "turbo test"
33+
"------------------------TESTS--------------------------": "",
34+
"test": "turbo test",
35+
"bench": "turbo bench"
2736
},
2837
"devDependencies": {
2938
"commitsmile": "^0.6.1",
@@ -40,5 +49,5 @@
4049
"lint-staged": {
4150
"*": ""
4251
},
43-
"packageManager": "pnpm@9.4.0"
52+
"packageManager": "pnpm@9.15.9"
4453
}

packages/oh-my-error/package.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "oh-my-error",
33
"version": "2.0.1",
44
"description": "A simple error handler for nodejs",
5+
"type": "module",
6+
"license": "MIT",
57
"keywords": [
68
"error",
79
"handler",
@@ -15,8 +17,6 @@
1517
"url": "https://github.com/INeedJobToStartWork/MyError",
1618
"directory": "packages/oh-my-error"
1719
},
18-
"license": "MIT",
19-
"type": "module",
2020
"exports": {
2121
".": {
2222
"types": {
@@ -29,20 +29,26 @@
2929
}
3030
},
3131
"scripts": {
32-
"build": "pnpm tsup --config ./config/tsuprc/tsup.prod.ts",
33-
"build:npm": "pnpm npm:prepack && pnpm tsup --config ./config/tsuprc/tsup.prod.ts && pnpm npm:postpack",
34-
"dev": "pnpm tsup --config ./config/tsuprc/tsup.dev.ts",
35-
"format": "pnpm prettier . --write && pnpm prettier . --check",
36-
"preinstall": "husky install",
32+
"------------------------INSTALLATION-------------------": "",
33+
"preinstall": "husky init",
34+
"pre": "npx lint-staged",
35+
"pre:husky": "git add . && lint-staged",
36+
"------------------------UTILS--------------------------": "",
3737
"lint": "eslint .",
3838
"lint:fix": "eslint . --fix",
39+
"format": "pnpm prettier . --write && pnpm prettier . --check",
40+
"clean": "turbo clean",
41+
"------------------------BUILDS-------------------------": "",
42+
"build:prod": "pnpm tsup --config ./config/tsuprc/tsup.prod.ts",
43+
"build:npm": "pnpm npm:prepack && pnpm tsup --config ./config/tsuprc/tsup.prod.ts && pnpm npm:postpack",
44+
"build:dev": "pnpm tsup --config ./config/tsuprc/tsup.dev.ts",
45+
"------------------------DEPLOYS------------------------": "",
46+
"prepublishOnly": "pnpm build:npm",
3947
"npm:postpack": "clean-package restore",
4048
"npm:prepack": "clean-package",
41-
"pre": "npx lint-staged",
42-
"pre:husky": "git add . && npx lint-staged",
43-
"prepublishOnly": "pnpm build:npm",
44-
"start": "node ./dist/index.cjs",
45-
"test": "pnpm vitest"
49+
"------------------------TESTS--------------------------": "",
50+
"test": "pnpm vitest",
51+
"bench": "turbo bench // added for benchmarking"
4652
},
4753
"lint-staged": {
4854
"*": [
@@ -68,7 +74,7 @@
6874
"typescript": "5.3.2",
6975
"vitest": "^2.1.1"
7076
},
71-
"packageManager": "pnpm@9.4.0",
77+
"packageManager": "pnpm@10.9.0",
7278
"engines": {
7379
"node": ">=20"
7480
},

turbo.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,51 @@
22
"$schema": "https://turbo.build/schema.json",
33
"tasks": {
44
"pre": {},
5-
"start": {},
5+
"start": {
6+
"outputs": []
7+
},
8+
"start:dev": {
9+
"outputs": []
10+
},
11+
"start:prod": {
12+
"outputs": []
13+
},
614
"bench": {},
715
"build": {},
16+
"build:dev": {
17+
"outputs": ["dist/**"]
18+
},
19+
"build:prod": {
20+
"outputs": ["dist/**"]
21+
},
822
"build:npm": {
923
"inputs": ["*", "!dist"]
1024
},
1125
"test": {},
1226
"lint": {},
13-
"lint:test": {},
1427
"lint:fix": {},
28+
"lint:test": {},
29+
"lint:next": {},
1530
"link-cli": {},
1631
"link-cli:dev": {},
1732
"unlink-cli": {},
1833
"unlink-cli:dev": {},
1934
"format": {},
35+
"clean": {
36+
"cache": false
37+
},
2038
"npm:prepack": {},
2139
"npm:postpack": {},
2240
"prepublishOnly": {},
2341
"dev": {
2442
"cache": false,
2543
"persistent": true
44+
},
45+
"commands:dev": {
46+
"outputs": []
47+
},
48+
"commands:prod": {
49+
"outputs": []
2650
}
2751
}
2852
}

0 commit comments

Comments
 (0)