rollup 3.0.0-4 → 3.0.0-5

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 v3.0.0-3
4
- Mon, 15 Aug 2022 04:43:13 GMT - commit 84a4a595851ef71494b6f2ab558968bfbc148bdb
3
+ Rollup.js v3.0.0-4
4
+ Wed, 31 Aug 2022 05:26:36 GMT - commit 392609619bcb75a0c7216f38e40d9573419a8e3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.0.0-3
4
- Mon, 15 Aug 2022 04:43:13 GMT - commit 84a4a595851ef71494b6f2ab558968bfbc148bdb
3
+ Rollup.js v3.0.0-4
4
+ Wed, 31 Aug 2022 05:26:36 GMT - commit 392609619bcb75a0c7216f38e40d9573419a8e3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -105,6 +105,7 @@ class Watcher {
105
105
  constructor(configs, emitter) {
106
106
  this.buildDelay = 0;
107
107
  this.buildTimeout = null;
108
+ this.closed = false;
108
109
  this.invalidatedIds = new Map();
109
110
  this.rerun = false;
110
111
  this.running = true;
@@ -117,12 +118,15 @@ class Watcher {
117
118
  process.nextTick(() => this.run());
118
119
  }
119
120
  async close() {
121
+ if (this.closed)
122
+ return;
123
+ this.closed = true;
120
124
  if (this.buildTimeout)
121
125
  clearTimeout(this.buildTimeout);
122
126
  for (const task of this.tasks) {
123
127
  task.close();
124
128
  }
125
- await this.emitter.emitAndAwait('close');
129
+ await this.emitter.emit('close');
126
130
  this.emitter.removeAllListeners();
127
131
  }
128
132
  invalidate(file) {
@@ -149,20 +153,20 @@ class Watcher {
149
153
  this.buildTimeout = setTimeout(async () => {
150
154
  this.buildTimeout = null;
151
155
  try {
152
- await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emitAndAwait('change', id, { event })));
156
+ await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emit('change', id, { event })));
153
157
  this.invalidatedIds.clear();
154
- this.emitter.emit('restart');
155
- this.emitter.removeAwaited();
158
+ await this.emitter.emit('restart');
159
+ this.emitter.removeListenersForCurrentRun();
156
160
  this.run();
157
161
  }
158
162
  catch (error) {
159
163
  this.invalidatedIds.clear();
160
- this.emitter.emit('event', {
164
+ await this.emitter.emit('event', {
161
165
  code: 'ERROR',
162
166
  error,
163
167
  result: null
164
168
  });
165
- this.emitter.emit('event', {
169
+ await this.emitter.emit('event', {
166
170
  code: 'END'
167
171
  });
168
172
  }
@@ -170,14 +174,14 @@ class Watcher {
170
174
  }
171
175
  async run() {
172
176
  this.running = true;
173
- this.emitter.emit('event', {
177
+ await this.emitter.emit('event', {
174
178
  code: 'START'
175
179
  });
176
180
  for (const task of this.tasks) {
177
181
  await task.run();
178
182
  }
179
183
  this.running = false;
180
- this.emitter.emit('event', {
184
+ await this.emitter.emit('event', {
181
185
  code: 'END'
182
186
  });
183
187
  if (this.rerun) {
@@ -235,7 +239,7 @@ class Task {
235
239
  cache: this.cache
236
240
  };
237
241
  const start = Date.now();
238
- this.watcher.emitter.emit('event', {
242
+ await this.watcher.emitter.emit('event', {
239
243
  code: 'BUNDLE_START',
240
244
  input: this.options.input,
241
245
  output: this.outputFiles
@@ -248,7 +252,7 @@ class Task {
248
252
  }
249
253
  this.updateWatchedFiles(result);
250
254
  this.skipWrite || (await Promise.all(this.outputs.map(output => result.write(output))));
251
- this.watcher.emitter.emit('event', {
255
+ await this.watcher.emitter.emit('event', {
252
256
  code: 'BUNDLE_END',
253
257
  duration: Date.now() - start,
254
258
  input: this.options.input,
@@ -267,7 +271,7 @@ class Task {
267
271
  this.cache.modules = this.cache.modules.filter(module => module.id !== error.id);
268
272
  }
269
273
  }
270
- this.watcher.emitter.emit('event', {
274
+ await this.watcher.emitter.emit('event', {
271
275
  code: 'ERROR',
272
276
  error,
273
277
  result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "3.0.0-4",
3
+ "version": "3.0.0-5",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -57,50 +57,49 @@
57
57
  "devDependencies": {
58
58
  "@rollup/plugin-alias": "^3.1.9",
59
59
  "@rollup/plugin-buble": "^0.21.3",
60
- "@rollup/plugin-commonjs": "^22.0.1",
60
+ "@rollup/plugin-commonjs": "^22.0.2",
61
61
  "@rollup/plugin-json": "^4.1.0",
62
62
  "@rollup/plugin-node-resolve": "^13.3.0",
63
63
  "@rollup/plugin-replace": "^4.0.0",
64
- "@rollup/plugin-typescript": "^8.3.3",
64
+ "@rollup/plugin-typescript": "^8.4.0",
65
65
  "@rollup/pluginutils": "^4.2.1",
66
- "@types/estree": "0.0.52",
67
- "@types/node": "^14.18.21",
66
+ "@types/estree": "1.0.0",
67
+ "@types/node": "^14.18.26",
68
68
  "@types/signal-exit": "^3.0.1",
69
69
  "@types/yargs-parser": "^21.0.0",
70
- "@typescript-eslint/eslint-plugin": "^5.30.7",
71
- "@typescript-eslint/parser": "^5.30.7",
72
- "acorn": "^8.7.1",
70
+ "@typescript-eslint/eslint-plugin": "^5.36.1",
71
+ "@typescript-eslint/parser": "^5.36.1",
72
+ "acorn": "^8.8.0",
73
73
  "acorn-jsx": "^5.3.2",
74
74
  "acorn-walk": "^8.2.0",
75
75
  "buble": "^0.20.0",
76
76
  "chokidar": "^3.5.3",
77
77
  "colorette": "^2.0.19",
78
- "core-js": "^3.23.5",
78
+ "core-js": "^3.25.0",
79
79
  "date-time": "^4.0.0",
80
80
  "es5-shim": "^4.6.7",
81
81
  "es6-shim": "^0.35.6",
82
- "eslint": "^8.20.0",
82
+ "eslint": "^8.22.0",
83
83
  "eslint-config-prettier": "^8.5.0",
84
84
  "eslint-plugin-import": "^2.26.0",
85
85
  "eslint-plugin-prettier": "^4.2.1",
86
86
  "fixturify": "^2.1.1",
87
87
  "fs-extra": "^10.1.0",
88
- "get-package-type": "^0.1.0",
89
88
  "github-api": "^3.4.0",
90
89
  "hash.js": "^1.1.7",
91
90
  "husky": "^8.0.1",
92
- "inquirer": "^9.0.2",
91
+ "inquirer": "^9.1.0",
93
92
  "is-reference": "^3.0.0",
94
93
  "lint-staged": "^13.0.3",
95
94
  "locate-character": "^2.0.5",
96
- "magic-string": "^0.26.2",
95
+ "magic-string": "^0.26.3",
97
96
  "mocha": "^10.0.0",
98
97
  "nyc": "^15.1.0",
99
98
  "prettier": "^2.7.1",
100
99
  "pretty-bytes": "^6.0.0",
101
100
  "pretty-ms": "^8.0.0",
102
101
  "requirejs": "^2.3.6",
103
- "rollup": "^2.77.0",
102
+ "rollup": "^2.79.0",
104
103
  "rollup-plugin-license": "^2.8.1",
105
104
  "rollup-plugin-string": "^3.0.0",
106
105
  "rollup-plugin-terser": "^7.0.2",
@@ -111,12 +110,12 @@
111
110
  "source-map": "^0.7.4",
112
111
  "source-map-support": "^0.5.21",
113
112
  "sourcemap-codec": "^1.4.8",
114
- "systemjs": "^6.12.1",
115
- "terser": "^5.14.2",
113
+ "systemjs": "^6.12.4",
114
+ "terser": "^5.15.0",
116
115
  "tslib": "^2.4.0",
117
- "typescript": "^4.7.4",
116
+ "typescript": "^4.8.2",
118
117
  "weak-napi": "^2.0.2",
119
- "yargs-parser": "^21.0.1"
118
+ "yargs-parser": "^21.1.1"
120
119
  },
121
120
  "files": [
122
121
  "dist/**/*.js",
@@ -125,7 +124,7 @@
125
124
  "dist/es/package.json"
126
125
  ],
127
126
  "engines": {
128
- "node": ">=14.13.1",
127
+ "node": ">=14.18.0",
129
128
  "npm": ">=8.0.0"
130
129
  },
131
130
  "exports": {