You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var__extends=this&&this.t||function(){varextendStatics=function(t,i){extendStatics=Object.setPrototypeOf||{__proto__: []}instanceofArray&&function(t,i){t.__proto__=i;}||function(t,i){for(varnini)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n];};returnextendStatics(t,i);};returnfunction(t,i){if(typeofi!=="function"&&i!==null)thrownewTypeError("Class extends value "+String(i)+" is not a constructor or null");extendStatics(t,i);function__(){this.constructor=t;}t.prototype=i===null ? Object.create(i) : (__.prototype=i.prototype,new__);};}();import{Base}from"../ContainerBase";varQueue=function(t){__extends(Queue,t);functionQueue(i){if(i===void0){i=[];}varn=t.call(this)||this;n.A=0;n.tt=[];vare=n;i.forEach((function(t){e.push(t);}));returnn;}Queue.prototype.clear=function(){this.tt=[];this.M=this.A=0;};Queue.prototype.push=function(t){vari=this.tt.length;if(this.A/i>.5&&this.A+this.M>=i&&i>4096){varn=this.M;for(vare=0;e<n;++e){this.tt[e]=this.tt[this.A+e];}this.A=0;this.tt[this.M]=t;}elsethis.tt[this.A+this.M]=t;return++this.M;};Queue.prototype.pop=function(){if(this.M===0)return;vart=this.tt[this.A++];this.M-=1;returnt;};Queue.prototype.front=function(){if(this.M===0)return;returnthis.tt[this.A];};returnQueue;}(Base);exportdefaultQueue;//# sourceMappingURL=Queue.js.map
All modern browsers support much higher than es5 though - esp if they truly support ESM.
For example every modern browser supports es6 classes https://caniuse.com/es6-class
Why not just leave it to the user to downlevel your code for their target environment? It's going to be very, very rare that anyone is going to consume your package on the web without passing it through a bundler first.
The issue is that anyone consuming your package from nodejs is stuck using your downleveled code if they import your package via ESM - which is a really backwards experience!
All modern browsers support much higher than es5 though - esp if they truly support ESM. For example every modern browser supports es6 classes https://caniuse.com/es6-class
Why not just leave it to the user to downlevel your code for their target environment? It's going to be very, very rare that anyone is going to consume your package on the web without passing it through a bundler first.
The issue is that anyone consuming your package from nodejs is stuck using your downleveled code if they import your package via ESM - which is a really backwards experience!
Sounds good, we might change the building target of ESM to ES6 at version 5.0.
See files published on NPM:
ESM: https://unpkg.com/browse/js-sdsl@4.3.0/dist/esm/container/OtherContainer/Queue.js
ESM Build Source
CJS: https://unpkg.com/browse/js-sdsl@4.3.0/dist/cjs/container/OtherContainer/Queue.js
CJS Build Source
If I had to guess it's because the ESM build is set to target ES5:
js-sdsl/gulpfile.ts
Lines 27 to 37 in 28fe66c
Whereas the CJS build does not:
js-sdsl/gulpfile.ts
Lines 12 to 21 in 28fe66c
The text was updated successfully, but these errors were encountered: