Skip to content

Update typescript and devDependencies #32

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

Merged
merged 4 commits into from
Mar 26, 2025

Conversation

EdJoPaTo
Copy link
Contributor

This creates a bit more concise JS output from TypeScript.

My main intention was to remove rollup from this project as tsc supports UMD output too. But for some reason the UMD output doesn't seem to work with the tests as the import seems to be different with rollup. Dropping support for old JS and using ES modules rather than UMD would simplify the toolchain here.
ES modules are supported from Node.js 12 which is also many years out of support already. All browsers support ES modules for years now so requiring ES modules shouldn't be a big problem. But for this PR I stayed with bumping the dependencies.

As the initial TypeScript implementation came from @Tschrock in #25 I'll tag you here too as you might be interested.

This creates a bit more concise js output from TypeScript.

My main intention was to remove rollup from this project as tsc supports
umd output too. But for some reason the umd output doesnt seem to work
with the tests as the import seems to be different with rollup.
Dropping support for old JS and using ES modules rather than umd would
simplify the toolchain here.
ES modules are supported from Node.js 12 which is also many years out of
support already. All browsers support ES modules for years now so
requiring ES modules shouldnt be a big problem. But for this PR I stayed
with bumping the dependencies.
Copy link
Member

@generalmimon generalmimon left a comment

Choose a reason for hiding this comment

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

@EdJoPaTo Thanks!

@generalmimon generalmimon merged commit be6a0b9 into kaitai-io:master Mar 26, 2025
1 check passed
Comment on lines -32 to +34
"KaitaiStream.js",
"KaitaiStream.d.ts",
"index.d.ts"
"*.js",
"*.d.ts"
Copy link
Member

@generalmimon generalmimon Mar 26, 2025

Choose a reason for hiding this comment

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

Actually, I don't think this the best idea - it makes it possible (and easy) to accidentally publish some other .js file. Let's keep it explicit.

generalmimon added a commit that referenced this pull request Mar 26, 2025
@EdJoPaTo EdJoPaTo deleted the update-typescript branch April 1, 2025 11:45
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.

2 participants