New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/language

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/language - npm Package Compare versions

Comparing version

to
6.5.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## 6.5.0 (2023-02-07)
### Bug fixes
Make indentation for stream languages more reliable by having `StringStream.indentation` return overridden indentations from the indent context.
### New features
The `toggleFold` command folds or unfolds depending on whether there's an existing folded range on the current line.
`indentUnit` now accepts any (repeated) whitespace character, not just spaces and tabs.
## 6.4.0 (2023-01-12)

@@ -2,0 +14,0 @@

19

dist/index.d.ts

@@ -373,5 +373,5 @@ import { NodeProp, Parser, Tree, TreeFragment, SyntaxNode, NodeType } from '@lezer/common';

/**
Facet for overriding the unit by which indentation happens.
Should be a string consisting either entirely of spaces or
entirely of tabs. When not set, this defaults to 2 spaces.
Facet for overriding the unit by which indentation happens. Should
be a string consisting either entirely of the same whitespace
character. When not set, this defaults to 2 spaces.
*/

@@ -454,3 +454,3 @@ declare const indentUnit: Facet<string, string>;

When `simulateBreak` is given, this can be used to make the
simulate break behave like a double line break.
simulated break behave like a double line break.
*/

@@ -683,2 +683,8 @@ simulateDoubleBreak?: boolean;

/**
Toggle folding at cursors. Unfolds if there is an existing fold
starting in that line, tries to find a foldable range around it
otherwise.
*/
declare const toggleFold: Command;
/**
Default fold-related key bindings.

@@ -949,2 +955,3 @@

indentUnit: number;
private overrideIndent?;
/**

@@ -971,3 +978,3 @@ The current position on the line.

*/
indentUnit: number);
indentUnit: number, overrideIndent?: number | undefined);
/**

@@ -1120,2 +1127,2 @@ True if we are at the end of the line.

export { Config, HighlightStyle, IndentContext, LRLanguage, Language, LanguageDescription, LanguageSupport, MatchResult, ParseContext, StreamLanguage, StreamParser, StringStream, TagStyle, TreeIndentContext, bracketMatching, bracketMatchingHandle, codeFolding, continuedIndent, defaultHighlightStyle, defineLanguageFacet, delimitedIndent, ensureSyntaxTree, flatIndent, foldAll, foldCode, foldEffect, foldGutter, foldInside, foldKeymap, foldNodeProp, foldService, foldState, foldable, foldedRanges, forceParsing, getIndentUnit, getIndentation, highlightingFor, indentNodeProp, indentOnInput, indentRange, indentService, indentString, indentUnit, language, languageDataProp, matchBrackets, syntaxHighlighting, syntaxParserRunning, syntaxTree, syntaxTreeAvailable, unfoldAll, unfoldCode, unfoldEffect };
export { Config, HighlightStyle, IndentContext, LRLanguage, Language, LanguageDescription, LanguageSupport, MatchResult, ParseContext, StreamLanguage, StreamParser, StringStream, TagStyle, TreeIndentContext, bracketMatching, bracketMatchingHandle, codeFolding, continuedIndent, defaultHighlightStyle, defineLanguageFacet, delimitedIndent, ensureSyntaxTree, flatIndent, foldAll, foldCode, foldEffect, foldGutter, foldInside, foldKeymap, foldNodeProp, foldService, foldState, foldable, foldedRanges, forceParsing, getIndentUnit, getIndentation, highlightingFor, indentNodeProp, indentOnInput, indentRange, indentService, indentString, indentUnit, language, languageDataProp, matchBrackets, syntaxHighlighting, syntaxParserRunning, syntaxTree, syntaxTreeAvailable, toggleFold, unfoldAll, unfoldCode, unfoldEffect };
{
"name": "@codemirror/language",
"version": "6.4.0",
"version": "6.5.0",
"description": "Language support infrastructure for the CodeMirror code editor",

@@ -15,3 +15,3 @@ "scripts": {

"name": "Marijn Haverbeke",
"email": "marijnh@gmail.com",
"email": "marijn@haverbeke.berlin",
"url": "http://marijnhaverbeke.nl"

@@ -18,0 +18,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet