Skip to content

Commit

Permalink
import tar/parse rather than Parse from tar
Browse files Browse the repository at this point in the history
Use the new tree-shake friendly exports in tar@7.0.0 to reduce the
amount of code loaded during import.  Since we only use Parse from tar,
importing tar/parse avoids loading much unused code (e.g. create).

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid committed Apr 15, 2024
1 parent 2ab1b1f commit 4c10285
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/extract/tar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import path from 'node:path';
import { pipeline } from 'node:stream/promises';
import { debuglog } from 'node:util';

import { Parse } from 'tar';
// https://github.com/import-js/eslint-plugin-import/issues/1810
// eslint-disable-next-line import/no-unresolved
import Parse from 'tar/parse';

const debug = debuglog('noderegression:extract/tar');

Expand Down

0 comments on commit 4c10285

Please sign in to comment.