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

Upgrade to latest dependencies #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

southerncross
Copy link

@southerncross southerncross commented May 12, 2024

Hi, guys

Why did I create this?

I tried to use rehype-inline-svg in my project but found that it wasn't compatible with the existing code-base. That's because both my own project and rehype-inline-svg rely on rehype, but with different versions, and there are many breaking changes between those two versions.

So I choose to upgrade the outdated dependencies of rehype-inline-svg.

What did I do?

  1. Upgrade some core dependencies to their latest version, such as rehype-parse, vfile, svgo, etc.
  2. Migrate the package to ESM and make some necessary adjustment to the code. (I have to do this because the latest rehype is ESM only now).
  3. Upgrade some dependencies for running unit tests, such as chai, mocha, ts-node, etc.
  4. Fix all the test cases by updating the snapshots. It's due to the changed behaviors of latest svgo. I know it's dangerous so I checked almost every changes manually.
  5. Use pnpm instead of npm, a small optimization for dev experience.

How did I test?

  1. All test cases are passed.
  2. I tested it locally within my project and it worked.

Other things.

eslint is crashed currently, due to the latest typescript breaking change(see typescript-eslint/typescript-eslint#7155). I'll try to fix it later.

nyc command is not working neither, the output is empty, which is weird... and I'm still on it.

** Please review this PR, thanks. ** 😄

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.

None yet

1 participant