From f05c790248b9e99261aed5ead359ab69d782505f Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 02:38:13 +0100 Subject: [PATCH 01/15] test(e2e): fix failing xss9 test Fixes xx9 test to continue running even if JavaScript throws an exception. --- cypress/integration/other/xss.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress/integration/other/xss.spec.js b/cypress/integration/other/xss.spec.js index 912354f7d..4911dd8df 100644 --- a/cypress/integration/other/xss.spec.js +++ b/cypress/integration/other/xss.spec.js @@ -81,6 +81,9 @@ describe('XSS', () => { cy.get('#the-malware').should('not.exist'); }); it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + cy.on('uncaught:exception', (_err, _runnable) => { + return false; // continue rendering even if there if mermaid throws an error + }); cy.visit('http://localhost:9000/xss9.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); From 05b8a6e77f8d7311a98457418ca6fd0b64efe77d Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 03:05:40 +0100 Subject: [PATCH 02/15] test(e2e): widen flowchart width to within 10% Widen flowchart width acceptable values to within 10% of 300px. On my local environment, I'm getting 283px, which is 5.5% of 300px. --- cypress/integration/rendering/flowchart.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js index b4e94d1ab..c4ef54fcf 100644 --- a/cypress/integration/rendering/flowchart.spec.js +++ b/cypress/integration/rendering/flowchart.spec.js @@ -745,13 +745,13 @@ describe('Graph', () => { cy.get('svg').should((svg) => { expect(svg).to.have.attr('width', '100%'); // expect(svg).to.have.attr('height'); - // use within because the absolute value can be slightly different depending on the environment ±5% + // use within because the absolute value can be slightly different depending on the environment ±10% // const height = parseFloat(svg.attr('height')); // expect(height).to.be.within(446 * 0.95, 446 * 1.05); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); - expect(maxWidthValue).to.be.within(300 * 0.95, 300 * 1.05); + expect(maxWidthValue).to.be.within(300 * 0.9, 300 * 1.1); }); }); it('39: should render a flowchart when useMaxWidth is false', () => { @@ -768,9 +768,9 @@ describe('Graph', () => { cy.get('svg').should((svg) => { // const height = parseFloat(svg.attr('height')); const width = parseFloat(svg.attr('width')); - // use within because the absolute value can be slightly different depending on the environment ±5% + // use within because the absolute value can be slightly different depending on the environment ±10% // expect(height).to.be.within(446 * 0.95, 446 * 1.05); - expect(width).to.be.within(300 * 0.95, 300 * 1.05); + expect(width).to.be.within(300 * 0.9, 300 * 1.1); expect(svg).to.not.have.attr('style'); }); }); From a25c9a30d0fa51a5e84b499595489c9d495b14ae Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 03:50:03 +0100 Subject: [PATCH 03/15] text(e2e): give git tests consistent commit id gitGraph render tests are currently using random commit ids, which causes visual regression tests to fail. I couldn't find a way to make the random commit IDs consistent (JavaScript/Cypress doesn't seem to have a random.seed() function), so I've just hardcoded all the commit ids. --- .../integration/rendering/gitGraph.spec.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js index 80981c31c..b0d65d0cc 100644 --- a/cypress/integration/rendering/gitGraph.spec.js +++ b/cypress/integration/rendering/gitGraph.spec.js @@ -213,42 +213,43 @@ describe('Git Graph diagram', () => { ` gitGraph checkout main - commit + %% Make sure to manually set the ID of all commits, for consistent visual tests + commit id: "1-abcdefg" checkout main branch branch1 - commit + commit id: "2-abcdefg" checkout main merge branch1 branch branch2 - commit + commit id: "3-abcdefg" checkout main merge branch2 branch branch3 - commit + commit id: "4-abcdefg" checkout main merge branch3 branch branch4 - commit + commit id: "5-abcdefg" checkout main merge branch4 branch branch5 - commit + commit id: "6-abcdefg" checkout main merge branch5 branch branch6 - commit + commit id: "7-abcdefg" checkout main merge branch6 branch branch7 - commit + commit id: "8-abcdefg" checkout main merge branch7 branch branch8 - commit + commit id: "9-abcdefg" checkout main merge branch8 branch branch9 - commit + commit id: "10-abcdefg" `, {} ); From 6e7037bafd880966014fa21f0dc197357c00c8ee Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 01:50:11 +0100 Subject: [PATCH 04/15] test(e2e): fix most arrowMarkerAbsolute tests The arrows between flowcharts do not have the class edgePath. Instead, I'm loading all ``s within the `` --- .../integration/other/configuration.spec.js | 60 +++++++++++-------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js index a67758d9c..db2602a17 100644 --- a/cypress/integration/other/configuration.spec.js +++ b/cypress/integration/other/configuration.spec.js @@ -15,11 +15,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle default value false of arrowMarkerAbsolute', () => { renderGraph( @@ -35,11 +37,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute explicitly set to false', () => { renderGraph( @@ -57,11 +61,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => { renderGraph( @@ -79,11 +85,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute set to true', () => { renderGraph( @@ -99,11 +107,13 @@ describe('Configuration', () => { } ); - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(http://localhost'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(http://localhost'); + }); }); it('should not taint the initial configuration when using multiple directives', () => { const url = 'http://localhost:9000/regression/issue-1874.html'; From 595f7680e93b03c0454eb11efdb92cc52f4d27f7 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 02:12:08 +0100 Subject: [PATCH 05/15] fix(flowchart-v2): fix arrowMarkerAbsolute=true The if-check for arrowMarkerAbsolute in the flowchart-v2 code is in dagre-wrapper. Unfortunately, I can't seem to find a way to find the local conf (e.g. the one set via `flowRenderer.setConf()`, so instead I'm using global mermaid config from `src/config`. Flowchart v1 arrowMarkerAbsolute=true is still broken, but I'm not really sure how to fix that. --- cypress/integration/other/configuration.spec.js | 2 +- src/dagre-wrapper/edges.js | 3 ++- src/diagram-api/diagram-orchestration.ts | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js index db2602a17..513cf0714 100644 --- a/cypress/integration/other/configuration.spec.js +++ b/cypress/integration/other/configuration.spec.js @@ -95,7 +95,7 @@ describe('Configuration', () => { }); it('should handle arrowMarkerAbsolute set to true', () => { renderGraph( - `graph TD + `flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} C -->|One| D[Laptop] diff --git a/src/dagre-wrapper/edges.js b/src/dagre-wrapper/edges.js index 86e41de1d..6ed08e924 100644 --- a/src/dagre-wrapper/edges.js +++ b/src/dagre-wrapper/edges.js @@ -472,7 +472,8 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph // }); let url = ''; - if (getConfig().state.arrowMarkerAbsolute) { + // // TODO: Can we load this config only from the rendered graph type? + if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) { url = window.location.protocol + '//' + diff --git a/src/diagram-api/diagram-orchestration.ts b/src/diagram-api/diagram-orchestration.ts index b9b0520c9..9c2ca5a51 100644 --- a/src/diagram-api/diagram-orchestration.ts +++ b/src/diagram-api/diagram-orchestration.ts @@ -96,6 +96,7 @@ import { journeyDetector } from '../diagrams/user-journey/journeyDetector'; import journeyDb from '../diagrams/user-journey/journeyDb'; import journeyRenderer from '../diagrams/user-journey/journeyRenderer'; import journeyStyles from '../diagrams/user-journey/styles'; +import { getConfig, setConfig } from '../config'; export const addDiagrams = () => { registerDiagram( @@ -275,11 +276,12 @@ export const addDiagrams = () => { renderer: flowRendererV2, styles: flowStyles, init: (cnf) => { - flowRenderer.setConf(cnf.flowchart); if (!cnf.flowchart) { cnf.flowchart = {}; } + // TODO, broken as of 2022-09-14 (13809b50251845475e6dca65cc395761be38fbd2) cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); flowDb.clear(); flowDb.setGen('gen-1'); }, @@ -294,11 +296,13 @@ export const addDiagrams = () => { renderer: flowRendererV2, styles: flowStyles, init: (cnf) => { - flowRendererV2.setConf(cnf.flowchart); if (!cnf.flowchart) { cnf.flowchart = {}; } cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + // flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf + setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + flowRendererV2.setConf(cnf.flowchart); flowDb.clear(); flowDb.setGen('gen-2'); }, From 625ec813b9459740320730b38cb94b5e1ccdeafe Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 01:43:07 +0100 Subject: [PATCH 06/15] chore: upgrade cypress to v10 Cypress v10 had some minor breaking changes, (e.g. the cypress/plugins folder dissapeared) so I had to change some things. It looks like the Cypress was previously reverted in [dee9cfe][1], due to applitools not working properly, but I think my changes fix this, so it should be okay. [1]: https://github.com/mermaid-js/mermaid/commit/dee9cfea85f6fb57577efcf0a5cbd407e28866bb --- applitools.cnfig.js | 16 -------------- applitools.config.js | 19 ++++++++++++++++ cypress.config.js | 7 +++--- cypress/downloads/downloads.html | 1 - cypress/helpers/util.js | 8 ++----- cypress/plugins/index.js | 33 ---------------------------- cypress/support/{index.js => e2e.js} | 2 -- package.json | 2 +- yarn.lock | 18 +++++++-------- 9 files changed, 34 insertions(+), 72 deletions(-) delete mode 100644 applitools.cnfig.js create mode 100644 applitools.config.js delete mode 100644 cypress/downloads/downloads.html delete mode 100644 cypress/plugins/index.js rename cypress/support/{index.js => e2e.js} (90%) diff --git a/applitools.cnfig.js b/applitools.cnfig.js deleted file mode 100644 index 900aabf2e..000000000 --- a/applitools.cnfig.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - testConcurrency: 1, - // browser: [ - // // Add browsers with different viewports - // { width: 800, height: 600, name: 'chrome' }, - // { width: 700, height: 500, name: 'firefox' }, - // { width: 1600, height: 1200, name: 'ie11' }, - // { width: 1024, height: 768, name: 'edgechromium' }, - // { width: 800, height: 600, name: 'safari' }, - // // Add mobile emulation devices in Portrait mode - // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, - // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, - // ], - // // set batch name to the configuration - // batchName: 'Ultrafast Batch', -}; diff --git a/applitools.config.js b/applitools.config.js new file mode 100644 index 000000000..1c0607868 --- /dev/null +++ b/applitools.config.js @@ -0,0 +1,19 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { defineConfig } = require('cypress'); + +module.exports = defineConfig({ + testConcurrency: 1, + browser: [ + // Add browsers with different viewports + // { width: 800, height: 600, name: 'chrome' }, + // { width: 700, height: 500, name: 'firefox' }, + // { width: 1600, height: 1200, name: 'ie11' }, + // { width: 1024, height: 768, name: 'edgechromium' }, + // { width: 800, height: 600, name: 'safari' }, + // // Add mobile emulation devices in Portrait mode + // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, + // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, + ], + // set batch name to the configuration + batchName: `Mermaid ${process.env.APPLI_BRANCH ?? "'no APPLI_BRANCH set'"}`, +}); diff --git a/cypress.config.js b/cypress.config.js index d7c9831d4..b434cec47 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -2,21 +2,20 @@ const { defineConfig } = require('cypress'); const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -require('@applitools/eyes-cypress')(module); module.exports = defineConfig({ e2e: { - specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx}', setupNodeEvents(on, config) { addMatchImageSnapshotPlugin(on, config); // copy any needed variables from process.env to config.env config.env.useAppli = process.env.USE_APPLI ? true : false; - config.env.codeBranch = process.env.APPLI_BRANCH; // do not forget to return the changed config object! return config; }, - supportFile: 'cypress/support/index.js', }, video: false, }); + +require('@applitools/eyes-cypress')(module); diff --git a/cypress/downloads/downloads.html b/cypress/downloads/downloads.html deleted file mode 100644 index b42fc821e..000000000 --- a/cypress/downloads/downloads.html +++ /dev/null @@ -1 +0,0 @@ -Cr24 \ No newline at end of file diff --git a/cypress/helpers/util.js b/cypress/helpers/util.js index b5e64a1e8..d138dfcfe 100644 --- a/cypress/helpers/util.js +++ b/cypress/helpers/util.js @@ -44,15 +44,13 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) => } const useAppli = Cypress.env('useAppli'); //const useAppli = false; - const branch = Cypress.env('codeBranch'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); if (useAppli) { cy.eyesOpen({ - appName: 'Mermaid-' + branch, + appName: 'Mermaid', testName: name, - batchName: branch, }); } @@ -96,15 +94,13 @@ export const urlSnapshotTest = (url, _options, api = false, validation) => { options.fontSize = '16px'; } const useAppli = Cypress.env('useAppli'); - const branch = Cypress.env('codeBranch'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); if (useAppli) { cy.eyesOpen({ - appName: 'Mermaid-' + branch, + appName: 'Mermaid', testName: name, - batchName: branch, }); } diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index ca5a37d5a..000000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -// module.exports = (on, config) => { -// // `on` is used to hook into various events Cypress emits -// // `config` is the resolved Cypress config -// } - -const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -require('@applitools/eyes-cypress')(module); - -module.exports = (on, config) => { - addMatchImageSnapshotPlugin(on, config); - // copy any needed variables from process.env to config.env - config.env.useAppli = process.env.USE_APPLI ? true : false; - config.env.codeBranch = process.env.APPLI_BRANCH; - - // do not forget to return the changed config object! - return config; -}; - -require('@applitools/eyes-cypress')(module); diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 90% rename from cypress/support/index.js rename to cypress/support/e2e.js index 1d23c59bf..69d93b4a4 100644 --- a/cypress/support/index.js +++ b/cypress/support/e2e.js @@ -17,8 +17,6 @@ import '@applitools/eyes-cypress/commands'; // Import commands.js using ES2015 syntax: import './commands'; -// import '@percy/cypress'; -import '@applitools/eyes-cypress/commands'; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/package.json b/package.json index 96523bc22..0e533497a 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "babel-loader": "^8.2.2", "concurrently": "^7.4.0", "css-to-string-loader": "^0.1.3", - "cypress": "9.7.0", + "cypress": "^10.0.0", "cypress-image-snapshot": "^4.0.1", "documentation": "13.2.0", "eslint": "^8.23.1", diff --git a/yarn.lock b/yarn.lock index a78af620d..4a7264451 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4662,10 +4662,10 @@ cypress-image-snapshot@^4.0.1: pkg-dir "^3.0.0" term-img "^4.0.0" -cypress@9.7.0: - version "9.7.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.7.0.tgz#bf55b2afd481f7a113ef5604aa8b693564b5e744" - integrity sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q== +cypress@^10.0.0: + version "10.8.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.8.0.tgz#12a681f2642b6f13d636bab65d5b71abdb1497a5" + integrity sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4686,7 +4686,7 @@ cypress@9.7.0: dayjs "^1.10.4" debug "^4.3.2" enquirer "^2.3.6" - eventemitter2 "^6.4.3" + eventemitter2 "6.4.7" execa "4.1.0" executable "^4.1.1" extract-zip "2.0.1" @@ -5803,10 +5803,10 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter2@^6.4.3: - version "6.4.5" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.5.tgz#97380f758ae24ac15df8353e0cc27f8b95644655" - integrity sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw== +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== eventemitter3@^4.0.0: version "4.0.7" From c5033b92b468316cfc4cff8cbdc5712b7044ce86 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 04:12:45 +0100 Subject: [PATCH 07/15] style: fix .github/workflow/e2e styling Uses prettier to fix e2e style issues. --- .github/workflows/e2e | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/e2e b/.github/workflows/e2e index 338869490..4211410fb 100644 --- a/.github/workflows/e2e +++ b/.github/workflows/e2e @@ -12,32 +12,32 @@ jobs: matrix: node-version: [16.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - cache: yarn - node-version: ${{ matrix.node-version }} + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + cache: yarn + node-version: ${{ matrix.node-version }} - - name: Install Yarn - run: npm i yarn --global + - name: Install Yarn + run: npm i yarn --global - - name: Install Packages - run: | - yarn install --frozen-lockfile - env: - CYPRESS_CACHE_FOLDER: .cache/Cypress + - name: Install Packages + run: | + yarn install --frozen-lockfile + env: + CYPRESS_CACHE_FOLDER: .cache/Cypress - - name: Run Build - run: yarn build + - name: Run Build + run: yarn build - - name: Run E2E Tests - run: yarn e2e - env: - CYPRESS_CACHE_FOLDER: .cache/Cypress + - name: Run E2E Tests + run: yarn e2e + env: + CYPRESS_CACHE_FOLDER: .cache/Cypress - - name: Upload Coverage to Coveralls + - name: Upload Coverage to Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} From 20d22a6468688def32cda24648a58510107a6674 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 14 Sep 2022 03:20:05 +0100 Subject: [PATCH 08/15] ci(e2e): re-enable e2e tests I've removed the coverage upload bit, since although the [@cypress/code-coverage][1] plugin is pretty easy to setup, it requires babel, which we're about to remove and replace with ESBuild. --- .github/workflows/{e2e => e2e.yml} | 6 ------ 1 file changed, 6 deletions(-) rename .github/workflows/{e2e => e2e.yml} (80%) diff --git a/.github/workflows/e2e b/.github/workflows/e2e.yml similarity index 80% rename from .github/workflows/e2e rename to .github/workflows/e2e.yml index 4211410fb..06a346aeb 100644 --- a/.github/workflows/e2e +++ b/.github/workflows/e2e.yml @@ -36,9 +36,3 @@ jobs: run: yarn e2e env: CYPRESS_CACHE_FOLDER: .cache/Cypress - - - name: Upload Coverage to Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - flag-name: e2e From 0ec7e006ecb479effb18782e32c3f1d5abe1a32e Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 14 Sep 2022 11:11:51 +0200 Subject: [PATCH 09/15] Cleanup unused variables and some commented out code --- src/diagrams/mindmap/mindmapRenderer.js | 3 +- src/diagrams/mindmap/svgDraw.js | 58 +++++++------------------ src/utils.ts | 1 - 3 files changed, 16 insertions(+), 46 deletions(-) diff --git a/src/diagrams/mindmap/mindmapRenderer.js b/src/diagrams/mindmap/mindmapRenderer.js index 1519dc406..2f2b06292 100644 --- a/src/diagrams/mindmap/mindmapRenderer.js +++ b/src/diagrams/mindmap/mindmapRenderer.js @@ -85,9 +85,8 @@ function rightToLeft(mindmap) { /** * @param mindmap * @param dir - * @param conf */ -function layout(mindmap, dir, conf) { +function layout(mindmap, dir) { const bb = new BoundingBox(30, 60); const layout = new Layout(bb); diff --git a/src/diagrams/mindmap/svgDraw.js b/src/diagrams/mindmap/svgDraw.js index 0b5c5e264..7d6804f24 100644 --- a/src/diagrams/mindmap/svgDraw.js +++ b/src/diagrams/mindmap/svgDraw.js @@ -47,9 +47,9 @@ function wrap(text, width) { }); } -const defaultBkg = function (elem, node, section, conf) { +const defaultBkg = function (elem, node, section) { const rd = 5; - const r = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -68,25 +68,22 @@ const defaultBkg = function (elem, node, section, conf) { .attr('x2', node.width) .attr('y2', node.height); }; -const rectBkg = function (elem, node, section, conf) { - const r = elem +const rectBkg = function (elem, node) { + elem .append('rect') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) .attr('height', node.height) .attr('width', node.width); }; -const cloudBkg = function (elem, node, section, conf) { - const rd = 5; - const r = elem; +const cloudBkg = function (elem, node) { const w = node.width; const h = node.height; - const r0 = 0.1 * w; const r1 = 0.15 * w; const r2 = 0.25 * w; const r3 = 0.35 * w; const r4 = 0.2 * w; - const p = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -109,12 +106,11 @@ const cloudBkg = function (elem, node, section, conf) { H0 V0 Z` ); }; -const bangBkg = function (elem, node, section, conf) { - const rd = 5; +const bangBkg = function (elem, node) { const w = node.width; const h = node.height; const r = 0.15 * w; - const p = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -141,16 +137,15 @@ const bangBkg = function (elem, node, section, conf) { H0 V0 Z` ); }; -const circleBkg = function (elem, node, section, conf) { - const r = elem +const circleBkg = function (elem, node) { + elem .append('circle') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) .attr('r', node.width / 2); - // .attr('width', node.width); }; -const roundedRectBkg = function (elem, node, section, conf) { - const r = elem +const roundedRectBkg = function (elem, node) { + elem .append('rect') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -183,7 +178,6 @@ export const drawNode = function (elem, node, section, conf) { .append('text') .text(node.descr) .attr('dy', '1em') - // .attr('dy', '0') .attr('alignment-baseline', 'middle') .attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle') @@ -195,18 +189,12 @@ export const drawNode = function (elem, node, section, conf) { if (node.icon) { if (node.type === db.nodeType.CIRCLE) { node.height += 50; - const orgWidth = node.width; node.width += 50; - // node.width = Math.max(orgWidth, 100); - const widthDiff = Math.abs(node.width - orgWidth); const icon = nodeElem .append('foreignObject') .attr('height', '50px') .attr('width', node.width) .attr('style', 'text-align: center;'); - // .attr('x', 0) - // .attr('y', 0) - // .attr('class', 'node-icon ' + node.icon); icon .append('div') .attr('class', 'icon-container') @@ -226,9 +214,7 @@ export const drawNode = function (elem, node, section, conf) { .attr('width', '60px') .attr('height', node.height) .attr('style', 'text-align: center;margin-top:' + heightDiff / 2 + 'px;'); - // .attr('x', 0) - // .attr('y', 0) - // .attr('class', 'node-icon ' + node.icon); + icon .append('div') .attr('class', 'icon-container') @@ -258,15 +244,11 @@ export const drawNode = function (elem, node, section, conf) { circleBkg(bkgElem, node, section, conf); break; case db.nodeType.CLOUD: - // bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')'); cloudBkg(bkgElem, node, section, conf); break; case db.nodeType.BANG: - // bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')'); bangBkg(bkgElem, node, section, conf); break; - default: - // defaultBkg(bkgElem, node, section, conf); } // Position the node to its coordinate @@ -277,17 +259,7 @@ export const drawNode = function (elem, node, section, conf) { return node.height; }; -export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, section, conf) { - // edgesElem - // .append('line') - // .attr('x1', parent.x + parent.width / 2) - // .attr('y1', parent.y + parent.height / 2) - // .attr('x2', mindmap.x + mindmap.width / 2) - // .attr('y2', mindmap.y + mindmap.height / 2) - // .attr('class', 'edge section-edge-' + section + ' edge-depth-' + depth); - - // - +export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, section) { const sx = parent.x + parent.width / 2; const sy = parent.y + parent.height / 2; const ex = mindmap.x + mindmap.width / 2; @@ -308,7 +280,7 @@ export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, sec .attr('class', 'edge section-edge-' + section + ' edge-depth-' + depth); }; -export const positionNode = function (node, conf) { +export const positionNode = function (node) { const nodeElem = db.getElementById(node.id); const x = node.x || 0; diff --git a/src/utils.ts b/src/utils.ts index 8861e7d09..b7f517db4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -43,7 +43,6 @@ const directiveWithoutOpen = /** * @function detectInit Detects the init config object from the text * @param config - * @param config * * ```mermaid * From 59c69600e8f14912cd5a39e9fbce4e90c4eb44b8 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Thu, 15 Sep 2022 01:05:11 +0100 Subject: [PATCH 10/15] fix(git): support single character branch names In gitGraph, add support branch names that only have a single character. The branch regex is checking for a starting character, and an ending character, so it currently needs at least two characters. I've wrapped everything except the first character in a `()?` to fix this. There are some really complicated regexes that do match what valid git branches are (see https://stackoverflow.com/a/12093994), but I'm reluctant to add them in, since it will be a pain to test all the different edgecases. Hopefully https://github.com/mermaid-js/mermaid/pull/3432 might be used in the future to make a better gitgraph parser! --- src/diagrams/git/gitGraphParserV2.spec.js | 7 +++++-- src/diagrams/git/parser/gitGraph.jison | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/diagrams/git/gitGraphParserV2.spec.js b/src/diagrams/git/gitGraphParserV2.spec.js index fcf965d71..b6c9c2459 100644 --- a/src/diagrams/git/gitGraphParserV2.spec.js +++ b/src/diagrams/git/gitGraphParserV2.spec.js @@ -372,14 +372,16 @@ describe('when parsing a gitGraph', function () { branch cherry-pick03 branch branch/example-branch branch merge/test_merge + %% single character branch name + branch A `; parser.parse(str); const commits = parser.yy.getCommits(); expect(Object.keys(commits).length).toBe(1); - expect(parser.yy.getCurrentBranch()).toBe('merge/test_merge'); + expect(parser.yy.getCurrentBranch()).toBe('A'); expect(parser.yy.getDirection()).toBe('LR'); - expect(Object.keys(parser.yy.getBranches()).length).toBe(6); + expect(Object.keys(parser.yy.getBranches()).length).toBe(7); expect(Object.keys(parser.yy.getBranches())).toEqual( expect.arrayContaining([ 'branch01', @@ -387,6 +389,7 @@ describe('when parsing a gitGraph', function () { 'cherry-pick03', 'branch/example-branch', 'merge/test_merge', + 'A', ]) ); }); diff --git a/src/diagrams/git/parser/gitGraph.jison b/src/diagrams/git/parser/gitGraph.jison index 15909a314..f35dbcde3 100644 --- a/src/diagrams/git/parser/gitGraph.jison +++ b/src/diagrams/git/parser/gitGraph.jison @@ -61,7 +61,7 @@ checkout(?=\s|$) return 'CHECKOUT'; ["] this.popState(); [^"]* return 'STR'; [0-9]+(?=\s|$) return 'NUM'; -\w[-\./\w]*[-\w] return 'ID'; // only a subset of https://git-scm.com/docs/git-check-ref-format +\w([-\./\w]*[-\w])? return 'ID'; // only a subset of https://git-scm.com/docs/git-check-ref-format <> return 'EOF'; \s+ /* skip all whitespace */ // lowest priority so we can use lookaheads in earlier regex From 5c2a45cd4d7a88b02c468256433574a1da13a62d Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 15 Sep 2022 17:48:00 +0530 Subject: [PATCH 11/15] Replace GoogleAnalytics with Plausible --- docs/index.html | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/index.html b/docs/index.html index 8d291f8e5..bad517a5f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -23,20 +23,11 @@ /> - + @@ -59,6 +67,7 @@ sequenceDiagram }; mermaid.initialize({ startOnLoad: false, + logLevel: 0, // themeVariables: {relationLabelColor: 'red'} }); function callback() { diff --git a/src/dagre-wrapper/markers.js b/src/dagre-wrapper/markers.js index b28be4119..fa229d231 100644 --- a/src/dagre-wrapper/markers.js +++ b/src/dagre-wrapper/markers.js @@ -119,7 +119,7 @@ const dependency = (elem, type) => { .append('path') .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); }; -const lollipop = (elem, type, id) => { +const lollipop = (elem, type) => { elem .append('defs') .append('marker') diff --git a/src/defaultConfig.ts b/src/defaultConfig.ts index 60d867437..681fda60c 100644 --- a/src/defaultConfig.ts +++ b/src/defaultConfig.ts @@ -228,9 +228,9 @@ const config: Partial = { * Decides which rendering engine that is to be used for the rendering. Legal values are: * dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid * - * Default value: 'dagre-d3' + * Default value: 'dagre-wrapper' */ - defaultRenderer: 'dagre-d3', + defaultRenderer: 'dagre-wrapper', }, /** The object containing configurations specific for sequence diagrams */ @@ -387,7 +387,8 @@ const config: Partial = { * * **Notes:** * - * This will display arrows that start and begin at the same node as right angles, rather than a curve + * This will display arrows that start and begin at the same node as right angles, rather than a + * curve * * Default value: false */ @@ -802,7 +803,8 @@ const config: Partial = { * * **Notes:** * - * This will display arrows that start and begin at the same node as right angles, rather than a curves + * This will display arrows that start and begin at the same node as right angles, rather than a + * curves * * Default value: false */ diff --git a/src/diagram-api/diagram-orchestration.ts b/src/diagram-api/diagram-orchestration.ts index cc902a107..e5b5f3cc0 100644 --- a/src/diagram-api/diagram-orchestration.ts +++ b/src/diagram-api/diagram-orchestration.ts @@ -105,7 +105,11 @@ export const addDiagrams = () => { 'error', // Special diagram with error messages but setup as a regular diagram { - db: {}, + db: { + clear: () => { + // Quite ok, clear needs to be there for error to work as a regular diagram + }, + }, styles: errorStyles, renderer: errorRenderer, parser: { diff --git a/src/diagrams/error/errorRenderer.ts b/src/diagrams/error/errorRenderer.ts index 9dbdf5508..df9ce2c6e 100644 --- a/src/diagrams/error/errorRenderer.ts +++ b/src/diagrams/error/errorRenderer.ts @@ -17,10 +17,11 @@ export const setConf = function (cnf: any) { /** * Draws a an info picture in the tag with id: id based on the graph definition in text. * + * @param text * @param {string} id The text for the error * @param {string} mermaidVersion The version */ -export const draw = (id: string, mermaidVersion: string) => { +export const draw = (text: string, id: string, mermaidVersion: string) => { try { log.debug('Renering svg for syntax error\n'); diff --git a/src/mermaidAPI.ts b/src/mermaidAPI.ts index c8d51941a..cbb9aa071 100644 --- a/src/mermaidAPI.ts +++ b/src/mermaidAPI.ts @@ -312,7 +312,7 @@ const render = function ( try { diag.renderer.draw(text, id, pkg.version, diag); } catch (e) { - errorRenderer.draw(id, pkg.version); + errorRenderer.draw(text, id, pkg.version); throw e; } diff --git a/src/utils.ts b/src/utils.ts index b7f517db4..b8bf91634 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -71,7 +71,7 @@ const directiveWithoutOpen = * g-->h * ``` * @param {string} text The text defining the graph - * @param {any} cnf + * @param {any} config * @returns {object} The json object representing the init passed to mermaid.initialize() */ export const detectInit = function (text: string, config?: MermaidConfig): MermaidConfig { @@ -392,7 +392,6 @@ const calcTerminalLabelPosition = (terminalMarkerSize, position, _points) => { } points.forEach((point) => { - totalDistance += distance(point, prevPoint); prevPoint = point; }); @@ -746,7 +745,7 @@ let decoder; * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js} * * @param {string} html HTML as a string - * @returns Unescaped HTML + * @returns {string} Unescaped HTML */ export const entityDecode = function (html) { decoder = decoder || document.createElement('div'); From 2693c9b02486901201288c68b0261f8dd57d7fdb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 16 Sep 2022 18:09:24 +0530 Subject: [PATCH 13/15] Fix coverage --- docs/Setup.md | 46 +++--- jest.config.js | 3 +- package.json | 2 +- src/assignWithDepth.js | 1 + src/docs/Setup.md | 46 +++--- src/mermaid.ts | 1 + src/mermaidAPI.spec.js | 1 + src/mermaidAPI.ts | 3 - yarn.lock | 341 ++++++++++++++++++++++++++++++++++++++--- 9 files changed, 370 insertions(+), 74 deletions(-) diff --git a/docs/Setup.md b/docs/Setup.md index 8e428c14c..e437b619b 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -4,13 +4,10 @@ ## mermaidAPI -Edit this -Page[\[N|Solid\](img/GitHub-Mark-32px.png)][1] - This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js. -The core of this api is the [**render**][2] function which, given a graph +The core of this api is the [**render**][1] function which, given a graph definition as text, renders the graph/diagram and returns an svg element for the graph. It is then up to the user of the API to make use of the svg, either insert it somewhere in the @@ -21,7 +18,7 @@ In addition to the render function, a number of behavioral configuration options ## Configuration **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more\[[click -here][3]].** +here][2]].** ## **What follows are config instructions for older versions** @@ -36,7 +33,7 @@ htmlLabels:true, curve:'cardinal', }, }; mermaid.initialize(config); -A summary of all options and their defaults is found [here][4]. +A summary of all options and their defaults is found [here][3]. A description of each option follows below. ## theme @@ -1411,10 +1408,10 @@ This sets the auto-wrap padding for the diagram (sides only) ### Parameters -- `text` **[string][5]** -- `parseError` **[Function][6]?** +- `text` **[string][4]** +- `parseError` **[Function][5]?** -Returns **[boolean][7]** +Returns **[boolean][6]** ## setSiteConfig @@ -1433,7 +1430,7 @@ function _Default value: At default, will mirror Global Config_ - `conf` **MermaidConfig** The base currentConfig to use as siteConfig -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## getSiteConfig @@ -1445,7 +1442,7 @@ Returns **[object][8]** The siteConfig **Notes**: Returns **any** values in siteConfig. -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## setConfig @@ -1484,10 +1481,10 @@ $(function () { ### Parameters -- `id` **[string][5]** The id of the element to be rendered -- `text` **[string][5]** The graph definition -- `cb` **function (svgCode: [string][5], bindFunctions: function (element: [Element][9]): void): void** -- `container` **[Element][9]** Selector to element in which a div with the graph temporarily will be +- `id` **[string][4]** The id of the element to be rendered +- `text` **[string][4]** The graph definition +- `cb` **function (svgCode: [string][4], bindFunctions: function (element: [Element][8]): void): void** +- `container` **[Element][8]** Selector to element in which a div with the graph temporarily will be inserted. If one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. @@ -1526,7 +1523,7 @@ Pushes in a directive to the configuration ### Parameters -- `directive` **[object][8]** The directive to push in +- `directive` **[object][7]** The directive to push in ## reset @@ -1620,12 +1617,11 @@ Returns **void** ``` -[1]: https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js -[2]: Setup.md?id=render -[3]: 8.6.0_docs.md -[4]: #mermaidapi-configuration-defaults -[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean -[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[9]: https://developer.mozilla.org/docs/Web/API/Element +[1]: Setup.md?id=render +[2]: 8.6.0_docs.md +[3]: #mermaidapi-configuration-defaults +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object +[8]: https://developer.mozilla.org/docs/Web/API/Element diff --git a/jest.config.js b/jest.config.js index 33618cf12..5b43d379d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,8 +5,7 @@ module.exports = { testEnvironment: 'jsdom', preset: 'ts-jest', transform: { - '^.+\\.tsx?$': ['jest-esbuild', { banner: '"use strict";' }], - '^.+\\.jsx?$': ['jest-esbuild', { banner: '"use strict";' }], + '^.+\\.[jt]sx?$': 'esbuild-jest', '^.+\\.jison$': [ path.resolve(__dirname, './src/jison/transformer.js'), { 'token-stack': true }, diff --git a/package.json b/package.json index 4d37acbca..04c78ccaa 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "cypress-image-snapshot": "^4.0.1", "documentation": "13.2.0", "esbuild": "^0.15.6", + "esbuild-jest": "^0.5.0", "esbuild-loader": "^2.19.0", "eslint": "^8.23.1", "eslint-config-prettier": "^8.5.0", @@ -116,7 +117,6 @@ "identity-obj-proxy": "^3.0.0", "jest": "^28.0.3", "jest-environment-jsdom": "^29.0.3", - "jest-esbuild": "^0.2.9", "jison": "^0.4.18", "js-base64": "3.7.2", "lint-staged": "^13.0.0", diff --git a/src/assignWithDepth.js b/src/assignWithDepth.js index 9f44b01ee..eff568d3e 100644 --- a/src/assignWithDepth.js +++ b/src/assignWithDepth.js @@ -1,3 +1,4 @@ +'use strict'; /** * @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively) diff --git a/src/docs/Setup.md b/src/docs/Setup.md index 41e706825..01dab44a6 100644 --- a/src/docs/Setup.md +++ b/src/docs/Setup.md @@ -2,13 +2,10 @@ ## mermaidAPI -Edit this -Page[\[N|Solid\](img/GitHub-Mark-32px.png)][1] - This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js. -The core of this api is the [**render**][2] function which, given a graph +The core of this api is the [**render**][1] function which, given a graph definition as text, renders the graph/diagram and returns an svg element for the graph. It is then up to the user of the API to make use of the svg, either insert it somewhere in the @@ -19,7 +16,7 @@ In addition to the render function, a number of behavioral configuration options ## Configuration **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more\[[click -here][3]].** +here][2]].** ## **What follows are config instructions for older versions** @@ -34,7 +31,7 @@ htmlLabels:true, curve:'cardinal', }, }; mermaid.initialize(config); -A summary of all options and their defaults is found [here][4]. +A summary of all options and their defaults is found [here][3]. A description of each option follows below. ## theme @@ -1409,10 +1406,10 @@ This sets the auto-wrap padding for the diagram (sides only) ### Parameters -- `text` **[string][5]** -- `parseError` **[Function][6]?** +- `text` **[string][4]** +- `parseError` **[Function][5]?** -Returns **[boolean][7]** +Returns **[boolean][6]** ## setSiteConfig @@ -1431,7 +1428,7 @@ function _Default value: At default, will mirror Global Config_ - `conf` **MermaidConfig** The base currentConfig to use as siteConfig -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## getSiteConfig @@ -1443,7 +1440,7 @@ Returns **[object][8]** The siteConfig **Notes**: Returns **any** values in siteConfig. -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## setConfig @@ -1482,10 +1479,10 @@ $(function () { ### Parameters -- `id` **[string][5]** The id of the element to be rendered -- `text` **[string][5]** The graph definition -- `cb` **function (svgCode: [string][5], bindFunctions: function (element: [Element][9]): void): void** -- `container` **[Element][9]** Selector to element in which a div with the graph temporarily will be +- `id` **[string][4]** The id of the element to be rendered +- `text` **[string][4]** The graph definition +- `cb` **function (svgCode: [string][4], bindFunctions: function (element: [Element][8]): void): void** +- `container` **[Element][8]** Selector to element in which a div with the graph temporarily will be inserted. If one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. @@ -1524,7 +1521,7 @@ Pushes in a directive to the configuration ### Parameters -- `directive` **[object][8]** The directive to push in +- `directive` **[object][7]** The directive to push in ## reset @@ -1618,12 +1615,11 @@ Returns **void** ``` -[1]: https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js -[2]: Setup.md?id=render -[3]: 8.6.0_docs.md -[4]: #mermaidapi-configuration-defaults -[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean -[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[9]: https://developer.mozilla.org/docs/Web/API/Element +[1]: Setup.md?id=render +[2]: 8.6.0_docs.md +[3]: #mermaidapi-configuration-defaults +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object +[8]: https://developer.mozilla.org/docs/Web/API/Element diff --git a/src/mermaid.ts b/src/mermaid.ts index 809387f60..6eec7ea66 100644 --- a/src/mermaid.ts +++ b/src/mermaid.ts @@ -1,3 +1,4 @@ +'use strict'; /** * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid * functionality and to render the diagrams to svg code. diff --git a/src/mermaidAPI.spec.js b/src/mermaidAPI.spec.js index 3c4a28ca9..241b5ec86 100644 --- a/src/mermaidAPI.spec.js +++ b/src/mermaidAPI.spec.js @@ -1,3 +1,4 @@ +'use strict'; import mermaid from './mermaid'; import mermaidAPI from './mermaidAPI'; import assignWithDepth from './assignWithDepth'; diff --git a/src/mermaidAPI.ts b/src/mermaidAPI.ts index c8d51941a..64bfbeff7 100644 --- a/src/mermaidAPI.ts +++ b/src/mermaidAPI.ts @@ -1,7 +1,4 @@ /** - * Edit this - * Page[[N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js) - * * This is the API to be used when optionally handling the integration with the web page, instead of * using the default integration provided by mermaid.js. * diff --git a/yarn.lock b/yarn.lock index 934aff293..940dd18e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -244,6 +244,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86" integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw== +"@babel/compat-data@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.1.tgz#72d647b4ff6a4f82878d184613353af1dd0290f9" + integrity sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg== + "@babel/core@7.12.3": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" @@ -266,6 +271,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.1.0", "@babel/core@^7.12.17": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.1.tgz#c8fa615c5e88e272564ace3d42fbc8b17bfeb22b" + integrity sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.1" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.1" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.1" + "@babel/types" "^7.19.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.19.0": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.0.tgz#d2f5f4f2033c00de8096be3c9f45772563e150c3" @@ -346,6 +372,16 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz#7f630911d83b408b76fe584831c98e5395d7a17c" + integrity sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg== + dependencies: + "@babel/compat-data" "^7.19.1" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.21.3" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.16.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" @@ -683,6 +719,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c" integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw== +"@babel/parser@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.1.tgz#6f6d6c2e621aad19a92544cc217ed13f1aac5b4c" + integrity sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -1204,7 +1245,7 @@ "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.18.6": +"@babel/plugin-transform-modules-commonjs@^7.12.13", "@babel/plugin-transform-modules-commonjs@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== @@ -1530,6 +1571,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.1.tgz#0fafe100a8c2a603b4718b1d9bf2568d1d193347" + integrity sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.19.1" + "@babel/types" "^7.19.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" @@ -1549,6 +1606,14 @@ resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.0.tgz#fe364f025ba74f6de6c837a84ef44bdb1d61e68f" integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w== +"@cnakazawa/watch@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + "@commitlint/cli@^17.1.2": version "17.1.2" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.1.2.tgz#38240f84936df5216f749f06f838dc50cc85a43d" @@ -2028,6 +2093,27 @@ jest-haste-map "^28.1.3" slash "^3.0.0" +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^26.6.2" + babel-plugin-istanbul "^6.0.0" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^26.6.2" + jest-regex-util "^26.0.0" + jest-util "^26.6.2" + micromatch "^4.0.2" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/transform@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" @@ -2070,6 +2156,17 @@ slash "^3.0.0" write-file-atomic "^4.0.1" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jest/types@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" @@ -2246,6 +2343,17 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": + version "7.1.19" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" + integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + "@types/babel__core@^7.1.14": version "7.1.17" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.17.tgz#f50ac9d20d64153b510578d84f9643f9a3afbe64" @@ -2588,7 +2696,7 @@ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA== -"@types/graceful-fs@^4.1.3": +"@types/graceful-fs@^4.1.2", "@types/graceful-fs@^4.1.3": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== @@ -2808,6 +2916,13 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== +"@types/yargs@^15.0.0": + version "15.0.14" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ== + dependencies: + "@types/yargs-parser" "*" + "@types/yargs@^17.0.8": version "17.0.10" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" @@ -3327,6 +3442,14 @@ ansi-styles@~1.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" integrity sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg= +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -3489,6 +3612,20 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== + dependencies: + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -3532,7 +3669,7 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" -babel-plugin-istanbul@^6.1.1: +babel-plugin-istanbul@^6.0.0, babel-plugin-istanbul@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== @@ -3543,6 +3680,16 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + babel-plugin-jest-hoist@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" @@ -3605,6 +3752,14 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== + dependencies: + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" + babel-preset-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" @@ -3790,6 +3945,16 @@ browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.0: node-releases "^2.0.5" update-browserslist-db "^1.0.4" +browserslist@^4.21.3: + version "4.21.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" + integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== + dependencies: + caniuse-lite "^1.0.30001400" + electron-to-chromium "^1.4.251" + node-releases "^2.0.6" + update-browserslist-db "^1.0.9" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -3927,6 +4092,18 @@ caniuse-lite@^1.0.30001359: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz" integrity sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA== +caniuse-lite@^1.0.30001400: + version "1.0.30001402" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz#aa29e1f47f5055b0d0c07696a67b8b08023d14c8" + integrity sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew== + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== + dependencies: + rsvp "^4.8.4" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -4037,6 +4214,11 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + ci-info@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" @@ -5459,6 +5641,11 @@ electron-to-chromium@^1.4.172: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz#b6a4436eb788ca732556cd69f384b8a3c82118c5" integrity sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg== +electron-to-chromium@^1.4.251: + version "1.4.253" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.253.tgz#3402fd2159530fc6d94237f1b9535fa7bebaf399" + integrity sha512-1pezJ2E1UyBTGbA7fUlHdPSXQw1k+82VhTFLG5G0AUqLGvsZqFzleOblceqegZzxYX4kC7hGEEdzIQI9RZ1Cuw== + emittery@^0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" @@ -5605,6 +5792,15 @@ esbuild-freebsd-arm64@0.15.6: resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.6.tgz#70c8a2a30bf6bb9d547a0d8dc93aa015ec4f77f9" integrity sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw== +esbuild-jest@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/esbuild-jest/-/esbuild-jest-0.5.0.tgz#7a9964bfdecafca3b675a8aeb08193bcdba8b9d7" + integrity sha512-AMZZCdEpXfNVOIDvURlqYyHwC8qC1/BFjgsrOiSL1eyiIArVtHL8YAC83Shhn16cYYoAWEW17yZn0W/RJKJKHQ== + dependencies: + "@babel/core" "^7.12.17" + "@babel/plugin-transform-modules-commonjs" "^7.12.13" + babel-jest "^26.6.3" + esbuild-linux-32@0.14.54: version "0.14.54" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5" @@ -5757,7 +5953,7 @@ esbuild-windows-arm64@0.15.6: resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.6.tgz#e18a778d354fc2ca2306688f3fedad8a3e57819e" integrity sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg== -esbuild@^0.14.39, esbuild@^0.14.48: +esbuild@^0.14.39: version "0.14.54" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2" integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA== @@ -6099,6 +6295,11 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +exec-sh@^0.3.2: + version "0.3.6" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" + integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== + execa@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" @@ -6595,7 +6796,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -7424,6 +7625,13 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-ci@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -7629,7 +7837,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -7893,19 +8101,32 @@ jest-environment-node@^28.1.3: jest-mock "^28.1.3" jest-util "^28.1.3" -jest-esbuild@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/jest-esbuild/-/jest-esbuild-0.2.9.tgz#c4c103e510400ad8a080753fd990dfe5a2a76025" - integrity sha512-GfcQgHf8XPwUydEurYTRdrhrDblVFXtgOsKmE/7KADxbsC0c5xpxQBarak4X7K0wl5XXfTmw7Qtat2V0/ssreg== - dependencies: - debug "^4.3.4" - esbuild "^0.14.48" - jest-get-type@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== + dependencies: + "@jest/types" "^26.6.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^26.0.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + jest-haste-map@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" @@ -8028,6 +8249,11 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== +jest-regex-util@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" + integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== + jest-regex-util@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" @@ -8116,6 +8342,14 @@ jest-runtime@^28.1.3: slash "^3.0.0" strip-bom "^4.0.0" +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + jest-snapshot@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" @@ -8145,6 +8379,18 @@ jest-snapshot@^28.1.3: pretty-format "^28.1.3" semver "^7.3.5" +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + jest-util@^28.0.0, jest-util@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" @@ -8195,6 +8441,15 @@ jest-watcher@^28.1.3: jest-util "^28.1.3" string-length "^4.0.1" +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest-worker@^27.4.5: version "27.5.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.0.tgz#99ee77e4d06168107c27328bd7f54e74c3a48d59" @@ -9201,7 +9456,7 @@ micromark@~2.11.0: debug "^4.0.0" parse-entities "^2.0.0" -micromatch@^3.1.5: +micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -9296,7 +9551,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -9445,6 +9700,11 @@ node-releases@^2.0.5: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + nomnom@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.5.2.tgz#f4345448a853cfbd5c0d26320f2477ab0526fe2f" @@ -10016,7 +10276,7 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== -pirates@^4.0.4, pirates@^4.0.5: +pirates@^4.0.1, pirates@^4.0.4, pirates@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== @@ -10809,6 +11069,11 @@ robust-predicates@^3.0.0: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -10862,6 +11127,21 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -12005,6 +12285,13 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -12239,6 +12526,14 @@ update-browserslist-db@^1.0.4: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" + integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -12522,7 +12817,7 @@ wait-on@6.0.0: minimist "^1.2.5" rxjs "^7.1.0" -walker@^1.0.8: +walker@^1.0.7, walker@^1.0.8, walker@~1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -12801,6 +13096,16 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + write-file-atomic@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" From 0605bce8877630da9f8ca8b47e3eba5739cb1dca Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 16 Sep 2022 18:12:52 +0530 Subject: [PATCH 14/15] Fix docs --- docs/Setup.md | 8 +++++--- docs/index.html | 2 +- src/docs/Setup.md | 8 +++++--- src/docs/index.html | 21 ++++++--------------- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/docs/Setup.md b/docs/Setup.md index 8e428c14c..d667a81f4 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -224,7 +224,7 @@ Default value: true Decides which rendering engine that is to be used for the rendering. Legal values are: dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid -Default value: 'dagre-d3' +Default value: 'dagre-wrapper' ## sequence @@ -367,7 +367,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curve +This will display arrows that start and begin at the same node as right angles, rather than a +curve Default value: false @@ -719,7 +720,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curves +This will display arrows that start and begin at the same node as right angles, rather than a +curves Default value: false diff --git a/docs/index.html b/docs/index.html index 19abd782a..0a41b516c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@ diff --git a/src/docs/Setup.md b/src/docs/Setup.md index 41e706825..caefd1b80 100644 --- a/src/docs/Setup.md +++ b/src/docs/Setup.md @@ -222,7 +222,7 @@ Default value: true Decides which rendering engine that is to be used for the rendering. Legal values are: dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid -Default value: 'dagre-d3' +Default value: 'dagre-wrapper' ## sequence @@ -365,7 +365,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curve +This will display arrows that start and begin at the same node as right angles, rather than a +curve Default value: false @@ -717,7 +718,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curves +This will display arrows that start and begin at the same node as right angles, rather than a +curves Default value: false diff --git a/src/docs/index.html b/src/docs/index.html index 39d454533..ea3969c77 100644 --- a/src/docs/index.html +++ b/src/docs/index.html @@ -21,22 +21,13 @@ rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" /> - + - +