)]}'
{
  "commit": "f20f8c18cdcbbeb932d25f5e500140fa5b50c3ab",
  "tree": "ea35f9b2bc7c62a16bb8c8831acaa70c067c903d",
  "parents": [
    "7829d2f682d0a7ec46a05289124d60118ac551fc"
  ],
  "author": {
    "name": "Zalim Bashorov",
    "email": "zalim.bashorov@jetbrains.com",
    "time": "Wed Jun 24 01:01:14 2026 +0000"
  },
  "committer": {
    "name": "Zalim Bashorov",
    "email": "zalim.bashorov@jetbrains.com",
    "time": "Wed Jun 24 01:01:14 2026 +0000"
  },
  "message": "[Wasm] Support @JsExport.Default in Kotlin/Wasm\n\nThe @JsExport.Default annotation was already available in Kotlin/Wasm\n(same stdlib class as Kotlin/JS), but the Wasm backend ignored it and\ntreated the declaration as a regular named export instead of generating\nan ES module default export.\n\nTwo things were missing:\n\n1. TypeScript declarations (.d.mts): The Wasm ExportModelGenerator\u0027s\n   withAttributesFor() was not setting ExportedAttribute.DefaultExport\n   on declarations annotated with @JsExport.Default. Fix: check\n   isJsExportDefault() and add the attribute, the same way the JS\n   backend does in its ExportModelGenerator.\n\n2. JS wrapper (.mjs): generateExports() was treating all @JsExport\n   declarations as named exports. Fix: collect the set of\n   default-exported function names from the export model (which is now\n   always computed for wasm-js targets, not only when generateDts is\n   on), partition Wasm IR exports into named vs. default, emit\n   \u0027export const { ... }\u0027 only for named exports, and append\n   \u0027export default exports.name;\u0027 for each default export.\n\nThe defaultExportNames set flows from compileToLoweredIr() through\nLoweredIrWithExtraArtifacts and WasmIrModuleConfiguration to\ngenerateExports(). IC and WASI builds default to emptySet() since\ndefault-export semantics are not applicable there.\n\nTest: updated typescript-export/wasm/default to import produceUByte\nas a default export and to expect the correct .d.mts output.\n\nCo-Authored-By: Claude Sonnet 4.6 (1M context) \u003cnoreply@anthropic.com\u003e\n\n^KT-81801 Fixed\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ac4e384e0d38458765d4fab36a01b0bbdfc60571",
      "old_mode": 33188,
      "old_path": "compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/pipeline/web/wasm/KotlinIr2WasmIrCompiler.kt",
      "new_id": "acfeedbdb57212e83d04310633186de2f85eae22",
      "new_mode": 33188,
      "new_path": "compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/pipeline/web/wasm/KotlinIr2WasmIrCompiler.kt"
    },
    {
      "type": "modify",
      "old_id": "29c73cdd184201c9f738fa5991d6a9c6e049fc92",
      "old_mode": 33188,
      "old_path": "compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/export/ExportModelGenerator.kt",
      "new_id": "ce9df9073f2cee30034d464848935e0dfe9ee9cb",
      "new_mode": 33188,
      "new_path": "compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/export/ExportModelGenerator.kt"
    },
    {
      "type": "modify",
      "old_id": "03bf30bacbffa1f6fdcff405bb9830ca78bdacc5",
      "old_mode": 33188,
      "old_path": "compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt",
      "new_id": "2b336532898e376103053161ec91c4df4e1feb39",
      "new_mode": 33188,
      "new_path": "compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt"
    },
    {
      "type": "modify",
      "old_id": "75fa126d7298c2bf68bcbff14870ea649b0533b0",
      "old_mode": 33188,
      "old_path": "js/js.translator/testData/typescript-export/wasm/default/default__main.ts",
      "new_id": "4ac90426464c8206f0f2978c22135fc3eae1dc0e",
      "new_mode": 33188,
      "new_path": "js/js.translator/testData/typescript-export/wasm/default/default__main.ts"
    },
    {
      "type": "modify",
      "old_id": "bd2f4962341e4d1c6aa9a10dd05abad56f982afd",
      "old_mode": 33188,
      "old_path": "js/js.translator/testData/typescript-export/wasm/default/index.d.mts",
      "new_id": "365f6e3da42e7e1699e11ebec12ac70a9cca65f0",
      "new_mode": 33188,
      "new_path": "js/js.translator/testData/typescript-export/wasm/default/index.d.mts"
    }
  ]
}
