Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move type:module declaration into package.json. #4355

Merged
merged 3 commits into from
Aug 20, 2024

Commits on Aug 20, 2024

  1. Rename switch_package_to_release.js to .cjs

    Slightly surprisingly, the symlink is enough to make `node
    switch_package_to_release.js` work.
    richvdh committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    1e2aa32 View commit details
    Browse the repository at this point in the history
  2. Rename .eslintrc.js to .cjs

    Again, declare this as commonjs
    richvdh committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    51fdaf9 View commit details
    Browse the repository at this point in the history
  3. Move type:module declaration into package.json.

    matrix-js-sdk is built into ECMAScript modules, and we should declare it as
    such. See https://nodejs.org/api/packages.html#type. Failure to do so causes
    problems for javascript projects attempting to build against matrix-js-sdk: see #4347.
    
    Previously, we did this as part of the package.json switcheroo, but that is
    unnecessarily fragile.
    
    matrix-react-sdk, element-web, etc are unaffected by this, because they use the
    typescript files directly, by importing `matrix-js-sdk/src/...`.
    richvdh committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    bc0f8c4 View commit details
    Browse the repository at this point in the history