From cec1a0779921f7d792d1511826f74d7c4c357994 Mon Sep 17 00:00:00 2001 From: Denis Rossati Date: Wed, 17 Jun 2026 23:48:29 -0300 Subject: [PATCH] Replace sed with jq --- .github/workflows/deploy-preview.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 642a849..9899086 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -33,8 +33,15 @@ jobs: run: |- cp package.json LICENSE README.md dist/ cd dist - sed -i -e "s~\"main\": \"dist/index.js\"~\"main\": \"index.js\"~" package.json - sed -i -e "s~\"types\": \"dist/index.d.ts\"~\"types\": \"index.d.ts\"~" package.json + + tmp=$(mktemp) + + jq ' + .main = "index.js" | + .types = "index.d.ts" + ' package.json > "$tmp" + + mv "$tmp" package.json - name: Publish preview run: |-