Skip to content

Commit

Permalink
Merge pull request #31 from siddhsuresh/siddhsuresh-patch-28
Browse files Browse the repository at this point in the history
Update upgrade-legacy.ts
  • Loading branch information
siddhsuresh authored Sep 7, 2022
2 parents fea4827 + f15e7a9 commit aaf830b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/codemod/src/upgrade-legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const upgradeLegacy = async () => {
})
fs.writeFileSync(path.resolve(appDir, filename), program.toSource())
} catch (e) {
log.error(`Error updating imports in ${file}`)
log.error(`Error updating imports in the ${file}`)
throw new Error(e)
}
})
Expand Down Expand Up @@ -399,7 +399,7 @@ const upgradeLegacy = async () => {

fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
} catch (e) {
log.error(`Error in updating next.js default imports in ${file}`)
log.error(`Error in updating next.js default imports in the ${file}`)
throw new Error(e)
}
})
Expand Down Expand Up @@ -431,7 +431,7 @@ const upgradeLegacy = async () => {

fs.writeFileSync(path.resolve(appDir, file), program.toSource())
} catch (e) {
log.error(`Error in changing queryClient to getQueryClient in ${file}`)
log.error(`Error in changing queryClient to getQueryClient in the ${file}`)
throw new Error(e)
}
})
Expand All @@ -451,7 +451,7 @@ const upgradeLegacy = async () => {

fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
} catch (e) {
log.error(`Error in changing BlitzApiRequest to NextApiRequest in ${file}`)
log.error(`Error in changing BlitzApiRequest to NextApiRequest in the ${file}`)
throw new Error(e)
}
},
Expand All @@ -472,7 +472,7 @@ const upgradeLegacy = async () => {

fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
} catch (e) {
log.error(`Error in changing BlitzApiResponse to NextApiResponse in ${file}`)
log.error(`Error in changing BlitzApiResponse to NextApiResponse in the ${file}`)
throw new Error(e)
}
},
Expand All @@ -493,7 +493,7 @@ const upgradeLegacy = async () => {

fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
} catch (e) {
log.error(`Error in changing BlitzApiHandler to NextApiHandler in ${file}`)
log.error(`Error in changing BlitzApiHandler to NextApiHandler in the ${file}`)
throw new Error(e)
}
},
Expand Down Expand Up @@ -956,7 +956,7 @@ const upgradeLegacy = async () => {
fs.writeFileSync(filepath, program.toSource())
}
} catch (e) {
log.error(`Error in changing useRouterQuery to useRouter in ${file}`)
log.error(`Error in changing useRouterQuery to useRouter in the ${file}`)
throw new Error(e)
}
})
Expand Down Expand Up @@ -1020,7 +1020,7 @@ const upgradeLegacy = async () => {
fs.writeFileSync(filepath, program.toSource())
}
} catch (e) {
log.error(`Error in changing useRouterQuery to useRouter in ${file}`)
log.error(`Error in changing useRouterQuery to useRouter in the ${file}`)
throw new Error(e)
}
})
Expand Down Expand Up @@ -1180,7 +1180,7 @@ const upgradeLegacy = async () => {
}
fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
} catch (e) {
log.error(`Error in wrapping getServerSideProps, getStaticProps in ${file}`)
log.error(`Error in wrapping getServerSideProps, getStaticProps in the ${file}`)
throw new Error(e)
}
})
Expand Down Expand Up @@ -1210,7 +1210,7 @@ const upgradeLegacy = async () => {
fs.writeFileSync(path.join(path.resolve(file)), program.toSource())
}
} catch (e) {
log.error(`Error in wrapping api in ${file}`)
log.error(`Error in wrapping api in the ${file}`)
throw new Error(e)
}
})
Expand Down

0 comments on commit aaf830b

Please sign in to comment.