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": { "dependencies": {
"@gitbook/api": "0.96.1", "@gitbook/api": "0.96.1",
"@gitbook/icons": "workspace:*", "@gitbook/icons": "workspace:*",
"assert-never": "^1.2.1",
"classnames": "^2.5.1", "classnames": "^2.5.1",
}, },
"devDependencies": { "devDependencies": {
+4 -1
View File
@@ -41,5 +41,8 @@
"bin": { "bin": {
"gitbook-icons": "./bin/gitbook-icons.js" "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'; import type { IconName, IconStyle } from './types';
const cache = new Map<IconName, Map<IconStyle, [string, IconName]>>(); 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'; import type { IconName, IconStyle } from './types';
export interface IconStyleDefinition { export interface IconStyleDefinition {
+7 -7
View File
@@ -1,16 +1,16 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "esnext", "lib": ["es2023"],
"lib": ["dom", "dom.iterable", "esnext"], "module": "ESNext",
"allowJs": true, "target": "es2022",
"skipLibCheck": true,
"strict": true, "strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowJs": true,
"noEmit": false, "noEmit": false,
"declaration": true, "declaration": true,
"outDir": "dist", "outDir": "dist",
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "react-jsx", "jsx": "react-jsx",
-1
View File
@@ -11,7 +11,6 @@
"dependencies": { "dependencies": {
"classnames": "^2.5.1", "classnames": "^2.5.1",
"@gitbook/api": "0.96.1", "@gitbook/api": "0.96.1",
"assert-never": "^1.2.1",
"@gitbook/icons": "workspace:*" "@gitbook/icons": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {