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

chore(npm): build TS to JS when publishing #1575

Merged
merged 5 commits into from
Feb 13, 2025
Merged

Conversation

vtsvetkov-splunk
Copy link
Contributor

@vtsvetkov-splunk vtsvetkov-splunk commented Feb 10, 2025

Issue number: ADDON-76810

PR Type

What kind of change does this PR introduce?

  • Feature
  • Bug Fix
  • Refactoring (no functional or API changes)
  • Documentation Update
  • Maintenance (dependency updates, CI, etc.)

Summary

We ship not only type, but some classes to extend, so it needs to be bundled and shipped as JS.

Changes

  • Add webpack bundling for prepublish
image
  • Using mode arg instead of NODE_ENV for webpack as per documentation
  • Move Readme.md (it is used by NPM) to contributing.md
  • Updated contributing guide to include information about package publishing

User experience

They can use class extension in their code

Checklist

If an item doesn't apply to your changes, leave it unchecked.

Signed-off-by: Viktor Tsvetkov <[email protected]>
Signed-off-by: Viktor Tsvetkov <[email protected]>
@pull-request-size pull-request-size bot added size/L and removed size/S labels Feb 11, 2025
@vtsvetkov-splunk vtsvetkov-splunk marked this pull request as ready for review February 11, 2025 12:44
@vtsvetkov-splunk vtsvetkov-splunk requested a review from a team as a code owner February 11, 2025 12:44
@vtsvetkov-splunk vtsvetkov-splunk enabled auto-merge (squash) February 11, 2025 13:42
Copy link
Contributor

@soleksy-splunk soleksy-splunk left a comment

Choose a reason for hiding this comment

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

works nice, great job

* `yarn run test-storybook:update-snapshots` – Updates screenshots. Run this after any visual modifications.
* `yarn run eslint` – Executes linters.
* `yarn run eslint:fix` – Addresses linter issues and applies Prettier formatting.
* `yarn run format` – Uses Prettier to automatically format source code files. This command overwrites files without prompting. Use `format:verify` for a non-destructive check.
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add yarn run lint here? as combination for eslint and format

Suggested change
* `yarn run format` – Uses Prettier to automatically format source code files. This command overwrites files without prompting. Use `format:verify` for a non-destructive check.
* `yarn run format` – Uses Prettier to automatically format source code files. This command overwrites files without prompting. Use `format:verify` for a non-destructive check.
* `yarn run lint` – combination of linters and Prettier formating

@vtsvetkov-splunk vtsvetkov-splunk merged commit f206291 into develop Feb 13, 2025
123 checks passed
@vtsvetkov-splunk vtsvetkov-splunk deleted the feature/npm-build branch February 13, 2025 12:57
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants