Commit 49fd769
Per page manifest (#14359)
* feat(gatsby): Page data without compilation hash (#13139)
**Note: merges to `per-page-manifest`, not master. See #13004 for more info**
## Description
This PR saves the `page-data.json` during query running. In order to minimize the size of PRs, my strategy is to save the page-data.json along with the normal query results, and then gradually shift functionality over to use `page-data.json` instead of `data.json`. Once all those PRs are merged, we'll be able to go back and delete the static query results, jsonNames, dataPaths, data.json etc.
It does mean that we'll be storing double the amount of query results on disk. Hopefully that's ok in the interim.
Compilation-hash will be added in future PRs.
## Related Issues
- Sub-PR of #13004
* Websocket manager use page data (#13389)
* add utils/page-data.read
* read websocket page data from utils/page-data
* Loader use page data (#13409)
* page-data loader working for production-app
* get new loader.getPage stuff working with gatsby develop
* fix static-entry.js test
* remove loadPageDataSync (will be in next PR)
* use array of matchPaths
* Deprecate various loader methods
* remove console.log
* document why fetchPageData needs to check that response is JSON
* in offline, use prefetchedResources.push(...resourceUrls)
* root.js remove else block
* loader.js make* -> create*
* loader drop else block
* pass correct path/resourceUrls to onPostPrefetch
* s/err => null/() => null/
* Extract loadComponent from loadPage
* remove pageData from window object
* update jest snapshots for static-entry (to use window.pagePath)
* add loadPageOr404
* preload 404 page in background
* normalize page paths
* comment out resource-loading-resilience.js (will fix later)
* Remove data json from guess (#13727)
* remove data.json from plugin-guess
* add test for plugin-guess
* Gatsby serve use page data (#13728)
* use match-paths.json for gatbsy serve
* remove pages.json
* move query/pages-writer to bootstrap/requires-writer (#13729)
And delete data.json
* fix(gatsby): refresh browser if webpack rebuild occurs (#13871)
* move query running into build and develop
* save build compilation hash
* write compilationHash to page data
* reload browser if rebuild occurs in background
* add test to ensure that browser is reloaded if rebuild occurs
* update page-datas when compilation hash changes
* use worker pool to udpate page data compilation hash
* update tests snapshot
* reset plugin offline whitelist if compilation hash changes
* prettier: remove global Cypress
* separate page for testing compilation-hash
* fix case typo
* mock out static entry test webpackCompilationHash field
* consolidate jest-worker calls into a central worker pool
* page-data.json cleanup PR. Remove jsonName and dataPath (#14167)
* remove json-name and don't save /static/d/ page query results
* in loader.cleanAndFindPath, use __BASE_PATH__. Not __PATH_PREFIX__
* loader getPage -> loadPageSync (#14264)
* Page data loading resilience (#14286)
* fetchPageHtml if page resources aren't found
* add page-data to production-runtime/resource-loading-resilience test
Also use cypress tasks for blocking resources instead of npm run chunks
* fetchPageHtml -> doesPageHtmlExist
* remove loadPageOr404Sync
* revert plugin-offline to master (#14385)
* Misc per-page-manifest fixes (#14413)
* use path.join for static-entry page-data path
* add pathContext back to static-entry props (fix regression)
* Remove jsonDataPaths from pre-existing redux state (#14501)
* Add context to sentry xhr errors (#14577)
* Add extra context to Sentry xhr errors
* Don't define Sentry immediately as it'll always be undefined then
* mv cpu-core-count.js test to utils/worker/__tests__ (fix bad merge)
* remove sentry reporting1 parent 3f11da3 commit 49fd769
File tree
71 files changed
+1455
-1440
lines changed- e2e-tests/production-runtime
- cypress
- integration
- plugins
- scripts
- src/pages
- packages
- gatsby-plugin-guess-js/src
- __tests__
- gatsby
- cache-dir
- __tests__
- __snapshots__
- src
- bootstrap
- __tests__
- commands
- query
- __tests__
- fixtures
- redux
- __tests__/__snapshots__
- actions
- reducers
- utils
- worker
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+1455
-1440
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | 95 | | |
| |||
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
Lines changed: 24 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 69 | + | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
81 | 79 | | |
82 | | - | |
83 | 80 | | |
84 | 81 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
88 | 85 | | |
89 | | - | |
90 | 86 | | |
91 | 87 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
95 | 91 | | |
96 | | - | |
97 | 92 | | |
98 | 93 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
102 | 97 | | |
103 | | - | |
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
| |||
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
114 | | - | |
| 108 | + | |
115 | 109 | | |
116 | 110 | | |
Lines changed: 120 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 1 | + | |
| 2 | + | |
13 | 3 | | |
14 | 4 | | |
15 | 5 | | |
| |||
27 | 17 | | |
28 | 18 | | |
29 | 19 | | |
| 20 | + | |
| 21 | + | |
30 | 22 | | |
0 commit comments