From 2ede244da02a6f8eb1a5d9bc2847ff1602579eef Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 14 Aug 2023 00:41:53 +0530 Subject: [PATCH] chore: Minor comments Co-authored-by: Alois Klink --- .esbuild/util.ts | 2 ++ packages/mermaid/src/schemas/config.schema.yaml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.esbuild/util.ts b/.esbuild/util.ts index bdb48f37a..249045652 100644 --- a/.esbuild/util.ts +++ b/.esbuild/util.ts @@ -67,6 +67,8 @@ export const getBuildConfig = ({ output.format = 'iife'; output.splitting = false; output.globalName = '__esbuild_esm_mermaid'; + // Workaround for removing the .default access in esbuild IIFE. + // https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396 output.footer = { js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;', }; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 6e5f48d95..8c71bdcde 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -7,7 +7,7 @@ # - `scripts/create-types-from-json-schema.mjs` # Used to generate the `src/config.type.ts` TypeScript types for MermaidConfig # with the `json-schema-to-typescript` NPM package. -# - `.vite/jsonSchemaPlugin.ts` +# - `.build/jsonSchema.ts` # Used to generate the default values from the `default` keys in this # JSON Schema using the `ajv` NPM package. # Non-JSON values, like functions or `undefined`, still need to be manually @@ -21,7 +21,7 @@ # - Use `meta:enum` to document enum values (from jsonschema2md) # - Use `tsType` to override the TypeScript type (from json-schema-to-typescript) # - If adding a new object to `MermaidConfig` (e.g. a new diagram type), -# you may need to add it to `.vite/jsonSchemaPlugin.ts` and `src/docs.mts` +# you may need to add it to `.build/jsonSchema.ts` and `src/docs.mts` # to get the docs/default values to generate properly. $id: https://mermaid-js.github.io/schemas/config.schema.json $schema: https://json-schema.org/draft/2019-09/schema