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

Fix incorrect public TS class field name minification #15411

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

heimskr
Copy link
Member

@heimskr heimskr commented Nov 26, 2024

What does this PR do?

Fixes a bug where public TS class field names would be minified. This PR preserves the original names.

Fixes #15401

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

Added a new test to test/bundler/bundler_edgecase.test.ts.

  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I included a test for the new code, or an existing test covers it
  • JSValue used outside outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
  • I wrote TypeScript/JavaScript tests and they pass locally (bun-debug test test-file-name.test)

@robobun
Copy link

robobun commented Nov 26, 2024

@heimskr, your commit b97aa65 has 14 failures in #6876:

  • test/cli/install/registry/bun-install-registry.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 aarch64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 12 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 11 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/watch/fs.watch.test.ts - 3 failing on 🍎 14 aarch64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 aarch64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/fs-watch.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-assert-leaks.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-add-file-to-existing-subfolder.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-encoding.test.js - 2 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/timers-ordering.test.js - 1 failing on 🐧 22.04 aarch64
  • test/js/node/test/parallel/timers-ordering.test.js - 1 failing on 🐧 22.04 x64-baseline
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 x64
  • test/js/bun/http/serve.test.ts - 1 failing on 🍎 13 aarch64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 aarch64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64
  • test/js/bun/http/serve.test.ts - 1 failing on 🍎 14 x64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64-baseline
  • test/cli/hot/hot.test.ts - timeout on 🍎 14 aarch64
  • test/cli/hot/hot.test.ts - timeout on 🐧 3.20 x64
  • @heimskr heimskr requested review from a team and cirospaciari and removed request for a team November 26, 2024 04:36
    @cirospaciari cirospaciari requested review from paperdave and removed request for cirospaciari November 26, 2024 20:39
    @paperdave paperdave merged commit 7fd16eb into main Nov 27, 2024
    58 of 63 checks passed
    @paperdave paperdave deleted the kai/fix-ts-minified-field-names branch November 27, 2024 22:06
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    --minify-identifiers is adding new mangled class properties
    3 participants