Skip to content

Commit c152936

Browse files
committed
Merge branch 'main' into fix/stale-placeholder-config-json
2 parents 1705342 + 84bbf38 commit c152936

23 files changed

Lines changed: 325 additions & 69 deletions

.changeset/amplify-fresh-scaffold-guard.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.changeset/ci-pr-agent-bench.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/demo-template-xss-sanitization.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/dsql-index-sort-order.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/help-template-descriptions.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/pr-checks.yml

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,67 @@ jobs:
5353
echo "source-changed=false" >> "$GITHUB_OUTPUT"
5454
fi
5555
56+
blocks-integrity:
57+
name: Blocks Package Integrity
58+
runs-on: ubuntu-latest
59+
timeout-minutes: 10
60+
steps:
61+
- uses: actions/checkout@v5
62+
with:
63+
ref: ${{ github.event.pull_request.head.sha }}
64+
persist-credentials: false
65+
fetch-depth: 0
66+
67+
- uses: actions/setup-node@v5
68+
with:
69+
node-version-file: '.nvmrc'
70+
cache: npm
71+
72+
- run: npm ci
73+
74+
- name: Sync block docs (prebuild step)
75+
run: node scripts/sync-block-docs.mjs
76+
77+
- name: Check blocks package integrity
78+
run: |
79+
cd packages/blocks
80+
81+
# Pack the local package to get its shasum
82+
LOCAL_TARBALL=$(npm pack --pack-destination /tmp 2>/dev/null)
83+
LOCAL_INTEGRITY=$(shasum -a 512 "/tmp/$LOCAL_TARBALL" | awk '{print $1}')
84+
85+
# Get the current published version
86+
VERSION=$(node -p "require('./package.json').version")
87+
88+
# Fetch the published integrity hash — if the version isn't published yet, skip
89+
PUBLISHED_INTEGRITY=$(npm view "@aws-blocks/blocks@$VERSION" dist.shasum 2>/dev/null || echo "")
90+
91+
if [ -z "$PUBLISHED_INTEGRITY" ]; then
92+
echo "✅ Version $VERSION is not yet published on npm — nothing to compare."
93+
exit 0
94+
fi
95+
96+
echo "Local shasum: $LOCAL_INTEGRITY"
97+
echo "Published shasum: $PUBLISHED_INTEGRITY"
98+
99+
if [ "$LOCAL_INTEGRITY" = "$PUBLISHED_INTEGRITY" ]; then
100+
echo "✅ Package content matches the published version."
101+
exit 0
102+
fi
103+
104+
# Content differs — check if a changeset already bumps @aws-blocks/blocks
105+
cd "$GITHUB_WORKSPACE"
106+
CHANGESET_BUMPS=$(find .changeset -name '*.md' ! -name 'README.md' -exec grep -l '"@aws-blocks/blocks"' {} \;)
107+
108+
if [ -n "$CHANGESET_BUMPS" ]; then
109+
echo "✅ Package content changed but a changeset already bumps @aws-blocks/blocks:"
110+
echo "$CHANGESET_BUMPS"
111+
exit 0
112+
fi
113+
114+
echo "❌ The @aws-blocks/blocks package content has changed (synced docs from sibling packages), but no changeset bumps it. Add \"@aws-blocks/blocks\": patch to your changeset file."
115+
exit 1
116+
56117
build-and-test-local:
57118
name: Build, Unit Tests, E2E Local
58119
runs-on: ubuntu-latest
@@ -401,12 +462,17 @@ jobs:
401462
# (e2e-amplify-interop.yml) so their failures don't show red here.
402463
build-and-test:
403464
name: Build and Test
404-
needs: [build-and-test-local, e2e-templates, e2e-sandbox, e2e-sandbox-vpc, e2e-production, e2e-supabase, e2e-hosting]
465+
needs: [blocks-integrity, build-and-test-local, e2e-templates, e2e-sandbox, e2e-sandbox-vpc, e2e-production, e2e-supabase, e2e-hosting]
405466
runs-on: ubuntu-latest
406467
if: always()
407468
steps:
408469
- name: Check results
409470
run: |
471+
if [[ "${{ needs.blocks-integrity.result }}" != "success" ]]; then
472+
echo "blocks-integrity failed"
473+
exit 1
474+
fi
475+
410476
if [[ "${{ needs.build-and-test-local.result }}" != "success" ]]; then
411477
echo "build-and-test-local failed"
412478
exit 1

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/bb-distributed-data/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @aws-blocks/bb-distributed-data
22

3+
## 0.1.3
4+
5+
### Patch Changes
6+
7+
- c7f1e7c: Reject index key sort direction (`ASC`/`DESC`) in `CREATE INDEX` at dev time. DSQL does not allow a sort direction on index keys ("specifying sort order not supported for index keys"), but the PGlite-based local mock previously accepted it, so the error only surfaced on deploy. Migration and mock validation now fail locally instead. (`NULLS FIRST/LAST` is supported by DSQL and is not rejected.)
8+
39
## 0.1.2
410

511
### Patch Changes

packages/bb-distributed-data/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-blocks/bb-distributed-data",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"author": "Amazon Web Services",
55
"license": "Apache-2.0",
66
"type": "module",

packages/bb-realtime/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @aws-blocks/bb-realtime
22

3+
## 0.1.3
4+
5+
### Patch Changes
6+
7+
- 5491cae: Harden subscription token validation. Connect tokens now use a `$connect` suffix that prevents them from being reused as channel subscription tokens via prefix matching. Channel tokens remain valid as connect tokens. Backward-compatible during rollout.
8+
39
## 0.1.2
410

511
### Patch Changes

0 commit comments

Comments
 (0)