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

Update dependency svelte-check to v4.0.2 #678

Merged
merged 2 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/components/Dropzone.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@

<div
class="dropzone"
role="region"
style="display: {dropZoneDisplayStyle};"
on:dragenter={allowDrag}
on:dragover={allowDrag}
on:dragleave={hideDropZone}
on:drop={handleDrop}></div>
on:drop={handleDrop}
></div>

<style>
.dropzone {
Expand Down
31 changes: 14 additions & 17 deletions src/components/PackageDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

function getGithubContributorsImageUrl(repositoryUrl = "", maxImages = 0) {
const matches = repositoryUrl.match(
"^(https|git)(://|@)([^/:]+)[/:]([^/:]+)/(.+)"
"^(https|git)(://|@)([^/:]+)[/:]([^/:]+)/(.+)",
);
const owner = matches[4];
const repo = matches[5];
Expand All @@ -53,31 +53,28 @@

function getGithubContributorsPageUrl(repositoryUrl = "") {
const matches = repositoryUrl.match(
"^(https|git)(://|@)([^/:]+)[/:]([^/:]+)/(.+)"
"^(https|git)(://|@)([^/:]+)[/:]([^/:]+)/(.+)",
);
const owner = matches[4];
const repo = matches[5];
return `https://github.com/${owner}/${repo}/graphs/contributors`;
}
</script>

<details
class="collapse-panel"
data-test-id="package-details"
{open}
on:click={({ currentTarget }) => {
onTogglePanel(!currentTarget.hasAttribute("open"));
}}
on:keypress={() => {}}
>
<summary class="collapse-header">
<details class="collapse-panel" data-test-id="package-details" {open}>
<summary
class="collapse-header"
on:click={({ currentTarget }) => {
onTogglePanel(!currentTarget.hasAttribute("open"));
}}
>
<div class="container-fluid">
<div class="row">
<div class="col text-truncate d-inline-block w-300">
<strong>{packageSearchResult.package.name}</strong>
<span class="text-muted">
{sanitizePackageDescription(
packageSearchResult.package.description
packageSearchResult.package.description,
)}
</span>
</div>
Expand Down Expand Up @@ -110,7 +107,7 @@
{#if packageSearchResult.package.links.repository && /github/i.test(packageSearchResult.package.links.repository)}
<a
href={getGithubContributorsPageUrl(
packageSearchResult.package.links.repository
packageSearchResult.package.links.repository,
)}
target="_blank"
rel="noreferrer"
Expand All @@ -120,7 +117,7 @@
on:error={handleImageError}
data-src={getGithubContributorsImageUrl(
packageSearchResult.package.links.repository,
12
12,
)}
alt="Contributors"
class="lazy img-fluid"
Expand All @@ -130,7 +127,7 @@
<br />
{/if}
{sanitizePackageDescription(
packageSearchResult.package.description
packageSearchResult.package.description,
)}
<br />
<span class="badge-group mt-5" role="group">
Expand All @@ -149,7 +146,7 @@
rel="noreferrer"
class="badge badge-pill"
>{formatToRelativeTime(
new Date(packageSearchResult.package.date)
new Date(packageSearchResult.package.date),
)}
</a>
</span>
Expand Down
6 changes: 6 additions & 0 deletions src/types/process.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare const process: {
env: {
COMMIT_SHORT_HASH: string;
BUILD_DATE_TIME: string;
};
};