File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed
babel-plugin-react-compiler/src/Entrypoint Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 77
88import * as t from '@babel/types' ;
99import { z } from 'zod/v4' ;
10- import {
11- CompilerError ,
12- CompilerErrorDetailOptions ,
13- } from '../CompilerError' ;
10+ import { CompilerError , CompilerErrorDetailOptions } from '../CompilerError' ;
1411import {
1512 EnvironmentConfig ,
1613 ExternalFunction ,
@@ -260,7 +257,11 @@ export type CompileErrorDetail = {
260257 description : string | null ;
261258 severity : string ;
262259 suggestions : Array < unknown > | null ;
263- details ?: Array < { kind : string ; loc : t . SourceLocation | null ; message : string | null } > ;
260+ details ?: Array < {
261+ kind : string ;
262+ loc : t . SourceLocation | null ;
263+ message : string | null ;
264+ } > ;
264265 loc ?: t . SourceLocation | null ;
265266} ;
266267export type CompileErrorEvent = {
Original file line number Diff line number Diff line change @@ -189,8 +189,7 @@ export function formatDetailForLogging(
189189 suggestions : detail . suggestions ?? null ,
190190 details : detail . options . details . map ( d => {
191191 if ( d . kind === 'error' ) {
192- const loc =
193- d . loc != null && typeof d . loc !== 'symbol' ? d . loc : null ;
192+ const loc = d . loc != null && typeof d . loc !== 'symbol' ? d . loc : null ;
194193 return { kind : d . kind , loc, message : d . message } ;
195194 } else {
196195 return { kind : d . kind , loc : null , message : d . message } ;
@@ -199,9 +198,7 @@ export function formatDetailForLogging(
199198 } ;
200199 } else {
201200 const loc =
202- detail . loc != null && typeof detail . loc !== 'symbol'
203- ? detail . loc
204- : null ;
201+ detail . loc != null && typeof detail . loc !== 'symbol' ? detail . loc : null ;
205202 return {
206203 category : detail . category ,
207204 reason : detail . reason ,
Original file line number Diff line number Diff line change @@ -221,7 +221,10 @@ export function buildRust(): boolean {
221221 try {
222222 fs . copyFileSync ( sourcePath , destPath ) ;
223223 } catch ( e ) {
224- console . error ( `Failed to copy native module (${ sourcePath } -> ${ destPath } ):` , e ) ;
224+ console . error (
225+ `Failed to copy native module (${ sourcePath } -> ${ destPath } ):` ,
226+ e ,
227+ ) ;
225228 return false ;
226229 }
227230
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ const originalConsoleError = console.error;
3434// contains ~1250 files. This assumes that no dependencies have global caches
3535// that may need to be invalidated across Forget reloads.
3636const invalidationSubpath = 'packages/babel-plugin-react-compiler/dist' ;
37- const rustInvalidationSubpath = 'packages/babel-plugin-react-compiler-rust/dist' ;
37+ const rustInvalidationSubpath =
38+ 'packages/babel-plugin-react-compiler-rust/dist' ;
3839let version : number | null = null ;
3940export function clearRequireCache ( ) {
4041 Object . keys ( require . cache ) . forEach ( function ( path ) {
You can’t perform that action at this time.
0 commit comments