Skip to content

Commit 36e8591

Browse files
authored
Merge branch 'main' into docs/bb-auth-cognito-admin-design
2 parents 475353c + fdf84f7 commit 36e8591

56 files changed

Lines changed: 1519 additions & 113 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/hosting-custom-domain-docs.md

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

.github/workflows/e2e-amplify-interop.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,54 @@ jobs:
7777
npm create amplify@latest -- --yes
7878
node $GITHUB_WORKSPACE/packages/create-blocks-app/dist/index.js --yes .
7979
80+
# De-skew the sandbox typecheck against the drifting Amplify scaffold.
81+
#
82+
# `npm create amplify@latest` installs its OWN aws-cdk-lib/constructs at
83+
# whatever versions it currently ships, which drift from the versions this
84+
# repo builds against. The generated aws-blocks/index.cdk.ts resolves
85+
# aws-cdk-lib (Stack/Mixins) from THIS scaffold's tree, while the Blocks
86+
# packages — linked in as `file:` deps (symlinks) — resolve their own
87+
# constructs/aws-cdk-lib from the REPO's tree via the symlink realpath.
88+
# tsc dedups modules by package id (name@version), so when the two trees
89+
# are DIFFERENT versions it treats them as distinct declarations and the
90+
# nominally-private Construct#host member no longer matches — failing with
91+
# TS2345 "separate declarations of a private property 'host'".
92+
#
93+
# Fix: pin the scaffold's constructs/aws-cdk-lib to the repo's EXACT
94+
# installed versions (read from node_modules, not the package.json semver
95+
# range, so the ids match precisely — a range could resolve to a newer
96+
# patch and re-drift). The scaffold lists both as DIRECT devDependencies,
97+
# and npm refuses an `overrides` entry for a directly-depended package
98+
# unless the direct spec matches the override exactly (EOVERRIDE) — so pin
99+
# the direct dep specs to those same exact versions AND set the overrides
100+
# (the latter also dedupes any transitive copies), then reinstall. Matching
101+
# versions => matching package ids => tsc dedups to one declaration.
102+
- name: Pin constructs/aws-cdk-lib to the repo's versions
103+
run: |
104+
cd /tmp/amplify-interop-test
105+
node -e '
106+
const fs = require("fs");
107+
const ws = process.env.GITHUB_WORKSPACE;
108+
const ver = (n) => {
109+
try { return require(ws + "/node_modules/" + n + "/package.json").version; }
110+
catch { const p = require(ws + "/package.json"); return (p.devDependencies || {})[n] || (p.dependencies || {})[n]; }
111+
};
112+
const constructsV = ver("constructs"), cdkV = ver("aws-cdk-lib");
113+
if (!constructsV || !cdkV) throw new Error("could not determine constructs/aws-cdk-lib version from repo");
114+
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
115+
const pins = { constructs: constructsV, "aws-cdk-lib": cdkV };
116+
for (const [name, v] of Object.entries(pins)) {
117+
for (const bucket of ["dependencies", "devDependencies"]) {
118+
if (pkg[bucket] && pkg[bucket][name]) pkg[bucket][name] = v;
119+
}
120+
}
121+
pkg.overrides = { ...pkg.overrides, ...pins };
122+
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n");
123+
console.log("pinned constructs=" + constructsV + " aws-cdk-lib=" + cdkV + " (direct deps + overrides)");
124+
'
125+
rm -rf node_modules package-lock.json
126+
npm install
127+
80128
- name: Deploy sandbox
81129
run: |
82130
cd /tmp/amplify-interop-test

.github/workflows/publish-swift.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,17 @@ jobs:
136136
-not -name '..' \
137137
-exec rm -rf {} +
138138
139-
# Copy native/swift contents to target repo root
139+
# Copy native/swift contents to target repo root.
140+
# Anchor the root package.json/package-lock.json excludes with a
141+
# leading '/' so they only skip native/swift's changeset-tooling
142+
# manifests. Unanchored patterns match at every depth and would also
143+
# drop Demo/typescript-demo/package.json + package-lock.json, which
144+
# the demo needs (and which carry the dependency/security fixes).
140145
rsync -a --exclude='.changeset' \
141146
--exclude='node_modules' \
142147
--exclude='.build' \
143-
--exclude='package.json' \
144-
--exclude='package-lock.json' \
148+
--exclude='/package.json' \
149+
--exclude='/package-lock.json' \
145150
--exclude='Demo/typescript-demo/node_modules' \
146151
./ ../../target-repo/
147152

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ docs/tech-design-output
4545
.bb-data-*/
4646

4747
# Local dev artifacts
48-
CLAUDE.md
4948
conversation.md
5049
**/error_e2e_*.txt
5150
**/error_hosting.txt

0 commit comments

Comments
 (0)