Releases: paulshryock/node-abstractions
v0.3.1
https://www.npmjs.com/package/@paulshryock/abstractions/v/0.3.1
Summary
The streams
object passed to new CommandLine(streams)
used to require all three streams (stderr
, stdin
, and stdout
) be Duplex
streams. Now the types are less specific, so stdin
is Readable
and stderr
and stdout
are Writable
. They all will still accept a Duplex
, since that type implements both Readable
and Writable
.
CommandLine
used to import the entire node:readline
module, but it only uses createInterface
from that module. Now only createInterface
is imported.
There are no known breaking changes.
Changelog
Changed
- Decrease specificity of CommandLine stream types.
Removed
- Import less of node:readline module.
Commits
10f7507
- 0.3.1bb3bb56
- Decrease specificity of CommandLine stream types54d6514
- Import less of node:readline module59f07ab
- Update License copyright years16e611b
- Update dependency npm-check-updates to v17.1.132cb37e2
- Remove outdated File System class diagrama362e52
- Update JSDoc documentation and configuration
Contributors
- Paul Shryock (@paulshryock)
v0.3.0
https://www.npmjs.com/package/@paulshryock/abstractions/v/0.3.0
Summary
There is only one type of CommandLine
, so that is now the class name, and it no longer implements an interface. And the first argument to CommandLine.error
is now a string
.
CommandLine
's stability is now beta
(although it isn't yet marked as such).
Breaking changes
CommandLine
interface andNetworkInput
andStackTrace
classes are removed.Exception
class is no longer publicly exposed.FileSystem
interface is renamed toVirtualFileSystem
.LocalCommandLine
class is renamed toCommandLine
.CommandLine.error
method's first argument type is nowstring
.
Changelog
Changed
- Rename
FileSystem
interface toVirtualFileSystem
to avoid conflict with File System API. - Rename
LocalCommandLine
class toCommandLine
. - Change
CommandLine.error
first argument to string.
Removed
- Do not export
Exception
utility class since it is for internal use. - Remove
StackTrace
utility class since it is no longer needed. - Remove legacy
NetworkInput
class. - Remove
CommandLine
interface.
Contributors
- Paul Shryock (@paulshryock)
v0.2.1
Summary
In v0.1.3, fs-extra
was removed from the distributed bundle. Now it is completely uninstalled and no longer a dependency.
Changelog
Removed
- Uninstall
fs-extra
.
Contributors
- Paul Shryock (@paulshryock)
v0.2.0
Summary
The CommandLine
and FileSystem
API's are now pretty stable, and I do not expect them to change any time soon.
Examples of CommandLine
might include LocalCommandLine
(implemented in this release), or SshCommandLine
. Examples of FileSystem
might include LocalFileSystem
(implemented in this release), FtpFileSystem
, or AwsS3FileSystem
.
The Exception
class extends Error
and is intended to be extended for program exceptions. StackTrace
seems like a useful utility, and it's exported in this release, but I haven't decided whether or not this should be included long-term in the public API. I'm not sure how useful it really is on its own.
All other exports have been removed, to simplify and streamline the public API.
Changelog
Added
- Export stable
CommandLine
andFileSystem
interfaces. - Export stable
LocalCommandLine
,LocalFileSystem
,StackTrace
, andException
classes.
Removed
- Remove all other exports.
Contributors
- Paul Shryock (@paulshryock)
v0.1.3
Summary
New ProcessInput
class for reading program input from the command line.
LocalFileSystem.copy
was rewritten using the Node standard library, and fs-extra
is no longer a dependency.
- Before: Compiled bundle: 54.1kb
- After: Compiled bundle: 4.7kb
- Savings: 49.4kb (over 91%)
Changelog
Added
- Add
ProcessInput
.
Changed
- Rewrite
LocalFileSystem.copy
with standard library.
Removed
- Uninstall
fs-extra
.
Contributors
- Paul Shryock (@paulshryock)
v0.1.2
Summary
Record
and Storage
classes and types were previously added but not exported; now they are.
Changelog
Added
- Export
Record
andStorage
classes with Exceptions.
Contributors
- Paul Shryock (@paulshryock)
v0.1.1
Summary
All Console
methods now allow Stringable
objects passed as the first parameter. Several new abstractions have been added, although they will likely change soon.
Changelog
Added
- Add
Exception
. - Add
FileSystem
. - Add
FileSystemException
. - Add
LocalFileSystem
. - Add
MessageStringable
. - Add
RecordStorage
. - Add
RecordStorageException
. - Add
Storage
. - Add
StorageException
. - Add
Stringable
. - Install
fs-extra
.
Changed
- Allow Output methods' first parameter to be
Stringable
.
Contributors
- Paul Shryock (@paulshryock)
v0.1.0
Summary
Adds Output
abstraction for printing messages to output and error streams.
Adds ConsoleOutput
class for printing messages to stdout and stderr streams.
Changelog
Added
- Add
Console
interface. - Add
ConsoleOutput
class.
Contributors
- Paul Shryock (@paulshryock)