@mrclrchtr/supi-lsp 2.3.2 → 2.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-code-runtime",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "!__tests__"
30
30
  ],
31
31
  "dependencies": {
32
- "@mrclrchtr/supi-core": "2.3.2"
32
+ "@mrclrchtr/supi-core": "2.4.0"
33
33
  },
34
34
  "bundledDependencies": [
35
35
  "@mrclrchtr/supi-core"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -57,6 +57,15 @@ const sanitizeRange = range => range.replace(
57
57
  : EMPTY
58
58
  )
59
59
 
60
+ // > An optional `!` or `^` at the start of a class negates it, so that it
61
+ // > matches any character not in the set. (gitignore(5), fnmatch(3))
62
+ // The leading `^` has already been escaped to `\^` by the metacharacter
63
+ // escaper, so we strip the literal `!` or escaped `^` and emit a single
64
+ // regex `^` which is the JavaScript negation token.
65
+ const negateRange = range => range.startsWith('!') || range.startsWith('\\^')
66
+ ? `^${range.slice(range[0] === '!' ? 1 : 2)}`
67
+ : range
68
+
60
69
  // See fixtures #59
61
70
  const cleanRangeBackSlash = slashes => {
62
71
  const {length} = slashes
@@ -161,7 +170,7 @@ const REPLACERS = [
161
170
  // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
162
171
  // > under directory "foo".
163
172
  // Notice that the '*'s have been replaced as '\\*'
164
- /^\^*\\\*\\\*\\\//,
173
+ /^\^*(?:\\\*\\\*\\\/)+/,
165
174
 
166
175
  // '**/foo' <-> 'foo'
167
176
  () => '^(?:.*\\/)?'
@@ -272,7 +281,7 @@ const REPLACERS = [
272
281
  // A normal case, and it is a range notation
273
282
  // '[bar]'
274
283
  // '[bar\\\\]'
275
- ? `[${sanitizeRange(range)}${endEscape}]`
284
+ ? `[${negateRange(sanitizeRange(range))}${endEscape}]`
276
285
  // Invalid range notaton
277
286
  // '[bar\\]' -> '[bar\\\\]'
278
287
  : '[]'
@@ -69,6 +69,15 @@ var sanitizeRange = function sanitizeRange(range) {
69
69
  });
70
70
  };
71
71
 
72
+ // > An optional `!` or `^` at the start of a class negates it, so that it
73
+ // > matches any character not in the set. (gitignore(5), fnmatch(3))
74
+ // The leading `^` has already been escaped to `\^` by the metacharacter
75
+ // escaper, so we strip the literal `!` or escaped `^` and emit a single
76
+ // regex `^` which is the JavaScript negation token.
77
+ var negateRange = function negateRange(range) {
78
+ return range.startsWith('!') || range.startsWith('\\^') ? "^".concat(range.slice(range[0] === '!' ? 1 : 2)) : range;
79
+ };
80
+
72
81
  // See fixtures #59
73
82
  var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) {
74
83
  var length = slashes.length;
@@ -152,7 +161,7 @@ var REPLACERS = [[
152
161
  // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
153
162
  // > under directory "foo".
154
163
  // Notice that the '*'s have been replaced as '\\*'
155
- /^\^*\\\*\\\*\\\//,
164
+ /^\^*(?:\\\*\\\*\\\/)+/,
156
165
  // '**/foo' <-> 'foo'
157
166
  function () {
158
167
  return '^(?:.*\\/)?';
@@ -248,7 +257,7 @@ function (_, p1, p2) {
248
257
  // A normal case, and it is a range notation
249
258
  // '[bar]'
250
259
  // '[bar\\\\]'
251
- ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton
260
+ ? "[".concat(negateRange(sanitizeRange(range))).concat(endEscape, "]") // Invalid range notaton
252
261
  // '[bar\\]' -> '[bar\\\\]'
253
262
  : '[]' : '[]';
254
263
  }],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ignore",
3
- "version": "7.0.5",
3
+ "version": "7.0.6",
4
4
  "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.",
5
5
  "types": "index.d.ts",
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-lsp",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "SuPi LSP extension — Language Server Protocol integration for pi",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,8 +38,8 @@
38
38
  "vscode-jsonrpc": "^9.0.0",
39
39
  "vscode-languageserver-protocol": "^3.17.5",
40
40
  "vscode-languageserver-types": "^3.17.5",
41
- "@mrclrchtr/supi-code-runtime": "2.3.2",
42
- "@mrclrchtr/supi-core": "2.3.2"
41
+ "@mrclrchtr/supi-code-runtime": "2.4.0",
42
+ "@mrclrchtr/supi-core": "2.4.0"
43
43
  },
44
44
  "bundledDependencies": [
45
45
  "@mrclrchtr/supi-code-runtime",