@content-collections/integrations 0.2.0 → 0.3.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 +15 -15
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +4 -0
- package/dist/index.js +6 -2
- package/package.json +17 -7
- package/src/errors.ts +1 -1
- package/src/index.ts +6 -1
- package/tsconfig.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @content-collections/integrations@0.
|
|
2
|
+
> @content-collections/integrations@0.3.0 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
|
+
[32mESM[39m [1mdist/index.js [22m[32m2.02 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 21ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m3.72 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 21ms
|
|
15
|
+
[34mDTS[39m Build start
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 839ms
|
|
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,17 @@
|
|
|
1
1
|
# @content-collections/integrations
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#633](https://github.com/sdorra/content-collections/pull/633) [`86490bc`](https://github.com/sdorra/content-collections/commit/86490bc8815ba03ede8c3a9dcb45931cd686db9c) Thanks [@sdorra](https://github.com/sdorra)! - Log skipped documents
|
|
8
|
+
|
|
9
|
+
## 0.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 0.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -85,6 +85,10 @@ function configureLogging(builder) {
|
|
|
85
85
|
console.log("... file", relativePath, "changed");
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
+
builder.on("transformer:document-skipped", (event) => {
|
|
89
|
+
const relativePath = import_node_path2.default.relative(process.cwd(), event.filePath);
|
|
90
|
+
console.log("... document", relativePath, "skipped", "due to", event.reason);
|
|
91
|
+
});
|
|
88
92
|
registerErrorListeners(builder);
|
|
89
93
|
builder.on("_error", ({ _event, error }) => {
|
|
90
94
|
if (isUnknownError(_event)) {
|
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);
|
|
@@ -51,6 +51,10 @@ function configureLogging(builder) {
|
|
|
51
51
|
console.log("... file", relativePath, "changed");
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
builder.on("transformer:document-skipped", (event) => {
|
|
55
|
+
const relativePath = path2.relative(process.cwd(), event.filePath);
|
|
56
|
+
console.log("... document", relativePath, "skipped", "due to", event.reason);
|
|
57
|
+
});
|
|
54
58
|
registerErrorListeners(builder);
|
|
55
59
|
builder.on("_error", ({ _event, error }) => {
|
|
56
60
|
if (isUnknownError(_event)) {
|
package/package.json
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@content-collections/integrations",
|
|
3
|
-
"description": "Utils for integrating Content Collections with other tools",
|
|
4
|
-
"version": "0.2.0",
|
|
5
3
|
"type": "module",
|
|
6
|
-
"
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"description": "Utils for integrating Content Collections with other tools",
|
|
6
|
+
"author": "Sebastian Sdorra <s.sdorra@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://content-collections.dev",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/sdorra/content-collections.git",
|
|
12
|
+
"directory": "packages/integrations"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/sdorra/content-collections/issues",
|
|
15
|
+
"main": "dist/index.cjs",
|
|
16
|
+
"module": "dist/index.js",
|
|
7
17
|
"types": "./dist/index.d.ts",
|
|
8
18
|
"exports": {
|
|
9
19
|
"./package.json": "./package.json",
|
|
10
20
|
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
11
22
|
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
14
24
|
}
|
|
15
25
|
},
|
|
16
26
|
"devDependencies": {
|
|
17
27
|
"@types/node": "20",
|
|
18
|
-
"tsup": "^8.
|
|
28
|
+
"tsup": "^8.2.4",
|
|
19
29
|
"typescript": "^5.5.4",
|
|
20
|
-
"@content-collections/core": "0.
|
|
30
|
+
"@content-collections/core": "0.11.0"
|
|
21
31
|
},
|
|
22
32
|
"peerDependencies": {
|
|
23
33
|
"@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
|
@@ -16,7 +16,7 @@ export function configureLogging(builder: Builder) {
|
|
|
16
16
|
event.stats.documents,
|
|
17
17
|
event.stats.documents === 1 ? "document" : "documents",
|
|
18
18
|
"in",
|
|
19
|
-
event.endedAt - event.startedAt + "ms"
|
|
19
|
+
event.endedAt - event.startedAt + "ms",
|
|
20
20
|
);
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -31,6 +31,11 @@ export function configureLogging(builder: Builder) {
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
builder.on("transformer:document-skipped", (event) => {
|
|
35
|
+
const relativePath = path.relative(process.cwd(), event.filePath);
|
|
36
|
+
console.log("... document", relativePath, "skipped", "due to", event.reason);
|
|
37
|
+
});
|
|
38
|
+
|
|
34
39
|
registerErrorListeners(builder);
|
|
35
40
|
|
|
36
41
|
builder.on("_error", ({ _event, error }) => {
|
package/tsconfig.json
CHANGED