Skip to content

Commit

Permalink
Merge branch 'develop' into sidv/fixErrorDiagram
Browse files Browse the repository at this point in the history
* develop:
  build: update Browserslist db
  Fix tests
  fix cypress
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  Group mermaid release separately
  chore(deps): update all non-major dependencies
  build: update Browserslist db
  build: update Browserslist db
  Bump @adobe/css-tools from 4.3.0 to 4.3.1
  fix: add missing and remove duplicate keywords in pie
  • Loading branch information
sidharthv96 committed Sep 15, 2023
2 parents 6334d4a + 2cf66be commit e530b3e
Show file tree
Hide file tree
Showing 9 changed files with 386 additions and 285 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/diagramUpdate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Auto sync tests', () => {

it('supports commenting code out/in', () => {
cy.get('#editor').contains('Car').click();
cy.focused().type(`${cmd}/`);
cy.get('#editor').get('textarea').type(`${cmd}/`, { force: true });
cy.get('#view').contains('Car').should('not.exist');

typeInEditor(`{uparrow}${cmd}/`);
Expand Down
16 changes: 9 additions & 7 deletions cypress/e2e/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ export const typeInEditor = (
) => {
cy.window().should('have.property', 'editorLoaded', true);
cy.get('#editor').click();
if (bottom) {
cy.focused().type('{pageDown}');
}
if (newline) {
cy.focused().type('{enter}');
}
cy.focused().type(text);
cy.get('#editor').within(($editor) => {

Check warning on line 14 in cypress/e2e/util.ts

View workflow job for this annotation

GitHub Actions / unit-tests

'$editor' is defined but never used

Check warning on line 14 in cypress/e2e/util.ts

View workflow job for this annotation

GitHub Actions / build

'$editor' is defined but never used
if (bottom) {
cy.get('textarea').type('{pageDown}', { force: true });
}
if (newline) {
cy.get('textarea').type('{enter}', { force: true });
}
cy.get('textarea').type(text, { force: true });
});
};

const downloadsFolder = Cypress.config('downloadsFolder');
Expand Down
2 changes: 1 addition & 1 deletion cypress/snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}"
}
},
"__version": "12.9.0",
"__version": "12.17.4",
"Auto sync tests": {
"should dim diagram when code is edited": {
"1": "{\"code\":\"flowchart 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}\",\"autoSync\":false,\"updateDiagram\":false}"
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,36 @@
"devDependencies": {
"@cypress/snapshot": "2.1.7",
"@sveltejs/adapter-static": "2.0.3",
"@sveltejs/kit": "1.22.5",
"@sveltejs/kit": "1.25.0",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/svelte": "3.2.2",
"@types/pako": "2.0.0",
"@types/uuid": "9.0.2",
"@types/uuid": "9.0.4",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@vitest/ui": "^0.34.0",
"autoprefixer": "^10.4.14",
"c8": "7.14.0",
"chai": "^4.3.7",
"cssnano": "^6.0.0",
"cy-verify-downloads": "0.1.15",
"cypress": "12.17.3",
"cypress-localstorage-commands": "2.2.3",
"eslint": "8.46.0",
"eslint-config-prettier": "8.9.0",
"eslint-plugin-cypress": "2.13.4",
"cy-verify-downloads": "0.2.0",
"cypress": "12.17.4",
"cypress-localstorage-commands": "2.2.4",
"eslint": "8.49.0",
"eslint-config-prettier": "8.10.0",
"eslint-plugin-cypress": "2.14.0",
"eslint-plugin-es": "4.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-postcss-modules": "2.0.0",
"eslint-plugin-svelte3": "4.0.0",
"eslint-plugin-tailwindcss": "3.13.0",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-vitest": "^0.2.0",
"eslint-plugin-vitest": "^0.3.0",
"esserializer": "1.3.11",
"font-awesome": "^4.7.0",
"husky": "^8.0.3",
"jsdom": "21.1.2",
"lint-staged": "13.2.3",
"lint-staged": "13.3.0",
"node-html-parser": "^6.1.5",
"postcss": "^8.4.21",
"postcss-load-config": "4.0.1",
Expand All @@ -63,7 +63,7 @@
"svelte-preprocess": "5.0.4",
"tailwindcss": "^3.3.1",
"tslib": "^2.5.0",
"typescript": "5.1.6",
"typescript": "5.2.2",
"vite": "^4.3.9",
"vitest": "^0.34.0"
},
Expand All @@ -74,11 +74,11 @@
"dayjs": "^1.11.7",
"js-base64": "3.7.5",
"mermaid": "10.3.1",
"monaco-editor": "0.40.0",
"monaco-editor": "0.43.0",
"pako": "2.1.0",
"random-word-slugs": "0.1.7",
"svg-pan-zoom": "3.6.1",
"uuid": "9.0.0"
"uuid": "9.0.1"
},
"lint-staged": {
"*.{ts,svelte,js,css,md,json}": [
Expand Down
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
":automergePatch"
],
"packageRules": [
{
"matchPackagePatterns": ["^mermaid"],
"groupName": "Mermaid packages"
},
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/History/history.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
import type { HistoryEntry } from '$lib/types';
import { describe, it, expect } from 'vitest';
import {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/History/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export const addHistoryEntry = (entryToAdd: Optional<HistoryEntry, 'id'>): void
}
return [entry, ...entries];
});
} else if (entry.type === 'manual') {
manualHistoryStore.update((entries) => [entry, ...entries]);
logEvent('history', { action: 'save' });
}

manualHistoryStore.update((entries) => [entry, ...entries]);
logEvent('history', { action: 'save' });
};

export const clearHistoryData = (idToClear?: string): void => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util/monacoExtra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const initEditor = (monacoEditor: typeof Monaco): void => {
pie: {
typeKeywords: ['pie'],
blockKeywords: [],
keywords: ['title', 'showData', 'title', 'accDescription']
keywords: ['showData', 'title', 'accDescr', 'accTitle']
},
c4Diagram: {
typeKeywords: ['C4Context', 'C4Container', 'C4Component', 'C4Dynamic', 'C4Deployment'],
Expand Down

0 comments on commit e530b3e

Please sign in to comment.