Skip to content

Commit a3c692d

Browse files
authored
Remove some unnecessary custom types (#167)
1 parent 9fbf234 commit a3c692d

File tree

5 files changed

+17
-101
lines changed

5 files changed

+17
-101
lines changed

@types/metalsmith-auto-collections.d.ts

-7
This file was deleted.

@types/top-user-agents.d.ts

-4
This file was deleted.

package-lock.json

+1-87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/metalsmith-collections-related/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
},
5858
"devDependencies": {
5959
"@jest/globals": "^29.7.0",
60+
"@metalsmith/collections": "^1.3.0",
6061
"@types/html-escaper": "^3.0.2",
6162
"@types/jest": "^29.5.14",
6263
"@types/sanitize-html": "^2.13.0",
@@ -73,7 +74,6 @@
7374
"jest": "29.7.0",
7475
"jest-junit": "16.0.0",
7576
"metalsmith": "^2.6.3",
76-
"metalsmith-auto-collections": "0.2.0",
7777
"metalsmith-hbt-md": "1.0.1",
7878
"metalsmith-paths": "^4.0.6",
7979
"prettier": "^3.4.1",

packages/metalsmith-collections-related/test/index.test.ts

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { describe, expect, it } from '@jest/globals';
2+
import collections from '@metalsmith/collections';
23
import assertDir from 'assert-dir-equal';
34
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync } from 'fs';
45
import handlebars from 'handlebars';
56
import Metalsmith from 'metalsmith';
6-
import collect from 'metalsmith-auto-collections';
77
import hbtmd from 'metalsmith-hbt-md';
88
import paths from 'metalsmith-paths';
99
import { join } from 'path';
@@ -24,7 +24,20 @@ const test = (dir: string, config: Config) => {
2424

2525
it('should build', (testDone) => {
2626
Metalsmith(`${dir}`)
27-
.use(collect({}))
27+
.use(
28+
collections({
29+
wikipedia: {
30+
pattern: 'wikipedia/*.md',
31+
// TODO(cemmer): remove after https://github.com/metalsmith/collections/pull/106 merges
32+
sortBy: (a, b) => a.path.localeCompare(b.path),
33+
limit: 1000,
34+
refer: false,
35+
reverse: false,
36+
filterBy: () => true,
37+
metadata: null,
38+
},
39+
}),
40+
)
2841
// Run the plugin
2942
.use(paths())
3043
.use(related(config.options))

0 commit comments

Comments
 (0)