Files
bun.sh/test/regression
Claude Bot 931b584820 feat: support WebAssembly import attributes with type "webassembly"
Changes bun to properly support WebAssembly imports using the web standard
"webassembly" type attribute instead of the non-standard "wasm" type.

## Changes

- Modified js_printer.zig to output `type: "webassembly"` for .wasm files
  (following web standards)
- Added "webassembly" -> .wasm mapping to options.zig to support both forms
- Restructured import attribute handling to always preserve web standard
  attributes (css, json, webassembly) while only preserving Bun-specific
  attributes when on Bun platform
- Added comprehensive tests for WebAssembly import attribute behavior

## Before
```javascript
import module from './module.wasm' with { type: 'webassembly' };
// Transpiled to:
import module from './module.wasm'; //  attribute stripped
```

## After
```javascript
import module from './module.wasm' with { type: 'webassembly' };
// Transpiled to:
import module from './module.wasm' with { type: 'webassembly' }; //  preserved
```

This ensures full compliance with WebAssembly ES module integration spec
while maintaining backward compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-15 00:35:15 +00:00
..