Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

fix(deps): update remark packages (major) #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Mar 30, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
remark (source) 11.0.2 -> 14.0.3 age adoption passing confidence
remark-cli (source) 7.0.1 -> 11.0.0 age adoption passing confidence
remark-frontmatter 1.3.2 -> 4.0.1 age adoption passing confidence
remark-preset-lint-consistent 2.0.3 -> 5.1.2 age adoption passing confidence
remark-preset-lint-markdown-style-guide 2.1.3 -> 5.1.3 age adoption passing confidence
remark-preset-lint-recommended 3.0.3 -> 6.1.3 age adoption passing confidence

Release Notes

remarkjs/remark (remark)

v14.0.3

Compare Source

Misc
Plugins

Full Changelog: remarkjs/remark@14.0.2...14.0.3

v14.0.2

Compare Source

Full Changelog: remarkjs/remark@14.0.1...14.0.2

v14.0.1

Compare Source

  • 9026568 Add missing types dependency

v14.0.0

Compare Source

v13.0.0: (micromark)

Compare Source

This is a giant change for remark. It replaces the 5+ year old internals with a new low-level parser: micromark. The old internals have served billions of users well over the years, but markdown has changed over that time. micromark comes with 100% CommonMark (and GFM as an extension) compliance, and (WIP) docs on parsing rules for how to tokenize markdown with a state machine. micromark, and micromark in remark, is a good base for the future.

Migration

  • Update all the remark* packages you are using in package.json
  • Did you use GFM (tables and so, used to be the default)? Now add remark-gfm
  • Try running it all. If it fails, you are probably using a syntax extension which hasn’t been updated yet, there are issues open on the issue trackers of those plugins already
  • Compare the previous output to the new output: anything wrong? See below for the changelog which might cover it. Otherwise, It’s probably because remark is now CommonMark (or GFM) compliant.
    Please compare with those projects if the new behavior is correct or not (CommonMark Dingus, or create a gist for GFM).
    Does remark not match those reference parsers? Please open an issue here!

Changes

remark-parse

remark-parse now defers its work to micromark and mdast-util-from-markdown. micromark is a new, small, complete, and CommonMark compliant low-level markdown parser. from-markdown turns its tokens into the previously (and still) used syntax tree: mdast. Extensions to remark-parse work differently: they’re a two-part act. See for example micromark-extension-footnote and mdast-util-footnote.

  • change: commonmark is no longer an option — it’s the default
  • move: gfm is no longer an option — moved to remark-gfm
  • remove: pedantic is no longer an option — this legacy and buggy flavor of markdown is no longer widely used
  • remove: blocks is no longer an options — it’s no longer suggested to change the internal list of HTML “block” tag names
remark-stringify

remark-stringify now defers its work to mdast-util-to-markdown. It’s a new and better serializer with powerful features to ensure serialized markdown represents the syntax tree (mdast), no matter what plugins do. Extensions to it work differently: see for example mdast-util-footnote.

