From 97b06137d4bd4c88546b88907d84cca7950fd946 Mon Sep 17 00:00:00 2001 From: Chiri Vulpes Date: Sun, 11 Aug 2024 12:10:38 +1200 Subject: [PATCH] v5.0.1, add colourless mana to Card.produced_mana --- CHANGELOG.md | 3 +++ package-lock.json | 4 ++-- package.json | 2 +- src/IScry.ts | 1 + src/api/Cards.ts | 4 ++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4418e..391a0fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v5.0.1 (August 11th, 2024) +- Add the potentiality of colourless mana (`"C"`) to `Card.produced_mana`. + # v5.0.0 (August 8th, 2024) - Added support for setting the agent name due to [Scryfall's new requirements](https://scryfall.com/blog/user-agent-and-accept-header-now-required-on-the-api-225) via `Scry.setAgent(name, version)`(./DOCUMENTATION.md#scrysetagent-agent-string-version-string-void-). All applications using scryfall-sdk that are not running on clientside in the browser must provide an agent name & version. diff --git a/package-lock.json b/package-lock.json index 29fd103..815a676 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scryfall-sdk", - "version": "4.2.2", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "scryfall-sdk", - "version": "4.2.2", + "version": "5.0.1", "license": "MIT", "devDependencies": { "@types/chai": "4.3.4", diff --git a/package.json b/package.json index c0e51fd..89fc7f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scryfall-sdk", - "version": "5.0.0", + "version": "5.0.1", "main": "./out/Scry.js", "types": "./out/Scry.d.ts", "description": "A Node.js SDK for https://scryfall.com/docs/api written in Typescript.", diff --git a/src/IScry.ts b/src/IScry.ts index 622e873..aff5c07 100644 --- a/src/IScry.ts +++ b/src/IScry.ts @@ -20,6 +20,7 @@ enum Colors { } export type Color = keyof typeof Colors; +export type ColorOrColorless = keyof typeof Colors | "C"; export namespace IScry { export let fuzzySearch: ((search: string, targets: T[], key: keyof T) => T | undefined) | undefined; diff --git a/src/api/Cards.ts b/src/api/Cards.ts index 8e763ef..4f6b5c0 100644 --- a/src/api/Cards.ts +++ b/src/api/Cards.ts @@ -1,4 +1,4 @@ -import { Color, RESOURCE_GENERIC_CARD_BACK, SYMBOL_COST, SYMBOL_PRINTS, SYMBOL_RULINGS, SYMBOL_SET, SYMBOL_TEXT } from "../IScry"; +import { Color, ColorOrColorless, RESOURCE_GENERIC_CARD_BACK, SYMBOL_COST, SYMBOL_PRINTS, SYMBOL_RULINGS, SYMBOL_SET, SYMBOL_TEXT } from "../IScry"; import Cached from "../util/Cached"; import MagicEmitter from "../util/MagicEmitter"; import MagicQuerier, { ApiCatalog, List, TOrArrayOfT } from "../util/MagicQuerier"; @@ -428,7 +428,7 @@ export class Card implements CardFaceMethods { oracle_text?: string | null; penny_rank?: number | null; power?: string | null; - produced_mana?: Color[] | null; + produced_mana?: ColorOrColorless[] | null; reserved: boolean; toughness?: string | null; type_line: string;