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.2 to 0.18.0

6

CHANGELOG.md

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

## 0.18.0 (2021-03-03)
### Bug fixes
Extend `indentOnInput` expression to cover closing JSX tags.
## 0.17.2 (2021-02-15)

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

11

dist/index.js
import { parser } from 'lezer-javascript';
import { LezerLanguage, indentNodeProp, continuedIndent, flatIndent, delimitedIndent, foldNodeProp, LanguageSupport } from '@codemirror/language';
import { LezerLanguage, indentNodeProp, continuedIndent, flatIndent, delimitedIndent, foldNodeProp, foldInside, LanguageSupport } from '@codemirror/language';
import { styleTags, tags } from '@codemirror/highlight';

@@ -61,2 +61,3 @@ import { snippetCompletion, ifNotIn, completeFromList } from '@codemirror/autocomplete';

Block: delimitedIndent({ closing: "}" }),
ArrowFunction: cx => cx.baseIndent + cx.unit,
"TemplateString BlockComment": () => -1,

@@ -77,5 +78,3 @@ "Statement Property": continuedIndent({ except: /^{/ }),

foldNodeProp.add({
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression"(tree) {
return { from: tree.from + 1, to: tree.to - 1 };
},
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression": foldInside,
BlockComment(tree) { return { from: tree.from + 2, to: tree.to - 2 }; }

@@ -129,3 +128,3 @@ }),

"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": tags.angleBracket,
"JSXIdentifier JSXNameSpacedName": tags.typeName,
"JSXIdentifier JSXNameSpacedName": tags.tagName,
"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": tags.propertyName

@@ -138,3 +137,3 @@ })

commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
indentOnInput: /^\s*(?:case |default:|\{|\})$/,
indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
wordChars: "$"

@@ -141,0 +140,0 @@ }

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

@@ -29,8 +29,8 @@ "scripts": {

"dependencies": {
"@codemirror/autocomplete": "^0.17.0",
"@codemirror/highlight": "^0.17.0",
"@codemirror/language": "^0.17.0",
"@codemirror/lint": "^0.17.0",
"@codemirror/state": "^0.17.0",
"@codemirror/view": "^0.17.0",
"@codemirror/autocomplete": "^0.18.0",
"@codemirror/highlight": "^0.18.0",
"@codemirror/language": "^0.18.0",
"@codemirror/lint": "^0.18.0",
"@codemirror/state": "^0.18.0",
"@codemirror/view": "^0.18.0",
"lezer-javascript": "^0.13.0"

@@ -37,0 +37,0 @@ },

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