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

Make sure to also run build:test in the build step #686

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

marcoroth
Copy link
Member

This pull request makes sure that the build:test command is also run as part of the build and release step.

This way developers (especially plugin developers) can import all Stimulus' classes and types even if they are not publicly exported. We are not guaranteeing that those exports are non-breaking, but at least this will allow developers to make use of those classes even if we are not explicitly exporting them.

Importing classes would look something like:

import { Controller } from "@hotwired/stimulus"
import { TargetSet } from "@hotwired/stimulus/dist/core/target_set"
import { Context } from "@hotwired/stimulus/dist/core/context"

And types could be imported like:

import type { TargetSet } from "@hotwired/stimulus/dist/types/core/target_set"
import type { Context } from "@hotwired/stimulus/dist/types/core/context"

Resolves #623 and #638

@marcoroth marcoroth mentioned this pull request Jun 15, 2023
@marcoroth marcoroth merged commit 4f4b9bd into main Jun 15, 2023
@marcoroth marcoroth deleted the builds/dist-exports branch June 15, 2023 12:04
AndersGM pushed a commit to AndersGM/stimulus that referenced this pull request Jun 16, 2023
@DEfusion
Copy link

DEfusion commented Nov 6, 2023

@marcoroth has this changed since this PR? With 3.2.2 only the types are included in the files directive of the package.

Sorry for the noise, I thought I could get away with just using the types but no I need the classes in a couple of places.

@marcoroth
Copy link
Member Author

Yeah, sorry for the confusion @DEfusion, this PR and the additional files in the NPM package are going to ship with the next release.

If you need them today, please use the latest dev-build on main, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants