Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 11 additions & 1 deletion scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,25 @@ fi

for workspace in $WORKSPACES; do
echo "Publishing $workspace..."

# Use `yarn pack` to create a tarball with workspace:* references resolved
# to real version numbers. Plain `npm publish <dir>` does not understand
# Yarn's workspace: protocol, so consumers would see unresolvable deps.
TARBALL="/tmp/ld-publish-package.tgz"
rm -f "$TARBALL"
yarn --cwd "./$workspace" pack -o "$TARBALL"

# npm returns 403 when a version is already published. Tolerate this to allow
# partial retries (matching the old yarn --tolerate-republish behavior).
OUTPUT=$(npm publish "./$workspace" --access public --provenance $TAG_ARGS 2>&1) || {
OUTPUT=$(npm publish "$TARBALL" --access public --provenance $TAG_ARGS 2>&1) || {
if echo "$OUTPUT" | grep -q "You cannot publish over the previously published versions"; then
echo "Already published $workspace, skipping."
else
echo "$OUTPUT" >&2
echo "npm publish failed for $workspace" >&2
rm -f "$TARBALL"
exit 1
fi
}
rm -f "$TARBALL"
done
2 changes: 1 addition & 1 deletion sdk/@launchdarkly/observability/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@launchdarkly/observability",
"version": "1.1.1",
"description": "Browser observability for your web app. Capture frontend metrics, errors, logs and traces.",
"description": "Browser observability for your web app. Capture frontend metrics, errors, logs, and traces.",
"keywords": [
"launchdarkly",
"error monitoring",
Expand Down
2 changes: 1 addition & 1 deletion sdk/@launchdarkly/session-replay/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@launchdarkly/session-replay",
"version": "1.1.1",
"description": "Browser observability for your web app. Record session replays to visualize usage patterns.",
"description": "Browser session replay for your web app. Record session replays to visualize usage patterns.",
"keywords": [
"launchdarkly",
"session replay",
Expand Down
Loading