Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): Use xstate predictableActionArguments & update to 4.34 #36342

Merged
merged 13 commits into from
Nov 17, 2022
Prev Previous commit
Next Next commit
Work around removal of meta.state
  • Loading branch information
tyhopp committed Aug 10, 2022
commit efb5d12320eb66fa82f5b0e81cda49fc6ba3d46e
5 changes: 3 additions & 2 deletions packages/gatsby-source-filesystem/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const createFSMachine = (
}

const log = expr => (ctx, action, meta) => {
if (meta.state.matches(`BOOTSTRAP.BOOTSTRAPPED`)) {
if (machineInstance.state.matches(`BOOTSTRAP.BOOTSTRAPPED`)) {
reporter.info(expr(ctx, action, meta))
}
}
Expand Down Expand Up @@ -151,7 +151,8 @@ const createFSMachine = (
},
}
)
return interpret(fsMachine).start()
const machineInstance = interpret(fsMachine).start()
return machineInstance
}

exports.pluginOptionsSchema = ({ Joi }) =>
Expand Down