From ac937e21297f2d7f818292796a56359839165f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Afonso=20Janu=C3=A1rio?= Date: Fri, 4 Sep 2026 13:28:26 +0100 Subject: [PATCH] Restore the public polyad() method polyad(number) was commented out back when 1.6.0's ESM publish was still in flux, gated on issue #254 as a temporary measure. That issue closed once 1.6.0 shipped, but nobody went back and uncommented the method or removed the ignore flag on its test, so it's been silently unreachable on master and in the published package ever since. Calling tinycolor("red").polyad(3) throws "polyad is not a function" even though the internal helper backing it, and the triad()/tetrad() methods built on top of the same helper, all work fine. Uncommented the method in mod.js and dropped the ignore: true from its Deno test, which already had the full 9-assertion spec written and waiting. Ran the full local suite (deno test test.js): 46 passed, 0 failed, including all the polyad assertions. Didn't touch the generated npm/dist bundles since those come out of the repo's own build step (deno task build), which needs network access to a couple of external packages that isn't available here to reproduce cleanly - the source change is the same either way, and running the build is presumably already part of the release process. --- mod.js | 7 +++---- test.js | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mod.js b/mod.js index be6b3825..7770ae0d 100644 --- a/mod.js +++ b/mod.js @@ -309,10 +309,9 @@ tinycolor.prototype = { splitcomplement: function () { return this._applyCombination(splitcomplement, arguments); }, - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - // polyad: function (number) { - // return this._applyCombination(polyad, [number]); - // }, + polyad: function (number) { + return this._applyCombination(polyad, [number]); + }, triad: function () { return this._applyCombination(polyad, [3]); }, diff --git a/test.js b/test.js index d6003428..19c385e0 100644 --- a/test.js +++ b/test.js @@ -2140,8 +2140,6 @@ Deno.test("tetrad", function () { Deno.test({ name: "polyad", - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - ignore: true, fn: function () { assertThrows(() => { tinycolor("red").polyad();