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

feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency #3914

Merged
merged 4 commits into from
Jun 20, 2023

Conversation

MSNev
Copy link
Contributor

@MSNev MSNev commented Jun 14, 2023

Which problem is this PR solving?

To better support minification of the generated code we need to change the default settings by adding the following to the tsconfg.base.json.

Fixes #3913

Short description of the changes

Adds importHelpers and noEmitHelpers to tsconfig.base.json
Updates all package.json to include tslib as a dependency with "^2.3.1" as this version is the first version that supported TypeScript 4.4, this should allow all v2.x versions of tslib to be used.
Updates instrumentation test EsmInstrumentation.test.mjs due to failure to import InstrumentationBase

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

This is not expected to be a code breaking change

How Has This Been Tested?

Compiled and built locally using npm run compile and npm test

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@MSNev MSNev requested a review from a team June 14, 2023 20:51
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #3914 (ef06efa) into main (f40e3de) will not change coverage.
The diff coverage is n/a.

❗ Current head ef06efa differs from pull request most recent head 78dfb5d. Consider uploading reports for the commit 78dfb5d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3914   +/-   ##
=======================================
  Coverage   92.89%   92.89%           
=======================================
  Files         297      297           
  Lines        8838     8838           
  Branches     1815     1815           
=======================================
  Hits         8210     8210           
  Misses        628      628           

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🙂
Just wondering about the change in the esm instrumentation test. Maybe @JamieDanielson can shed some light on why this might be needed 🤔

Copy link
Contributor

@pkanal pkanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

tsconfig.base.json Outdated Show resolved Hide resolved
@legendecas
Copy link
Member

I like this change! Just a minor nit about the change.

@MSNev MSNev force-pushed the MSNev/Minification branch from 8cefd1c to 1e0c4a0 Compare June 19, 2023 18:46
@pichlermarc
Copy link
Member

CI is broken due to #3925 -> #3926 will fix that 🙂

@legendecas legendecas merged commit 74393ac into open-telemetry:main Jun 20, 2023
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Jun 26, 2023
…ependency (open-telemetry#3914)

* feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency

* fix: Lint fixes

* Remove noEmitHelpers as not needed

---------

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
dyladan added a commit to dyladan/opentelemetry-js that referenced this pull request Jul 19, 2023
dyladan added a commit that referenced this pull request Jul 21, 2023
* Revert "feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency (#3914)"

This reverts commit 74393ac.

* Changelog

* Update CHANGELOG.md
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.

[Minification] Add noEmitHelpers, importHelpers and tslib as a dependency
4 participants