Socket
Socket
Sign inDemoInstall

@codemirror/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/autocomplete - npm Package Compare versions

Comparing version 0.18.1 to 0.18.2

6

CHANGELOG.md

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

## 0.18.2 (2021-03-14)
### Bug fixes
Fix unintended ES2020 output (the package contains ES6 code again).
## 0.18.1 (2021-03-11)

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

13

dist/index.js

@@ -130,2 +130,3 @@ import { showTooltip, tooltips } from '@codemirror/tooltip';

function ensureAnchor(expr, start) {
var _a;
let { source } = expr;

@@ -135,3 +136,3 @@ let addStart = start && source[0] != "^", addEnd = source[source.length - 1] != "$";

return expr;
return new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, expr.flags ?? (expr.ignoreCase ? "i" : ""));
return new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, (_a = expr.flags) !== null && _a !== void 0 ? _a : (expr.ignoreCase ? "i" : ""));
}

@@ -642,3 +643,3 @@ function applyCompletion(view, option) {

map(changes) {
return new CompletionDialog(this.options, this.attrs, [{ ...this.tooltip[0], pos: changes.mapPos(this.tooltip[0].pos) }], this.timestamp, this.selected);
return new CompletionDialog(this.options, this.attrs, [Object.assign(Object.assign({}, this.tooltip[0]), { pos: changes.mapPos(this.tooltip[0].pos) })], this.timestamp, this.selected);
}

@@ -930,2 +931,3 @@ }

accept() {
var _a;
if (this.debounceAccept > -1)

@@ -942,3 +944,3 @@ clearTimeout(this.debounceAccept);

if (query.done) {
let active = new ActiveResult(query.source, query.context.explicit, query.done, query.done.from, query.done.to ?? cur(query.updates.length ? query.updates[0].startState : this.view.state), query.done.span ? ensureAnchor(query.done.span, true) : null);
let active = new ActiveResult(query.source, query.context.explicit, query.done, query.done.from, (_a = query.done.to) !== null && _a !== void 0 ? _a : cur(query.updates.length ? query.updates[0].startState : this.view.state), query.done.span ? ensureAnchor(query.done.span, true) : null);
// Replay the transactions that happened since the start of

@@ -1189,3 +1191,3 @@ // the request and see if that preserves the result

function snippetCompletion(template, completion) {
return { ...completion, apply: snippet(template) };
return Object.assign(Object.assign({}, completion), { apply: snippet(template) });
}

@@ -1295,3 +1297,4 @@ const snippetPointerHandler = EditorView.domEventHandlers({

function currentCompletions(state) {
let open = state.field(completionState, false)?.open;
var _a;
let open = (_a = state.field(completionState, false)) === null || _a === void 0 ? void 0 : _a.open;
return open ? open.options.map(o => o.completion) : [];

@@ -1298,0 +1301,0 @@ }

{
"name": "@codemirror/autocomplete",
"version": "0.18.1",
"version": "0.18.2",
"description": "Autocompletion 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