* develop: (40 commits)
chore(deps-dev): bump typescript from 4.8.2 to 4.8.3 (#3446)
chore(deps): bump actions/checkout from 2 to 3 (#3449)
change wording of console log message (use comma)
Moving out tests from mermaid.spec.js
Fix for issue with setting the loglevel via numbers
chore: update browsers list
Limiting the interaction between the mermaid diagram and Mermaid to the diagramAPI
Fix for broken tests
chore(docs): Remove edit this page
fix(git): support unusual prefixes in branch name
formatting
eslint fixes
Creating detectors and moving out diagram specific code from the diagramAPI
add eslint-disable no-console for file
fix: Run precommit hook for doc.mts changes too
chore: Updated doc files
fix: Formatting issue
(formatting only) sort imports just to force a new CI lint check
ci: re-enable coveralls coverage upload
build(dev-deps): remove unused `coveralls`
...
jison throws an error if a branch name starts with an unusual prefix.
For example, a branch named `branch/test-branch` will throw a
parse error, since jison thinks it's a `branch` command, and not
a branch id.
An easy fix is to use the `(?=\s|$)` regex to ensure that only
'branch ' or 'branch\n' will be parsed as the branch command.
Fixes: https://github.com/mermaid-js/mermaid/issues/3362
`mermaid.core.mjs` should be the default export.
This is because it does not bundle `node_modules/`, allowing users of
mermaid to bundle dependencies themselves,
using Webpack/ESBuild/others.
The `mermaid.core.js` build was previously a UMD build that did not
have `node_modules` bundled.
This was designed for users to add `mermaid` to their own apps,
then bundle with Webpack/ESBuild.
Hence the bundle test in `cypress/platform/bundle-test.js`.
As ESBuild does not support UMD, I've switched the `mermaid.core.js`
to instead use ESM, as Mermaid now requires ESM
(due to d3 requiring ESM). All modern bundlers also support ESM.
When converting a `.jison` file into a CommonJS module,
jison by default adds a main() function that calls `require("fs");`
Even though the main function is never used in the browser,
because `fs` is a Node.JS only module, this causes some esbuild issues.
To disable this, we can just set an empty main to the jison generator.
* develop: (67 commits)
fix: Tsconfig
Update prettier
chore: Run postbuild with prepare
(formatting) prettier fix
Removed warnings in the grammar oand some console logging
ci: lint .jison files for any console.log()
fix JSDOC @param, @returns; fixed a few minor typos in comments
unmangle sentence about doc changes committed and showing up on docsify site
change references from /docs to /src/docs; rework doc section in CONTRIBUTING
Update after lint comments
Regenerate the directive docs as I changed them
chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
Update duplicate copy pasted directive description
chore(deps-dev): bump @types/dompurify from 2.3.3 to 2.3.4
chore(deps-dev): bump jest-environment-jsdom from 29.0.1 to 29.0.2
chore(deps-dev): bump babel-jest from 29.0.1 to 29.0.2
Lint fixes
Removing requirement to add ids for nodes with a shape
#3336 Merged typescript changes
Merged typescript changes
...