Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@milkdown/transformer

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@milkdown/transformer - npm Package Compare versions

Comparing version 5.4.1 to 5.5.0

6

lib/index.es.js

@@ -251,3 +251,3 @@ var __defProp = Object.defineProperty;

const last = nextChildren[nextChildren.length - 1];
if (child.isMark && child.type === last.type) {
if (last && child["isMark"] && child.type === last.type) {
const _a = child, { children: currChildren } = _a, currRest = __objRest(_a, ["children"]);

@@ -274,3 +274,3 @@ const _b = last, { children: prevChildren } = _b, prevRest = __objRest(_b, ["children"]);

if (element.value) {
node.value = element.value;
node["value"] = element.value;
}

@@ -392,3 +392,3 @@ return node;

var _a;
return (_a = x.type.spec.priority) != null ? _a : 50;
return (_a = x.type.spec["priority"]) != null ? _a : 50;
};

@@ -395,0 +395,0 @@ const tmp = [...marks].sort((a, b) => getPriority(a) - getPriority(b));

{
"name": "@milkdown/transformer",
"version": "5.4.1",
"version": "5.5.0",
"type": "module",

@@ -20,3 +20,3 @@ "main": "./lib/index.es.js",

"devDependencies": {
"@milkdown/prose": "5.4.1"
"@milkdown/prose": "5.5.0"
},

@@ -27,3 +27,3 @@ "peerDependencies": {

"dependencies": {
"@milkdown/exception": "5.4.1",
"@milkdown/exception": "5.5.0",
"remark": "^14.0.1",

@@ -30,0 +30,0 @@ "tslib": "^2.3.1",

@@ -33,3 +33,6 @@ /* Copyright 2021, Milkdown by Mirone. */

const proseType: NodeType | MarkType = this.schema[is === 'node' ? 'nodes' : 'marks'][key];
const proseType: NodeType | MarkType = this.schema[is === 'node' ? 'nodes' : 'marks'][key] as
| NodeType
| MarkType;
runner(this, node, proseType as NodeType & MarkType);

@@ -36,0 +39,0 @@ }

@@ -25,3 +25,3 @@ /* Copyright 2021, Milkdown by Mirone. */

const last = nextChildren[nextChildren.length - 1];
if (child.isMark && child.type === last.type) {
if (last && child['isMark'] && child.type === last.type) {
const { children: currChildren, ...currRest } = child;

@@ -54,3 +54,3 @@ const { children: prevChildren, ...prevRest } = last;

if (element.value) {
node.value = element.value;
node['value'] = element.value;
}

@@ -57,0 +57,0 @@

@@ -51,3 +51,3 @@ /* Copyright 2021, Milkdown by Mirone. */

const { marks } = node;
const getPriority = (x: ProseMark) => x.type.spec.priority ?? 50;
const getPriority = (x: ProseMark) => x.type.spec['priority'] ?? 50;
const tmp = [...marks].sort((a, b) => getPriority(a) - getPriority(b));

@@ -54,0 +54,0 @@ const unPreventNext = tmp.every((mark) => !this.#runProseMark(mark, node));

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