silgi 0.41.55 → 0.41.56

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.
@@ -649,20 +649,10 @@ function transformImportPath(path, packageName, relativeTo) {
649
649
  return importPath;
650
650
  }
651
651
  function registerExportsWithHooks(silgiInstance, runtimeExports, typeExports, packageName) {
652
- function getIgnoredPatterns() {
653
- const ignored = silgiInstance.options.watchOptions?.ignored;
654
- if (!ignored)
655
- return [];
656
- if (Array.isArray(ignored))
657
- return ignored.filter((v) => typeof v === "string");
658
- if (typeof ignored === "string")
659
- return [ignored];
660
- return [];
661
- }
662
652
  silgiInstance.hook("before:scan.ts", (options) => {
663
- const ignoredPatterns = getIgnoredPatterns();
653
+ const ignored = Array.isArray(silgiInstance.options.watchOptions?.ignored) ? silgiInstance.options.watchOptions.ignored : [];
664
654
  for (const { exportName, path, uniqueId, category } of runtimeExports) {
665
- if (isWatchedPath(path, ignoredPatterns)) {
655
+ if (!isWatchedPath(path, ignored)) {
666
656
  silgiInstance.options.devServer.watch.push(path);
667
657
  }
668
658
  switch (category) {
@@ -689,9 +679,9 @@ function registerExportsWithHooks(silgiInstance, runtimeExports, typeExports, pa
689
679
  }
690
680
  });
691
681
  silgiInstance.hook("before:schema.ts", (options) => {
692
- const ignoredPatterns = getIgnoredPatterns();
682
+ const ignored = Array.isArray(silgiInstance.options.watchOptions?.ignored) ? silgiInstance.options.watchOptions.ignored : [];
693
683
  for (const { exportName, path, uniqueId, category } of typeExports) {
694
- if (isWatchedPath(path, ignoredPatterns)) {
684
+ if (!isWatchedPath(path, ignored)) {
695
685
  silgiInstance.options.devServer.watch.push(path);
696
686
  }
697
687
  if (category === "shared" || category === "context") {
@@ -842,7 +832,7 @@ async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI()
842
832
  }
843
833
  }
844
834
  function isWatchedPath(path, ignoredPatterns) {
845
- return !micromatch.isMatch(path, ignoredPatterns);
835
+ return micromatch.isMatch(path, ignoredPatterns);
846
836
  }
847
837
 
848
838
  const MissingModuleMatcher = /Cannot find module\s+['"]?([^'")\s]+)['"]?/i;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.55";
4
+ const version = "0.41.56";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.55",
4
+ "version": "0.41.56",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {