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

text-encoding npm package no longer maintained? Do we care? #6

Closed
jrayback opened this issue Nov 13, 2023 · 4 comments · Fixed by #16
Closed

text-encoding npm package no longer maintained? Do we care? #6

jrayback opened this issue Nov 13, 2023 · 4 comments · Fixed by #16
Assignees

Comments

@jrayback
Copy link
Collaborator

Please see here and here. Package is no longer being maintained. The last commit to the source code was in 2018. Do we care? I can't seem to find any real better alternative (cursory search). Functionality might be, essentially, static and not an issue. Lack of security patching, etc. might be concerning, however.

@kentbull
Copy link

The TextEncoder package is now integrated into browsers. See WebOfTrust/signify-ts#134
It can be dropped in favor of the built-in at this point.

@jrayback
Copy link
Collaborator Author

Yeah, looks like in this case it just requires importing TextEncoder and TextDecoder from node:util instead of text-encoding. I'll fix it.

@jrayback jrayback self-assigned this Nov 16, 2023
@lenkan
Copy link

lenkan commented Nov 16, 2023

@jrayback it is actually available on global in node.js and on window in browsers. So you do not need to import anything, it is available in the global namespace. Actually, I do not think it will work in the browser if you import it from node:util. See https://nodejs.org/api/globals.html#textencoder and https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder

@jrayback
Copy link
Collaborator Author

OK. Yeah. Thanks. I see now. It doesn't require any import statement at all. Once the main code commit is completed, I'll fast follow-on a small change to close out this issue. Thanks for the help.

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 a pull request may close this issue.

3 participants