gtfs-to-html 2.12.12 → 2.12.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.d.ts +1 -2
- package/dist/app/index.js +96 -2522
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.d.ts +1 -1
- package/dist/bin/gtfs-to-html.js +28 -3035
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/browser/THIRD_PARTY_LICENSES.txt +1 -1
- package/dist/browser/pbf.js +1 -1
- package/dist/file-utils-B3ZcDOSK.js +1922 -0
- package/dist/file-utils-B3ZcDOSK.js.map +1 -0
- package/dist/index.d.ts +110 -105
- package/dist/index.js +3 -3018
- package/dist/src-Bc8DLOTC.js +124 -0
- package/dist/src-Bc8DLOTC.js.map +1 -0
- package/package.json +11 -11
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { A as toGtfsToHtmlError, C as progressBar, E as GtfsToHtmlErrorCode, S as logStats, T as GtfsToHtmlErrorCategory, _ as setDefaultConfig, b as log, c as untildify, d as generateOverviewHTML, f as generateStats, g as getTimetablePagesForAgency, h as getFormattedTimetablePage, l as zipFolder, m as generateTimetableHTML, n as generateCSVFileName, o as prepDirectory, p as generateTimetableCSV, r as generateFolderName, s as renderPdf, t as copyStaticAssets, w as GtfsToHtmlError, x as logError, y as generateLogText } from "./file-utils-B3ZcDOSK.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
|
+
import { GtfsError, GtfsErrorCategory as GtfsErrorCategory$1, GtfsErrorCode, GtfsWarningCode, formatGtfsError as formatGtfsError$1, importGtfs, isGtfsError, isGtfsError as isGtfsError$1, isGtfsValidationError, openDb } from "gtfs";
|
|
5
|
+
import sanitize from "sanitize-filename";
|
|
6
|
+
|
|
7
|
+
//#region src/lib/gtfs-to-html.ts
|
|
8
|
+
const gtfsToHtml = async (initialConfig) => {
|
|
9
|
+
const config = setDefaultConfig(initialConfig);
|
|
10
|
+
const startTime = process.hrtime.bigint();
|
|
11
|
+
const agencyKey = config.agencies.map((agency) => agency.agencyKey ?? agency.agency_key ?? "unknown").join("-");
|
|
12
|
+
const outputPath = config.outputPath ? untildify(config.outputPath) : path.join(process.cwd(), "html", sanitize(agencyKey));
|
|
13
|
+
await prepDirectory(outputPath, config);
|
|
14
|
+
try {
|
|
15
|
+
openDb(config);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (error?.code === "SQLITE_CANTOPEN") {
|
|
18
|
+
const dbOpenError = new GtfsToHtmlError(`Unable to open sqlite database "${config.sqlitePath}" defined as \`sqlitePath\` config.json. Ensure the parent directory exists or remove \`sqlitePath\` from config.json.`, {
|
|
19
|
+
code: "GTFS_TO_HTML_DATABASE_OPEN_FAILED",
|
|
20
|
+
category: "database",
|
|
21
|
+
details: {
|
|
22
|
+
sqlitePath: config.sqlitePath,
|
|
23
|
+
dbCode: error.code
|
|
24
|
+
},
|
|
25
|
+
cause: error
|
|
26
|
+
});
|
|
27
|
+
logError(config)(dbOpenError.message);
|
|
28
|
+
throw dbOpenError;
|
|
29
|
+
}
|
|
30
|
+
throw toGtfsToHtmlError(error, {
|
|
31
|
+
message: error instanceof Error ? error.message : "Unable to open sqlite database",
|
|
32
|
+
code: "GTFS_TO_HTML_DATABASE_OPEN_FAILED",
|
|
33
|
+
category: "database",
|
|
34
|
+
details: { sqlitePath: config.sqlitePath }
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (!config.agencies || config.agencies.length === 0) throw new GtfsToHtmlError("No agencies defined in `config.json`", {
|
|
38
|
+
code: "GTFS_TO_HTML_CONFIG_MISSING_AGENCIES",
|
|
39
|
+
category: "config",
|
|
40
|
+
details: { field: "agencies" }
|
|
41
|
+
});
|
|
42
|
+
if (!config.skipImport) try {
|
|
43
|
+
await importGtfs(config);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
if (isGtfsError(error)) throw error;
|
|
46
|
+
throw toGtfsToHtmlError(error, {
|
|
47
|
+
message: error instanceof Error ? error.message : "GTFS import failed",
|
|
48
|
+
code: "GTFS_TO_HTML_GTFS_IMPORT_FAILED",
|
|
49
|
+
category: "gtfs"
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const stats = {
|
|
53
|
+
timetables: 0,
|
|
54
|
+
timetablePages: 0,
|
|
55
|
+
calendars: 0,
|
|
56
|
+
routes: 0,
|
|
57
|
+
trips: 0,
|
|
58
|
+
stops: 0,
|
|
59
|
+
warnings: []
|
|
60
|
+
};
|
|
61
|
+
const timetablePages = [];
|
|
62
|
+
const timetablePageIds = getTimetablePagesForAgency(config).map((timetablePage) => timetablePage.timetable_page_id);
|
|
63
|
+
if (config.noHead !== true && ["html", "pdf"].includes(config.outputFormat)) await copyStaticAssets(config, outputPath);
|
|
64
|
+
const bar = progressBar(`${agencyKey}: Generating ${config.outputFormat.toUpperCase()} timetables {bar} {value}/{total}`, timetablePageIds.length, config);
|
|
65
|
+
for (const timetablePageId of timetablePageIds) {
|
|
66
|
+
try {
|
|
67
|
+
const timetablePage = await getFormattedTimetablePage(timetablePageId, config);
|
|
68
|
+
for (const timetable of timetablePage.consolidatedTimetables) if (timetable.warnings) for (const warning of timetable.warnings) {
|
|
69
|
+
stats.warnings.push(warning);
|
|
70
|
+
bar?.interrupt(warning);
|
|
71
|
+
}
|
|
72
|
+
if (timetablePage.consolidatedTimetables.length === 0) throw new GtfsToHtmlError(`No timetables found for timetable_page_id=${timetablePage.timetable_page_id}`, {
|
|
73
|
+
code: "GTFS_TO_HTML_TIMETABLE_GENERATION_FAILED",
|
|
74
|
+
category: "query",
|
|
75
|
+
details: { timetablePageId: timetablePage.timetable_page_id }
|
|
76
|
+
});
|
|
77
|
+
stats.timetables += timetablePage.consolidatedTimetables.length;
|
|
78
|
+
stats.timetablePages += 1;
|
|
79
|
+
const datePath = generateFolderName(timetablePage);
|
|
80
|
+
await mkdir(path.join(outputPath, datePath), { recursive: true });
|
|
81
|
+
config.assetPath = "../";
|
|
82
|
+
timetablePage.relativePath = path.join(datePath, sanitize(timetablePage.filename));
|
|
83
|
+
if (config.outputFormat === "csv") for (const timetable of timetablePage.consolidatedTimetables) {
|
|
84
|
+
const csv = await generateTimetableCSV(timetable);
|
|
85
|
+
await writeFile(path.join(outputPath, datePath, generateCSVFileName(timetable, config)), csv);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const html = await generateTimetableHTML(timetablePage, config);
|
|
89
|
+
const htmlPath = path.join(outputPath, datePath, sanitize(timetablePage.filename));
|
|
90
|
+
await writeFile(htmlPath, html);
|
|
91
|
+
if (config.outputFormat === "pdf") await renderPdf(htmlPath);
|
|
92
|
+
}
|
|
93
|
+
timetablePages.push(timetablePage);
|
|
94
|
+
const timetableStats = generateStats(timetablePage);
|
|
95
|
+
stats.stops += timetableStats.stops;
|
|
96
|
+
stats.routes += timetableStats.routes;
|
|
97
|
+
stats.trips += timetableStats.trips;
|
|
98
|
+
stats.calendars += timetableStats.calendars;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
stats.warnings.push(error?.message);
|
|
101
|
+
bar?.interrupt(error.message);
|
|
102
|
+
}
|
|
103
|
+
bar?.increment();
|
|
104
|
+
}
|
|
105
|
+
if (config.outputFormat === "html") {
|
|
106
|
+
config.assetPath = "";
|
|
107
|
+
const html = await generateOverviewHTML(timetablePages, config);
|
|
108
|
+
await writeFile(path.join(outputPath, "index.html"), html);
|
|
109
|
+
}
|
|
110
|
+
const logText = generateLogText(stats, config);
|
|
111
|
+
await writeFile(path.join(outputPath, "log.txt"), logText);
|
|
112
|
+
if (config.zipOutput) await zipFolder(outputPath);
|
|
113
|
+
const fullOutputPath = path.join(outputPath, config.zipOutput ? "/timetables.zip" : "");
|
|
114
|
+
log(config)(`${agencyKey}: ${config.outputFormat.toUpperCase()} timetables created at ${fullOutputPath}`);
|
|
115
|
+
logStats(config)(stats);
|
|
116
|
+
const endTime = process.hrtime.bigint();
|
|
117
|
+
const elapsedSeconds = Number(endTime - startTime) / 1e9;
|
|
118
|
+
log(config)(`${agencyKey}: ${config.outputFormat.toUpperCase()} timetable generation required ${elapsedSeconds.toFixed(1)} seconds`);
|
|
119
|
+
return fullOutputPath;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
export { formatGtfsError$1 as a, gtfsToHtml as c, GtfsWarningCode as i, GtfsErrorCategory$1 as n, isGtfsError$1 as o, GtfsErrorCode as r, isGtfsValidationError as s, GtfsError as t };
|
|
124
|
+
//# sourceMappingURL=src-Bc8DLOTC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-Bc8DLOTC.js","names":[],"sources":["../src/lib/gtfs-to-html.ts"],"sourcesContent":["import path from 'node:path';\nimport { mkdir, writeFile } from 'node:fs/promises';\n\nimport { openDb, importGtfs, ConfigAgency, isGtfsError } from 'gtfs';\nimport sanitize from 'sanitize-filename';\n\nimport {\n prepDirectory,\n copyStaticAssets,\n generateFolderName,\n renderPdf,\n zipFolder,\n generateCSVFileName,\n untildify,\n} from './file-utils.js';\nimport {\n progressBar,\n generateLogText,\n logStats,\n logError,\n log,\n} from './log-utils.js';\nimport {\n setDefaultConfig,\n getTimetablePagesForAgency,\n getFormattedTimetablePage,\n generateTimetableHTML,\n generateTimetableCSV,\n generateOverviewHTML,\n generateStats,\n} from './utils.js';\nimport {\n GtfsToHtmlError,\n GtfsToHtmlErrorCategory,\n GtfsToHtmlErrorCode,\n toGtfsToHtmlError,\n} from './errors.js';\n\nimport type { Config } from '../types/index.ts';\n\n/*\n * Generate HTML timetables from GTFS.\n */\n/* eslint-disable complexity */\nconst gtfsToHtml = async (initialConfig: Config) => {\n const config = setDefaultConfig(initialConfig);\n\n // Start timer\n const startTime = process.hrtime.bigint();\n\n const agencyKey = config.agencies\n .map(\n (agency: ConfigAgency & { agencyKey?: string; agency_key?: string }) =>\n agency.agencyKey ?? agency.agency_key ?? 'unknown',\n )\n .join('-');\n const outputPath = config.outputPath\n ? untildify(config.outputPath)\n : path.join(process.cwd(), 'html', sanitize(agencyKey));\n\n await prepDirectory(outputPath, config);\n\n try {\n openDb(config);\n } catch (error: any) {\n if (error?.code === 'SQLITE_CANTOPEN') {\n const dbOpenError = new GtfsToHtmlError(\n `Unable to open sqlite database \"${config.sqlitePath}\" defined as \\`sqlitePath\\` config.json. Ensure the parent directory exists or remove \\`sqlitePath\\` from config.json.`,\n {\n code: GtfsToHtmlErrorCode.DATABASE_OPEN_FAILED,\n category: GtfsToHtmlErrorCategory.DATABASE,\n details: { sqlitePath: config.sqlitePath, dbCode: error.code },\n cause: error,\n },\n );\n\n logError(config)(dbOpenError.message);\n throw dbOpenError;\n }\n\n throw toGtfsToHtmlError(error, {\n message:\n error instanceof Error\n ? error.message\n : 'Unable to open sqlite database',\n code: GtfsToHtmlErrorCode.DATABASE_OPEN_FAILED,\n category: GtfsToHtmlErrorCategory.DATABASE,\n details: { sqlitePath: config.sqlitePath },\n });\n }\n\n if (!config.agencies || config.agencies.length === 0) {\n throw new GtfsToHtmlError('No agencies defined in `config.json`', {\n code: GtfsToHtmlErrorCode.CONFIG_MISSING_AGENCIES,\n category: GtfsToHtmlErrorCategory.CONFIG,\n details: { field: 'agencies' },\n });\n }\n\n if (!config.skipImport) {\n try {\n await importGtfs(config);\n } catch (error: unknown) {\n if (isGtfsError(error)) {\n throw error;\n }\n\n throw toGtfsToHtmlError(error, {\n message: error instanceof Error ? error.message : 'GTFS import failed',\n code: GtfsToHtmlErrorCode.GTFS_IMPORT_FAILED,\n category: GtfsToHtmlErrorCategory.GTFS,\n });\n }\n }\n\n const stats: {\n timetables: number;\n timetablePages: number;\n calendars: number;\n routes: number;\n trips: number;\n stops: number;\n warnings: string[];\n [key: string]: number | string[];\n } = {\n timetables: 0,\n timetablePages: 0,\n calendars: 0,\n routes: 0,\n trips: 0,\n stops: 0,\n warnings: [],\n };\n\n const timetablePages = [];\n const timetablePageIds = getTimetablePagesForAgency(config).map(\n (timetablePage) => timetablePage.timetable_page_id,\n );\n\n if (config.noHead !== true && ['html', 'pdf'].includes(config.outputFormat)) {\n await copyStaticAssets(config, outputPath);\n }\n\n const bar = progressBar(\n `${agencyKey}: Generating ${config.outputFormat.toUpperCase()} timetables {bar} {value}/{total}`,\n timetablePageIds.length,\n config,\n );\n\n /* eslint-disable no-await-in-loop */\n for (const timetablePageId of timetablePageIds) {\n try {\n const timetablePage = await getFormattedTimetablePage(\n timetablePageId as string,\n config,\n );\n\n for (const timetable of timetablePage.consolidatedTimetables) {\n if (timetable.warnings) {\n for (const warning of timetable.warnings) {\n stats.warnings.push(warning);\n bar?.interrupt(warning);\n }\n }\n }\n\n if (timetablePage.consolidatedTimetables.length === 0) {\n throw new GtfsToHtmlError(\n `No timetables found for timetable_page_id=${timetablePage.timetable_page_id}`,\n {\n code: GtfsToHtmlErrorCode.TIMETABLE_GENERATION_FAILED,\n category: GtfsToHtmlErrorCategory.QUERY,\n details: { timetablePageId: timetablePage.timetable_page_id },\n },\n );\n }\n\n stats.timetables += timetablePage.consolidatedTimetables.length;\n stats.timetablePages += 1;\n\n const datePath = generateFolderName(timetablePage);\n\n // Make directory if it doesn't exist\n await mkdir(path.join(outputPath, datePath), { recursive: true });\n config.assetPath = '../';\n\n timetablePage.relativePath = path.join(\n datePath,\n sanitize(timetablePage.filename),\n );\n\n if (config.outputFormat === 'csv') {\n for (const timetable of timetablePage.consolidatedTimetables) {\n const csv = await generateTimetableCSV(timetable);\n const csvPath = path.join(\n outputPath,\n datePath,\n generateCSVFileName(timetable, config),\n );\n await writeFile(csvPath, csv);\n }\n } else {\n const html = await generateTimetableHTML(timetablePage, config);\n const htmlPath = path.join(\n outputPath,\n datePath,\n sanitize(timetablePage.filename),\n );\n await writeFile(htmlPath, html);\n\n if (config.outputFormat === 'pdf') {\n await renderPdf(htmlPath);\n }\n }\n\n timetablePages.push(timetablePage);\n const timetableStats = generateStats(timetablePage);\n\n stats.stops += timetableStats.stops;\n stats.routes += timetableStats.routes;\n stats.trips += timetableStats.trips;\n stats.calendars += timetableStats.calendars;\n } catch (error: any) {\n stats.warnings.push(error?.message);\n bar?.interrupt(error.message);\n }\n\n bar?.increment();\n }\n /* eslint-enable no-await-in-loop */\n\n if (config.outputFormat === 'html') {\n // Generate overview HTML\n config.assetPath = '';\n const html = await generateOverviewHTML(timetablePages, config);\n await writeFile(path.join(outputPath, 'index.html'), html);\n }\n\n // Generate log.txt\n const logText = generateLogText(stats, config);\n await writeFile(path.join(outputPath, 'log.txt'), logText);\n\n // Zip output, if specified\n if (config.zipOutput) {\n await zipFolder(outputPath);\n }\n\n const fullOutputPath = path.join(\n outputPath,\n config.zipOutput ? '/timetables.zip' : '',\n );\n\n // Print stats\n log(config)(\n `${agencyKey}: ${config.outputFormat.toUpperCase()} timetables created at ${fullOutputPath}`,\n );\n\n logStats(config)(stats);\n\n const endTime = process.hrtime.bigint();\n const elapsedSeconds = Number(endTime - startTime) / 1_000_000_000;\n\n log(config)(\n `${agencyKey}: ${config.outputFormat.toUpperCase()} timetable generation required ${elapsedSeconds.toFixed(1)} seconds`,\n );\n\n return fullOutputPath;\n};\n/* eslint-enable complexity */\n\nexport default gtfsToHtml;\n"],"mappings":";;;;;;;AA4CA,MAAM,aAAa,OAAO,kBAA0B;CAClD,MAAM,SAAS,iBAAiB,aAAa;CAG7C,MAAM,YAAY,QAAQ,OAAO,OAAO;CAExC,MAAM,YAAY,OAAO,SACtB,KACE,WACC,OAAO,aAAa,OAAO,cAAc,SAC7C,CAAC,CACA,KAAK,GAAG;CACX,MAAM,aAAa,OAAO,aACtB,UAAU,OAAO,UAAU,IAC3B,KAAK,KAAK,QAAQ,IAAI,GAAG,QAAQ,SAAS,SAAS,CAAC;CAExD,MAAM,cAAc,YAAY,MAAM;CAEtC,IAAI;EACF,OAAO,MAAM;CACf,SAAS,OAAY;EACnB,IAAI,OAAO,SAAS,mBAAmB;GACrC,MAAM,cAAc,IAAI,gBACtB,mCAAmC,O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KAAK,YAAY,YAAY,GAAG,IAAI;CAC3D;CAGA,MAAM,UAAU,gBAAgB,OAAO,MAAM;CAC7C,MAAM,UAAU,KAAK,KAAK,YAAY,SAAS,GAAG,OAAO;CAGzD,IAAI,OAAO,WACT,MAAM,UAAU,UAAU;CAG5B,MAAM,iBAAiB,KAAK,KAC1B,YACA,OAAO,YAAY,oBAAoB,EACzC;CAGA,IAAI,MAAM,CAAC,CACT,GAAG,UAAU,IAAI,OAAO,aAAa,YAAY,EAAE,yBAAyB,gBAC9E;CAEA,SAAS,MAAM,CAAC,CAAC,KAAK;CAEtB,MAAM,UAAU,QAAQ,OAAO,OAAO;CACtC,MAAM,iBAAiB,OAAO,UAAU,SAAS,IAAI;CAErD,IAAI,MAAM,CAAC,CACT,GAAG,UAAU,IAAI,OAAO,aAAa,YAAY,EAAE,iCAAiC,eAAe,QAAQ,CAAC,EAAE,SAChH;CAEA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtfs-to-html",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
|
|
6
6
|
"keywords": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"gtfs-to-html": "dist/bin/gtfs-to-html.js"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"build": "
|
|
46
|
+
"build": "tsdown && node scripts/copy-browser-assets.js",
|
|
47
47
|
"start": "node ./dist/app",
|
|
48
48
|
"prepare": "husky && pnpm run build",
|
|
49
49
|
"prepack": "husky && pnpm run build"
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"css.escape": "^1.5.1",
|
|
57
57
|
"csv-stringify": "^6.7.0",
|
|
58
58
|
"express": "^5.2.1",
|
|
59
|
-
"gtfs": "^4.
|
|
59
|
+
"gtfs": "^4.19.1",
|
|
60
60
|
"js-beautify": "^1.15.4",
|
|
61
61
|
"lodash-es": "^4.18.1",
|
|
62
|
-
"marked": "^18.0.
|
|
62
|
+
"marked": "^18.0.5",
|
|
63
63
|
"moment": "^2.30.1",
|
|
64
64
|
"pretty-error": "^4.0.0",
|
|
65
65
|
"pug": "^3.0.4",
|
|
66
66
|
"puppeteer": "^25.1.0",
|
|
67
67
|
"sanitize-filename": "^1.6.4",
|
|
68
|
-
"sanitize-html": "^2.17.
|
|
68
|
+
"sanitize-html": "^2.17.5",
|
|
69
69
|
"sqlstring": "^2.3.3",
|
|
70
70
|
"toposort": "^2.0.2",
|
|
71
71
|
"yargs": "^18.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
|
|
76
|
-
"@types/archiver": "^
|
|
76
|
+
"@types/archiver": "^8.0.0",
|
|
77
77
|
"@types/cli-table": "^0.3.4",
|
|
78
78
|
"@types/express": "^5.0.6",
|
|
79
79
|
"@types/js-beautify": "^1.14.3",
|
|
@@ -87,17 +87,17 @@
|
|
|
87
87
|
"anchorme": "^3.0.8",
|
|
88
88
|
"gtfs-realtime-pbf-js-module": "^1.0.0",
|
|
89
89
|
"husky": "^9.1.7",
|
|
90
|
-
"lint-staged": "^17.0.
|
|
90
|
+
"lint-staged": "^17.0.7",
|
|
91
91
|
"maplibre-gl": "^5.24.0",
|
|
92
|
-
"pbf": "^5.
|
|
93
|
-
"prettier": "^3.8.
|
|
94
|
-
"
|
|
92
|
+
"pbf": "^5.1.0",
|
|
93
|
+
"prettier": "^3.8.4",
|
|
94
|
+
"tsdown": "^0.22.2",
|
|
95
95
|
"typescript": "^6.0.3"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|
|
98
98
|
"node": ">= 22"
|
|
99
99
|
},
|
|
100
|
-
"packageManager": "pnpm@11.
|
|
100
|
+
"packageManager": "pnpm@11.6.0",
|
|
101
101
|
"release-it": {
|
|
102
102
|
"github": {
|
|
103
103
|
"release": true
|