Skip to content

Conversation

@antoinell
Copy link
Contributor

@antoinell antoinell commented Nov 4, 2025

This pull request is now ready.
This pull request is a superset of #1384 .

Before upgrading vite and using the new roll down the following errors were happening with the new version of mermaid.

TypeError: Importing a module script failed

on FireFox

Error rendering mermaid diagram: TypeError: error loading dynamically imported module: http://macbook-air.lan:3333/preview/static/sequenceDiagram-WL72ISMW-CFA2tOp8.js

Fixes #1373

@antoinell
Copy link
Contributor Author

here are the manual tests I am able to do

  • first run mvn clean install for the whole project
  • run znai:preview using mvn -pl znai-docs znai:preview
  • change the pom.xml of znai-cli to add the dependency
  <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <classifier>sources</classifier>
        </dependency>

then run the CLI with this run configuration

<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="ZnaiCliApp" type="Application" factoryName="Application" nameIsGenerated="true">
    <option name="MAIN_CLASS_NAME" value="org.testingisdocumenting.znai.cli.ZnaiCliApp" />
    <module name="znai-cli" />
    <option name="PROGRAM_PARAMETERS" value="preview -source $PROJECT_DIR$/znai-docs/znai" />
    <extension name="coverage">
      <pattern>
        <option name="PATTERN" value="org.testingisdocumenting.znai.cli.*" />
        <option name="ENABLED" value="true" />
      </pattern>
    </extension>
    <method v="2">
      <option name="Make" enabled="true" />
    </method>
  </configuration>
</component>

[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (search-index.js, line 0)
[Error] SyntaxError: Importing binding name 'SearchResult' is not found.
@antoinell
Copy link
Contributor Author

antoinell commented Nov 23, 2025

At the moment in the javascript console there are these errors when running npm run dev

[Error] TypeError: window.createLocalSearchIndex is not a function. (In 'window.createLocalSearchIndex()', 'window.createLocalSearchIndex' is undefined)
	Global Code (search-index.js:18)

@antoinell antoinell mentioned this pull request Nov 23, 2025
@@ -1,35 +1,56 @@
const React = require('react');
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are touching this file for the first time since two sigma, please add znai maintainers 2025 to the copyright (see other files as an example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deal with this comment on the other pull request #1384 .

<concat destfile="${project.build.outputDirectory}/static/main.js" append="true">
<fileset file="dist/assets/index*.js" />
</concat>
<echo file="${project.build.outputDirectory}/static/main.js" >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this empty file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deal with this comment on the other pull request #1384.

# Conflicts:
#	znai-reactjs/src/doc-elements/cli/CliCommand.jsx
#	znai-reactjs/src/doc-elements/page/default/DefaultPageContent.tsx
Silence some typescript warnings generating red lines in IntelliJ
# Conflicts:
#	znai-reactjs/package-lock.json
# Conflicts:
#	znai-reactjs/package-lock.json
#	znai-reactjs/package.json
#	znai-reactjs/src/doc-elements/text-selection/SlackActiveQuestions.tsx
@antoinell antoinell changed the title bump mermaid to 11.12.1 bump mermaid to 11.12.2 Dec 9, 2025
@MykolaGolubyev MykolaGolubyev merged commit eea4067 into testingisdocumenting:master Dec 11, 2025
1 check passed
@antoinell antoinell deleted the bump-mermaid branch January 5, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be able to use the newest version of mermaid

2 participants