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

feat(gatsby): Remove deleteNode with ID arg #29205

Merged
merged 10 commits into from
Feb 10, 2021
Prev Previous commit
improve message
  • Loading branch information
LekoArts committed Feb 10, 2021
commit f9dbd41b21837e6b31ed26b6f94e07dbcbd36279
2 changes: 1 addition & 1 deletion packages/gatsby/src/db/__tests__/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ describe(`nodes db tests`, () => {
)
expect(getNode(`hi`)).toBeUndefined()
const deprecationNotice =
`Calling "deleteNode" with an object containing a full node is deprecated. Please pass ` +
`Calling "deleteNode" with {node} is deprecated. Please pass ` +
`the node directly to the function: deleteNode(node) ` +
`"deleteNode" was called by tests`
expect(report.warn).toHaveBeenCalledWith(deprecationNotice)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/redux/actions/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ actions.deleteNode = (node: any, plugin?: Plugin) => {
// TODO(v4): Remove this deprecation warning and only allow deleteNode(node)
if (node && node.node) {
let msg =
`Calling "deleteNode" with an object containing a full node is deprecated. Please pass ` +
`Calling "deleteNode" with {node} is deprecated. Please pass ` +
`the node directly to the function: deleteNode(node)`

if (plugin && plugin.name) {
Expand Down