Skip to content

@xterm/addon-ligatures@0.10.0: missing lib/addon-ligatures.js (only .mjs shipped) #5822

@dubynam

Description

@dubynam

Bug

@xterm/addon-ligatures@0.10.0 ships only the ESM build (lib/addon-ligatures.mjs) but package.json declares "main": "lib/addon-ligatures.js". The CJS/UMD build (lib/addon-ligatures.js) is absent from the published package.

Impact

Any host app using an AMD/CommonJS loader to load the addon by its main entry will get ERR_FILE_NOT_FOUND and silently fail to activate ligatures, even when the user has correctly configured terminal.integrated.fontLigatures.enabled.

package.json (installed)

{
  "name": "@xterm/addon-ligatures",
  "version": "0.10.0",
  "main": "lib/addon-ligatures.js",
  "module": "lib/addon-ligatures.mjs"
}

Actual lib/ contents

lib/addon-ligatures.mjs       ✅ present
lib/addon-ligatures.mjs.map   ✅ present
lib/addon-ligatures.js        ❌ MISSING

Workaround applied

Manually created lib/addon-ligatures.js by wrapping .mjs body (which has no top-level import statements) in a UMD shim:

!function(e,t){
  "object"==typeof exports&&"object"==typeof module?module.exports=t():
  "function"==typeof define&&define.amd?define([],t):
  e.LigaturesAddon=t().LigaturesAddon
}(globalThis,(()=>{
  // ...mjs body with export{Es as LigaturesAddon} removed...
  return {LigaturesAddon: Es};
}));

Steps to reproduce

  1. Install @xterm/addon-ligatures@0.10.0
  2. Attempt to require('@xterm/addon-ligatures/lib/addon-ligatures.js') or load it via AMD
  3. Error: Cannot find module / ERR_FILE_NOT_FOUND

Environment

  • @xterm/addon-ligatures version: 0.10.0
  • Host: Antigravity (Google IDE, Electron-based, AMD loader)
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions