@mrclrchtr/supi-lsp 11.0.1 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -6
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +41 -1
- package/node_modules/ignore/README.md +36 -10
- package/node_modules/ignore/index.d.ts +3 -2
- package/node_modules/ignore/index.js +57 -53
- package/node_modules/ignore/legacy.js +50 -46
- package/node_modules/ignore/package.json +1 -1
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/vscode-jsonrpc/README.md +5 -0
- package/node_modules/vscode-jsonrpc/lib/browser/ril.js +8 -0
- package/node_modules/vscode-jsonrpc/lib/common/connection.js +7 -2
- package/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +8 -0
- package/node_modules/vscode-jsonrpc/lib/node/main.d.ts +14 -0
- package/node_modules/vscode-jsonrpc/lib/node/main.js +6 -4
- package/node_modules/vscode-jsonrpc/lib/node/ril.js +5 -1
- package/node_modules/vscode-jsonrpc/package.json +4 -2
- package/node_modules/vscode-languageserver-protocol/package.json +4 -3
- package/node_modules/vscode-languageserver-types/lib/esm/main.js +2 -2
- package/node_modules/vscode-languageserver-types/lib/umd/main.js +2 -2
- package/node_modules/vscode-languageserver-types/package.json +2 -1
- package/package.json +8 -6
- package/src/client/client.ts +44 -5
- package/src/config/config.ts +53 -2
- package/src/config/operation-support.ts +19 -4
- package/src/config/server-config.ts +22 -0
- package/src/config/typescript-launch.ts +276 -0
- package/src/manager/manager-project-info.ts +22 -10
- package/src/manager/manager.ts +53 -20
- package/src/provider/refactor-planning.ts +4 -3
- package/src/session/runtime-controller.ts +2 -2
- package/src/session/scanner.ts +27 -15
|
@@ -26,6 +26,8 @@ var ESCAPE = '\\';
|
|
|
26
26
|
var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
|
|
27
27
|
var BOM = "\uFEFF";
|
|
28
28
|
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
29
|
+
// A run of two or more asterisks is a globstar (#175)
|
|
30
|
+
var REGEX_ANCHORED_GLOBSTAR = /^\/\*{2,}$/;
|
|
29
31
|
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
30
32
|
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
31
33
|
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
@@ -386,6 +388,18 @@ var REPLACERS = [
|
|
|
386
388
|
/(\\+)( ?)/g, function (_, run, space) {
|
|
387
389
|
return space ? run.slice(0, run.length - run.length % 2) + SPACE : run;
|
|
388
390
|
}, ESCAPE + SPACE],
|
|
391
|
+
// git's wildmatch() reads a run of two or more asterisks as one globstar
|
|
392
|
+
// whenever the run fills a path segment: it starts the pattern or follows
|
|
393
|
+
// a `/`, and it ends the pattern or comes before a `/`. A run of two is
|
|
394
|
+
// already `**`; a longer one is folded into `**` here, so the steps
|
|
395
|
+
// below only ever have to know `**`.
|
|
396
|
+
// `***/foo` -> `**/foo`, `a/***/b` -> `a/**/b`, `a/***` -> `a/**`
|
|
397
|
+
// git also takes a run beside a literal prefix (`a***/b`) or beside an
|
|
398
|
+
// escaped slash (`***\/b`) as a globstar, and this does not; the README
|
|
399
|
+
// lists both, under "A run of asterisks".
|
|
400
|
+
[/(^|\/)\*{3,}(?=\/|$)/g, function (_, start) {
|
|
401
|
+
return "".concat(start, "**");
|
|
402
|
+
}, '*'],
|
|
389
403
|
// Escape metacharacters
|
|
390
404
|
// which is written down by users but means special for regular expressions.
|
|
391
405
|
|
|
@@ -754,6 +768,14 @@ var pinWildcards = function pinWildcards(source) {
|
|
|
754
768
|
|
|
755
769
|
// @param {pattern}
|
|
756
770
|
var makeRegexPrefix = function makeRegexPrefix(pattern) {
|
|
771
|
+
// `/**` matches every path, as `**` does. The translation below only finds
|
|
772
|
+
// a globstar beside a slash it keeps, and the leading one is turned into
|
|
773
|
+
// an anchor, so `/**` would come out as `/*` and match one level only.
|
|
774
|
+
// Here rather than in `createRule`, so that `checkSourceOf`, which
|
|
775
|
+
// compiles `/**/` again without its trailing slash, gets it too.
|
|
776
|
+
if (REGEX_ANCHORED_GLOBSTAR.test(pattern)) {
|
|
777
|
+
pattern = '**';
|
|
778
|
+
}
|
|
757
779
|
var _extractBrackets = extractBrackets(pattern),
|
|
758
780
|
source = _extractBrackets.source,
|
|
759
781
|
sources = _extractBrackets.sources;
|
|
@@ -1081,19 +1103,12 @@ var RuleManager = /*#__PURE__*/function () {
|
|
|
1081
1103
|
|
|
1082
1104
|
// Test one single path without recursively checking parent directories
|
|
1083
1105
|
//
|
|
1084
|
-
// -
|
|
1085
|
-
// setting `checkUnignored` to `false` could reduce additional
|
|
1086
|
-
// path matching.
|
|
1087
|
-
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
1106
|
+
// - mode `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
1088
1107
|
|
|
1089
|
-
// @returns {TestResult}
|
|
1108
|
+
// @returns {TestResult}
|
|
1090
1109
|
}, {
|
|
1091
1110
|
key: "test",
|
|
1092
|
-
value: function test(path,
|
|
1093
|
-
var ignored = false;
|
|
1094
|
-
var unignored = false;
|
|
1095
|
-
var matchedRule;
|
|
1096
|
-
|
|
1111
|
+
value: function test(path, mode) {
|
|
1097
1112
|
// Most of a .gitignore is patterns with no slash in them, and running
|
|
1098
1113
|
// those against the whole path makes the regular expression engine walk
|
|
1099
1114
|
// every directory name on the way to the only segment that could match.
|
|
@@ -1104,40 +1119,31 @@ var RuleManager = /*#__PURE__*/function () {
|
|
|
1104
1119
|
var shortcut = this._basenameCount * 2 >= length;
|
|
1105
1120
|
var basename = shortcut ? basenameOf(path) : path;
|
|
1106
1121
|
|
|
1122
|
+
// The last rule to match decides, as in git, and it is the rule
|
|
1123
|
+
// `git check-ignore -v` reports, so the scan runs from the end and stops
|
|
1124
|
+
// at the first match.
|
|
1107
1125
|
// A plain loop rather than `forEach`, so that `path`, `basename` and
|
|
1108
1126
|
// `shortcut` are locals. As a callback they became closure variables,
|
|
1109
1127
|
// and reaching for one of those once per rule cost 10% of a scan over a
|
|
1110
1128
|
// large rule set -- more than the shortcut they were there to serve.
|
|
1111
|
-
for (var index =
|
|
1129
|
+
for (var index = length - 1; index >= 0; index--) {
|
|
1112
1130
|
var rule = rules[index];
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
// - TEST: always test
|
|
1124
|
-
// - TESTIF: only test if checkUnignored
|
|
1125
|
-
// - X: that never happen
|
|
1126
|
-
var skip = unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored;
|
|
1127
|
-
if (!skip && rule[mode].test(shortcut && rule._basenameOnly ? basename : path)) {
|
|
1128
|
-
ignored = !negative;
|
|
1129
|
-
unignored = negative;
|
|
1130
|
-
matchedRule = negative ? UNDEFINED : rule;
|
|
1131
|
+
if (rule[mode].test(shortcut && rule._basenameOnly ? basename : path)) {
|
|
1132
|
+
var negative = rule.negative;
|
|
1133
|
+
var ret = {
|
|
1134
|
+
ignored: !negative,
|
|
1135
|
+
unignored: negative
|
|
1136
|
+
};
|
|
1137
|
+
if (!negative) {
|
|
1138
|
+
ret.rule = rule;
|
|
1139
|
+
}
|
|
1140
|
+
return ret;
|
|
1131
1141
|
}
|
|
1132
1142
|
}
|
|
1133
|
-
|
|
1134
|
-
ignored:
|
|
1135
|
-
unignored:
|
|
1143
|
+
return {
|
|
1144
|
+
ignored: false,
|
|
1145
|
+
unignored: false
|
|
1136
1146
|
};
|
|
1137
|
-
if (matchedRule) {
|
|
1138
|
-
ret.rule = matchedRule;
|
|
1139
|
-
}
|
|
1140
|
-
return ret;
|
|
1141
1147
|
}
|
|
1142
1148
|
}]);
|
|
1143
1149
|
return RuleManager;
|
|
@@ -1249,12 +1255,12 @@ var Ignore = /*#__PURE__*/function () {
|
|
|
1249
1255
|
// @returns {TestResult}
|
|
1250
1256
|
}, {
|
|
1251
1257
|
key: "_test",
|
|
1252
|
-
value: function _test(originalPath, cache
|
|
1258
|
+
value: function _test(originalPath, cache) {
|
|
1253
1259
|
var path = originalPath
|
|
1254
1260
|
// Supports nullable path
|
|
1255
1261
|
&& checkPath.convert(originalPath);
|
|
1256
1262
|
checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
1257
|
-
return this._t(path, cache
|
|
1263
|
+
return this._t(path, cache);
|
|
1258
1264
|
}
|
|
1259
1265
|
}, {
|
|
1260
1266
|
key: "checkIgnore",
|
|
@@ -1268,7 +1274,7 @@ var Ignore = /*#__PURE__*/function () {
|
|
|
1268
1274
|
// Like `git check-ignore`: a directory excluded by itself or by an
|
|
1269
1275
|
// ancestor settles it, and only then is the literal 'abc/' matched
|
|
1270
1276
|
// against the rules (see `checkSourceOf`).
|
|
1271
|
-
var dir = this._t(path, this._testCache
|
|
1277
|
+
var dir = this._t(path, this._testCache);
|
|
1272
1278
|
if (dir.ignored) {
|
|
1273
1279
|
return dir;
|
|
1274
1280
|
}
|
|
@@ -1281,25 +1287,23 @@ var Ignore = /*#__PURE__*/function () {
|
|
|
1281
1287
|
// The path to be tested
|
|
1282
1288
|
path,
|
|
1283
1289
|
// The cache for the result of a certain checking
|
|
1284
|
-
cache
|
|
1285
|
-
// Whether should check if the path is unignored
|
|
1286
|
-
checkUnignored) {
|
|
1290
|
+
cache) {
|
|
1287
1291
|
if (path in cache) {
|
|
1288
1292
|
return cache[path];
|
|
1289
1293
|
}
|
|
1290
1294
|
var parentPath = parentOf(path);
|
|
1291
1295
|
|
|
1292
1296
|
// If the path contains a parent directory, check the parent first
|
|
1293
|
-
var parent = parentPath ? this._t(parentPath, cache
|
|
1297
|
+
var parent = parentPath ? this._t(parentPath, cache) : UNDEFINED;
|
|
1294
1298
|
return cache[path] = parent && parent.ignored
|
|
1295
1299
|
// > It is not possible to re-include a file if a parent directory of
|
|
1296
1300
|
// > that file is excluded.
|
|
1297
|
-
? parent : this._rules.test(path,
|
|
1301
|
+
? parent : this._rules.test(path, MODE_IGNORE);
|
|
1298
1302
|
}
|
|
1299
1303
|
}, {
|
|
1300
1304
|
key: "ignores",
|
|
1301
1305
|
value: function ignores(path) {
|
|
1302
|
-
return this._test(path, this._ignoreCache
|
|
1306
|
+
return this._test(path, this._ignoreCache).ignored;
|
|
1303
1307
|
}
|
|
1304
1308
|
}, {
|
|
1305
1309
|
key: "createFilter",
|
|
@@ -1319,7 +1323,7 @@ var Ignore = /*#__PURE__*/function () {
|
|
|
1319
1323
|
}, {
|
|
1320
1324
|
key: "test",
|
|
1321
1325
|
value: function test(path) {
|
|
1322
|
-
return this._test(path, this._testCache
|
|
1326
|
+
return this._test(path, this._testCache);
|
|
1323
1327
|
}
|
|
1324
1328
|
}]);
|
|
1325
1329
|
return Ignore;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|