Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 9, 2024
1 parent e54fb9e commit 948e466
Show file tree
Hide file tree
Showing 12 changed files with 301 additions and 464 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sponsorkit",
"type": "module",
"version": "0.15.4",
"packageManager": "pnpm@9.8.0",
"packageManager": "pnpm@9.9.0",
"description": "Toolkit for generating sponsors images",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -55,24 +55,24 @@
"normalize-url": "^8.0.1",
"ofetch": "^1.3.4",
"p-limit": "^6.1.0",
"picocolors": "^1.0.1",
"picocolors": "^1.1.0",
"sharp": "^0.33.5",
"unconfig": "^0.5.5",
"yargs": "^17.7.2"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.1",
"@antfu/ni": "^0.22.4",
"@antfu/eslint-config": "^3.4.1",
"@antfu/ni": "^0.23.0",
"@types/d3-hierarchy": "^3.1.7",
"@types/node": "^22.5.0",
"@types/node": "^22.5.4",
"@types/yargs": "^17.0.33",
"bumpp": "^9.5.2",
"eslint": "^9.9.0",
"eslint": "^9.10.0",
"esno": "^4.7.0",
"jiti": "^1.21.6",
"typescript": "^5.5.4",
"unbuild": "^2.0.0",
"vite": "^5.4.2",
"vite": "^5.4.3",
"vitest": "^2.0.5"
},
"resolutions": {
Expand Down
698 changes: 267 additions & 431 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/configs/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SponsorkitConfig, Tier } from '../types'
import { tierPresets } from './tier-presets'
import type { SponsorkitConfig, Tier } from '../types'

export const defaultTiers: Tier[] = [
{
Expand Down
10 changes: 5 additions & 5 deletions src/configs/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { loadConfig as _loadConfig } from 'unconfig'
import type { SponsorkitConfig, Sponsorship, Tier, TierPartition } from '../types'
import { FALLBACK_AVATAR } from './fallback'
import { loadEnv } from './env'
import { defaultConfig } from './defaults'
import { loadEnv } from './env'
import { FALLBACK_AVATAR } from './fallback'
import type { SponsorkitConfig, Sponsorship, Tier, TierPartition } from '../types'

export * from './tier-presets'
export * from './fallback'
export * from './defaults'
export * from './fallback'
export * from './tier-presets'

export function defineConfig(config: SponsorkitConfig): SponsorkitConfig {
return config
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './types'
export * from './processing/svg'
export * from './processing/image'
export * from './configs'
export * from './processing/image'
export * from './processing/svg'
export * from './providers'
export * from './types'
2 changes: 1 addition & 1 deletion src/processing/image.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { consola } from 'consola'
import { $fetch } from 'ofetch'
import sharp from 'sharp'
import { consola } from 'consola'
import { version } from '../../package.json'
import type { SponsorkitConfig, Sponsorship } from '../types'

Expand Down
2 changes: 1 addition & 1 deletion src/providers/github/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { $fetch } from 'ofetch'
import type { Provider, SponsorkitConfig, Sponsorship } from '../../types'
import { normalizeUrl } from '../../utils'
import { getPastSponsors } from './get-past-sponsors'
import type { Provider, SponsorkitConfig, Sponsorship } from '../../types'

const API = 'https://api.github.com/graphql'
const graphql = String.raw
Expand Down
6 changes: 3 additions & 3 deletions src/providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Provider, ProviderName, SponsorkitConfig } from '../types'
import { AfdianProvider } from './afdian'
import { GitHubProvider } from './github'
import { PatreonProvider } from './patreon'
import { OpenCollectiveProvider } from './opencollective'
import { AfdianProvider } from './afdian'
import { PatreonProvider } from './patreon'
import { PolarProvider } from './polar'
import type { Provider, ProviderName, SponsorkitConfig } from '../types'

export * from './github'

Expand Down
2 changes: 1 addition & 1 deletion src/providers/opencollective.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $fetch } from 'ofetch'
import type { Provider, Sponsorship } from '../types'
import { normalizeUrl } from '../utils'
import type { Provider, Sponsorship } from '../types'

interface SocialLink {
type: string
Expand Down
4 changes: 2 additions & 2 deletions src/renders/circles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Sponsor, SponsorkitRenderer, Sponsorship } from '../types'
import { SvgComposer, generateBadge } from '../processing/svg'
import { base64ToArrayBuffer, pngToDataUri, round } from '../processing/image'
import { generateBadge, SvgComposer } from '../processing/svg'
import type { Sponsor, SponsorkitRenderer, Sponsorship } from '../types'

export const circlesRenderer: SponsorkitRenderer = {
name: 'sponsorkit:circles',
Expand Down
4 changes: 2 additions & 2 deletions src/renders/tiers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SponsorkitConfig, SponsorkitRenderer, Sponsorship } from '../types'
import { SvgComposer } from '../processing/svg'
import { partitionTiers } from '../configs'
import { tierPresets } from '../configs/tier-presets'
import { SvgComposer } from '../processing/svg'
import type { SponsorkitConfig, SponsorkitRenderer, Sponsorship } from '../types'

export const tiersRenderer: SponsorkitRenderer = {
name: 'sponsorkit:tiers',
Expand Down
15 changes: 8 additions & 7 deletions src/run.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { dirname, join, relative, resolve } from 'node:path'
import process from 'node:process'
/* eslint-disable unicorn/consistent-function-scoping */
import fs from 'node:fs'
import fsp from 'node:fs/promises'
import { dirname, join, relative, resolve } from 'node:path'
import process from 'node:process'
import { notNullish } from '@antfu/utils'
import { consola } from 'consola'
import c from 'picocolors'
import { notNullish } from '@antfu/utils'
import { version } from '../package.json'
import { loadConfig } from './configs'
import { resolveAvatars, svgToPng } from './processing/image'
import type { SponsorMatcher, SponsorkitConfig, SponsorkitMainConfig, SponsorkitRenderOptions, SponsorkitRenderer, Sponsorship } from './types'
import { guessProviders, resolveProviders } from './providers'
import { builtinRenderers } from './renders'
import type { SponsorkitConfig, SponsorkitMainConfig, SponsorkitRenderer, SponsorkitRenderOptions, SponsorMatcher, Sponsorship } from './types'

export {
// default
tiersRenderer as defaultRenderer,
tiersComposer as defaultComposer,
tiersComposer,

// default
tiersRenderer as defaultRenderer,
tiersRenderer,
tiersComposer,
} from './renders/tiers'

function r(path: string) {
Expand Down

0 comments on commit 948e466

Please sign in to comment.