gtfs-to-html 2.10.11 → 2.10.12

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/index.js CHANGED
@@ -5,17 +5,17 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/lib/gtfs-to-html.ts
8
- import path from "node:path";
9
- import { mkdir as mkdir2, writeFile } from "node:fs/promises";
8
+ import path from "path";
9
+ import { mkdir as mkdir2, writeFile } from "fs/promises";
10
10
  import { openDb as openDb2, importGtfs } from "gtfs";
11
11
  import sanitize2 from "sanitize-filename";
12
12
  import Timer from "timer-machine";
13
13
  import untildify2 from "untildify";
14
14
 
15
15
  // src/lib/file-utils.ts
16
- import { dirname, join, resolve } from "node:path";
17
- import { createWriteStream } from "node:fs";
18
- import { fileURLToPath } from "node:url";
16
+ import { dirname, join, resolve } from "path";
17
+ import { createWriteStream } from "fs";
18
+ import { fileURLToPath } from "url";
19
19
  import {
20
20
  access,
21
21
  cp,
@@ -24,7 +24,7 @@ import {
24
24
  readdir,
25
25
  readFile,
26
26
  rm
27
- } from "node:fs/promises";
27
+ } from "fs/promises";
28
28
  import * as _ from "lodash-es";
29
29
  import archiver from "archiver";
30
30
  import beautify from "js-beautify";
@@ -157,7 +157,7 @@ import simplify from "@turf/simplify";
157
157
  import { featureCollection, round } from "@turf/helpers";
158
158
 
159
159
  // src/lib/log-utils.ts
160
- import { clearLine, cursorTo } from "node:readline";
160
+ import { clearLine, cursorTo } from "readline";
161
161
  import { noop } from "lodash-es";
162
162
  import * as colors from "yoctocolors";
163
163
  import { getFeedInfo } from "gtfs";
@@ -503,7 +503,7 @@ function formatTripNameForCSV(trip, timetable) {
503
503
  // package.json
504
504
  var package_default = {
505
505
  name: "gtfs-to-html",
506
- version: "2.10.11",
506
+ version: "2.10.12",
507
507
  private: false,
508
508
  description: "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
509
509
  keywords: [
@@ -556,18 +556,18 @@ var package_default = {
556
556
  "cli-table": "^0.3.11",
557
557
  "csv-stringify": "^6.5.2",
558
558
  express: "^5.1.0",
559
- gtfs: "^4.17.2",
559
+ gtfs: "^4.17.3",
560
560
  "gtfs-realtime-pbf-js-module": "^1.0.0",
561
561
  "js-beautify": "^1.15.4",
562
562
  "lodash-es": "^4.17.21",
563
- marked: "^15.0.8",
563
+ marked: "^15.0.12",
564
564
  moment: "^2.30.1",
565
565
  pbf: "^4.0.1",
566
566
  "pretty-error": "^4.0.0",
567
567
  pug: "^3.0.3",
568
- puppeteer: "^24.6.1",
568
+ puppeteer: "^24.9.0",
569
569
  "sanitize-filename": "^1.6.3",
570
- "sanitize-html": "^2.16.0",
570
+ "sanitize-html": "^2.17.0",
571
571
  sqlstring: "^2.3.3",
572
572
  "timer-machine": "^1.1.0",
573
573
  toposort: "^2.0.2",
@@ -577,20 +577,20 @@ var package_default = {
577
577
  },
578
578
  devDependencies: {
579
579
  "@types/archiver": "^6.0.3",
580
- "@types/express": "^5.0.1",
580
+ "@types/express": "^5.0.2",
581
581
  "@types/insane": "^1.0.0",
582
582
  "@types/js-beautify": "^1.14.3",
583
583
  "@types/lodash-es": "^4.17.12",
584
584
  "@types/morgan": "^1.9.9",
585
- "@types/node": "^22.14.1",
585
+ "@types/node": "^22.15.19",
586
586
  "@types/pug": "^2.0.10",
587
- "@types/sanitize-html": "^2.15.0",
587
+ "@types/sanitize-html": "^2.16.0",
588
588
  "@types/timer-machine": "^1.1.3",
589
589
  "@types/yargs": "^17.0.33",
590
590
  husky: "^9.1.7",
591
- "lint-staged": "^15.5.1",
591
+ "lint-staged": "^16.0.0",
592
592
  prettier: "^3.5.3",
593
- tsup: "^8.4.0",
593
+ tsup: "^8.5.0",
594
594
  typescript: "^5.8.3"
595
595
  },
596
596
  engines: {
@@ -1055,10 +1055,15 @@ var getStopOrder = (timetable, config) => {
1055
1055
  }
1056
1056
  try {
1057
1057
  const stopGraph = [];
1058
+ const timepointStopIds = new Set(
1059
+ timetable.orderedTrips.flatMap(
1060
+ (trip) => trip.stoptimes.filter((stoptime) => isTimepoint(stoptime)).map((stoptime) => stoptime.stop_id)
1061
+ )
1062
+ );
1058
1063
  for (const trip of timetable.orderedTrips) {
1059
1064
  const sortedStopIds = trip.stoptimes.filter((stoptime) => {
1060
1065
  if (config.showOnlyTimepoint === true) {
1061
- return isTimepoint(stoptime);
1066
+ return timepointStopIds.has(stoptime.stop_id);
1062
1067
  }
1063
1068
  return true;
1064
1069
  }).map((stoptime) => stoptime.stop_id);
@@ -1084,12 +1089,12 @@ var getStopOrder = (timetable, config) => {
1084
1089
  (stoptime) => stoptime.stop_id
1085
1090
  );
1086
1091
  const missingStopIds = difference(
1087
- uniq(
1092
+ new Set(
1088
1093
  timetable.orderedTrips.flatMap(
1089
1094
  (trip) => trip.stoptimes.map((stoptime) => stoptime.stop_id)
1090
1095
  )
1091
1096
  ),
1092
- uniq(stopIds)
1097
+ new Set(stopIds)
1093
1098
  );
1094
1099
  if (missingStopIds.length > 0) {
1095
1100
  timetable.warnings.push(