silgi 0.43.9 → 0.43.11

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.
@@ -3,10 +3,55 @@ import { reloadScan } from "../core/devServer.mjs";
3
3
  import { prepareBuild } from "./prepare.mjs";
4
4
  import { watch } from "chokidar";
5
5
  import consola from "consola";
6
+ import micromatch from "micromatch";
6
7
  import { basename } from "pathe";
7
8
  import { debounce } from "perfect-debounce";
8
9
 
9
10
  //#region src/cli/build/dev.ts
11
+ const IGNORED_WATCH_PATTERNS = [
12
+ "**/.silgi/**",
13
+ "**/.output/**",
14
+ "**/types/**",
15
+ "**/scan.ts",
16
+ "**/scan.js",
17
+ "**/scan.mjs",
18
+ "**/scan.cjs",
19
+ "**/scan.d.ts",
20
+ "**/scan.d.mts",
21
+ "**/scan.d.cts",
22
+ "**/scan.d.js",
23
+ "**/scan.d.ts",
24
+ "**/meta.ts",
25
+ "**/meta.js",
26
+ "**/meta.mjs",
27
+ "**/meta.cjs",
28
+ "**/meta.d.ts",
29
+ "**/meta.d.mts",
30
+ "**/meta.d.cts",
31
+ "**/meta.d.js",
32
+ "**/meta.d.ts",
33
+ "**/core.ts",
34
+ "**/core.js",
35
+ "**/core.mjs",
36
+ "**/core.cjs",
37
+ "**/core.d.ts",
38
+ "**/core.d.mts",
39
+ "**/core.d.cts",
40
+ "**/core.d.js",
41
+ "**/core.d.ts",
42
+ "**/configs.ts",
43
+ "**/configs.js",
44
+ "**/configs.mjs",
45
+ "**/configs.cjs",
46
+ "**/configs.d.ts",
47
+ "**/configs.d.mts",
48
+ "**/configs.d.cts",
49
+ "**/configs.d.js",
50
+ "**/configs.d.ts"
51
+ ];
52
+ function isIgnoredByPattern(path) {
53
+ return IGNORED_WATCH_PATTERNS.some((pattern) => micromatch.isMatch(path, pattern));
54
+ }
10
55
  async function watchDev() {
11
56
  const silgi = useSilgiCLI();
12
57
  let watcher;
@@ -26,7 +71,8 @@ async function watchDev() {
26
71
  "change"
27
72
  ]);
28
73
  if (silgi.options.devServer.watch.length > 0) {
29
- silgi.options.devServer.watch = [...new Set(silgi.options.devServer.watch)];
74
+ silgi.options.devServer.watch = [...new Set(silgi.options.devServer.watch)].filter((p) => !isIgnoredByPattern(p));
75
+ consola.info("[silgi] Watching files/directories:", silgi.options.devServer.watch);
30
76
  watcher = watch(silgi.options.devServer.watch, silgi.options.watchOptions);
31
77
  watcher.on("all", async (event, path, stats) => {
32
78
  if (!watchReloadEvents.has(event)) return;
@@ -1,11 +1,11 @@
1
1
  import { isIgnored } from "../utils/ignore.mjs";
2
2
  import { consola as consola$1 } from "consola";
3
+ import micromatch from "micromatch";
3
4
  import { basename, dirname, extname, join, relative, resolve } from "pathe";
4
5
  import { useSilgiCLI } from "silgi";
5
6
  import { hash, relativeWithDot, removeExtension } from "silgi/kit";
6
7
  import { withTrailingSlash } from "ufo";
7
8
  import { readFile, readdir } from "node:fs/promises";
8
- import micromatch from "micromatch";
9
9
  import { parseAsync } from "oxc-parser";
10
10
  import { glob } from "tinyglobby";
11
11
 
@@ -34,6 +34,7 @@ function hasInstalledModule(moduleKey, silgi = useSilgiCLI()) {
34
34
  return find?.installed ?? false;
35
35
  }
36
36
  const baseHeaderBannerComment = [
37
+ "/* eslint-disable eslint-comments/no-unlimited-disable */",
37
38
  "// DO NOT EDIT THIS FILE",
38
39
  "// This file is generated by Silgi",
39
40
  "/* eslint-disable */",
package/dist/package.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  //#region package.json
2
2
  var name = "silgi";
3
3
  var type = "module";
4
- var version = "0.43.9";
4
+ var version = "0.43.11";
5
5
  var private$1 = false;
6
6
  var packageManager = "pnpm@10.12.2";
7
7
  var sideEffects = false;
@@ -112,7 +112,6 @@ var dependencies = {
112
112
  "semver": "catalog:",
113
113
  "srvx": "^0.8.0",
114
114
  "std-env": "catalog:",
115
- "tinyexec": "^1.0.1",
116
115
  "tinyglobby": "^0.2.14",
117
116
  "tree-kill": "^1.2.2",
118
117
  "ufo": "catalog:",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.43.9",
4
+ "version": "0.43.11",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -121,7 +121,6 @@
121
121
  "semver": "^7.7.2",
122
122
  "srvx": "^0.8.0",
123
123
  "std-env": "^3.9.0",
124
- "tinyexec": "^1.0.1",
125
124
  "tinyglobby": "^0.2.14",
126
125
  "tree-kill": "^1.2.2",
127
126
  "ufo": "^1.6.1",