Skip to content

feat(tarball): implement new EntryFilesAnalyser API #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

fraxken
Copy link
Member

@fraxken fraxken commented May 14, 2025

No description provided.

Copy link

changeset-bot bot commented May 14, 2025

🦋 Changeset detected

Latest commit: 72834db

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@nodesecure/tarball Major
@nodesecure/scanner Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fraxken fraxken force-pushed the refactor-tarball-v2 branch 2 times, most recently from b593c44 to b516bf9 Compare May 19, 2025 19:34
@fraxken fraxken force-pushed the refactor-tarball-v2 branch from b516bf9 to 070176f Compare May 26, 2025 20:55
@fraxken fraxken mentioned this pull request May 26, 2025
4 tasks
@fraxken fraxken force-pushed the refactor-tarball-v2 branch 7 times, most recently from c90cb77 to 00fabfc Compare June 8, 2025 11:18
@fraxken fraxken force-pushed the refactor-tarball-v2 branch 5 times, most recently from 5d63331 to 2112de1 Compare June 18, 2025 13:43
@fraxken fraxken marked this pull request as ready for review June 18, 2025 13:43
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the new EntryFilesAnalyser API and refactors the tarball scanning workflow. Key changes include:

  • Integration of the EntryFilesAnalyser API in the SourceCodeScanner class.
  • Introduction of a new NpmTarball class and modifications in tarball extraction and scanning.
  • Updates across test files and documentation to support these API changes.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
workspaces/tarball/test/fixtures/scanPackage/entryfiles/src/index.js Uses CommonJS require with an imported ESM module, which may cause module system inconsistency.
workspaces/tarball/test/fixtures/scanPackage/entryfiles/src/foo.js Exports using ES module syntax while being required from a CommonJS module.
workspaces/tarball/test/SourceCodeScanner.spec.ts Contains a minor spelling issue in a test description.
workspaces/tarball/src/tarball.ts Refactored to use the new NpmTarball class and updated dependency extraction.
workspaces/tarball/src/class/SourceCodeScanner.class.ts Updated to leverage the new EntryFilesAnalyser API for processing manifest entry files.
workspaces/tarball/src/class/NpmTarball.class.ts New file implementing tarball scanning logic in line with the updated API.
workspaces/scanner/src/depWalker.ts Adjusted to use the TempDirectory class and updated scanDirOrArchiveEx call.

@fraxken fraxken force-pushed the refactor-tarball-v2 branch 2 times, most recently from 01802eb to 72834db Compare June 18, 2025 16:40
@fraxken fraxken force-pushed the refactor-tarball-v2 branch from 72834db to a0d16ef Compare June 18, 2025 16:43
@fraxken fraxken merged commit de110df into master Jun 18, 2025
5 checks passed
@fraxken fraxken deleted the refactor-tarball-v2 branch June 18, 2025 16:56
@github-actions github-actions bot mentioned this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants