@content-collections/integrations 0.4.0 → 0.5.0
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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/package.json +2 -2
- package/src/errors.ts +11 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @content-collections/integrations@0.
|
|
2
|
+
> @content-collections/integrations@0.5.0 build /home/runner/work/content-collections/content-collections/packages/integrations
|
|
3
3
|
> tsdown src/index.ts --format esm,cjs --dts -d dist
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.15.12[22m powered by rolldown [2mv1.0.0-beta.45[22m
|
|
6
6
|
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
7
7
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
8
8
|
[34mℹ[39m Build start
|
|
9
|
-
[34mℹ[39m [33m[CJS][39m [2mdist/[22m[1mindex.cjs[22m [2m3.
|
|
10
|
-
[34mℹ[39m [33m[CJS][39m 1 files, total: 3.
|
|
11
|
-
[34mℹ[39m [34m[ESM][39m [2mdist/[22m[1mindex.js[22m [2m2.
|
|
9
|
+
[34mℹ[39m [33m[CJS][39m [2mdist/[22m[1mindex.cjs[22m [2m3.46 kB[22m [2m│ gzip: 1.24 kB[22m
|
|
10
|
+
[34mℹ[39m [33m[CJS][39m 1 files, total: 3.46 kB
|
|
11
|
+
[34mℹ[39m [34m[ESM][39m [2mdist/[22m[1mindex.js[22m [2m2.37 kB[22m [2m│ gzip: 0.80 kB[22m
|
|
12
12
|
[34mℹ[39m [34m[ESM][39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
13
|
-
[34mℹ[39m [34m[ESM][39m 2 files, total: 2.
|
|
13
|
+
[34mℹ[39m [34m[ESM][39m 2 files, total: 2.63 kB
|
|
14
14
|
[34mℹ[39m [33m[CJS][39m [2mdist/[22m[32m[1mindex.d.cts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
15
15
|
[34mℹ[39m [33m[CJS][39m 1 files, total: 0.26 kB
|
|
16
|
-
[32m✔[39m Build complete in [
|
|
16
|
+
[32m✔[39m Build complete in [32m1154ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @content-collections/integrations
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#708](https://github.com/sdorra/content-collections/pull/708) [`9d68701`](https://github.com/sdorra/content-collections/commit/9d68701de6244d5a2dd9c8e87cb1441f151ec148) Thanks [@ExpensiveKoala](https://github.com/ExpensiveKoala)! - Support for singletons #300
|
|
8
|
+
|
|
3
9
|
## 0.4.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -30,9 +30,15 @@ function isUnknownError(event) {
|
|
|
30
30
|
return !handledErrors.includes(event);
|
|
31
31
|
}
|
|
32
32
|
function registerErrorListeners(builder) {
|
|
33
|
+
builder.on("transformer:singleton-warning", (event) => {
|
|
34
|
+
console.log();
|
|
35
|
+
console.log(`Singleton collection "${event.collection.name}" matched no documents. Export will be undefined.`);
|
|
36
|
+
console.log();
|
|
37
|
+
});
|
|
33
38
|
builder.on("transformer:validation-error", (event) => {
|
|
34
39
|
console.log();
|
|
35
|
-
|
|
40
|
+
const location = "filePath" in event.collection ? event.collection.filePath : node_path.default.join(event.collection.directory, event.file.path);
|
|
41
|
+
console.log("Validation failed on", location + ":");
|
|
36
42
|
console.log(event.error.message);
|
|
37
43
|
console.log();
|
|
38
44
|
});
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,15 @@ function isUnknownError(event) {
|
|
|
6
6
|
return !handledErrors.includes(event);
|
|
7
7
|
}
|
|
8
8
|
function registerErrorListeners(builder) {
|
|
9
|
+
builder.on("transformer:singleton-warning", (event) => {
|
|
10
|
+
console.log();
|
|
11
|
+
console.log(`Singleton collection "${event.collection.name}" matched no documents. Export will be undefined.`);
|
|
12
|
+
console.log();
|
|
13
|
+
});
|
|
9
14
|
builder.on("transformer:validation-error", (event) => {
|
|
10
15
|
console.log();
|
|
11
|
-
|
|
16
|
+
const location = "filePath" in event.collection ? event.collection.filePath : path.join(event.collection.directory, event.file.path);
|
|
17
|
+
console.log("Validation failed on", location + ":");
|
|
12
18
|
console.log(event.error.message);
|
|
13
19
|
console.log();
|
|
14
20
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@content-collections/integrations",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Utils for integrating Content Collections with other tools",
|
|
6
6
|
"author": "Sebastian Sdorra <s.sdorra@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/node": "20",
|
|
28
28
|
"tsdown": "^0.15.12",
|
|
29
29
|
"typescript": "^5.5.4",
|
|
30
|
-
"@content-collections/core": "0.
|
|
30
|
+
"@content-collections/core": "0.14.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@content-collections/core": "0.x"
|
package/src/errors.ts
CHANGED
|
@@ -8,12 +8,19 @@ export function isUnknownError(event: string) {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function registerErrorListeners(builder: Builder) {
|
|
11
|
+
builder.on("transformer:singleton-warning", (event) => {
|
|
12
|
+
console.log();
|
|
13
|
+
console.log(`Singleton collection "${event.collection.name}" matched no documents. Export will be undefined.`);
|
|
14
|
+
console.log();
|
|
15
|
+
});
|
|
16
|
+
|
|
11
17
|
builder.on("transformer:validation-error", (event) => {
|
|
12
18
|
console.log();
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
const location =
|
|
20
|
+
"filePath" in (event.collection as any)
|
|
21
|
+
? (event.collection as any).filePath
|
|
22
|
+
: path.join((event.collection as any).directory, event.file.path);
|
|
23
|
+
console.log("Validation failed on", location + ":");
|
|
17
24
|
console.log(event.error.message);
|
|
18
25
|
console.log();
|
|
19
26
|
});
|