From acea950a326bc56454fa8f44a1a73e2c56b041d5 Mon Sep 17 00:00:00 2001 From: Karl Waldman Date: Tue, 11 Aug 2026 12:32:37 -0400 Subject: [PATCH] Remove stale quota window claim --- CHANGELOG.md | 9 +++++++++ README.md | 4 +++- package-lock.json | 4 ++-- package.json | 2 +- scripts/validate-storefront-claims.mjs | 4 ++++ src/version.ts | 2 +- tests/release-readiness.test.ts | 2 +- tests/storefront-claims.test.ts | 16 ++++++++++++++++ 8 files changed, 37 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 803ea0f..8386bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.4] - 2026-08-11 + +### Fixed + +- Remove the stale monthly quota assumption from customer recovery copy and + reject fixed daily, weekly, monthly, or yearly quota-window claims even when + they do not contain a numeric allowance. Quota recovery now follows the live + API response and reviewed product facts. + ## [1.2.3] - 2026-08-11 ### Fixed diff --git a/README.md b/README.md index 581d3a6..d65fc55 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,9 @@ try { } else if (error instanceof TimeoutError) { console.error("Retry once, then check https://status.oilpriceapi.com."); } else if (isQuotaError(error)) { - console.error(`Monthly quota reached; ${error.remediationUrl ?? "review the account"}.`); + console.error( + `Request quota exhausted; ${error.remediationUrl ?? "follow the API-provided recovery details"}.`, + ); } else if (isEntitlementError(error)) { console.error(`This dataset needs the ${error.requiredPlan ?? "required"} plan.`); } else if (error instanceof OilPriceAPIError) { diff --git a/package-lock.json b/package-lock.json index 5ddb28d..6223119 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "oilpriceapi", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "oilpriceapi", - "version": "1.2.3", + "version": "1.2.4", "license": "MIT", "dependencies": { "ws": "^8.21.0" diff --git a/package.json b/package.json index 4ad0a61..3416d79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oilpriceapi", - "version": "1.2.3", + "version": "1.2.4", "description": "Official Node.js SDK for source-timestamped OilPriceAPI energy data", "type": "module", "main": "./dist/cjs/index.js", diff --git a/scripts/validate-storefront-claims.mjs b/scripts/validate-storefront-claims.mjs index ab1baaa..6a080fa 100644 --- a/scripts/validate-storefront-claims.mjs +++ b/scripts/validate-storefront-claims.mjs @@ -19,6 +19,10 @@ const blocked = [ /\b(?:1,000|100)\s+requests?(?:\/month|\s+per month|\s+\(lifetime\))/i, ], ["quota promise", /\bdoes\s+not\s+consume.{0,40}\bquota\b|\bunlimited\s+(?:history|webhooks?|requests?|commodit)/i], + [ + "fixed quota window", + /\b(?:daily|weekly|monthly|yearly)\s+(?:(?:api|request)\s+)?quota\b|\b(?:(?:api|request)\s+)?quota\b.{0,40}\b(?:daily|weekly|monthly|yearly)\b/i, + ], ["free-tier claim", /\bfree\s+tier\b|\bfree\s+api\s+key\b/i], ["free endpoint claim", /\b(?:endpoint|resource|api)\s+is\s+free\b|\bincluded\s+in\s+all\s+tiers\b/i], ["fixed query allowance", /\b\d[\d,]*\s+(?:station\s+)?queries?\s*(?:\/|per\s+)month\b/i], diff --git a/src/version.ts b/src/version.ts index cd19dd1..1780772 100644 --- a/src/version.ts +++ b/src/version.ts @@ -7,7 +7,7 @@ * - X-Client-Version header * - Package.json (should match) */ -export const SDK_VERSION = "1.2.3"; +export const SDK_VERSION = "1.2.4"; /** * SDK identifier used in User-Agent and X-Api-Client headers diff --git a/tests/release-readiness.test.ts b/tests/release-readiness.test.ts index 3136d1c..4044606 100644 --- a/tests/release-readiness.test.ts +++ b/tests/release-readiness.test.ts @@ -10,7 +10,7 @@ describe("release readiness", () => { const changelog = read("CHANGELOG.md"); const firstRelease = changelog.match(/^## \[([^\]]+)\]/m); - expect(packageJson.version).toBe("1.2.3"); + expect(packageJson.version).toBe("1.2.4"); expect(versionSource).toContain(`SDK_VERSION = "${packageJson.version}"`); expect(firstRelease?.[1]).toBe(packageJson.version); }); diff --git a/tests/storefront-claims.test.ts b/tests/storefront-claims.test.ts index 5c4fa66..1747672 100644 --- a/tests/storefront-claims.test.ts +++ b/tests/storefront-claims.test.ts @@ -51,4 +51,20 @@ describe("public storefront claims", () => { expect.stringContaining("dist/resources/future.d.ts"), ); }); + + it("rejects a fixed quota window without requiring a numeric allowance", () => { + const root = mkdtempSync(join(tmpdir(), "oilpriceapi-package-quota-")); + scratch.push(root); + mkdirSync(join(root, "dist"), { recursive: true }); + writeFileSync( + join(root, "README.md"), + "Monthly quota reached.\nhttps://api.oilpriceapi.com/product-facts.json\n", + ); + writeFileSync(join(root, "package.json"), JSON.stringify({ version: "9.9.9" })); + writeFileSync(join(root, "dist", "version.js"), 'export const SDK_VERSION = "9.9.9";\n'); + + expect(validatePackage(root)).toContainEqual( + expect.stringContaining("fixed quota window"), + ); + }); });