metalsmith
Advanced tools
Comparing version 2.6.1 to 2.6.2
@@ -9,2 +9,10 @@ # Change Log | ||
## [2.6.2] - 2023-11-15 | ||
- TS fixes: add generic to Metalsmith.File, bring back Metalsmith.DoneCallback, add Metalsmith.Plugin promise signature [`3ae6275`](https://github.com/metalsmith/metalsmith/commit/3ae6275) | ||
- [#394] Avoid leaking unhandled rejections in build/watch promises. [`cac48fc`](https://github.com/metalsmith/metalsmith/commit/cac48fc), [`5b48dce`](https://github.com/metalsmith/metalsmith/commit/5b48dce) | ||
- Fix a typo in CLI help message [`642a176`](https://github.com/metalsmith/metalsmith/commit/642a176) | ||
[#394]: https://github.com/metalsmith/metalsmith/issues/394 | ||
## [2.6.1] - 2023-07-10 | ||
@@ -11,0 +19,0 @@ |
@@ -450,2 +450,3 @@ 'use strict' | ||
callback(err) | ||
return | ||
} | ||
@@ -559,3 +560,3 @@ reject(err) | ||
this[symbol.closeWatcher] = close | ||
}) | ||
}, callback) | ||
}) | ||
@@ -562,0 +563,0 @@ } else { |
{ | ||
"name": "metalsmith", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "An extremely simple, pluggable static site generator.", | ||
@@ -75,17 +75,17 @@ "keywords": [ | ||
"@metalsmith/drafts": "^1.3.0", | ||
"@metalsmith/markdown": "^1.9.1", | ||
"@types/debug": "^4.1.7", | ||
"@metalsmith/markdown": "^1.10.0", | ||
"@types/debug": "^4.1.8", | ||
"@types/micromatch": "^4.0.2", | ||
"@types/node": "^14.14.0", | ||
"assert-dir-equal": "^1.1.0", | ||
"c8": "^7.14.0", | ||
"eslint": "^8.38.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-n": "^15.7.0", | ||
"mocha": "^9.2.2", | ||
"prettier": "^2.8.7", | ||
"release-it": "^15.10.1", | ||
"c8": "^8.0.1", | ||
"eslint": "^8.49.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-n": "^16.1.0", | ||
"mocha": "^10.2.0", | ||
"prettier": "^3.0.3", | ||
"release-it": "^16.1.5", | ||
"toml": "^3.0.0", | ||
"typescript": "^4.9.5" | ||
"typescript": "^5.2.2" | ||
}, | ||
@@ -92,0 +92,0 @@ "engines": { |
@@ -510,4 +510,5 @@ /// <reference types="node" /> | ||
*/ | ||
type Plugin = (files: Files, metalsmith: Metalsmith, callback: Callback) => void; | ||
type Callback = (err: Error | null, files: Files, metalsmith: Metalsmith) => void; | ||
type Plugin = (files: Files, metalsmith: Metalsmith, callback: DoneCallback) => void|Promise<void>; | ||
type DoneCallback = (err?: Error) => void; | ||
type Callback = (err: Error | null, files: Files) => void; | ||
type Ignore = (path: string, stat: Stats) => void; | ||
@@ -518,3 +519,3 @@ | ||
*/ | ||
interface File { | ||
type File<AdditionalProperties extends Record<string, unknown> = Record<string, unknown>> = { | ||
/** A Node {@linkcode Buffer} that can be `.toString`'ed to obtain its human-readable contents */ | ||
@@ -526,4 +527,3 @@ contents: Buffer; | ||
mode?: string; | ||
[property: string]: any; | ||
} | ||
} & AdditionalProperties | ||
@@ -530,0 +530,0 @@ /** |
Sorry, the diff of this file is not supported yet
105665
1774