@rollup/wasm-node 4.63.2 → 4.63.3

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,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.2
4
- Sat, 12 Sep 2026 06:36:48 GMT - commit 43ed4ec364940fbce7054d8da1f92c695d1e6808
3
+ Rollup.js v4.63.3
4
+ Mon, 14 Sep 2026 12:44:36 GMT - commit 250deca2945f8817350564f7d52bab0f79175d1b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -117,7 +117,7 @@ class Watcher {
117
117
  this.buildDelay = Math.max(this.buildDelay, watch.buildDelay);
118
118
  }
119
119
  }
120
- process.nextTick(() => this.run());
120
+ process.nextTick(() => this.run().catch(error => this.reportError(error)));
121
121
  }
122
122
  async close() {
123
123
  if (this.closed)
@@ -159,30 +159,40 @@ class Watcher {
159
159
  this.invalidatedIds.clear();
160
160
  await this.emitter.emit('restart');
161
161
  this.emitter.removeListenersForCurrentRun();
162
- this.run();
162
+ await this.run();
163
163
  }
164
164
  catch (error) {
165
- this.invalidatedIds.clear();
166
- await this.emitter.emit('event', {
167
- code: 'ERROR',
168
- error,
169
- result: null
170
- });
171
- await this.emitter.emit('event', {
172
- code: 'END'
173
- });
165
+ await this.reportError(error);
174
166
  }
175
167
  }, this.buildDelay);
176
168
  }
177
- async run() {
178
- this.running = true;
169
+ async reportError(error) {
170
+ this.invalidatedIds.clear();
179
171
  await this.emitter.emit('event', {
180
- code: 'START'
172
+ code: 'ERROR',
173
+ error,
174
+ result: null
181
175
  });
182
- for (const task of this.tasks) {
183
- await task.run();
176
+ await this.emitter.emit('event', {
177
+ code: 'END'
178
+ });
179
+ }
180
+ async run() {
181
+ this.running = true;
182
+ // Drop a rerun request left over from a failed run: honoring it after this run
183
+ // would start an empty run that removes the plugin event listeners of this run.
184
+ this.rerun = false;
185
+ try {
186
+ await this.emitter.emit('event', {
187
+ code: 'START'
188
+ });
189
+ for (const task of this.tasks) {
190
+ await task.run();
191
+ }
192
+ }
193
+ finally {
194
+ this.running = false;
184
195
  }
185
- this.running = false;
186
196
  await this.emitter.emit('event', {
187
197
  code: 'END'
188
198
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/wasm-node",
3
- "version": "4.63.2",
3
+ "version": "4.63.3",
4
4
  "description": "Next-generation ES module bundler with Node wasm",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",