diff --git a/.eslintrc b/.eslintrc index 184e1e6..6ae0b8c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,7 +10,8 @@ "rules": { "brace-style": "off", "comma-dangle": ["warn", "always-multiline"], - "indent": "off" + "indent": "off", + "require-atomic-updates": "off" }, "settings": { "react": { diff --git a/lint-staged.config.js b/lint-staged.config.js index 5567cbf..c41a053 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,7 +1,4 @@ module.exports = { - linters: { - '{src,test}/**/*.js': ['eslint --fix', 'git add'], - '*.md': ['prettier --write', 'git add'], - }, - ignore: ['**/dist/**/*.js'], + '{src,test}/**/*.js': [`eslint --fix`, `git add`], + '*.md': ['prettier --write', 'git add'], }; diff --git a/package.json b/package.json index 1cc40bb..93f394c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "microbundle", - "version": "0.12.0-next.1", + "version": "0.12.0-next.3", "description": "Zero-configuration bundler for tiny JS libs, powered by Rollup.", "main": "dist/microbundle.js", "source": "src/index.js", @@ -42,15 +42,15 @@ "author": "Jason Miller (http://jasonformat.com)", "license": "MIT", "dependencies": { - "@babel/core": "^7.4.5", - "@babel/plugin-proposal-class-properties": "7.4.4", + "@babel/core": "^7.5.4", + "@babel/plugin-proposal-class-properties": "7.5.0", "@babel/plugin-syntax-jsx": "^7.2.0", "@babel/plugin-transform-flow-strip-types": "^7.4.4", "@babel/plugin-transform-react-jsx": "^7.3.0", - "@babel/polyfill": "^7.4.4", + "@babel/preset-env": "^7.5.4", "@babel/preset-flow": "^7.0.0", "asyncro": "^3.0.0", - "autoprefixer": "^9.6.0", + "autoprefixer": "^9.6.1", "babel-plugin-macros": "^2.4.2", "babel-plugin-transform-async-to-promises": "^0.8.12", "babel-plugin-transform-replace-expressions": "^0.2.0", @@ -64,46 +64,43 @@ "lodash.merge": "^4.6.1", "module-details-from-path": "^1.0.3", "pretty-bytes": "^5.2.0", - "rollup": "^1.15.1", + "rollup": "^1.16.7", "rollup-plugin-alias": "^1.5.2", - "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel": "^4.3.3", "rollup-plugin-bundle-size": "^1.0.1", - "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-commonjs": "^10.0.1", "rollup-plugin-es3": "^1.1.0", "rollup-plugin-json": "^4.0.0", - "rollup-plugin-node-resolve": "^5.0.1", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-postcss": "^2.0.3", - "rollup-plugin-terser": "^5.0.0", - "rollup-plugin-typescript2": "^0.21.1", - "sade": "^1.5.0", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-typescript2": "^0.21.2", + "sade": "^1.6.0", "tiny-glob": "^0.2.6", "tslib": "^1.10.0", - "typescript": "^3.5.1" + "typescript": "^3.5.3" }, "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/node": "^7.4.5", + "@babel/cli": "^7.5.0", + "@babel/node": "^7.5.0", "@babel/plugin-proposal-throw-expressions": "^7.2.0", - "@babel/preset-env": "^7.4.5", - "babel-core": "^7.0.0-bridge.0", "babel-jest": "^24.8.0", - "core-js": "3.1.3", "cross-env": "^5.2.0", "directory-tree": "^2.2.3", - "eslint": "^5.16.0", + "eslint": "^6.0.1", "eslint-config-developit": "^1.1.1", - "eslint-config-prettier": "^4.3.0", + "eslint-config-prettier": "^6.0.0", "eslint-plugin-prettier": "^3.1.0", "esm": "^3.2.22", - "fs-extra": "^8.0.1", - "husky": "^2.4.0", + "fs-extra": "^8.1.0", + "husky": "^3.0.0", "jest": "^24.8.0", - "lint-staged": "^8.2.0", + "lint-staged": "^9.1.0", "prettier": "^1.18.2", "regenerator-runtime": "^0.13.2", "rimraf": "^2.6.3", "shell-quote": "^1.6.1", "strip-ansi": "^5.2.0", - "travis-size-report": "^1.0.1" + "travis-size-report": "^1.1.0" } } diff --git a/src/lib/babel-custom.js b/src/lib/babel-custom.js index ce9e947..26b6aea 100644 --- a/src/lib/babel-custom.js +++ b/src/lib/babel-custom.js @@ -102,6 +102,7 @@ export default babelPlugin.custom(babelCore => { merge( { loose: true, + useBuiltIns: false, targets: customOptions.targets, }, preset.options, @@ -129,6 +130,7 @@ export default babelPlugin.custom(babelCore => { : customOptions.targets, modules: false, loose: true, + useBuiltIns: false, exclude: ['transform-async-to-generator', 'transform-regenerator'], }, ]); diff --git a/test/__snapshots__/index.test.js.snap b/test/__snapshots__/index.test.js.snap index db1203e..54f7531 100644 --- a/test/__snapshots__/index.test.js.snap +++ b/test/__snapshots__/index.test.js.snap @@ -423,7 +423,7 @@ Build \\"basicCss\\" to dist: exports[`fixtures build basic-css with microbundle 2`] = `7`; -exports[`fixtures build basic-css with microbundle 3`] = `".testing{display:-webkit-box;display:flex;color:red;background:#00f}"`; +exports[`fixtures build basic-css with microbundle 3`] = `".testing{display:flex;color:red;background:#00f}"`; exports[`fixtures build basic-css with microbundle 4`] = ` "module.exports=function(){var e=document.createElement(\\"div\\");return e.className=\\"testing\\",e}; @@ -739,8 +739,8 @@ basic-ts Build \\"basicLibTs\\" to dist: 104 B: basic-lib-ts.js.gz 76 B: basic-lib-ts.js.br -97 B: basic-lib-ts.mjs.gz -73 B: basic-lib-ts.mjs.br +104 B: basic-lib-ts.mjs.gz +82 B: basic-lib-ts.mjs.br 187 B: basic-lib-ts.umd.js.gz 144 B: basic-lib-ts.umd.js.br" `; @@ -754,7 +754,7 @@ exports[`fixtures build basic-ts with microbundle 3`] = ` `; exports[`fixtures build basic-ts with microbundle 4`] = ` -"export default new(function(){function n(){}return n.prototype.drive=function(n){return!0},n}()); +"var n=new(function(){function n(){}return n.prototype.drive=function(n){return!0},n}());export default n; //# sourceMappingURL=basic-lib-ts.mjs.map " `; @@ -806,8 +806,8 @@ basic-tsx Build \\"basicLibTsx\\" to dist: 235 B: basic-lib-tsx.js.gz 188 B: basic-lib-tsx.js.br -239 B: basic-lib-tsx.mjs.gz -191 B: basic-lib-tsx.mjs.br +236 B: basic-lib-tsx.mjs.gz +190 B: basic-lib-tsx.mjs.br 317 B: basic-lib-tsx.umd.js.gz 260 B: basic-lib-tsx.umd.js.br" `; @@ -821,7 +821,7 @@ exports[`fixtures build basic-tsx with microbundle 3`] = ` `; exports[`fixtures build basic-tsx with microbundle 4`] = ` -"var r=function(r,n){for(var e=arguments.length,t=new Array(e>2?e-2:0),o=2;o2?e-2:0),o=2;o=0;f--)(o=e[f])&&(l=(c<3?o(l):c>3?o(t,r,l):o(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\"); +"var e=function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}(),t=new(e=function(e,t,r,n){var o,c=arguments.length,l=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(l=(c<3?o(l):c>3?o(t,r,l):o(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\");export default t; //# sourceMappingURL=class-decorators-ts.mjs.map " `; @@ -969,8 +969,8 @@ class-properties Build \\"classProperties\\" to dist: 93 B: class-properties.js.gz 79 B: class-properties.js.br -89 B: class-properties.mjs.gz -79 B: class-properties.mjs.br +96 B: class-properties.mjs.gz +85 B: class-properties.mjs.br 198 B: class-properties.umd.js.gz 150 B: class-properties.umd.js.br" `; @@ -984,7 +984,7 @@ exports[`fixtures build class-properties with microbundle 3`] = ` `; exports[`fixtures build class-properties with microbundle 4`] = ` -"var t=function(){this.baz=3};t.bar=2;export default new t;export{t as Foo}; +"var a=function(){this.baz=3};a.bar=2;var r=new a;export default r;export{a as Foo}; //# sourceMappingURL=class-properties.mjs.map " `; @@ -1014,30 +1014,30 @@ custom-babelrc Build \\"customBabelrc\\" to dist: -5.62 kB: custom-babelrc.js.gz -5.07 kB: custom-babelrc.js.br -5.63 kB: custom-babelrc.mjs.gz -5.08 kB: custom-babelrc.mjs.br -5.69 kB: custom-babelrc.umd.js.gz -5.13 kB: custom-babelrc.umd.js.br" +234 B: custom-babelrc.js.gz +184 B: custom-babelrc.js.br +236 B: custom-babelrc.mjs.gz +191 B: custom-babelrc.mjs.br +327 B: custom-babelrc.umd.js.gz +275 B: custom-babelrc.umd.js.br" `; exports[`fixtures build custom-babelrc with microbundle 2`] = `6`; exports[`fixtures build custom-babelrc with microbundle 3`] = ` -"var t=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};function n(t,n){return t(n={exports:{}},n.exports),n.exports}var e,r,o,i=\\"object\\",c=function(t){return t&&t.Math==Math&&t},u=c(typeof globalThis==i&&globalThis)||c(typeof window==i&&window)||c(typeof self==i&&self)||c(typeof t==i&&t)||Function(\\"return this\\")(),a=function(t){try{return!!t()}catch(t){return!0}},f=!a(function(){return 7!=Object.defineProperty({},\\"a\\",{get:function(){return 7}}).a}),s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,p={f:l&&!s.call({1:2},1)?function(t){var n=l(this,t);return!!n&&n.enumerable}:s},v=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},h={}.toString,d=function(t){return h.call(t).slice(8,-1)},y=\\"\\".split,m=a(function(){return!Object(\\"z\\").propertyIsEnumerable(0)})?function(t){return\\"String\\"==d(t)?y.call(t,\\"\\"):Object(t)}:Object,g=function(t){return m(function(t){if(null==t)throw TypeError(\\"Can't call method on \\"+t);return t}(t))},b=function(t){return\\"object\\"==typeof t?null!==t:\\"function\\"==typeof t},w=function(t,n){if(!b(t))return t;var e,r;if(n&&\\"function\\"==typeof(e=t.toString)&&!b(r=e.call(t)))return r;if(\\"function\\"==typeof(e=t.valueOf)&&!b(r=e.call(t)))return r;if(!n&&\\"function\\"==typeof(e=t.toString)&&!b(r=e.call(t)))return r;throw TypeError(\\"Can't convert object to primitive value\\")},j={}.hasOwnProperty,P=function(t,n){return j.call(t,n)},O=u.document,E=b(O)&&b(O.createElement),S=function(t){return E?O.createElement(t):{}},T=!f&&!a(function(){return 7!=Object.defineProperty(S(\\"div\\"),\\"a\\",{get:function(){return 7}}).a}),x=Object.getOwnPropertyDescriptor,M={f:f?x:function(t,n){if(t=g(t),n=w(n,!0),T)try{return x(t,n)}catch(t){}if(P(t,n))return v(!p.f.call(t,n),t[n])}},k=function(t){if(!b(t))throw TypeError(String(t)+\\" is not an object\\");return t},_=Object.defineProperty,A={f:f?_:function(t,n,e){if(k(t),n=w(n,!0),k(e),T)try{return _(t,n,e)}catch(t){}if(\\"get\\"in e||\\"set\\"in e)throw TypeError(\\"Accessors not supported\\");return\\"value\\"in e&&(t[n]=e.value),t}},F=f?function(t,n,e){return A.f(t,n,v(1,e))}:function(t,n,e){return t[n]=e,t},I=function(t,n){try{F(u,t,n)}catch(e){u[t]=n}return n},C=n(function(t){var n=u[\\"__core-js_shared__\\"]||I(\\"__core-js_shared__\\",{});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})(\\"versions\\",[]).push({version:\\"3.1.3\\",mode:\\"global\\",copyright:\\"© 2019 Denis Pushkarev (zloirock.ru)\\"})}),L=C(\\"native-function-to-string\\",Function.toString),N=u.WeakMap,D=\\"function\\"==typeof N&&/native code/.test(L.call(N)),R=0,z=Math.random(),K=function(t){return\\"Symbol(\\".concat(void 0===t?\\"\\":t,\\")_\\",(++R+z).toString(36))},W=C(\\"keys\\"),q={};if(D){var B=new(0,u.WeakMap),G=B.get,U=B.has,H=B.set;e=function(t,n){return H.call(B,t,n),n},r=function(t){return G.call(B,t)||{}},o=function(t){return U.call(B,t)}}else{var V=W.state||(W.state=K(\\"state\\"));q[V]=!0,e=function(t,n){return F(t,V,n),n},r=function(t){return P(t,V)?t[V]:{}},o=function(t){return P(t,V)}}var Y={set:e,get:r,has:o,enforce:function(t){return o(t)?r(t):e(t,{})},getterFor:function(t){return function(n){var e;if(!b(n)||(e=r(n)).type!==t)throw TypeError(\\"Incompatible receiver, \\"+t+\\" required\\");return e}}},J=n(function(t){var n=Y.get,e=Y.enforce,r=String(L).split(\\"toString\\");C(\\"inspectSource\\",function(t){return L.call(t)}),(t.exports=function(t,n,o,i){var c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,f=!!i&&!!i.noTargetGet;\\"function\\"==typeof o&&(\\"string\\"!=typeof n||P(o,\\"name\\")||F(o,\\"name\\",n),e(o).source=r.join(\\"string\\"==typeof n?n:\\"\\")),t!==u?(c?!f&&t[n]&&(a=!0):delete t[n],a?t[n]=o:F(t,n,o)):a?t[n]=o:I(n,o)})(Function.prototype,\\"toString\\",function(){return\\"function\\"==typeof this&&n(this).source||L.call(this)})}),Q=Math.ceil,X=Math.floor,Z=function(t){return isNaN(t=+t)?0:(t>0?X:Q)(t)},$=Math.min,tt=function(t){return t>0?$(Z(t),9007199254740991):0},nt=Math.max,et=Math.min,rt=function(t,n,e){for(var r=g(t),o=tt(r.length),i=function(t,n){var r=Z(e);return r<0?nt(r+n,0):et(r,n)}(0,o);o>i;i++)if(i in r&&r[i]===n)return i||0;return-1},ot=[\\"constructor\\",\\"hasOwnProperty\\",\\"isPrototypeOf\\",\\"propertyIsEnumerable\\",\\"toLocaleString\\",\\"toString\\",\\"valueOf\\"].concat(\\"length\\",\\"prototype\\"),it={f:Object.getOwnPropertyNames||function(t){return function(t,n){var e,r=g(t),o=0,i=[];for(e in r)!P(q,e)&&P(r,e)&&i.push(e);for(;n.length>o;)P(r,e=n[o++])&&(~rt(i,e)||i.push(e));return i}(t,ot)}},ct={f:Object.getOwnPropertySymbols},ut=u.Reflect,at=ut&&ut.ownKeys||function(t){var n=it.f(k(t)),e=ct.f;return e?n.concat(e(t)):n},ft=function(t,n){for(var e=at(n),r=A.f,o=M.f,i=0;ia;a++)if((o?l(k(s=t[a])[0],s[1]):l(t[a]))===n)return n;return}c=u.call(t)}for(;!(s=c.next()).done;)if(Dt(c,l,s.value,o)===n)return n}).BREAK=n}),zt=Ot(\\"iterator\\"),Kt=!1;try{var Wt=0,qt={next:function(){return{done:!!Wt++}},return:function(){Kt=!0}};qt[zt]=function(){return this},Array.from(qt,function(){throw 2})}catch(t){}var Bt,Gt,Ut,Ht=Ot(\\"species\\"),Vt=u.document,Yt=Vt&&Vt.documentElement,Jt=u.location,Qt=u.setImmediate,Xt=u.clearImmediate,Zt=u.process,$t=u.MessageChannel,tn=u.Dispatch,nn=0,en={},rn=function(t){if(en.hasOwnProperty(t)){var n=en[t];delete en[t],n()}},on=function(t){return function(){rn(t)}},cn=function(t){rn(t.data)},un=function(t){u.postMessage(t+\\"\\",Jt.protocol+\\"//\\"+Jt.host)};Qt&&Xt||(Qt=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return en[++nn]=function(){(\\"function\\"==typeof t?t:Function(t)).apply(void 0,n)},Bt(nn),nn},Xt=function(t){delete en[t]},\\"process\\"==d(Zt)?Bt=function(t){Zt.nextTick(on(t))}:tn&&tn.now?Bt=function(t){tn.now(on(t))}:$t?(Ut=(Gt=new $t).port2,Gt.port1.onmessage=cn,Bt=It(Ut.postMessage,Ut,1)):!u.addEventListener||\\"function\\"!=typeof postMessage||u.importScripts||a(un)?Bt=\\"onreadystatechange\\"in S(\\"script\\")?function(t){Yt.appendChild(S(\\"script\\")).onreadystatechange=function(){Yt.removeChild(this),rn(t)}}:function(t){setTimeout(on(t),0)}:(Bt=un,u.addEventListener(\\"message\\",cn,!1)));var an,fn,sn,ln,pn,vn,hn,dn={set:Qt,clear:Xt},yn=u.navigator,mn=yn&&yn.userAgent||\\"\\",gn=M.f,bn=dn.set,wn=u.MutationObserver||u.WebKitMutationObserver,jn=u.process,Pn=u.Promise,On=\\"process\\"==d(jn),En=gn(u,\\"queueMicrotask\\"),Sn=En&&En.value;Sn||(an=function(){var t,n;for(On&&(t=jn.domain)&&t.exit();fn;){n=fn.fn,fn=fn.next;try{n()}catch(t){throw fn?ln():sn=void 0,t}}sn=void 0,t&&t.enter()},On?ln=function(){jn.nextTick(an)}:wn&&!/(iphone|ipod|ipad).*applewebkit/i.test(mn)?(pn=!0,vn=document.createTextNode(\\"\\"),new wn(an).observe(vn,{characterData:!0}),ln=function(){vn.data=pn=!pn}):Pn&&Pn.resolve?(hn=Pn.resolve(void 0),ln=function(){hn.then(an)}):ln=function(){bn.call(u,an)});var Tn,xn,Mn,kn,_n,An=Sn||function(t){var n={fn:t,next:void 0};sn&&(sn.next=n),fn||(fn=n,ln()),sn=n},Fn=function(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError(\\"Bad Promise constructor\\");n=t,e=r}),this.resolve=Mt(n),this.reject=Mt(e)},In={f:function(t){return new Fn(t)}},Cn=function(t,n){if(k(t),b(n)&&n.constructor===t)return n;var e=In.f(t);return(0,e.resolve)(n),e.promise},Ln=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Nn=dn.set,Dn=Ot(\\"species\\"),Rn=Y.get,zn=Y.set,Kn=Y.getterFor(\\"Promise\\"),Wn=u.Promise,qn=u.TypeError,Bn=u.document,Gn=u.process,Un=u.fetch,Hn=Gn&&Gn.versions,Vn=Hn&&Hn.v8||\\"\\",Yn=In.f,Jn=Yn,Qn=\\"process\\"==d(Gn),Xn=!!(Bn&&Bn.createEvent&&u.dispatchEvent),Zn=yt(\\"Promise\\",function(){var t=Wn.resolve(1),n=function(){},e=(t.constructor={})[Dn]=function(t){t(n,n)};return!((Qn||\\"function\\"==typeof PromiseRejectionEvent)&&t.then(n)instanceof e&&0!==Vn.indexOf(\\"6.6\\")&&-1===mn.indexOf(\\"Chrome/66\\"))}),$n=Zn||!function(t,n){if(!Kt)return!1;var e=!1;try{var r={};r[zt]=function(){return{next:function(){return{done:e=!0}}}},Wn.all(r).catch(function(){})}catch(t){}return e}(),te=function(t){var n;return!(!b(t)||\\"function\\"!=typeof(n=t.then))&&n},ne=function(t,n,e){if(!n.notified){n.notified=!0;var r=n.reactions;An(function(){for(var o=n.value,i=1==n.state,c=0,u=function(e){var r,c,u,a=i?e.ok:e.fail,f=e.resolve,s=e.reject,l=e.domain;try{a?(i||(2===n.rejection&&ie(t,n),n.rejection=1),!0===a?r=o:(l&&l.enter(),r=a(o),l&&(l.exit(),u=!0)),r===e.promise?s(qn(\\"Promise-chain cycle\\")):(c=te(r))?c.call(r,f,s):f(r)):s(o)}catch(t){l&&!u&&l.exit(),s(t)}};r.length>c;)u(r[c++]);n.reactions=[],n.notified=!1,e&&!n.rejection&&re(t,n)})}},ee=function(t,n,e){var r,o;Xn?((r=Bn.createEvent(\\"Event\\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:n,reason:e},(o=u[\\"on\\"+t])?o(r):\\"unhandledrejection\\"===t&&function(t,n){var e=u.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}(\\"Unhandled promise rejection\\",e)},re=function(t,n){Nn.call(u,function(){var e,r=n.value;if(oe(n)&&(e=Ln(function(){Qn?Gn.emit(\\"unhandledRejection\\",r,t):ee(\\"unhandledrejection\\",t,r)}),n.rejection=Qn||oe(n)?2:1,e.error))throw e.value})},oe=function(t){return 1!==t.rejection&&!t.parent},ie=function(t,n){Nn.call(u,function(){Qn?Gn.emit(\\"rejectionHandled\\",t):ee(\\"rejectionhandled\\",t,n.value)})},ce=function(t,n,e,r){return function(o){t(n,e,o,r)}},ue=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,ne(t,n,!0))},ae=function t(n,e,r,o){if(!e.done){e.done=!0,o&&(e=o);try{if(n===r)throw qn(\\"Promise can't be resolved itself\\");var i=te(r);i?An(function(){var o={done:!1};try{i.call(r,ce(t,n,o,e),ce(ue,n,o,e))}catch(t){ue(n,o,t,e)}}):(e.value=r,e.state=1,ne(n,e,!1))}catch(t){ue(n,{done:!1},t,e)}}};Zn&&(Wn=function(t){!function(t,n,e){if(!(t instanceof Wn))throw TypeError(\\"Incorrect Promise invocation\\")}(this),Mt(t),Tn.call(this);var n=Rn(this);try{t(ce(ae,this,n),ce(ue,this,n))}catch(t){ue(this,n,t)}},(Tn=function(t){zn(this,{type:\\"Promise\\",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,n,e){for(var r in n)J(t,r,n[r],void 0);return t}(Wn.prototype,{then:function(t,n){var e=Kn(this),r=Yn(function(t,n){var e,r=k(t).constructor;return void 0===r||null==(e=k(r)[Ht])?n:Mt(e)}(this,Wn));return r.ok=\\"function\\"!=typeof t||t,r.fail=\\"function\\"==typeof n&&n,r.domain=Qn?Gn.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&ne(this,e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),xn=function(){var t=new Tn,n=Rn(t);this.promise=t,this.resolve=ce(ae,t,n),this.reject=ce(ue,t,n)},In.f=Yn=function(t){return t===Wn||t===Mn?new xn(t):Jn(t)},\\"function\\"==typeof Un&>({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Cn(Wn,Un.apply(u,arguments))}})),gt({global:!0,wrap:!0,forced:Zn},{Promise:Wn}),(kn=Wn)&&!P(kn=kn.prototype,St)&&Et(kn,St,{configurable:!0,value:\\"Promise\\"}),_n=function(t,n){return arguments.length<2?Tt(bt[t])||Tt(u[t]):bt[t]&&bt[t][n]||u[t]&&u[t][n]}(\\"Promise\\"),f&&_n&&!_n[xt]&&(0,A.f)(_n,xt,{configurable:!0,get:function(){return this}}),Mn=bt.Promise,gt({target:\\"Promise\\",stat:!0,forced:Zn},{reject:function(t){var n=Yn(this);return n.reject.call(void 0,t),n.promise}}),gt({target:\\"Promise\\",stat:!0,forced:Zn},{resolve:function(t){return Cn(this,t)}}),gt({target:\\"Promise\\",stat:!0,forced:$n},{all:function(t){var n=this,e=Yn(n),r=e.resolve,o=e.reject,i=Ln(function(){var e=Mt(n.resolve),i=[],c=0,u=1;Rt(t,function(t){var a=c++,f=!1;i.push(void 0),u++,e.call(n,t).then(function(t){f||(f=!0,i[a]=t,--u||r(i))},o)}),--u||r(i)});return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=Yn(n),r=e.reject,o=Ln(function(){var o=Mt(n.resolve);Rt(t,function(t){o.call(n,t).then(e.resolve,r)})});return o.error&&r(o.value),e.promise}}),exports.MyClass=class{constructor(){!function(t,n,e){n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}(this,\\"myFields\\",[\\"foo\\",\\"bar\\"])}foo(){try{return this.myFields.find(t=>\\"bar\\"===t)}catch(t){return Promise.reject(t)}}}; +"require(\\"core-js/modules/es.promise\\"),exports.MyClass=class{constructor(){var e;e=[\\"foo\\",\\"bar\\"],\\"myFields\\"in this?Object.defineProperty(this,\\"myFields\\",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.myFields=e}foo(){try{return this.myFields.find(e=>\\"bar\\"===e)}catch(e){return Promise.reject(e)}}}; //# sourceMappingURL=custom-babelrc.js.map " `; exports[`fixtures build custom-babelrc with microbundle 4`] = ` -"var t=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};function n(t,n){return t(n={exports:{}},n.exports),n.exports}var e,r,o,i=\\"object\\",c=function(t){return t&&t.Math==Math&&t},u=c(typeof globalThis==i&&globalThis)||c(typeof window==i&&window)||c(typeof self==i&&self)||c(typeof t==i&&t)||Function(\\"return this\\")(),a=function(t){try{return!!t()}catch(t){return!0}},f=!a(function(){return 7!=Object.defineProperty({},\\"a\\",{get:function(){return 7}}).a}),s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,p={f:l&&!s.call({1:2},1)?function(t){var n=l(this,t);return!!n&&n.enumerable}:s},v=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},h={}.toString,d=function(t){return h.call(t).slice(8,-1)},y=\\"\\".split,m=a(function(){return!Object(\\"z\\").propertyIsEnumerable(0)})?function(t){return\\"String\\"==d(t)?y.call(t,\\"\\"):Object(t)}:Object,g=function(t){return m(function(t){if(null==t)throw TypeError(\\"Can't call method on \\"+t);return t}(t))},b=function(t){return\\"object\\"==typeof t?null!==t:\\"function\\"==typeof t},w=function(t,n){if(!b(t))return t;var e,r;if(n&&\\"function\\"==typeof(e=t.toString)&&!b(r=e.call(t)))return r;if(\\"function\\"==typeof(e=t.valueOf)&&!b(r=e.call(t)))return r;if(!n&&\\"function\\"==typeof(e=t.toString)&&!b(r=e.call(t)))return r;throw TypeError(\\"Can't convert object to primitive value\\")},j={}.hasOwnProperty,P=function(t,n){return j.call(t,n)},O=u.document,E=b(O)&&b(O.createElement),S=function(t){return E?O.createElement(t):{}},T=!f&&!a(function(){return 7!=Object.defineProperty(S(\\"div\\"),\\"a\\",{get:function(){return 7}}).a}),x=Object.getOwnPropertyDescriptor,M={f:f?x:function(t,n){if(t=g(t),n=w(n,!0),T)try{return x(t,n)}catch(t){}if(P(t,n))return v(!p.f.call(t,n),t[n])}},k=function(t){if(!b(t))throw TypeError(String(t)+\\" is not an object\\");return t},_=Object.defineProperty,A={f:f?_:function(t,n,e){if(k(t),n=w(n,!0),k(e),T)try{return _(t,n,e)}catch(t){}if(\\"get\\"in e||\\"set\\"in e)throw TypeError(\\"Accessors not supported\\");return\\"value\\"in e&&(t[n]=e.value),t}},F=f?function(t,n,e){return A.f(t,n,v(1,e))}:function(t,n,e){return t[n]=e,t},I=function(t,n){try{F(u,t,n)}catch(e){u[t]=n}return n},C=n(function(t){var n=u[\\"__core-js_shared__\\"]||I(\\"__core-js_shared__\\",{});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})(\\"versions\\",[]).push({version:\\"3.1.3\\",mode:\\"global\\",copyright:\\"© 2019 Denis Pushkarev (zloirock.ru)\\"})}),L=C(\\"native-function-to-string\\",Function.toString),N=u.WeakMap,D=\\"function\\"==typeof N&&/native code/.test(L.call(N)),R=0,z=Math.random(),K=function(t){return\\"Symbol(\\".concat(void 0===t?\\"\\":t,\\")_\\",(++R+z).toString(36))},W=C(\\"keys\\"),q={};if(D){var B=new(0,u.WeakMap),G=B.get,U=B.has,H=B.set;e=function(t,n){return H.call(B,t,n),n},r=function(t){return G.call(B,t)||{}},o=function(t){return U.call(B,t)}}else{var V=W.state||(W.state=K(\\"state\\"));q[V]=!0,e=function(t,n){return F(t,V,n),n},r=function(t){return P(t,V)?t[V]:{}},o=function(t){return P(t,V)}}var Y={set:e,get:r,has:o,enforce:function(t){return o(t)?r(t):e(t,{})},getterFor:function(t){return function(n){var e;if(!b(n)||(e=r(n)).type!==t)throw TypeError(\\"Incompatible receiver, \\"+t+\\" required\\");return e}}},J=n(function(t){var n=Y.get,e=Y.enforce,r=String(L).split(\\"toString\\");C(\\"inspectSource\\",function(t){return L.call(t)}),(t.exports=function(t,n,o,i){var c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,f=!!i&&!!i.noTargetGet;\\"function\\"==typeof o&&(\\"string\\"!=typeof n||P(o,\\"name\\")||F(o,\\"name\\",n),e(o).source=r.join(\\"string\\"==typeof n?n:\\"\\")),t!==u?(c?!f&&t[n]&&(a=!0):delete t[n],a?t[n]=o:F(t,n,o)):a?t[n]=o:I(n,o)})(Function.prototype,\\"toString\\",function(){return\\"function\\"==typeof this&&n(this).source||L.call(this)})}),Q=Math.ceil,X=Math.floor,Z=function(t){return isNaN(t=+t)?0:(t>0?X:Q)(t)},$=Math.min,tt=function(t){return t>0?$(Z(t),9007199254740991):0},nt=Math.max,et=Math.min,rt=function(t,n,e){for(var r=g(t),o=tt(r.length),i=function(t,n){var r=Z(e);return r<0?nt(r+n,0):et(r,n)}(0,o);o>i;i++)if(i in r&&r[i]===n)return i||0;return-1},ot=[\\"constructor\\",\\"hasOwnProperty\\",\\"isPrototypeOf\\",\\"propertyIsEnumerable\\",\\"toLocaleString\\",\\"toString\\",\\"valueOf\\"].concat(\\"length\\",\\"prototype\\"),it={f:Object.getOwnPropertyNames||function(t){return function(t,n){var e,r=g(t),o=0,i=[];for(e in r)!P(q,e)&&P(r,e)&&i.push(e);for(;n.length>o;)P(r,e=n[o++])&&(~rt(i,e)||i.push(e));return i}(t,ot)}},ct={f:Object.getOwnPropertySymbols},ut=u.Reflect,at=ut&&ut.ownKeys||function(t){var n=it.f(k(t)),e=ct.f;return e?n.concat(e(t)):n},ft=function(t,n){for(var e=at(n),r=A.f,o=M.f,i=0;ia;a++)if((o?l(k(s=t[a])[0],s[1]):l(t[a]))===n)return n;return}c=u.call(t)}for(;!(s=c.next()).done;)if(Dt(c,l,s.value,o)===n)return n}).BREAK=n}),zt=Ot(\\"iterator\\"),Kt=!1;try{var Wt=0,qt={next:function(){return{done:!!Wt++}},return:function(){Kt=!0}};qt[zt]=function(){return this},Array.from(qt,function(){throw 2})}catch(t){}var Bt,Gt,Ut,Ht=Ot(\\"species\\"),Vt=u.document,Yt=Vt&&Vt.documentElement,Jt=u.location,Qt=u.setImmediate,Xt=u.clearImmediate,Zt=u.process,$t=u.MessageChannel,tn=u.Dispatch,nn=0,en={},rn=function(t){if(en.hasOwnProperty(t)){var n=en[t];delete en[t],n()}},on=function(t){return function(){rn(t)}},cn=function(t){rn(t.data)},un=function(t){u.postMessage(t+\\"\\",Jt.protocol+\\"//\\"+Jt.host)};Qt&&Xt||(Qt=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return en[++nn]=function(){(\\"function\\"==typeof t?t:Function(t)).apply(void 0,n)},Bt(nn),nn},Xt=function(t){delete en[t]},\\"process\\"==d(Zt)?Bt=function(t){Zt.nextTick(on(t))}:tn&&tn.now?Bt=function(t){tn.now(on(t))}:$t?(Ut=(Gt=new $t).port2,Gt.port1.onmessage=cn,Bt=It(Ut.postMessage,Ut,1)):!u.addEventListener||\\"function\\"!=typeof postMessage||u.importScripts||a(un)?Bt=\\"onreadystatechange\\"in S(\\"script\\")?function(t){Yt.appendChild(S(\\"script\\")).onreadystatechange=function(){Yt.removeChild(this),rn(t)}}:function(t){setTimeout(on(t),0)}:(Bt=un,u.addEventListener(\\"message\\",cn,!1)));var an,fn,sn,ln,pn,vn,hn,dn={set:Qt,clear:Xt},yn=u.navigator,mn=yn&&yn.userAgent||\\"\\",gn=M.f,bn=dn.set,wn=u.MutationObserver||u.WebKitMutationObserver,jn=u.process,Pn=u.Promise,On=\\"process\\"==d(jn),En=gn(u,\\"queueMicrotask\\"),Sn=En&&En.value;Sn||(an=function(){var t,n;for(On&&(t=jn.domain)&&t.exit();fn;){n=fn.fn,fn=fn.next;try{n()}catch(t){throw fn?ln():sn=void 0,t}}sn=void 0,t&&t.enter()},On?ln=function(){jn.nextTick(an)}:wn&&!/(iphone|ipod|ipad).*applewebkit/i.test(mn)?(pn=!0,vn=document.createTextNode(\\"\\"),new wn(an).observe(vn,{characterData:!0}),ln=function(){vn.data=pn=!pn}):Pn&&Pn.resolve?(hn=Pn.resolve(void 0),ln=function(){hn.then(an)}):ln=function(){bn.call(u,an)});var Tn,xn,Mn,kn,_n,An=Sn||function(t){var n={fn:t,next:void 0};sn&&(sn.next=n),fn||(fn=n,ln()),sn=n},Fn=function(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError(\\"Bad Promise constructor\\");n=t,e=r}),this.resolve=Mt(n),this.reject=Mt(e)},In={f:function(t){return new Fn(t)}},Cn=function(t,n){if(k(t),b(n)&&n.constructor===t)return n;var e=In.f(t);return(0,e.resolve)(n),e.promise},Ln=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Nn=dn.set,Dn=Ot(\\"species\\"),Rn=Y.get,zn=Y.set,Kn=Y.getterFor(\\"Promise\\"),Wn=u.Promise,qn=u.TypeError,Bn=u.document,Gn=u.process,Un=u.fetch,Hn=Gn&&Gn.versions,Vn=Hn&&Hn.v8||\\"\\",Yn=In.f,Jn=Yn,Qn=\\"process\\"==d(Gn),Xn=!!(Bn&&Bn.createEvent&&u.dispatchEvent),Zn=yt(\\"Promise\\",function(){var t=Wn.resolve(1),n=function(){},e=(t.constructor={})[Dn]=function(t){t(n,n)};return!((Qn||\\"function\\"==typeof PromiseRejectionEvent)&&t.then(n)instanceof e&&0!==Vn.indexOf(\\"6.6\\")&&-1===mn.indexOf(\\"Chrome/66\\"))}),$n=Zn||!function(t,n){if(!Kt)return!1;var e=!1;try{var r={};r[zt]=function(){return{next:function(){return{done:e=!0}}}},Wn.all(r).catch(function(){})}catch(t){}return e}(),te=function(t){var n;return!(!b(t)||\\"function\\"!=typeof(n=t.then))&&n},ne=function(t,n,e){if(!n.notified){n.notified=!0;var r=n.reactions;An(function(){for(var o=n.value,i=1==n.state,c=0,u=function(e){var r,c,u,a=i?e.ok:e.fail,f=e.resolve,s=e.reject,l=e.domain;try{a?(i||(2===n.rejection&&ie(t,n),n.rejection=1),!0===a?r=o:(l&&l.enter(),r=a(o),l&&(l.exit(),u=!0)),r===e.promise?s(qn(\\"Promise-chain cycle\\")):(c=te(r))?c.call(r,f,s):f(r)):s(o)}catch(t){l&&!u&&l.exit(),s(t)}};r.length>c;)u(r[c++]);n.reactions=[],n.notified=!1,e&&!n.rejection&&re(t,n)})}},ee=function(t,n,e){var r,o;Xn?((r=Bn.createEvent(\\"Event\\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:n,reason:e},(o=u[\\"on\\"+t])?o(r):\\"unhandledrejection\\"===t&&function(t,n){var e=u.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}(\\"Unhandled promise rejection\\",e)},re=function(t,n){Nn.call(u,function(){var e,r=n.value;if(oe(n)&&(e=Ln(function(){Qn?Gn.emit(\\"unhandledRejection\\",r,t):ee(\\"unhandledrejection\\",t,r)}),n.rejection=Qn||oe(n)?2:1,e.error))throw e.value})},oe=function(t){return 1!==t.rejection&&!t.parent},ie=function(t,n){Nn.call(u,function(){Qn?Gn.emit(\\"rejectionHandled\\",t):ee(\\"rejectionhandled\\",t,n.value)})},ce=function(t,n,e,r){return function(o){t(n,e,o,r)}},ue=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,ne(t,n,!0))},ae=function t(n,e,r,o){if(!e.done){e.done=!0,o&&(e=o);try{if(n===r)throw qn(\\"Promise can't be resolved itself\\");var i=te(r);i?An(function(){var o={done:!1};try{i.call(r,ce(t,n,o,e),ce(ue,n,o,e))}catch(t){ue(n,o,t,e)}}):(e.value=r,e.state=1,ne(n,e,!1))}catch(t){ue(n,{done:!1},t,e)}}};Zn&&(Wn=function(t){!function(t,n,e){if(!(t instanceof Wn))throw TypeError(\\"Incorrect Promise invocation\\")}(this),Mt(t),Tn.call(this);var n=Rn(this);try{t(ce(ae,this,n),ce(ue,this,n))}catch(t){ue(this,n,t)}},(Tn=function(t){zn(this,{type:\\"Promise\\",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,n,e){for(var r in n)J(t,r,n[r],void 0);return t}(Wn.prototype,{then:function(t,n){var e=Kn(this),r=Yn(function(t,n){var e,r=k(t).constructor;return void 0===r||null==(e=k(r)[Ht])?n:Mt(e)}(this,Wn));return r.ok=\\"function\\"!=typeof t||t,r.fail=\\"function\\"==typeof n&&n,r.domain=Qn?Gn.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&ne(this,e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),xn=function(){var t=new Tn,n=Rn(t);this.promise=t,this.resolve=ce(ae,t,n),this.reject=ce(ue,t,n)},In.f=Yn=function(t){return t===Wn||t===Mn?new xn(t):Jn(t)},\\"function\\"==typeof Un&>({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Cn(Wn,Un.apply(u,arguments))}})),gt({global:!0,wrap:!0,forced:Zn},{Promise:Wn}),(kn=Wn)&&!P(kn=kn.prototype,St)&&Et(kn,St,{configurable:!0,value:\\"Promise\\"}),_n=function(t,n){return arguments.length<2?Tt(bt[t])||Tt(u[t]):bt[t]&&bt[t][n]||u[t]&&u[t][n]}(\\"Promise\\"),f&&_n&&!_n[xt]&&(0,A.f)(_n,xt,{configurable:!0,get:function(){return this}}),Mn=bt.Promise,gt({target:\\"Promise\\",stat:!0,forced:Zn},{reject:function(t){var n=Yn(this);return n.reject.call(void 0,t),n.promise}}),gt({target:\\"Promise\\",stat:!0,forced:Zn},{resolve:function(t){return Cn(this,t)}}),gt({target:\\"Promise\\",stat:!0,forced:$n},{all:function(t){var n=this,e=Yn(n),r=e.resolve,o=e.reject,i=Ln(function(){var e=Mt(n.resolve),i=[],c=0,u=1;Rt(t,function(t){var a=c++,f=!1;i.push(void 0),u++,e.call(n,t).then(function(t){f||(f=!0,i[a]=t,--u||r(i))},o)}),--u||r(i)});return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=Yn(n),r=e.reject,o=Ln(function(){var o=Mt(n.resolve);Rt(t,function(t){o.call(n,t).then(e.resolve,r)})});return o.error&&r(o.value),e.promise}});class fe{constructor(){!function(t,n,e){n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}(this,\\"myFields\\",[\\"foo\\",\\"bar\\"])}foo(){try{return this.myFields.find(t=>\\"bar\\"===t)}catch(t){return Promise.reject(t)}}}export{fe as MyClass}; +"import\\"core-js/modules/es.promise\\";class e{constructor(){var e;e=[\\"foo\\",\\"bar\\"],\\"myFields\\"in this?Object.defineProperty(this,\\"myFields\\",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.myFields=e}foo(){try{return this.myFields.find(e=>\\"bar\\"===e)}catch(e){return Promise.reject(e)}}}export{e as MyClass}; //# sourceMappingURL=custom-babelrc.mjs.map " `; exports[`fixtures build custom-babelrc with microbundle 5`] = ` -"!function(t,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?n(exports):\\"function\\"==typeof define&&define.amd?define([\\"exports\\"],n):n((t=t||self).customBabelrc={})}(this,function(t){var n=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};function e(t,n){return t(n={exports:{}},n.exports),n.exports}var r,o,i,c=\\"object\\",u=function(t){return t&&t.Math==Math&&t},f=u(typeof globalThis==c&&globalThis)||u(typeof window==c&&window)||u(typeof self==c&&self)||u(typeof n==c&&n)||Function(\\"return this\\")(),a=function(t){try{return!!t()}catch(t){return!0}},s=!a(function(){return 7!=Object.defineProperty({},\\"a\\",{get:function(){return 7}}).a}),l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,v={f:p&&!l.call({1:2},1)?function(t){var n=p(this,t);return!!n&&n.enumerable}:l},h=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},d={}.toString,y=function(t){return d.call(t).slice(8,-1)},m=\\"\\".split,g=a(function(){return!Object(\\"z\\").propertyIsEnumerable(0)})?function(t){return\\"String\\"==y(t)?m.call(t,\\"\\"):Object(t)}:Object,b=function(t){return g(function(t){if(null==t)throw TypeError(\\"Can't call method on \\"+t);return t}(t))},w=function(t){return\\"object\\"==typeof t?null!==t:\\"function\\"==typeof t},j=function(t,n){if(!w(t))return t;var e,r;if(n&&\\"function\\"==typeof(e=t.toString)&&!w(r=e.call(t)))return r;if(\\"function\\"==typeof(e=t.valueOf)&&!w(r=e.call(t)))return r;if(!n&&\\"function\\"==typeof(e=t.toString)&&!w(r=e.call(t)))return r;throw TypeError(\\"Can't convert object to primitive value\\")},P={}.hasOwnProperty,O=function(t,n){return P.call(t,n)},E=f.document,S=w(E)&&w(E.createElement),x=function(t){return S?E.createElement(t):{}},T=!s&&!a(function(){return 7!=Object.defineProperty(x(\\"div\\"),\\"a\\",{get:function(){return 7}}).a}),M=Object.getOwnPropertyDescriptor,k={f:s?M:function(t,n){if(t=b(t),n=j(n,!0),T)try{return M(t,n)}catch(t){}if(O(t,n))return h(!v.f.call(t,n),t[n])}},_=function(t){if(!w(t))throw TypeError(String(t)+\\" is not an object\\");return t},A=Object.defineProperty,F={f:s?A:function(t,n,e){if(_(t),n=j(n,!0),_(e),T)try{return A(t,n,e)}catch(t){}if(\\"get\\"in e||\\"set\\"in e)throw TypeError(\\"Accessors not supported\\");return\\"value\\"in e&&(t[n]=e.value),t}},I=s?function(t,n,e){return F.f(t,n,h(1,e))}:function(t,n,e){return t[n]=e,t},C=function(t,n){try{I(f,t,n)}catch(e){f[t]=n}return n},L=e(function(t){var n=f[\\"__core-js_shared__\\"]||C(\\"__core-js_shared__\\",{});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})(\\"versions\\",[]).push({version:\\"3.1.3\\",mode:\\"global\\",copyright:\\"© 2019 Denis Pushkarev (zloirock.ru)\\"})}),N=L(\\"native-function-to-string\\",Function.toString),D=f.WeakMap,R=\\"function\\"==typeof D&&/native code/.test(N.call(D)),z=0,B=Math.random(),K=function(t){return\\"Symbol(\\".concat(void 0===t?\\"\\":t,\\")_\\",(++z+B).toString(36))},W=L(\\"keys\\"),q={};if(R){var G=new(0,f.WeakMap),U=G.get,H=G.has,V=G.set;r=function(t,n){return V.call(G,t,n),n},o=function(t){return U.call(G,t)||{}},i=function(t){return H.call(G,t)}}else{var Y=W.state||(W.state=K(\\"state\\"));q[Y]=!0,r=function(t,n){return I(t,Y,n),n},o=function(t){return O(t,Y)?t[Y]:{}},i=function(t){return O(t,Y)}}var J={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!w(n)||(e=o(n)).type!==t)throw TypeError(\\"Incompatible receiver, \\"+t+\\" required\\");return e}}},Q=e(function(t){var n=J.get,e=J.enforce,r=String(N).split(\\"toString\\");L(\\"inspectSource\\",function(t){return N.call(t)}),(t.exports=function(t,n,o,i){var c=!!i&&!!i.unsafe,u=!!i&&!!i.enumerable,a=!!i&&!!i.noTargetGet;\\"function\\"==typeof o&&(\\"string\\"!=typeof n||O(o,\\"name\\")||I(o,\\"name\\",n),e(o).source=r.join(\\"string\\"==typeof n?n:\\"\\")),t!==f?(c?!a&&t[n]&&(u=!0):delete t[n],u?t[n]=o:I(t,n,o)):u?t[n]=o:C(n,o)})(Function.prototype,\\"toString\\",function(){return\\"function\\"==typeof this&&n(this).source||N.call(this)})}),X=Math.ceil,Z=Math.floor,$=function(t){return isNaN(t=+t)?0:(t>0?Z:X)(t)},tt=Math.min,nt=function(t){return t>0?tt($(t),9007199254740991):0},et=Math.max,rt=Math.min,ot=function(t,n,e){for(var r=b(t),o=nt(r.length),i=function(t,n){var r=$(e);return r<0?et(r+n,0):rt(r,n)}(0,o);o>i;i++)if(i in r&&r[i]===n)return i||0;return-1},it=[\\"constructor\\",\\"hasOwnProperty\\",\\"isPrototypeOf\\",\\"propertyIsEnumerable\\",\\"toLocaleString\\",\\"toString\\",\\"valueOf\\"].concat(\\"length\\",\\"prototype\\"),ct={f:Object.getOwnPropertyNames||function(t){return function(t,n){var e,r=b(t),o=0,i=[];for(e in r)!O(q,e)&&O(r,e)&&i.push(e);for(;n.length>o;)O(r,e=n[o++])&&(~ot(i,e)||i.push(e));return i}(t,it)}},ut={f:Object.getOwnPropertySymbols},ft=f.Reflect,at=ft&&ft.ownKeys||function(t){var n=ct.f(_(t)),e=ut.f;return e?n.concat(e(t)):n},st=function(t,n){for(var e=at(n),r=F.f,o=k.f,i=0;if;f++)if((o?l(_(s=t[f])[0],s[1]):l(t[f]))===n)return n;return}c=u.call(t)}for(;!(s=c.next()).done;)if(Rt(c,l,s.value,o)===n)return n}).BREAK=n}),Bt=Et(\\"iterator\\"),Kt=!1;try{var Wt=0,qt={next:function(){return{done:!!Wt++}},return:function(){Kt=!0}};qt[Bt]=function(){return this},Array.from(qt,function(){throw 2})}catch(t){}var Gt,Ut,Ht,Vt=Et(\\"species\\"),Yt=f.document,Jt=Yt&&Yt.documentElement,Qt=f.location,Xt=f.setImmediate,Zt=f.clearImmediate,$t=f.process,tn=f.MessageChannel,nn=f.Dispatch,en=0,rn={},on=function(t){if(rn.hasOwnProperty(t)){var n=rn[t];delete rn[t],n()}},cn=function(t){return function(){on(t)}},un=function(t){on(t.data)},fn=function(t){f.postMessage(t+\\"\\",Qt.protocol+\\"//\\"+Qt.host)};Xt&&Zt||(Xt=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return rn[++en]=function(){(\\"function\\"==typeof t?t:Function(t)).apply(void 0,n)},Gt(en),en},Zt=function(t){delete rn[t]},\\"process\\"==y($t)?Gt=function(t){$t.nextTick(cn(t))}:nn&&nn.now?Gt=function(t){nn.now(cn(t))}:tn?(Ht=(Ut=new tn).port2,Ut.port1.onmessage=un,Gt=Ct(Ht.postMessage,Ht,1)):!f.addEventListener||\\"function\\"!=typeof postMessage||f.importScripts||a(fn)?Gt=\\"onreadystatechange\\"in x(\\"script\\")?function(t){Jt.appendChild(x(\\"script\\")).onreadystatechange=function(){Jt.removeChild(this),on(t)}}:function(t){setTimeout(cn(t),0)}:(Gt=fn,f.addEventListener(\\"message\\",un,!1)));var an,sn,ln,pn,vn,hn,dn,yn={set:Xt,clear:Zt},mn=f.navigator,gn=mn&&mn.userAgent||\\"\\",bn=k.f,wn=yn.set,jn=f.MutationObserver||f.WebKitMutationObserver,Pn=f.process,On=f.Promise,En=\\"process\\"==y(Pn),Sn=bn(f,\\"queueMicrotask\\"),xn=Sn&&Sn.value;xn||(an=function(){var t,n;for(En&&(t=Pn.domain)&&t.exit();sn;){n=sn.fn,sn=sn.next;try{n()}catch(t){throw sn?pn():ln=void 0,t}}ln=void 0,t&&t.enter()},En?pn=function(){Pn.nextTick(an)}:jn&&!/(iphone|ipod|ipad).*applewebkit/i.test(gn)?(vn=!0,hn=document.createTextNode(\\"\\"),new jn(an).observe(hn,{characterData:!0}),pn=function(){hn.data=vn=!vn}):On&&On.resolve?(dn=On.resolve(void 0),pn=function(){dn.then(an)}):pn=function(){wn.call(f,an)});var Tn,Mn,kn,_n,An,Fn=xn||function(t){var n={fn:t,next:void 0};ln&&(ln.next=n),sn||(sn=n,pn()),ln=n},In=function(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError(\\"Bad Promise constructor\\");n=t,e=r}),this.resolve=kt(n),this.reject=kt(e)},Cn={f:function(t){return new In(t)}},Ln=function(t,n){if(_(t),w(n)&&n.constructor===t)return n;var e=Cn.f(t);return(0,e.resolve)(n),e.promise},Nn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Dn=yn.set,Rn=Et(\\"species\\"),zn=J.get,Bn=J.set,Kn=J.getterFor(\\"Promise\\"),Wn=f.Promise,qn=f.TypeError,Gn=f.document,Un=f.process,Hn=f.fetch,Vn=Un&&Un.versions,Yn=Vn&&Vn.v8||\\"\\",Jn=Cn.f,Qn=Jn,Xn=\\"process\\"==y(Un),Zn=!!(Gn&&Gn.createEvent&&f.dispatchEvent),$n=mt(\\"Promise\\",function(){var t=Wn.resolve(1),n=function(){},e=(t.constructor={})[Rn]=function(t){t(n,n)};return!((Xn||\\"function\\"==typeof PromiseRejectionEvent)&&t.then(n)instanceof e&&0!==Yn.indexOf(\\"6.6\\")&&-1===gn.indexOf(\\"Chrome/66\\"))}),te=$n||!function(t,n){if(!Kt)return!1;var e=!1;try{var r={};r[Bt]=function(){return{next:function(){return{done:e=!0}}}},Wn.all(r).catch(function(){})}catch(t){}return e}(),ne=function(t){var n;return!(!w(t)||\\"function\\"!=typeof(n=t.then))&&n},ee=function(t,n,e){if(!n.notified){n.notified=!0;var r=n.reactions;Fn(function(){for(var o=n.value,i=1==n.state,c=0,u=function(e){var r,c,u,f=i?e.ok:e.fail,a=e.resolve,s=e.reject,l=e.domain;try{f?(i||(2===n.rejection&&ce(t,n),n.rejection=1),!0===f?r=o:(l&&l.enter(),r=f(o),l&&(l.exit(),u=!0)),r===e.promise?s(qn(\\"Promise-chain cycle\\")):(c=ne(r))?c.call(r,a,s):a(r)):s(o)}catch(t){l&&!u&&l.exit(),s(t)}};r.length>c;)u(r[c++]);n.reactions=[],n.notified=!1,e&&!n.rejection&&oe(t,n)})}},re=function(t,n,e){var r,o;Zn?((r=Gn.createEvent(\\"Event\\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),f.dispatchEvent(r)):r={promise:n,reason:e},(o=f[\\"on\\"+t])?o(r):\\"unhandledrejection\\"===t&&function(t,n){var e=f.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}(\\"Unhandled promise rejection\\",e)},oe=function(t,n){Dn.call(f,function(){var e,r=n.value;if(ie(n)&&(e=Nn(function(){Xn?Un.emit(\\"unhandledRejection\\",r,t):re(\\"unhandledrejection\\",t,r)}),n.rejection=Xn||ie(n)?2:1,e.error))throw e.value})},ie=function(t){return 1!==t.rejection&&!t.parent},ce=function(t,n){Dn.call(f,function(){Xn?Un.emit(\\"rejectionHandled\\",t):re(\\"rejectionhandled\\",t,n.value)})},ue=function(t,n,e,r){return function(o){t(n,e,o,r)}},fe=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,ee(t,n,!0))},ae=function t(n,e,r,o){if(!e.done){e.done=!0,o&&(e=o);try{if(n===r)throw qn(\\"Promise can't be resolved itself\\");var i=ne(r);i?Fn(function(){var o={done:!1};try{i.call(r,ue(t,n,o,e),ue(fe,n,o,e))}catch(t){fe(n,o,t,e)}}):(e.value=r,e.state=1,ee(n,e,!1))}catch(t){fe(n,{done:!1},t,e)}}};$n&&(Wn=function(t){!function(t,n,e){if(!(t instanceof Wn))throw TypeError(\\"Incorrect Promise invocation\\")}(this),kt(t),Tn.call(this);var n=zn(this);try{t(ue(ae,this,n),ue(fe,this,n))}catch(t){fe(this,n,t)}},(Tn=function(t){Bn(this,{type:\\"Promise\\",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,n,e){for(var r in n)Q(t,r,n[r],void 0);return t}(Wn.prototype,{then:function(t,n){var e=Kn(this),r=Jn(function(t,n){var e,r=_(t).constructor;return void 0===r||null==(e=_(r)[Vt])?n:kt(e)}(this,Wn));return r.ok=\\"function\\"!=typeof t||t,r.fail=\\"function\\"==typeof n&&n,r.domain=Xn?Un.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&ee(this,e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Mn=function(){var t=new Tn,n=zn(t);this.promise=t,this.resolve=ue(ae,t,n),this.reject=ue(fe,t,n)},Cn.f=Jn=function(t){return t===Wn||t===kn?new Mn(t):Qn(t)},\\"function\\"==typeof Hn&&bt({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Ln(Wn,Hn.apply(f,arguments))}})),bt({global:!0,wrap:!0,forced:$n},{Promise:Wn}),(_n=Wn)&&!O(_n=_n.prototype,xt)&&St(_n,xt,{configurable:!0,value:\\"Promise\\"}),An=function(t,n){return arguments.length<2?Tt(wt[t])||Tt(f[t]):wt[t]&&wt[t][n]||f[t]&&f[t][n]}(\\"Promise\\"),s&&An&&!An[Mt]&&(0,F.f)(An,Mt,{configurable:!0,get:function(){return this}}),kn=wt.Promise,bt({target:\\"Promise\\",stat:!0,forced:$n},{reject:function(t){var n=Jn(this);return n.reject.call(void 0,t),n.promise}}),bt({target:\\"Promise\\",stat:!0,forced:$n},{resolve:function(t){return Ln(this,t)}}),bt({target:\\"Promise\\",stat:!0,forced:te},{all:function(t){var n=this,e=Jn(n),r=e.resolve,o=e.reject,i=Nn(function(){var e=kt(n.resolve),i=[],c=0,u=1;zt(t,function(t){var f=c++,a=!1;i.push(void 0),u++,e.call(n,t).then(function(t){a||(a=!0,i[f]=t,--u||r(i))},o)}),--u||r(i)});return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=Jn(n),r=e.reject,o=Nn(function(){var o=kt(n.resolve);zt(t,function(t){o.call(n,t).then(e.resolve,r)})});return o.error&&r(o.value),e.promise}}),t.MyClass=class{constructor(){!function(t,n,e){n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}(this,\\"myFields\\",[\\"foo\\",\\"bar\\"])}foo(){try{return this.myFields.find(t=>\\"bar\\"===t)}catch(t){return Promise.reject(t)}}}}); +"!function(e,s){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?s(exports,require(\\"core-js/modules/es.promise\\")):\\"function\\"==typeof define&&define.amd?define([\\"exports\\",\\"core-js/modules/es.promise\\"],s):s((e=e||self).customBabelrc={})}(this,function(e){e.MyClass=class{constructor(){var e;e=[\\"foo\\",\\"bar\\"],\\"myFields\\"in this?Object.defineProperty(this,\\"myFields\\",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.myFields=e}foo(){try{return this.myFields.find(e=>\\"bar\\"===e)}catch(e){return Promise.reject(e)}}}}); //# sourceMappingURL=custom-babelrc.umd.js.map " `; @@ -1300,8 +1300,8 @@ jsx Build \\"jsx\\" to dist: 262 B: jsx.js.gz 209 B: jsx.js.br -261 B: jsx.mjs.gz -208 B: jsx.mjs.br +263 B: jsx.mjs.gz +212 B: jsx.mjs.br 335 B: jsx.umd.js.gz 278 B: jsx.umd.js.br" `; @@ -1315,7 +1315,7 @@ exports[`fixtures build jsx with microbundle 3`] = ` `; exports[`fixtures build jsx with microbundle 4`] = ` -"var n=function(n,r){for(var e=arguments.length,t=new Array(e>2?e-2:0),l=2;l2?e-2:0),l=2;l