Skip to content
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

🧹 refactor languages #5120

Merged
merged 18 commits into from
Jan 28, 2025
Merged

🧹 refactor languages #5120

merged 18 commits into from
Jan 28, 2025

Conversation

chris-rock
Copy link
Member

@chris-rock chris-rock commented Jan 26, 2025

First step to harmonize the python and the npm packages resources. This PR moves the helper code into the languages packages to parse the dependencies. We also extract the filesystem walking to ensure that both npm and python use the same code. We also cleaned the python resources and harmonize the different code paths in the same resource.

As a next step we need to use the shared package type for the python parser and harmonize the MQL resources to offer the same functionality.

@chris-rock chris-rock changed the title Chris rock/languages 🧹 refactor languages Jan 26, 2025
@chris-rock chris-rock force-pushed the chris-rock/languages branch from 41d5d03 to 382a33e Compare January 26, 2025 15:08
Copy link
Contributor

github-actions bot commented Jan 26, 2025

Test Results

3 206 tests   - 3   3 202 ✅  - 3   2m 8s ⏱️ +27s
  385 suites +6       4 💤 ±0 
   29 files   ±0       0 ❌ ±0 

Results for commit ca6ce7a. ± Comparison against base commit e663232.

This pull request removes 48 and adds 45 tests. Note that renamed tests count towards both.
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/author.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/author_shorten.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/author_shorten_url.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/bugs.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/bundle_dependencies.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/contributors.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/contributors_shorten.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/cpu_exclude.json
go.mondoo.com/cnquery/v11/providers/os/resources/npm ‑ TestPackageJson/./testdata/package-json/cpu_include.json
…
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/author.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/author_shorten.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/author_shorten_url.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/bugs.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/bundle_dependencies.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/contributors.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/contributors_shorten.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/cpu_exclude.json
go.mondoo.com/cnquery/v11/providers/os/resources/languages/javascript/packagejson ‑ TestPackageJson/./testdata/cpu_include.json
…

♻️ This comment has been updated with latest results.

@chris-rock chris-rock force-pushed the chris-rock/languages branch from 382a33e to b1c9721 Compare January 26, 2025 15:12
@imilchev imilchev force-pushed the chris-rock/languages branch from b51d84d to 6ceda4d Compare January 28, 2025 10:16
Signed-off-by: Ivan Milchev <[email protected]>
@imilchev imilchev force-pushed the chris-rock/languages branch from 6ceda4d to ca6ce7a Compare January 28, 2025 10:20
@imilchev imilchev merged commit 06af91a into main Jan 28, 2025
17 checks passed
@imilchev imilchev deleted the chris-rock/languages branch January 28, 2025 11:23
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants