docs-website icon indicating copy to clipboard operation
docs-website copied to clipboard

fix DoNotTranslation deserialization

Open tabathadelane opened this issue 2 years ago • 5 comments

this PR does two main things:

  • add upgraded versions of unified and related packages

    you can see these in code as unified11 or remark-parse10, etc. it would be a huge undertaking to upgrade everywhere we use these packages, so this numbering lets us use the upgraded versions only in specific places. upgrading these packages in our deserialization code fixes the newline issue with DNT tags. there were some other minor changes necessary to get deserialization working with the upgraded packages
  • add uvu and Sinon for ESM tests

    rather than desperately fight Jest to somehow get CJS and ESM tests working, this PR adds uvu specifically for running ESM tests. ESM tests are necessary as newer unified packages only have ESM support (no CJS), so our code has to be ESM as well. our test command now runs both Jest and uvu. one small note is that uvu does not support snapshot testing. i wrote a rudimentary module to accomplish this. i added Sinon for easier function mocking, as jest.fn can't be used outside of Jest

serialization code is unchanged with this PR. i tried to keep the scope as tight as possible, so this only updates deserialization code and other files that needed to be updated to ESM out of necessity

tabathadelane avatar Mar 29 '24 16:03 tabathadelane

Hi @tabathadelane 👋

Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.

We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes). If you add any more commits, you can comment netlify build on this PR to update the preview.

github-actions[bot] avatar Mar 29 '24 16:03 github-actions[bot]

Deploy Preview for docs-website-netlify ready!

Name Link
Latest commit a12edfa7b8071ffde783515965fa310589f2a72d
Latest deploy log https://app.netlify.com/sites/docs-website-netlify/deploys/6643931ee018a000086144f9
Deploy Preview https://deploy-preview-16725--docs-website-netlify.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 29 '24 16:03 netlify[bot]

Deploy Preview for docs-website-kr ready!

Name Link
Latest commit a00f8dd0ec8fc148c3a1cbace17c13cb118824e1
Latest deploy log https://app.netlify.com/sites/docs-website-kr/deploys/66293a89f8dbf9000876e9dc
Deploy Preview https://deploy-preview-16725--docs-website-kr.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 24 '24 17:04 netlify[bot]

Deploy Preview for docs-website-es failed. Why did it fail? →

Name Link
Latest commit a00f8dd0ec8fc148c3a1cbace17c13cb118824e1
Latest deploy log https://app.netlify.com/sites/docs-website-es/deploys/66293a896a0619000856edff

netlify[bot] avatar Apr 24 '24 17:04 netlify[bot]

Deploy Preview for docs-website-pt failed. Why did it fail? →

Name Link
Latest commit a00f8dd0ec8fc148c3a1cbace17c13cb118824e1
Latest deploy log https://app.netlify.com/sites/docs-website-pt/deploys/66293a89071cc10008821199

netlify[bot] avatar Apr 24 '24 17:04 netlify[bot]

Hi @tabathadelane , is this PR still something we're actively working on?

austin-schaefer avatar May 23 '24 18:05 austin-schaefer