Skip to content

Commit

Permalink
fix: Remove preview field from package.json (#3795)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Nov 18, 2024
1 parent 11cf662 commit fcc96ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion scripts/set-preview-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit fcc96ea

Please sign in to comment.