Summary
src/server.js:1075 validates printable input with a Unicode property-escape regex:
On Node builds without full ICU — notably nodejs-mobile (the embedded Node used for the Android app) — this throws at module-load time:
SyntaxError: Invalid regular expression: /^\P{C}+$/: Invalid property name
Because it's a top-level regex literal, the whole module fails to import and the server never starts.
Impact
JSS can't boot on no-ICU / small-ICU runtimes. Surfaced while embedding JSS in a React Native + nodejs-mobile Android app. We currently work around it downstream by rewriting the regex to an ASCII range before bundling, but JSS itself would be more portable without the property escape.
Suggested fix
Replace the \P{C} (any non-control-category char) escape with an explicit ASCII control-character exclusion that needs no ICU:
/^[^\x00-\x1f\x7f-\x9f]+$/.test(str)
This matches "no C0/C1 control chars" — close to the original intent for input sanitization, and works on every Node build. If full-Unicode control coverage is genuinely required, document a full-ICU runtime requirement instead.
Location
Summary
src/server.js:1075validates printable input with a Unicode property-escape regex:On Node builds without full ICU — notably
nodejs-mobile(the embedded Node used for the Android app) — this throws at module-load time:Because it's a top-level regex literal, the whole module fails to import and the server never starts.
Impact
JSS can't boot on no-ICU / small-ICU runtimes. Surfaced while embedding JSS in a React Native + nodejs-mobile Android app. We currently work around it downstream by rewriting the regex to an ASCII range before bundling, but JSS itself would be more portable without the property escape.
Suggested fix
Replace the
\P{C}(any non-control-category char) escape with an explicit ASCII control-character exclusion that needs no ICU:This matches "no C0/C1 control chars" — close to the original intent for input sanitization, and works on every Node build. If full-Unicode control coverage is genuinely required, document a full-ICU runtime requirement instead.
Location
src/server.js:1070-1075