rsbuild-plugin-workspace-dev 0.0.0-chore-modify-hook-2025-12-16-20251216020145 → 0.0.0-chore-modify-hook-2025-12-16-20251216020865

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/dist/index.cjs CHANGED
@@ -148,7 +148,7 @@ class WorkspaceDevRunner {
148
148
  path: dir
149
149
  };
150
150
  this.graph.setNode(name, node);
151
- this.visited[name] = false;
151
+ this.visited[name] = this.options.projects?.[name]?.skip || false;
152
152
  this.visiting[name] = false;
153
153
  this.matched[name] = false;
154
154
  const packageName = name;
@@ -172,7 +172,11 @@ class WorkspaceDevRunner {
172
172
  checkGraph() {
173
173
  const cycles = external_graphlib_default().alg.findCycles(this.graph);
174
174
  const nonSelfCycles = cycles.filter((c)=>1 !== c.length);
175
- if (nonSelfCycles.length) console.log(external_chalk_default().red(`${DEBUG_LOG_TITLE} Cycle dependency graph found: ${cycles.join(', ')}, you should config projects in plugin options to skip them, or fix the cycle dependency. Otherwise, a loop of dev will occur.`));
175
+ const nonSkipCycles = nonSelfCycles.filter((group)=>{
176
+ const isSkip = group.some((node)=>this.options.projects?.[node]?.skip);
177
+ return !isSkip;
178
+ });
179
+ if (nonSkipCycles.length) throw new Error(`${DEBUG_LOG_TITLE} Cycle dependency graph found: ${nonSkipCycles}, you should config projects in plugin options to skip someone, or fix the cycle dependency. Otherwise, a loop of dev will occur.`);
176
180
  }
177
181
  async start() {
178
182
  const promises = [];
@@ -203,8 +207,6 @@ class WorkspaceDevRunner {
203
207
  });
204
208
  const config = this.options?.projects?.[name];
205
209
  if (config?.skip) {
206
- this.visited[node] = true;
207
- this.visiting[node] = false;
208
210
  debugLog(`Skip visit node: ${node}`);
209
211
  logger.emitLogOnce('stdout', `skip visit node: ${name}`);
210
212
  return this.start().then(()=>resolve());
package/dist/index.js CHANGED
@@ -105,7 +105,7 @@ class WorkspaceDevRunner {
105
105
  path: dir
106
106
  };
107
107
  this.graph.setNode(name, node);
108
- this.visited[name] = false;
108
+ this.visited[name] = this.options.projects?.[name]?.skip || false;
109
109
  this.visiting[name] = false;
110
110
  this.matched[name] = false;
111
111
  const packageName = name;
@@ -129,7 +129,11 @@ class WorkspaceDevRunner {
129
129
  checkGraph() {
130
130
  const cycles = graphlib.alg.findCycles(this.graph);
131
131
  const nonSelfCycles = cycles.filter((c)=>1 !== c.length);
132
- if (nonSelfCycles.length) console.log(chalk.red(`${DEBUG_LOG_TITLE} Cycle dependency graph found: ${cycles.join(', ')}, you should config projects in plugin options to skip them, or fix the cycle dependency. Otherwise, a loop of dev will occur.`));
132
+ const nonSkipCycles = nonSelfCycles.filter((group)=>{
133
+ const isSkip = group.some((node)=>this.options.projects?.[node]?.skip);
134
+ return !isSkip;
135
+ });
136
+ if (nonSkipCycles.length) throw new Error(`${DEBUG_LOG_TITLE} Cycle dependency graph found: ${nonSkipCycles}, you should config projects in plugin options to skip someone, or fix the cycle dependency. Otherwise, a loop of dev will occur.`);
133
137
  }
134
138
  async start() {
135
139
  const promises = [];
@@ -160,8 +164,6 @@ class WorkspaceDevRunner {
160
164
  });
161
165
  const config = this.options?.projects?.[name];
162
166
  if (config?.skip) {
163
- this.visited[node] = true;
164
- this.visiting[node] = false;
165
167
  debugLog(`Skip visit node: ${node}`);
166
168
  logger.emitLogOnce('stdout', `skip visit node: ${name}`);
167
169
  return this.start().then(()=>resolve());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-plugin-workspace-dev",
3
- "version": "0.0.0-chore-modify-hook-2025-12-16-20251216020145",
3
+ "version": "0.0.0-chore-modify-hook-2025-12-16-20251216020865",
4
4
  "description": "An Rsbuild plugin to provides workspace recursive dev functionality for Monorepo topologies.",
5
5
  "repository": "https://github.com/rspack-contrib/rsbuild-plugin-workspace-dev",
6
6
  "license": "MIT",