clarify support for node 12 and 14

* run node 12, 14, and 16 (next to be supported) on CI. This will catch
  node version-specific problems like that solved in dad9bdc.
* mention 12 and 14 in build instructions and link to instructions for
  installing that version.
* follow this in Dockerfile, installing version 14. This addresses
  a "Cannot find module 'worker_threads'" error introduced in
  39a63e0, which (inadvisedly) upgraded gzipper 4->5 in addition to
  the material-ui upgrade.
* use utf-8 encoding rather than ascii in live part parser. Those
  builds apparently don't support ascii. iThey must use "small-icu" or
  have ICU disabled, as described here:
  https://nodejs.org/api/util.html#util_encodings_supported_when_node_js_is_built_with_the_small_icu_option
This commit is contained in:
Scott Lamb
2021-08-11 22:27:36 -07:00
parent 6426745c8c
commit 164c8c5b21
5 changed files with 24 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ interface ParseError {
errorMessage: string;
}
const ASCII_DECODER = new TextDecoder("ascii");
const DECODER = new TextDecoder("utf-8");
const CR = "\r".charCodeAt(0);
const NL = "\n".charCodeAt(0);
@@ -37,7 +37,7 @@ export function parsePart(raw: Uint8Array): ParseResult {
errorMessage: "header that never ends (no '\\r\\n')!",
};
}
const line = ASCII_DECODER.decode(raw.slice(pos, cr));
const line = DECODER.decode(raw.slice(pos, cr));
pos = cr + 2;
if (line.length === 0) {
break;