Files
explore/scripts/shrinkwrap.mjs
b10fba99e6 Initial commit
Co-authored-by: Brent Vatne <[email protected]>
Co-authored-by: Szymon Dziedzic <[email protected]>
2026-10-14 14:10:07 -07:00

9 lines
477 B
JavaScript

#!/usr/bin/env node
// npm never publishes package-lock.json, but it installs a package's npm-shrinkwrap.json.
// Packing copies the lockfile so CI's `npm install @expo/explore@<version>` resolves the
// exact dependency tree this repository tested, then removes the copy.
import { copyFile, rm } from "node:fs/promises";
if (process.argv.includes("--remove")) await rm("npm-shrinkwrap.json", { force: true });
else await copyFile("package-lock.json", "npm-shrinkwrap.json");