gatsby-source-filesystem 5.1.0-next.0 → 5.1.0

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,15 @@
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
+ ## [5.0.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@5.0.0/packages/gatsby-source-filesystem) (2022-11-08)
7
+
8
+ [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.0)
9
+
10
+ #### Chores
11
+
12
+ - Update peerDeps [#36965](https://github.com/gatsbyjs/gatsby/issues/36965) ([b624442](https://github.com/gatsbyjs/gatsby/commit/b6244424fe8b724cbc23b80b2b4f5424cc2055a4))
13
+ - apply patches for v5 [#36796](https://github.com/gatsbyjs/gatsby/issues/36796) ([25f79b6](https://github.com/gatsbyjs/gatsby/commit/25f79b6c3719fdf09584ade620a05c66ba2a697c))
14
+
6
15
  ## [4.24.0](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@4.24.0/packages/gatsby-source-filesystem) (2022-09-27)
7
16
 
8
17
  [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v4.24)
package/gatsby-node.js CHANGED
@@ -7,8 +7,9 @@ const fs = require(`fs`);
7
7
  const path = require(`path`);
8
8
 
9
9
  const {
10
- Machine,
11
- interpret
10
+ createMachine,
11
+ interpret,
12
+ assign
12
13
  } = require(`xstate`);
13
14
 
14
15
  const {
@@ -81,12 +82,16 @@ const createFSMachine = ({
81
82
  };
82
83
 
83
84
  const log = expr => (ctx, action, meta) => {
84
- if (meta.state.matches(`BOOTSTRAP.BOOTSTRAPPED`)) {
85
+ if (ctx.bootstrapped) {
85
86
  reporter.info(expr(ctx, action, meta));
86
87
  }
87
88
  };
88
89
 
89
- const fsMachine = Machine({
90
+ const fsMachine = createMachine({
91
+ predictableActionArguments: true,
92
+ context: {
93
+ bootstrapped: false
94
+ },
90
95
  id: `fs`,
91
96
  type: `parallel`,
92
97
  states: {
@@ -99,7 +104,10 @@ const createFSMachine = ({
99
104
  }
100
105
  },
101
106
  BOOTSTRAPPED: {
102
- type: `final`
107
+ type: `final`,
108
+ entry: assign({
109
+ bootstrapped: true
110
+ })
103
111
  }
104
112
  }
105
113
  },
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": "5.1.0-next.0",
4
+ "version": "5.1.0",
5
5
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
6
6
  "bugs": {
7
7
  "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -11,17 +11,17 @@
11
11
  "chokidar": "^3.5.3",
12
12
  "file-type": "^16.5.4",
13
13
  "fs-extra": "^10.1.0",
14
- "gatsby-core-utils": "^4.1.0-next.0",
14
+ "gatsby-core-utils": "^4.1.0",
15
15
  "md5-file": "^5.0.0",
16
16
  "mime": "^2.5.2",
17
17
  "pretty-bytes": "^5.4.1",
18
18
  "valid-url": "^1.0.9",
19
- "xstate": "4.32.1"
19
+ "xstate": "^4.34.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@babel/cli": "^7.15.4",
23
23
  "@babel/core": "^7.15.5",
24
- "babel-preset-gatsby-package": "^3.1.0-next.0",
24
+ "babel-preset-gatsby-package": "^3.1.0",
25
25
  "cross-env": "^7.0.3"
26
26
  },
27
27
  "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-filesystem#readme",
@@ -47,5 +47,5 @@
47
47
  "engines": {
48
48
  "node": ">=18.0.0"
49
49
  },
50
- "gitHead": "b556db3f445c0d5a71e08045aad87a38cd8d3151"
50
+ "gitHead": "2cfb64b6a7d2fac447f4535c30a82fbcbc6251bf"
51
51
  }
package/utils.js CHANGED
@@ -54,7 +54,7 @@ function getRemoteFileExtension(url) {
54
54
 
55
55
 
56
56
  function getRemoteFileName(url) {
57
- return getParsedPath(url).name;
57
+ return decodeURIComponent(getParsedPath(url).name);
58
58
  } // createFilePath should be imported from `gatsby-core-utils`
59
59
  // but some plugins already do import it from `gatsby-source-filesystem/utils`
60
60
  // so just keeping re-export here for backward compatibility