Skip to content

Commit 2d0ac3f

Browse files
committed
chore: migrate @pkgr/rollup to tsdown
1 parent 2916ad8 commit 2d0ac3f

File tree

5 files changed

+1932
-2263
lines changed

5 files changed

+1932
-2263
lines changed

.renovaterc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"extends": [
34
"github>1stG/configs"
5+
],
6+
"ignoreDeps": [
7+
"mvdan-sh"
48
]
59
}

index.d.cts

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

package.json

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"node": ">=16.0.0"
1313
},
1414
"main": "./lib/index.cjs",
15-
"types": "./index.d.cts",
15+
"types": "./lib/index.d.cts",
1616
"module": "./lib/index.js",
1717
"exports": {
1818
".": {
@@ -24,12 +24,8 @@
2424
"types": "./lib/index.d.ts",
2525
"default": "./lib/index.js"
2626
},
27-
"module-sync": {
28-
"types": "./lib/index.d.ts",
29-
"default": "./lib/index.js"
30-
},
3127
"require": {
32-
"types": "./index.d.cts",
28+
"types": "./lib/index.d.cts",
3329
"default": "./lib/index.cjs"
3430
}
3531
},
@@ -39,7 +35,6 @@
3935
"./vendors/wasm_exec.cjs": "./vendors/wasm_exec.cjs"
4036
},
4137
"files": [
42-
"index.d.cts",
4338
"lib",
4439
"main.wasm",
4540
"vendors",
@@ -48,8 +43,8 @@
4843
"scripts": {
4944
"benchmark": "sudo env NO_COLOR=1 node benchmark > benchmark/benchmark.txt",
5045
"build": "run-p 'build:*'",
51-
"build:r": "r -f cjs -x '**/vendors/wasm_exec.cjs'",
5246
"build:tsc": "tsc -p src --declaration false && tsc -p src --removeComments false --emitDeclarationOnly",
47+
"build:tsdown": "tsdown --clean false -d lib --format cjs --external '../vendors/wasm_exec.cjs' src/index.ts",
5348
"easyjson": "easyjson --all processor/structs.go",
5449
"format": "prettier --write .",
5550
"lint": "run-p 'lint:*'",
@@ -65,34 +60,34 @@
6560
"tslib": "^2.8.1"
6661
},
6762
"devDependencies": {
68-
"@1stg/common-config": "^13.0.1",
63+
"@1stg/common-config": "^14.0.0",
6964
"@changesets/changelog-github": "^0.5.1",
70-
"@changesets/cli": "^2.29.2",
71-
"@commitlint/cli": "^19.8.0",
65+
"@changesets/cli": "^2.29.4",
66+
"@commitlint/cli": "^19.8.1",
7267
"@mitata/counters": "^0.0.8",
73-
"@pkgr/rollup": "^6.0.3",
7468
"@stylistic/eslint-plugin-js": "^4.2.0",
7569
"@types/golang-wasm-exec": "^1.15.2",
7670
"@types/mvdan-sh": "^0.10.9",
77-
"@types/node": "^22.14.1",
78-
"@types/web": "^0.0.228",
79-
"@vitest/coverage-istanbul": "^3.1.1",
80-
"@vitest/eslint-plugin": "^1.1.43",
81-
"clean-pkg-json": "^1.2.1",
82-
"eslint": "^9.25.0",
71+
"@types/node": "^22.15.19",
72+
"@types/web": "^0.0.235",
73+
"@vitest/coverage-istanbul": "^3.1.4",
74+
"@vitest/eslint-plugin": "^1.2.0",
75+
"clean-pkg-json": "^1.3.0",
76+
"eslint": "^9.27.0",
8377
"mitata": "^1.0.34",
8478
"mvdan-sh": "^0.10.1",
8579
"nano-staged": "^0.8.0",
86-
"npm-run-all2": "^7.0.2",
80+
"npm-run-all2": "^8.0.2",
8781
"prettier": "^3.5.3",
8882
"sh-syntax": "link:.",
89-
"simple-git-hooks": "^2.12.1",
83+
"simple-git-hooks": "^2.13.0",
9084
"size-limit": "^11.2.0",
91-
"size-limit-preset-node-lib": "^0.3.0",
92-
"synckit": "^0.11.4",
85+
"size-limit-preset-node-lib": "^0.4.0",
86+
"synckit": "^0.11.6",
87+
"tsdown": "^0.11.12",
9388
"type-coverage": "^2.29.7",
9489
"typescript": "^5.8.3",
95-
"vitest": "^3.1.1",
90+
"vitest": "^3.1.4",
9691
"yarn-berry-deduplicate": "^6.1.3"
9792
},
9893
"resolutions": {

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import '../vendors/wasm_exec.cjs'
88
import { getProcessor } from './processor.js'
99
import type { File, ShOptions, ShPrintOptions } from './types.js'
1010

11+
const importMetaUrl = import.meta.url
12+
1113
/* istanbul ignore next -- @preserve */
12-
const _dirname = import.meta.url
13-
? path.dirname(fileURLToPath(import.meta.url))
14+
const _dirname = importMetaUrl
15+
? path.dirname(fileURLToPath(importMetaUrl))
1416
: __dirname
1517

1618
export const processor = getProcessor(() =>

0 commit comments

Comments
 (0)