@metalsmith/collections 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,17 @@
1
1
  ### Changelog
2
+
3
+ #### [v1.2.2](https://github.com/metalsmith/collections/compare/v1.2.2...v1.2.1) / 2022-07-28
4
+
5
+ - Resolves [`#102`](https://github.com/metalsmith/collections/issues/99): removes multimatch dependency, uses metalsmith.match instead
6
+ - Drops support for Metalsmith < 2.4.1
7
+ - Drops support for Node < 12
8
+
2
9
  #### [v1.2.1](https://github.com/metalsmith/collections/compare/v1.2.1...v1.2.0) / 2022-02-03
3
10
 
4
11
  - Fixes [`#99`](https://github.com/metalsmith/collections/issues/99): collection key on file metadata - no dupes, no nested arrays
5
12
  - Fixes regression: incorrect previous & next refs when reverse: true
6
13
  - Fixes typo's in README
14
+
7
15
  #### [v1.2.0](https://github.com/metalsmith/collections/compare/v1.2.0...v1.1.0) / 2022-01-29
8
16
 
9
17
  - Feature: sortBy now also understands nested metadata properties, e.g. `sortBy: 'meta.display.order'`
package/README.md CHANGED
@@ -323,8 +323,8 @@ Add the `@metalsmith/collections` key to your `metalsmith.json` `plugins` key:
323
323
 
324
324
  [npm-badge]: https://img.shields.io/npm/v/@metalsmith/collections.svg
325
325
  [npm-url]: https://www.npmjs.com/package/@metalsmith/collections
326
- [ci-badge]: https://app.travis-ci.com/metalsmith/collections.svg?branch=master
327
- [ci-url]: https://app.travis-ci.com/metalsmith/collections
326
+ [ci-badge]: https://github.com/metalsmith/collections/actions/workflows/test.yml/badge.svg
327
+ [ci-url]: https://github.com/metalsmith/collections/actions/workflows/test.yml
328
328
  [metalsmith-badge]: https://img.shields.io/badge/metalsmith-plugin-green.svg?longCache=true
329
329
  [metalsmith-url]: http://metalsmith.io
330
330
  [codecov-badge]: https://img.shields.io/coveralls/github/metalsmith/collections
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const debug = require('debug')('@metalsmith/collections')
2
- const multimatch = require('multimatch')
3
2
  const loadMetadata = require('read-metadata').sync
4
3
  const get = require('lodash.get')
5
4
  // for backwards-compatibility only, date makes as little sense as "pubdate" or any custom key
@@ -121,7 +120,7 @@ function initializeCollections(options) {
121
120
  if (pattern) {
122
121
  matches.push.apply(
123
122
  matches,
124
- multimatch(fileNames, pattern).map((filepath) => {
123
+ metalsmith.match(pattern, fileNames).map((filepath) => {
125
124
  const data = files[filepath]
126
125
  // pattern-matched files might or might not have a "collection" property defined in front-matter
127
126
  // and might also be included in multiple collections
package/package.json CHANGED
@@ -15,26 +15,25 @@
15
15
  "type": "git",
16
16
  "url": "https://github.com/metalsmith/collections.git"
17
17
  },
18
- "version": "1.2.1",
18
+ "version": "1.2.2",
19
19
  "license": "MIT",
20
20
  "main": "lib/index.js",
21
21
  "dependencies": {
22
- "debug": "^4.3.3",
23
22
  "lodash.get": "^4.4.2",
24
- "multimatch": "^4.0.0",
25
23
  "read-metadata": "^1.0.0"
26
24
  },
27
25
  "devDependencies": {
28
- "auto-changelog": "^2.3.0",
26
+ "auto-changelog": "^2.4.0",
29
27
  "coveralls": "^3.1.1",
30
- "eslint": "^8.8.0",
31
- "eslint-config-prettier": "^8.3.0",
32
- "metalsmith": "^2.3.0",
33
- "mocha": "^7.2.0",
34
- "nodemon": "^1.18.4",
28
+ "debug": "^4.3.4",
29
+ "eslint": "^8.20.0",
30
+ "eslint-config-prettier": "^8.5.0",
31
+ "metalsmith": "^2.4.1",
32
+ "mocha": "^9.2.2",
33
+ "nodemon": "^2.0.19",
35
34
  "nyc": "^15.1.0",
36
- "prettier": "^2.5.1",
37
- "release-it": "^14.12.4"
35
+ "prettier": "^2.7.1",
36
+ "release-it": "^15.2.0"
38
37
  },
39
38
  "directories": {
40
39
  "lib": "lib",
@@ -49,7 +48,9 @@
49
48
  "coverage": "nyc report --reporter=text-lcov > ./coverage.info",
50
49
  "coveralls": "npm run coverage && cat ./coverage.info | coveralls",
51
50
  "format": "prettier --write \"**/*.{yml,md,js,json}\"",
52
- "lint": "eslint --cache --fix-dry-run \"**/*.js\"",
51
+ "format:check": "prettier --list-different \"**/*.{yml,md,js,json}\"",
52
+ "lint": "eslint --fix .",
53
+ "lint:check": "eslint --fix-dry-run .",
53
54
  "dev": "nodemon --exec 'npm test'",
54
55
  "release": "release-it ."
55
56
  },
@@ -57,9 +58,9 @@
57
58
  "access": "public"
58
59
  },
59
60
  "peerDependencies": {
60
- "metalsmith": "^2.3.0"
61
+ "metalsmith": "^2.4.1"
61
62
  },
62
63
  "engines": {
63
- "node": ">=8"
64
+ "node": ">=12"
64
65
  }
65
66
  }