-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esbuild for v11 #4109
esbuild for v11 #4109
Conversation
* release/10.0.0: (1038 commits) Fix docs fix Server Fix lint Remove Readme Fix E2E Tests Fix tests feat: Break render and parse types chore: Remove all non async render/parse/init Remove CJS builds from docs chore: Remove cjs from build RC version Revert #4034 Revert #4034 fix: Vite, D3, Vitest Types fix(api): tree shaking package.json import Add highlight tag info in contributing.md chore(deps): update dependency cypress to v12 docs: fix links Skip precommit hooks on CI Fix release-publish ...
* release/10.0.0: Cleanup Update docs
* release/10.0.0: 10.0.0-rc.3 Export more types no side effects 10.0.0-rc.2 skip failing elk test
* release/10.0.0: Skip all elk tests as it's flaky
* release/10.0.0: Skip elk
* release/10.0.0: Cleanup
* develop: (57 commits) fix Lint Update CHANGELOG.md Update CHANGELOG.md fix: fix exports Fix readme link Regenerate mermaid docs Add deepdwn to cspell Add Deepdwn to native integrations list docs: Fix changelog docs: v10 breaking changes Remove `null` from diagrams before render fix docs diagram Updated version Minor cleanup to trigger build. Fix spellings Wrap option working in test case Fix typos Minor cleanup Removed the deprecated use of mindmap in Demo Minor cleanup ...
Released https://www.npmjs.com/package/mermaid/v/11.0.0-alpha.1 with IIFE build. When using I have added a console error suggesting the change if that error is detected |
… into sidv/esbuildV10 * 'sidv/esbuildV10' of https://github.com/mermaid-js/mermaid: Update docs
* next: Update assignWithDepth.ts Version update and adjusted error diagram Fix for broker error diagram related #4178 Adding new flowchart tests related to issue #2139 Fix for interim issue with classes in state diagrams redeclare `config` parameter add default value for each variable convert `assignWithDepth` to TS #2139 Applying user defined classes properly when calculating shape width chore: Ignore localhost Update packages/mermaid/src/docs/community/development.md Update docs/community/development.md docs: Add development example page. docs: Correct detectType filename chore: Minor cleanups chore: remove comment chore: Remove comments, cleanup fix: unitTests after tripleParsing removal fix: Remove triple parsing of diagrams
TODO in this PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to ESBuild and using IIFE seems to fine to me, but I'm pretty against breaking the usage <script/>
by changing globalThis.mermaid
to globalThis.mermaid.default
. But I think this should be fixable (even if we have to do it manually), see my comment below:
Also, I've notice that this PR has a lot of git merge commits, and the first new commit on this PR (9763c03) uses 8e3f986 as a parent, which is a commit from September 2022, almost a year ago.
Does it make sense to use git rebase
to clean up the commit history?
- Benefits: it will make future merge conflicts much easier to handle (pretty important if we're aiming for the
next/
branch instead ofdevelop
). - Downsides:
git rebase
can be really hard to learn, unless you're already agit
CLI expert.
One final thing, depending on when you want v11 to be released, we could also do something like:
- v11 breaking changes
- Switch Vite UMD output of
mermaid.min.js
to Vite IIFE output ofmermaid.min.js
(still using Vite, so it would be a very small code change, maybe just one line of code)
- Switch Vite UMD output of
- v11.0.1 change
- Switch from Vite to ESBuild (no breaking changes since we already did the UMD -> IIFE switch in a previous release)
- This would be able to go directly to the
develop
branch, so less risk of merge conflcits.
- This would be able to go directly to the
- Switch from Vite to ESBuild (no breaking changes since we already did the UMD -> IIFE switch in a previous release)
It would mean less risk of merge conflicts, and it would make the v11 BREAKING CHANGES easier to view. The only downside is then @Yokozuna59 would need to wait a few more weeks for ESBuild.
Co-authored-by: Alois Klink <alois@aloisklink.com>
Co-authored-by: Alois Klink <alois@aloisklink.com>
… into sidv/esbuildV10 * 'sidv/esbuildV10' of https://github.com/mermaid-js/mermaid: Update .build/common.ts
I won't be able to work much on it after a few weeks since the summer holiday ends 😬. That's why I'd recommend supporting more diagrams and grammars; then integrating would be easier since it's just inserting values from AST (without converting other diagram files, just DB). |
@Yokozuna59 now that the POC works, you can carry on with rest of the migration in that branch (After the info and pie PRs are done as we discussed). |
Closing in favour of #4729 |
📑 Summary
Replace vite with esbuild as we are ESM only now.
📏 Design Decisions
🚀 speed.
📋 Tasks
Make sure you
develop
branch