gtfs-to-html 2.3.4 → 2.4.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.4.1] - 2022-07-10
9
+
10
+ ### Updated
11
+
12
+ - Update Dockerfile to node 16
13
+ - Dependency updates
14
+ - Use yoctocolors instead of chalk
15
+
16
+ ## [2.4.0] - 2022-06-07
17
+
18
+ ### Updated
19
+
20
+ - Dependency updates
21
+ - Add route labels and stops to system map
22
+ - Turn off points of interest labels on all maps
23
+ - Better map data styles
24
+ - Improved system map route and stop highlighting
25
+ - Updated to tailwindcss 3
26
+
27
+ ## [2.3.5] - 2022-04-26
28
+
29
+ ### Updated
30
+
31
+ - Dependency updates
32
+
8
33
  ## [2.3.4] - 2022-04-09
9
34
 
10
35
  ### Updated
package/docker/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # syntax=docker/dockerfile:1
2
- FROM node:14
2
+ FROM node:16
3
3
 
4
4
  RUN apt update
5
5
  RUN apt install -y chromium
@@ -91,6 +91,11 @@ export async function getTimetableGeoJSON(timetable, config) {
91
91
  * Get the geoJSON for an agency (all routes and stops).
92
92
  */
93
93
  export async function getAgencyGeoJSON(config) {
94
- const geojson = await getShapesAsGeoJSON();
94
+ const [shapesGeojsons, stopsGeojsons] = await Promise.all([
95
+ getShapesAsGeoJSON(),
96
+ getStopsAsGeoJSON(),
97
+ ]);
98
+
99
+ const geojson = mergeGeojson(shapesGeojsons, stopsGeojsons);
95
100
  return simplifyGeoJSON(geojson, config);
96
101
  }
package/lib/log-utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { clearLine, cursorTo } from 'node:readline';
2
2
  import PrettyError from 'pretty-error';
3
3
  import { noop } from 'lodash-es';
4
- import chalk from 'chalk';
4
+ import * as colors from 'yoctocolors';
5
5
  import { getFeedInfo } from 'gtfs';
6
6
  import Table from 'cli-table';
7
7
 
@@ -99,19 +99,20 @@ export function logError(config) {
99
99
  * Format console warning text
100
100
  */
101
101
  export function formatWarning(text) {
102
- return `${chalk.yellow.underline('Warning')}${chalk.yellow(
103
- ':'
104
- )} ${chalk.yellow(text)}`;
102
+ const warningMessage = `${colors.underline('Warning')}: ${text}`;
103
+ return colors.yellow(warningMessage);
105
104
  }
106
105
 
107
106
  /*
108
107
  * Format console error text
109
108
  */
110
109
  export function formatError(error) {
111
- const message = error instanceof Error ? error.message : error;
112
- return `${chalk.red.underline('Error')}${chalk.red(':')} ${chalk.red(
113
- message.replace('Error: ', '')
110
+ const messageText = error instanceof Error ? error.message : error;
111
+ const errorMessage = `${colors.underline('Error')}: ${messageText.replace(
112
+ 'Error: ',
113
+ ''
114
114
  )}`;
115
+ return colors.red(errorMessage);
115
116
  }
116
117
 
117
118
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.3.4",
3
+ "version": "2.4.1",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [
@@ -37,33 +37,33 @@
37
37
  "dependencies": {
38
38
  "@turf/helpers": "^6.5.0",
39
39
  "@turf/simplify": "^6.5.0",
40
- "archiver": "^5.3.0",
41
- "chalk": "^5.0.1",
40
+ "archiver": "^5.3.1",
42
41
  "cli-table": "^0.3.11",
43
42
  "copy-dir": "^1.3.0",
44
- "csv-stringify": "^6.0.5",
45
- "express": "^4.17.3",
46
- "gtfs": "^3.2.5",
47
- "js-beautify": "^1.14.3",
43
+ "csv-stringify": "^6.1.3",
44
+ "express": "^4.18.1",
45
+ "gtfs": "^3.5.0",
46
+ "js-beautify": "^1.14.4",
48
47
  "lodash-es": "^4.17.21",
49
- "moment": "^2.29.2",
48
+ "moment": "^2.29.4",
50
49
  "morgan": "^1.10.0",
51
50
  "pretty-error": "^4.0.0",
52
51
  "pug": "^3.0.2",
53
- "puppeteer": "^13.5.2",
52
+ "puppeteer": "^14.2.1",
54
53
  "sanitize-filename": "^1.6.3",
55
54
  "sqlstring": "^2.3.3",
56
55
  "timer-machine": "^1.1.0",
57
56
  "toposort": "^2.0.2",
58
57
  "untildify": "^4.0.0",
59
- "yargs": "^17.4.1"
58
+ "yargs": "^17.5.1",
59
+ "yoctocolors": "^1.0.0"
60
60
  },
61
61
  "devDependencies": {
62
- "eslint": "^8.13.0",
62
+ "eslint": "^8.19.0",
63
63
  "eslint-config-prettier": "^8.5.0",
64
- "eslint-config-xo": "^0.40.0",
65
- "husky": "^7.0.4",
66
- "prettier": "^2.6.2",
64
+ "eslint-config-xo": "^0.41.0",
65
+ "husky": "^8.0.1",
66
+ "prettier": "^2.7.1",
67
67
  "pretty-quick": "^3.1.3"
68
68
  },
69
69
  "engines": {
@@ -70,7 +70,7 @@ a:hover {
70
70
 
71
71
  .timetable .table-container {
72
72
  overflow-x: scroll;
73
- margin-bottom: 1rem;
73
+ margin: 20px 0;
74
74
  }
75
75
 
76
76
  .timetable .table-container .table {
@@ -93,11 +93,12 @@ a:hover {
93
93
  }
94
94
 
95
95
  .timetable thead tr {
96
- background: #72b1e6;
96
+ background: #aed9fb;
97
97
  }
98
98
 
99
+ .timetable thead tr,
99
100
  .timetable thead tr a {
100
- color: #333333;
101
+ color: #222222;
101
102
  }
102
103
 
103
104
  .timetable th {
@@ -257,16 +258,3 @@ a:hover {
257
258
  align-items: center;
258
259
  line-height: 1;
259
260
  }
260
-
261
- /* Overview page */
262
-
263
- .overview-menu-item {
264
- display: block;
265
- text-decoration: none;
266
- padding: 5px;
267
- }
268
-
269
- .overview-menu-item:hover {
270
- text-decoration: none;
271
- background: #bdd5fa;
272
- }