Skip to content

3.4.2

Choose a tag to compare

@plutext plutext released this 18 Oct 05:48
· 28 commits to master since this release

Three variables the runtime assigned without declaring are now declared. Under Node's CommonJS an undeclared assignment silently creates a global, but bundlers put the runtime inside an ES module, which is strict, and there it throws.

  • Base64Binary.decode (input): any xsd:base64Binary value threw input is not defined in strict mode, from a Vite or esbuild bundle or vitest's jsdom environment. In a Word document this means the VML v:shape of every text box, whose o:gfxdata is base64.
  • Unmarshaller.unmarshalFile and unmarshalURL (that): these also threw in strict mode. In sloppy mode that was a single global shared by overlapping calls.
  • Util.extend (sourceIsEvt): this was already declared in the npm copy. dist/Jsonix-all.js and the modular source now match it.

What a consumer must do. Nothing beyond taking 3.4.2: no API change, and a lockfile refresh is enough under ^3.4.0.

Guard. A new tests/strict.js scans all three copies of the runtime for assignments that resolve to no declaration, and loads the factory as strict code to run what threw. The whole suite also passes against a strict-mode copy of the factory.