File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed
Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 1414 - name : Checkout the repository
1515 uses : actions/checkout@v4
1616 - name : Install pnpm
17- uses : pnpm/action-setup@v2
17+ uses : pnpm/action-setup@v3
1818 with :
1919 version : 9
2020 - name : Install Node.js
Original file line number Diff line number Diff line change 88
99let jiti
1010
11- let importError
11+ let importError = [ ]
1212
1313/**
1414 * @param {string } name
@@ -28,9 +28,11 @@ async function req(name, rootFile = __filename) {
2828 }
2929
3030 if ( tsx === undefined ) {
31- tsx = await import ( 'tsx/cjs/api' ) . catch ( error => {
32- importError = error
33- } )
31+ try {
32+ tsx = await import ( 'tsx/cjs/api' )
33+ } catch ( error ) {
34+ importError . push ( error )
35+ }
3436 }
3537
3638 if ( tsx ) {
@@ -39,20 +41,21 @@ async function req(name, rootFile = __filename) {
3941 }
4042
4143 if ( jiti === undefined ) {
42- jiti = await import ( 'jiti' ) . then (
43- m => m . default ,
44- error => {
45- importError = importError ?? error
46- }
47- )
44+ try {
45+ jiti = ( await import ( 'jiti' ) ) . default
46+ } catch ( error ) {
47+ importError . push ( error )
48+ }
4849 }
4950
5051 if ( jiti ) {
5152 return jiti ( rootFile , { interopDefault : true } ) ( name )
5253 }
5354
5455 throw new Error (
55- `'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${ importError . message } `
56+ `'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${ importError
57+ . map ( error => error . message )
58+ . join ( '\n' ) } `
5659 )
5760}
5861
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "module" : " Preserve " ,
3+ "module" : " node16 " ,
44 "esModuleInterop" : true ,
55 "allowJs" : true ,
66 "noEmit" : true
You can’t perform that action at this time.
0 commit comments