Skip to content

Commit

Permalink
chore(web): Use attw args instead of custom output parsing (redwoodjs…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jul 14, 2024
1 parent d7a0a6a commit 81769b9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/web/attw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ interface Problem {
resolutionKind?: string
}

await $({ nothrow: true })`yarn attw -P -f json > .attw.json`
await $({
nothrow: true,
})`yarn attw -P --exclude-entrypoints webpackEntry forceEsmApollo -f json > .attw.json`
const output = await $`cat .attw.json`
await $`rm .attw.json`

Expand All @@ -19,13 +21,10 @@ if (!json.analysis.problems || json.analysis.problems.length === 0) {

if (
json.analysis.problems.every(
(problem: Problem) =>
problem.resolutionKind === 'node10' ||
problem.entrypoint === './webpackEntry' ||
problem.entrypoint === './forceEsmApollo',
(problem: Problem) => problem.resolutionKind === 'node10',
)
) {
console.log("Only found problems we don't care about")
console.log("Only found node10 problems, which we don't care about")
process.exit(0)
}

Expand Down

0 comments on commit 81769b9

Please sign in to comment.