@rollup/plugin-commonjs 25.0.2 → 25.0.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/README.md CHANGED
@@ -299,7 +299,18 @@ For these situations, you can change Rollup's behaviour either globally or per m
299
299
  import * as dep$1 from 'dep';
300
300
 
301
301
  function getAugmentedNamespace(n) {
302
- var a = Object.defineProperty({}, '__esModule', { value: true });
302
+ if (n.__esModule) return n;
303
+ var f = n.default;
304
+ if (typeof f == 'function') {
305
+ var a = function a() {
306
+ if (this instanceof a) {
307
+ return Reflect.construct(f, arguments, this.constructor);
308
+ }
309
+ return f.apply(this, arguments);
310
+ };
311
+ a.prototype = f.prototype;
312
+ } else a = {};
313
+ Object.defineProperty(a, '__esModule', { value: true });
303
314
  Object.keys(n).forEach(function (k) {
304
315
  var d = Object.getOwnPropertyDescriptor(n, k);
305
316
  Object.defineProperty(
package/dist/cjs/index.js CHANGED
@@ -11,7 +11,7 @@ var estreeWalker = require('estree-walker');
11
11
  var MagicString = require('magic-string');
12
12
  var isReference = require('is-reference');
13
13
 
14
- var version = "25.0.2";
14
+ var version = "25.0.4";
15
15
  var peerDependencies = {
16
16
  rollup: "^2.68.0||^3.0.0"
17
17
  };
@@ -365,10 +365,7 @@ export function getAugmentedNamespace(n) {
365
365
  if (typeof f == "function") {
366
366
  var a = function a () {
367
367
  if (this instanceof a) {
368
- var args = [null];
369
- args.push.apply(args, arguments);
370
- var Ctor = Function.bind.apply(f, args);
371
- return new Ctor();
368
+ return Reflect.construct(f, arguments, this.constructor);
372
369
  }
373
370
  return f.apply(this, arguments);
374
371
  };
package/dist/es/index.js CHANGED
@@ -7,7 +7,7 @@ import { walk } from 'estree-walker';
7
7
  import MagicString from 'magic-string';
8
8
  import isReference from 'is-reference';
9
9
 
10
- var version = "25.0.2";
10
+ var version = "25.0.4";
11
11
  var peerDependencies = {
12
12
  rollup: "^2.68.0||^3.0.0"
13
13
  };
@@ -361,10 +361,7 @@ export function getAugmentedNamespace(n) {
361
361
  if (typeof f == "function") {
362
362
  var a = function a () {
363
363
  if (this instanceof a) {
364
- var args = [null];
365
- args.push.apply(args, arguments);
366
- var Ctor = Function.bind.apply(f, args);
367
- return new Ctor();
364
+ return Reflect.construct(f, arguments, this.constructor);
368
365
  }
369
366
  return f.apply(this, arguments);
370
367
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/plugin-commonjs",
3
- "version": "25.0.2",
3
+ "version": "25.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },