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

refactor(exporter-*): remove export * from ... #5399

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

chancancode
Copy link
Contributor

Which problem is this PR solving?

Fix the following eslint warnings:

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/browser/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/node/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-logs-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

Ref #5365

Short description of the changes

The comment say we should do this before the next "major" (minor since we are pre-1.0?) version, which means this is the right time to do it.

However, I'm not sure if there is a real need/reason for that. As far as I can tell, this is still exporting exactly the same items and shouldn't cause any breakages?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • eslint

Checklist:

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

```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/browser/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax

/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-http/src/platform/node/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
```

The comment say we should do this before the next "major" (minor
since we are pre-1.0?) version, which means this is the right time
to do it.

However, I'm not sure if there is a real need/reason for that. As
far as I can tell, this is still exporting exactly the same items
and shouldn't cause any breakages?

Ref open-telemetry#5365
```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-trace-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
```

The comment say we should do this before the next "major" (minor
since we are pre-1.0?) version, which means this is the right time
to do it.

However, I'm not sure if there is a real need/reason for that. As
far as I can tell, this is still exporting exactly the same items
and shouldn't cause any breakages?

Ref open-telemetry#5365
```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
```

The comment say we should do this before the next "major" (minor
since we are pre-1.0?) version, which means this is the right time
to do it.

However, I'm not sure if there is a real need/reason for that. As
far as I can tell, this is still exporting exactly the same items
and shouldn't cause any breakages?

Ref open-telemetry#5365
```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
```

The comment say we should do this before the next "major" (minor
since we are pre-1.0?) version, which means this is the right time
to do it.

However, I'm not sure if there is a real need/reason for that. As
far as I can tell, this is still exporting exactly the same items
and shouldn't cause any breakages?

Ref open-telemetry#5365
```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/exporter-logs-otlp-grpc/src/index.ts
  20:1  warning  Using 'ExportAllDeclaration' is not allowed  no-restricted-syntax
```

The comment say we should do this before the next "major" (minor
since we are pre-1.0?) version, which means this is the right time
to do it.

However, I'm not sure if there is a real need/reason for that. As
far as I can tell, this is still exporting exactly the same items
and shouldn't cause any breakages?

Ref open-telemetry#5365
@chancancode chancancode requested a review from a team as a code owner January 30, 2025 01:50
@chancancode chancancode mentioned this pull request Jan 30, 2025
25 tasks
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.63%. Comparing base (3c040c4) to head (26c808e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5399   +/-   ##
=======================================
  Coverage   94.63%   94.63%           
=======================================
  Files         318      318           
  Lines        8032     8032           
  Branches     1685     1685           
=======================================
  Hits         7601     7601           
  Misses        431      431           

@chancancode chancancode changed the title Eslint warning export star refactor(*): remove export * from ... Jan 30, 2025
@pichlermarc pichlermarc added this to the OTLP Exporter GA milestone Jan 30, 2025
@pichlermarc
Copy link
Member

pichlermarc commented Jan 30, 2025

We held some of them back when we updated the other packages to avoid conflicts while I was re-structuring exporters. That's done now. We had some cases in some of these packages that we could not solve without a major refactor. The comment's intention was to ensure that we remove it before marking the package as GA, mainly as a way to ensure we don't export anything we don't intend to.

Refs #4186

@pichlermarc pichlermarc changed the title refactor(*): remove export * from ... refactor(exporter-*): remove export * from ... Jan 30, 2025
@pichlermarc pichlermarc added this pull request to the merge queue Jan 30, 2025
Merged via the queue into open-telemetry:main with commit a04284c Jan 30, 2025
14 of 15 checks passed
Comment on lines 17 to 19
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace wildcard export with named exports before next major version
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

@chancancode A late question on this one. I assume this eslint and TODO comment could now be removed, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

#5426 added to remove it.

trentm added a commit to trentm/opentelemetry-js that referenced this pull request Feb 5, 2025
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.

3 participants