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 markdown-it (and plugins) to ESM (with CJS fallbacks) #237

Merged
merged 19 commits into from
Jan 5, 2024

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Dec 19, 2023

  • upgrade markdown-it to v14.0.0, which is now ESM with a CJS fallback. It also fixes a couple of bugs in img alt text.
  • upgrade markdown-it plugins to their new ESM/CJS versions.
  • upgrade @twemoji/api to v15, with expanded emoji support.
  • upgrade dev dependencies to their latest versions.
  • update the test setup, now that Chai is pure ESM with no default export.
  • includes isomorphic-dompurify v2, which works around Next 13/14 - Isomorphic DOMPurify - Build Error vercel/next.js#58142 in Next.js 13/14.

dependabot bot and others added 14 commits December 19, 2023 16:49
Bumps [eslint](https://github.com/eslint/eslint) from 8.54.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.54.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.3 to 7.23.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.0 to 2.29.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.29.0...v2.29.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote) from 3.0.3 to 4.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-footnote/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-footnote@3.0.3...4.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-footnote
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [markdown-it-sup](https://github.com/markdown-it/markdown-it-sup) from 1.0.0 to 2.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-sup/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-sup@1.0.0...2.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-sup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [markdown-it-sub](https://github.com/markdown-it/markdown-it-sub) from 1.0.0 to 2.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-sub/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-sub@1.0.0...2.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-sub
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [isomorphic-dompurify](https://github.com/kkomelin/isomorphic-dompurify) from 1.9.0 to 1.12.0.
- [Release notes](https://github.com/kkomelin/isomorphic-dompurify/releases)
- [Commits](kkomelin/isomorphic-dompurify@v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: isomorphic-dompurify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.3 to 7.23.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [markdown-it-container](https://github.com/markdown-it/markdown-it-container) from 3.0.0 to 4.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-container/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-container@3.0.0...4.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-container
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@twemoji/api](https://github.com/jdecked/twemoji) from 14.1.2 to 15.0.3.
- [Release notes](https://github.com/jdecked/twemoji/releases)
- [Commits](jdecked/twemoji@v14.1.2...v15.0.3)

---
updated-dependencies:
- dependency-name: "@twemoji/api"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump markdown-it-emoji from 2.0.2 to 3.0.0

Bumps [markdown-it-emoji](https://github.com/markdown-it/markdown-it-emoji) from 2.0.2 to 3.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-emoji/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-emoji@2.0.2...3.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-emoji
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update imports

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jim O'Donnell <jim@zooniverse.org>
Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](jsdom/jsdom@23.0.0...23.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
markdown-it 14.0.0 is now ESM (with a CJS fallback) and fixes some bugs with `img` alt text strings.
https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md#1400---2023-12-08
@eatyourgreens
Copy link
Contributor Author

This version can also be installed from eatyourgreens/markdownz#main, for testing etc.

@eatyourgreens eatyourgreens changed the title Upgrade markdown-it (and other deps) to ESM (with CJS fallbacks) Upgrade markdown-it (and plugins) to ESM (with CJS fallbacks) Dec 19, 2023
@mcbouslog mcbouslog self-requested a review December 21, 2023 16:21
dependabot bot and others added 5 commits December 25, 2023 19:41
Bumps [isomorphic-dompurify](https://github.com/kkomelin/isomorphic-dompurify) from 1.12.0 to 2.0.0.
- [Release notes](https://github.com/kkomelin/isomorphic-dompurify/releases)
- [Commits](kkomelin/isomorphic-dompurify@v1.12.0...v2.0.0)

---
updated-dependencies:
- dependency-name: isomorphic-dompurify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.6 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.6 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.22.15 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-register)

---
updated-dependencies:
- dependency-name: "@babel/register"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump chai from 4.3.10 to 5.0.0

Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.0.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](chaijs/chai@v4.3.10...v5.0.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade test config to ESM
- change `helper.js` to `helper.mjs`.
- `use` no longer mutates a global `chai` object, which changes how spies are set up.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jim O'Donnell <jim@zooniverse.org>
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!

I confirmed new emojis and a few other existing markdownz related functionality work as expected with PFE locally (with markdownz installed from "github:eatyourgreens/markdownz#main").

@mcbouslog
Copy link
Contributor

Noting I'll update the CHANGELOG and version/tag/publish next week.

@mcbouslog mcbouslog merged commit f2c203b into zooniverse:main Jan 5, 2024
2 of 3 checks passed
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.

2 participants