From 8428e5843cb31ca3ea1d17a4c8505ffcca1185bd Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 16 Dec 2024 09:09:39 -0800 Subject: [PATCH] ci: prune package.json before publish --- .github/workflows/release.yml | 3 +++ bun.lockb | Bin 28330 -> 28673 bytes package.json | 4 ++-- scripts/prune-package.ts | 10 ---------- 4 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 scripts/prune-package.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c98fe7..a8f9bca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,9 @@ jobs: - name: Build package run: bun run prepack + - name: Prune package + run: bunx culls --preserve=svelte + - name: Publish package env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/bun.lockb b/bun.lockb index 7e7419afac3a7bfe3756236d51a88aeb833f1c5b..1a5a101547cb822f9667cb8935a7cbdf8319bc4a 100755 GIT binary patch delta 2064 zcmeH|?{8C87{|}K+oUU88M3xpCO@4UV{EluV6Kd<8?dgn14-0&zzAVK*z7VkDG4gN z@dD#spfk@KNW@6Qn4pQ`g}orbXmnbMzCnYKU}7L4BZPz>31M%<@AqEZk?!X^! z>Ek1Nlx@)u5=)Fv+fVH;G6LQE1_$?|wF$VD8auO4sY2+L1xn3@&N%)m^gjiE(mG}M z3|H0ZiJwz<*Lti>{#cROfk8oZVvN$V#Z@h1o_P}YH0p0;+|z6r#d6-$WHc6w+uNjv zCF*U~S7qGWY*c#Wyf@S`2NMa6YJy@qFscE(j+Q`axtb?kKA#-$xklOZG=E^Zs^KpJ z)Wv`{n{uV40J%^r0e$YBM&LY+>3uJV1`)cQv~+nfQjDf7DvFrZ#%T&`+4S5mo!9sN!(mCFt| z`l{1TWmrRwKbvwMKRZJfmHImArJd1K`ZUHwXw?7D-%dsDcko|0fAg{Pw_Yzxd&83_ zhwtC_-n)26Ur08*ao2ORZ$;+%7oS{PUD5T++aYh{#;=FhOnf_jY*psNWMe|r}CsGSR%IqF}+?If(e-pnsO`{(;MXmyd!m{bkxOkM2^-abh~w@ zuDd|O1^H&S?1fReOc|+9nLiaPH4ioHH|Tt6Ssk&8LPt#bxGdnF<~@e}5S6bZ>qh^6 z_{i9_7I0HM9a`4sZG6^lQK}KjF}!dU&ht7bZ#w5WRavz0QwJlqgZgT>xJSG?0LseWe4S21Wf@NSi zcm|XM?ynN8kcOzg5Q(&RGAtue-{?+wtX3}rh7$tJLl`g=mey*(5JtdmunTm99>5B@ z2{1Gkeir*)&-|Ni9dF}3; zcG*)9x|VYPg~yYx?R=DdYFG}vnR&m*`MgRwt~&?oKA(@v99E|JC)>02+l>#;CF=#1 zh}e}HKkHD+27Q;J)GFwVD?9#Xa$|eMhgf#mCtu(v(__l5)kE zEc=jT|H3;3d+C>He?`P>fB&&;bjkn^7Y{cr>hlYn=T>obNr<_@)`!Fs%#~2E)p!zo zX3vWLL0woFcr}swX``-rJzh^CWcVw$DO}^8w?e7b hQLvYvDXCoVm8xL6@ikoSkiO$L??e*%?g$qfJi diff --git a/package.json b/package.json index 1c80888..4165713 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "prepack": "bun test", - "build:prune-package": "bun scripts/prune-package.ts" + "prepack": "bun test" }, "devDependencies": { "@carbon/icon-helpers": "latest", "@carbon/pictograms": "12.43.0", "@types/bun": "latest", + "culls": "^0.1.1", "sveld": "latest", "svelte": "^5.0.3", "typescript": "latest" diff --git a/scripts/prune-package.ts b/scripts/prune-package.ts deleted file mode 100644 index a090e5d..0000000 --- a/scripts/prune-package.ts +++ /dev/null @@ -1,10 +0,0 @@ -const pkgJson = await Bun.file("./package.json").json(); - -// Remove unrelated metadata from package.json for publishing. -delete pkgJson.scripts; -delete pkgJson.devDependencies; - -await Bun.write("./package.json", JSON.stringify(pkgJson, null, 2) + "\n"); - -export { }; -