Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e078ec9

Browse files
committed
Ignore prerelease suffix when checking compatible Atom versions
1 parent 018b19a commit e078ec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import semver from 'semver';
44

5-
const atomVersion = atom.appVersion;
5+
const {major, minor, patch} = semver.parse(atom.appVersion);
6+
const atomVersion = `${major}.${minor}.${patch}`;
67
const requiredVersion = '>=1.13.0';
78

89
if (atom.inDevMode() || atom.inSpecMode() || semver.satisfies(atomVersion, requiredVersion)) {

0 commit comments

Comments
 (0)