Skip to content

Commit

Permalink
fix: import constants from fs, not fs/promises
Browse files Browse the repository at this point in the history
`constants` was added to fs/promises in Node.js 18.4.  Since we still
support 18.0, it must be imported from fs.

Thanks n/no-unsupported-features/node-builtins for warning about it!

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid committed Nov 2, 2024
1 parent c1b435f commit 8d1f9f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/run-node-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
*/

import { spawn } from 'node:child_process';
import { createWriteStream } from 'node:fs';
import { constants, createWriteStream } from 'node:fs';
import {
constants,
copyFile,
mkdir,
stat,
Expand Down

0 comments on commit 8d1f9f8

Please sign in to comment.