Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## 0.7.0

### ⚠️ Breaking changes

* Remove support for Node.js <6 and safe-buffer dependency - by [@bjohansebas](https://github.com/bjohansebas) in [#335](https://github.com/ashtuchkin/iconv-lite/pull/335)

Support for Node versions <6 is removed to eliminate the safe-buffer dependency, now using Node.js's native Buffer since it no longer relies on an unsafe version of Node.js's native Buffer.

### 🐞 Bug fixes

* Handle split surrogate pairs when encoding utf8 - by [@yosion-p](https://github.com/yosion-p) and [@ashtuchkin](https://github.com/ashtuchkin) in [#282](https://github.com/ashtuchkin/iconv-lite/pull/282):

Handle a case where streaming utf8 encoder (converting js strings -> buffers) encounters
surrogate pairs split between chunks (last character of one chunk is high surrogate and first
character of the next chunk is a low surrogate).

* Avoid false positives in encodingExists by using objects without a prototype - by [@bjohansebas](https://github.com/bjohansebas) in [#328](https://github.com/ashtuchkin/iconv-lite/pull/328)
Copy link
Member

Choose a reason for hiding this comment

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

I noticed we pulled in object-assign in this PR, wdyt think about using Object.assign directly instead since this is effectively a major release (no one will automatically upgrade to 0.7). This would make the min node version v4, but it might be worth bumping it higher if you go down that route.

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I remember, npm didn’t fully follow semver for version 0.x.x, which is why some of the old support for using Object.assign hadn’t been removed. But after doing some more research, it seems these changes can be made since npm does respect it. I’m going to open a PR for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey, since raw-body and qs won't be able to update, legacy support will be maintained.


The encodingExists method could return incorrect results if the lookup matched properties inherited
from the prototype of the object that stores the encodings, such as constructor and others. This change
replaces that object with one that has no prototype, ensuring that only explicitly defined valid encodings
in the library are considered. In addition, the fix is applied to the internal cache system to avoid the same
kind of false positives

### 🚀 Improvements

* Make explicit that decode() method supports Uint8Array input - by [@jardicc](https://github.com/jardicc) in [#271](https://github.com/ashtuchkin/iconv-lite/pull/271)
* Remove compatibility check for StringDecoder.end method - by [@bjohansebas](https://github.com/bjohansebas) in [#331](https://github.com/ashtuchkin/iconv-lite/pull/331)

## 0.6.3 / 2021-05-23
* Fix HKSCS encoding to prefer Big5 codes if both Big5 and HKSCS codes are possible (#264)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "iconv-lite",
"description": "Convert character encodings in pure javascript.",
"version": "0.6.3",
"version": "0.7.0",
"license": "MIT",
"keywords": [
"iconv",
Expand Down
Loading