Repository navigation
feat: smoke-test companion workspace package tarballs - #263
cybermax4200 wants to merge 5 commits into
Conversation
|
@cybermax4200 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
truthixify
left a comment
There was a problem hiding this comment.
Blocking: test/smoke/packages.mjs:282-295 deliberately skips every @wraith-protocol dependency, then lines 444-457 manually unpack only the target tarball. That is not the layout produced by npm/pnpm install: these companion packages legitimately declare the core SDK and other Wraith packages as dependencies, and pack rewrites workspace:* to publishable versions. The new required job therefore fails sdk-agent, sdk-react, sdk-vue, sdk-solid, and sdk-svelte on Node 20/22/24 by construction. Install the target tarball through the package manager and satisfy in-repo dependencies with their packed tarballs (or the rewritten published versions), then separately assert that no workspace: protocol remains in the packed manifest. The required matrix must pass.
- Replace installThirdPartyDeps + manual unpackTarball with installPackage, which writes a fixture package.json referencing @wraith-protocol/* deps as file: tarballs and third-party deps by version range, then runs pnpm install so the fixture layout matches a real consumer install. - Add packWraithDeps / collectWraithDeps to transitively pack every @wraith-protocol/* workspace dependency into the same temp dir. - Add noWorkspaceProtocolInPacked to assert pnpm rewrote all workspace:* references before packaging. - Remove mkdirSync import (no longer used). Fixes sdk-agent, sdk-react, sdk-vue, sdk-solid, sdk-svelte on Node 20/22/24.
It's done. Please review |
truthixify
left a comment
There was a problem hiding this comment.
The companion tarball matrix remains red on this head. The fixture exposes real publishability failures: sdk-agent imports AgentResponseError that the packed core does not export, sdk-react imports the unexported ./chains/stellar subpath, and the Vue/Solid/Svelte fixtures still resolve @wraith-protocol/sdk-agent from npm and get 404 instead of installing its packed workspace tarball. Ensure every declared Wraith dependency is packed and installed locally, then fix the packed core exports/version alignment so Node 20/22/24 all pass.
…rball-smoke-tests
- Correct packTarball to locate the exact package tarball by name and version instead of taking the last file in readdir order. - Cache packed workspace dependencies in a shared directory across the test run so transitive dependencies (like @wraith-protocol/sdk) are only built and packed once. - Write pnpm-workspace.yaml in clean fixtures to ensure pnpm overrides transitive @wraith-protocol/* workspace dependencies to local tarballs. - Simplify types check to resolve declarations directly from the fixture node_modules. - Fail immediately on fixture installation errors. - Guard dynamic require of react-native-get-random-values in sdk-react/native. - Declare @stellar/stellar-sdk in peerDependencies of sdk-vue and sdk-solid.
af38d85 to
28d19ec
Compare
truthixify
left a comment
There was a problem hiding this comment.
Changes requested on exact head 28d19ec. The companion package matrix is now green, so the prior packaging blocker is resolved. The required Security audit gate is still red on an untracked critical advisory: GHSA-2464-fhr4-w9xw (Next.js unauthenticated RCE through SVG Image Optimization), with next 14.2.35 installed and the reported patched line at >=15.5.28. Remediate the dependency and lockfile rather than allowlisting an unresolved critical RCE, then rerun the required gate.
What
Adds a
pnpm test:packagessmoke suite (test/smoke/packages.mjs) that packs each companion workspace package into a tarball and verifies it as an independently publishable package:sdk-agent,sdk-react,sdk-vue,sdk-solid,sdk-svelte,codemod,test-vectorstsupbuild →pnpm pack --dry-run --jsonfile-list check (filescoverage, deny rules, entry-point targets) → real tarball unpacked into a clean fixture'snode_modules/→ ESM import of every entry point →tsc --noEmitdeclaration resolution → documented-export existence check@wraith-protocol/*: workspace:*) cannot resolve from npm — the signal this issue asks forpackagesjob (Node 20/22/24) mirroring the existingentrypointsjobWhy
Wave 9's pack/export checks only covered the core SDK entrypoints;
sdk-react,sdk-vue,sdk-solid,sdk-svelte,sdk-agent,codemod, andtest-vectorswere never smoke-tested as independently published tarballs (#205 left a gap).Closes #241