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

feat!: bump all unified ecosystem dependencies, support mdx v3 #486

Merged
merged 14 commits into from Dec 5, 2023

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented Dec 1, 2023

close #480, close #481


The patches are created due to the package manager issue, see also conventional-changelog/commitlint#3642 (comment)

@JounQin JounQin added breaking :boom: Breaking Change 📦 area/deps This affects dependencies labels Dec 1, 2023
@JounQin JounQin requested review from wooorm, ChristianMurphy and a team December 1, 2023 15:09
@JounQin JounQin self-assigned this Dec 1, 2023
Copy link

changeset-bot bot commented Dec 1, 2023

🦋 Changeset detected

Latest commit: 289ad71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
eslint-mdx Major
eslint-plugin-mdx Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codesandbox-ci bot commented Dec 1, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

github-actions bot commented Dec 1, 2023

📊 Package size report   No changes

File Before After
Total (Includes all files) 1.3 MB 1.3 MB
Tarball size 131.6 kB 131.6 kB
Unchanged files
File Size
.babelrc 35 B
.changeset/config.json 372 B
.changeset/README.md 510 B
.codesandbox/ci.json 76 B
.editorconfig 161 B
.eslintrc.js 591 B
.gitattributes 35 B
.github/FUNDING.yml 204 B
.github/workflows/ci.yml 941 B
.github/workflows/codeql.yml 836 B
.github/workflows/pkg-size.yml 496 B
.github/workflows/release.yml 914 B
.lintstagedrc.js 50 B
.simple-git-hooks.js 51 B
CHANGELOG.md 283 B
CONTRIBUTING.md 931 B
LICENSE 1.1 kB
package.json 2.5 kB
packages/eslint-mdx/CHANGELOG.md 22.9 kB
packages/eslint-mdx/package.json 1.2 kB
packages/eslint-mdx/README.md 10.4 kB
packages/eslint-mdx/shim.d.ts 1.4 kB
packages/eslint-mdx/src/helpers.ts 4.3 kB
packages/eslint-mdx/src/index.ts 121 B
packages/eslint-mdx/src/meta.ts 182 B
packages/eslint-mdx/src/parser.ts 2.3 kB
packages/eslint-mdx/src/sync.ts 384 B
packages/eslint-mdx/src/tokens.ts 6.7 kB
packages/eslint-mdx/src/types.ts 1.0 kB
packages/eslint-mdx/src/worker.ts 21.0 kB
packages/eslint-mdx/tsconfig.json 131 B
packages/eslint-plugin-mdx/CHANGELOG.md 24.4 kB
packages/eslint-plugin-mdx/package.json 1.0 kB
packages/eslint-plugin-mdx/README.md 10.4 kB
packages/eslint-plugin-mdx/src/configs/base.ts 305 B
packages/eslint-plugin-mdx/src/configs/code-blocks.ts 1.0 kB
packages/eslint-plugin-mdx/src/configs/flat.ts 705 B
packages/eslint-plugin-mdx/src/configs/index.ts 439 B
packages/eslint-plugin-mdx/src/configs/overrides.ts 725 B
packages/eslint-plugin-mdx/src/configs/recommended.ts 806 B
packages/eslint-plugin-mdx/src/helpers.ts 620 B
packages/eslint-plugin-mdx/src/index.ts 128 B
packages/eslint-plugin-mdx/src/meta.ts 182 B
packages/eslint-plugin-mdx/src/processors/helpers.ts 633 B
packages/eslint-plugin-mdx/src/processors/index.ts 198 B
packages/eslint-plugin-mdx/src/processors/options.ts 1.8 kB
packages/eslint-plugin-mdx/src/processors/remark.ts 1.9 kB
packages/eslint-plugin-mdx/src/processors/types.ts 241 B
packages/eslint-plugin-mdx/src/rules/.eslintrc 124 B
packages/eslint-plugin-mdx/src/rules/index.ts 138 B
packages/eslint-plugin-mdx/src/rules/remark.ts 3.5 kB
packages/eslint-plugin-mdx/src/rules/types.ts 415 B
packages/eslint-plugin-mdx/tsconfig.json 131 B
README.md 10.4 kB
test/__snapshots__/fixtures.test.ts.snap 32.6 kB
test/__snapshots__/flat-config.test.ts.snap 823 B
test/__snapshots__/parser.test.ts.snap 1.1 MB
test/fixtures.test.ts 1.8 kB
test/fixtures/287.mdx 204 B
test/fixtures/292.mdx 191 B
test/fixtures/334.mdx 70 B
test/fixtures/336.mdx 178 B
test/fixtures/367.mdx 87 B
test/fixtures/371.mdx 75 B
test/fixtures/380.mdx 11.0 kB
test/fixtures/391.mdx 62 B
test/fixtures/429.mdx 52 B
test/fixtures/435.mdx 134 B
test/fixtures/445.mdx 188 B
test/fixtures/450.mdx 418 B
test/fixtures/acorn.mdx 860 B
test/fixtures/adjacent.mdx 50 B
test/fixtures/async/.remarkrc 67 B
test/fixtures/async/test.md 15 B
test/fixtures/basic.mdx 405 B
test/fixtures/basic.tsx 77 B
test/fixtures/blank-lines.mdx 768 B
test/fixtures/code-blocks.md 511 B
test/fixtures/comments.mdx 162 B
test/fixtures/details.mdx 881 B
test/fixtures/dir.mdx/.gitkeep 0 B
test/fixtures/esm/.remarkrc.mjs 103 B
test/fixtures/esm/test.md 15 B
test/fixtures/flat-config/code-blocks.mdx 76 B
test/fixtures/jsx-in-list.mdx 810 B
test/fixtures/leading-spaces.mdx 42 B
test/fixtures/markdown.md 5 B
test/fixtures/no-unescaped-entities.mdx 99 B
test/fixtures/no-unused-expressions.mdx 90 B
test/fixtures/processor.mdx 13 B
test/fixtures/remark.md 171 B
test/fixtures/remark.mdx 169 B
test/fixtures/style/.remarkrc 228 B
test/fixtures/style/nested.md 10 B
test/fixtures/style/plugin1.cjs 26 B
test/fixtures/style/plugin2.mjs 24 B
test/fixtures/unicorn.jsx 119 B
test/fixtures/unicorn.mdx 118 B
test/flat-config.test.ts 1.0 kB
test/helpers.test.ts 874 B
test/helpers.ts 548 B
test/parser.test.ts 4.0 kB
test/remark.test.ts 2.8 kB
tsconfig.base.json 235 B
tsconfig.json 309 B
tsconfig.lib.json 180 B

🤖 This report was automatically generated by pkg-size-action

@@ -6,62 +6,6 @@ exports[`fixtures lint code blocks should work as expected: code-blocks.md 1`] =
"column": 1,
"endColumn": 6,
"endLine": 3,
"fix": {
Copy link
Member Author

@JounQin JounQin Dec 1, 2023

Choose a reason for hiding this comment

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

eslint-plugin-markdown is required to be upgraded first? We're locking unified@^11.0.4 for now. See also eslint/eslint-plugin-markdown#218

@@ -14,16 +14,15 @@ jobs:
- ubuntu-latest
- windows-latest
node:
- 16
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

You are free to choose 18, as 16 is EOL.
But, Node 16 should work for all other unified projects. Everything is tested and works on Node 16.

Copy link
Member Author

Choose a reason for hiding this comment

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

Node 16 still works, I disable testing because the expected errors thrown are different with other versions.

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7ca1ffe) 100.00% compared to head (289ad71) 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #486   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          188       190    +2     
  Branches        32        33    +1     
=========================================
+ Hits           188       190    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JounQin
Copy link
Member Author

JounQin commented Dec 2, 2023

Good to review? @wooorm @ChristianMurphy

packages/eslint-mdx/src/tokens.ts Outdated Show resolved Hide resolved
packages/eslint-mdx/src/tokens.ts Outdated Show resolved Hide resolved
"tslib": "^2.6.2",
"unified": "^11.0.4",
"unified-engine": "^11.1.1",
"unist-util-visit": "^5.0.0",
"uvu": "^0.5.6",
Copy link
Member

