Skip to content

Commit 3647d8b

Browse files
authored
fix: split browser in import condition (#55)
1 parent 499bc97 commit 3647d8b

File tree

6 files changed

+2149
-1910
lines changed

6 files changed

+2149
-1910
lines changed

.changeset/healthy-horses-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ab64": patch
3+
---
4+
5+
fix: split `browser` in `import` condition

.github/workflows/codeql.yml

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

.markuplintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@1stg/markuplint-config"
3+
}

docs/App.tsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,21 @@ import { Route, BrowserRouter as Router, Routes } from 'react-router-dom'
44
import './global.scss'
55
import 'github-markdown-css'
66

7-
const Readme = () => {
8-
const Readme = lazy(() => import('../README.md'))
9-
return (
10-
<Suspense>
11-
<Readme />
12-
</Suspense>
13-
)
14-
}
7+
const Readme_ = lazy(() => import('../README.md'))
158

16-
const Changelog = () => {
17-
const Changelog = lazy(() => import('../CHANGELOG.md'))
18-
return (
19-
<Suspense>
20-
<Changelog />
21-
</Suspense>
22-
)
23-
}
9+
const Readme = () => (
10+
<Suspense>
11+
<Readme_ />
12+
</Suspense>
13+
)
14+
15+
const Changelog_ = lazy(() => import('../CHANGELOG.md'))
16+
17+
const Changelog = () => (
18+
<Suspense>
19+
<Changelog_ />
20+
</Suspense>
21+
)
2422

2523
export const App = () => (
2624
<Router>

package.json

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "JounQin (https://www.1stG.me) <[email protected]>",
88
"funding": "https://opencollective.com/unts",
99
"license": "MIT",
10-
"packageManager": "pnpm@10.7.0",
10+
"packageManager": "pnpm@10.8.0",
1111
"engines": {
1212
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
1313
},
@@ -51,56 +51,58 @@
5151
"version": "changeset version && pnpm i --no-frozen-lockfile"
5252
},
5353
"devDependencies": {
54-
"@1stg/app-config": "^11.1.0",
54+
"@1stg/app-config": "^13.0.1",
5555
"@1stg/lib-config": "^13.0.1",
5656
"@changesets/changelog-github": "^0.5.1",
57-
"@changesets/cli": "^2.28.1",
57+
"@changesets/cli": "^2.29.2",
5858
"@commitlint/cli": "^19.8.0",
5959
"@mdx-js/rollup": "^3.1.0",
6060
"@size-limit/preset-small-lib": "^11.2.0",
6161
"@types/mdx": "^2.0.13",
62-
"@types/node": "^22.13.14",
63-
"@types/react": "^19.0.12",
64-
"@types/react-dom": "^19.0.4",
65-
"@types/web": "^0.0.214",
62+
"@types/node": "^22.15.3",
63+
"@types/react": "^19.1.2",
64+
"@types/react-dom": "^19.1.2",
65+
"@types/web": "^0.0.228",
6666
"@vercel/analytics": "^1.5.0",
67-
"@vitejs/plugin-react-swc": "^3.8.1",
68-
"@vitest/coverage-istanbul": "^3.0.9",
69-
"clean-pkg-json": "^1.2.1",
67+
"@vitejs/plugin-react-swc": "^3.9.0",
68+
"@vitest/coverage-istanbul": "^3.1.2",
69+
"clean-pkg-json": "^1.3.0",
7070
"cross-env": "^7.0.3",
7171
"edge-runtime": "4.0.1",
72-
"eslint": "^9.23.0",
72+
"eslint": "^9.25.1",
7373
"github-markdown-css": "^5.8.1",
74-
"lint-staged": "^15.5.0",
74+
"lint-staged": "^15.5.1",
7575
"npm-run-all2": "^7.0.2",
7676
"prettier": "^3.5.3",
77-
"react": "^19.0.0",
78-
"react-dom": "^19.0.0",
79-
"react-router-dom": "^7.4.0",
77+
"react": "^19.1.0",
78+
"react-dom": "^19.1.0",
79+
"react-router-dom": "^7.5.3",
8080
"remark-gfm": "^4.0.1",
81-
"simple-git-hooks": "^2.12.1",
81+
"simple-git-hooks": "^2.13.0",
8282
"sirv-cli": "^3.0.1",
8383
"size-limit": "^11.2.0",
84-
"stylelint": "^16.17.0",
85-
"tsx": "^4.19.3",
84+
"stylelint": "^16.19.1",
85+
"tsx": "^4.19.4",
8686
"type-coverage": "^2.29.7",
87-
"typescript": "~5.8.2",
87+
"typescript": "~5.8.3",
8888
"unplugin-auto-import": "^19.1.2",
89-
"vite": "^6.2.3",
90-
"vitest": "^3.0.9"
89+
"vite": "^6.3.3",
90+
"vitest": "^3.1.2"
9191
},
9292
"publishConfig": {
9393
"main": "./lib/index.cjs",
9494
"module": "./lib/index.js",
9595
"exports": {
9696
".": {
9797
"import": {
98-
"types": "./lib/index.d.ts",
99-
"default": "./lib/index.js"
100-
},
101-
"browser": {
102-
"types": "./lib/browser.d.ts",
103-
"default": "./lib/browser.js"
98+
"browser": {
99+
"types": "./lib/browser.d.ts",
100+
"default": "./lib/browser.js"
101+
},
102+
"default": {
103+
"types": "./lib/index.d.ts",
104+
"default": "./lib/index.js"
105+
}
104106
},
105107
"module-sync": {
106108
"types": "./lib/index.d.ts",
@@ -140,7 +142,8 @@
140142
"es5-ext",
141143
"esbuild",
142144
"nodent-runtime",
143-
"simple-git-hooks"
145+
"simple-git-hooks",
146+
"unrs-resolver"
144147
]
145148
},
146149
"size-limit": [

0 commit comments

Comments
 (0)