From 9802fb88753b1943f307a6f9a33a212cf9aae73e Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:36:19 -0400 Subject: [PATCH] fix(postinstall): correctly parse the prerelease object (#174) Fixes: #165 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 4 ++++ src/postinstall.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87f3bc5..3d66b18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: test: strategy: matrix: - os: [macos-13, ubuntu-22.04, windows-2022] + os: [macos-14, ubuntu-22.04, windows-2022] fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index f0bf491..f34ba8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Changed + +- Correctly parse the prerelease object. + ## [0.88.0] ### Changed diff --git a/src/postinstall.js b/src/postinstall.js index 6222b05..45e2b19 100644 --- a/src/postinstall.js +++ b/src/postinstall.js @@ -45,7 +45,7 @@ async function postinstall() { */ const prerelease = String(parsedVersion?.prerelease[0]); /* Check build flavor and slice that off the `version`. */ - if (prerelease.endsWith('-sdk')) { + if (prerelease.endsWith('sdk')) { flavor = 'sdk'; }