Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/lang-javascript

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lang-javascript - npm Package Compare versions

Comparing version 6.1.6 to 6.1.7

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 6.1.7 (2023-04-19)
### Bug fixes
Fix overeager JSX tag closing inside attribute values and in self-closing tags.
## 6.1.6 (2023-04-13)

@@ -2,0 +8,0 @@

10

dist/index.js

@@ -365,2 +365,5 @@ import { parser } from '@lezer/javascript';

}
function isEndTag(node) {
return node && (node.name == "JSXEndTag" || node.name == "JSXSelfCloseEndTag");
}
const android = typeof navigator == "object" && /*@__PURE__*//Android\b/.test(navigator.userAgent);

@@ -378,7 +381,8 @@ /**

let changes = state.changeByRange(range => {
var _a, _b;
var _a;
let { head } = range, around = syntaxTree(state).resolveInner(head, -1), name;
if (around.name == "JSXStartTag")
around = around.parent;
if (text == ">" && around.name == "JSXFragmentTag") {
if (around.name == "JSXAttributeValue" && around.to > head) ;
else if (text == ">" && around.name == "JSXFragmentTag") {
return { range: EditorSelection.cursor(head + 1), changes: { from: head, insert: `></>` } };

@@ -396,3 +400,3 @@ }

let openTag = findOpenTag(around);
if (openTag && ((_b = openTag.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "JSXEndTag" &&
if (openTag && !isEndTag(openTag.lastChild) &&
state.sliceDoc(head, head + 2) != "</" &&

@@ -399,0 +403,0 @@ (name = elementName(state.doc, openTag, head)))

{
"name": "@codemirror/lang-javascript",
"version": "6.1.6",
"version": "6.1.7",
"description": "JavaScript language support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc