Skip to content

v2.1.1

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Sep 23:04
629b147

The first 2.x release on npm. The previously published version is 1.9.0, so an upgrade crosses everything that landed in 1.10.0, 2.0.0 and 2.1.0 — 208 features, 64 fixes and 23 breaking changes.

npm install apps-script-utils@2.1.1

No runtime dependencies. Apache-2.0. Node 22.14 or newer to build against.

Breaking changes

A sheet or a range, not only a sheet. appendRow, appendRows, appendColumns, prependRow, prependRows, prependColumn, prependColumns, clearRowsByConditional, clearColumnsByConditional, deleteRowsByConditional, deleteColumnsByConditional, getValues and updateFormulas accept a Range as their first argument. Code that relied on a Range raising InvalidSheetException now performs the operation instead.

appendColumn writes a column. It used to write a row. Together with appendColumns it also appends one column further right, leaving the last populated column untouched, and rejects anything that is not a flat array.

Validators are stricter. isValidSheetName rejects \ / ? * [ ], names over 100 characters and the reserved name History. isValidSpreadsheetId no longer accepts arbitrary strings over ten characters, Sheets URLs included. isValidSheetId rejects fractions, Infinity and values beyond Number.MAX_SAFE_INTEGER. parseA1Notations("") returns [] rather than throwing EmptyStringException.

Failed writes rethrow the original error. A write that fails throws the Error the Apps Script service raised, not a string carrying its message. Match on error.message.

Slide arguments changed order. getSlideByIndex(index, presentation?) and getSlideIndex(slide, presentation?) both default to the active presentation. A call left in the old order returns null.

convertMarkdownToRichText throws on null, undefined, a missing argument or a value of another type, where it used to return an empty array.

Documentation

maksymstoianov.github.io/apps-script-utils — 317 documented symbols, each with its signature, exceptions and examples, in English, Russian, Ukrainian, German and French. Every documented result is executed against the implementation on each build, so an example cannot quietly stop being true.

Fixed in this patch

The release workflow left the five generated writerside.cfg a version behind, which failed the documentation build on main and stopped the 2.1.0 site from being published (#548).

Full changelog: v1.9.0...apps-script-utils-v2.1.1