New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docx-templates

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docx-templates - npm Package Versions

1
7

4.1.0

Diff

Changelog

Source

4.1.0 (2020-4-25)

  • #112 Failing on the first error that is encountered while rendering a template is now optional behaviour (but still the default). Use failFast: false to collect all errors in a template before failing. This allows for less cumbersome interactive correction of typos or other mistakes in template commands.
  • #33 SVGs can now be inserted into the templates directly, based on excellent work by @lwallent.
  • #113 fixed a regression caused by relying on incomplete jsZip type definitions.
  • #83 fixed a bug that occurred when links were used in FOR loops.
  • Added docstrings (thanks @mathe42 !)
guigrpa
published 4.0.0 •

Changelog

Source

4.0.0 (2020-04-13)

  • Removed Flow and switched entire codebase over to TypeScript. In the process a few minor soundness issues were fixed.

  • Breaking change Removed dependency on Node filesystem APIs so the library no longer needs a separate node and browser entrypoint, simplifying maintenance and development. This has the following implications for the public API, justifying the version bump to 4.0.0:

    • You can no longer provide image data as a path, and need to provide an ArrayBuffer or base64-encoded string instead.

    • You can no longer provide a template as a filesystem path, and you'll need to read it into a Buffer first.

    • Removed output: 'buffer' argument. The output of createReport is now always a Uint8Array, unless the debug argument _probe is specified.

The README and examples have also been updated to reflect the above changes.

guigrpa
published 3.1.1 •

Changelog

Source

3.1.1 (2019-8-20)

  • Avoid issue when a single paragraph contains END-IF/FOR for a previous loop and IF/FOR for a new one (#72).
  • Fix hyperlink styles (#64).
guigrpa
published 3.1.0 •

Changelog

Source

3.1.0 (2019-8-20)

  • Allow different left/right command delimiters, e.g. cmdDelimiter: ['{', '}'] (#66, #70).
  • Allow omission of the INS (or =) command (#70).
guigrpa
published 3.0.0 •

Changelog

Source

3.0.0 (2019-2-17)

  • Breaking change: removed replaceImages, replaceImagesBase64 options (deprecated since v2.4.0). Please use the IMAGE command instead.
  • Breaking change for users of the vm2 sandbox: replaced vm2Sandbox option (which caused headaches for users in the browser) with runJs, a custom hook for JS snippet execution. If you want to use vm2:
import createReport from 'docx-templates';
import { VM, VMScript } from 'vm2';

createReport({
  template: /* ... */,
  data: /* ... */,
  runJs: ({ sandbox }) => {
    const script = new VMScript(
      `
      __result__ = eval(__code__);
      `
    ).compile();
    const vm2 = new VM({ sandbox });
    vm2.run(script);
    const { VMError, Buffer, ...modifiedSandbox } = vm2._context;
    const result = modifiedSandbox.__result__;
    return { modifiedSandbox, result };
  }
})
guigrpa
published 2.10.0 •

Changelog

Source

2.10.0 (2019-2-16)

  • Let alternate text be specified for images (@emilong, #57).
guigrpa
published 2.9.1 •

Changelog

Source

2.9.1 (2019-1-3)

guigrpa
published 2.9.0 •

Changelog

Source

2.9.0 (2018-11-30)

guigrpa
published 2.9.0-rc.1 •

Changelog

Source

2.9.0-rc.1 (2018-11-22)

guigrpa
published 2.9.0-rc.0 •

Changelog

Source

2.9.0-rc.0 (2018-11-19)

  • Fix race condition in which a file was generated and was later used by another section of the processor (added cache in zip module) (should solve #44).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc