@codemirror/lang-javascript
Advanced tools
Comparing version 0.17.2 to 0.18.0
@@ -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 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48819
458
+ Added@codemirror/autocomplete@0.18.8(transitive)
+ Added@codemirror/highlight@0.18.4(transitive)
+ Added@codemirror/language@0.18.2(transitive)
+ Added@codemirror/lint@0.18.6(transitive)
+ Added@codemirror/panel@0.18.2(transitive)
+ Added@codemirror/rangeset@0.18.5(transitive)
+ Added@codemirror/state@0.18.7(transitive)
+ Added@codemirror/text@0.18.1(transitive)
+ Added@codemirror/tooltip@0.18.4(transitive)
+ Added@codemirror/view@0.18.19(transitive)
+ Addedstyle-mod@4.1.2(transitive)
- Removed@codemirror/autocomplete@0.17.4(transitive)
- Removed@codemirror/highlight@0.17.3(transitive)
- Removed@codemirror/language@0.17.5(transitive)
- Removed@codemirror/lint@0.17.1(transitive)
- Removed@codemirror/panel@0.17.1(transitive)
- Removed@codemirror/rangeset@0.17.1(transitive)
- Removed@codemirror/state@0.17.2(transitive)
- Removed@codemirror/text@0.17.2(transitive)
- Removed@codemirror/tooltip@0.17.2(transitive)
- Removed@codemirror/view@0.17.13(transitive)
- Removedstyle-mod@3.2.2(transitive)
Updated@codemirror/language@^0.18.0
Updated@codemirror/lint@^0.18.0
Updated@codemirror/state@^0.18.0
Updated@codemirror/view@^0.18.0