diff --git a/package.json b/package.json index 6d9b3ca44c..2debc41390 100644 --- a/package.json +++ b/package.json @@ -236,7 +236,7 @@ "tree-kill": "1.2.2", "tsec": "0.2.1", "turbo": "2.0.6-canary.0", - "typescript": "5.4.5", + "typescript": "5.5.2", "unfetch": "4.2.0", "wait-port": "0.2.2", "webpack": "5.90.0", diff --git a/packages/next/index.d.ts b/packages/next/index.d.ts index b22c8cd86b..8e7cf5d71b 100644 --- a/packages/next/index.d.ts +++ b/packages/next/index.d.ts @@ -1,4 +1,5 @@ /// +/// /// /// /// diff --git a/packages/next/package.json b/packages/next/package.json index c893abbccd..5c58c8d94a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -321,7 +321,7 @@ "util": "0.12.4", "vm-browserify": "1.1.2", "watchpack": "2.4.0", - "web-vitals": "3.0.0", + "web-vitals": "4.2.1", "webpack": "5.90.0", "webpack-sources1": "npm:webpack-sources@1.4.3", "webpack-sources3": "npm:webpack-sources@3.2.3", diff --git a/packages/next/src/compiled/web-vitals-attribution/web-vitals.attribution.js b/packages/next/src/compiled/web-vitals-attribution/web-vitals.attribution.js index 9aa0d5afd6..cf04311624 100644 --- a/packages/next/src/compiled/web-vitals-attribution/web-vitals.attribution.js +++ b/packages/next/src/compiled/web-vitals-attribution/web-vitals.attribution.js @@ -1 +1 @@ -(function(){"use strict";var t={};!function(){t.d=function(g,b){for(var C in b){if(t.o(b,C)&&!t.o(g,C)){Object.defineProperty(g,C,{enumerable:true,get:b[C]})}}}}();!function(){t.o=function(t,g){return Object.prototype.hasOwnProperty.call(t,g)}}();!function(){t.r=function(t){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}}();if(typeof t!=="undefined")t.ab=__dirname+"/";var g={};t.r(g);t.d(g,{onCLS:function(){return w},onFCP:function(){return L},onFID:function(){return D},onINP:function(){return J},onLCP:function(){return Q},onTTFB:function(){return Y}});var b,C,F,P,A,a=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},o=function(t){if("loading"===document.readyState)return"loading";var g=a();if(g){if(t(g||100)-1)return b||F;if(b=b?F+">"+b:F,C.id)break;t=C.parentNode}}catch(t){}return b},N=-1,f=function(){return N},l=function(t){addEventListener("pageshow",(function(g){g.persisted&&(N=g.timeStamp,t(g))}),!0)},d=function(){var t=a();return t&&t.activationStart||0},m=function(t,g){var b=a(),C="navigate";return f()>=0?C="back-forward-cache":b&&(C=document.prerendering||d()>0?"prerender":b.type.replace(/_/g,"-")),{name:t,value:void 0===g?-1:g,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:C}},v=function(t,g,b){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var C=new PerformanceObserver((function(t){g(t.getEntries())}));return C.observe(Object.assign({type:t,buffered:!0},b||{})),C}}catch(t){}},p=function(t,g){var b=function n(b){"pagehide"!==b.type&&"hidden"!==document.visibilityState||(t(b),g&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",b,!0),addEventListener("pagehide",b,!0)},h=function(t,g,b,C){var F,P;return function(A){g.value>=0&&(A||C)&&((P=g.value-(F||0))||void 0===F)&&(F=g.value,g.delta=P,g.rating=function(t,g){return t>g[1]?"poor":t>g[0]?"needs-improvement":"good"}(g.value,b),t(g))}},q=-1,T=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(){p((function(t){var g=t.timeStamp;q=g}),!0)},E=function(){return q<0&&(q=T(),y(),l((function(){setTimeout((function(){q=T(),y()}),0)}))),{get firstHiddenTime(){return q}}},S=function(t,g){g=g||{};var b,C=[1800,3e3],F=E(),P=m("FCP"),o=function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(N&&N.disconnect(),t.startTime-1&&t(g)},F=m("CLS",0),P=0,A=[],c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var g=A[0],b=A[A.length-1];P&&t.startTime-b.startTime<1e3&&t.startTime-g.startTime<5e3?(P+=t.value,A.push(t)):(P=t.value,A=[t]),P>F.value&&(F.value=P,F.entries=A,C())}}))},N=v("layout-shift",c);N&&(C=h(i,F,b,g.reportAllChanges),p((function(){c(N.takeRecords()),C(!0)})),l((function(){P=0,_=-1,F=m("CLS",0),C=h(i,F,b,g.reportAllChanges)})))}((function(g){!function(t){if(t.entries.length){var g=t.entries.reduce((function(t,g){return t&&t.value>g.value?t:g}));if(g&&g.sources&&g.sources.length){var b=(C=g.sources).find((function(t){return t.node&&1===t.node.nodeType}))||C[0];b&&(t.attribution={largestShiftTarget:c(b.node),largestShiftTime:g.startTime,largestShiftValue:g.value,largestShiftSource:b,largestShiftEntry:g,loadState:o(g.startTime)})}}else t.attribution={};var C}(g),t(g)}),g)},L=function(t,g){S((function(g){!function(t){if(t.entries.length){var g=a(),b=t.entries[t.entries.length-1];if(g){var C=g.activationStart||0,F=Math.max(0,g.responseStart-C);t.attribution={timeToFirstByte:F,firstByteToFCP:t.value-F,loadState:o(t.entries[0].startTime),navigationEntry:g,fcpEntry:b}}}else t.attribution={timeToFirstByte:0,firstByteToFCP:t.value,loadState:o(f())}}(g),t(g)}),g)},V={passive:!0,capture:!0},K=new Date,M=function(t,g){b||(b=g,C=t,F=new Date,I(removeEventListener),B())},B=function(){if(C>=0&&C1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,g){var n=function(){M(t,g),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,V),removeEventListener("pointercancel",r,V)};addEventListener("pointerup",n,V),addEventListener("pointercancel",r,V)}(g,t):M(g,t)}},I=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(g){return t(g,x,V)}))},k=function(t,g){g=g||{};var F,A=[100,300],N=E(),q=m("FID"),s=function(t){t.startTimeg.latency){if(b)b.entries.push(t),b.latency=Math.max(b.latency,t.duration);else{var C={id:t.interactionId,latency:t.duration,entries:[t]};ne[C.id]=C,te.push(C)}te.sort((function(t,g){return g.latency-t.latency})),te.splice(10).forEach((function(t){delete ne[t.id]}))}},G=function(t,g){g=g||{};var b=[200,500];O();var C,F=m("INP"),a=function(t){t.forEach((function(t){(t.interactionId&&z(t),"first-input"===t.entryType)&&(!te.some((function(g){return g.entries.some((function(g){return t.duration===g.duration&&t.startTime===g.startTime}))}))&&z(t))}));var g,b=(g=Math.min(te.length-1,Math.floor(U()/50)),te[g]);b&&b.latency!==F.value&&(F.value=b.latency,F.entries=b.entries,C())},P=v("event",a,{durationThreshold:g.durationThreshold||40});C=h(t,F,b,g.reportAllChanges),P&&(P.observe({type:"first-input",buffered:!0}),p((function(){a(P.takeRecords()),F.value<0&&U()>0&&(F.value=0,F.entries=[]),C(!0)})),l((function(){te=[],ee=H(),F=m("INP"),C=h(t,F,b,g.reportAllChanges)})))},J=function(t,g){G((function(g){!function(t){if(t.entries.length){var g=t.entries.sort((function(t,g){return g.duration-t.duration||g.processingEnd-g.processingStart-(t.processingEnd-t.processingStart)}))[0];t.attribution={eventTarget:c(g.target),eventType:g.name,eventTime:g.startTime,eventEntry:g,loadState:o(g.startTime)}}else t.attribution={}}(g),t(g)}),g)},re={},Q=function(t,g){!function(t,g){g=g||{};var b,C=[2500,4e3],F=E(),P=m("LCP"),o=function(t){var g=t[t.length-1];if(g){var C=g.startTime-d();Cperformance.now())return;C.entries=[P],F(!0),l((function(){C=m("TTFB",0),(F=h(t,C,b,g.reportAllChanges))(!0)}))}}))},Y=function(t,g){X((function(g){!function(t){if(t.entries.length){var g=t.entries[0],b=g.activationStart||0,C=Math.max(g.domainLookupStart-b,0),F=Math.max(g.connectStart-b,0),P=Math.max(g.requestStart-b,0);t.attribution={waitingTime:C,dnsTime:F-C,connectionTime:P-F,requestTime:t.value-P,navigationEntry:g}}else t.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(g),t(g)}),g)};module.exports=g})(); \ No newline at end of file +(function(){"use strict";var e={};!function(){e.d=function(c,h){for(var C in h){if(e.o(h,C)&&!e.o(c,C)){Object.defineProperty(c,C,{enumerable:true,get:h[C]})}}}}();!function(){e.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)}}();!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();if(typeof e!=="undefined")e.ab=__dirname+"/";var c={};e.r(c);e.d(c,{CLSThresholds:function(){return O},FCPThresholds:function(){return A},FIDThresholds:function(){return bt},INPThresholds:function(){return G},LCPThresholds:function(){return ft},TTFBThresholds:function(){return gt},onCLS:function(){return w},onFCP:function(){return x},onFID:function(){return Tt},onINP:function(){return nt},onLCP:function(){return at},onTTFB:function(){return st}});var h,C,D,r=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart(c||100)-1)return h||D;if(h=h?D+">"+h:D,C.id)break;e=C.parentNode}}catch(e){}return h},I=-1,u=function(){return I},s=function(e){addEventListener("pageshow",(function(c){c.persisted&&(I=c.timeStamp,e(c))}),!0)},f=function(){var e=r();return e&&e.activationStart||0},d=function(e,c){var h=r(),C="navigate";u()>=0?C="back-forward-cache":h&&(document.prerendering||f()>0?C="prerender":document.wasDiscarded?C="restore":h.type&&(C=h.type.replace(/_/g,"-")));return{name:e,value:void 0===c?-1:c,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:C}},l=function(e,c,h){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var C=new PerformanceObserver((function(e){Promise.resolve().then((function(){c(e.getEntries())}))}));return C.observe(Object.assign({type:e,buffered:!0},h||{})),C}}catch(e){}},m=function(e,c,h,C){var D,I;return function(k){c.value>=0&&(k||C)&&((I=c.value-(D||0))||void 0===D)&&(D=c.value,c.delta=I,c.rating=function(e,c){return e>c[1]?"poor":e>c[0]?"needs-improvement":"good"}(c.value,h),e(c))}},p=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},v=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},g=function(e){var c=!1;return function(){c||(e(),c=!0)}},k=-1,T=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(e){"hidden"===document.visibilityState&&k>-1&&(k="visibilitychange"===e.type?e.timeStamp:0,S())},E=function(){addEventListener("visibilitychange",y,!0),addEventListener("prerenderingchange",y,!0)},S=function(){removeEventListener("visibilitychange",y,!0),removeEventListener("prerenderingchange",y,!0)},b=function(){return k<0&&(k=T(),E(),s((function(){setTimeout((function(){k=T(),E()}),0)}))),{get firstHiddenTime(){return k}}},L=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},A=[1800,3e3],M=function(e,c){c=c||{},L((function(){var h,C=b(),D=d("FCP"),I=l("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(I.disconnect(),e.startTimeC.value&&(C.value=D,C.entries=I,h())},k=l("layout-shift",o);k&&(h=m(e,C,O,c.reportAllChanges),v((function(){o(k.takeRecords()),h(!0)})),s((function(){D=0,C=d("CLS",0),h=m(e,C,O,c.reportAllChanges),p((function(){return h()}))})),setTimeout(h,0))})))}((function(c){var h=function(e){var c,h={};if(e.entries.length){var C=e.entries.reduce((function(e,c){return e&&e.value>c.value?e:c}));if(C&&C.sources&&C.sources.length){var D=(c=C.sources).find((function(e){return e.node&&1===e.node.nodeType}))||c[0];D&&(h={largestShiftTarget:o(D.node),largestShiftTime:C.startTime,largestShiftValue:C.value,largestShiftSource:D,largestShiftEntry:C,loadState:i(C.startTime)})}}return Object.assign(e,{attribution:h})}(c);e(h)}),c)},x=function(e,c){M((function(c){var h=function(e){var c={timeToFirstByte:0,firstByteToFCP:e.value,loadState:i(u())};if(e.entries.length){var h=r(),C=e.entries[e.entries.length-1];if(h){var D=h.activationStart||0,I=Math.max(0,h.responseStart-D);c={timeToFirstByte:I,firstByteToFCP:e.value-I,loadState:i(e.entries[0].startTime),navigationEntry:h,fcpEntry:C}}}return Object.assign(e,{attribution:c})}(c);e(h)}),c)},B=0,R=1/0,q=0,F=function(e){e.forEach((function(e){e.interactionId&&(R=Math.min(R,e.interactionId),q=Math.max(q,e.interactionId),B=q?(q-R)/7+1:0)}))},P=function(){"interactionCount"in performance||h||(h=l("event",F,{type:"event",buffered:!0,durationThreshold:0}))},_=[],W=new Map,U=0,j=function(){return(h?B:performance.interactionCount||0)-U},V=[],H=function(e){if(V.forEach((function(c){return c(e)})),e.interactionId||"first-input"===e.entryType){var c=_[_.length-1],h=W.get(e.interactionId);if(h||_.length<10||e.duration>c.latency){if(h)e.duration>h.latency?(h.entries=[e],h.latency=e.duration):e.duration===h.latency&&e.startTime===h.entries[0].startTime&&h.entries.push(e);else{var C={id:e.interactionId,latency:e.duration,entries:[e]};W.set(C.id,C),_.push(C)}_.sort((function(e,c){return c.latency-e.latency})),_.length>10&&_.splice(10).forEach((function(e){return W.delete(e.id)}))}}},N=function(e){var c=self.requestIdleCallback||self.setTimeout,h=-1;return e=g(e),"hidden"===document.visibilityState?e():(h=c(e),v(e)),h},G=[200,500],z=function(e,c){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(c=c||{},L((function(){var h;P();var C,D=d("INP"),a=function(e){N((function(){e.forEach(H);var c,h=(c=Math.min(_.length-1,Math.floor(j()/50)),_[c]);h&&h.latency!==D.value&&(D.value=h.latency,D.entries=h.entries,C())}))},I=l("event",a,{durationThreshold:null!==(h=c.durationThreshold)&&void 0!==h?h:40});C=m(e,D,G,c.reportAllChanges),I&&(I.observe({type:"first-input",buffered:!0}),v((function(){a(I.takeRecords()),C(!0)})),s((function(){U=0,_.length=0,W.clear(),D=d("INP"),C=m(e,D,G,c.reportAllChanges)})))})))},J=[],Y=[],Z=new WeakMap,$=new Map,tt=-1,K=function(e){J=J.concat(e),Q()},Q=function(){tt<0&&(tt=N(X))},X=function(){$.size>10&&$.forEach((function(e,c){W.has(c)||$.delete(c)}));var e=_.map((function(e){return Z.get(e.entries[0])})),c=Y.length-50;Y=Y.filter((function(h,C){return C>=c||e.includes(h)}));for(var h=new Set,C=0;C=0;C--){var I=Y[C];if(Math.abs(h-I.renderTime)<=8){(c=I).startTime=Math.min(e.startTime,c.startTime),c.processingStart=Math.min(e.processingStart,c.processingStart),c.processingEnd=Math.max(e.processingEnd,c.processingEnd),c.entries.push(e);break}}c||(c={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:h,entries:[e]},Y.push(c)),(e.interactionId||"first-input"===e.entryType)&&Z.set(e,c),Q()}));var rt,it,ot,ct,et=function(e,c){for(var h,C=[],D=0;h=J[D];D++)if(!(h.startTime+h.durationc)break;C.push(h)}return C},nt=function(e,c){C||(C=l("long-animation-frame",K)),z((function(c){var h=function(e){var c=e.entries[0],h=Z.get(c),C=c.processingStart,D=h.processingEnd,I=h.entries.sort((function(e,c){return e.processingStart-c.processingStart})),k=et(c.startTime,D),A=e.entries.find((function(e){return e.target})),O=A&&A.target||$.get(c.interactionId),B=[c.startTime+c.duration,D].concat(k.map((function(e){return e.startTime+e.duration}))),R=Math.max.apply(Math,B),q={interactionTarget:o(O),interactionTargetElement:O,interactionType:c.name.startsWith("key")?"keyboard":"pointer",interactionTime:c.startTime,nextPaintTime:R,processedEventEntries:I,longAnimationFrameEntries:k,inputDelay:C-c.startTime,processingDuration:D-C,presentationDelay:Math.max(R-D,0),loadState:i(c.startTime)};return Object.assign(e,{attribution:q})}(c);e(h)}),c)},ft=[2500,4e3],dt={},at=function(e,c){!function(e,c){c=c||{},L((function(){var h,C=b(),D=d("LCP"),a=function(e){c.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime=0&&it1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,c){var n=function(){lt(e,c),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,St),removeEventListener("pointercancel",r,St)};addEventListener("pointerup",n,St),addEventListener("pointercancel",r,St)}(c,e):lt(c,e)}},vt=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(c){return e(c,pt,St)}))},bt=[100,300],ht=function(e,c){c=c||{},L((function(){var h,C=b(),D=d("FID"),a=function(e){e.startTime=0?C="back-forward-cache":T&&(C=document.prerendering||u()>0?"prerender":T.type.replace(/_/g,"-")),{name:n,value:void 0===y?-1:y,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:C}},s=function(n,y,T){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var C=new PerformanceObserver((function(n){y(n.getEntries())}));return C.observe(Object.assign({type:n,buffered:!0},T||{})),C}}catch(n){}},d=function(n,y){var T=function t(T){"pagehide"!==T.type&&"hidden"!==document.visibilityState||(n(T),y&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",T,!0),addEventListener("pagehide",T,!0)},l=function(n,y,T,C){var w,P;return function(I){y.value>=0&&(I||C)&&((P=y.value-(w||0))||void 0===w)&&(w=y.value,y.delta=P,y.rating=function(n,y){return n>y[1]?"poor":n>y[0]?"needs-improvement":"good"}(y.value,T),n(y))}},N=-1,v=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},m=function(){d((function(n){var y=n.timeStamp;N=y}),!0)},h=function(){return N<0&&(N=v(),m(),o((function(){setTimeout((function(){N=v(),m()}),0)}))),{get firstHiddenTime(){return N}}},g=function(n,y){y=y||{};var T,C=[1800,3e3],w=h(),P=f("FCP"),c=function(n){n.forEach((function(n){"first-contentful-paint"===n.name&&(k&&k.disconnect(),n.startTime-1&&n(y)},w=f("CLS",0),P=0,I=[],p=function(n){n.forEach((function(n){if(!n.hadRecentInput){var y=I[0],T=I[I.length-1];P&&n.startTime-T.startTime<1e3&&n.startTime-y.startTime<5e3?(P+=n.value,I.push(n)):(P=n.value,I=[n]),P>w.value&&(w.value=P,w.entries=I,C())}}))},k=s("layout-shift",p);k&&(C=l(i,w,T,y.reportAllChanges),d((function(){p(k.takeRecords()),C(!0)})),o((function(){P=0,q=-1,w=f("CLS",0),C=l(i,w,T,y.reportAllChanges)})))},x={passive:!0,capture:!0},z=new Date,L=function(n,y){T||(T=y,C=n,w=new Date,A(removeEventListener),S())},S=function(){if(C>=0&&C1e12?new Date:performance.now())-n.timeStamp;"pointerdown"==n.type?function(n,y){var t=function(){L(n,y),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,x),removeEventListener("pointercancel",r,x)};addEventListener("pointerup",t,x),addEventListener("pointercancel",r,x)}(y,n):L(y,n)}},A=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(y){return n(y,b,x)}))},F=function(n,y){y=y||{};var w,I=[100,300],k=h(),N=f("FID"),v=function(n){n.startTimey.latency){if(T)T.entries.push(n),T.latency=Math.max(T.latency,n.duration);else{var C={id:n.interactionId,latency:n.duration,entries:[n]};W[C.id]=C,V.push(C)}V.sort((function(n,y){return y.latency-n.latency})),V.splice(10).forEach((function(n){delete W[n.id]}))}},O=function(n,y){y=y||{};var T=[200,500];D();var C,w=f("INP"),a=function(n){n.forEach((function(n){(n.interactionId&&H(n),"first-input"===n.entryType)&&(!V.some((function(y){return y.entries.some((function(y){return n.duration===y.duration&&n.startTime===y.startTime}))}))&&H(n))}));var y,T=(y=Math.min(V.length-1,Math.floor(R()/50)),V[y]);T&&T.latency!==w.value&&(w.value=T.latency,w.entries=T.entries,C())},P=s("event",a,{durationThreshold:y.durationThreshold||40});C=l(n,w,T,y.reportAllChanges),P&&(P.observe({type:"first-input",buffered:!0}),d((function(){a(P.takeRecords()),w.value<0&&R()>0&&(w.value=0,w.entries=[]),C(!0)})),o((function(){V=[],U=B(),w=f("INP"),C=l(n,w,T,y.reportAllChanges)})))},X={},_=function(n,y){y=y||{};var T,C=[2500,4e3],w=h(),P=f("LCP"),c=function(n){var y=n[n.length-1];if(y){var C=y.startTime-u();Cperformance.now())return;C.entries=[P],w(!0),o((function(){C=f("TTFB",0),(w=l(n,C,T,y.reportAllChanges))(!0)}))}}))};module.exports=y})(); \ No newline at end of file +(function(){"use strict";var n={};!function(){n.d=function(b,L){for(var P in L){if(n.o(L,P)&&!n.o(b,P)){Object.defineProperty(b,P,{enumerable:true,get:L[P]})}}}}();!function(){n.o=function(n,b){return Object.prototype.hasOwnProperty.call(n,b)}}();!function(){n.r=function(n){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(n,"__esModule",{value:true})}}();if(typeof n!=="undefined")n.ab=__dirname+"/";var b={};n.r(b);n.d(b,{CLSThresholds:function(){return j},FCPThresholds:function(){return B},FIDThresholds:function(){return cn},INPThresholds:function(){return nn},LCPThresholds:function(){return en},TTFBThresholds:function(){return rn},onCLS:function(){return w},onFCP:function(){return S},onFID:function(){return $},onINP:function(){return N},onLCP:function(){return z},onTTFB:function(){return K}});var L,P,I,A,F,D=-1,a=function(n){addEventListener("pageshow",(function(b){b.persisted&&(D=b.timeStamp,n(b))}),!0)},c=function(){var n=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(n&&n.responseStart>0&&n.responseStart=0?P="back-forward-cache":L&&(document.prerendering||u()>0?P="prerender":document.wasDiscarded?P="restore":L.type&&(P=L.type.replace(/_/g,"-")));return{name:n,value:void 0===b?-1:b,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:P}},s=function(n,b,L){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var P=new PerformanceObserver((function(n){Promise.resolve().then((function(){b(n.getEntries())}))}));return P.observe(Object.assign({type:n,buffered:!0},L||{})),P}}catch(n){}},d=function(n,b,L,P){var I,A;return function(F){b.value>=0&&(F||P)&&((A=b.value-(I||0))||void 0===I)&&(I=b.value,b.delta=A,b.rating=function(n,b){return n>b[1]?"poor":n>b[0]?"needs-improvement":"good"}(b.value,L),n(b))}},l=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},p=function(n){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&n()}))},v=function(n){var b=!1;return function(){b||(n(),b=!0)}},O=-1,h=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},g=function(n){"hidden"===document.visibilityState&&O>-1&&(O="visibilitychange"===n.type?n.timeStamp:0,T())},y=function(){addEventListener("visibilitychange",g,!0),addEventListener("prerenderingchange",g,!0)},T=function(){removeEventListener("visibilitychange",g,!0),removeEventListener("prerenderingchange",g,!0)},E=function(){return O<0&&(O=h(),y(),a((function(){setTimeout((function(){O=h(),y()}),0)}))),{get firstHiddenTime(){return O}}},C=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},B=[1800,3e3],S=function(n,b){b=b||{},C((function(){var L,P=E(),I=f("FCP"),A=s("paint",(function(n){n.forEach((function(n){"first-contentful-paint"===n.name&&(A.disconnect(),n.startTimeP.value&&(P.value=I,P.entries=A,L())},F=s("layout-shift",c);F&&(L=d(n,P,j,b.reportAllChanges),p((function(){c(F.takeRecords()),L(!0)})),a((function(){I=0,P=f("CLS",0),L=d(n,P,j,b.reportAllChanges),l((function(){return L()}))})),setTimeout(L,0))})))},x=0,_=1/0,G=0,M=function(n){n.forEach((function(n){n.interactionId&&(_=Math.min(_,n.interactionId),G=Math.max(G,n.interactionId),x=G?(G-_)/7+1:0)}))},k=function(){"interactionCount"in performance||L||(L=s("event",M,{type:"event",buffered:!0,durationThreshold:0}))},J=[],Q=new Map,U=0,R=function(){return(L?x:performance.interactionCount||0)-U},Z=[],H=function(n){if(Z.forEach((function(b){return b(n)})),n.interactionId||"first-input"===n.entryType){var b=J[J.length-1],L=Q.get(n.interactionId);if(L||J.length<10||n.duration>b.latency){if(L)n.duration>L.latency?(L.entries=[n],L.latency=n.duration):n.duration===L.latency&&n.startTime===L.entries[0].startTime&&L.entries.push(n);else{var P={id:n.interactionId,latency:n.duration,entries:[n]};Q.set(P.id,P),J.push(P)}J.sort((function(n,b){return b.latency-n.latency})),J.length>10&&J.splice(10).forEach((function(n){return Q.delete(n.id)}))}}},q=function(n){var b=self.requestIdleCallback||self.setTimeout,L=-1;return n=v(n),"hidden"===document.visibilityState?n():(L=b(n),p(n)),L},nn=[200,500],N=function(n,b){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(b=b||{},C((function(){var L;k();var P,I=f("INP"),o=function(n){q((function(){n.forEach(H);var b,L=(b=Math.min(J.length-1,Math.floor(R()/50)),J[b]);L&&L.latency!==I.value&&(I.value=L.latency,I.entries=L.entries,P())}))},A=s("event",o,{durationThreshold:null!==(L=b.durationThreshold)&&void 0!==L?L:40});P=d(n,I,nn,b.reportAllChanges),A&&(A.observe({type:"first-input",buffered:!0}),p((function(){o(A.takeRecords()),P(!0)})),a((function(){U=0,J.length=0,Q.clear(),I=f("INP"),P=d(n,I,nn,b.reportAllChanges)})))})))},en=[2500,4e3],tn={},z=function(n,b){b=b||{},C((function(){var L,P=E(),I=f("LCP"),o=function(n){b.reportAllChanges||(n=n.slice(-1)),n.forEach((function(n){n.startTime=0&&I1e12?new Date:performance.now())-n.timeStamp;"pointerdown"==n.type?function(n,b){var t=function(){V(n,b),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,an),removeEventListener("pointercancel",r,an)};addEventListener("pointerup",t,an),addEventListener("pointercancel",r,an)}(b,n):V(b,n)}},Y=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(b){return n(b,X,an)}))},cn=[100,300],$=function(n,b){b=b||{},C((function(){var L,A=E(),D=f("FID"),l=function(n){n.startTime | undefined + let body: BodyInit | ReadableStream | undefined if ( // The type check here ensures that `req` is correctly typed, and the // environment variable check provides dead code elimination. diff --git a/packages/next/src/server/stream-utils/node-web-streams-helper.ts b/packages/next/src/server/stream-utils/node-web-streams-helper.ts index c4d42e7e4c..04fdffe9a0 100644 --- a/packages/next/src/server/stream-utils/node-web-streams-helper.ts +++ b/packages/next/src/server/stream-utils/node-web-streams-helper.ts @@ -87,9 +87,8 @@ export async function streamToBuffer( ): Promise { const buffers: Buffer[] = [] - // @ts-expect-error TypeScript gets this wrong (https://nodejs.org/api/webstreams.html#async-iteration) for await (const chunk of stream) { - buffers.push(chunk) + buffers.push(Buffer.from(chunk)) } return Buffer.concat(buffers) @@ -101,7 +100,6 @@ export async function streamToString( const decoder = new TextDecoder('utf-8', { fatal: true }) let string = '' - // @ts-expect-error TypeScript gets this wrong (https://nodejs.org/api/webstreams.html#async-iteration) for await (const chunk of stream) { string += decoder.decode(chunk, { stream: true }) } diff --git a/packages/next/src/types.ts b/packages/next/src/types.ts index fbb2ffaee7..fcb4c47b73 100644 --- a/packages/next/src/types.ts +++ b/packages/next/src/types.ts @@ -1,8 +1,8 @@ -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// import type { Agent as HttpAgent } from 'http' import type { Agent as HttpsAgent } from 'https' diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 8a5be4adc3..fc5b4f8a7b 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -2589,10 +2589,7 @@ export async function diagnostics(task, opts) { } export async function build(task, opts) { - await task.serial( - ['precompile', 'compile', 'generate_types', 'rewrite_compiled_references'], - opts - ) + await task.serial(['precompile', 'compile', 'generate_types'], opts) } export async function generate_types(task, opts) { @@ -2601,37 +2598,6 @@ export async function generate_types(task, opts) { }) } -/** - * TypeScript will emit references to the compiled types used to type the implementation. - * The declarations however don't need such detailed types. - * We rewrite the references to reference a more lightweight solution instead. - * @param {import('taskr').Task} task - */ -export async function rewrite_compiled_references(task, opts) { - const declarationDirectory = join(__dirname, 'dist') - const declarationFiles = glob.sync('**/*.d.ts', { cwd: declarationDirectory }) - - for (const declarationFile of declarationFiles) { - const content = await fs.readFile( - join(declarationDirectory, declarationFile), - 'utf8' - ) - // Rewrite - // /// - // to - // /// - if (content.indexOf('/types/$$compiled.internal.d.ts" />') !== -1) { - await fs.writeFile( - join(declarationDirectory, declarationFile), - content.replace( - /\/types\/\$\$compiled\.internal\.d\.ts" \/>/g, - '/types/compiled.d.ts" />' - ) - ) - } - } -} - export default async function (task) { const opts = { dev: true } await task.clear('dist') diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json index 5a8c5d9bf6..5484d41954 100644 --- a/packages/next/tsconfig.json +++ b/packages/next/tsconfig.json @@ -2,13 +2,13 @@ "extends": "../../tsconfig-tsec.json", "compilerOptions": { "strict": true, - "module": "esnext", - "target": "ES2017", - "esModuleInterop": true, - "moduleResolution": "node", - "jsx": "react-jsx", "stripInternal": true, - "verbatimModuleSyntax": true + "esModuleInterop": true, + "verbatimModuleSyntax": true, + "jsx": "react-jsx", + "module": "ESNext", + "target": "ES2018", + "moduleResolution": "node" }, "exclude": [ "dist", diff --git a/packages/next/types.d.ts b/packages/next/types.d.ts index 473727365d..ac03eb06da 100644 --- a/packages/next/types.d.ts +++ b/packages/next/types.d.ts @@ -1,9 +1,2 @@ -// Triple slash directives are copied from src/types.ts. -// TypeScript currently does not preserve the tripple-slash directives. -// Once https://github.com/microsoft/TypeScript/pull/57681 is released, we can remove the triple slash directives here. -/// -/// -/// -/// export * from './dist/types' export { default } from './dist/types' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ae5258900..e2064a62aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -187,10 +187,10 @@ importers: version: 2.0.3 '@typescript-eslint/eslint-plugin': specifier: 6.14.0 - version: 6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5) + version: 6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(typescript@5.5.2) '@typescript-eslint/parser': specifier: 6.14.0 - version: 6.14.0(eslint@8.56.0)(typescript@5.4.5) + version: 6.14.0(eslint@8.56.0)(typescript@5.5.2) '@vercel/devlow-bench': specifier: 0.3.1 version: 0.3.1(encoding@0.1.13) @@ -268,10 +268,10 @@ importers: version: 5.2.1(eslint@8.56.0) eslint-plugin-import: specifier: 2.29.1 - version: 2.29.1(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0) + version: 2.29.1(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0) eslint-plugin-jest: specifier: 27.6.3 - version: 27.6.3(@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(jest@29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0))(typescript@5.4.5) + version: 27.6.3(@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(jest@29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0))(typescript@5.5.2) eslint-plugin-jsdoc: specifier: 48.0.4 version: 48.0.4(eslint@8.56.0) @@ -550,13 +550,13 @@ importers: version: 1.2.2 tsec: specifier: 0.2.1 - version: 0.2.1(@bazel/bazelisk@1.19.0)(typescript@5.4.5) + version: 0.2.1(@bazel/bazelisk@1.19.0)(typescript@5.5.2) turbo: specifier: 2.0.6-canary.0 version: 2.0.6-canary.0 typescript: - specifier: 5.4.5 - version: 5.4.5 + specifier: 5.5.2 + version: 5.5.2 unfetch: specifier: 4.2.0 version: 4.2.0 @@ -1459,8 +1459,8 @@ importers: specifier: 2.4.0 version: 2.4.0 web-vitals: - specifier: 3.0.0 - version: 3.0.0 + specifier: 4.2.1 + version: 4.2.1 webpack: specifier: 5.90.0 version: 5.90.0(@swc/core@1.6.6(@swc/helpers@0.5.11)) @@ -14131,8 +14131,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.5.2: + resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==} engines: {node: '>=14.17'} hasBin: true @@ -14566,8 +14566,8 @@ packages: web-namespaces@1.1.4: resolution: {integrity: sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==} - web-vitals@3.0.0: - resolution: {integrity: sha512-3Gh6rH5aetFYqfkl9V59KCvjj9vp9U2Tkaep9MO+xpAVg+JULmQfi5zEkcPLkE6iU8pNYVwdjHvIU8RFAchYyQ==} + web-vitals@4.2.1: + resolution: {integrity: sha512-U6bAxeudnhDqcXNl50JC4hLlqox9DZnngxfISZm3DMZnonW35xtJOVUc091L+DOY+6hVZVpKXoiCP0RiT6339Q==} web-worker@1.3.0: resolution: {integrity: sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==} @@ -19407,13 +19407,13 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.0 - '@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(typescript@5.5.2)': dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.5.2) '@typescript-eslint/scope-manager': 6.14.0 - '@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.4.5) - '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.5.2) + '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.5.2) '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.56.0 @@ -19421,9 +19421,9 @@ snapshots: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.4.5) + ts-api-utils: 1.0.1(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -19447,16 +19447,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2)': dependencies: '@typescript-eslint/scope-manager': 6.14.0 '@typescript-eslint/types': 6.14.0 - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.5.2) '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.56.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -19483,15 +19483,15 @@ snapshots: '@typescript-eslint/types': 6.14.0 '@typescript-eslint/visitor-keys': 6.14.0 - '@typescript-eslint/type-utils@6.14.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@6.14.0(eslint@8.56.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.4.5) - '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.5.2) + '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.5.2) debug: 4.3.4 eslint: 8.56.0 - ts-api-utils: 1.0.1(typescript@5.4.5) + ts-api-utils: 1.0.1(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -19511,7 +19511,7 @@ snapshots: '@typescript-eslint/types@6.14.0': {} - '@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.5.2)': dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 @@ -19519,13 +19519,13 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0(typescript@5.4.5) + tsutils: 3.21.0(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@6.14.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@6.14.0(typescript@5.5.2)': dependencies: '@typescript-eslint/types': 6.14.0 '@typescript-eslint/visitor-keys': 6.14.0 @@ -19533,9 +19533,9 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.2 - ts-api-utils: 1.0.1(typescript@5.4.5) + ts-api-utils: 1.0.1(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -19553,14 +19553,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.5.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.5.2) eslint: 8.56.0 eslint-scope: 5.1.1 semver: 7.3.7 @@ -19568,14 +19568,14 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@6.14.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/utils@6.14.0(eslint@8.56.0)(typescript@5.5.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 6.14.0 '@typescript-eslint/types': 6.14.0 - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.5.2) eslint: 8.56.0 semver: 7.6.2 transitivePeerDependencies: @@ -22520,11 +22520,11 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.5.2) eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -22574,7 +22574,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -22584,7 +22584,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -22595,18 +22595,18 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.5.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@27.6.3(@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(jest@29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0))(typescript@5.4.5): + eslint-plugin-jest@27.6.3(@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(jest@29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0))(typescript@5.5.2): dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.5.2) eslint: 8.56.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 6.14.0(@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.5.2))(eslint@8.56.0)(typescript@5.5.2) jest: 29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0) transitivePeerDependencies: - supports-color @@ -30572,9 +30572,9 @@ snapshots: trough@2.1.0: {} - ts-api-utils@1.0.1(typescript@5.4.5): + ts-api-utils@1.0.1(typescript@5.5.2): dependencies: - typescript: 5.4.5 + typescript: 5.5.2 ts-api-utils@1.0.1(typescript@5.5.3): dependencies: @@ -30596,12 +30596,12 @@ snapshots: minimist: 1.2.6 strip-bom: 3.0.0 - tsec@0.2.1(@bazel/bazelisk@1.19.0)(typescript@5.4.5): + tsec@0.2.1(@bazel/bazelisk@1.19.0)(typescript@5.5.2): dependencies: '@bazel/bazelisk': 1.19.0 glob: 7.1.7 minimatch: 3.1.2 - typescript: 5.4.5 + typescript: 5.5.2 tslib@1.11.1: {} @@ -30617,10 +30617,10 @@ snapshots: tslib@2.6.2: {} - tsutils@3.21.0(typescript@5.4.5): + tsutils@3.21.0(typescript@5.5.2): dependencies: tslib: 1.14.1 - typescript: 5.4.5 + typescript: 5.5.2 tty-browserify@0.0.1: {} @@ -30739,7 +30739,7 @@ snapshots: typescript@4.8.2: {} - typescript@5.4.5: {} + typescript@5.5.2: {} typescript@5.5.3: {} @@ -31227,7 +31227,7 @@ snapshots: web-namespaces@1.1.4: {} - web-vitals@3.0.0: {} + web-vitals@4.2.1: {} web-worker@1.3.0: {} diff --git a/tsconfig.json b/tsconfig.json index faab59228f..bfdaecb8cd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { - "strict": false, "noEmit": true, + "strict": false, "allowJs": true, + "esModuleInterop": true, "resolveJsonModule": true, "jsx": "react-jsx", - "module": "esnext", + "module": "ESNext", "target": "ESNext", - "esModuleInterop": true, "moduleResolution": "node", "types": ["react", "jest", "node", "trusted-types", "jest-extended"], "paths": {