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

Add dts files to build #612

Merged
merged 6 commits into from
Jul 31, 2024
Merged

Add dts files to build #612

merged 6 commits into from
Jul 31, 2024

Conversation

joluj
Copy link
Contributor

@joluj joluj commented Jul 31, 2024

Closes #607.

Changes:

  • Update to nx 19.5.4
  • All apps/libs built with esbuild now emit declaration files
    • These are mapped properly in the corresponding package.jsons
  • Added new publishable package @jvalue/jayvee-execution. This is necessary for backward compatibility since this was accessible through @jvalue/jayvee-interpreter-lib/execution before.
  • Excluded publishable packages from library builds
    • Publishable apps must explicitly disable this in the project.json
    • Decided on opt-out for apps to encourage library creation

Copy link
Contributor

@rhazn rhazn left a comment

Choose a reason for hiding this comment

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

I am not sure I totally follow what Excluded publishable packages from library builds [...] Decided on opt-out for apps to encourage library creation means so it would be great to include a small explanation in this PR for me 😅 . But otherwise the code looks fine to me 👍

@joluj
Copy link
Contributor Author

joluj commented Jul 31, 2024

Excluded publishable packages from library builds

If you don't exclude @jvalue/jayvee-language-server from @jvalue/jayvee-interpreter-lib, it's bundled in @jvalue/jayvee-interpreter-lib.

Case non-excluded (i.e. before): Assume @jvalue/jayvee-interpreter-lib uses class A from @jvalue/jayvee-language-server. In a third-party library, someone imports A from @jvalue/jayvee-language-server. These As now look alike, but instanceof uses of objects of each A will fail because the class definition is separate.

Case excluded (i.e. after this PR): Both As reference the one from @jvalue/jayvee-language-server 🎉

Decided on opt-out for apps to encourage library creation

@jvalue/jayvee-interpreter-lib is excluded in every built by default. If you don't want to exclude it (i.e. in the apps, we bundle everything there), you have to remove that from the exclusion list. This works by setting the option excluded: [] in the projects.json.

@joluj joluj merged commit 2c7ffe2 into main Jul 31, 2024
3 checks passed
@joluj joluj deleted the add-dts-files branch July 31, 2024 12:32
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] @jvalue/jayvee-interpreter-lib exports are broken
2 participants