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 0.17.1 to 0.17.2

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 0.17.2 (2021-02-15)
### Bug fixes
Improve highlighting tag specificity of defined function and class names. Add indentation information for JSX constructs
Support smart indent for JSX syntax.
## 0.17.1 (2021-01-06)

@@ -2,0 +10,0 @@

15

dist/index.js

@@ -62,3 +62,14 @@ import { parser } from 'lezer-javascript';

"TemplateString BlockComment": () => -1,
"Statement Property": continuedIndent({ except: /^{/ })
"Statement Property": continuedIndent({ except: /^{/ }),
JSXElement(context) {
let closed = /^\s*<\//.test(context.textAfter);
return context.lineIndent(context.state.doc.lineAt(context.node.from)) + (closed ? 0 : context.unit);
},
JSXEscape(context) {
let closed = /\s*\}/.test(context.textAfter);
return context.lineIndent(context.state.doc.lineAt(context.node.from)) + (closed ? 0 : context.unit);
},
"JSXOpenTag JSXSelfClosingTag"(context) {
return context.column(context.node.from) + context.unit;
}
}),

@@ -89,2 +100,4 @@ foldNodeProp.add({

"CallExpression/MemberExpression/PropertyName": tags.function(tags.propertyName),
"FunctionDeclaration/VariableDefinition": tags.function(tags.definition(tags.variableName)),
"ClassDeclaration/VariableDefinition": tags.definition(tags.className),
PropertyNameDefinition: tags.definition(tags.propertyName),

@@ -91,0 +104,0 @@ UpdateOp: tags.updateOperator,

2

package.json
{
"name": "@codemirror/lang-javascript",
"version": "0.17.1",
"version": "0.17.2",
"description": "JavaScript language support for the CodeMirror code editor",

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

Sorry, the diff of this file is not supported yet

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