Skip to content

ImageScript 4.0 - #84

Open
matmen wants to merge 312 commits into
masterfrom
v4
Open

matmen wants to merge 312 commits into
masterfrom
v4

Conversation

@matmen

@matmen matmen commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

The 4.0 line: everything 3.x deprecated is removed, the API takes options objects, and seventeen behaviors change.
master (3.20.3) is merged in, so this merges cleanly. A draft until 4.0.0.

Before 4.0.0:

  • feedback on rc.5
  • the README's migration link points at master
  • 3.x maintenance branch cut from 3.20.3
  • docs site switched

matmen added 30 commits November 8, 2026 22:08
…alMode, RenderSVGOptions and TextStyleOptions
Changes that would be breaking after 4.0, made now:

- invalid choices (resize mode, blend mode, flip direction, disposal
  mode, wrapStyle) throw a TypeError naming the valid ones; the resize
  mode is checked before anything changes
- colors are integers from -2^31 to 2^32 - 1 (fill() functions' too),
  coordinates are truncated without wrapping at 2^32, compression is an
  integer 0-9, Colors.gradient() throws for NaN with any number of stops
- the bitmap setter refuses views that aren't 4-byte aligned instead of
  copying them
- frame offsets are truncated to integers like image sizes; frame
  durations a format can't store throw like loop counts (merged frames
  are split at the limit); encodeGIF() without frames throws
- encoders write no creation time unless one is given, and 'ImageScript'
  without the version as the default software (src/version.ts is gone)
- renderSVG(): maxLayerPixels (default 4 * maxPixels) bounds the layers
  alive at once, maxImagePixels (default maxPixels) the embedded images
  together; drawing an image that is missing, broken or over the limit
  throws
- renderText(): maxPixels, counting the outline
Values that are overwritten before they are read, and a final increment nobody reads (eslint 10's no-useless-assignment).
eslint 9 is no longer supported. minimatch and glob are overridden to the versions without GHSA-g3hv-75wg-m249 and GHSA-3g3m-2fjr-6pw4, except for typedoc, which needs minimatch 9 (typedoc stays on 0.27: 0.28 has the same dependency).
As a project document it turned the docs into a module "index": every page was prefixed with it (classes/index.Image.html instead of classes/Image.html), breaking the links to imagescript.dev.
imagescript.dev only gets the docs of final releases, so the link was a 404 for the release candidates.
Without a permissions block the jobs got the repository's default token, with write access to contents, packages, actions and more.
…ame renderSVG and renderText with their class
…time and keep textPaths on long paths working

This branch was previously deployed

2 inactive (outdated) deployments
jsr — 4fdb9f67 Deployed Nov 15, 2026 by matmen via jsr / publish #36
npm — 4fdb9f67 Deployed Nov 15, 2026 by matmen via publish #36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant