Skip to content

Commit

Permalink
refactor(ses): note @babel/traverse todo for node -r esm compat
Browse files Browse the repository at this point in the history
  • Loading branch information
leotm committed Sep 19, 2024
1 parent 7bef992 commit 0bff9a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ses/scripts/hermesTransforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import babelGenerate from '@agoric/babel-generator';
import babelTraverse from '@babel/traverse';
import * as t from '@babel/types';

// @ts-expect-error TS2339 Property 'default' does not exist
// TODO The following is sufficient on Node.js, but for compatibility with
// `node -r esm`, we must use the pattern below.
// Remove after https://github.com/Agoric/agoric-sdk/issues/8671.
// OR, upgrading to Babel 8 probably addresses this defect.
// @ts-expect-error TS2339 Property 'default' does not exist.
const traverse = babelTraverse.default || babelTraverse;
const generate = babelGenerate.default || babelGenerate;

Expand Down

0 comments on commit 0bff9a0

Please sign in to comment.