From fcc96eac09bbb0b6cf19c7e06ff9b73c1fe82697 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Mon, 18 Nov 2024 07:28:55 +0000 Subject: [PATCH] fix: Remove `preview` field from `package.json` (#3795) --- .github/workflows/preview.yml | 4 ++-- package.json | 1 - scripts/set-preview-mode.js | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 9eb21c953c..468e4868cf 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,10 +1,10 @@ -name: ' 👀 Set Preview' +name: ' 👀 Set Pre-Release' on: # rebuild any PRs and main branch changes workflow_dispatch: inputs: prerelease: type: boolean - description: Is prerelease / preview? + description: Is prerelease? default: true jobs: diff --git a/package.json b/package.json index 8f415fd1b3..87d0cb179e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "license": "GPL-3.0-or-later", "version": "4.0.16", "publisher": "streetsidesoftware", - "preview": false, "private": true, "type": "module", "main": "./packages/client/dist/extension.cjs", diff --git a/scripts/set-preview-mode.js b/scripts/set-preview-mode.js index 4683c15301..f1624a1f6f 100755 --- a/scripts/set-preview-mode.js +++ b/scripts/set-preview-mode.js @@ -17,7 +17,10 @@ async function run() { const content = await fs.readFile(pkgUrl, 'utf-8'); - const updatedContent = content.replace(isPreviewMode ? '"preview": false' : '"preview": true', `"preview": ${isPreviewMode}`); + const updatedContent = content.replace( + isPreviewMode ? '"pre-release": false' : '"pre-release": true', + `"pre-release": ${isPreviewMode}`, + ); if (content === updatedContent) { console.log('Nothing to update');