@rollup/plugin-terser 0.4.3 → 0.4.4

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/cjs/index.js CHANGED
@@ -11,6 +11,7 @@ var os = require('os');
11
11
  var events = require('events');
12
12
  var serializeJavascript = require('serialize-javascript');
13
13
 
14
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
14
15
  const taskInfo = Symbol('taskInfo');
15
16
  const freeWorker = Symbol('freeWorker');
16
17
  const workerPoolWorkerFlag = 'WorkerPoolWorker';
@@ -156,7 +157,7 @@ function terser(input = {}) {
156
157
  async renderChunk(code, chunk, outputOptions) {
157
158
  if (!workerPool) {
158
159
  workerPool = new WorkerPool({
159
- filePath: url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index.js', document.baseURI).href))),
160
+ filePath: url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.js', document.baseURI).href))),
160
161
  maxWorkers
161
162
  });
162
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/plugin-terser",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,7 +53,7 @@
53
53
  "modules"
54
54
  ],
55
55
  "peerDependencies": {
56
- "rollup": "^2.x || ^3.x"
56
+ "rollup": "^2.0.0||^3.0.0||^4.0.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "rollup": {
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/serialize-javascript": "^5.0.2",
70
- "rollup": "^3.0.0-7",
70
+ "rollup": "^4.0.0-24",
71
71
  "typescript": "^4.8.3"
72
72
  },
73
73
  "types": "./types/index.d.ts"