-
-
Notifications
You must be signed in to change notification settings - Fork 271
feat: add community adoption distribution link in Versions.vue #687
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
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
95bd369
Add community adoption distribution link in Versions.vue
NullVoxPopuli 361fb7c
Add community distribution label to English locale
NullVoxPopuli 27898e1
Update tooltip text for community distribution link
NullVoxPopuli f6485ec
Update link to use props.packageName instead of pkg.name
NullVoxPopuli b5de987
lint:fix
NullVoxPopuli 179ec74
Initial plan
Copilot eb3ea4c
fix: update test selectors to exclude external links
Copilot 11d26af
fix: update test selectors to exclude external links
Copilot a60127a
Push test fixes to remote
Copilot 1ffcba8
Merge branch 'copilot/fix-package-versions-tests' into copilot/update…
Copilot fe1ea89
Remove temporary marker file
Copilot 2e20622
Apply test selector fixes to current test file
Copilot 7feb8ad
Merge pull request #1 from NullVoxPopuli/copilot/update-test-selectors
NullVoxPopuli ba9ea1e
[autofix.ci] apply automated fixes
autofix-ci[bot] c0aab9a
chore: remove `props.`
danielroe 96732fa
Merge branch 'main' into patch-2
danielroe 934843c
Merge branch 'main' into patch-2
danielroe 033ae9a
[autofix.ci] apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,10 +73,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Find version links (exclude anchor links that start with #) | ||
| // Find version links (exclude anchor links that start with # and external links) | ||
| const versionLinks = component | ||
| .findAll('a') | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. filtering all links like this with a semantic wrapper feels a bit goofy, but I don't know what testing patterns are common/recommended, and this was pretty hands off for me. Lemme know what changes you want |
||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| expect(versionLinks.length).toBeGreaterThan(0) | ||
| expect(versionLinks[0]?.text()).toBe('2.0.0') | ||
| }) | ||
|
|
@@ -93,10 +93,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Find version links (exclude anchor links that start with #) | ||
| // Find version links (exclude anchor links that start with # and external links) | ||
| const versionLinks = component | ||
| .findAll('a') | ||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| expect(versionLinks.length).toBeGreaterThan(0) | ||
| expect(versionLinks[0]?.text()).toBe('1.0.0') | ||
| }) | ||
|
|
@@ -187,10 +187,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Find version links (exclude anchor links that start with #) | ||
| // Find version links (exclude anchor links that start with # and external links) | ||
| const versionLinks = component | ||
| .findAll('a') | ||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| const versions = versionLinks.map(l => l.text()) | ||
| // Should be sorted by version descending | ||
| expect(versions[0]).toBe('2.0.0') | ||
|
|
@@ -210,10 +210,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Find version links (exclude anchor links that start with #) | ||
| // Find version links (exclude anchor links that start with # and external links) | ||
| const versionLinks = component | ||
| .findAll('a') | ||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| expect(versionLinks.length).toBeGreaterThan(0) | ||
| expect(versionLinks[0]?.classes()).toContain('text-red-400') | ||
| }) | ||
|
|
@@ -230,10 +230,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Find version links (exclude anchor links that start with #) | ||
| // Find version links (exclude anchor links that start with # and external links) | ||
| const versionLinks = component | ||
| .findAll('a') | ||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| expect(versionLinks.length).toBeGreaterThan(0) | ||
| expect(versionLinks[0]?.attributes('title')).toContain('deprecated') | ||
| }) | ||
|
|
@@ -562,10 +562,10 @@ describe('PackageVersions', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Count visible version links (excluding anchor links that start with #) | ||
| // Count visible version links (excluding anchor links that start with # and external links) | ||
| const visibleLinks = component | ||
| .findAll('a') | ||
| .filter(a => !a.attributes('href')?.startsWith('#')) | ||
| .filter(a => !a.attributes('href')?.startsWith('#') && a.attributes('target') !== '_blank') | ||
| // Should have max 10 visible links in the main section | ||
| expect(visibleLinks.length).toBeLessThanOrEqual(10) | ||
| }) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🌐 Web query:
majors.nullvoxpopuli.com package query parameter format scoped packages💡 Result:
majors.nullvoxpopuli.comreads the package name(s) from thepackagesquery parameter (i.e.?packages=...). (nullvoxpopuli.com)For scoped npm packages, use normal URL-encoding for reserved characters—most importantly:
@→%40/→%2FExample:
Citations:
🏁 Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 1625
🏁 Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 88
🏁 Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 177
Encode
packageNamein the query string.Scoped package names (e.g.
@scope/package) contain characters like@and/that must be URL-encoded (%40and%2Frespectively) for the majors.nullvoxpopuli.com service to correctly parse the query parameter.🔧 Suggested change
📝 Committable suggestion