Metalsmith v2.4.0 Release Notes

Release Date: 2022-01-31 // about 2 years ago
  • โž• Added

    • ๐Ÿ”Œ #338 Added Metalsmith#match method. Plugins no longer need to require a matching library 705c4bb, f01c724
    • ๐Ÿ’… #358 Added TS-style JSdocs 828b17e
    • ๐Ÿ‘‰ Use native fs.rm instead of rimraf when available (Node 14.4+) fcbb76e, 66e4376
    • #226 Allow passing a gray-matter options object to Metalsmith#frontmatter a6438d2
    • Modernized dev setup ef7b781
    • โž• Added 8 new tests (match method, front-matter options, path & symbolic link handling)
    • Files object file paths are now guaranteed to be sorted aphabetically. 4eb1184
    • ๐Ÿ— #211 Metalsmith#build now returns a promise which you can attach a then/catch to or await. The build callback model is still available. 6d5a42d

    โœ‚ Removed

    • ๐Ÿ‘ #231 Dropped support for Node < 8 2db47f5, 75e6878
    • Dependencies:
      • has-generators: obsolete in supported Node versions 2db47f5
      • absolute replaced with native Node path.isAbsolute c05f9e2 (@Zearin)
      • is replaced with own implementation 7eaac9e2, 54dba0c1 (@Zearin)
      • recursive-readdir: replaced with own implementation 4eb1184

    โšก๏ธ Updated

    • Dependencies: 75e6878

      • chalk: 1.1.3 โ–ถ๏ธŽ 3.0.0
      • gray-matter: 2.0.0 โ–ถ๏ธŽ 4.0.3
      • stat-mode: 0.2.0 โ–ถ๏ธŽ 1.0.0
      • rimraf: 2.2.8 โ–ถ๏ธŽ 3.0.2
      • ware: 1.2.0 โ–ถ๏ธŽ 1.3.0
      • commander (used in CLI): 2.15.1 โ–ถ๏ธŽ 6.2.1
      • win-fork (used in CLI): replaced with cross-spawn:7.0.3
    • โšก๏ธ Updated CHANGELOG.md format to follow โ€œKeep A Changelogโ€ (#266) (@Zearin)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘€ #206 Metalsmith#ignore now only matches paths relative to Metalsmith#source (as it should). See linked issue for details 4eb1184
    • ๐Ÿ— #226 Metalsmith will no longer 'swallow' errors on invalid front-matter, they will be passed to Metalsmith#build a6438d2
    • ๐Ÿ›  Fix test error on Windows [#158] (@moozzyk)
    • #281 Metalsmith now properly handles symbolic links (will throw an ENOENT error or they can be Metalsmith#ignore'd) 4eb1184
    • #178 Metalsmith#ignore now removes the matched files before they are statted for glob-based ignores (saving some perf & potential errors).
    • ๐Ÿ— #295 Metalsmith now catches all FS errors and passes them to the build callback/ thenable appropriately.

    ๐Ÿ”’ Security

    • Replace all occurences of new Buffer with Buffer.from

    ๐Ÿ›  npm audit vulnerability fixes

    • Development Dependencies:
      • coveralls: 2.11.6 โ–ถ๏ธŽ 3.0.1 (#308) (@Zearin) Fix 5 โ€œModerateโ€ vulnerabilities
      • metalsmith-markdown: 0.2.1 โ–ถ๏ธŽ 0.2.2 (#312) (@Zearin) Fix 1 โ€œLowโ€ vulnerability