* 'master' of https://github.com/mermaid-js/mermaid-live-editor:
  Update dependencies
  Remove test run on push
  Update dependencies
  Fix docker build issue
  Bump typescript from 4.2.4 to 4.3.2
  Bump autoprefixer from 10.2.5 to 10.2.6
  Enable recording
  Bump tailwindcss from 2.1.2 to 2.1.4
  Bump @macfja/svelte-persistent-store from 1.1.0 to 1.1.1
  Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.26.0
  Bump eslint-plugin-tailwindcss from 1.8.0 to 1.9.1
  Disable lint
  Fix snapshot
  Fix editor
  Touchup
  Bump prettier from 2.2.1 to 2.3.0
  Bump prettier-plugin-svelte from 2.2.0 to 2.3.0
This commit is contained in:
Sidharth Vinod
2021-06-04 23:57:55 +05:30
9 changed files with 385 additions and 457 deletions
+1 -8
View File
@@ -8,14 +8,7 @@ module.exports = {
'prettier'
],
plugins: ['svelte3', 'tailwindcss', '@typescript-eslint'],
ignorePatterns: [
'docs/*',
'*.cjs',
'snapshots.js',
'svelte.config.js',
'package.json',
'README.md'
],
ignorePatterns: ['docs/*', '*.cjs', '*.md', 'snapshots.js', 'svelte.config.js', 'package.json'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
+2 -2
View File
@@ -12,6 +12,6 @@ Describe the way your implementation works or what design decisions you made if
Make sure you
- [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md)
- [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid/blob/master/CONTRIBUTING.md)
- [ ] :computer: have added unit/e2e tests (if appropriate)
- [ ] :bookmark: targeted `master` branch
- [ ] :bookmark: targeted `develop` branch
+2 -2
View File
@@ -1,10 +1,10 @@
name: Cypress Tests
on:
push:
pull_request:
branches:
- master
- develop
jobs:
cypress-run:
@@ -35,7 +35,7 @@ jobs:
start: yarn preview
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
# record: true
record: true
headless: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
[ "$GITHUB_EVENT_NAME" == "pull_request" ] && export BETA=true && rm -rf docs/beta/
[ "$GITHUB_EVENT_NAME" != "pull_request" ] && rm -rf docs/_app/
yarn install
yarn run lint
# yarn run lint
version=$(yarn version --patch --no-git-tag-version | grep "New version" | cut -d':' -f 2)
yarn build
cd bin
+4 -18
View File
@@ -1,4 +1,4 @@
[![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
[![Mermaid Live Editor](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/detailed/2ckppp/master&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/2ckppp/runs) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
# Contributors are welcome!
@@ -29,20 +29,6 @@ This project is set up using [Yarn](https://classic.yarnpkg.com/en/docs/getting-
yarn install
```
or in develop branch to use the beta version of mermaid use
```
yarn install --update-checksums
```
This together with a .npmrc file:
```
registry=https://registry.npmjs.com/
@mermaid-js:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken="XXXXXXXXX"
```
## Development
```
@@ -53,6 +39,6 @@ This app is created with Svelte Kit.
## Release
```
yarn release
```
When a PR is created targeting master, it will be built and deployed as a beta in http://mermaid-js.github.io/mermaid-live-editor/beta
Once the PR is merged, it will automatically be released.
+2 -2
View File
@@ -4,10 +4,10 @@ module.exports = {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":true,\"autoSync\":true,\"updateDiagram\":true}"
},
"Check Redirect from old URL": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":true,\"autoSync\":true,\"updateDiagram\":true}"
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":false}"
}
},
"__version": "7.4.0",
"__version": "7.3.0",
"Auto sync tests": {
"should dim diagram when code is edited": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}"
+17 -17
View File
@@ -13,40 +13,40 @@
},
"devDependencies": {
"@cypress/snapshot": "^2.1.7",
"@sveltejs/adapter-static": "^1.0.0-next.11",
"@sveltejs/adapter-static": "1.0.0-next.11",
"@sveltejs/kit": "^1.0.0-next.109",
"@types/mermaid": "^8.2.5",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"autoprefixer": "^10.2.5",
"@types/mermaid": "^8.2.6",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"autoprefixer": "^10.2.6",
"chai": "^4.3.4",
"cssnano": "^5.0.1",
"cypress": "^7.3.0",
"cypress-localstorage-commands": "^1.4.4",
"cssnano": "^5.0.5",
"cypress": "^7.4.0",
"cypress-localstorage-commands": "^1.4.5",
"eslint": "^7.27.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-postcss-modules": "^1.2.1",
"eslint-plugin-svelte3": "^3.2.0",
"eslint-plugin-tailwindcss": "^1.8.0",
"eslint-plugin-tailwindcss": "^1.9.1",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"mocha": "^8.4.0",
"postcss": "^8.2.10",
"postcss": "^8.3.0",
"postcss-load-config": "^3.0.1",
"prettier": "~2.2.1",
"prettier-plugin-svelte": "^2.2.0",
"prettier": "~2.3.0",
"prettier-plugin-svelte": "^2.3.0",
"svelte": "^3.34.0",
"svelte-preprocess": "^4.7.1",
"tailwindcss": "^2.1.1",
"tailwindcss": "^2.1.4",
"tslib": "^2.0.0",
"typescript": "^4.0.0"
"typescript": "^4.3.2"
},
"type": "module",
"dependencies": {
"@analytics/google-analytics": "^0.5.2",
"@macfja/svelte-persistent-store": "^1.1.0",
"@analytics/google-analytics": "^0.5.3",
"@macfja/svelte-persistent-store": "^1.1.1",
"analytics": "^0.7.5",
"js-base64": "^3.6.1",
"mermaid": "^8.10.1",
+8 -3
View File
@@ -23,7 +23,7 @@
};
export let errorMarkers: monaco.editor.IMarkerData[] = [];
let oldText = text;
$: editor && Monaco?.editor.setModelLanguage(editor.getModel(), language);
$: Monaco?.editor.setModelLanguage(editor.getModel(), language);
$: {
if (text !== oldText) {
if ($codeStore.updateEditor) {
@@ -31,7 +31,7 @@
}
oldText = text;
}
editor && Monaco?.editor.setModelMarkers(editor.getModel(), 'test', errorMarkers);
Monaco?.editor.setModelMarkers(editor.getModel(), 'test', errorMarkers);
}
const dispatch = createEventDispatcher<EditorEvents>();
@@ -49,7 +49,12 @@
alert('Loading Monaco Editor failed. Please try refreshing the page.');
};
onMount(async () => {
await loadMonaco(); // Fix https://github.com/mermaid-js/mermaid-live-editor/issues/175
try {
//@ts-ignore : This is a hack to handle a svelte-kit error when importing monaco.
Monaco = monaco;
} catch {
await loadMonaco(); // Fix https://github.com/mermaid-js/mermaid-live-editor/issues/175
}
initEditor(Monaco);
editor = Monaco.editor.create(divEl, editorOptions);
editor.onDidChangeModelContent(() => {
+348 -404
View File
File diff suppressed because it is too large Load Diff