@nkzw/palette-swap 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,13 +155,13 @@ function paletteSwap(image, inputVariants, staticColors, images, options) {
155
155
  }
156
156
  if (!options?.ignoreMissing && missing.size) {
157
157
  throw new Error(
158
- `There is no mapping for ${Array.from(
158
+ `${options?.imageName ? `${options.imageName}` : "Pallete Swap"}: Missing ${Array.from(
159
159
  new Set(
160
160
  [...missing].map(
161
- ([variant, color]) => `'${int32ToHex(color)}' in variant '${variant}'`
161
+ ([variant, color]) => `'${int32ToHex(color)}' in '${variant}'`
162
162
  )
163
163
  )
164
- ).join(", ")} in the palette${options?.imageName ? ` for image '${options?.imageName}'` : ""}.`
164
+ ).join(", ")}.`
165
165
  );
166
166
  }
167
167
  for (let i2 = 0; i2 < variants.length; i2++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkzw/palette-swap",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "author": "Christoph Nakazawa <christoph.pojer@gmail.com>",
5
5
  "description": "Image palette swapping and color replacement tool based on canvas for Node.js and browsers.",
6
6
  "repository": {
@@ -19,14 +19,14 @@
19
19
  "node": ">=18.0.0"
20
20
  },
21
21
  "dependencies": {
22
- "canvas": "^2.10.2"
22
+ "canvas": "^2.11.2"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/color-convert": "^2.0.0",
26
- "@types/node": "^18.11.18",
25
+ "@types/color-convert": "^2.0.3",
26
+ "@types/node": "^20.10.6",
27
27
  "canvas": "^2.11.0",
28
- "esbuild": "^0.17.2",
29
- "typescript": "^4.9.4"
28
+ "esbuild": "^0.19.11",
29
+ "typescript": "^5.3.3"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "mkdir -p lib && rm lib/*; tsc --declaration --emitDeclarationOnly --noEmit false && esbuild --target=node18 --format=esm --platform=node --outfile=lib/palette-swap.js --external:canvas --bundle ./src/palette-swap.js",