From 417ba496303be177fd5d9c8bbf84e848e740c83a Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Wed, 15 Jan 2025 11:45:23 -0800 Subject: [PATCH] chore: update schema-record to stable, add better release log for error --- packages/schema-record/package.json | 2 +- release/strategy.json | 2 +- release/utils/json-file.ts | 9 +++++++-- release/utils/package.ts | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/schema-record/package.json b/packages/schema-record/package.json index fbb715893ff..2bb92903957 100644 --- a/packages/schema-record/package.json +++ b/packages/schema-record/package.json @@ -1,6 +1,6 @@ { "name": "@warp-drive/schema-record", - "version": "0.0.0-alpha.113", + "version": "5.4.0-alpha.127", "description": "Schema Driven Resource Presentation for WarpDrive and EmberData", "keywords": [ "ember-addon" diff --git a/release/strategy.json b/release/strategy.json index 801015370e3..20149cf59a2 100644 --- a/release/strategy.json +++ b/release/strategy.json @@ -90,7 +90,7 @@ "mirrorPublish": false }, "@warp-drive/schema-record": { - "stage": "alpha", + "stage": "stable", "types": "alpha", "typesPublish": false, "mirrorPublish": true diff --git a/release/utils/json-file.ts b/release/utils/json-file.ts index 07b2726a896..a52b2cec442 100644 --- a/release/utils/json-file.ts +++ b/release/utils/json-file.ts @@ -33,10 +33,15 @@ export class JSONFile> { this.contents = null; } - async read(): Promise { + async read(logRaw: boolean = false): Promise { if (this.contents === null) { const fileHandle = await this.#getHandle(); - const data = await fileHandle.json(); + const data = await fileHandle.json().catch(async (e) => { + console.log(e); + const strData = await fileHandle.text(); + console.log(strData); + throw e; + }); this.contents = data; this.#lastKnown = JSON.stringify(data, null, 2); } diff --git a/release/utils/package.ts b/release/utils/package.ts index 9a0b1387575..4f01e9e0b51 100644 --- a/release/utils/package.ts +++ b/release/utils/package.ts @@ -21,7 +21,7 @@ export class Package { async refresh() { await this.file.invalidate(); - this.pkgData = await this.file.read(); + this.pkgData = await this.file.read(true); } }