options
  • change: commonmark is no longer an option, it’s the default
  • change: emphasis now defaults to *
  • change: bullet now defaults to *
  • move: gfm is no longer an option — moved to remark-gfm
  • move: tableCellPadding — moved to remark-gfm
  • move: tablePipeAlign — moved to remark-gfm
  • move: stringLength — moved to remark-gfm
  • remove: pedantic is no longer an option — this legacy and buggy flavor of markdown is no longer widely used
  • remove: entities is no longer an option — with CommonMark there is almost never a need to use character references, as character escapes are preferred
  • new: quote — you can now prefer single quotes (') over double quotes (") in titles
Changes to output / the tree

All of these are for CommonMark compatibility. They’re all fixes. Most of them are inconsequential to most folks.

  • notable: references (as in, links [text][id] and images ![alt][id]) are no longer present as such in the syntax tree if they don’t have a corresponding definition ([id]: example.com). The reason for this is that CommonMark requires [text *emphasis start][undefined] emphasis end* to be emphasis.
  • notable: it is no longer possible to use two blank lines between two lists or a list and indented code. CommonMark prohibits it. For a solution, use an empty comment to end lists (<!---->)
  • inconsequential: whitespace at the start and end of lines in paragraphs is now ignored
  • inconsequential: <mailto:foobarbaz> are now correctly parsed, and the scheme is part of the tree
  • inconsequential: indented code can now follow a block quote w/o blank line
  • inconsequential: trailing indented blank lines after indented code are no longer part of that code
  • inconsequential: character references and escapes are no longer present as separate text nodes
  • inconsequential: character references which HTML allows but CommonMark doesn’t, such as &copy w/o the semicolon, are no longer recognized
  • inconsequential: the indent field is no longer available on position
  • fix: multiline setext headings
  • fix: lazy lists
  • fix: attention (emphasis, strong)
  • fix: tabs
  • fix: empty alt on images is now present as an empty string
  • …plus a ton of other minor previous differences from CommonMark
Thanks

Thanks to Salesforce, Gatsby, Vercel, and Netlify, and our other backers for sponsoring the work on micromark!
To support our continued work, back us on OpenCollective!

v12.0.1

Compare Source

v12.0.0

Compare Source

remarkjs/remark-frontmatter (remark-frontmatter)

v4.0.1

Compare Source

Full Changelog: remarkjs/remark-frontmatter@4.0.0...4.0.1

v4.0.0

Compare Source

  • c02f672 Use ESM
    // From CommonJS
    var remarkFrontmatter = require('remark-frontmatter')
    
    // To ESM
    import remarkFrontmatter from 'remark-frontmatter'
    Learn more about ESM in this guide
  • 3f125a9 Add JSDoc based types

v3.0.0

Compare Source

  • fb1357b Update for micromark in remark@13
    (breaking, this update will not work for remark lower than v13, see commit for changes)

v2.0.0

Compare Source

  • 7824e34 Remove dependency
    (breaking if Object.assign is not supported in your runtime)
  • 65b8410 Add types
    (breaking, potentially, if you or your dependents use typescript and didn’t expect types)

v1.3.3

Compare Source

remarkjs/remark-lint (remark-preset-lint-consistent)

v5.1.2

Compare Source

v5.1.1

Compare Source

v5.1.0

Compare Source

v5.0.1

Compare Source

  • bca9530 Add readme.md to remark-lint package

v5.0.0

Compare Source

This is a big one: remark-lint no longer does anything without you telling it to.
The breaking part is reset and presets.

On the CLI, please start using remark-preset-lint-consistent, remark-preset-lint-recommended, and/or create and publish your own config!

Changes

v4.0.0

See [email protected]

v3.0.0

remarkjs/remark-lint (remark-preset-lint-markdown-style-guide)

v5.1.3

Compare Source

v5.1.2

Compare Source

v5.1.1

Compare Source

  • c5c3832 Mark no-auto-link-without-protocol as deprecated

v5.1.0

Compare Source

v5.0.1

Compare Source

  • bca9530 Add readme.md to remark-lint package

v5.0.0

Compare Source

This is a big one: remark-lint no longer does anything without you telling it to.
The breaking part is reset and presets.

On the CLI, please start using remark-preset-lint-consistent, remark-preset-lint-recommended, and/or create and publish your own config!

Changes

v4.0.0

See [email protected]

v3.0.0

remarkjs/remark-lint (remark-preset-lint-recommended)

v6.1.3

Compare Source

v6.1.2

Compare Source

v6.1.1

Compare Source

  • c5c3832 Mark no-auto-link-without-protocol as deprecated

v6.0.0

Compare Source

Hi! 👋

With 6.0.0, rules are no longer in the remark-lint package. In fact, remark lint doesn’t do much, other than controlling messages.

Rules are now each in their own package. You don’t have to npm install and .use() each package though, you can install and use presets instead. If you find yourself installing many rules to update, maybe create a preset too?

By giving more power to presets over the remark-lint package itself, I think rules, especially external rules, will prosper!

First off, if “presets” changed, the below diff shows how you can update:

 "dependencies": {
   "remark-cli": "^0.0.0",
   "remark-lint": "^0.0.0",
   "remark-preset-lint-consistent": "^0.0.0",
   // ...
 },
 "remarkConfig": {
-  "presets": ["lint-consistent"]
+  "plugins": ["preset-lint-consistent"]
 }

Second, if you used remark-lint directly, you need to change your config as follows.

 "dependencies": {
   "remark-cli": "^0.0.0",
   "remark-lint": "^0.0.0",
+  "remark-lint-unordered-list-marker-style": "^0.0.0",
+  "remark-lint-list-item-bullet-indent": "^0.0.0",
+  "remark-lint-no-multiple-toplevel-headings": "^0.0.0",
+  "remark-lint-maximum-line-length": "^0.0.0",
+  "remark-lint-maximum-heading-length": "^0.0.0",
+  "remark-lint-no-tabs": "^0.0.0",
   // ...
 },
 "remarkConfig": {
-  "plugins": {
-    "remark-lint": {
-    "unordered-list-marker-style": "consistent",
-    "list-item-bullet-indent": true,
-    "no-multiple-toplevel-headings": true,
-    "maximum-line-length": 9000,
-    "maximum-heading-length": 300,
-    "no-tabs": true,
-    //  ...
-  }
+  "plugins": [
+    "remark-lint",
+    ["remark-lint-unordered-list-marker-style", "consistent"],
+    "remark-lint-list-item-bullet-indent",
+    "remark-lint-no-multiple-toplevel-headings",
+    ["remark-lint-maximum-line-length", 9000],
+    ["remark-lint-maximum-heading-length", 300],
+    "remark-lint-no-tabs",
+    //  ...
+  ]

Finally, if you use remark on the API, change your code as follows:

var remark = require('remark');
var lint = require('remark-lint');
+var unorderedListMarkerStyle = require('remark-lint-unordered-list-marker-style');
+var listItemBulletIndent = require('remark-lint-list-item-bullet-indent');
+var noMultipleToplevelHeadings = require('remark-lint-no-multiple-toplevel-headings');

remark()
-  .use(lint, {
-    unorderedListMarkerStyle: 'consistent',
-    listItemBulletIndent: true,
-    noMultipleToplevelHeadings: true
-    maximumLineLength: false
-  })
+  .use(lint)
+  .use(unorderedListMarkerStyle, 'consistent')
+  .use(listItemBulletIndent)
+  .use(noMultipleToplevelHeadings)
  // ...

v5.0.0

Compare Source

See [email protected]

v4.0.1

Compare Source

v4.0.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-remark-packages branch 3 times, most recently from 10a00aa to 1e82424 Compare April 6, 2020 05:47
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 1e82424 to c033a1f Compare July 5, 2020 10:02
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from c033a1f to 30fcec9 Compare August 26, 2020 01:58
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 30fcec9 to 22788ae Compare October 29, 2020 08:04
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 22788ae to 8622871 Compare October 19, 2021 01:49
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 8622871 to 41e72b6 Compare March 7, 2022 07:49
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 41e72b6 to 1c86dcd Compare September 25, 2022 22:40
@renovate renovate bot force-pushed the renovate/major-remark-packages branch from 1c86dcd to 5d0c9a8 Compare May 28, 2023 11:49
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.

0 participants