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

Add implementation #1

Merged
merged 10 commits into from
May 4, 2023
Merged

Add implementation #1

merged 10 commits into from
May 4, 2023

Conversation

remcohaszing
Copy link
Member

@remcohaszing remcohaszing commented Apr 30, 2023

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

The implementation is based on remark-break. It was copied, then modified. The following modifications have been made:

  • The implementation was moved from index.js to lib/index.js.
  • The remark plugin was replaced with the function newlineToBreak.
  • The implementation was based on Move transformer into mdast-util-breaks remarkjs/remark-breaks#9 (comment).
  • Tests are based on markdown output, not html output. This uncovered a small bug in the implementation linked above that has been fixed.
  • Tests are not based on a unified pipeline.
  • tape was replaced with node:test.
  • Each test fixture now has its own test case. This allows test filtering and inspecting multiple failed tests.
  • Dependencies were updated.
  • Support was dropped for Node.js < 16.
  • The readme was updated accordingly.

The implementation is based on `remark-break`. It was copied, then
modified. The following modifications have been made:

- The implementation was moved from `index.js` to `lib/index.js`.
- The remark plugin was replaced with the function `newlineToBreak`.
- The implementation was based on
  remarkjs/remark-breaks#9 (comment).
- Tests are based on markdown output, not html output. This uncovered a
  small bug in the implementation linked above that has been fixed.
- Tests are not based on a unified pipeline.
- `tape` was replaced with `node:test`.
- Each test fixture now has its own test case. This allows test
  filtering and inspecting multiple failed tests.
- Dependencies were updated.
- Support was dropped for Node.js < 16.
- The readme was updated accordingly.
@github-actions

This comment has been minimized.

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

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

@remcohaszing
Copy link
Member Author

type-coverage requires a more specific include / exclude configuration.

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

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

Thanks @remcohaszing!

.npmrc Show resolved Hide resolved
Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

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

Sweet work!!

One suggestion on semver. Rest is improving the docs!

strategy:
matrix:
node:
- lts/hydrogen
Copy link
Member

Choose a reason for hiding this comment

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

Could we use the same Node-version-minimum as in remark-breaks?
That way, we can immediately migrate that project to use this, without forcing a major breaking change

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because I used node:test. However, I have changed it to lts/gallium.

As a side note: I constantly have to look up these names. It would be much clearer to me to use version numbers.

Copy link
Member

Choose a reason for hiding this comment

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

I particularly meant in reply of your OP point “Support was dropped for Node.js < 16”.
I think that’s a bad idea, as it forces a major in remark-breaks.
I don’t care much for whether tools/CI use Node 14 or 16 (that is, I’d prefer not to, but node:test is great).


Using the lts/* scheme ensures lts versions are used, which is the goal with this. Numbers don’t really mean anything here. See also https://github.com/nodejs/Release/blob/main/CODENAMES.md

Copy link
Member

Choose a reason for hiding this comment

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

I agree that they are not common. So I get that they’re not familiar to you. I quite like the channels though :(

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Show resolved Hide resolved
readme.md Show resolved Hide resolved
remcohaszing and others added 7 commits May 4, 2023 10:33
@wooorm
Copy link
Member

wooorm commented May 4, 2023

Ready I believe, right?

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
@wooorm wooorm merged commit 4416cff into main May 4, 2023
@wooorm wooorm deleted the implementation branch May 4, 2023 13:05
@github-actions

This comment has been minimized.

wooorm added a commit that referenced this pull request May 4, 2023
Closes GH-1.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>

Co-authored-by: Remco Haszing <remcohaszing@gmail.com>
Co-authored-by: Titus Wormer <tituswormer@gmail.com>
@wooorm
Copy link
Member

wooorm commented May 4, 2023

Oh no, I accidentally “normal ugly” merged :'( But I fixed the history 😅

@remcohaszing
Copy link
Member Author

Oh no! You can disable that option in the repo settings, but I guess you know, but didn’t do that yet.

@wooorm
Copy link
Member

wooorm commented May 4, 2023

Yeah I did, too late haha.

Thanks so much for your work, released in 💯!

@wooorm wooorm added the 💪 phase/solved Post is done label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

3 participants