Support Node.js v20 with @gitbook/icons (#2960)

This commit is contained in:
Greg Bergé
2025-03-11 10:27:26 +01:00
committed by GitHub
parent 844059f9a5
commit 88f64b0d63
7 changed files with 18 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/icons': minor
---
Fix the build to support Node.js v20
-1
View File
@@ -198,7 +198,6 @@
"dependencies": {
"@gitbook/api": "0.96.1",
"@gitbook/icons": "workspace:*",
"assert-never": "^1.2.1",
"classnames": "^2.5.1",
},
"devDependencies": {
+4 -1
View File
@@ -41,5 +41,8 @@
"bin": {
"gitbook-icons": "./bin/gitbook-icons.js"
},
"files": ["dist", "src", "bin", "data", "README.md", "CHANGELOG.md"]
"files": ["dist", "src", "bin", "data", "README.md", "CHANGELOG.md"],
"engines": {
"node": ">=20.0.0"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
import stylesMap from './data/styles-map.json';
import stylesMap from './data/styles-map.json' with { type: 'json' };
import type { IconName, IconStyle } from './types';
const cache = new Map<IconName, Map<IconStyle, [string, IconName]>>();
+1 -1
View File
@@ -1,4 +1,4 @@
import rawIcons from './data/icons.json';
import rawIcons from './data/icons.json' with { type: 'json' };
import type { IconName, IconStyle } from './types';
export interface IconStyleDefinition {
+7 -7
View File
@@ -1,16 +1,16 @@
{
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"lib": ["es2023"],
"module": "ESNext",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowJs": true,
"noEmit": false,
"declaration": true,
"outDir": "dist",
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
-1
View File
@@ -11,7 +11,6 @@
"dependencies": {
"classnames": "^2.5.1",
"@gitbook/api": "0.96.1",
"assert-never": "^1.2.1",
"@gitbook/icons": "workspace:*"
},
"peerDependencies": {