@content-collections/integrations 0.1.0 → 0.2.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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @content-collections/integrations@0.0.0 build /Users/sdorra/Projects/sdorra/content-collections/packages/integrations
2
+ > @content-collections/integrations@0.2.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
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.2.0
7
+ CLI tsup v8.0.2
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.js 1.50 KB
12
- ESM ⚡️ Build success in 105ms
13
- CJS dist/index.cjs 3.19 KB
14
- CJS ⚡️ Build success in 106ms
11
+ CJS dist/index.cjs 3.49 KB
12
+ CJS ⚡️ Build success in 21ms
13
+ ESM dist/index.js 1.80 KB
14
+ ESM ⚡️ Build success in 21ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 600ms
16
+ DTS ⚡️ Build success in 811ms
17
17
  DTS dist/index.d.ts 143.00 B
18
18
  DTS dist/index.d.cts 143.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @content-collections/integrations
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ - [`a1dd55b`](https://github.com/sdorra/content-collections/commit/a1dd55bcfe198487de40402284d907b977eedcec) Thanks [@sdorra](https://github.com/sdorra)! - Add count of collections and documents to build output
10
+
11
+ ### Patch Changes
12
+
13
+ - [`2af05da`](https://github.com/sdorra/content-collections/commit/2af05da080720c16a02565cac9228d1ebcd9f649) Thanks [@sdorra](https://github.com/sdorra)! - Fix console output of file-changed event
14
+
15
+ ## 0.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`5c7022f`](https://github.com/sdorra/content-collections/commit/5c7022f630a9194ff5579f792c06dcca31611cd5) Thanks [@sdorra](https://github.com/sdorra)! - Update version range of core package
20
+
3
21
  ## 0.1.0
4
22
 
5
23
  ### Minor 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 in",
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 deleted", relativePath);
83
+ console.log("... file", relativePath, "deleted");
77
84
  } else {
78
- console.log("... file changed", relativePath);
85
+ console.log("... file", relativePath, "changed");
79
86
  }
80
87
  });
81
88
  registerErrorListeners(builder);
package/dist/index.js CHANGED
@@ -32,16 +32,23 @@ function configureLogging(builder) {
32
32
  });
33
33
  builder.on("builder:end", (event) => {
34
34
  console.log(
35
- "... finished build in",
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 deleted", relativePath);
49
+ console.log("... file", relativePath, "deleted");
43
50
  } else {
44
- console.log("... file changed", relativePath);
51
+ console.log("... file", relativePath, "changed");
45
52
  }
46
53
  });
47
54
  registerErrorListeners(builder);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@content-collections/integrations",
3
3
  "description": "Utils for integrating Content Collections with other tools",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -14,10 +14,13 @@
14
14
  }
15
15
  },
16
16
  "devDependencies": {
17
- "@content-collections/core": "0.1.1"
17
+ "@types/node": "20",
18
+ "tsup": "^8.0.2",
19
+ "typescript": "^5.5.4",
20
+ "@content-collections/core": "0.7.0"
18
21
  },
19
22
  "peerDependencies": {
20
- "@content-collections/core": "0.1.1"
23
+ "@content-collections/core": "0.x"
21
24
  },
22
25
  "scripts": {
23
26
  "build": "tsup src/index.ts --format esm,cjs --dts -d dist"
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 in",
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",
13
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 deleted", relativePath);
28
+ console.log("... file", relativePath, "deleted");
21
29
  } else {
22
- console.log("... file changed", relativePath);
30
+ console.log("... file", relativePath, "changed");
23
31
  }
24
32
  });
25
33