Skip to content

Commit

Permalink
pin peer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Jul 16, 2024
1 parent b3eb959 commit c4a48ea
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 52 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-snakes-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ryanatkn/fuz': minor
---

pin peer deps
33 changes: 17 additions & 16 deletions package-lock.json

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

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@
"node": ">=20.12"
},
"peerDependencies": {
"@ryanatkn/belt": "*",
"@ryanatkn/moss": "*",
"@ryanatkn/belt": "^0.24.9",
"@ryanatkn/gro": "^0.130.2",
"@ryanatkn/moss": "^0.8.0",
"@sveltejs/kit": "^2",
"svelte": "^5.0.0-next.0"
},
"devDependencies": {
"@changesets/changelog-git": "^0.2.0",
"@ryanatkn/belt": "^0.24.7",
"@ryanatkn/eslint-config": "^0.4.1",
"@ryanatkn/belt": "^0.24.9",
"@ryanatkn/eslint-config": "^0.4.2",
"@ryanatkn/fuz_code": "^0.16.0",
"@ryanatkn/gro": "^0.130.1",
"@ryanatkn/gro": "^0.130.2",
"@ryanatkn/moss": "^0.8.0",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.5.18",
Expand Down
18 changes: 5 additions & 13 deletions src/lib/Package_Detail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@
})
: null,
);
const logo_url = $derived(
pkg.homepage_url
? ensure_end(pkg.homepage_url, '/') +
(pkg.package_json.logo ? strip_start(pkg.package_json.logo, '/') : 'favicon.png')
: undefined,
);
const logo_alt = pkg.package_json.logo_alt ?? `logo for ${pkg.repo_name}`;
</script>

<div class="package_detail">
Expand Down Expand Up @@ -123,8 +115,8 @@
href={pkg.homepage_url}
>
<img
src={logo_url}
alt={logo_alt}
src={pkg.logo_url}
alt={pkg.logo_alt}
style:width="16px"
style:height="16px"
style:margin-right="var(--space_xs)"
Expand Down Expand Up @@ -176,11 +168,11 @@
</section>
</div>
</div>
{#if logo_url}
{#if pkg.logo_url}
<div class="logo">
<img
src={logo_url}
alt={logo_alt}
src={pkg.logo_url}
alt={pkg.logo_alt}
style:width="var(--size, var(--icon_size_xl2))"
style:height="var(--size, var(--icon_size_xl2))"
/>
Expand Down
17 changes: 4 additions & 13 deletions src/lib/Package_Summary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import type {Package_Meta} from '@ryanatkn/gro/package_meta.js';
import type {Snippet} from 'svelte';
import {format_url} from '@ryanatkn/belt/url.js';
import {ensure_end, strip_start} from '@ryanatkn/belt/string.js';
interface Props {
pkg: Package_Meta; // TODO normalized version with cached primitives?
Expand All @@ -20,14 +19,6 @@
$props();
const {package_json} = $derived(pkg);
const logo_url = $derived(
pkg.homepage_url
? ensure_end(pkg.homepage_url, '/') +
(pkg.package_json.logo ? strip_start(pkg.package_json.logo, '/') : 'favicon.png')
: undefined,
);
const logo_alt = pkg.package_json.logo_alt ?? `logo for ${pkg.repo_name}`;
</script>

<div class="package_summary">
Expand All @@ -40,13 +31,13 @@
{/if}
<!-- TODO maybe add `icon_alt` to package.json -->
<!-- TODO what about svg logos? maybe a package.json logo url that defaults to favicon? -->
{#if logo_url}
{#if pkg.logo_url}
{#if logo}
{@render logo(logo_url, logo_alt)}
{@render logo(pkg.logo_url, pkg.logo_alt)}
{:else}
<img
src={logo_url}
alt={logo_alt}
src={pkg.logo_url}
alt={pkg.logo_alt}
style:width="var(--size, var(--icon_size_xl2))"
style:height="var(--size, var(--icon_size_xl2))"
/>
Expand Down
11 changes: 6 additions & 5 deletions src/routes/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ export const package_json = {
type: 'module',
engines: {node: '>=20.12'},
peerDependencies: {
'@ryanatkn/belt': '*',
'@ryanatkn/moss': '*',
'@ryanatkn/belt': '^0.24.9',
'@ryanatkn/gro': '^0.130.2',
'@ryanatkn/moss': '^0.8.0',
'@sveltejs/kit': '^2',
svelte: '^5.0.0-next.0',
},
devDependencies: {
'@changesets/changelog-git': '^0.2.0',
'@ryanatkn/belt': '^0.24.7',
'@ryanatkn/eslint-config': '^0.4.1',
'@ryanatkn/belt': '^0.24.9',
'@ryanatkn/eslint-config': '^0.4.2',
'@ryanatkn/fuz_code': '^0.16.0',
'@ryanatkn/gro': '^0.130.1',
'@ryanatkn/gro': '^0.130.2',
'@ryanatkn/moss': '^0.8.0',
'@sveltejs/adapter-static': '^3.0.2',
'@sveltejs/kit': '^2.5.18',
Expand Down

0 comments on commit c4a48ea

Please sign in to comment.