@content-collections/vite 0.2.2 → 0.2.3

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,14 +1,14 @@
1
1
 
2
- > @content-collections/vite@0.2.2 build /home/runner/work/content-collections/content-collections/packages/vite
2
+ > @content-collections/vite@0.2.3 build /home/runner/work/content-collections/content-collections/packages/vite
3
3
  > tsup src/index.ts --format esm --dts -d dist
4
4
 
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.0.2
8
- CLI Target: es2022
9
- ESM Build start
10
- ESM dist/index.js 2.07 KB
11
- ESM ⚡️ Build success in 51ms
12
- DTS Build start
13
- DTS ⚡️ Build success in 2544ms
14
- DTS dist/index.d.ts 279.00 B
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.2.4
8
+ CLI Target: es2022
9
+ ESM Build start
10
+ ESM dist/index.js 2.07 KB
11
+ ESM ⚡️ Build success in 44ms
12
+ DTS Build start
13
+ DTS ⚡️ Build success in 2609ms
14
+ DTS dist/index.d.ts 279.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @content-collections/vite
2
2
 
3
+ ## 0.2.3
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
+ - Updated dependencies [[`b2c89ce`](https://github.com/sdorra/content-collections/commit/b2c89ce6075d9a5115486d8ff9c0b84f4c0841dd)]:
10
+ - @content-collections/integrations@0.2.1
11
+
3
12
  ## 0.2.2
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/index.ts
2
2
  import { createBuilder } from "@content-collections/core";
3
- import path from "path";
4
3
  import { configureLogging } from "@content-collections/integrations";
4
+ import path from "node:path";
5
5
  var defaultOptions = {
6
6
  configPath: "content-collections.ts"
7
7
  };
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@content-collections/vite",
3
3
  "description": "Use content-collections with Vite",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  "./package.json": "./package.json",
10
10
  ".": {
11
- "import": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
13
  }
14
14
  },
15
15
  "dependencies": {
16
- "@content-collections/integrations": "0.2.0"
16
+ "@content-collections/integrations": "0.2.1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "20.x",
20
- "tsup": "^8.0.2",
20
+ "tsup": "^8.2.4",
21
21
  "typescript": "^5.5.4",
22
- "vite": "^5.3.2",
23
- "@content-collections/core": "0.7.0"
22
+ "vite": "^5.4.6",
23
+ "@content-collections/core": "0.7.2"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@content-collections/core": "^0.x",
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Builder, createBuilder } from "@content-collections/core";
2
- import { Plugin, UserConfig } from "vite";
3
- import path from "node:path";
4
2
  import { configureLogging } from "@content-collections/integrations";
3
+ import path from "node:path";
4
+ import { Plugin, UserConfig } from "vite";
5
5
 
6
6
  export type Options = {
7
7
  configPath: string;
@@ -20,7 +20,7 @@ function resolveConfigPath(root: string, configPath: string) {
20
20
  }
21
21
 
22
22
  export default function contentCollectionsPlugin(
23
- options: Partial<Options> = {}
23
+ options: Partial<Options> = {},
24
24
  ): Plugin {
25
25
  const pluginOptions = { ...defaultOptions, ...options };
26
26
 
@@ -39,12 +39,12 @@ export default function contentCollectionsPlugin(
39
39
 
40
40
  let configPath = resolveConfigPath(
41
41
  config.root || process.cwd(),
42
- pluginOptions.configPath
42
+ pluginOptions.configPath,
43
43
  );
44
44
 
45
45
  const directory = path.resolve(
46
46
  path.dirname(configPath),
47
- "./.content-collections/generated"
47
+ "./.content-collections/generated",
48
48
  );
49
49
 
50
50
  const configPatch: Partial<UserConfig> = {
@@ -77,7 +77,7 @@ export default function contentCollectionsPlugin(
77
77
  let configPath = resolveConfigPath(config.root, pluginOptions.configPath);
78
78
  console.log(
79
79
  "Starting content-collections with config",
80
- path.relative(process.cwd(), configPath)
80
+ path.relative(process.cwd(), configPath),
81
81
  );
82
82
 
83
83
  builder = await createBuilder(configPath);
package/tsconfig.json CHANGED
@@ -21,4 +21,4 @@
21
21
  /* If your code doesn't run in the DOM: */
22
22
  "lib": ["es2022"]
23
23
  }
24
- }
24
+ }