@content-collections/vite 0.2.3 → 0.2.5
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 +4 -4
- package/CHANGELOG.md +12 -0
- package/dist/index.js +4 -3
- package/package.json +13 -4
- package/src/index.ts +5 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @content-collections/vite@0.2.
|
|
2
|
+
> @content-collections/vite@0.2.5 build /home/runner/work/content-collections/content-collections/packages/vite
|
|
3
3
|
> tsup src/index.ts --format esm --dts -d dist
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.2.4
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[32m2.
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m2.08 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 60ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 3521ms
|
|
14
14
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m279.00 B[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @content-collections/vite
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#584](https://github.com/sdorra/content-collections/pull/584) [`66539f6`](https://github.com/sdorra/content-collections/commit/66539f6eea3738e3342a0ec7a85d26835b8b2602) Thanks [@sdorra](https://github.com/sdorra)! - Allow Vite 6 as peer dependency
|
|
8
|
+
|
|
9
|
+
## 0.2.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#458](https://github.com/sdorra/content-collections/pull/458) [`3abd5c0`](https://github.com/sdorra/content-collections/commit/3abd5c07774662929351de82071600f082d2650d) Thanks [@sdorra](https://github.com/sdorra)! - Fix double execution with vinxi
|
|
14
|
+
|
|
3
15
|
## 0.2.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -14,11 +14,12 @@ function resolveConfigPath(root, configPath) {
|
|
|
14
14
|
function contentCollectionsPlugin(options = {}) {
|
|
15
15
|
const pluginOptions = { ...defaultOptions, ...options };
|
|
16
16
|
let builder;
|
|
17
|
-
|
|
17
|
+
function isEnabled(config) {
|
|
18
|
+
return options.isEnabled ? options.isEnabled(config) : true;
|
|
19
|
+
}
|
|
18
20
|
return {
|
|
19
21
|
name: "content-collections",
|
|
20
22
|
config(config) {
|
|
21
|
-
isEnabled = options.isEnabled ? options.isEnabled(config) : true;
|
|
22
23
|
let configPath = resolveConfigPath(
|
|
23
24
|
config.root || process.cwd(),
|
|
24
25
|
pluginOptions.configPath
|
|
@@ -47,7 +48,7 @@ function contentCollectionsPlugin(options = {}) {
|
|
|
47
48
|
return configPatch;
|
|
48
49
|
},
|
|
49
50
|
async configResolved(config) {
|
|
50
|
-
if (!isEnabled) {
|
|
51
|
+
if (!isEnabled(config)) {
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
54
|
let configPath = resolveConfigPath(config.root, pluginOptions.configPath);
|
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@content-collections/vite",
|
|
3
|
-
"description": "Use content-collections with Vite",
|
|
4
|
-
"version": "0.2.3",
|
|
5
3
|
"type": "module",
|
|
4
|
+
"version": "0.2.5",
|
|
5
|
+
"description": "Use content-collections with Vite",
|
|
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/vite"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/sdorra/content-collections/issues",
|
|
6
15
|
"main": "dist/index.js",
|
|
7
16
|
"types": "./dist/index.d.ts",
|
|
8
17
|
"exports": {
|
|
@@ -20,11 +29,11 @@
|
|
|
20
29
|
"tsup": "^8.2.4",
|
|
21
30
|
"typescript": "^5.5.4",
|
|
22
31
|
"vite": "^5.4.6",
|
|
23
|
-
"@content-collections/core": "0.
|
|
32
|
+
"@content-collections/core": "0.9.0"
|
|
24
33
|
},
|
|
25
34
|
"peerDependencies": {
|
|
26
35
|
"@content-collections/core": "^0.x",
|
|
27
|
-
"vite": "^5"
|
|
36
|
+
"vite": "^5 || ^6"
|
|
28
37
|
},
|
|
29
38
|
"scripts": {
|
|
30
39
|
"build": "tsup src/index.ts --format esm --dts -d dist"
|
package/src/index.ts
CHANGED
|
@@ -25,14 +25,15 @@ export default function contentCollectionsPlugin(
|
|
|
25
25
|
const pluginOptions = { ...defaultOptions, ...options };
|
|
26
26
|
|
|
27
27
|
let builder: Builder;
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
function isEnabled(config: UserConfig) {
|
|
30
|
+
return options.isEnabled ? options.isEnabled(config) : true;
|
|
31
|
+
}
|
|
29
32
|
|
|
30
33
|
return {
|
|
31
34
|
name: "content-collections",
|
|
32
35
|
|
|
33
36
|
config(config) {
|
|
34
|
-
isEnabled = options.isEnabled ? options.isEnabled(config) : true;
|
|
35
|
-
|
|
36
37
|
// even if the plugin is disabled, we need to configure the alias
|
|
37
38
|
// vite is often executed multiple time and the plugin should only
|
|
38
39
|
// run once, but the aliases must be available for all runs
|
|
@@ -71,7 +72,7 @@ export default function contentCollectionsPlugin(
|
|
|
71
72
|
},
|
|
72
73
|
|
|
73
74
|
async configResolved(config: any) {
|
|
74
|
-
if (!isEnabled) {
|
|
75
|
+
if (!isEnabled(config)) {
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
78
|
let configPath = resolveConfigPath(config.root, pluginOptions.configPath);
|