Skip to content

Commit ebf68fb

Browse files
feat: build for release
1 parent 86e4e30 commit ebf68fb

File tree

5 files changed

+66
-48
lines changed

5 files changed

+66
-48
lines changed

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"release-github-actions","sha":"fb22a117f4ed27af1cdac085d5b8ac0bd69d2213","ref":"refs/tags/test/v8.0.2.3551956449","tagName":"test/v8.0.2.3551956449","branch":"gh-actions","tags":["test/v8.0.2.3551956449","test/v8.0.2","test/v8.0","test/v8"],"updated_at":"2022-11-26T03:08:55.110Z"}
1+
{"owner":"technote-space","repo":"release-github-actions","sha":"2084745231b581cade75dc1a0e0ffa31a7cad10b","ref":"refs/tags/test/v8.0.2.3570651819","tagName":"test/v8.0.2.3570651819","branch":"gh-actions","tags":["test/v8.0.2.3570651819","test/v8.0.2","test/v8.0","test/v8"],"updated_at":"2022-11-29T03:11:48.398Z"}

lib/index.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ function getDefaultExportFromCjs (x) {
2525
function getAugmentedNamespace(n) {
2626
var f = n.default;
2727
if (typeof f == "function") {
28-
var a = function () {
28+
var a = function a () {
29+
if (this instanceof a) {
30+
var args = [null];
31+
args.push.apply(args, arguments);
32+
var Ctor = Function.bind.apply(f, args);
33+
return new Ctor();
34+
}
2935
return f.apply(this, arguments);
3036
};
3137
a.prototype = f.prototype;

lib/index.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ function getDefaultExportFromCjs (x) {
2323
function getAugmentedNamespace(n) {
2424
var f = n.default;
2525
if (typeof f == "function") {
26-
var a = function () {
26+
var a = function a () {
27+
if (this instanceof a) {
28+
var args = [null];
29+
args.push.apply(args, arguments);
30+
var Ctor = Function.bind.apply(f, args);
31+
return new Ctor();
32+
}
2733
return f.apply(this, arguments);
2834
};
2935
a.prototype = f.prototype;

lib/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ function getDefaultExportFromCjs (x) {
2525
function getAugmentedNamespace(n) {
2626
var f = n.default;
2727
if (typeof f == "function") {
28-
var a = function () {
28+
var a = function a () {
29+
if (this instanceof a) {
30+
var args = [null];
31+
args.push.apply(args, arguments);
32+
var Ctor = Function.bind.apply(f, args);
33+
return new Ctor();
34+
}
2935
return f.apply(this, arguments);
3036
};
3137
a.prototype = f.prototype;

0 commit comments

Comments
 (0)