@jslint-org/jslint 2026.7.30 → 2026.8.31

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/CHANGELOG.md CHANGED
@@ -11,6 +11,10 @@
11
11
  - jslint - Add new warning requiring paren around plus-separated concatenations.
12
12
  - jslint - Try to improve parser to be able to parse jquery.js without stopping.
13
13
 
14
+ # v2026.8.31
15
+ - jslint-ci - Update ci-shell-function shGitLsTree() to include sha256 hash of files.
16
+ - jslint-editor - Update codemirror-editor to v5.65.21.
17
+
14
18
  # v2026.7.30
15
19
  - jslint-ecma - Add ES2015-feature for..of.
16
20
  - jslint - Disable directive-option /*jslint for*/, replacing it with for-loop specific warnings.
package/README.md CHANGED
@@ -3,7 +3,7 @@ Douglas Crockford <douglas@crockford.com>
3
3
 
4
4
 
5
5
  # Status
6
- | Branch | [master<br>(v2026.7.30)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
6
+ | Branch | [master<br>(v2026.8.31)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
7
7
  |--:|:--:|:--:|:--:|
8
8
  | CI | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) |
9
9
  | Coverage | [![coverage](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) |
@@ -397,11 +397,11 @@ import jslint from "../jslint.mjs";
397
397
 
398
398
  <!-- Assets from codemirror. -->
399
399
 
400
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.css">
401
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.css">
402
- <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.js"></script>
403
- <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/mode/javascript/javascript.js"></script>
404
- <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.js"></script>
400
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/codemirror.css">
401
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/addon/lint/lint.css">
402
+ <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/codemirror.js"></script>
403
+ <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/mode/javascript/javascript.js"></script>
404
+ <script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/addon/lint/lint.js"></script>
405
405
 
406
406
  <!-- Assets from jslint. -->
407
407
 
@@ -980,7 +980,7 @@ if (false) {
980
980
  <br><br>
981
981
  # License
982
982
  - JSLint is under [Unlicense License](LICENSE).
983
- - CodeMirror editor is under [MIT License](https://github.com/codemirror/codemirror5/blob/d0e3b2e727c41aa4fd89fbad0adfb3815339174c/LICENSE).
983
+ - CodeMirror editor is under [MIT License](https://github.com/codemirror/codemirror5/blob/34b84359c4ce289086c82c203f66ef74614d8a0d/LICENSE).
984
984
  - Function `v8CoverageListMerge` is derived from [MIT Licensed v8-coverage](https://github.com/demurgos/v8-coverage/blob/73446087dc38f61b09832c9867122a23f8577099/ts/LICENSE.md).
985
985
 
986
986
 
@@ -1068,7 +1068,7 @@ if (false) {
1068
1068
  - verify ci-success @ https://github.com/kaizhu256/jslint/actions
1069
1069
  - verify ci-success @ https://github.com/jslint-org/jslint/actions
1070
1070
 
1071
- 1. goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2026.7.30
1071
+ 1. goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2026.8.31
1072
1072
  - click `Create pull request`
1073
1073
  - input `Add a title *` with: `# v20yy.mm.dd`
1074
1074
  - input `Add a description` with:
@@ -5,26 +5,26 @@ shRollupFetch
5
5
  "fetchList": [
6
6
  {
7
7
  "comment": true,
8
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/LICENSE"
8
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/LICENSE"
9
9
  },
10
10
  {
11
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js",
12
- "url2": "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.js"
11
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/codemirror.js",
12
+ "url2": "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.21/codemirror.js"
13
13
  },
14
14
  {
15
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/matchbrackets.js"
15
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/addon/edit/matchbrackets.js"
16
16
  },
17
17
  {
18
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/trailingspace.js"
18
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/addon/edit/trailingspace.js"
19
19
  },
20
20
  {
21
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js"
21
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/addon/lint/lint.js"
22
22
  },
23
23
  {
24
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/addon/selection/active-line.js"
24
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/addon/selection/active-line.js"
25
25
  },
26
26
  {
27
- "url": "https://github.com/codemirror/codemirror5/blob/5.65.10/mode/javascript/javascript.js"
27
+ "url": "https://github.com/codemirror/codemirror5/blob/5.65.21/mode/javascript/javascript.js"
28
28
  }
29
29
  ],
30
30
  "replaceList": []
@@ -33,18 +33,18 @@ shRollupFetch
33
33
 
34
34
 
35
35
  /*
36
- repo https://github.com/codemirror/codemirror5/tree/5.65.10
37
- committed 2022-11-20T15:35:33Z
36
+ repo https://github.com/codemirror/codemirror5/tree/5.65.21
37
+ committed 2026-02-07T07:44:03Z
38
38
  */
39
39
 
40
40
 
41
41
  /*
42
- file https://github.com/codemirror/codemirror5/blob/5.65.10/LICENSE
42
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/LICENSE
43
43
  */
44
44
  /*
45
45
  MIT License
46
46
 
47
- Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others
47
+ Copyright (C) 2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
48
48
 
49
49
  Permission is hereby granted, free of charge, to any person obtaining a copy
50
50
  of this software and associated documentation files (the "Software"), to deal
@@ -67,7 +67,7 @@ THE SOFTWARE.
67
67
 
68
68
 
69
69
  /*
70
- file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
70
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/codemirror.js
71
71
  */
72
72
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
73
73
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -183,13 +183,14 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
183
183
  } while (child = child.parentNode)
184
184
  }
185
185
 
186
- function activeElt(doc) {
186
+ function activeElt(rootNode) {
187
187
  // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
188
188
  // IE < 10 will throw when accessed while the page is loading or in an iframe.
189
189
  // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
190
+ var doc = rootNode.ownerDocument || rootNode;
190
191
  var activeElement;
191
192
  try {
192
- activeElement = doc.activeElement;
193
+ activeElement = rootNode.activeElement;
193
194
  } catch(e) {
194
195
  activeElement = doc.body || null;
195
196
  }
@@ -217,6 +218,15 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
217
218
 
218
219
  function doc(cm) { return cm.display.wrapper.ownerDocument }
219
220
 
221
+ function root(cm) {
222
+ return rootNode(cm.display.wrapper)
223
+ }
224
+
225
+ function rootNode(element) {
226
+ // Detect modern browsers (2017+).
227
+ return element.getRootNode ? element.getRootNode() : element.ownerDocument
228
+ }
229
+
220
230
  function win(cm) { return doc(cm).defaultView }
221
231
 
222
232
  function bind(f) {
@@ -227,7 +237,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
227
237
  function copyObj(obj, target, overwrite) {
228
238
  if (!target) { target = {}; }
229
239
  for (var prop in obj)
230
- { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
240
+ { if (Object.prototype.hasOwnProperty.call(obj, prop) && (overwrite !== false || !Object.prototype.hasOwnProperty.call(target, prop)))
231
241
  { target[prop] = obj[prop]; } }
232
242
  return target
233
243
  }
@@ -3486,7 +3496,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
3486
3496
  }
3487
3497
 
3488
3498
  // Compute the lines that are visible in a given viewport (defaults
3489
- // the the current scroll position). viewport may contain top,
3499
+ // the current scroll position). viewport may contain top,
3490
3500
  // height, and ensure (see op.scrollToPos) properties.
3491
3501
  function visibleLines(display, doc, viewport) {
3492
3502
  var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
@@ -3971,7 +3981,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
3971
3981
  cm.display.maxLineChanged = false;
3972
3982
  }
3973
3983
 
3974
- var takeFocus = op.focus && op.focus == activeElt(doc(cm));
3984
+ var takeFocus = op.focus && op.focus == activeElt(root(cm));
3975
3985
  if (op.preparedSelection)
3976
3986
  { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
3977
3987
  if (op.updatedDisplay || op.startHeight != cm.doc.height)
@@ -4148,7 +4158,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
4148
4158
 
4149
4159
  function selectionSnapshot(cm) {
4150
4160
  if (cm.hasFocus()) { return null }
4151
- var active = activeElt(doc(cm));
4161
+ var active = activeElt(root(cm));
4152
4162
  if (!active || !contains(cm.display.lineDiv, active)) { return null }
4153
4163
  var result = {activeElt: active};
4154
4164
  if (window.getSelection) {
@@ -4164,7 +4174,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
4164
4174
  }
4165
4175
 
4166
4176
  function restoreSelection(snapshot) {
4167
- if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(snapshot.activeElt.ownerDocument)) { return }
4177
+ if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(rootNode(snapshot.activeElt))) { return }
4168
4178
  snapshot.activeElt.focus();
4169
4179
  if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
4170
4180
  snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
@@ -4487,7 +4497,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
4487
4497
  // The element in which the editor lives.
4488
4498
  d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
4489
4499
  // See #6982. FIXME remove when this has been fixed for a while in Chrome
4490
- if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = "inset(0px)"; }
4500
+ if (chrome && chrome_version === 105) { d.wrapper.style.clipPath = "inset(0px)"; }
4491
4501
 
4492
4502
  // This attribute is respected by automatic translation systems such as Google Translate,
4493
4503
  // and may also be respected by tools used by human translators.
@@ -7335,7 +7345,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7335
7345
  function onKeyDown(e) {
7336
7346
  var cm = this;
7337
7347
  if (e.target && e.target != cm.display.input.getField()) { return }
7338
- cm.curOp.focus = activeElt(doc(cm));
7348
+ cm.curOp.focus = activeElt(root(cm));
7339
7349
  if (signalDOMEvent(cm, e)) { return }
7340
7350
  // IE does strange things with escape.
7341
7351
  if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
@@ -7497,7 +7507,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7497
7507
 
7498
7508
  function leftButtonDown(cm, pos, repeat, event) {
7499
7509
  if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
7500
- else { cm.curOp.focus = activeElt(doc(cm)); }
7510
+ else { cm.curOp.focus = activeElt(root(cm)); }
7501
7511
 
7502
7512
  var behavior = configureMouse(cm, repeat, event);
7503
7513
 
@@ -7567,19 +7577,19 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7567
7577
  // Normal selection, as opposed to text dragging.
7568
7578
  function leftButtonSelect(cm, event, start, behavior) {
7569
7579
  if (ie) { delayBlurEvent(cm); }
7570
- var display = cm.display, doc$1 = cm.doc;
7580
+ var display = cm.display, doc = cm.doc;
7571
7581
  e_preventDefault(event);
7572
7582
 
7573
- var ourRange, ourIndex, startSel = doc$1.sel, ranges = startSel.ranges;
7583
+ var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
7574
7584
  if (behavior.addNew && !behavior.extend) {
7575
- ourIndex = doc$1.sel.contains(start);
7585
+ ourIndex = doc.sel.contains(start);
7576
7586
  if (ourIndex > -1)
7577
7587
  { ourRange = ranges[ourIndex]; }
7578
7588
  else
7579
7589
  { ourRange = new Range(start, start); }
7580
7590
  } else {
7581
- ourRange = doc$1.sel.primary();
7582
- ourIndex = doc$1.sel.primIndex;
7591
+ ourRange = doc.sel.primary();
7592
+ ourIndex = doc.sel.primIndex;
7583
7593
  }
7584
7594
 
7585
7595
  if (behavior.unit == "rectangle") {
@@ -7596,18 +7606,18 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7596
7606
 
7597
7607
  if (!behavior.addNew) {
7598
7608
  ourIndex = 0;
7599
- setSelection(doc$1, new Selection([ourRange], 0), sel_mouse);
7600
- startSel = doc$1.sel;
7609
+ setSelection(doc, new Selection([ourRange], 0), sel_mouse);
7610
+ startSel = doc.sel;
7601
7611
  } else if (ourIndex == -1) {
7602
7612
  ourIndex = ranges.length;
7603
- setSelection(doc$1, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
7613
+ setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
7604
7614
  {scroll: false, origin: "*mouse"});
7605
7615
  } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
7606
- setSelection(doc$1, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
7616
+ setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
7607
7617
  {scroll: false, origin: "*mouse"});
7608
- startSel = doc$1.sel;
7618
+ startSel = doc.sel;
7609
7619
  } else {
7610
- replaceOneSelection(doc$1, ourIndex, ourRange, sel_mouse);
7620
+ replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
7611
7621
  }
7612
7622
 
7613
7623
  var lastPos = start;
@@ -7617,19 +7627,19 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7617
7627
 
7618
7628
  if (behavior.unit == "rectangle") {
7619
7629
  var ranges = [], tabSize = cm.options.tabSize;
7620
- var startCol = countColumn(getLine(doc$1, start.line).text, start.ch, tabSize);
7621
- var posCol = countColumn(getLine(doc$1, pos.line).text, pos.ch, tabSize);
7630
+ var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
7631
+ var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
7622
7632
  var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
7623
7633
  for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
7624
7634
  line <= end; line++) {
7625
- var text = getLine(doc$1, line).text, leftPos = findColumn(text, left, tabSize);
7635
+ var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
7626
7636
  if (left == right)
7627
7637
  { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
7628
7638
  else if (text.length > leftPos)
7629
7639
  { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
7630
7640
  }
7631
7641
  if (!ranges.length) { ranges.push(new Range(start, start)); }
7632
- setSelection(doc$1, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
7642
+ setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
7633
7643
  {origin: "*mouse", scroll: false});
7634
7644
  cm.scrollIntoView(pos);
7635
7645
  } else {
@@ -7644,8 +7654,8 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7644
7654
  anchor = maxPos(oldRange.to(), range.head);
7645
7655
  }
7646
7656
  var ranges$1 = startSel.ranges.slice(0);
7647
- ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc$1, anchor), head));
7648
- setSelection(doc$1, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
7657
+ ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
7658
+ setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
7649
7659
  }
7650
7660
  }
7651
7661
 
@@ -7661,9 +7671,9 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7661
7671
  var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
7662
7672
  if (!cur) { return }
7663
7673
  if (cmp(cur, lastPos) != 0) {
7664
- cm.curOp.focus = activeElt(doc(cm));
7674
+ cm.curOp.focus = activeElt(root(cm));
7665
7675
  extendTo(cur);
7666
- var visible = visibleLines(display, doc$1);
7676
+ var visible = visibleLines(display, doc);
7667
7677
  if (cur.line >= visible.to || cur.line < visible.from)
7668
7678
  { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
7669
7679
  } else {
@@ -7688,7 +7698,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
7688
7698
  }
7689
7699
  off(display.wrapper.ownerDocument, "mousemove", move);
7690
7700
  off(display.wrapper.ownerDocument, "mouseup", up);
7691
- doc$1.history.lastSelOrigin = null;
7701
+ doc.history.lastSelOrigin = null;
7692
7702
  }
7693
7703
 
7694
7704
  var move = operation(cm, function (e) {
@@ -8330,8 +8340,8 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
8330
8340
  }
8331
8341
 
8332
8342
  function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
8333
- field.setAttribute("autocorrect", autocorrect ? "" : "off");
8334
- field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
8343
+ field.setAttribute("autocorrect", autocorrect ? "on" : "off");
8344
+ field.setAttribute("autocapitalize", autocapitalize ? "on" : "off");
8335
8345
  field.setAttribute("spellcheck", !!spellcheck);
8336
8346
  }
8337
8347
 
@@ -8346,7 +8356,6 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
8346
8356
  else { te.setAttribute("wrap", "off"); }
8347
8357
  // If border: 0; -- iOS fails to open keyboard (issue #1287)
8348
8358
  if (ios) { te.style.border = "1px solid black"; }
8349
- disableBrowserMagic(te);
8350
8359
  return div
8351
8360
  }
8352
8361
 
@@ -8689,7 +8698,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
8689
8698
 
8690
8699
  signal(this, "overwriteToggle", this, this.state.overwrite);
8691
8700
  },
8692
- hasFocus: function() { return this.display.input.getField() == activeElt(doc(this)) },
8701
+ hasFocus: function() { return this.display.input.getField() == activeElt(root(this)) },
8693
8702
  isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
8694
8703
 
8695
8704
  scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
@@ -8967,9 +8976,10 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
8967
8976
  }
8968
8977
  // Old-fashioned briefly-focus-a-textarea hack
8969
8978
  var kludge = hiddenTextarea(), te = kludge.firstChild;
8979
+ disableBrowserMagic(te);
8970
8980
  cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
8971
8981
  te.value = lastCopied.text.join("\n");
8972
- var hadFocus = activeElt(div.ownerDocument);
8982
+ var hadFocus = activeElt(rootNode(div));
8973
8983
  selectInput(te);
8974
8984
  setTimeout(function () {
8975
8985
  cm.display.lineSpace.removeChild(kludge);
@@ -8992,7 +9002,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
8992
9002
 
8993
9003
  ContentEditableInput.prototype.prepareSelection = function () {
8994
9004
  var result = prepareSelection(this.cm, false);
8995
- result.focus = activeElt(this.div.ownerDocument) == this.div;
9005
+ result.focus = activeElt(rootNode(this.div)) == this.div;
8996
9006
  return result
8997
9007
  };
8998
9008
 
@@ -9088,7 +9098,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
9088
9098
 
9089
9099
  ContentEditableInput.prototype.focus = function () {
9090
9100
  if (this.cm.options.readOnly != "nocursor") {
9091
- if (!this.selectionInEditor() || activeElt(this.div.ownerDocument) != this.div)
9101
+ if (!this.selectionInEditor() || activeElt(rootNode(this.div)) != this.div)
9092
9102
  { this.showSelection(this.prepareSelection(), true); }
9093
9103
  this.div.focus();
9094
9104
  }
@@ -9531,6 +9541,8 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
9531
9541
  // The semihidden textarea that is focused when the editor is
9532
9542
  // focused, and receives input.
9533
9543
  this.textarea = this.wrapper.firstChild;
9544
+ var opts = this.cm.options;
9545
+ disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize);
9534
9546
  };
9535
9547
 
9536
9548
  TextareaInput.prototype.screenReaderLabelChanged = function (label) {
@@ -9594,7 +9606,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
9594
9606
  TextareaInput.prototype.supportsTouch = function () { return false };
9595
9607
 
9596
9608
  TextareaInput.prototype.focus = function () {
9597
- if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt(this.textarea.ownerDocument) != this.textarea)) {
9609
+ if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt(rootNode(this.textarea)) != this.textarea)) {
9598
9610
  try { this.textarea.focus(); }
9599
9611
  catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
9600
9612
  }
@@ -9801,7 +9813,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
9801
9813
  // Set autofocus to true if this textarea is focused, or if it has
9802
9814
  // autofocus and no other element is focused.
9803
9815
  if (options.autofocus == null) {
9804
- var hasFocus = activeElt(textarea.ownerDocument);
9816
+ var hasFocus = activeElt(rootNode(textarea));
9805
9817
  options.autofocus = hasFocus == textarea ||
9806
9818
  textarea.getAttribute("autofocus") != null && hasFocus == document.body;
9807
9819
  }
@@ -9935,14 +9947,14 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/codemirror.js
9935
9947
 
9936
9948
  addLegacyProps(CodeMirror);
9937
9949
 
9938
- CodeMirror.version = "5.65.10";
9950
+ CodeMirror.version = "5.65.21";
9939
9951
 
9940
9952
  return CodeMirror;
9941
9953
  })));
9942
9954
 
9943
9955
 
9944
9956
  /*
9945
- file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/matchbrackets.js
9957
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/addon/edit/matchbrackets.js
9946
9958
  */
9947
9959
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
9948
9960
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -9973,7 +9985,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/matchbrac
9973
9985
  afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)
9974
9986
  var re = bracketRegex(config)
9975
9987
 
9976
- // A cursor is defined as between two characters, but in in vim command mode
9988
+ // A cursor is defined as between two characters, but in vim command mode
9977
9989
  // (i.e. not insert mode), the cursor is visually represented as a
9978
9990
  // highlighted box on top of the 2nd character. Otherwise, we allow matches
9979
9991
  // from before or after the cursor.
@@ -10107,7 +10119,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/matchbrac
10107
10119
 
10108
10120
 
10109
10121
  /*
10110
- file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/trailingspace.js
10122
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/addon/edit/trailingspace.js
10111
10123
  */
10112
10124
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10113
10125
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -10139,7 +10151,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/edit/trailings
10139
10151
 
10140
10152
 
10141
10153
  /*
10142
- file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js
10154
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/addon/lint/lint.js
10143
10155
  */
10144
10156
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10145
10157
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -10167,8 +10179,10 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js
10167
10179
 
10168
10180
  function position(e) {
10169
10181
  if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
10170
- tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
10171
- tt.style.left = (e.clientX + 5) + "px";
10182
+ var top = Math.max(0, e.clientY - tt.offsetHeight - 5);
10183
+ var left = Math.max(0, Math.min(e.clientX + 5, tt.ownerDocument.defaultView.innerWidth - tt.offsetWidth));
10184
+ tt.style.top = top + "px"
10185
+ tt.style.left = left + "px";
10172
10186
  }
10173
10187
  CodeMirror.on(document, "mousemove", position);
10174
10188
  position(e);
@@ -10342,10 +10356,6 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js
10342
10356
  var anns = annotations[line];
10343
10357
  if (!anns) continue;
10344
10358
 
10345
- // filter out duplicate messages
10346
- var message = [];
10347
- anns = anns.filter(function(item) { return message.indexOf(item.message) > -1 ? false : message.push(item.message) });
10348
-
10349
10359
  var maxSeverity = null;
10350
10360
  var tipLabel = state.hasGutter && document.createDocumentFragment();
10351
10361
 
@@ -10363,9 +10373,8 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js
10363
10373
  __annotation: ann
10364
10374
  }));
10365
10375
  }
10366
- // use original annotations[line] to show multiple messages
10367
10376
  if (state.hasGutter)
10368
- cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1,
10377
+ cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, anns.length > 1,
10369
10378
  options.tooltips));
10370
10379
 
10371
10380
  if (options.highlightLines)
@@ -10435,7 +10444,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/lint/lint.js
10435
10444
 
10436
10445
 
10437
10446
  /*
10438
- file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/selection/active-line.js
10447
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/addon/selection/active-line.js
10439
10448
  */
10440
10449
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10441
10450
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -10512,7 +10521,7 @@ file https://github.com/codemirror/codemirror5/blob/5.65.10/addon/selection/acti
10512
10521
 
10513
10522
 
10514
10523
  /*
10515
- file https://github.com/codemirror/codemirror5/blob/5.65.10/mode/javascript/javascript.js
10524
+ file https://github.com/codemirror/codemirror5/blob/5.65.21/mode/javascript/javascript.js
10516
10525
  */
10517
10526
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10518
10527
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
package/jslint.mjs CHANGED
@@ -435,7 +435,7 @@ const jslint_charset_ascii = ( //jslint-ignore-line
435
435
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
436
436
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
437
437
  );
438
- const jslint_edition = "v2026.7.30";
438
+ const jslint_edition = "v2026.8.31";
439
439
  const jslint_fudge = 1; // Fudge starting line and starting
440
440
  // ... column to 1.
441
441
  const jslint_global_dict_all = {
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "shCiArtifactUpload": 1,
36
36
  "shCiPublishNpm": 1,
37
37
  "type": "module",
38
- "version": "2026.7.30"
38
+ "version": "2026.8.31"
39
39
  }