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(linter): remove usage of url crate #8833

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

camchenry
Copy link
Contributor

@camchenry camchenry commented Feb 1, 2025

In the linter, this was only used for getting a query parameter value out of a URL. These lint rules already check that the URL value is a known-good URL so we don't need to validate and parse it. I've replaced these usages with a simple helper function to get the value from the query string.

There was also a usage in the tasks directory for getting test files and I've also skipped validating here since it's not strictly necessary as we control all inputs.

@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 1, 2025
Copy link
Contributor Author

camchenry commented Feb 1, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camchenry camchenry force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from c056d26 to 325753b Compare February 1, 2025 23:57
Copy link

codspeed-hq bot commented Feb 2, 2025

CodSpeed Performance Report

Merging #8833 will not alter performance

Comparing 02-01-refactor_linter_remove_usage_of_url_crate (bb9d763) with main (5cfea76)

Summary

✅ 33 untouched benchmarks

@camchenry camchenry force-pushed the 02-01-refactor_linter_replace_mime_guessing_with_extension_check branch from 580e5e6 to 12ac972 Compare February 2, 2025 00:07
@camchenry camchenry force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from 325753b to 8f9f16e Compare February 2, 2025 00:07
@camchenry camchenry force-pushed the 02-01-refactor_linter_replace_mime_guessing_with_extension_check branch from 12ac972 to 684c783 Compare February 2, 2025 00:12
@camchenry camchenry force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from 8f9f16e to 6d5b697 Compare February 2, 2025 00:13
@camchenry camchenry force-pushed the 02-01-refactor_linter_replace_mime_guessing_with_extension_check branch from 684c783 to b2c2cfc Compare February 2, 2025 00:28
@camchenry camchenry force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from 6d5b697 to 0a949a2 Compare February 2, 2025 00:28
@camchenry camchenry force-pushed the 02-01-refactor_linter_replace_mime_guessing_with_extension_check branch from b2c2cfc to e956297 Compare February 2, 2025 00:29
@camchenry camchenry force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from 0a949a2 to 1da9e1b Compare February 2, 2025 00:29
@camchenry camchenry marked this pull request as ready for review February 2, 2025 00:45
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 2, 2025
Copy link
Member

Boshen commented Feb 2, 2025

Merge activity

  • Feb 1, 8:12 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 1, 8:13 PM EST: A user added this pull request to the Graphite merge queue.
  • Feb 1, 8:26 PM EST: A user merged this pull request with the Graphite merge queue.

In the linter, this was only used for getting a query parameter value out of a URL. These lint rules already check that the URL value is a known-good URL so we don't need to validate and parse it. I've replaced these usages with a simple helper function to get the value from the query string.

There was also a usage in the tasks directory for getting test files and I've also skipped validating here since it's not strictly necessary as we control all inputs.
@graphite-app graphite-app bot force-pushed the 02-01-refactor_linter_replace_mime_guessing_with_extension_check branch from e956297 to 4fcf719 Compare February 2, 2025 01:16
@graphite-app graphite-app bot force-pushed the 02-01-refactor_linter_remove_usage_of_url_crate branch from 1da9e1b to bb9d763 Compare February 2, 2025 01:16
Base automatically changed from 02-01-refactor_linter_replace_mime_guessing_with_extension_check to main February 2, 2025 01:23
@graphite-app graphite-app bot merged commit bb9d763 into main Feb 2, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 02-01-refactor_linter_remove_usage_of_url_crate branch February 2, 2025 01:26
Boshen added a commit that referenced this pull request Feb 6, 2025
## [0.15.10] - 2025-02-06

### Features

- d6d80f7 linter: Add suggestion fixer for `eslint/no-iterator` (#8894)
(dalaoshu)
- 7e8568b linter: Junit reporter (#8756) (Tapan Prakash)
- f4662a9 oxc_language_server: Implement `oxc.fixAll` workspace command
(#8858) (Marek Vospel)

### Bug Fixes

- baf3e4e linter: Correctly replace rule severity with duplicate rule
name configurations (#8840) (dalaoshu)

### Performance

- 8a4988d linter: Use parallel iterator directly instead of iter and
parallel bridge (#8831) (Cam McHenry)

### Refactor

- bb9d763 linter: Remove usage of `url` crate (#8833) (camchenry)
- 4fcf719 linter: Replace MIME guessing with extension check (#8832)
(camchenry)

Co-authored-by: Boshen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants