diff --git a/Dockerfile b/Dockerfile index 0e0bdff4..643cdc7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # Stop : press ctrl + c # or # docker stop mermaid-live-editor -FROM node:20.2.0 as mermaid-live-editor-builder +FROM node:20.3.0 as mermaid-live-editor-builder COPY --chown=node:node . /home WORKDIR /home RUN yarn install diff --git a/cypress/e2e/themes.spec.ts b/cypress/e2e/themes.spec.ts index c7d986ff..df3806aa 100644 --- a/cypress/e2e/themes.spec.ts +++ b/cypress/e2e/themes.spec.ts @@ -12,7 +12,7 @@ describe('Test themes', () => { }); } }); - cy.contains('Change Theme').click(); + cy.contains('Theme').click(); }); it('should set light theme as default', () => { @@ -44,7 +44,7 @@ describe('Test themes', () => { }); } }); - cy.contains('Change Theme').click(); + cy.contains('Theme').click(); }); it('should set dark theme as default', () => { diff --git a/package.json b/package.json index 526bbfeb..9f85f7fc 100644 --- a/package.json +++ b/package.json @@ -28,16 +28,16 @@ "@testing-library/jest-dom": "5.16.5", "@testing-library/svelte": "3.2.2", "@types/pako": "2.0.0", - "@types/uuid": "9.0.1", + "@types/uuid": "9.0.2", "@typescript-eslint/eslint-plugin": "5.59.9", "@typescript-eslint/parser": "5.59.9", - "@vitest/ui": "^0.31.0", + "@vitest/ui": "^0.32.0", "autoprefixer": "^10.4.14", "c8": "7.14.0", "chai": "^4.3.7", "cssnano": "^6.0.0", "cy-verify-downloads": "0.1.14", - "cypress": "12.13.0", + "cypress": "12.14.0", "cypress-localstorage-commands": "2.2.3", "eslint": "8.42.0", "eslint-config-prettier": "8.8.0", @@ -65,7 +65,7 @@ "tslib": "^2.5.0", "typescript": "5.1.3", "vite": "^4.3.9", - "vitest": "^0.31.1" + "vitest": "^0.32.0" }, "dependencies": { "analytics": "0.8.7", @@ -74,7 +74,7 @@ "dayjs": "^1.11.7", "js-base64": "3.7.5", "mermaid": "10.2.3", - "monaco-editor": "0.38.0", + "monaco-editor": "0.39.0", "pako": "2.1.0", "random-word-slugs": "0.1.7", "svg-pan-zoom": "3.6.1", diff --git a/src/lib/components/Theme.svelte b/src/lib/components/Theme.svelte index 24c5a9c1..6eee5fa4 100644 --- a/src/lib/components/Theme.svelte +++ b/src/lib/components/Theme.svelte @@ -39,7 +39,7 @@ stroke-linejoin="round" stroke-width="2" d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" /> - + @@ -130,7 +129,7 @@
{#if error} {@html $stateStore.error?.toString().replace(/\n/g, '
')} diff --git a/yarn.lock b/yarn.lock index d7e6ff3e..9ad0e4ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -669,10 +669,10 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== -"@types/uuid@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6" - integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA== +"@types/uuid@9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" + integrity sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ== "@types/yauzl@^2.9.1": version "2.10.0" @@ -707,14 +707,6 @@ "@typescript-eslint/typescript-estree" "5.59.9" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz#ff4ad4fec6433647b817c4a7d4b4165d18ea2fa8" - integrity sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig== - dependencies: - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/visitor-keys" "5.59.8" - "@typescript-eslint/scope-manager@5.59.9": version "5.59.9" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz#eadce1f2733389cdb58c49770192c0f95470d2f4" @@ -733,29 +725,11 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.8.tgz#212e54414733618f5d0fd50b2da2717f630aebf8" - integrity sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w== - "@typescript-eslint/types@5.59.9": version "5.59.9" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.9.tgz#3b4e7ae63718ce1b966e0ae620adc4099a6dcc52" integrity sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw== -"@typescript-eslint/typescript-estree@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz#801a7b1766481629481b3b0878148bd7a1f345d7" - integrity sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg== - dependencies: - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/visitor-keys" "5.59.8" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@5.59.9": version "5.59.9" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz#6bfea844e468427b5e72034d33c9fffc9557392b" @@ -769,7 +743,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.59.9": +"@typescript-eslint/utils@5.59.9", "@typescript-eslint/utils@^5.59.9": version "5.59.9" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.9.tgz#adee890107b5ffe02cd46fdaa6c2125fb3c6c7c4" integrity sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg== @@ -783,28 +757,6 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@^5.59.2": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.8.tgz#34d129f35a2134c67fdaf024941e8f96050dca2b" - integrity sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.59.8" - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/typescript-estree" "5.59.8" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz#aa6a7ef862add919401470c09e1609392ef3cc40" - integrity sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ== - dependencies: - "@typescript-eslint/types" "5.59.8" - eslint-visitor-keys "^3.3.0" - "@typescript-eslint/visitor-keys@5.59.9": version "5.59.9" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz#9f86ef8e95aca30fb5a705bb7430f95fc58b146d" @@ -813,47 +765,47 @@ "@typescript-eslint/types" "5.59.9" eslint-visitor-keys "^3.3.0" -"@vitest/expect@0.31.4": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.31.4.tgz#115c517404488bf3cb6ce4ac411c40d8e86891b8" - integrity sha512-tibyx8o7GUyGHZGyPgzwiaPaLDQ9MMuCOrc03BYT0nryUuhLbL7NV2r/q98iv5STlwMgaKuFJkgBW/8iPKwlSg== +"@vitest/expect@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.32.0.tgz#5b10cdc822d54cb870aef917462fbf847202e4e0" + integrity sha512-VxVHhIxKw9Lux+O9bwLEEk2gzOUe93xuFHy9SzYWnnoYZFYg1NfBtnfnYWiJN7yooJ7KNElCK5YtA7DTZvtXtg== dependencies: - "@vitest/spy" "0.31.4" - "@vitest/utils" "0.31.4" + "@vitest/spy" "0.32.0" + "@vitest/utils" "0.32.0" chai "^4.3.7" -"@vitest/runner@0.31.4": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.31.4.tgz#e99abee89132a500d9726a53b58dfc9160db1078" - integrity sha512-Wgm6UER+gwq6zkyrm5/wbpXGF+g+UBB78asJlFkIOwyse0pz8lZoiC6SW5i4gPnls/zUcPLWS7Zog0LVepXnpg== +"@vitest/runner@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.32.0.tgz#d2a391bf4bb373e324cf2f372d8bb913ab323f08" + integrity sha512-QpCmRxftHkr72xt5A08xTEs9I4iWEXIOCHWhQQguWOKE4QH7DXSKZSOFibuwEIMAD7G0ERvtUyQn7iPWIqSwmw== dependencies: - "@vitest/utils" "0.31.4" + "@vitest/utils" "0.32.0" concordance "^5.0.4" p-limit "^4.0.0" pathe "^1.1.0" -"@vitest/snapshot@0.31.4": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.31.4.tgz#59a42046fec4950a1ac70cf0ec64aada3b995559" - integrity sha512-LemvNumL3NdWSmfVAMpXILGyaXPkZbG5tyl6+RQSdcHnTj6hvA49UAI8jzez9oQyE/FWLKRSNqTGzsHuk89LRA== +"@vitest/snapshot@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.32.0.tgz#49c6a08da12ab903ab4582386c97d70b293bc644" + integrity sha512-yCKorPWjEnzpUxQpGlxulujTcSPgkblwGzAUEL+z01FTUg/YuCDZ8dxr9sHA08oO2EwxzHXNLjQKWJ2zc2a19Q== dependencies: magic-string "^0.30.0" pathe "^1.1.0" pretty-format "^27.5.1" -"@vitest/spy@0.31.4": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.31.4.tgz#fce8e348cea32deff79996d116c67893b19cc47d" - integrity sha512-3ei5ZH1s3aqbEyftPAzSuunGICRuhE+IXOmpURFdkm5ybUADk+viyQfejNk6q8M5QGX8/EVKw+QWMEP3DTJDag== +"@vitest/spy@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.32.0.tgz#3ccb4e6dd4cbda7bb837c467d8405e2f8cc107a2" + integrity sha512-MruAPlM0uyiq3d53BkwTeShXY0rYEfhNGQzVO5GHBmmX3clsxcWp79mMnkOVcV244sNTeDcHbcPFWIjOI4tZvw== dependencies: tinyspy "^2.1.0" -"@vitest/ui@^0.31.0": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/ui/-/ui-0.31.4.tgz#465a4762d7937e3322fe66f94c2378bacfeba1ac" - integrity sha512-sKM16ITX6HrNFF+lNZ2AQAen4/6Bx2i6KlBfIvkUjcTgc5YII/j2ltcX14oCUv4EA0OTWGQuGhO3zDoAsTENGA== +"@vitest/ui@^0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/ui/-/ui-0.32.0.tgz#d47ac76ddb748a23abef3cd1a37e16b15f38e4f5" + integrity sha512-55gugh6+owrOqW83RCgLm9q+o3SlzvFVgl1lyfnr0WB8ABxLoM+3pgusEjosscgEYGzTjTXaZY6xLd4qlfH/RQ== dependencies: - "@vitest/utils" "0.31.4" + "@vitest/utils" "0.32.0" fast-glob "^3.2.12" fflate "^0.7.4" flatted "^3.2.7" @@ -861,10 +813,10 @@ picocolors "^1.0.0" sirv "^2.0.3" -"@vitest/utils@0.31.4": - version "0.31.4" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.31.4.tgz#5cfdcecfd604a7dbe3972cfe0f2b1e0af1246ad2" - integrity sha512-DobZbHacWznoGUfYU8XDPY78UubJxXfMNY1+SUdOp1NsI34eopSA6aZMeaGu10waSOeYwE8lxrd/pLfT0RMxjQ== +"@vitest/utils@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.32.0.tgz#ffbc023083e0ef8401a3562086de0ff1b0599635" + integrity sha512-53yXunzx47MmbuvcOPpLaVljHaeSu1G2dHdmy7+9ngMnQIkBQcvwOcoclWFnxDMxFbnq8exAfh3aKSZaK71J5A== dependencies: concordance "^5.0.4" loupe "^2.3.6" @@ -1763,10 +1715,10 @@ cypress-localstorage-commands@2.2.3: resolved "https://registry.yarnpkg.com/cypress-localstorage-commands/-/cypress-localstorage-commands-2.2.3.tgz#ef5b736226b8316b7d948e30bc4b94a157cfa025" integrity sha512-EUEaHzbstw9AsEheIqr+RyXuxIzUS64nBBwl+Q4/mSdzfXpfcaV1nrHF+6H9zbTuFVTc+oWu6eC1l8aSjiWW6w== -cypress@12.13.0: - version "12.13.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.13.0.tgz#725b6617ea19e41e5c59cc509fc3e08097142b01" - integrity sha512-QJlSmdPk+53Zhy69woJMySZQJoWfEWun3X5OOenGsXjRPVfByVTHorxNehbzhZrEzH9RDUDqVcck0ahtlS+N/Q== +cypress@12.14.0: + version "12.14.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.14.0.tgz#37a19b85f5e9d881995e9fee1ddf41b3d3a623dd" + integrity sha512-HiLIXKXZaIT1RT7sw1sVPt+qKtis3uYNm6KwC4qoYjabwLKaqZlyS/P+uVvvlBNcHIwL/BC6nQZajpbUd7hOgQ== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -2546,11 +2498,11 @@ eslint-plugin-unicorn@^46.0.0: strip-indent "^3.0.0" eslint-plugin-vitest@^0.2.0: - version "0.2.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-vitest/-/eslint-plugin-vitest-0.2.5.tgz#4e6a3dcd1811aa8427ced4884eff9dd4b79e9693" - integrity sha512-b15PJg7pzGd2X/RK6yRIHhA0sPJnjwNHytMFpqL8Xhil4C7sMz3bVhsTSisBsZR7AvYcJZotVgwQoVGgk8Sm3Q== + version "0.2.6" + resolved "https://registry.yarnpkg.com/eslint-plugin-vitest/-/eslint-plugin-vitest-0.2.6.tgz#9b13eab04b4b7baad24d37a3b96123c93565672e" + integrity sha512-PnH4qdqzmAYu78kBnSh5Oi6L1jCtc0orJMWxFeM6k6eW2aEmi0c4Y855v6Qh//7ruU3JzN/aeZrBSVBZMP525Q== dependencies: - "@typescript-eslint/utils" "^5.59.2" + "@typescript-eslint/utils" "^5.59.9" eslint-scope@^5.1.1: version "5.1.1" @@ -4123,10 +4075,10 @@ mlly@^1.2.0: pkg-types "^1.0.3" ufo "^1.1.2" -monaco-editor@0.38.0: - version "0.38.0" - resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.38.0.tgz#7b3cd16f89b1b8867fcd3c96e67fccee791ff05c" - integrity sha512-11Fkh6yzEmwx7O0YoLxeae0qEGFwmyPRlVxpg7oF9czOOCB/iCjdJrG5I67da5WiXK3YJCxoz9TJFE8Tfq/v9A== +monaco-editor@0.39.0: + version "0.39.0" + resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.39.0.tgz#3cf8e3718d6aac347d374516a6837d1c13d967d2" + integrity sha512-zhbZ2Nx93tLR8aJmL2zI1mhJpsl87HMebNBM6R8z4pLfs8pj604pIVIVwyF1TivcfNtIPpMXL+nb3DsBmE/x6Q== mri@^1.1.0: version "1.2.0" @@ -5930,10 +5882,10 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vite-node@0.31.4: - version "0.31.4" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.31.4.tgz#0437f76c35fa83f0a868d3fb5896ca9e164291f5" - integrity sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ== +vite-node@0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.32.0.tgz#8ee54539fa75d1271adaa9788c8ba526480f4519" + integrity sha512-220P/y8YacYAU+daOAqiGEFXx2A8AwjadDzQqos6wSukjvvTWNqleJSwoUn0ckyNdjHIKoxn93Nh1vWBqEKr3Q== dependencies: cac "^6.7.14" debug "^4.3.4" @@ -5958,19 +5910,19 @@ vitefu@^0.2.4: resolved "https://registry.yarnpkg.com/vitefu/-/vitefu-0.2.4.tgz#212dc1a9d0254afe65e579351bed4e25d81e0b35" integrity sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g== -vitest@^0.31.1: - version "0.31.4" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.31.4.tgz#5abe02562675262949c10e40811f348a80f6b2a6" - integrity sha512-GoV0VQPmWrUFOZSg3RpQAPN+LPmHg2/gxlMNJlyxJihkz6qReHDV6b0pPDcqFLNEPya4tWJ1pgwUNP9MLmUfvQ== +vitest@^0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.32.0.tgz#125212b8abbfdae047fa72e516bc7257fd0a67db" + integrity sha512-SW83o629gCqnV3BqBnTxhB10DAwzwEx3z+rqYZESehUB+eWsJxwcBQx7CKy0otuGMJTYh7qCVuUX23HkftGl/Q== dependencies: "@types/chai" "^4.3.5" "@types/chai-subset" "^1.3.3" "@types/node" "*" - "@vitest/expect" "0.31.4" - "@vitest/runner" "0.31.4" - "@vitest/snapshot" "0.31.4" - "@vitest/spy" "0.31.4" - "@vitest/utils" "0.31.4" + "@vitest/expect" "0.32.0" + "@vitest/runner" "0.32.0" + "@vitest/snapshot" "0.32.0" + "@vitest/spy" "0.32.0" + "@vitest/utils" "0.32.0" acorn "^8.8.2" acorn-walk "^8.2.0" cac "^6.7.14" @@ -5986,7 +5938,7 @@ vitest@^0.31.1: tinybench "^2.5.0" tinypool "^0.5.0" vite "^3.0.0 || ^4.0.0" - vite-node "0.31.4" + vite-node "0.32.0" why-is-node-running "^2.2.2" w3c-xmlserializer@^4.0.0: