gatsby 5.14.0 → 5.14.2

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.
@@ -14,7 +14,7 @@ function getHashes(chunkGroup, compilation, hashes = [], visitedChunkGroups = ne
14
14
  hashes.push(chunk.hash);
15
15
  }
16
16
  for (const childChunkGroup of chunkGroup.childrenIterable) {
17
- const isNotImportedByAsyncRequires = childChunkGroup.origins.every(origin => !origin.module.identifier().includes(`async-requires`));
17
+ const isNotImportedByAsyncRequires = childChunkGroup.origins.every(origin => !origin.module || !origin.module.identifier().includes(`async-requires`));
18
18
  if (isNotImportedByAsyncRequires) {
19
19
  getHashes(childChunkGroup, compilation, hashes, visitedChunkGroups);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-ssr-chunk-hashes.js","names":["getHashes","chunkGroup","compilation","hashes","visitedChunkGroups","Set","has","add","chunk","chunks","hash","Error","push","childChunkGroup","childrenIterable","isNotImportedByAsyncRequires","origins","every","origin","module","identifier","includes","getSSRChunkHashes","stats","components","templateHashes","componentChunkNameToTemplatePath","renderPageHash","forEach","component","componentChunkName","componentPath","chunkGroups","name","concenatedChunksByName","join","templatePath"],"sources":["../../../src/utils/webpack/get-ssr-chunk-hashes.ts"],"sourcesContent":["import type webpack from \"webpack\"\nimport type { IGatsbyState } from \"../../internal\"\n\ntype ChunkGroup = webpack.Compilation[\"chunkGroups\"][0]\n\nfunction getHashes(\n chunkGroup: ChunkGroup,\n compilation: webpack.Compilation,\n hashes: Array<string> = [],\n visitedChunkGroups: Set<ChunkGroup> = new Set()\n): Array<string> {\n if (visitedChunkGroups.has(chunkGroup)) {\n return hashes\n }\n visitedChunkGroups.add(chunkGroup)\n\n for (const chunk of chunkGroup.chunks) {\n if (!chunk.hash) {\n throw new Error(\n `Invariant: [generating template hashes] Chunk doesn't have hash`\n )\n }\n hashes.push(chunk.hash)\n }\n\n for (const childChunkGroup of chunkGroup.childrenIterable) {\n const isNotImportedByAsyncRequires = childChunkGroup.origins.every(\n origin => !origin.module.identifier().includes(`async-requires`)\n )\n\n if (isNotImportedByAsyncRequires) {\n getHashes(childChunkGroup, compilation, hashes, visitedChunkGroups)\n }\n }\n\n return hashes\n}\n\nexport function getSSRChunkHashes({\n stats,\n components,\n}: {\n stats: webpack.Stats\n components: IGatsbyState[\"components\"]\n}): {\n templateHashes: Record<string, string>\n renderPageHash: string\n} {\n const templateHashes: Record<string, string> = {}\n const componentChunkNameToTemplatePath: Record<string, string> = {}\n let renderPageHash = ``\n\n components.forEach(component => {\n componentChunkNameToTemplatePath[component.componentChunkName] =\n component.componentPath\n })\n\n for (const chunkGroup of stats.compilation.chunkGroups) {\n if (chunkGroup.name) {\n const concenatedChunksByName = getHashes(\n chunkGroup,\n stats.compilation\n ).join(`--`)\n\n if (chunkGroup.name !== `render-page`) {\n const templatePath = componentChunkNameToTemplatePath[chunkGroup.name]\n if (!templatePath) {\n // additional chunk group can be created by lazy imports\n // we handle them by handling children chunk groups on top level ones\n continue\n }\n templateHashes[templatePath] = concenatedChunksByName\n } else {\n renderPageHash = concenatedChunksByName\n }\n }\n }\n\n return { templateHashes, renderPageHash }\n}\n"],"mappings":";;;;AAKA,SAASA,SAAS,CAChBC,UAAsB,EACtBC,WAAgC,EAChCC,MAAqB,GAAG,EAAE,EAC1BC,kBAAmC,GAAG,IAAIC,GAAG,EAAE,EAChC;EACf,IAAID,kBAAkB,CAACE,GAAG,CAACL,UAAU,CAAC,EAAE;IACtC,OAAOE,MAAM;EACf;EACAC,kBAAkB,CAACG,GAAG,CAACN,UAAU,CAAC;EAElC,KAAK,MAAMO,KAAK,IAAIP,UAAU,CAACQ,MAAM,EAAE;IACrC,IAAI,CAACD,KAAK,CAACE,IAAI,EAAE;MACf,MAAM,IAAIC,KAAK,CACZ,iEAAgE,CAClE;IACH;IACAR,MAAM,CAACS,IAAI,CAACJ,KAAK,CAACE,IAAI,CAAC;EACzB;EAEA,KAAK,MAAMG,eAAe,IAAIZ,UAAU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chunkGroup","compilation","hashes","visitedChunkGroups","Set","has","add","chunk","chunks","hash","Error","push","childChunkGroup","childrenIterable","isNotImportedByAsyncRequires","origins","every","origin","module","identifier","includes","getSSRChunkHashes","stats","components","templateHashes","componentChunkNameToTemplatePath","renderPageHash","forEach","component","componentChunkName","componentPath","chunkGroups","name","concenatedChunksByName","join","templatePath"],"sources":["../../../src/utils/webpack/get-ssr-chunk-hashes.ts"],"sourcesContent":["import type webpack from \"webpack\"\nimport type { IGatsbyState } from \"../../internal\"\n\ntype ChunkGroup = webpack.Compilation[\"chunkGroups\"][0]\n\nfunction getHashes(\n chunkGroup: ChunkGroup,\n compilation: webpack.Compilation,\n hashes: Array<string> = [],\n visitedChunkGroups: Set<ChunkGroup> = new Set()\n): Array<string> {\n if (visitedChunkGroups.has(chunkGroup)) {\n return hashes\n }\n visitedChunkGroups.add(chunkGroup)\n\n for (const chunk of chunkGroup.chunks) {\n if (!chunk.hash) {\n throw new Error(\n `Invariant: [generating template hashes] Chunk doesn't have hash`\n )\n }\n hashes.push(chunk.hash)\n }\n\n for (const childChunkGroup of chunkGroup.childrenIterable) {\n const isNotImportedByAsyncRequires = childChunkGroup.origins.every(\n origin =>\n !origin.module || !origin.module.identifier().includes(`async-requires`)\n )\n\n if (isNotImportedByAsyncRequires) {\n getHashes(childChunkGroup, compilation, hashes, visitedChunkGroups)\n }\n }\n\n return hashes\n}\n\nexport function getSSRChunkHashes({\n stats,\n components,\n}: {\n stats: webpack.Stats\n components: IGatsbyState[\"components\"]\n}): {\n templateHashes: Record<string, string>\n renderPageHash: string\n} {\n const templateHashes: Record<string, string> = {}\n const componentChunkNameToTemplatePath: Record<string, string> = {}\n let renderPageHash = ``\n\n components.forEach(component => {\n componentChunkNameToTemplatePath[component.componentChunkName] =\n component.componentPath\n })\n\n for (const chunkGroup of stats.compilation.chunkGroups) {\n if (chunkGroup.name) {\n const concenatedChunksByName = getHashes(\n chunkGroup,\n stats.compilation\n ).join(`--`)\n\n if (chunkGroup.name !== `render-page`) {\n const templatePath = componentChunkNameToTemplatePath[chunkGroup.name]\n if (!templatePath) {\n // additional chunk group can be created by lazy imports\n // we handle them by handling children chunk groups on top level ones\n continue\n }\n templateHashes[templatePath] = concenatedChunksByName\n } else {\n renderPageHash = concenatedChunksByName\n }\n }\n }\n\n return { templateHashes, renderPageHash }\n}\n"],"mappings":";;;;AAKA,SAASA,SAAS,CAChBC,UAAsB,EACtBC,WAAgC,EAChCC,MAAqB,GAAG,EAAE,EAC1BC,kBAAmC,GAAG,IAAIC,GAAG,EAAE,EAChC;EACf,IAAID,kBAAkB,CAACE,GAAG,CAACL,UAAU,CAAC,EAAE;IACtC,OAAOE,MAAM;EACf;EACAC,kBAAkB,CAACG,GAAG,CAACN,UAAU,CAAC;EAElC,KAAK,MAAMO,KAAK,IAAIP,UAAU,CAACQ,MAAM,EAAE;IACrC,IAAI,CAACD,KAAK,CAACE,IAAI,EAAE;MACf,MAAM,IAAIC,KAAK,CACZ,iEAAgE,CAClE;IACH;IACAR,MAAM,CAACS,IAAI,CAACJ,KAAK,CAACE,IAAI,CAAC;EACzB;EAEA,KAAK,MAAMG,eAAe,IAAIZ,UAAU,CAACa,gBAAgB,EAAE;IACzD,MAAMC,4BAA4B,GAAGF,eAAe,CAACG,OAAO,CAACC,KAAK,CAChEC,MAAM,IACJ,CAACA,MAAM,CAACC,MAAM,IAAI,CAACD,MAAM,CAACC,MAAM,CAACC,UAAU,EAAE,CAACC,QAAQ,CAAE,gBAAe,CAAC,CAC3E;IAED,IAAIN,4BAA4B,EAAE;MAChCf,SAAS,CAACa,eAAe,EAAEX,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,CAAC;IACrE;EACF;EAEA,OAAOD,MAAM;AACf;AAEO,SAASmB,iBAAiB,CAAC;EAChCC,KAAK;EACLC;AAIF,CAAC,EAGC;EACA,MAAMC,cAAsC,GAAG,CAAC,CAAC;EACjD,MAAMC,gCAAwD,GAAG,CAAC,CAAC;EACnE,IAAIC,cAAc,GAAI,EAAC;EAEvBH,UAAU,CAACI,OAAO,CAACC,SAAS,IAAI;IAC9BH,gCAAgC,CAACG,SAAS,CAACC,kBAAkB,CAAC,GAC5DD,SAAS,CAACE,aAAa;EAC3B,CAAC,CAAC;EAEF,KAAK,MAAM9B,UAAU,IAAIsB,KAAK,CAACrB,WAAW,CAAC8B,WAAW,EAAE;IACtD,IAAI/B,UAAU,CAACgC,IAAI,EAAE;MACnB,MAAMC,sBAAsB,GAAGlC,SAAS,CACtCC,UAAU,EACVsB,KAAK,CAACrB,WAAW,CAClB,CAACiC,IAAI,CAAE,IAAG,CAAC;MAEZ,IAAIlC,UAAU,CAACgC,IAAI,KAAM,aAAY,EAAE;QACrC,MAAMG,YAAY,GAAGV,gCAAgC,CAACzB,UAAU,CAACgC,IAAI,CAAC;QACtE,IAAI,CAACG,YAAY,EAAE;UACjB;UACA;UACA;QACF;QACAX,cAAc,CAACW,YAAY,CAAC,GAAGF,sBAAsB;MACvD,CAAC,MAAM;QACLP,cAAc,GAAGO,sBAAsB;MACzC;IACF;EACF;EAEA,OAAO;IAAET,cAAc;IAAEE;EAAe,CAAC;AAC3C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby",
