Skip to content

Commit

Permalink
Revert "fixes #415"
Browse files Browse the repository at this point in the history
This reverts commit e4a8df5.
  • Loading branch information
joaomoreno committed Feb 3, 2020
1 parent 2ca36aa commit 285c184
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('validateVersion', () => {
it('should validate', () => {
validateVersion('1.0.0');
validateVersion('0.1.1');
validateVersion('0.1.1-pre');

assert.throws(() => validateVersion('.'));
assert.throws(() => validateVersion('..'));
Expand All @@ -65,7 +66,6 @@ describe('validateVersion', () => {
assert.throws(() => validateVersion('.0.1'));
assert.throws(() => validateVersion('0.1.'));
assert.throws(() => validateVersion('0.0.0.1'));
assert.throws(() => validateVersion('0.1.1-pre'));
});
});

Expand Down
4 changes: 0 additions & 4 deletions src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ export function validateVersion(version: string): void {
if (!semver.valid(version)) {
throw new Error(`Invalid extension version '${version}'`);
}

if (semver.prerelease(version)) {
throw new Error(`Invalid extension version '${version}: semver prerelease field is not supported`);
}
}

export function validateEngineCompatibility(version: string): void {
Expand Down

0 comments on commit 285c184

Please sign in to comment.