@content-collections/integrations 0.1.1 → 0.2.1
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 +15 -15
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +10 -3
- package/dist/index.js +12 -5
- package/package.json +8 -7
- package/src/errors.ts +1 -1
- package/src/index.ts +12 -4
- package/tsconfig.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @content-collections/integrations@0.1
|
|
2
|
+
> @content-collections/integrations@0.2.1 build /home/runner/work/content-collections/content-collections/packages/integrations
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts -d dist
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.2.4
|
|
8
|
+
[34mCLI[39m Target: es2022
|
|
9
|
+
[34mESM[39m Build start
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m3.49 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 21ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m1.81 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 22ms
|
|
15
|
+
[34mDTS[39m Build start
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 849ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m143.00 B[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m143.00 B[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @content-collections/integrations
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#330](https://github.com/sdorra/content-collections/pull/330) [`b2c89ce`](https://github.com/sdorra/content-collections/commit/b2c89ce6075d9a5115486d8ff9c0b84f4c0841dd) Thanks [@sdorra](https://github.com/sdorra)! - Ensure types is exported before imports and require
|
|
8
|
+
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#200](https://github.com/sdorra/content-collections/pull/200) [`207a3de`](https://github.com/sdorra/content-collections/commit/207a3deaa95e34902c262ed8abc6320880b43dc2) Thanks [@sdorra](https://github.com/sdorra)! - Rebuild on configuration changes
|
|
14
|
+
|
|
15
|
+
- [`a1dd55b`](https://github.com/sdorra/content-collections/commit/a1dd55bcfe198487de40402284d907b977eedcec) Thanks [@sdorra](https://github.com/sdorra)! - Add count of collections and documents to build output
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`2af05da`](https://github.com/sdorra/content-collections/commit/2af05da080720c16a02565cac9228d1ebcd9f649) Thanks [@sdorra](https://github.com/sdorra)! - Fix console output of file-changed event
|
|
20
|
+
|
|
3
21
|
## 0.1.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -66,16 +66,23 @@ function configureLogging(builder) {
|
|
|
66
66
|
});
|
|
67
67
|
builder.on("builder:end", (event) => {
|
|
68
68
|
console.log(
|
|
69
|
-
"... finished build
|
|
69
|
+
"... finished build of",
|
|
70
|
+
event.stats.collections,
|
|
71
|
+
event.stats.collections === 1 ? "collection" : "collections",
|
|
72
|
+
"and",
|
|
73
|
+
event.stats.documents,
|
|
74
|
+
event.stats.documents === 1 ? "document" : "documents",
|
|
75
|
+
"in",
|
|
70
76
|
event.endedAt - event.startedAt + "ms"
|
|
71
77
|
);
|
|
72
78
|
});
|
|
79
|
+
builder.on("watcher:config-changed", () => console.log("... config changed"));
|
|
73
80
|
builder.on("watcher:file-changed", (event) => {
|
|
74
81
|
const relativePath = import_node_path2.default.relative(process.cwd(), event.filePath);
|
|
75
82
|
if (event.modification === "delete") {
|
|
76
|
-
console.log("... file
|
|
83
|
+
console.log("... file", relativePath, "deleted");
|
|
77
84
|
} else {
|
|
78
|
-
console.log("... file
|
|
85
|
+
console.log("... file", relativePath, "changed");
|
|
79
86
|
}
|
|
80
87
|
});
|
|
81
88
|
registerErrorListeners(builder);
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import path2 from "path";
|
|
2
|
+
import path2 from "node:path";
|
|
3
3
|
|
|
4
4
|
// src/errors.ts
|
|
5
|
-
import path from "path";
|
|
5
|
+
import path from "node:path";
|
|
6
6
|
var handledErrors = ["transformer:validation-error", "collector:parse-error"];
|
|
7
7
|
function isUnknownError(event) {
|
|
8
8
|
return !handledErrors.includes(event);
|
|
@@ -32,16 +32,23 @@ function configureLogging(builder) {
|
|
|
32
32
|
});
|
|
33
33
|
builder.on("builder:end", (event) => {
|
|
34
34
|
console.log(
|
|
35
|
-
"... finished build
|
|
35
|
+
"... finished build of",
|
|
36
|
+
event.stats.collections,
|
|
37
|
+
event.stats.collections === 1 ? "collection" : "collections",
|
|
38
|
+
"and",
|
|
39
|
+
event.stats.documents,
|
|
40
|
+
event.stats.documents === 1 ? "document" : "documents",
|
|
41
|
+
"in",
|
|
36
42
|
event.endedAt - event.startedAt + "ms"
|
|
37
43
|
);
|
|
38
44
|
});
|
|
45
|
+
builder.on("watcher:config-changed", () => console.log("... config changed"));
|
|
39
46
|
builder.on("watcher:file-changed", (event) => {
|
|
40
47
|
const relativePath = path2.relative(process.cwd(), event.filePath);
|
|
41
48
|
if (event.modification === "delete") {
|
|
42
|
-
console.log("... file
|
|
49
|
+
console.log("... file", relativePath, "deleted");
|
|
43
50
|
} else {
|
|
44
|
-
console.log("... file
|
|
51
|
+
console.log("... file", relativePath, "changed");
|
|
45
52
|
}
|
|
46
53
|
});
|
|
47
54
|
registerErrorListeners(builder);
|
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@content-collections/integrations",
|
|
3
3
|
"description": "Utils for integrating Content Collections with other tools",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
7
8
|
"types": "./dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
"./package.json": "./package.json",
|
|
10
11
|
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
11
13
|
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@types/node": "20",
|
|
18
|
-
"tsup": "^
|
|
19
|
-
"typescript": "^5.
|
|
20
|
-
"@content-collections/core": "0.2
|
|
19
|
+
"tsup": "^8.2.4",
|
|
20
|
+
"typescript": "^5.5.4",
|
|
21
|
+
"@content-collections/core": "0.7.2"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"@content-collections/core": "0.x"
|
package/src/errors.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function registerErrorListeners(builder: Builder) {
|
|
|
12
12
|
console.log();
|
|
13
13
|
console.log(
|
|
14
14
|
"Validation failed on",
|
|
15
|
-
path.join(event.collection.directory, event.file.path) + ":"
|
|
15
|
+
path.join(event.collection.directory, event.file.path) + ":",
|
|
16
16
|
);
|
|
17
17
|
console.log(event.error.message);
|
|
18
18
|
console.log();
|
package/src/index.ts
CHANGED
|
@@ -9,17 +9,25 @@ export function configureLogging(builder: Builder) {
|
|
|
9
9
|
|
|
10
10
|
builder.on("builder:end", (event) => {
|
|
11
11
|
console.log(
|
|
12
|
-
"... finished build
|
|
13
|
-
event.
|
|
12
|
+
"... finished build of",
|
|
13
|
+
event.stats.collections,
|
|
14
|
+
event.stats.collections === 1 ? "collection" : "collections",
|
|
15
|
+
"and",
|
|
16
|
+
event.stats.documents,
|
|
17
|
+
event.stats.documents === 1 ? "document" : "documents",
|
|
18
|
+
"in",
|
|
19
|
+
event.endedAt - event.startedAt + "ms",
|
|
14
20
|
);
|
|
15
21
|
});
|
|
16
22
|
|
|
23
|
+
builder.on("watcher:config-changed", () => console.log("... config changed"));
|
|
24
|
+
|
|
17
25
|
builder.on("watcher:file-changed", (event) => {
|
|
18
26
|
const relativePath = path.relative(process.cwd(), event.filePath);
|
|
19
27
|
if (event.modification === "delete") {
|
|
20
|
-
console.log("... file
|
|
28
|
+
console.log("... file", relativePath, "deleted");
|
|
21
29
|
} else {
|
|
22
|
-
console.log("... file
|
|
30
|
+
console.log("... file", relativePath, "changed");
|
|
23
31
|
}
|
|
24
32
|
});
|
|
25
33
|
|
package/tsconfig.json
CHANGED