Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Dependency update: markdown-it 13, mini->micromatch, etc.#22

Open
zackw wants to merge 3 commits intomayo:masterfrom
zackw:master
Open

Dependency update: markdown-it 13, mini->micromatch, etc.#22
zackw wants to merge 3 commits intomayo:masterfrom
zackw:master

Conversation

@zackw
Copy link

@zackw zackw commented Dec 2, 2022

This plugin hasn't had its dependencies updated in quite some time and npm audit is quite cranky about it. Here's a PR which updates everything. Note in particular the change from minimatch to micromatch, which was not strictly necessary but aligns behavior better with metalsmith core. All tests pass.

As you can probably tell from the other two commits in this PR I have some pretty strong opinions about how things should be done, let me know if any of that doesn't suit you.

zackw added 3 commits December 1, 2022 21:51
Lockfiles shouldn't exist at all, actually, but most of the harm they do
can be mitigated by keeping them as ephemeral as possible.  In particular,
they should not be committed to version control ever.
  debug ^3.2.6 -> ^4.3.0
  markdown-it ^8.4.2 -> ^13.0.0
  minimatch ^3.0.4 -> micromatch ^4.0.0 (following metalsmith core)

  mocha 5.x -> ^10.1.0
  metalsmith 2.x -> ^2.5.0
  assert-dir-equal 1.x -> ^1.1.0
  markdown-it-abbr ^1.0.4 -> ^1.0.0 (don’t depend on a specific patch level)

Code changes required:

 - minimatch -> micromatch
 - minimatch.filter -> micromatch()
 - new Buffer -> Buffer.from()

Fixes 5 ‘npm audit’ complaints.  Two more were already addressed by
deleting the lockfile.
 - Add a basic, hopefully uncontroversial ESLint and Prettier
   configuration.  Run this on every commit using husky and
   lint-staged.  Prettier is not applied to Markdown or HTML files,
   as good formatting for those is much more subjective.

   To reduce churn, Prettier is configured to prefer single-quoted
   strings.  However, it is _not_ configured to leave out any
   semicolons, despite the substantial churn on that point, since
   I consider ASI to be an egregious misfeature.

 - The only _functional_ code change was the removal of an unnecessary
   import from test/index.js.

 - Flesh out the .editorconfig a bit, to match the linters.
@zackw
Copy link
Author

zackw commented Dec 2, 2022

Would close #19.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant