gatsby-source-filesystem 4.12.0-next.0 → 4.12.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [4.11.1](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@4.11.1/packages/gatsby-source-filesystem) (2022-03-31)
7
+
8
+ **Note:** Version bump only for package gatsby-source-filesystem
9
+
10
+ ## [4.11.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@4.11.0/packages/gatsby-source-filesystem) (2022-03-29)
11
+
12
+ [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v4.11)
13
+
14
+ #### Bug Fixes
15
+
16
+ - cleanup tests [#35200](https://github.com/gatsbyjs/gatsby/issues/35200) ([f4121fb](https://github.com/gatsbyjs/gatsby/commit/f4121fbd7fce0034816e3e743481c13cb4181d07))
17
+
18
+ #### Chores
19
+
20
+ - replace all uses of gatsbyjs.org with gatsbyjs.com [#35101](https://github.com/gatsbyjs/gatsby/issues/35101) ([16cff41](https://github.com/gatsbyjs/gatsby/commit/16cff413e154dc4e74fc5be631d52c76273e5cbc))
21
+
6
22
  ### [4.10.1](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@4.10.1/packages/gatsby-source-filesystem) (2022-03-23)
7
23
 
8
24
  **Note:** Version bump only for package gatsby-source-filesystem
package/README.md CHANGED
@@ -261,6 +261,8 @@ When working with data that isn't already stored in a file, such as when queryin
261
261
 
262
262
  The `createFileNodeFromBuffer` helper accepts a `Buffer`, caches its contents to disk, and creates a file node that points to it.
263
263
 
264
+ The name of the file can be passed to the `createFileNodeFromBuffer` helper. If no name is given, the content hash will be used to determine the name.
265
+
264
266
  ## Example usage
265
267
 
266
268
  The following example is adapted from the source of [`gatsby-source-mysql`](https://github.com/malcolm-kee/gatsby-source-mysql):
@@ -137,7 +137,7 @@ module.exports = ({
137
137
  parentNodeId = null,
138
138
  createNodeId,
139
139
  ext,
140
- name = hash
140
+ name
141
141
  }) => {
142
142
  // validation of the input
143
143
  // without this it's notoriously easy to pass in the wrong `createNodeId`
@@ -165,6 +165,10 @@ module.exports = ({
165
165
 
166
166
  if (!hash) {
167
167
  hash = createContentDigest(buffer);
168
+ }
169
+
170
+ if (!name) {
171
+ name = hash;
168
172
  } // Check if we already requested node for this remote file
169
173
  // and return stored promise if we did.
170
174
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby-source-filesystem",
3
3
  "description": "Gatsby source plugin for building websites from local data. Markdown, JSON, images, YAML, CSV, and dozens of other data types supported.",
4
- "version": "4.12.0-next.0",
4
+ "version": "4.12.0-next.3",
5
5
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
6
6
  "bugs": {
7
7
  "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -11,7 +11,7 @@
11
11
  "chokidar": "^3.5.2",
12
12
  "file-type": "^16.5.3",
13
13
  "fs-extra": "^10.0.0",
14
- "gatsby-core-utils": "^3.12.0-next.0",
14
+ "gatsby-core-utils": "^3.12.0-next.3",
15
15
  "got": "^9.6.0",
16
16
  "md5-file": "^5.0.0",
17
17
  "mime": "^2.5.2",
@@ -49,5 +49,5 @@
49
49
  "engines": {
50
50
  "node": ">=14.15.0"
51
51
  },
52
- "gitHead": "da73bd9edbd4b3dbbedfc4f7614b9a9e4bb5a746"
52
+ "gitHead": "b474dbb25518b51ca8cc1ce75fffb044e7d8609a"
53
53
  }