Skip to content
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

Migrate KaTeX@0.16.0 from libraries to KaTeX@0.16.9 in node_modules #4417

Merged
merged 13 commits into from Nov 12, 2023

Conversation

ljgonzalez1
Copy link
Contributor

@ljgonzalez1 ljgonzalez1 commented Nov 8, 2023

Bumps up KaTeX version from 0.16.0 to 0.16.9
Just replaced the original files in /libraries/katex for the ones in the 0.16.9 release (KaTeX Changelog here)

This is mostly beacause the version in trilium was quite old by now and for the bug fixed in 0.16.3 which was bothering me:

v0.16.3
0.16.3 (2022-10-22)
Bug Fixes
\hline after \cr (KaTeX/KaTeX#3735) (ebf6bf5), closes KaTeX/KaTeX#3734

@ljgonzalez1 ljgonzalez1 changed the title Update KaTeX version Update KaTeX version from 0.16.0 to 0.16.9 Nov 8, 2023
@rauenzi
Copy link
Collaborator

rauenzi commented Nov 8, 2023

This could also be a good opportunity to try to move it to an npm dependency #3431

@ljgonzalez1
Copy link
Contributor Author

@rauenzi
Sorry, not that experienced with node. Or js. Just learning actually.

I think I can try though.

Would add the package to the packages.json file (and the lockfile) and change the import method work?

I'll test if of course, but if ithere is more to do apart from that, it would be nice to know.
Also, can you link me to another pr where they changed a library import to a package import so I can use it as an example?

@ljgonzalez1
Copy link
Contributor Author

ljgonzalez1 commented Nov 9, 2023

Also took the opportunity to update the .gitignore file as it was a bit leftout.
Not sure if it is a good idea to combine a couple of things in a single pr (my first attempt at contribution to FOSS), but I'll leave it with the idea it helps.

Worst case you tell me and I make a rollback / undo


Here are the changes to the .gitignore:

  • Grouped al files and folder by category
  • Left comments about what is ignored or un-ignored
  • Ignored/Un-ignored common files for:
    • OS:
      • Mac OS
      • Linux (+ KDE .directory)
    • IDEs/Editors
      • VS Code, Visual Studio Code, VS Codium
      • Most of the Jetbrains IDE (ignored almost the whole folder /.idea as is usually not needed)
      • Kate

@ljgonzalez1 ljgonzalez1 changed the title Update KaTeX version from 0.16.0 to 0.16.9 Update KaTeX version from 0.16.0 to 0.16.9 & Update .gitignore Nov 9, 2023
@rauenzi
Copy link
Collaborator

rauenzi commented Nov 9, 2023

can you link me to another pr where they changed a library import to a package import so I can use it as an example?

I don't know of one off the top of my head. As for how to move it to npm, it's probably slightly more involved than just adding to package.json since it needs to be properly included with the server files on build.

Not sure if it is a good idea to combine a couple of things in a single pr

I won't speak for zadam here obviously, so I'll just say in my experience, usually it's kept to one feature/fix per PR otherwise unrelated pieces can hold back things that are otherwise ready to roll.

That said, to me this change to .gitignore feels unneeded and very unrelated. There might be a couple lines that could be useful but most seem to not really apply to Trilium imo.

@ljgonzalez1
Copy link
Contributor Author

won't speak for zadam here obviously, so I'll just say in my experience, usually it's kept to one feature/fix per PR otherwise unrelated pieces can hold back things that are otherwise ready to roll.

Removed the .gitignore stuff I did.

Almost there with the migration.

@ljgonzalez1 ljgonzalez1 changed the title Update KaTeX version from 0.16.0 to 0.16.9 & Update .gitignore Update KaTeX version from 0.16.0 to 0.16.9 Nov 9, 2023
@ljgonzalez1
Copy link
Contributor Author

ljgonzalez1 commented Nov 9, 2023

This could also be a good opportunity to try to move it to an npm dependency #3431

Woohoo!!

Done!! (I hope so)


No is no longer an independent module which has to be updated manually.
Replaced all the paths and references so it imports the node_module's version instead of the libraries's version.

Tested with everything I thought of to make sure nothing was (more) borken.

It works in the editor
image

And in shared notes
image

@ljgonzalez1 ljgonzalez1 changed the title Update KaTeX version from 0.16.0 to 0.16.9 Migrate KaTeX@0.16.0 from libraries to KaTeX@0.16.9 in node_modules Nov 9, 2023
@zadam zadam merged commit 2790f52 into zadam:master Nov 12, 2023
@zadam
Copy link
Owner

zadam commented Nov 12, 2023

That's great, thank you!

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.

\hline not working after \cr
3 participants