fix: normalize legacy cards in createFromAgentCard (#602) #1494
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ensures no accidental Node.js API usage in browser and Edge compatible | |
| # entrypoints, and that transport-scoped entrypoints resolve only their | |
| # declared peers. Each `test-build:*` step runs in a DIFFERENT environment: | |
| # 1. workers-safe: NO optional peer deps installed (no @grpc/grpc-js, | |
| # @bufbuild/protobuf, or express). esbuild fails natively if any | |
| # Workers-safe entry pulls them in. Mirrors what a real Workers / | |
| # REST-only consumer gets. | |
| # 2. grpc: @grpc/grpc-js + @bufbuild/protobuf reinstalled (still no | |
| # express); every gRPC entry must resolve. | |
| # 3. express: express reinstalled on top; every express entry must | |
| # resolve. | |
| name: Run Build Tests | |
| on: | |
| push: | |
| branches: [ "main", "epic/**" ] | |
| pull_request: | |
| branches: [ "main", "epic/**" ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| - '.github/CODEOWNERS' | |
| - 'test/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm run build | |
| # Strip ALL three optional peer deps so esbuild sees the same | |
| # module graph a non-gRPC, non-Express consumer would. Any | |
| # Workers-safe entrypoint that leaks one of them fails to resolve. | |
| - run: npm uninstall --no-save @grpc/grpc-js @bufbuild/protobuf express | |
| - run: npm run test-build:workers-safe | |
| # Reinstall only the gRPC peers; verify every gRPC entry resolves | |
| # (and would fail here if any of them silently required express). | |
| - run: npm install --no-save @grpc/grpc-js @bufbuild/protobuf | |
| - run: npm run test-build:grpc | |
| # Reinstall express; verify every express entry resolves. | |
| - run: npm install --no-save express | |
| - run: npm run test-build:express |