@rollup/plugin-commonjs 23.0.1 → 23.0.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.
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 = "23.0.1";
14
+ var version = "23.0.3";
15
15
  var peerDependencies = {
16
16
  rollup: "^2.68.0||^3.0.0"
17
17
  };
@@ -362,7 +362,13 @@ export function getDefaultExportFromNamespaceIfNotNamed (n) {
362
362
  export function getAugmentedNamespace(n) {
363
363
  var f = n.default;
364
364
  if (typeof f == "function") {
365
- var a = function () {
365
+ var a = function a () {
366
+ if (this instanceof a) {
367
+ var args = [null];
368
+ args.push.apply(args, arguments);
369
+ var Ctor = Function.bind.apply(f, args);
370
+ return new Ctor();
371
+ }
366
372
  return f.apply(this, arguments);
367
373
  };
368
374
  a.prototype = f.prototype;
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 = "23.0.1";
10
+ var version = "23.0.3";
11
11
  var peerDependencies = {
12
12
  rollup: "^2.68.0||^3.0.0"
13
13
  };
@@ -358,7 +358,13 @@ export function getDefaultExportFromNamespaceIfNotNamed (n) {
358
358
  export function getAugmentedNamespace(n) {
359
359
  var f = n.default;
360
360
  if (typeof f == "function") {
361
- var a = function () {
361
+ var a = function a () {
362
+ if (this instanceof a) {
363
+ var args = [null];
364
+ args.push.apply(args, arguments);
365
+ var Ctor = Function.bind.apply(f, args);
366
+ return new Ctor();
367
+ }
362
368
  return f.apply(this, arguments);
363
369
  };
364
370
  a.prototype = f.prototype;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/plugin-commonjs",
3
- "version": "23.0.1",
3
+ "version": "23.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },