`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
...
* develop: (22 commits)
fix: Tsconfig
ci: lint .jison files for any console.log()
refactor: remove `console.log` in c4Diagram.jison
style: forbid using `console` in mermaid src code
Add tests for other boundary properties
Add first test for Boundary
Test all different types of systems
Introduce shape list in test
Add tests for C4 System
Make test grouping more explicit
Copy tests from Person to PersonExt
Add test for link to Person_Ext
Add question on Person_Ext
Add test for structure of Person_Ext
Add test for alias
Add test for label
Add test for description
Add test for $tags
Add test for $link
Add test for $sprite
...
* develop: (22 commits)
fix: Tsconfig
ci: lint .jison files for any console.log()
refactor: remove `console.log` in c4Diagram.jison
style: forbid using `console` in mermaid src code
Add tests for other boundary properties
Add first test for Boundary
Test all different types of systems
Introduce shape list in test
Add tests for C4 System
Make test grouping more explicit
Copy tests from Person to PersonExt
Add test for link to Person_Ext
Add question on Person_Ext
Add test for structure of Person_Ext
Add test for alias
Add test for label
Add test for description
Add test for $tags
Add test for $link
Add test for $sprite
...
* develop:
Update prettier
chore: Run postbuild with prepare
(formatting) prettier fix
Removed warnings in the grammar oand some console logging
unmangle sentence about doc changes committed and showing up on docsify site
change references from /docs to /src/docs; rework doc section in CONTRIBUTING
* develop: (37 commits)
fix JSDOC @param, @returns; fixed a few minor typos in comments
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 babel-jest from 29.0.1 to 29.0.2
Lint fixes
Removing requirement to add ids for nodes with a shape
Merged typescript changes
Updated with cloud and bang shapes
Adding cloud and bang shapes
fix(git): support numeric branch names
Fix for unit tests after refactoring
Documenting classes and icons
Startingpoint for the documentation
Some theming/styling fixes
Adding some rendering tests
...
Converts the *.jison files into .js, then lints them using just
the `no-console` rule.
To keep things simple, I've just made this run only on CI.
If we want to do more complex linting on `*.jison` files, it might
be worth making an `eslint-plugin-jison`, so that we can directly
parse jison in ESLint.