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

fix(build): Inline package.json import to avoid runtime erros #509

Merged
merged 4 commits into from
Oct 28, 2023

Conversation

Azarattum
Copy link
Contributor

Fixes #508.

This PR inlines only used properties from package.json file on node platform during build time. This is achieve via ts-transformer-inline-file typescript plugin and ts-patch to enable support for it. build:esm script now uses tspc instead of tsc.

@LuanRT LuanRT changed the title Inline package.json import to avoid runtime erros fix(build): Inline package.json import to avoid runtime erros Sep 18, 2023
@absidue
Copy link
Collaborator

absidue commented Sep 20, 2023

Definitely like the idea of injecting the values at build time, although I did notice one thing. Looks like ts-transformer-inline-plugin has an peer dependency on typescript v4, but this repo currently uses v5, does that mean that v5 will still be used or will it be a downgrade using the v4 version instead?

@Azarattum
Copy link
Contributor Author

ts-patch supports typescript 5.x, I believe it uses whatever version is installed in the project. ts-transformer-inline-plugin is just a transformer, so it shouldn't affect anything.

@absidue
Copy link
Collaborator

absidue commented Sep 20, 2023

Ah that sounds good.

@LuanRT
Copy link
Owner

LuanRT commented Sep 21, 2023

Looks like there's a peer dependency conflict going on.

@LuanRT LuanRT merged commit 4c0de19 into LuanRT:main Oct 28, 2023
3 checks passed
JellyBrick added a commit to th-ch/youtube-music that referenced this pull request Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application fails when package.json is absent
3 participants