Skip to content

Commit

Permalink
#596 fix issue with semver validation for latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
1yuv committed Jan 5, 2024
1 parent 958f0b4 commit 1a1cc09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fn/upload-app-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function augmentDeclarativeWithNoolsBoilerplate(appSettings) {
}

const actualCoreVersion = await getValidApiVersion(appSettings);
const addNoolsBoilerplate = semver.lt(actualCoreVersion, '4.2.0-dev');
const addNoolsBoilerplate = actualCoreVersion && semver.lt(actualCoreVersion, '4.2.0-dev');
if (addNoolsBoilerplate) {
appSettings.tasks.rules = nools.addBoilerplateToCode(appSettings.tasks.rules);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/get-api-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getApiVersion = async () => {
};

const getValidApiVersion = async () => {
return semver.valid(await getApiVersion());
return semver.valid(semver.coerce(await getApiVersion()));
};

module.exports = { getValidApiVersion };

0 comments on commit 1a1cc09

Please sign in to comment.