-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add /*@__PURE__*/ annotation for better tree-shaking support #470
Add /*@__PURE__*/ annotation for better tree-shaking support #470
Conversation
Hey @pmzi, this makes sense in general (and should be applicable to But to add the annotation, we need a good understanding of where it's necessary, and ideally some test to proof we're doing the right thing, or at least a reproducible example. |
Thanks @timostamm for your response. I will work on a reproducible example for unused message types. Is that what you are asking for? |
Hi @pmzi. Yes, something along those lines. We basically want to understand all the places it's necessary. So coming with a reproducible example as well as some unit tests that verify we're fixing things correctly would definitely help. |
Hi @smaye81, Okay. I will work on it. |
Adding The same annotation works for makeEnum calls as well. |
I added the annotation for Thanks @dae for the example. |
CC: @smaye81 @timostamm |
Hi @pmzi thanks for the update. We'd still like to see some tests to confirm the fix and to make sure nothing regresses in the future. Granted, the tests probably aren't easy and are going to end up being somewhat ugly, but we don't want to just drop these annotations into the generated code without some sort of verification they're providing a meaningful improvement. |
Is the ask that we confirm that the pure comments actually work for tree-shaking purposes (easy-ish, but simply testing some parser/bundler implementation) or that we add tests to ensure that for all code for which we've added a pure comment are, in fact, pure (very difficult: parse generated code, instrument AST to track every mutation/setter, output AST to JS, execute all code for which we've added a pure comment and ensure no unexpected mutation/setter are run)? |
It would be the former, yeah. Just verification that adding the |
@pmzi we did some testing on |
@smaye81, thanks for the update, I just resolved the conflicts. |
Should I do something to fix the CI failure or it's okay? @smaye81 |
Yeah, you will need to run See our https://github.com/bufbuild/protobuf-es/blob/main/.github/CONTRIBUTING.md docs too for more info. |
@smaye81 done. Thanks for the help. |
This was just released in v1.8.0. |
This annotation informs bundlers that the succeeding function call is free of side effects. This means the symbol can be removed from the module during tree-shaking if it is unused. See #470 The annotation is not terribly effective yet, since all generated descriptors depend on the file descriptor, but it's still worthwhile.
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@bufbuild/protoc-gen-es](https://togithub.com/bufbuild/protobuf-es) ([source](https://togithub.com/bufbuild/protobuf-es/tree/HEAD/packages/protoc-gen-es)) | [`1.7.2` -> `1.8.0`](https://renovatebot.com/diffs/npm/@bufbuild%2fprotoc-gen-es/1.7.2/1.8.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@heroicons/react](https://togithub.com/tailwindlabs/heroicons) | [`2.1.1` -> `2.1.3`](https://renovatebot.com/diffs/npm/@heroicons%2freact/2.1.1/2.1.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@swc/core](https://swc.rs) ([source](https://togithub.com/swc-project/swc)) | [`1.4.6` -> `1.4.11`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.4.6/1.4.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@testing-library/react](https://togithub.com/testing-library/react-testing-library) | [`14.2.1` -> `14.2.2`](https://renovatebot.com/diffs/npm/@testing-library%2freact/14.2.1/14.2.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.2.64` -> `18.2.73`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.64/18.2.73) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/react-dom](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom)) | [`18.2.21` -> `18.2.23`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.2.21/18.2.23) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`7.4.0` -> `7.5.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.4.0/7.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`7.4.0` -> `7.5.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/7.4.0/7.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@typescript-eslint/typescript-estree](https://typescript-eslint.io/packages/typescript-estree) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree)) | [`7.1.1` -> `7.5.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2ftypescript-estree/7.1.1/7.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [act](https://togithub.com/nektos/act) | `0.2.60` -> `0.2.61` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | patch | | [autoprefixer](https://togithub.com/postcss/autoprefixer) | [`10.4.18` -> `10.4.19`](https://renovatebot.com/diffs/npm/autoprefixer/10.4.18/10.4.19) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [connectrpc.com/connect](https://togithub.com/connectrpc/connect-go) | `v1.15.0` -> `v1.16.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [dbmate](https://togithub.com/amacneil/dbmate) | `2.13.0` -> `2.14.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [eslint-plugin-react](https://togithub.com/jsx-eslint/eslint-plugin-react) | [`7.34.0` -> `7.34.1`](https://renovatebot.com/diffs/npm/eslint-plugin-react/7.34.0/7.34.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [github.com/alecthomas/assert/v2](https://togithub.com/alecthomas/assert) | `v2.6.0` -> `v2.7.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [github.com/amacneil/dbmate/v2](https://togithub.com/amacneil/dbmate) | `v2.12.0` -> `v2.14.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [github.com/swaggest/jsonschema-go](https://togithub.com/swaggest/jsonschema-go) | `v0.3.69` -> `v0.3.70` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/tmc/langchaingo](https://togithub.com/tmc/langchaingo) | `v0.1.5` -> `v0.1.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/zalando/go-keyring](https://togithub.com/zalando/go-keyring) | `v0.2.3` -> `v0.2.4` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [helm](https://togithub.com/helm/helm) | `3.14.2` -> `3.14.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | patch | | [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `v1.29.3` -> `v1.29.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [otel-cli](https://togithub.com/equinix-labs/otel-cli) | `0.4.1` -> `0.4.4` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | patch | | [postcss](https://postcss.org/) ([source](https://togithub.com/postcss/postcss)) | [`8.4.35` -> `8.4.38`](https://renovatebot.com/diffs/npm/postcss/8.4.35/8.4.38) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [postcss-nesting](https://togithub.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme) ([source](https://togithub.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-nesting)) | [`12.1.0` -> `12.1.1`](https://renovatebot.com/diffs/npm/postcss-nesting/12.1.0/12.1.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [pre-commit](https://togithub.com/pre-commit/pre-commit) | `3.6.2` -> `3.7.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [protoc](https://togithub.com/protocolbuffers/protobuf) | `26.0` -> `26.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [sqlc](https://togithub.com/sqlc-dev/sqlc) | `1.25.0` -> `1.26.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [tailwindcss](https://tailwindcss.com) ([source](https://togithub.com/tailwindlabs/tailwindcss)) | [`3.4.1` -> `3.4.3`](https://renovatebot.com/diffs/npm/tailwindcss/3.4.1/3.4.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [typescript](https://www.typescriptlang.org/) ([source](https://togithub.com/Microsoft/TypeScript)) | [`5.4.2` -> `5.4.3`](https://renovatebot.com/diffs/npm/typescript/5.4.2/5.4.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [vite](https://vitejs.dev) ([source](https://togithub.com/vitejs/vite/tree/HEAD/packages/vite)) | [`4.5.2` -> `4.5.3`](https://renovatebot.com/diffs/npm/vite/4.5.2/4.5.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [yq](https://togithub.com/mikefarah/yq) | `4.42.1` -> `4.43.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [org.apache.maven.plugins:maven-gpg-plugin](https://maven.apache.org/plugins/) | `3.1.0` -> `3.2.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | build | minor | | [org.apache.maven.plugins:maven-compiler-plugin](https://maven.apache.org/plugins/) | `3.12.1` -> `3.13.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | build | minor | | [com.squareup.wire:wire-compiler](https://togithub.com/square/wire) | `4.9.7` -> `4.9.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | patch | | [com.squareup.wire:wire-grpc-client-jvm](https://togithub.com/square/wire) | `4.9.7` -> `4.9.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | | [com.squareup.wire:wire-grpc-server](https://togithub.com/square/wire) | `4.9.7` -> `4.9.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | | [com.squareup.wire:wire-runtime-jvm](https://togithub.com/square/wire) | `4.9.7` -> `4.9.8` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | | [io.gitlab.arturbosch.detekt:detekt-test](https://detekt.dev) ([source](https://togithub.com/detekt/detekt)) | `1.23.5` -> `1.23.6` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | test | patch | | [io.gitlab.arturbosch.detekt:detekt-api](https://detekt.dev) ([source](https://togithub.com/detekt/detekt)) | `1.23.5` -> `1.23.6` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | | [org.postgresql:postgresql](https://jdbc.postgresql.org) ([source](https://togithub.com/pgjdbc/pgjdbc)) | `42.7.2` -> `42.7.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | | [org.jetbrains.kotlin:kotlin-maven-plugin](https://kotlinlang.org/) ([source](https://togithub.com/JetBrains/kotlin)) | `1.9.22` -> `1.9.23` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | build | patch | | [org.jetbrains.kotlin:kotlin-stdlib](https://kotlinlang.org/) ([source](https://togithub.com/JetBrains/kotlin)) | `1.9.22` -> `1.9.23` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | compile | patch | --- ### Release Notes <details> <summary>bufbuild/protobuf-es (@​bufbuild/protoc-gen-es)</summary> ### [`v1.8.0`](https://togithub.com/bufbuild/protobuf-es/releases/tag/v1.8.0) [Compare Source](https://togithub.com/bufbuild/protobuf-es/compare/v1.7.2...v1.8.0) #### What's Changed - Introduce type guard isMessage by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/728](https://togithub.com/bufbuild/protobuf-es/pull/728) - Remove node export conditions by [@​smaye81](https://togithub.com/smaye81) in [https://github.com/bufbuild/protobuf-es/pull/744](https://togithub.com/bufbuild/protobuf-es/pull/744) - Replace instanceof Message usages by [@​smaye81](https://togithub.com/smaye81) in [https://github.com/bufbuild/protobuf-es/pull/729](https://togithub.com/bufbuild/protobuf-es/pull/729) - Add `/*@​__PURE__*/` annotation for better tree-shaking support by [@​pmzi](https://togithub.com/pmzi) in [https://github.com/bufbuild/protobuf-es/pull/470](https://togithub.com/bufbuild/protobuf-es/pull/470) - Introduce type ScalarValue and rename function scalarDefaultValue by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/711](https://togithub.com/bufbuild/protobuf-es/pull/711) - Add "dependencies" to DescFile by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/727](https://togithub.com/bufbuild/protobuf-es/pull/727) - Update to google protobuf v26.0 by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/747](https://togithub.com/bufbuild/protobuf-es/pull/747) - Deprecate field helper functions from [@​bufbuild/protoplugin](https://togithub.com/bufbuild/protoplugin) by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/712](https://togithub.com/bufbuild/protobuf-es/pull/712) - Deprecate properties toString and text of JSDocBlock by [@​timostamm](https://togithub.com/timostamm) in [https://github.com/bufbuild/protobuf-es/pull/721](https://togithub.com/bufbuild/protobuf-es/pull/721) #### New Contributors - [@​pmzi](https://togithub.com/pmzi) made their first contribution in [https://github.com/bufbuild/protobuf-es/pull/470](https://togithub.com/bufbuild/protobuf-es/pull/470) **Full Changelog**: https://github.com/bufbuild/protobuf-es/compare/v1.7.2...v1.8.0 </details> <details> <summary>tailwindlabs/heroicons (@​heroicons/react)</summary> ### [`v2.1.3`](https://togithub.com/tailwindlabs/heroicons/blob/HEAD/CHANGELOG.md#213---2024-03-22) [Compare Source](https://togithub.com/tailwindlabs/heroicons/compare/v2.1.2...v2.1.3) - Improve project READMEs ([#​1152](https://togithub.com/tailwindlabs/heroicons/pull/1152)) ### [`v2.1.2`](https://togithub.com/tailwindlabs/heroicons/releases/tag/v2.1.2) [Compare Source](https://togithub.com/tailwindlabs/heroicons/compare/v2.1.1...v2.1.2) - Include license file with published packages ([#​1151](https://togithub.com/tailwindlabs/heroicons/pull/1151)) </details> <details> <summary>swc-project/swc (@​swc/core)</summary> ### [`v1.4.11`](https://togithub.com/swc-project/swc/compare/v1.4.8...v1.4.11) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.4.8...v1.4.11) ### [`v1.4.8`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#148---2024-03-14) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.4.7...v1.4.8) ##### Bug Fixes - **(es/module)** Fix regression of resolving relative modules ([#​8748](https://togithub.com/swc-project/swc/issues/8748)) ([f988b66](https://togithub.com/swc-project/swc/commit/f988b66e1fd921266a8abf6fe9bb997b6878e949)) - **(es/parser)** Allow `export` after decorators when valid ([#​8739](https://togithub.com/swc-project/swc/issues/8739)) ([663261b](https://togithub.com/swc-project/swc/commit/663261be97364911e7b57eab0560ee48e53d8f33)) ##### Miscellaneous Tasks - **(es)** Allow using older `tokio` ([#​8740](https://togithub.com/swc-project/swc/issues/8740)) ([9c1eb01](https://togithub.com/swc-project/swc/commit/9c1eb017fcd90bd21b43f1a988c7fc67639343c1)) ### [`v1.4.7`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#147---2024-03-13) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.4.6...v1.4.7) ##### Bug Fixes - **(es/minifier)** Fix eval of `toString` of array with holes ([#​8727](https://togithub.com/swc-project/swc/issues/8727)) ([f3fbd9d](https://togithub.com/swc-project/swc/commit/f3fbd9d54925b708139a37865508430cdcb98f9a)) - **(es/minifier)** Do not evaluate `slice` calls with negative index ([#​8726](https://togithub.com/swc-project/swc/issues/8726)) ([23f9635](https://togithub.com/swc-project/swc/commit/23f9635d2cb523d63e5d1611dcf55922bcc54a87)) - **(es/minifier)** Handle cyclic references while dropping unused properties ([#​8725](https://togithub.com/swc-project/swc/issues/8725)) ([102241b](https://togithub.com/swc-project/swc/commit/102241b812b8e815b59575178193bb71b4264bab)) - **(es/minifier)** Fix evaluation of array literals with `void 0` ([#​8733](https://togithub.com/swc-project/swc/issues/8733)) ([aa0154d](https://togithub.com/swc-project/swc/commit/aa0154d2d86b0bed7ffed3324c7a650ffe111c93)) - **(es/minifier)** Fix removal of array pattern bindings ([#​8730](https://togithub.com/swc-project/swc/issues/8730)) ([312f0d8](https://togithub.com/swc-project/swc/commit/312f0d8427b3c4436b491ed4265f9469dc017f8f)) - **(es/minifier)** Make `Finalizer` handle `hoisted_props` correctly ([#​8738](https://togithub.com/swc-project/swc/issues/8738)) ([95761b7](https://togithub.com/swc-project/swc/commit/95761b76bf09a4d2c09517b2bd7bf7b78ee2149f)) - **(es/proposal)** Fix var placement for using transform ([#​8732](https://togithub.com/swc-project/swc/issues/8732)) ([633cd89](https://togithub.com/swc-project/swc/commit/633cd89bacef5f0efef20f1dfa709cff1ecba36f)) ##### Features - **(es/lints)** Add `no-prototype-builtins` rule ([#​8684](https://togithub.com/swc-project/swc/issues/8684)) ([a5dbb17](https://togithub.com/swc-project/swc/commit/a5dbb17612327c66366086f99b44c6731d125ffc)) - **(es/lints)** Add `prefer-object-spread` rule ([#​8696](https://togithub.com/swc-project/swc/issues/8696)) ([aa9297b](https://togithub.com/swc-project/swc/commit/aa9297b42e001f6b7319881870f6012a56c50aef)) ##### Refactor - **(es)** Prepare `wasm32-wasi-preview1-threads` target support ([#​8724](https://togithub.com/swc-project/swc/issues/8724)) ([e3acd14](https://togithub.com/swc-project/swc/commit/e3acd1476c2428e5329a359bb7323687c06108d2)) </details> <details> <summary>testing-library/react-testing-library (@​testing-library/react)</summary> ### [`v14.2.2`](https://togithub.com/testing-library/react-testing-library/compare/v14.2.1...3da62fd9741ca74bcd0d2bc668ba76a2d8f3751f) [Compare Source](https://togithub.com/testing-library/react-testing-library/compare/v14.2.1...v14.2.2) </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v7.5.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#750-2024-04-01) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.4.0...v7.5.0) ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] handle TaggedTemplateExpression - **eslint-plugin:** \[no-unnecessary-type-assertion] handle exactOptionalPropertyTypes compiler option ##### ❤️ Thank You - Brad Zacher - Kim Sang Du - Mark de Dios - Naru - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v7.5.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#750-2024-04-01) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.4.0...v7.5.0) ##### 🩹 Fixes - **parser:** disallow `errorOnTypeScriptSyntacticAndSemanticIssues` ##### ❤️ Thank You - Brad Zacher - Kim Sang Du - Mark de Dios - Naru - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/typescript-estree)</summary> ### [`v7.5.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-estree/CHANGELOG.md#750-2024-04-01) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.4.0...v7.5.0) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.4.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-estree/CHANGELOG.md#740-2024-03-25) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) ##### 🚀 Features - **eslint-plugin:** \[consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata ##### ❤️ Thank You - Abraham Guo - Brad Zacher - Josh Goldberg ✨ - Kim Sang Du - Kirk Waiblinger - Marco Pasqualetti - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.3.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-estree/CHANGELOG.md#731-2024-03-18) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.3.0...v7.3.1) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.3.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-estree/CHANGELOG.md#730-2024-03-18) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.2.0...v7.3.0) ##### 🚀 Features - **typescript-estree:** disallow switch statements with multiple default cases ##### 🩹 Fixes - correct `engines.node` constraints in `package.json` - **eslint-plugin:** \[no-unnecessary-type-assertion] fix false negative for const variable declarations - **typescript-estree:** fix the issue of single run inferring in the pnpm repo ##### ❤️ Thank You - Abraham Guo - Alexu - Arka Pratim Chaudhuri - auvred - Derrick Isaacson - fnx - Josh Goldberg ✨ - Kirk Waiblinger - Marta Cardoso - Michaël De Boey - Tristan Rasmussen - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.2.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-estree/CHANGELOG.md#720-2024-03-11) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.1.1...v7.2.0) ##### 🚀 Features - support TS 5.4 ##### ❤️ Thank You - Arka Pratim Chaudhuri - auvred - Chris Plummer - Fotis Papadogeorgopoulos - Josh Goldberg ✨ - Kirk Waiblinger - Wayne Zhang - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>nektos/act (act)</summary> ### [`v0.2.61`](https://togithub.com/nektos/act/releases/tag/v0.2.61) #### Changelog ##### Bug fixes - [`f825e42`](https://togithub.com/nektos/act/commit/f825e42) fix: cache adjust restore order of exact key matches ([#​2267](https://togithub.com/nektos/act/issues/2267)) - [`119ceb8`](https://togithub.com/nektos/act/commit/119ceb8) fix: rootless permission bits (new actions cache) ([#​2242](https://togithub.com/nektos/act/issues/2242)) - [`75e4ad9`](https://togithub.com/nektos/act/commit/75e4ad9) fix: docker buildx cache restore not working ([#​2236](https://togithub.com/nektos/act/issues/2236)) ##### Other - [`361b7e9`](https://togithub.com/nektos/act/commit/361b7e9) chore: bump VERSION to 0.2.61 - [`d9a19c8`](https://togithub.com/nektos/act/commit/d9a19c8) Trivial: reduce log spam. ([#​2256](https://togithub.com/nektos/act/issues/2256)) - [`3949d74`](https://togithub.com/nektos/act/commit/3949d74) chore: remove repetitive words ([#​2259](https://togithub.com/nektos/act/issues/2259)) - [`b9382a2`](https://togithub.com/nektos/act/commit/b9382a2) Support overwriting caches ([#​2265](https://togithub.com/nektos/act/issues/2265)) - [`f56dd65`](https://togithub.com/nektos/act/commit/f56dd65) test: use ping to improve network test ([#​2266](https://togithub.com/nektos/act/issues/2266)) - [`069720a`](https://togithub.com/nektos/act/commit/069720a) build(deps): bump github.com/docker/docker ([#​2252](https://togithub.com/nektos/act/issues/2252)) - [`8c83d57`](https://togithub.com/nektos/act/commit/8c83d57) build(deps): bump golang.org/x/term from 0.17.0 to 0.18.0 ([#​2244](https://togithub.com/nektos/act/issues/2244)) - [`352ad41`](https://togithub.com/nektos/act/commit/352ad41) fix function name in comment ([#​2240](https://togithub.com/nektos/act/issues/2240)) - [`934b13a`](https://togithub.com/nektos/act/commit/934b13a) build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 ([#​2235](https://togithub.com/nektos/act/issues/2235)) </details> <details> <summary>postcss/autoprefixer (autoprefixer)</summary> ### [`v10.4.19`](https://togithub.com/postcss/autoprefixer/blob/HEAD/CHANGELOG.md#10419) [Compare Source](https://togithub.com/postcss/autoprefixer/compare/10.4.18...10.4.19) - Removed `end value has mixed support, consider using flex-end` warning since `end`/`start` now have good support. </details> <details> <summary>connectrpc/connect-go (connectrpc.com/connect)</summary> ### [`v1.16.0`](https://togithub.com/connectrpc/connect-go/releases/tag/v1.16.0) [Compare Source](https://togithub.com/connectrpc/connect-go/compare/v1.15.0...v1.16.0) This release is mostly bug fixes but also reconciles connect-go with recent updates to the specification regarding mapping of RPC error codes to/from HTTP status codes (see [connectrpc RFC 003](https://togithub.com/connectrpc/connectrpc.com/pull/148)) #### What's Changed ##### Other changes - Revise RPC error code <-> HTTP status code mappings per latest changes to spec by [@​jhump](https://togithub.com/jhump) in [#​706](https://togithub.com/connectrpc/connect-go/issues/706) ##### Enhancements - Only send a grpc-status-details-bin trailer in the gRPC protocol if the error has details by [@​bhollis](https://togithub.com/bhollis) in [#​713](https://togithub.com/connectrpc/connect-go/issues/713) ##### Bugfixes - Fix `ErrorWriter IsSupported` check to report false on ambiguous content-type and options indicate connect protocol version header is required by [@​emcfarlane](https://togithub.com/emcfarlane) in [#​700](https://togithub.com/connectrpc/connect-go/issues/700) - In Connect unary protocol, fallback to code based on HTTP status if unable to deserialize code from JSON body by [@​jhump](https://togithub.com/jhump) in [#​702](https://togithub.com/connectrpc/connect-go/issues/702) - Fix `ErrorWriter` to recognize protocols, even if content-type indicates unrecognized codec by [@​emcfarlane](https://togithub.com/emcfarlane) in [#​701](https://togithub.com/connectrpc/connect-go/issues/701) - Fix some places in the framework that weren't correctly recognizing and returning context-based error code (e.g. "canceled" or "deadline_exceeded") by [@​jhump](https://togithub.com/jhump) in [#​709](https://togithub.com/connectrpc/connect-go/issues/709) - Use "unimplemented" code for stream cardinality violations by [@​jhump](https://togithub.com/jhump) in [#​712](https://togithub.com/connectrpc/connect-go/issues/712) - Restrict which metadata in an error can be propagated into response metadata by [@​emcfarlane](https://togithub.com/emcfarlane) in [#​711](https://togithub.com/connectrpc/connect-go/issues/711) #### New Contributors - [@​bhollis](https://togithub.com/bhollis) made their first contribution in [#​713](https://togithub.com/connectrpc/connect-go/issues/713) **Full Changelog**: https://github.com/connectrpc/connect-go/compare/v1.15.0...v1.16.0 </details> <details> <summary>amacneil/dbmate (dbmate)</summary> ### [`v2.14.0`](https://togithub.com/amacneil/dbmate/releases/tag/v2.14.0) ##### What's Changed - Add support for BigQuery by [@​mii9000](https://togithub.com/mii9000) in [https://github.com/amacneil/dbmate/pull/523](https://togithub.com/amacneil/dbmate/pull/523) - Update dependencies by [@​amacneil](https://togithub.com/amacneil) in [https://github.com/amacneil/dbmate/pull/534](https://togithub.com/amacneil/dbmate/pull/534) ##### New Contributors - [@​mii9000](https://togithub.com/mii9000) made their first contribution in [https://github.com/amacneil/dbmate/pull/523](https://togithub.com/amacneil/dbmate/pull/523) **Full Changelog**: https://github.com/amacneil/dbmate/compare/v2.13.0...v2.14.0 </details> <details> <summary>jsx-eslint/eslint-plugin-react (eslint-plugin-react)</summary> ### [`v7.34.1`](https://togithub.com/jsx-eslint/eslint-plugin-react/releases/tag/v7.34.1) [Compare Source](https://togithub.com/jsx-eslint/eslint-plugin-react/compare/v7.34.0...v7.34.1) ##### Fixed - [`jsx-no-leaked-render`][jsx-no-leaked-render]: prevent wrongly adding parens ([#​3700][] [@​developer-bandi](https://togithub.com/developer-bandi)) - [`boolean-prop-naming`][boolean-prop-naming]: detect TS interfaces ([#​3701][] [@​developer-bandi](https://togithub.com/developer-bandi)) - [`boolean-prop-naming`][boolean-prop-naming]: literalType error fix ([#​3704][] [@​developer-bandi](https://togithub.com/developer-bandi)) - [`boolean-prop-naming`][boolean-prop-naming]: allow TSIntersectionType ([#​3705][] [@​developer-bandi](https://togithub.com/developer-bandi)) - [`no-unknown-property`][no-unknown-property]: support `popover`, `popovertarget`, `popovertargetaction` attributes ([#​3707][] [@​ljharb](https://togithub.com/ljharb)) - [`no-unknown-property`][no-unknown-property]: only match `data-*` attributes containing `-` ([#​3713][] [@​silverwind](https://togithub.com/silverwind)) - [`checked-requires-onchange-or-readonly`][checked-requires-onchange-or-readonly]: correct options that were behaving opposite ([#​3715][] [@​jaesoekjjang](https://togithub.com/jaesoekjjang)) ##### Changed - [`boolean-prop-naming`][boolean-prop-naming]: improve error message ([@​ljharb](https://togithub.com/ljharb)) [#​1000]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1000 [#​1002]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1002 [#​1005]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1005 [#​100]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/100 [#​1010]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1010 [#​1013]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1013 [#​1022]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1022 [#​1029]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1029 [#​102]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/102 [#​1034]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1034 [#​1038]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1038 [#​1041]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1041 [#​1043]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1043 [#​1046]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1046 [#​1047]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1047 [#​1050]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1050 [#​1053]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1053 [#​1057]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1057 [#​105]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/105 [#​1061]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1061 [#​1062]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1062 [#​1070]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1070 [#​1071]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1071 [#​1073]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1073 [#​1076]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1076 [#​1079]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1079 [#​1088]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1088 [#​1098]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1098 [#​1101]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1101 [#​1103]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1103 [#​110]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/110 [#​1116]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1116 [#​1117]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1117 [#​1119]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1119 [#​1121]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1121 [#​1122]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1122 [#​1123]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1123 [#​1130]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1130 [#​1131]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1131 [#​1132]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1132 [#​1134]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1134 [#​1135]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1135 [#​1139]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1139 [#​1148]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1148 [#​1149]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1149 [#​114]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/114 [#​1151]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1151 [#​1155]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1155 [#​1161]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1161 [#​1167]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1167 [#​1173]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1173 [#​1174]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1174 [#​1175]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1175 [#​1178]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1178 [#​1179]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1179 [#​117]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/117 [#​1180]: https://togithub.com/jsx-eslint/eslint-plugin-react/pull/1180 [#​1183]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1183 [#​1189]: https://togithub.com/jsx-eslint/eslint-plugin-react/issues/1189 [#​118]: https://togith </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/TBD54566975/ftl). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Hi,
We are using
protoc-gen-es
to generate TypeScript files for our protobuf messages. In our project, there are unused messages that get compiled into JavaScript files but are not imported anywhere. Since we're using Vite, which relies on Rollup for bundling, Rollup does not remove makeMessageType function calls from the output bundle, as seen in the example below:Rollup assumes that
f.makeMessageType
may have side effects (such as mutating the global state), leading to unnecessary code being included in the final bundle. As a result, our bundle size has doubled, becoming significantly larger.To address this issue, I've added the
/*@__PURE__*/
annotation beforemakeMessageType
function calls. This informs Rollup that these function calls do not have any side effects, as documented in the Rollup configuration options. Adding this annotation will allow Rollup to better optimize the output bundle by eliminating unused code.If you have any suggestions for a better solution or improvements, please leave a comment.
Thank you!