Skip to content

chore: Remove build dependency on jq. #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions scripts/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ pwd
# each build output folder cjs and esm needs a package.json with
# at least the correct type attribute set. We additionally set
# name and version because the SDK logic uses those for analytics.
CJS_PACKAGE_JSON=$( jq -n \
--arg name "$NAME" \
--arg version "$VERSION" \
--arg type "commonjs" \
'{ name: $name, version: $version, type: $type }' )
ESM_PACKAGE_JSON=$( jq -n \
--arg name "$NAME" \
--arg version "$VERSION" \
--arg type "module" \
'{ name: $name, version: $version, type: $type }' )
CJS_PACKAGE_JSON="{
\"name\": \"$NAME\",
\"version\": \"$VERSION\",
\"type\": \"commonjs\"
}"
ESM_PACKAGE_JSON="{
\"name\": \"$NAME\",
\"version\": \"$VERSION\",
\"type\": \"module\"
}"

tsc --module commonjs --outDir dist/cjs/
echo "$CJS_PACKAGE_JSON" > dist/cjs/package.json
Expand Down