- Inline semver
This commit is contained in:
Sandeep Somavarapu 2020-10-26 12:11:55 +01:00
parent 202174687f
commit 88144f6d31
25 changed files with 385 additions and 41 deletions

View file

@ -5,6 +5,7 @@
**/vs/loader.js
**/insane/**
**/marked/**
**/semver/**
**/test/**/*.js
**/node_modules/**
**/vscode-api-tests/testWorkspace/**

View file

@ -523,7 +523,6 @@
"vscode-textmate",
"vscode-oniguruma",
"iconv-lite-umd",
"semver-umd",
"tas-client-umd",
"jschardet"
]
@ -556,7 +555,6 @@
"vscode-textmate",
"vscode-oniguruma",
"iconv-lite-umd",
"semver-umd",
"jschardet"
]
},
@ -587,7 +585,6 @@
"vscode-textmate",
"vscode-oniguruma",
"iconv-lite-umd",
"semver-umd",
"jschardet"
]
},
@ -640,7 +637,6 @@
{
"target": "**/vs/workbench/contrib/extensions/browser/**",
"restrictions": [
"semver-umd",
"vs/nls",
"vs/css!./**/*",
"**/vs/base/**/{common,browser}/**",
@ -654,7 +650,6 @@
{
"target": "**/vs/workbench/contrib/update/browser/update.ts",
"restrictions": [
"semver-umd",
"vs/nls",
"vs/css!./**/*",
"**/vs/base/**/{common,browser}/**",
@ -708,7 +703,6 @@
"vscode-textmate",
"vscode-oniguruma",
"iconv-lite-umd",
"semver-umd",
"jschardet"
]
},
@ -742,7 +736,6 @@
"vscode-textmate",
"vscode-oniguruma",
"iconv-lite-umd",
"semver-umd",
"jschardet"
]
},

View file

@ -49,6 +49,7 @@ const indentationFilter = [
'!src/vs/loader.js',
'!src/vs/base/common/insane/insane.js',
'!src/vs/base/common/marked/marked.js',
'!src/vs/base/common/semver/semver.js',
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!test/unit/assert.js',
@ -134,6 +135,7 @@ const jsHygieneFilter = [
'!src/vs/nls.build.js',
'!src/**/insane.js',
'!src/**/marked.js',
'!src/**/semver.js',
'!**/test/**',
];
module.exports.jsHygieneFilter = jsHygieneFilter;

View file

@ -60,7 +60,6 @@
"native-keymap": "2.2.0",
"native-watchdog": "1.3.0",
"node-pty": "0.10.0-beta17",
"semver-umd": "^5.5.7",
"spdlog": "^0.11.1",
"sudo-prompt": "9.1.1",
"tas-client-umd": "0.1.2",
@ -195,4 +194,4 @@
"windows-mutex": "0.3.0",
"windows-process-tree": "0.2.4"
}
}
}

View file

@ -13,7 +13,6 @@
"minimist": "^1.2.5",
"native-watchdog": "1.3.0",
"node-pty": "0.10.0-beta17",
"semver-umd": "^5.5.7",
"spdlog": "^0.11.1",
"tas-client-umd": "0.1.2",
"vscode-nsfw": "1.2.9",

View file

