Skip to content

Commit

Permalink
tools: fix c-ares updater script for Node.js 18
Browse files Browse the repository at this point in the history
GitHub Actions is by default running the tools updater workflow
with Node.js 18. Avoid use of `import.meta.dirname`, which wasn't
backported to Node.js 18.

PR-URL: nodejs#55717
Refs: nodejs#55445
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
richardlau authored and tpoisseau committed Nov 21, 2024
1 parent dc1ec3b commit 8e6d2c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/dep_updaters/update-c-ares.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Synchronize the sources for our c-ares gyp file from c-ares' Makefiles.
import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';

const srcroot = join(import.meta.dirname, '..', '..');
const srcroot = fileURLToPath(new URL('../../', import.meta.url));
const options = { encoding: 'utf8' };

// Extract list of sources from the gyp file.
Expand Down

0 comments on commit 8e6d2c3

Please sign in to comment.