Skip to content

Commit b278a60

Browse files
Moocarsidharthachatterjee
authored andcommitted
feat(gatsby): add util.promisify polyfill for older node version (#13024)
1 parent b7121a8 commit b278a60

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/gatsby/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
"true-case-path": "^1.0.3",
125125
"type-of": "^2.0.1",
126126
"url-loader": "^1.0.1",
127+
"util.promisify": "^1.0.0",
127128
"uuid": "^3.1.0",
128129
"v8-compile-cache": "^1.1.0",
129130
"webpack": "~4.28.4",

packages/gatsby/src/bootstrap/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const preferDefault = require(`./prefer-default`)
2424
const nodeTracking = require(`../db/node-tracking`)
2525
const withResolverContext = require(`../schema/context`)
2626
require(`../db`).startAutosave()
27+
// Add `util.promisify` polyfill for old node versions
28+
require(`util.promisify/shim`)()
2729

2830
// Show stack trace on unhandled promises.
2931
process.on(`unhandledRejection`, (reason, p) => {

0 commit comments

Comments
 (0)