- Fixed: Memory leak described in #250 by @everhardt, @martijnimhoff
- Fixed: Handle relative paths in Client.removeDir()
- Fixed: Improve closing sequence for control socket. (#224, #228)
- Fixed: Avoid deprecation error. (#221)
- Fixed: Set default settings before login in case there are non-ascii characters in user or password. (#229, @lgpseu)
- Fixed: Use existing code path to close control socket when replacing it.
- Fixed: Destroy sockets explicitly on timeouts only.
- Fixed: Don't trust FEAT response of servers regarding EPSV. (#213)
- Fixed: Include original error message when client reports as closed.
- Breaking change: Library requires at least Node version 10.
- Changed: Use feature set as reported by server to determine transfer strategy.
- Changed: Test suite improvements to better reflect behaviour of an FTP server.
- Fixed: Issues around incomplete upload described in #205.
- Fixed: Variation of empty directory listing described in #206.
- Fixed: List parsing for specific Unix flavor described in #193.
- Fixed: Prevent late internal exceptions from sockets.
- Fixed: Stop explicitly destroying sockets, too early in rare cases.
- Fixed: Log reason why transfer modes fail when testing.
- Fixed: Only use MLSD after querying support for feature. (#187)
- Fixed: Hostname doesn't match certificates altnames for data connection. (#166, #179, @alandoherty)
- Improved: Continue trying transfer strategies even after unexpected errors. (#164)
- Fixed: Allow directory names ending with space in client.list(). (#149, @inithink)
- Fixed: Don't trim incoming message chunks.
- Fixed: Reference Node.js types in tsconfig settings.
- Fixed: Missing StringEncoding in export. (#144)
- Added: Support for implicit FTPS. (#121, @sparebytes)
- Fixed: Detection of stream being finished early. (#143)
- Fixed: Catch server closing connection without error. (#138)
- Fixed: Allow 'undefined' to be passed to trackProgress. (#125, @FabianMeul)
- Fixed: Try next available list command after any FTP error. (#117)
- Fixed: Remove eager check for
remoteAddress
of a socket. (#106)
- Added: Directory listings are included in transfer progress tracking.
- Fixed: Possible edge case where socket is disconnected but client still says it's open.
- Fixed: Return to former working directory also after error when calling directory-related methods.
- Changed: Current API
uploadDir
anddownloadDir
has been deprecated, useuploadFromDir
anddownloadToDir
. - Added: You can specifiy a custom remote directory with
downloadToDir
.
- Fixed regression at 4.3.0: File descriptor closed too early. (#103)
- Fixed: When downloading to a local file and an error occurs, only remove it if no data has been downloaded so far.
- Added: More explicit API
uploadFrom
,appendFrom
anddownloadTo
.upload
anddownload
are still available but deprecated. - Added: Handle file downloads and uploads directly by supporting local file paths in
uploadFrom
anddownloadTo
. - Added: Make it easier to resume a download of a partially downloaded file. See documentation of
downloadTo
for more details.
- Fixed: Don't rely on MLSD types 'cdir' and 'pdir'. (#99)
- Added: Support uploading a local directory to any specific remote directory instead of just the working directory.
- Added: Support symbolic links in MLSD listings.
- Fixed: Make MLSD listing detection more general. (#95)
- Fixed: Handle MLSD facts 'sizd', 'UNIX.gid' and 'UNIX.uid'. (#95)
- Fixed: Describe client as closed before first connection (#94)
This release contains the following breaking changes:
- Changed: The
permissions
property ofFileInfo
is now undefined if no Unix permissions are present. This is the case if for example the FTP server does not actually run on Unix. Before, permissions would have been set to 000. If permissions are present there is a good chance that a command likeSITE CHMOD
will work for the current server. - Changed: MLSD is now the default directory listing command. If the connected server doesn't support it, the library will continue using the LIST command. This might have an impact on reported permissions for a file. It is possible although rare that a server running on Unix would have reported permissions with LIST but doesn't do so with MLSD.
- Changed: If you've been parsing
date
ofFileInfo
, you might have to consider a new ISO format coming with MLSD listings, e.g.2018-10-25T12:04:59.000Z
. Better yet, use the parsed date directly withmodifiedAt
and only usedate
if it is undefined. Be aware that parsing dates reported by the LIST command is likely unreliable.
Non-breaking changes:
- Added: Support for MLSD directory listing. This is a machine-readable directory listing format that provides modification dates that can be reliably parsed. Listings by the older command LIST have not been designed to be machine-readable and are notoriously hard to parse.
- Added: The property
modifiedAt
of FileInfo may hold a parsed date if the FTP server supports the MLSD command. Note that the propertydate
is not parsed but only a human-readable string coming directly from the original listing response. - Added: New API
sendIgnoringError
to send an FTP command and ignoring a resulting FTP error. Using the boolean flag as the second argument ofsend
has been deprecated. - Added: Sending
OPTS UTF8 ON
when accessing a server.
No changes, republishing because of bug on npmjs.com.
- Fixed: Fall back to
LIST
command ifLIST -a
is not supported. (#91)
- Fixed: Support non-standard response to EPSV by IBM i or z/OS servers. (#87)
- Fixed: Make unit tests for failing streams less dependent on platform. (#86)
- Fixed: Improve marking protected methods for JS compilation output.
- Added: Use
client.append()
to append to an existing file on the FTP server. (#83)
- Fixed: Use ESLint instead of TSLint.
- Added: Users can access internal transfer modes to force a specific one. (#77)
- Fixed: Handle stream error events for upload and download.
- Added: Make parseList public API. (#75, @xnerhu)
- Changed: Update Typescript 3.5.1
- Added: Client
list
method supports optional path argument. (#69, @ThatOdieGuy) - Changed: Updated Typescript 3.4.4
- Fixed: Reject failing connection for passive transfer with Error instance. (#65)
- Fixed: Handle multline response message closing without message. (#63)
- Fixed: Track timeout during connect. (#64)
- Fixed: Unix directory listing in some cases interpreted as DOS listing. (#61)
- Fixed: Close the control connection when
connect
creates a new one.
- Changed:
access
andconnect
can reopen a closedClient
. - Fixed:
access
can be called again after failed login. (#56)
- Fixed: Republish to (maybe) fix NPM issue of wrong stats.
- Added: Support for leading whitespace in file and directory names.
- Fixed: Make package scripts easier to understand.
- Fixed: Republish to (maybe) fix NPM issue of wrong stats.
- Changed: Source is now written in Typescript, fixes #49.
- Fixed: Switch seamlessly between control and data connection for tracking timeout.
- Added: Full type-checking as part of CI with Typescript and JSDoc type declarations. Check is rigourous, settings include 'strict' or 'noImplicitAny'.
- Changed: Improved handling of unexpected server requests during transfer.
This release contains the following breaking changes:
- Changed:
Client
is now single-use only. It can't be used anymore once it closes and a new client has to be instantiated. - Changed: All exceptions are now instances of
Error
, not custom error objects. IntroducedFTPError
for errors specific to FTP. (#37)
Non-breaking changes:
- Added: If there is a socket error outside of a task, the following task will receive it. (#43)
- Changed: Improved feedback if a developer forgets to use
await
or.then()
for tasks. (#36)
Special thanks to @broofa for feedback and reviews.
- Fixed: Multibyte UTF-8 arriving in multiple chunks (#38)
- Fixed: Unit test throws unhandled exception (#44)
- Fixed: Provide stack trace when closing due to multiple tasks running
- Internal improvements to linting (@broofa)
- Added: Get last modification time of a file. (#32, @AnsonYeung)
- Fixed: Closing client during task will reject associated promise. (#34)
- Changed: Include hidden files in file listings, fixes
removeDir
andclearWorkingDir
. Changes behaviour fordownloadDir
andlist
. (#29, @conlanpatrek)
- Changed: Timeout on control socket is only considered during active task, not when idle. This also fixes #27, as well as #26.
- Fixed: Regression where closed clients throws timeout because of idle socket. (#26)
- Fixed: JSDoc type annotations.
- Fixed: Minor fixes to documentation.
- Fixed: Unit test for adjusted behavior when closing context.
- Fixed: Make it possible to reconnect after closing the FTP context.
- Added: Improved error handling and reporting.
- Fixed: Various improvements to documentation.
- Fixed: Exception thrown if tasks will run in parallel because the user forget to use 'await'.
- Fixed: Describe in documentation what exactly happens if there is a timeout.
- Added: Use client.rename() to rename or move a file.
- Changed: Default timeout set to 30 seconds.
- Changed: Timeouts are tracked exlusively by data connection during transfer.
- Fixed: Node's socket.removeAllListeners() doesn't work, see nodejs/node#20923
- Fixed: Node 8 is required, correct documentation and CI.
- Fixed: Minor changes to documentation.
- Fixed: Don't deny EPSV over IPv4. This can help in some circumstances with a NAT.
- Fixed: Don't prefer IPv6 by default.
- Added: Support IPv6 for passive mode (EPSV).
- Added: Detect automatically whether to use EPSV or PASV.
- Added: Log server IP when connected.
- Added: Convenience method
client.access
to simplify access to an FTP(S) server. - Updated API documentation.
- Stop using Yarn for internal dev-dependencies.
- Added: Resolve simple NAT issues with PASV.
- Added: Log socket encryption right before login.
- Fixed: Remove obsolete socket connection error listener.
- Improved documentation of client methods.
- Fixed: Reason for error when parsing PASV response was not reported.
- Mention regression in Node.js negatively affecting upload progress reporting.
- Small fixes in documentation.
- Added: Report transfer progress with client.trackProgress().
- Added: Error return codes can be ignored when removing a single file.
- Fixed: Timeout behaviour of control and data socket.
- Improve introduction.
- More unit tests.
- When downloading, handle incoming data before announcement from control socket arrives.
- More tests for uploading and downloading data including directory listings.
- Use download mechanism for directory listings as well.
- Improve documentation.
- Update linter.
- Change uploadDir() so that it reuses directories on the FTP server if they already exist. (#5)
- Fix linter complaint.
- Add method to remove a file.
- Fix listing parser autodetection by filtering out empty lines.
- Fix upload with TLS, wait for secureConnect if necessary.
- Fix TLS upgrade for data connections. (#4)
- Handle TLS upgrade error by reporting it to the current task handler.
- Add method to retrieve file size.
- Don't report unexpected positive completion codes as errors.
- Improve documentation.
- Mention DOS-style directory listing support in README.
- Add support for DOS-style directory listing.
- Select a compatible directory listing parser automatically.
- Throw an exception with a detailed description if the directory listing can't be parsed.
- Fix documentation of default arguments for login().
- Improve introduction in README
- Add default port for connect().
- Add default anonymous credentials for login().
- Improve documentation
- Accept more positive preliminary and completion replies for transfers.
- Documentation improvements
- More internal functions made available for custom extensions.
- Wait for both data and control connection reporting completion for list, upload and download.
- Add features() method to client that returns a parsed result of the FEAT command.
- Give access to internal list, upload and download functions for reuse in custom contexts.
- Handle case when downloading, a server might report transfer complete when it isn't.
- Document encoding property on FTPContext.
- Encoding can be set explicitly, defaults to UTF-8.
- Handle multiline responses arriving in multiple chunks.
- Support multiline responses.
- Get user access to some internal utility functions useful in custom contexts.
- Complete redesign: Better separation between a simple object-oriented client, clear customization points and access to internals. Better discovery of features. This release is very much not backwards-compatible.
- Add functions to upload, download and remove whole directories.
- Add function to ensure a given remote path, creating all directories as necessary.
- Differentiate between Basic API and Convenience API in documentation.
- Add convenience functions to request and change the current working directory.
- Return positive response results whenever reasonable.
- Listeners using
once
wherever possible.
- Fix result for send command.
- Improve documentation.
- Close sockets on timeout.
- Close data socket explicitly after upload is done.
- List: Some servers send confirmation on control socket before the data arrived.
- List: Wait until server explicitly confirms that the transfer is complete.
- Upload: Close data socket manually when a stream ended.
Initial release