3
3
  "description": "Blazing fast modern site generator for React",
4
- "version": "5.14.0",
4
+ "version": "5.14.2",
5
5
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
6
6
  "bin": {
7
7
  "gatsby": "./cli.js"
@@ -93,9 +93,9 @@
93
93
  "fs-extra": "^11.2.0",
94
94
  "gatsby-cli": "^5.14.0",
95
95
  "gatsby-core-utils": "^4.14.0",
96
- "gatsby-graphiql-explorer": "^3.14.0",
96
+ "gatsby-graphiql-explorer": "^3.14.1",
97
97
  "gatsby-legacy-polyfills": "^3.14.0",
98
- "gatsby-link": "^5.14.0",
98
+ "gatsby-link": "^5.14.1",
99
99
  "gatsby-page-utils": "^3.14.0",
100
100
  "gatsby-parcel-config": "1.14.0",
101
101
  "gatsby-plugin-page-creator": "^5.14.0",
@@ -169,7 +169,7 @@
169
169
  "type-of": "^2.0.1",
170
170
  "url-loader": "^4.1.1",
171
171
  "uuid": "^8.3.2",
172
- "webpack": "^5.88.1",
172
+ "webpack": "~5.98.0",
173
173
  "webpack-dev-middleware": "^5.3.4",
174
174
  "webpack-merge": "^5.9.0",
175
175
  "webpack-stats-plugin": "^1.1.3",
@@ -280,5 +280,5 @@
280
280
  "yargs": {
281
281
  "boolean-negation": false
282
282
  },
283
- "gitHead": "5397fbf5554ec3d937cc5a9042f2141b698d9eab"
283
+ "gitHead": "08137dc230048409dbb6c28194bc279644fedd0c"
284
284
  }