Choose a reason for hiding this comment

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

using the latest release of node there's an option to drop uvu in favor of node:test https://nodejs.org/api/test.html
Which is even faster, a stable part of node core, and works well with ESM

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe a new PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

We are actually using uvu/assert only, maybe it can be replaced by devlop. For testing, we're using jest now, and will migrate to vitest later.

patches/eslint+8.54.0.patch Show resolved Hide resolved
patches/string-length+4.0.2.patch Show resolved Hide resolved
patches/yargs+17.7.2.patch Show resolved Hide resolved
tsconfig.lib.json Show resolved Hide resolved
@JounQin
Copy link
Member Author

JounQin commented Dec 3, 2023

@wooorm So we'll have to wait remark-lint upgrading first?

@wooorm
Copy link
Member

wooorm commented Dec 4, 2023

This is an independent project, so it could update, right? Like all the other projects?

And, other than TypeScript, things still work? Have you tried if it actually works?

@JounQin
Copy link
Member Author

JounQin commented Dec 4, 2023

@wooorm remark-lint is not working as expected because the plugins are not upgraded yet.

@wooorm
Copy link
Member

wooorm commented Dec 4, 2023

Can you please clarify what doesn’t work?
In my experience, almost all things do work. Perhaps with a @ts-expect-error.

@JounQin
Copy link
Member Author

JounQin commented Dec 4, 2023

#486 (comment)

I'm not so sure what is the root cause, remark-lint or eslint-plugin-markdown, but I've been trying to align the unified version used in eslint-plugin-markdown.

@wooorm
Copy link
Member

wooorm commented Dec 5, 2023

You link to a line of code. I don‘t see what the bug is. Could you please tell me how to reproduce this? What is the actual output, and what is the output you want?

@JounQin
Copy link
Member Author

JounQin commented Dec 5, 2023

@wooorm

image

The code blocks fix properties are removed unexpectedly.

I think it should be related to https://github.com/eslint/eslint-plugin-markdown/issues/218 which would be fixed by https://github.com/eslint/eslint-plugin-markdown/pull/229 I'll use `eslint-plugin-markdown@JounQin/eslint-plugin-markdown#feat/bump` to test my fixing PR.

OK, I tried, and it does not work.

@wooorm
Copy link
Member

wooorm commented Dec 5, 2023

I don’t know how to help you.
remark-lint doesn’t generate fix properties.
I don’t see that test case using remark-lint.

@JounQin
Copy link
Member Author

JounQin commented Dec 5, 2023

@wooorm

mdx/remark ESLint rule is using remark processor inside to lint markdown syntaxes.

const { messages, content: fixedText } = performSyncWork({

await processor.process(file)


I think we can merge as-is, and just wait remark-lint plugins upgrade later.

@wooorm
Copy link
Member

wooorm commented Dec 5, 2023

But why not the other way around? What is the error? It should work.

But, feel free to wait though, maybe say 2 weeks? I don’t have much time to work on oss right now

@JounQin
Copy link
Member Author

JounQin commented Dec 5, 2023

But why not the other way around? What is the error? It should work.

unified in remark-lint are old but I'm using resolutions to force using the latest unified packages for all dependencies, I think it's the root cause.

I'm going to merge this PR after upgrading unified-engine to remove related patch file.

@JounQin JounQin changed the title feat!: bump all unified ecosystem dependencies, support mdx v3 feat!: bump all unified ecosystem dependencies, support mdx v3 Dec 5, 2023
@JounQin JounQin merged commit 508e7ce into master Dec 5, 2023
16 checks passed
@JounQin JounQin deleted the feat/mdx_v3 branch December 5, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies breaking :boom: Breaking Change
Development

Successfully merging this pull request may close these issues.

Incompatible w/ MDX v3?
6 participants