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

chore(gatsby): Remove hasNodeChanged #29208

Merged
merged 3 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/gatsby-source-hacker-news/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ exports.sourceNodes = async ({
actions,
getNode,
createNodeId,
hasNodeChanged,
createContentDigest,
}) => {
const { createNode } = actions
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-mongodb/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const queryString = require(`query-string`)
const stringifyObjectIds = require(`./stringify-object-ids`)

exports.sourceNodes = (
{ actions, getNode, createNodeId, hasNodeChanged, createContentDigest },
{ actions, getNode, createNodeId, createContentDigest },
pluginOptions
) => {
const { createNode } = actions
Expand Down
10 changes: 0 additions & 10 deletions packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1029,16 +1029,6 @@ export interface NodePluginArgs {
*/
getNodesByType(type: string): Node[]

/**
* Compares `contentDigest` of cached node with passed value
* to determine if node has changed.
*
* @param id of node
* @param contentDigest of node
* @deprecated This check is done internally in Gatsby and it's not necessary to use it in plugins. Will be removed in gatsby 3.0.
*/
hasNodeChanged(id: string, contentDigest: string): boolean

/**
* Set of utilities to output information to user
*/
Expand Down
11 changes: 0 additions & 11 deletions packages/gatsby/src/utils/api-node-helpers-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,6 @@ module.exports.getNode = true;
*/
module.exports.getNodesByType = true;

/**
* Compares `contentDigest` of cached node with passed value
* to determine if node has changed.
*
* @param {string} id of node
* @param {string} contentDigest of node
* @returns {boolean}
* @deprecated This check is done internally in Gatsby and it's not necessary to use it in plugins. Will be removed in gatsby 3.0.
*/
module.exports.hasNodeChanged = true;

/**
* Set of utilities to output information to user
* @type {GatsbyReporter}
Expand Down
2 changes: 0 additions & 2 deletions packages/gatsby/src/utils/api-runner-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const {
getNodes,
getNode,
getNodesByType,
hasNodeChanged,
getNodeAndSavePathDependency,
} = require(`../redux/nodes`)
const { getPublicPath } = require(`./get-public-path`)
Expand Down Expand Up @@ -424,7 +423,6 @@ const runAPI = async (plugin, api, args, activity) => {
getNodes,
getNode,
getNodesByType,
hasNodeChanged,
reporter: extendedLocalReporter,
getNodeAndSavePathDependency,
cache,
Expand Down