Skip to content

Commit ea6d61b

Browse files
committed
feat!: drop CJS build, now it's ESM only
1 parent e1f2dd7 commit ea6d61b

File tree

9 files changed

+1359
-1706
lines changed

9 files changed

+1359
-1706
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"bumpp",
2727
"changelogithub",
2828
"codecov",
29+
"esbuild",
2930
"hkern",
3031
"iconify",
3132
"lcov",

build.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
clean: true,
5+
declaration: 'node16',
6+
entries: ['src/index.ts'],
7+
externals: ['eslint', 'json-schema'],
8+
})

docs/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@
77
"dev": "vitepress dev ."
88
},
99
"dependencies": {
10-
"@codemirror/lang-json": "^6.0.1",
11-
"@codemirror/lang-xml": "^6.1.0",
12-
"@codemirror/language": "^6.11.0",
13-
"@codemirror/state": "^6.5.2",
14-
"@codemirror/view": "^6.36.5",
15-
"@lezer/highlight": "^1.2.1",
10+
"@codemirror/lang-json": "catalog:",
11+
"@codemirror/lang-xml": "catalog:",
12+
"@codemirror/language": "catalog:",
13+
"@codemirror/state": "catalog:",
14+
"@codemirror/view": "catalog:",
15+
"@lezer/highlight": "catalog:",
1616
"@ntnyq/utils": "catalog:",
17-
"@uiw/codemirror-themes": "^4.23.10",
18-
"@vueuse/core": "^13.0.0",
19-
"codemirror": "^6.0.1",
20-
"floating-vue": "^5.2.2",
17+
"@uiw/codemirror-themes": "catalog:",
18+
"@vueuse/core": "catalog:",
19+
"codemirror": "catalog:",
20+
"floating-vue": "catalog:",
2121
"svg-eslint-parser": "workspace:*",
22-
"vue-codemirror": "^6.1.1",
23-
"vue-resizable-panels": "^0.0.1"
22+
"vue-codemirror": "catalog:",
23+
"vue-resizable-panels": "catalog:"
2424
},
2525
"devDependencies": {
26-
"@iconify-json/carbon": "^1.2.8",
27-
"@iconify-json/lucide": "^1.2.34",
28-
"@shikijs/transformers": "^3.2.1",
29-
"@shikijs/vitepress-twoslash": "^3.2.1",
30-
"twoslash": "^0.3.1",
31-
"unocss": "^66.1.0-beta.10",
32-
"unplugin-vue-components": "^28.4.1",
33-
"vite": "^6.2.5",
34-
"vitepress": "^1.6.3",
35-
"vitepress-plugin-group-icons": "^1.3.8",
36-
"vue": "^3.5.13"
26+
"@iconify-json/carbon": "catalog:",
27+
"@iconify-json/lucide": "catalog:",
28+
"@shikijs/transformers": "catalog:",
29+
"@shikijs/vitepress-twoslash": "catalog:",
30+
"twoslash": "catalog:",
31+
"unocss": "catalog:",
32+
"unplugin-vue-components": "catalog:",
33+
"vite": "catalog:",
34+
"vitepress": "catalog:",
35+
"vitepress-plugin-group-icons": "catalog:",
36+
"vue": "catalog:"
3737
}
3838
}

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { defineESLintConfig } from '@ntnyq/eslint-config'
44

55
export default defineESLintConfig({
6+
pnpm: true,
67
svgo: true,
78
unocss: true,
89
vue: true,

package.json

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svg-eslint-parser",
33
"type": "module",
44
"version": "0.0.2",
5-
"packageManager": "pnpm@10.7.1",
5+
"packageManager": "pnpm@10.8.0",
66
"description": "An SVG parser that produces output compatible with ESLint.",
77
"keywords": [
88
"eslint-parser",
@@ -22,28 +22,21 @@
2222
"exports": {
2323
"./package.json": "./package.json",
2424
".": {
25-
"import": {
26-
"types": "./dist/index.d.ts",
27-
"default": "./dist/index.js"
28-
},
29-
"require": {
30-
"types": "./dist/index.d.cts",
31-
"default": "./dist/index.cjs"
32-
}
25+
"types": "./dist/index.d.mts",
26+
"default": "./dist/index.mjs"
3327
}
3428
},
35-
"main": "./dist/index.js",
36-
"module": "./dist/index.js",
37-
"types": "./dist/index.d.ts",
29+
"main": "./dist/index.mjs",
30+
"types": "./dist/index.d.mts",
3831
"files": [
3932
"dist"
4033
],
4134
"sideEffects": false,
4235
"scripts": {
43-
"build": "tsup",
36+
"build": "unbuild",
4437
"coverage": "vitest --coverage",
4538
"deploy": "run-s build docs:build",
46-
"dev": "tsup --watch src",
39+
"dev": "unbuild --watch",
4740
"docs:build": "pnpm -C docs run build",
4841
"docs:dev": "pnpm -C docs run dev",
4942
"lint": "eslint",
@@ -57,34 +50,26 @@
5750
},
5851
"dependencies": {
5952
"@ntnyq/utils": "catalog:",
60-
"eslint-visitor-keys": "^4.2.0"
53+
"eslint-visitor-keys": "catalog:"
6154
},
6255
"devDependencies": {
63-
"@ntnyq/eslint-config": "^4.0.3",
64-
"@ntnyq/prettier-config": "^2.0.0",
65-
"@types/node": "^22.14.0",
66-
"@vitest/coverage-v8": "^3.1.1",
67-
"bumpp": "^10.1.0",
68-
"eslint": "^9.24.0",
69-
"husky": "^9.1.7",
70-
"nano-staged": "^0.8.0",
71-
"npm-run-all2": "^7.0.2",
72-
"prettier": "^3.5.3",
73-
"tsup": "^8.4.0",
74-
"typescript": "^5.8.3",
75-
"vitest": "^3.1.1"
56+
"@ntnyq/eslint-config": "catalog:",
57+
"@ntnyq/prettier-config": "catalog:",
58+
"@types/node": "catalog:",
59+
"@vitest/coverage-v8": "catalog:",
60+
"bumpp": "catalog:",
61+
"eslint": "catalog:",
62+
"husky": "catalog:",
63+
"nano-staged": "catalog:",
64+
"npm-run-all2": "catalog:",
65+
"prettier": "catalog:",
66+
"typescript": "catalog:",
67+
"unbuild": "catalog:",
68+
"vitest": "catalog:"
7669
},
7770
"engines": {
7871
"node": ">=18.18.0"
7972
},
80-
"pnpm": {
81-
"onlyBuiltDependencies": [
82-
"esbuild"
83-
],
84-
"patchedDependencies": {
85-
"vue-resizable-panels": "patches/vue-resizable-panels.patch"
86-
}
87-
},
8873
"nano-staged": {
8974
"*.{js,ts,mjs,cjs,vue,md,yml,yaml,json}": "eslint --fix",
9075
"*.{css,scss,html}": "prettier -uw"

0 commit comments

Comments
 (0)