Skip to content

Commit

Permalink
chore(deps): replace mocha by Node test runner (#1787)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie authored Oct 21, 2024
1 parent e7968cf commit 2e019d7
Show file tree
Hide file tree
Showing 121 changed files with 1,748 additions and 1,937 deletions.
2 changes: 1 addition & 1 deletion mermaid/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.13-alpine3.18
FROM node:20.18-alpine3.19

RUN addgroup -g 1001 kroki && adduser -D -G kroki -u 1001 kroki

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { w as withPath, c as constant } from "./path-39bad7e2.js";
import { aw as pi, ax as cos, ay as sin, az as halfPi, aA as epsilon, V as tau, aB as sqrt, aC as min, aD as abs, aE as atan2, aF as asin, aG as acos, aH as max } from "./mermaid-c5809711.js";
import { aw as pi, ax as cos, ay as sin, az as halfPi, aA as epsilon, V as tau, aB as sqrt, aC as min, aD as abs, aE as atan2, aF as asin, aG as acos, aH as max } from "./mermaid-f9ac9e20.js";
function arcInnerRadius(d) {
return d.innerRadius;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { w as ln, c as H } from "./path-428ebac9.js";
import { aw as an, ax as V, ay as D, az as rn, aA as y, V as on, aB as K, aC as _, aD as un, aE as t, aF as sn, aG as tn, aH as fn } from "./mermaid-00886c59.js";
import { aw as an, ax as V, ay as D, az as rn, aA as y, V as on, aB as K, aC as _, aD as un, aE as t, aF as sn, aG as tn, aH as fn } from "./mermaid-1fcb8b31.js";
function cn(l) {
return l.innerRadius;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var _a, _b;
import { _ as getConfig, l as log, E as clear$1, B as rgba, o as getStylesFromArray, c as getConfig$1, j as d3select, k as configureSvgSize } from "./mermaid-c5809711.js";
import { c as clone } from "./clone-d2e37f8c.js";
import { c as channel } from "./channel-d3ac35ac.js";
import { h as insertEdge, f as insertEdgeLabel, j as positionEdgeLabel, e as insertNode, p as positionNode, a as insertMarkers } from "./edges-1e1ebc73.js";
import { G as Graph } from "./graph-af3d5df6.js";
import { c as getConfig, _ as getConfig$1, l as log, E as clear$1, f as common, B as rgba, o as getStylesFromArray, j as d3select, k as configureSvgSize } from "./mermaid-f9ac9e20.js";
import { c as clone } from "./clone-15d89db6.js";
import { c as channel } from "./channel-585a36af.js";
import { h as insertEdge, f as insertEdgeLabel, j as positionEdgeLabel, e as insertNode, p as positionNode, a as insertMarkers } from "./edges-7e353d40.js";
import { G as Graph } from "./graph-f4d57e7d.js";
import { o as ordinal } from "./ordinal-475e0c0c.js";
import { d as d3schemeTableau10 } from "./Tableau10-31042135.js";
import "./createText-f6615236.js";
import "./line-65d70945.js";
import "./createText-fbf41b59.js";
import "./line-45f13744.js";
import "./array-b7dcf730.js";
import "./path-39bad7e2.js";
import "./init-cc95ec8e.js";
Expand Down Expand Up @@ -956,7 +956,9 @@ const COLOR_KEYWORD = "color";
const FILL_KEYWORD = "fill";
const BG_FILL = "bgFill";
const STYLECLASS_SEP = ",";
const config = getConfig();
let classes = {};
const sanitizeText = (txt) => common.sanitizeText(txt, config);
const addStyleClass = function(id, styleAttributes = "") {
if (classes[id] === void 0) {
classes[id] = { id, styles: [], textStyles: [] };
Expand Down Expand Up @@ -998,6 +1000,9 @@ const populateBlockDatabase = (_blockList, parent) => {
const blockList = _blockList.flat();
const children = [];
for (const block of blockList) {
if (block.label) {
block.label = sanitizeText(block.label);
}
if (block.type === "classDef") {
addStyleClass(block.id, block.css);
continue;
Expand Down Expand Up @@ -1171,7 +1176,7 @@ const getClasses$1 = function() {
return classes;
};
const db = {
getConfig: () => getConfig().block,
getConfig: () => getConfig$1().block,
typeStr2Type,
edgeTypeStr2Type,
edgeStrToEdgeData,
Expand Down Expand Up @@ -1404,7 +1409,7 @@ function getNodeFromBlock(block, db2, positioned = false) {
positioned,
intersect: void 0,
type: vertex.type,
padding: padding2 ?? (((_c = (_b2 = getConfig()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0)
padding: padding2 ?? (((_c = (_b2 = getConfig$1()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0)
};
return node;
}
Expand Down Expand Up @@ -1512,7 +1517,7 @@ async function insertEdges(elem, edges, blocks2, db2, id) {
}
}
}
const padding = ((_b = (_a = getConfig$1()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8;
const padding = ((_b = (_a = getConfig()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8;
function calculateBlockPosition(columns, position) {
if (columns === 0 || !Number.isInteger(columns)) {
throw new Error("Columns must be an integer !== 0.");
Expand Down Expand Up @@ -1765,7 +1770,7 @@ const getClasses = function(text, diagObj) {
return diagObj.db.getClasses();
};
const draw = async function(text, id, _version, diagObj) {
const { securityLevel, block: conf } = getConfig();
const { securityLevel, block: conf } = getConfig$1();
const db2 = diagObj.db;
let sandboxElement;
if (securityLevel === "sandbox") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var _a, _b;
import { F as getConfig, l as log, v as clear$1, k as getStylesFromArray, c as getConfig$1, i as configureSvgSize } from "./mermaid-f47111a7.js";
import { c as getConfig, F as getConfig$1, l as log, v as clear$1, e as common, k as getStylesFromArray, i as configureSvgSize } from "./mermaid-2490e8f2.js";
import clone from "lodash-es/clone.js";
import * as khroma from "khroma";
import { h as insertEdge, f as insertEdgeLabel, j as positionEdgeLabel, e as insertNode, p as positionNode, a as insertMarkers } from "./edges-d32062c0.js";
import { h as insertEdge, f as insertEdgeLabel, j as positionEdgeLabel, e as insertNode, p as positionNode, a as insertMarkers } from "./edges-5962ec63.js";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { select, scaleOrdinal, schemeTableau10 } from "d3";
import "ts-dedent";
Expand All @@ -13,7 +13,7 @@ import "lodash-es/memoize.js";
import "lodash-es/merge.js";
import "stylis";
import "lodash-es/isEmpty.js";
import "./createText-6b48ae7d.js";
import "./createText-4a4f35c9.js";
import "mdast-util-from-markdown";
var parser = function() {
var o = function(k, v, o2, l) {
Expand Down Expand Up @@ -960,7 +960,9 @@ const COLOR_KEYWORD = "color";
const FILL_KEYWORD = "fill";
const BG_FILL = "bgFill";
const STYLECLASS_SEP = ",";
const config = getConfig();
let classes = {};
const sanitizeText = (txt) => common.sanitizeText(txt, config);
const addStyleClass = function(id, styleAttributes = "") {
if (classes[id] === void 0) {
classes[id] = { id, styles: [], textStyles: [] };
Expand Down Expand Up @@ -1002,6 +1004,9 @@ const populateBlockDatabase = (_blockList, parent) => {
const blockList = _blockList.flat();
const children = [];
for (const block of blockList) {
if (block.label) {
block.label = sanitizeText(block.label);
}
if (block.type === "classDef") {
addStyleClass(block.id, block.css);
continue;
Expand Down Expand Up @@ -1175,7 +1180,7 @@ const getClasses$1 = function() {
return classes;
};
const db = {
getConfig: () => getConfig().block,
getConfig: () => getConfig$1().block,
typeStr2Type,
edgeTypeStr2Type,
edgeStrToEdgeData,
Expand Down Expand Up @@ -1408,7 +1413,7 @@ function getNodeFromBlock(block, db2, positioned = false) {
positioned,
intersect: void 0,
type: vertex.type,
padding: padding2 ?? (((_c = (_b2 = getConfig()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0)
padding: padding2 ?? (((_c = (_b2 = getConfig$1()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0)
};
return node;
}
Expand Down Expand Up @@ -1516,7 +1521,7 @@ async function insertEdges(elem, edges, blocks2, db2, id) {
}
}
}
const padding = ((_b = (_a = getConfig$1()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8;
const padding = ((_b = (_a = getConfig()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8;
function calculateBlockPosition(columns, position) {
if (columns === 0 || !Number.isInteger(columns)) {
throw new Error("Columns must be an integer !== 0.");
Expand Down Expand Up @@ -1769,7 +1774,7 @@ const getClasses = function(text, diagObj) {
return diagObj.db.getClasses();
};
const draw = async function(text, id, _version, diagObj) {
const { securityLevel, block: conf } = getConfig();
const { securityLevel, block: conf } = getConfig$1();
const db2 = diagObj.db;
let sandboxElement;
if (securityLevel === "sandbox") {
Expand Down
Loading

0 comments on commit 2e019d7

Please sign in to comment.