@ -4,7 +4,6 @@
"dependencies": {
"iconv-lite-umd": "0.6.8",
"jschardet": "2.2.1",
"semver-umd": "^5.5.7",
"tas-client-umd": "0.1.2",
"vscode-oniguruma": "1.3.1",
"vscode-textmate": "5.2.0",

View file

@ -12,11 +12,6 @@ jschardet@2.2.1:
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.2.1.tgz#03b0264669a90c7a5c436a68c5a7d4e4cb0c9823"
integrity sha512-Ks2JNuUJoc7PGaZ7bVFtSEvOcr0rBq6Q1J5/7+zKWLT+g+4zziL63O0jg7y2jxhzIa1LVsHUbPXrbaWmz9iwDw==
semver-umd@^5.5.7:
version "5.5.7"
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.7.tgz#966beb5e96c7da6fbf09c3da14c2872d6836c528"
integrity sha512-XgjPNlD0J6aIc8xoTN6GQGwWc2Xg0kq8NzrqMVuKG/4Arl6ab1F8+Am5Y/XKKCR+FceFr2yN/Uv5ZJBhRyRqKg==
tas-client-umd@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/tas-client-umd/-/tas-client-umd-0.1.2.tgz#fe93ae085f65424292ac79feff4f1add3e50e624"

View file

@ -333,11 +333,6 @@ readdirp@~3.5.0:
dependencies:
picomatch "^2.2.1"
semver-umd@^5.5.7:
version "5.5.7"
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.7.tgz#966beb5e96c7da6fbf09c3da14c2872d6836c528"
integrity sha512-XgjPNlD0J6aIc8xoTN6GQGwWc2Xg0kq8NzrqMVuKG/4Arl6ab1F8+Am5Y/XKKCR+FceFr2yN/Uv5ZJBhRyRqKg==
semver@^5.3.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"

View file

@ -119,7 +119,6 @@
'xterm-addon-search': `../node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
'xterm-addon-unicode11': `../node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`,
'xterm-addon-webgl': `../node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
'semver-umd': `../node_modules/semver-umd/lib/semver-umd.js`,
'iconv-lite-umd': `../node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`,
'jschardet': `../node_modules/jschardet/dist/jschardet.min.js`,
};

View file

@ -0,0 +1,34 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "semver",
"repositoryUrl": "https://github.com/npm/node-semver",
"commitHash": "44cbc8482ac4f0f8d2de0abb7f8808056d2d55f9"
}
},
"license": "The ISC License",
"version": "5.5.0",
"licenseDetail": [
"The ISC License",
"",
"Copyright (c) Isaac Z. Schlueter and Contributors",
"",
"Permission to use, copy, modify, and/or distribute this software for any",
"purpose with or without fee is hereby granted, provided that the above",
"copyright notice and this permission notice appear in all copies.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES",
"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF",
"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR",
"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES",
"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN",
"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR",
"IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."
]
}
],
"version": 1
}

312
src/vs/base/common/semver/semver.d.ts vendored Normal file
View file

