Commit 7451d2f
authored
fix: support node 22 (#39349)
* test(gatsby-cli): tolerate varying stack traces
* test: import mocked module the same way it's used
This mismatch stopped working after node 18.
* test: use more specific snapshot for res headers
Some of the connection header defaults depend on the node.js major version
wip this is a fix for the headers one
* test: skip unstable GC tests on node 20+
* test: adjust assertion to work on node 22 locally
See inline comment
* test: fix sharp build error in lmdb-regeneration fixture
The `lmdb-regeneration` integration test fixture had an `.npmrc` file forcing all packages to be
built from source, which caused sharp to fail compilation in Node 20+ CircleCI images (Ubuntu Noble)
due to... who knows what, honestly.
Since this fixture specifically needs lmdb built from source but not sharp (it's testing something
specific to this), this replaces the global `.npmrc` `build-from-source` flag with a targeted
`postinstall` script that only rebuilds lmdb from source, allowing sharp to use prebuilt binaries.
This resolves the "cannot find -l:libvips-cpp.so.42" linker errors that were blocking integration
tests on Node 20+ while preserving the fixture's intended lmdb compilation testing.
AFAICT this was... basically the only solution. Whew
* fix(gatsby): bump `webpack-virtual-modules`
to get this bug fix: sysgears/webpack-virtual-modules#172
causing this, unclear when:
```
TypeError: Cannot read properties of null (reading 'fileWatchers')
```
* ci: test against Node 18, 20, 22
- run unit tests against all three
- run integration tests against earliest and latest
- make sure to separate npm cache by node version
* ci: test against node 22.13 to avoid bug for now1 parent c3708b0 commit 7451d2f
File tree
14 files changed
+524
-442
lines changed- .circleci
- integration-tests
- functions
- __tests__/__snapshots__
- lmdb-regeneration
- ssr/__tests__
- packages
- gatsby-cli/src/reporter/__tests__
- __snapshots__
- gatsby-source-contentful/src/__tests__
- gatsby
- cache-dir/__tests__
- src/schema/__tests__
14 files changed
+524
-442
lines changedLarge diffs are not rendered by default.
Lines changed: 0 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | 83 | | |
86 | 84 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 85 | | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
96 | 91 | | |
97 | | - | |
98 | | - | |
99 | 92 | | |
100 | 93 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 94 | | |
105 | 95 | | |
106 | 96 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
87 | | - | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
95 | | - | |
96 | 92 | | |
97 | 93 | | |
98 | | - | |
99 | | - | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
168 | 171 | | |
169 | | - | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | | - | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
Lines changed: 5 additions & 78 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 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 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 72 | + | |
146 | 73 | | |
147 | 74 | | |
148 | 75 | | |
| |||
157 | 84 | | |
158 | 85 | | |
159 | 86 | | |
160 | | - | |
| 87 | + | |
161 | 88 | | |
162 | 89 | | |
163 | 90 | | |
| |||
171 | 98 | | |
172 | 99 | | |
173 | 100 | | |
174 | | - | |
| 101 | + | |
175 | 102 | | |
176 | 103 | | |
177 | 104 | | |
| |||
186 | 113 | | |
187 | 114 | | |
188 | 115 | | |
189 | | - | |
| 116 | + | |
190 | 117 | | |
191 | 118 | | |
192 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
106 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| |||
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
139 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
| |||
163 | 171 | | |
164 | 172 | | |
165 | 173 | | |
166 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
167 | 177 | | |
168 | 178 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments