coc-pyright 1.1.243 → 1.1.252

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.
Files changed (2) hide show
  1. package/lib/index.js +76 -57
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -20241,11 +20241,15 @@ var require_minimatch = __commonJS({
20241
20241
  "node_modules/minimatch/minimatch.js"(exports, module2) {
20242
20242
  module2.exports = minimatch;
20243
20243
  minimatch.Minimatch = Minimatch2;
20244
- var path10 = { sep: "/" };
20245
- try {
20246
- path10 = require("path");
20247
- } catch (er) {
20248
- }
20244
+ var path10 = function() {
20245
+ try {
20246
+ return require("path");
20247
+ } catch (e) {
20248
+ }
20249
+ }() || {
20250
+ sep: "/"
20251
+ };
20252
+ minimatch.sep = path10.sep;
20249
20253
  var GLOBSTAR = minimatch.GLOBSTAR = Minimatch2.GLOBSTAR = {};
20250
20254
  var expand = require_brace_expansion();
20251
20255
  var plTypes = {
@@ -20275,58 +20279,68 @@ var require_minimatch = __commonJS({
20275
20279
  };
20276
20280
  }
20277
20281
  function ext(a, b) {
20278
- a = a || {};
20279
20282
  b = b || {};
20280
20283
  var t = {};
20281
- Object.keys(b).forEach(function(k) {
20282
- t[k] = b[k];
20283
- });
20284
20284
  Object.keys(a).forEach(function(k) {
20285
20285
  t[k] = a[k];
20286
20286
  });
20287
+ Object.keys(b).forEach(function(k) {
20288
+ t[k] = b[k];
20289
+ });
20287
20290
  return t;
20288
20291
  }
20289
20292
  minimatch.defaults = function(def) {
20290
- if (!def || !Object.keys(def).length)
20293
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
20291
20294
  return minimatch;
20295
+ }
20292
20296
  var orig = minimatch;
20293
20297
  var m = function minimatch2(p, pattern, options) {
20294
- return orig.minimatch(p, pattern, ext(def, options));
20298
+ return orig(p, pattern, ext(def, options));
20295
20299
  };
20296
20300
  m.Minimatch = function Minimatch3(pattern, options) {
20297
20301
  return new orig.Minimatch(pattern, ext(def, options));
20298
20302
  };
20303
+ m.Minimatch.defaults = function defaults(options) {
20304
+ return orig.defaults(ext(def, options)).Minimatch;
20305
+ };
20306
+ m.filter = function filter2(pattern, options) {
20307
+ return orig.filter(pattern, ext(def, options));
20308
+ };
20309
+ m.defaults = function defaults(options) {
20310
+ return orig.defaults(ext(def, options));
20311
+ };
20312
+ m.makeRe = function makeRe2(pattern, options) {
20313
+ return orig.makeRe(pattern, ext(def, options));
20314
+ };
20315
+ m.braceExpand = function braceExpand2(pattern, options) {
20316
+ return orig.braceExpand(pattern, ext(def, options));
20317
+ };
20318
+ m.match = function(list, pattern, options) {
20319
+ return orig.match(list, pattern, ext(def, options));
20320
+ };
20299
20321
  return m;
20300
20322
  };
20301
20323
  Minimatch2.defaults = function(def) {
20302
- if (!def || !Object.keys(def).length)
20303
- return Minimatch2;
20304
20324
  return minimatch.defaults(def).Minimatch;
20305
20325
  };
20306
20326
  function minimatch(p, pattern, options) {
20307
- if (typeof pattern !== "string") {
20308
- throw new TypeError("glob pattern string required");
20309
- }
20327
+ assertValidPattern(pattern);
20310
20328
  if (!options)
20311
20329
  options = {};
20312
20330
  if (!options.nocomment && pattern.charAt(0) === "#") {
20313
20331
  return false;
20314
20332
  }
20315
- if (pattern.trim() === "")
20316
- return p === "";
20317
20333
  return new Minimatch2(pattern, options).match(p);
20318
20334
  }
20319
20335
  function Minimatch2(pattern, options) {
20320
20336
  if (!(this instanceof Minimatch2)) {
20321
20337
  return new Minimatch2(pattern, options);
20322
20338
  }
20323
- if (typeof pattern !== "string") {
20324
- throw new TypeError("glob pattern string required");
20325
- }
20339
+ assertValidPattern(pattern);
20326
20340
  if (!options)
20327
20341
  options = {};
20328
20342
  pattern = pattern.trim();
20329
- if (path10.sep !== "/") {
20343
+ if (!options.allowWindowsEscape && path10.sep !== "/") {
20330
20344
  pattern = pattern.split(path10.sep).join("/");
20331
20345
  }
20332
20346
  this.options = options;
@@ -20336,14 +20350,13 @@ var require_minimatch = __commonJS({
20336
20350
  this.negate = false;
20337
20351
  this.comment = false;
20338
20352
  this.empty = false;
20353
+ this.partial = !!options.partial;
20339
20354
  this.make();
20340
20355
  }
20341
20356
  Minimatch2.prototype.debug = function() {
20342
20357
  };
20343
20358
  Minimatch2.prototype.make = make;
20344
20359
  function make() {
20345
- if (this._made)
20346
- return;
20347
20360
  var pattern = this.pattern;
20348
20361
  var options = this.options;
20349
20362
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -20357,7 +20370,9 @@ var require_minimatch = __commonJS({
20357
20370
  this.parseNegate();
20358
20371
  var set = this.globSet = this.braceExpand();
20359
20372
  if (options.debug)
20360
- this.debug = console.error;
20373
+ this.debug = function debug() {
20374
+ console.error.apply(console, arguments);
20375
+ };
20361
20376
  this.debug(this.pattern, set);
20362
20377
  set = this.globParts = set.map(function(s) {
20363
20378
  return s.split(slashSplit);
@@ -20402,23 +20417,32 @@ var require_minimatch = __commonJS({
20402
20417
  }
20403
20418
  }
20404
20419
  pattern = typeof pattern === "undefined" ? this.pattern : pattern;
20405
- if (typeof pattern === "undefined") {
20406
- throw new TypeError("undefined pattern");
20407
- }
20408
- if (options.nobrace || !pattern.match(/\{.*\}/)) {
20420
+ assertValidPattern(pattern);
20421
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
20409
20422
  return [pattern];
20410
20423
  }
20411
20424
  return expand(pattern);
20412
20425
  }
20426
+ var MAX_PATTERN_LENGTH = 1024 * 64;
20427
+ var assertValidPattern = function(pattern) {
20428
+ if (typeof pattern !== "string") {
20429
+ throw new TypeError("invalid pattern");
20430
+ }
20431
+ if (pattern.length > MAX_PATTERN_LENGTH) {
20432
+ throw new TypeError("pattern is too long");
20433
+ }
20434
+ };
20413
20435
  Minimatch2.prototype.parse = parse;
20414
20436
  var SUBPARSE = {};
20415
20437
  function parse(pattern, isSub) {
20416
- if (pattern.length > 1024 * 64) {
20417
- throw new TypeError("pattern is too long");
20418
- }
20438
+ assertValidPattern(pattern);
20419
20439
  var options = this.options;
20420
- if (!options.noglobstar && pattern === "**")
20421
- return GLOBSTAR;
20440
+ if (pattern === "**") {
20441
+ if (!options.noglobstar)
20442
+ return GLOBSTAR;
20443
+ else
20444
+ pattern = "*";
20445
+ }
20422
20446
  if (pattern === "")
20423
20447
  return "";
20424
20448
  var re = "";
@@ -20459,8 +20483,9 @@ var require_minimatch = __commonJS({
20459
20483
  continue;
20460
20484
  }
20461
20485
  switch (c) {
20462
- case "/":
20486
+ case "/": {
20463
20487
  return false;
20488
+ }
20464
20489
  case "\\":
20465
20490
  clearStateChar();
20466
20491
  escaping = true;
@@ -20544,17 +20569,15 @@ var require_minimatch = __commonJS({
20544
20569
  escaping = false;
20545
20570
  continue;
20546
20571
  }
20547
- if (inClass) {
20548
- var cs = pattern.substring(classStart + 1, i);
20549
- try {
20550
- RegExp("[" + cs + "]");
20551
- } catch (er) {
20552
- var sp = this.parse(cs, SUBPARSE);
20553
- re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
20554
- hasMagic = hasMagic || sp[1];
20555
- inClass = false;
20556
- continue;
20557
- }
20572
+ var cs = pattern.substring(classStart + 1, i);
20573
+ try {
20574
+ RegExp("[" + cs + "]");
20575
+ } catch (er) {
20576
+ var sp = this.parse(cs, SUBPARSE);
20577
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
20578
+ hasMagic = hasMagic || sp[1];
20579
+ inClass = false;
20580
+ continue;
20558
20581
  }
20559
20582
  hasMagic = true;
20560
20583
  inClass = false;
@@ -20596,8 +20619,8 @@ var require_minimatch = __commonJS({
20596
20619
  }
20597
20620
  var addPatternStart = false;
20598
20621
  switch (re.charAt(0)) {
20599
- case ".":
20600
20622
  case "[":
20623
+ case ".":
20601
20624
  case "(":
20602
20625
  addPatternStart = true;
20603
20626
  }
@@ -20684,8 +20707,9 @@ var require_minimatch = __commonJS({
20684
20707
  }
20685
20708
  return list;
20686
20709
  };
20687
- Minimatch2.prototype.match = match;
20688
- function match(f, partial) {
20710
+ Minimatch2.prototype.match = function match(f, partial) {
20711
+ if (typeof partial === "undefined")
20712
+ partial = this.partial;
20689
20713
  this.debug("match", f, this.pattern);
20690
20714
  if (this.comment)
20691
20715
  return false;
@@ -20724,7 +20748,7 @@ var require_minimatch = __commonJS({
20724
20748
  if (options.flipNegate)
20725
20749
  return false;
20726
20750
  return this.negate;
20727
- }
20751
+ };
20728
20752
  Minimatch2.prototype.matchOne = function(file, pattern, partial) {
20729
20753
  var options = this.options;
20730
20754
  this.debug("matchOne", { "this": this, file, pattern });
@@ -20772,11 +20796,7 @@ var require_minimatch = __commonJS({
20772
20796
  }
20773
20797
  var hit;
20774
20798
  if (typeof p === "string") {
20775
- if (options.nocase) {
20776
- hit = f.toLowerCase() === p.toLowerCase();
20777
- } else {
20778
- hit = f === p;
20779
- }
20799
+ hit = f === p;
20780
20800
  this.debug("string match", p, f, hit);
20781
20801
  } else {
20782
20802
  hit = f.match(p);
@@ -20790,8 +20810,7 @@ var require_minimatch = __commonJS({
20790
20810
  } else if (fi === fl) {
20791
20811
  return partial;
20792
20812
  } else if (pi === pl) {
20793
- var emptyFileEnd = fi === fl - 1 && file[fi] === "";
20794
- return emptyFileEnd;
20813
+ return fi === fl - 1 && file[fi] === "";
20795
20814
  }
20796
20815
  throw new Error("wtf?");
20797
20816
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coc-pyright",
3
- "version": "1.1.243",
3
+ "version": "1.1.252",
4
4
  "description": "Pyright extension for coc.nvim, static type checker for Python",
5
5
  "author": "Heyward Fann <fannheyward@gmail.com>",
6
6
  "license": "MIT",
@@ -1403,6 +1403,6 @@
1403
1403
  ]
1404
1404
  },
1405
1405
  "dependencies": {
1406
- "pyright": "^1.1.243"
1406
+ "pyright": "^1.1.251"
1407
1407
  }
1408
1408
  }