svelte-ag 1.0.41 → 1.0.42

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 +1 @@
1
- {"version":3,"file":"vite-plugin-component-source-collector.d.ts","sourceRoot":"","sources":["../../../src/lib/vite/vite-plugin-component-source-collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAMnD,UAAU,OAAO;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAKD,wBAA8B,wBAAwB,CAAC,IAAI,GAAE,OAA8B,GAAG,OAAO,CAAC,MAAM,CAAC,CAoK5G"}
1
+ {"version":3,"file":"vite-plugin-component-source-collector.d.ts","sourceRoot":"","sources":["../../../src/lib/vite/vite-plugin-component-source-collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAMnD,UAAU,OAAO;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAUD,wBAA8B,wBAAwB,CAAC,IAAI,GAAE,OAA8B,GAAG,OAAO,CAAC,MAAM,CAAC,CAoK5G"}
@@ -4,6 +4,11 @@ import { resolve, join, relative, dirname } from 'path';
4
4
  import { open } from 'fs/promises';
5
5
  /** All unique component directories */
6
6
  const componentFiles = new Set();
7
+ function ensureDotRelative(filePath) {
8
+ if (filePath.startsWith('.'))
9
+ return filePath;
10
+ return `./${filePath}`;
11
+ }
7
12
  export default async function componentSourceCollector(opts = { safePackages: [] }) {
8
13
  // constants
9
14
  const outFileName = opts.outputFile ?? 'component-sources.css';
@@ -30,7 +35,7 @@ export default async function componentSourceCollector(opts = { safePackages: []
30
35
  const relativeFilePath = relative(dirname(outputFilePath), cleanedFileName);
31
36
  if (relativeFilePath !== outFileName) {
32
37
  // Dont add itself
33
- componentFiles.add(relativeFilePath);
38
+ componentFiles.add(ensureDotRelative(relativeFilePath));
34
39
  }
35
40
  }
36
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-ag",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Useful svelte components",
5
5
  "bugs": "https://github.com/ageorgeh/svelte-ag/issues",
6
6
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "@iconify/tailwind4": "^1.2.1",
71
71
  "@iconify/types": "^2.0.0",
72
72
  "@internationalized/date": "^3.12.0",
73
- "@lucide/svelte": "^0.576.0",
73
+ "@lucide/svelte": "^0.577.0",
74
74
  "@playwright/test": "1.57.0",
75
75
  "@sveltejs/kit": "^2.53.4",
76
76
  "@sveltejs/package": "^2.5.7",
@@ -24,6 +24,11 @@ interface Options {
24
24
  /** All unique component directories */
25
25
  const componentFiles = new Set<string>();
26
26
 
27
+ function ensureDotRelative(filePath: string): string {
28
+ if (filePath.startsWith('.')) return filePath;
29
+ return `./${filePath}`;
30
+ }
31
+
27
32
  export default async function componentSourceCollector(opts: Options = { safePackages: [] }): Promise<Plugin> {
28
33
  // constants
29
34
  const outFileName = opts.outputFile ?? 'component-sources.css';
@@ -57,7 +62,7 @@ export default async function componentSourceCollector(opts: Options = { safePac
57
62
 
58
63
  if (relativeFilePath !== outFileName) {
59
64
  // Dont add itself
60
- componentFiles.add(relativeFilePath);
65
+ componentFiles.add(ensureDotRelative(relativeFilePath));
61
66
  }
62
67
  }
63
68
  }