Skip to content

Prepare to release v4 #76

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 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Changelog

## [Unreleased]
## [4.0.0] - 2024-11-17

### Changed

- **Breaking:** Require Node >= 18
- **Breaking:** Require gulp v5
- **Breaking:** Require gulp v4
- **Breaking:** Switch to [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)

### Added

- Add plugin error when a `from` or `to` encoding is unsupported
- Add TypeScript type declarations
- Add warning when `from` and `to` options are identical
- Add warning when `iconv` options are invalid
- Add warning when `iconv` option is of the wrong type

## [3.0.0] - 2022-11-11

Expand Down Expand Up @@ -71,7 +71,7 @@

Initial release with support for file buffers

[Unreleased]: https://github.com/heldinz/gulp-convert-encoding/compare/v3.0.0...HEAD
[4.0.0]: https://github.com/heldinz/gulp-convert-encoding/releases/tag/v4.0.0
[3.0.0]: https://github.com/heldinz/gulp-convert-encoding/releases/tag/v3.0.0
[2.1.0]: https://github.com/heldinz/gulp-convert-encoding/releases/tag/v2.1.0
[2.0.1]: https://github.com/heldinz/gulp-convert-encoding/releases/tag/v2.0.1
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] ![Build Status][ci-image] [![Coveralls Status][coveralls-image]][coveralls-url]

> Convert character encodings using [iconv-lite](https://github.com/ashtuchkin/iconv-lite). Supports streams.
Convert character encodings in gulp v4 using [iconv-lite](https://github.com/ashtuchkin/iconv-lite). Supports streams.

> [!NOTE]
> As of gulp v5, this plugin is redundant: gulp v5 includes native support for transcoding text files using iconv-lite.
>
> You can migrate away from this plugin by passing `from` and `to` as `options.encoding` to `src` and `dest` respectively. The default encoding is `utf8`.

## Install

Expand All @@ -19,15 +24,15 @@ import convertEncoding from 'gulp-convert-encoding';
export default () =>
gulp
.src('src/file.txt')
.pipe(convertEncoding({ from: 'iso-8859-1' }))
.pipe(convertEncoding({ from: 'latin1' }))
.pipe(gulp.dest('dist'));
```

## API

### convertEncoding(options)

> [!IMPORTANT]
> [!IMPORTANT]
> You must provide one or both of the `from` and `to` options.
> [Supported encodings](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings) are listed on the iconv-lite wiki.

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-convert-encoding",
"version": "3.0.0",
"version": "4.0.0",
"description": "Convert character encodings using iconv-lite.",
"license": "MIT",
"repository": "heldinz/gulp-convert-encoding",
Expand Down