Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Upgrade mermaid to latest and fix build errors #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abramsimon
Copy link

@abramsimon abramsimon commented Oct 1, 2020

  • Bumped version to 0.2.0
  • Upgraded mermaid to v8.8.1, the latest at the time of this PR.
  • Updated babelify config to ignore 'entity-decode' node_module to fix a build issue.

During yarn build the following error would happen. A helpful SO answer allowed for a fix.

/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/entity-decode/browser.js:8
export default function decode(html) {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
    at formatError (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
    at Gulp.<anonymous> (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
    at Gulp.emit (events.js:326:22)
    at Gulp.EventEmitter.emit (domain.js:486:12)
    at Object.error (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
    at handler (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/now-and-later/lib/map.js:50:14)
    at f (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/once/once.js:25:25)
    at f (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/once/once.js:25:25)
    at tryCatch (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/async-done/index.js:24:15)
    at done (/Users/abramsimon/git/src/github.com/abramsimon/github-mermaid-extension/node_modules/async-done/index.js:40:12)

馃憤 Verify that official demo gist is still working.

馃憤 With the updated extension installed you should be able to see diagrams with newer features!

Databases (from Issue #28):

graph LR
  id1[(Database)]
Loading

Rect Support (from Issue #18)

sequenceDiagram
  participant signOut as AuthAPI.logOut
  participant logout as /logout
  participant crossLogoutOrigins

  rect rgb(255, 235, 179)
    signOut->>logout: GET
    logout-->>signOut: crossLogoutOrigins
  end
  rect rgb(252, 192, 192)
    logout->>crossLogoutOrigins: POST: each URL
  end
Loading

Subgraph (from Issue #11)

graph TD
subgraph "groupA"
  subgraph "groupA1"
    balancer[Balancer] --> backend[Backend]
    balancer --> frontend[Frontend]
  end
end
Loading

This also seems to fix #27 #20 #19 #13 #9 and supercedes #24

Upgraded mermaid to v8.8.1, the latest at the time of this PR.

Updated babelify config to ignore 'entity-decode' node_module to
fix a build issue.

/github-mermaid-extension/node_modules/entity-decode/browser.js:8
export default function decode(html) {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Rendering of sequence diagrams on the official gist
https://gist.github.com/amercier/df2e07a994315d323e398120bdda3989#sequence-diagrams
was failing because bindFunctions was not a function.
Adding a null check allows the sequence diagram to render
correctly.
@cirocosta
Copy link

thanks for putting the work, @abramsimon ! working great on Firefox :))

@sideeffffect
Copy link

@abramsimon this repository seems to be dead 馃樋
Do you think you could publish (Mozilla Add-ons, Chrome Store, ...) your fork? 馃檹

@Stefan-S
Copy link

Stefan-S commented Feb 26, 2021

I made page with the content of this pull request on https://mermaid.stefs.me
and am in the process of publishing everywhere.

@sideeffffect
Copy link

Those are awesome news @Stefan-S, thank you so much 馃檱 Please let us know once the new extensions are available via Mozilla Add-ons, Chrome Store, ...

@Stefan-S
Copy link

@sideeffffect on the page that I posted (https://mermaid.stefs.me), there already are links for the official add-on pages for opera and firefox. Edge is pending. I do have problems with google chrome though, there is a limited list of only 16 countries which are supported for billing address when you are paying google those $5 to activate the store, and my country ain't one of them.

@sideeffffect
Copy link

That's really unfortunate 馃樋 Isn't there any other way to get the updated extension to the Chrome store?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An in-range update of gulp-sass is breaking the build 馃毃
4 participants