Skip to content

Commit 88f64b0

Browse files
authored
Support Node.js v20 with @gitbook/icons (#2960)
1 parent 844059f commit 88f64b0

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

.changeset/thin-beds-battle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/icons': minor
3+
---
4+
5+
Fix the build to support Node.js v20

bun.lock

-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@
198198
"dependencies": {
199199
"@gitbook/api": "0.96.1",
200200
"@gitbook/icons": "workspace:*",
201-
"assert-never": "^1.2.1",
202201
"classnames": "^2.5.1",
203202
},
204203
"devDependencies": {

packages/icons/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
"bin": {
4242
"gitbook-icons": "./bin/gitbook-icons.js"
4343
},
44-
"files": ["dist", "src", "bin", "data", "README.md", "CHANGELOG.md"]
44+
"files": ["dist", "src", "bin", "data", "README.md", "CHANGELOG.md"],
45+
"engines": {
46+
"node": ">=20.0.0"
47+
}
4548
}

packages/icons/src/getIconStyle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import stylesMap from './data/styles-map.json';
1+
import stylesMap from './data/styles-map.json' with { type: 'json' };
22
import type { IconName, IconStyle } from './types';
33

44
const cache = new Map<IconName, Map<IconStyle, [string, IconName]>>();

packages/icons/src/icons.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rawIcons from './data/icons.json';
1+
import rawIcons from './data/icons.json' with { type: 'json' };
22
import type { IconName, IconStyle } from './types';
33

44
export interface IconStyleDefinition {

packages/icons/tsconfig.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
6-
"skipLibCheck": true,
3+
"lib": ["es2023"],
4+
"module": "ESNext",
5+
"target": "es2022",
76
"strict": true,
7+
"esModuleInterop": true,
8+
"skipLibCheck": true,
9+
"moduleResolution": "bundler",
10+
"allowJs": true,
811
"noEmit": false,
912
"declaration": true,
1013
"outDir": "dist",
11-
"esModuleInterop": true,
12-
"module": "esnext",
13-
"moduleResolution": "bundler",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
1616
"jsx": "react-jsx",

packages/react-contentkit/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"dependencies": {
1212
"classnames": "^2.5.1",
1313
"@gitbook/api": "0.96.1",
14-
"assert-never": "^1.2.1",
1514
"@gitbook/icons": "workspace:*"
1615
},
1716
"peerDependencies": {

0 commit comments

Comments
 (0)