Skip to content

Commit 47e0a05

Browse files
committed
chore: migrate to premove and tsdown
1 parent 1d59492 commit 47e0a05

File tree

3 files changed

+2625
-2750
lines changed

3 files changed

+2625
-2750
lines changed

package.json

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,31 @@
1111
"engines": {
1212
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
1313
},
14-
"exports": "./src/index.ts",
14+
"main": "./lib/index.cjs",
15+
"types": "./lib/index.d.cts",
16+
"module": "./lib/index.js",
17+
"exports": {
18+
".": {
19+
"import": {
20+
"types": "./lib/index.d.ts",
21+
"default": "./lib/index.js"
22+
},
23+
"require": {
24+
"types": "./lib/index.d.cts",
25+
"default": "./lib/index.cjs"
26+
}
27+
},
28+
"./package.json": "./package.json"
29+
},
1530
"files": [
16-
"index.d.cts",
1731
"lib",
1832
"!**/*.tsbuildinfo"
1933
],
2034
"scripts": {
2135
"build": "run-p 'build:*'",
22-
"build:r": "r -f cjs",
2336
"build:tsc": "tsc -b src",
24-
"clean": "rimraf -g .type-coverage coverage dist lib '.*cache'",
37+
"build:tsdown": "tsdown -d lib --format cjs src/index.ts",
38+
"clean": "premove .type-coverage coverage dist lib '.*cache'",
2539
"dev": "vitest",
2640
"docs": "vite",
2741
"docs:build": "vite build",
@@ -43,65 +57,47 @@
4357
"@1stg/postcss-config": "^6.0.6",
4458
"@1stg/stylelint-config": "^6.0.5",
4559
"@changesets/changelog-github": "^0.5.1",
46-
"@changesets/cli": "^2.29.2",
47-
"@commitlint/cli": "^19.8.0",
48-
"@eslint-react/eslint-plugin": "^1.48.4",
60+
"@changesets/cli": "^2.29.4",
61+
"@commitlint/cli": "^19.8.1",
62+
"@eslint-react/eslint-plugin": "^1.49.0",
4963
"@mdx-js/rollup": "^3.1.0",
50-
"@pkgr/rollup": "^6.0.3",
51-
"@shikijs/rehype": "^3.2.2",
64+
"@shikijs/rehype": "^3.4.2",
5265
"@size-limit/preset-small-lib": "^11.2.0",
5366
"@types/mdx": "^2.0.13",
54-
"@types/node": "^22.14.1",
55-
"@types/react": "^19.1.2",
56-
"@types/react-dom": "^19.1.2",
57-
"@types/web": "^0.0.220",
67+
"@types/node": "^22.15.18",
68+
"@types/react": "^19.1.4",
69+
"@types/react-dom": "^19.1.5",
70+
"@types/web": "^0.0.235",
5871
"@vercel/analytics": "^1.5.0",
5972
"@vitejs/plugin-react-swc": "^3.9.0",
60-
"@vitest/coverage-v8": "^3.1.1",
61-
"@vitest/eslint-plugin": "^1.1.43",
62-
"clean-pkg-json": "^1.2.1",
63-
"eslint": "^9.24.0",
73+
"@vitest/coverage-v8": "^3.1.3",
74+
"@vitest/eslint-plugin": "^1.2.0",
75+
"clean-pkg-json": "^1.3.0",
76+
"eslint": "^9.27.0",
6477
"eslint-plugin-react-hooks": "^5.2.0",
6578
"github-markdown-css": "^5.8.1",
6679
"nano-staged": "^0.8.0",
67-
"npm-run-all2": "^7.0.2",
80+
"npm-run-all2": "^8.0.2",
81+
"premove": "^4.0.0",
6882
"prettier": "^3.5.3",
6983
"react": "^19.1.0",
7084
"react-dom": "^19.1.0",
71-
"react-router-dom": "^7.5.1",
85+
"react-router-dom": "^7.6.0",
7286
"rehype-slug": "^6.0.0",
7387
"remark-gfm": "^4.0.1",
74-
"rimraf": "^6.0.1",
75-
"simple-git-hooks": "^2.12.1",
88+
"simple-git-hooks": "^2.13.0",
7689
"size-limit": "^11.2.0",
77-
"stylelint": "^16.18.0",
90+
"stylelint": "^16.19.1",
91+
"tsdown": "^0.11.11",
7892
"type-coverage": "^2.29.7",
7993
"typescript": "^5.8.3",
80-
"vite": "^6.3.2",
81-
"vitest": "^3.1.1",
94+
"vite": "^6.3.5",
95+
"vitest": "^3.1.3",
8296
"yarn-berry-deduplicate": "^6.1.3"
8397
},
8498
"resolutions": {
8599
"prettier": "^3.5.3"
86100
},
87-
"publishConfig": {
88-
"main": "./lib/index.cjs",
89-
"types": "./index.d.cts",
90-
"module": "./lib/index.js",
91-
"exports": {
92-
".": {
93-
"import": {
94-
"types": "./lib/index.d.ts",
95-
"default": "./lib/index.js"
96-
},
97-
"require": {
98-
"types": "./index.d.cts",
99-
"default": "./lib/index.cjs"
100-
}
101-
},
102-
"./package.json": "./package.json"
103-
}
104-
},
105101
"typeCoverage": {
106102
"atLeast": 100,
107103
"cache": true,

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"extends": "@1stg/tsconfig/node16",
33
"compilerOptions": {
4-
"rootDir": "."
4+
"rootDir": ".",
5+
// https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-12
6+
"target": "ES2019"
57
}
68
}

0 commit comments

Comments
 (0)