Skip to content

Commit

Permalink
fix(release): revert npm view json parsing back to raw string output
Browse files Browse the repository at this point in the history
closed #22925
  • Loading branch information
gutentag2012 committed May 2, 2024
1 parent 7d1c572 commit 7087cc2
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ export default async function runExecutor(
stdio: ['ignore', 'pipe', 'pipe'],
});

const jsonRegex = /\{(?:[^{}])*\}/g;
const jsonObjectsInOutput = result.toString().match(jsonRegex);
const resultJson = JSON.parse(
jsonObjectsInOutput[jsonObjectsInOutput.length - 1]
);

const resultJson = JSON.parse(result.toString());
const distTags = resultJson['dist-tags'] || {};
if (distTags[tag] === currentVersion) {
console.warn(
Expand Down

0 comments on commit 7087cc2

Please sign in to comment.