@ -0,0 +1,312 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export as namespace semver;
export = semver;
declare namespace semver {
// Type definitions for semver 6.2
// Project: https://github.com/npm/node-semver
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// BendingBender <https://github.com/BendingBender>
// Lucian Buzzo <https://github.com/LucianBuzzo>
// Klaus Meinhardt <https://github.com/ajafff>
// ExE Boss <https://github.com/ExE-Boss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver
export const SEMVER_SPEC_VERSION: "2.0.0";
export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease";
export interface Options {
loose?: boolean;
includePrerelease?: boolean;
}
export interface CoerceOptions extends Options {
/**
* Used by `coerce()` to coerce from right to left.
*
* @default false
*
* @example
* coerce('1.2.3.4', { rtl: true });
* // => SemVer { version: '2.3.4', ... }
*
* @since 6.2.0
*/
rtl?: boolean;
}
/**
* Return the parsed version as a SemVer object, or null if it's not valid.
*/
export function parse(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): SemVer | null;
/**
* Return the parsed version as a string, or null if it's not valid.
*/
export function valid(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): string | null;
/**
* Coerces a string to SemVer if possible
*/
export function coerce(version: string | number | SemVer | null | undefined, options?: CoerceOptions): SemVer | null;
/**
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
*/
export function clean(version: string, optionsOrLoose?: boolean | Options): string | null;
/**
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
*/
export function inc(version: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
export function inc(version: string | SemVer, release: ReleaseType, identifier?: string): string | null;
/**
* Return the major version number.
*/
export function major(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
/**
* Return the minor version number.
*/
export function minor(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
/**
* Return the patch version number.
*/
export function patch(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
/**
* Returns an array of prerelease components, or null if none exist.
*/
export function prerelease(version: string | SemVer, optionsOrLoose?: boolean | Options): ReadonlyArray<string> | null;
// Comparison
/**
* v1 > v2
*/
export function gt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* v1 >= v2
*/
export function gte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* v1 < v2
*/
export function lt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* v1 <= v2
*/
export function lte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings.
*/
export function eq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* v1 != v2 The opposite of eq.
*/
export function neq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
/**
* Pass in a comparison string, and it'll call the corresponding semver comparison function.
* "===" and "!==" do simple string comparison, but are included for completeness.
* Throws if an invalid comparison string is provided.
*/
export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<=';
/**
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
*
* Sorts in ascending order when passed to `Array.sort()`.
*
* @return
* - `0` if `v1` == `v2`
* - `1` if `v1` is greater
* - `-1` if `v2` is greater.
*/
export function compare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
/**
* The reverse of compare.
*
* Sorts in descending order when passed to `Array.sort()`.
*/
export function rcompare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
/**
* Compares two identifiers, must be numeric strings or truthy/falsy values.
*
* Sorts in ascending order when passed to `Array.sort()`.
*/
export function compareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
/**
* The reverse of compareIdentifiers.
*
* Sorts in descending order when passed to `Array.sort()`.
*/
export function rcompareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
/**
* Compares two versions including build identifiers (the bit after `+` in the semantic version string).
*
* Sorts in ascending order when passed to `Array.sort()`.
*
* @return
* - `0` if `v1` == `v2`
* - `1` if `v1` is greater
* - `-1` if `v2` is greater.
*
* @since 6.1.0
*/
export function compareBuild(a: string | SemVer, b: string | SemVer): 1 | 0 | -1;
/**
* Sorts an array of semver entries in ascending order using `compareBuild()`.
*/
export function sort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
/**
* Sorts an array of semver entries in descending order using `compareBuild()`.
*/
export function rsort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
/**
* Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same.
*/
export function diff(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): ReleaseType | null;
// Ranges
/**
* Return the valid range or null if it's not valid
*/
export function validRange(range: string | Range | null | undefined, optionsOrLoose?: boolean | Options): string;
/**
* Return true if the version satisfies the range.
*/
export function satisfies(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
/**
* Return the highest version in the list that satisfies the range, or null if none of them do.
*/
export function maxSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, optionsOrLoose?: boolean | Options): T | null;
/**
* Return the lowest version in the list that satisfies the range, or null if none of them do.
*/
export function minSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, optionsOrLoose?: boolean | Options): T | null;
/**
* Return the lowest version that can possibly match the given range.
*/
export function minVersion(range: string | Range, optionsOrLoose?: boolean | Options): SemVer | null;
/**
* Return true if version is greater than all the versions possible in the range.
*/
export function gtr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
/**
* Return true if version is less than all the versions possible in the range.
*/
export function ltr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
/**
* Return true if the version is outside the bounds of the range in either the high or low direction.
* The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.)
*/
export function outside(version: string | SemVer, range: string | Range, hilo: '>' | '<', optionsOrLoose?: boolean | Options): boolean;
/**
* Return true if any of the ranges comparators intersect
*/
export function intersects(range1: string | Range, range2: string | Range, optionsOrLoose?: boolean | Options): boolean;
export class SemVer {
constructor(version: string | SemVer, optionsOrLoose?: boolean | Options);
raw: string;
loose: boolean;
options: Options;
format(): string;
inspect(): string;
major: number;
minor: number;
patch: number;
version: string;
build: ReadonlyArray<string>;
prerelease: ReadonlyArray<string | number>;
/**
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
*
* @return
* - `0` if `this` == `other`
* - `1` if `this` is greater
* - `-1` if `other` is greater.
*/
compare(other: string | SemVer): 1 | 0 | -1;
/**
* Compares the release portion of two versions.
*
* @return
* - `0` if `this` == `other`
* - `1` if `this` is greater
* - `-1` if `other` is greater.
*/
compareMain(other: string | SemVer): 1 | 0 | -1;
/**
* Compares the prerelease portion of two versions.
*
* @return
* - `0` if `this` == `other`
* - `1` if `this` is greater
* - `-1` if `other` is greater.
*/
comparePre(other: string | SemVer): 1 | 0 | -1;
/**
* Compares the build identifier of two versions.
*
* @return
* - `0` if `this` == `other`
* - `1` if `this` is greater
* - `-1` if `other` is greater.
*/
compareBuild(other: string | SemVer): 1 | 0 | -1;
inc(release: ReleaseType, identifier?: string): SemVer;
}
export class Comparator {
constructor(comp: string | Comparator, optionsOrLoose?: boolean | Options);
semver: SemVer;
operator: '' | '=' | '<' | '>' | '<=' | '>=';
value: string;
loose: boolean;
options: Options;
parse(comp: string): void;
test(version: string | SemVer): boolean;
intersects(comp: Comparator, optionsOrLoose?: boolean | Options): boolean;
}
export class Range {
constructor(range: string | Range, optionsOrLoose?: boolean | Options);
range: string;
raw: string;
loose: boolean;
options: Options;
includePrerelease: boolean;
format(): string;
inspect(): string;
set: ReadonlyArray<ReadonlyArray<Comparator>>;
parseRange(range: string): ReadonlyArray<Comparator>;
test(version: string | SemVer): boolean;
intersects(range: Range, optionsOrLoose?: boolean | Options): boolean;
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -41,7 +41,6 @@
'xterm-addon-search': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
'xterm-addon-unicode11': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`,
'xterm-addon-webgl': `${window.location.origin}/static/remote/web/node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
'semver-umd': `${window.location.origin}/static/remote/web/node_modules/semver-umd/lib/semver-umd.js`,
'tas-client-umd': `${window.location.origin}/static/remote/web/node_modules/tas-client-umd/lib/tas-client-umd.js`,
'iconv-lite-umd': `${window.location.origin}/static/remote/web/node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`,
'jschardet': `${window.location.origin}/static/remote/web/node_modules/jschardet/dist/jschardet.min.js`,

View file

@ -22,8 +22,6 @@
<link rel="manifest" href="/manifest.json">
<link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="./static/out/vs/workbench/workbench.web.api.css">
<!-- Prefetch to avoid waterfall -->
<link rel="prefetch" href="./static/node_modules/semver-umd/lib/semver-umd.js">
</head>
<body aria-label="">
@ -42,7 +40,6 @@
'xterm-addon-search': `${window.location.origin}/static/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
'xterm-addon-unicode11': `${window.location.origin}/static/node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`,
'xterm-addon-webgl': `${window.location.origin}/static/node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
'semver-umd': `${window.location.origin}/static/node_modules/semver-umd/lib/semver-umd.js`,
'tas-client-umd': `${window.location.origin}/static/node_modules/tas-client-umd/lib/tas-client-umd.js`,
'iconv-lite-umd': `${window.location.origin}/static/node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`,
'jschardet': `${window.location.origin}/static/node_modules/jschardet/dist/jschardet.min.js`,

View file

@ -5,6 +5,7 @@
import { localize } from 'vs/nls';
import { raceTimeout } from 'vs/base/common/async';
import * as semver from 'vs/base/common/semver/semver';
import product from 'vs/platform/product/common/product';
import * as path from 'vs/base/common/path';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
@ -274,8 +275,6 @@ export class Main {
throw new Error('Invalid vsix');
}
const semver = await import('semver-umd');
const extensionIdentifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
const installedExtensions = await this.extensionManagementService.getInstalled(ExtensionType.User);
const newer = installedExtensions.find(local => areSameExtensions(extensionIdentifier, local.identifier) && semver.gt(local.manifest.version, manifest.version));

View file

@ -12,7 +12,7 @@ import { joinPath } from 'vs/base/common/resources';
import { ExtensionIdentifierWithVersion, groupByExtension } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { ILogService } from 'vs/platform/log/common/log';
import { generateUuid } from 'vs/base/common/uuid';
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
const ExtensionIdVersionRegex = /^([^.]+\..+)-(\d+\.\d+\.\d+)$/;

View file

@ -26,7 +26,7 @@ import { areSameExtensions, getGalleryExtensionId, getMaliciousExtensionsSet, ge
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { createCancelablePromise, CancelablePromise } from 'vs/base/common/async';
import { Event, Emitter } from 'vs/base/common/event';
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
import { URI } from 'vs/base/common/uri';
import product from 'vs/platform/product/common/product';
import { isMacintosh } from 'vs/base/common/platform';

View file

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
import { Disposable } from 'vs/base/common/lifecycle';
import * as pfs from 'vs/base/node/pfs';
import * as path from 'vs/base/common/path';

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vs/nls';
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
import { Event, Emitter } from 'vs/base/common/event';
import { index, distinct } from 'vs/base/common/arrays';
import { ThrottledDelayer } from 'vs/base/common/async';

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as Objects from 'vs/base/common/objects';
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
import { IStringDictionary } from 'vs/base/common/collections';
import { WorkbenchState, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { ITaskSystem } from 'vs/workbench/contrib/tasks/common/taskSystem';

View file

@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vs/nls';
import * as semver from 'vs/base/common/semver/semver';
import severity from 'vs/base/common/severity';
import { Action } from 'vs/base/common/actions';
import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle';
@ -159,7 +160,6 @@ export class ProductContribution implements IWorkbenchContribution {
}
// should we show the new license?
const semver = await import('semver-umd');
if (productService.licenseUrl && lastVersion && semver.satisfies(lastVersion, '<1.0.0') && semver.satisfies(productService.version, '>=1.0.0')) {
notificationService.info(nls.localize('licenseChanged', "Our license terms have changed, please click [here]({0}) to go through them.", productService.licenseUrl));
}

View file

@ -24,6 +24,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
import { Event } from 'vs/base/common/event';
import { localizeManifest } from 'vs/platform/extensionManagement/common/extensionNls';
import { localize } from 'vs/nls';
import * as semver from 'vs/base/common/semver/semver';
interface IUserExtension {
identifier: IExtensionIdentifier;
@ -272,7 +273,6 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten
}
private async scanUserExtensions(): Promise<IScannedExtension[]> {
const semver = await import('semver-umd');
let userExtensions = await this.readUserExtensions();
const byExtension: IUserExtension[][] = groupByExtension(userExtensions, e => e.identifier);
userExtensions = byExtension.map(p => p.sort((a, b) => semver.rcompare(a.version, b.version))[0]);

View file

@ -5,7 +5,7 @@
import * as nls from 'vs/nls';
import * as path from 'vs/base/common/path';
import * as semver from 'semver-umd';
import * as semver from 'vs/base/common/semver/semver';
import * as json from 'vs/base/common/json';
import * as arrays from 'vs/base/common/arrays';
import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages';

View file

@ -8212,11 +8212,6 @@ semver-greatest-satisfied-range@^1.1.0:
dependencies:
sver-compat "^1.5.0"
semver-umd@^5.5.7:
version "5.5.7"
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.7.tgz#966beb5e96c7da6fbf09c3da14c2872d6836c528"
integrity sha512-XgjPNlD0J6aIc8xoTN6GQGwWc2Xg0kq8NzrqMVuKG/4Arl6ab1F8+Am5Y/XKKCR+FceFr2yN/Uv5ZJBhRyRqKg==
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"