diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37874e90dd..e57dc6cacc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: run: npm run build:docs - name: Prune package.json - run: node scripts/build-package.js + run: npx culls --preserve=svelte - name: Publish package (stable) if: ${{ ! contains(github.ref, '-next') }} diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000..1f96ec1f4a Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json index 7aacfaf131..a67f31f31e 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "carbon-components": "10.58.12", "carbon-icons-svelte": "^12.1.0", "carbon-preprocess-svelte": "^0.11.7", + "culls": "^0.1.1", "jsdom": "^25.0.1", "postcss": "^8.4.16", "prettier": "^3.3.3", diff --git a/scripts/build-package.js b/scripts/build-package.js deleted file mode 100644 index f05a8f3e0f..0000000000 --- a/scripts/build-package.js +++ /dev/null @@ -1,25 +0,0 @@ -// @ts-check -import fs from "node:fs"; -import path from "node:path"; -import pkg from "../package.json" assert { type: "json" }; - -/** @type {Array} */ -const keys_to_remove = ["prettier", "standard-version", "devDependencies"]; - -for (const key of keys_to_remove) { - delete pkg[key]; -} - -/** @type {Set} */ -const scripts_to_keep = new Set(["postinstall"]); - -for (const script in pkg.scripts) { - // @ts-ignore - if (!scripts_to_keep.has(script)) { - delete pkg.scripts[script]; - } -} - -// Write the updated package.json file. -const pkgPath = path.join(process.cwd(), "package.json"); -fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");