prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey

fix package.json loading into cli (#18)

* fix package.json loading into cli

* changeset

authored by tyler and committed by GitHub 708fc60c 0f79944e

+6 -5
+5
.changeset/sweet-ducks-think.md
··· 1 + --- 2 + "prototypey": patch 3 + --- 4 + 5 + fix loading of version in cli
+1 -5
packages/prototypey/cli/main.ts
··· 1 1 #!/usr/bin/env node 2 2 3 - import { readFile } from "node:fs/promises"; 4 3 import sade from "sade"; 5 4 import { genEmit } from "./gen-emit.ts"; 6 - 7 - const pkg = JSON.parse( 8 - await readFile(new URL("../package.json", import.meta.url), "utf-8"), 9 - ) as { version: string }; 5 + import pkg from "../package.json" with { type: "json" }; 10 6 11 7 const prog = sade("prototypey"); 12 8