-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat!: new syntax for providers #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 109 out of 124 changed files in this pull request and generated 1 suggestion.
Files not reviewed (15)
- .vscode/settings.json: Language not supported
- .zed/settings.json: Language not supported
- data/paths.json: Language not supported
- data/subdomains.json: Language not supported
- demo/src/examples.json: Language not supported
- deno.json: Language not supported
- deno.jsonc: Language not supported
- src/parse.ts: Evaluated as low risk
- src/canonical.test.ts: Evaluated as low risk
- src/canonical.ts: Evaluated as low risk
- mod.ts: Evaluated as low risk
- src/async.ts: Evaluated as low risk
- src/detect.ts: Evaluated as low risk
- README.md: Evaluated as low risk
- src/providers/astro.test.ts: Evaluated as low risk
Comments skipped due to low confidence (3)
src/providers/astro.ts:47
- Ensure that
src
is a valid URL before setting it in the URL search params.
url.searchParams.set("href", src.toString());
src/providers/astro.ts:55
- Validate that
src
is not empty before proceeding.
const src = parsedUrl.searchParams.get("href");
src/extract.ts:35
- [nitpick] The provider names in the parsers object should be consistent. For example, 'cloudflare_images' should be 'cloudflareImages'.
export const parsers: URLExtractorMap = {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 128 out of 139 changed files in this pull request and generated no suggestions.
Files not reviewed (11)
- .vscode/settings.json: Language not supported
- .zed/settings.json: Language not supported
- data/paths.json: Language not supported
- data/subdomains.json: Language not supported
- demo/src/examples.json: Language not supported
- deno.json: Language not supported
- deno.jsonc: Language not supported
- demo/src/App.jsx: Evaluated as low risk
- e2e.test.ts: Evaluated as low risk
- mod.ts: Evaluated as low risk
- scripts/build_npm.ts: Evaluated as low risk
Comments skipped due to low confidence (3)
README.md:60
- The example code should use
url.toString()
for consistency with the previous example. It should beconsole.log(url.toString());
console.log(url);
src/async.ts:125
- Ensure that
providerOperations
is defined before accessing it to avoid potential runtime errors.
...providerOperations?.[cdn],
src/async.ts:126
- Ensure that
providerOptions
is defined before accessing it to avoid potential runtime errors.
...providerOptions?.[cdn] ?? {} as ProviderOptions[TCDN]);
* ci: add pkg.pr.new * Run on mine * Fix path * Include version
commit: |
This PR introduces a major update focusing on improved type safety, better provider-specific support, and a more explicit approach to URL transformation. This can be tested by installing from pkg.pr.new: #133 (comment)
Key Changes
Provider-Specific Operations
New Fallback System
fallback
option to specify a provider for unrecognized URLsEnhanced Type Safety
API Refinements
Documentation
Breaking Changes
See UPGRADING.md for a detailed migration guide and CHANGELOG.md for a complete list of changes.