Skip to content

Commit

Permalink
chore(deps): update dependency catppuccin/palette to v1 (#999)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency catppuccin/palette to v1

* refactor(scripts/labels): update for `@catppuccin/palette` data structure changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: uncenter <[email protected]>
  • Loading branch information
renovate[bot] and uncenter authored Jun 14, 2024
1 parent 867c571 commit ce199b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"@/": "./scripts/",
"std/": "https://deno.land/[email protected]/",
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/d4f2666c2b04337f0a8632713de0889d9a7d332d/",
"@catppuccin/palette": "npm:@catppuccin/[email protected]",
"@actions/core": "npm:@actions/[email protected]",
"@octokit/rest": "npm:@octokit/[email protected]",
"ajv": "npm:[email protected]",
Expand Down
10 changes: 8 additions & 2 deletions deno.lock

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

12 changes: 5 additions & 7 deletions scripts/generate/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ import { REPO_ROOT } from "@/deps.ts";
import { updateFile } from "@/generate/utils.ts";
import { UserStylesSchema } from "@/types/mod.ts";
import { stringify } from "std/yaml/stringify.ts";
import palette from "https://raw.githubusercontent.com/catppuccin/palette/v0.2.0/palette-porcelain.json" with {
type: "json",
};
import { type ColorName, flavors } from "@catppuccin/palette";

/**
* Macchiato color definitions as hex values.
*/
const macchiatoHex = Object.entries(palette.macchiato)
.reduce((acc, [k, v]) => {
acc[k] = `#${v.hex}`;
const macchiatoHex = flavors.macchiato.colorEntries
.reduce((acc, [identifier, { hex }]) => {
acc[identifier] = hex;
return acc;
}, {} as Record<keyof typeof palette.macchiato, string>);
}, {} as Record<ColorName, string>);

const toIssueLabel = (slug: string | number) => `lbl:${slug}`;

Expand Down

0 comments on commit ce199b0

Please sign in to comment.