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

feat!: Require encoding option to avoid inspecting chunks for UTF-8 encoding #8

Merged
merged 7 commits into from
Apr 18, 2022

Conversation

sttk
Copy link
Contributor

@sttk sttk commented Mar 26, 2022

This PR is to fix the issue #5.

This PR changes that:

  • Removes the dependency on remove-bom-buffer.
  • Adds the substitute code of remove-bom-buffer.
  • Uses Buffer.isBuffer instead of is-buffer module.
  • Adds the direct dependency on is-utf8, which is used in remove-bom-buffer.

(fixes #5)

index.js Outdated Show resolved Hide resolved
@sttk
Copy link
Contributor Author

sttk commented Apr 9, 2022

@phated I've merged the latest master branch, modified to use TextDecoder, and removed is-utf8 by taking argument encoding.

index.js Outdated Show resolved Hide resolved
@sttk
Copy link
Contributor Author

sttk commented Apr 17, 2022

@phated I merged your follow up code and fixed the cause of test failures on Node.js <= v11. Please review this updated code.

index.js Outdated Show resolved Hide resolved
@phated phated changed the title Remove the dependency on remove-bom-buffer feat!: Require encoding option to avoid inspecting chunks for UTF-8 encoding Apr 18, 2022
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Looking great! I'll make a follow-up issue to clean up this implementation when we drop older node support

@phated phated merged commit 2107f34 into gulpjs:master Apr 18, 2022
@github-actions github-actions bot mentioned this pull request Apr 18, 2022
@sttk sttk deleted the fix-issue-5 branch April 19, 2022 12:21
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.

Consider inlining remove-bom-buffer logic
2 participants