Skip to content

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
paulshryock committed Sep 18, 2023
1 parent 4033fd4 commit 3558f68
Show file tree
Hide file tree
Showing 17 changed files with 87 additions and 85 deletions.
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Fixed** for any bug fixes.
- **Security** in case of vulnerabilities.

## [Unreleased](https://github.com/paulshryock/node-abstractions/compare/HEAD..v0.1.0)
## [Unreleased](https://github.com/paulshryock/node-abstractions.git/compare/HEAD..v0.1.1)

### Added

- Stringable interface.
- MessageStringable class.

### Changed

- Allow Output methods' first parameter to be Stringable.

### Deprecated

### Removed
Expand All @@ -31,6 +26,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Security

## [v0.1.1](https://github.com/paulshryock/node-abstractions.git/releases/tag/v0.1.1) - 2023-09-18

- Stringable interface.
- MessageStringable class.

- Allow Output methods' first parameter to be Stringable.

## [v0.1.0](https://github.com/paulshryock/node-abstractions/releases/tag/v0.1.0) - 2023-06-09

## Added
Expand Down
2 changes: 1 addition & 1 deletion bin/suppress-experimental-warnings.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { emit: originalEmit } = process
* @param {string} event Event type.
* @param {Error} error Event error object.
* @return {false|any} False or calls the original emitter function.
* @since unreleased
* @since 0.1.1
*/
function suppresser(event, error) {
if (
Expand Down
10 changes: 5 additions & 5 deletions config/typedoc/typedoc-plugin-default-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
*
* @param {{ application: Application }} options Plugin load options.
* @return {void}
* @since unreleased
* @since 0.1.1
*/
export function load({ application }) {
const plugin = new DefaultValuesPlugin(new Map())
Expand All @@ -35,7 +35,7 @@ export function load({ application }) {
/**
* Default values plugin class.
*
* @since unreleased
* @since 0.1.1
*/
class DefaultValuesPlugin {
/** @var {Map<Reflection, string>} defaultValues Map of default values. */
Expand All @@ -48,7 +48,7 @@ class DefaultValuesPlugin {
* DefaultValuesPlugin class constructor.
*
* @param {Map<Reflection, string>} defaultValues Map of default values.
* @since unreleased
* @since 0.1.1
*/
constructor(defaultValues = new Map()) {
this.defaultValues = defaultValues
Expand All @@ -64,7 +64,7 @@ class DefaultValuesPlugin {
* @param {Context} _context Current state the converter is in.
* @param {Reflection} reflection Reflection object.
* @return {void}
* @since unreleased
* @since 0.1.1
*/
save(_context, reflection) {
const node =
Expand All @@ -86,7 +86,7 @@ class DefaultValuesPlugin {
* Clears default values.
*
* @return {void}
* @since unreleased
* @since 0.1.1
*/
clear() {
for (const [refl, init] of this.defaultValues) refl.defaultValue = init
Expand Down
4 changes: 2 additions & 2 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": "@paulshryock/abstractions",
"version": "0.1.0",
"version": "0.1.1",
"description": "Reusable abstractions for Node.js.",
"keywords": [
"abstraction",
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/Exception.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Exception class.
*
* @since unreleased
* @since 0.1.1
*/
export class Exception extends Error {}
28 changes: 14 additions & 14 deletions src/FileSystem/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Stringable } from '../Stringable/Stringable.ts'
/**
* File system abstraction.
*
* @since unreleased
* @since 0.1.1
*/
export interface FileSystem {
/**
Expand All @@ -12,7 +12,7 @@ export interface FileSystem {
* @param {string} path Path to file.
* @return {Promise<string>}
* @throws {import('./FileSystem/FileSystemException.ts').FileNotFound}
* @since unreleased
* @since 0.1.1
*/
readFile(path: string): Promise<string>

Expand All @@ -22,7 +22,7 @@ export interface FileSystem {
* @param {string} path Path to file.
* @param {string | Stringable} content Content to write to file.
* @return {Promise<void>}
* @since unreleased
* @since 0.1.1
*/
writeFile(path: string, content: string | Stringable): Promise<void>

Expand All @@ -32,7 +32,7 @@ export interface FileSystem {
* @param {string} path Path to file.
* @param {string | Stringable} content Content to write to file.
* @return {Promise<void>}
* @since unreleased
* @since 0.1.1
*/
appendFile(path: string, content: string | Stringable): Promise<void>

Expand All @@ -42,7 +42,7 @@ export interface FileSystem {
* @param {string} path Path to file.
* @return {Promise<void>}
* @throws {import('./FileSystem/FileSystemException.ts').FileNotFound}
* @since unreleased
* @since 0.1.1
*/
deleteFile(path: string): Promise<void>

Expand All @@ -51,7 +51,7 @@ export interface FileSystem {
*
* @param {string} path Path to file.
* @return {Promise<boolean>}
* @since unreleased
* @since 0.1.1
*/
isFile(path: string): Promise<boolean>

Expand All @@ -60,7 +60,7 @@ export interface FileSystem {
*
* @param {string} path Path to directory.
* @return {Promise<void>}
* @since unreleased
* @since 0.1.1
*/
createDirectory(path: string): Promise<void>

Expand All @@ -70,7 +70,7 @@ export interface FileSystem {
* @param {string} path Path to directory.
* @return {Promise<string[]>}
* @throws {import('./FileSystem/FileSystemException.ts').DirectoryNotFound}
* @since unreleased
* @since 0.1.1
*/
readDirectory(path: string): Promise<string[]>

Expand All @@ -80,7 +80,7 @@ export interface FileSystem {
* @param {string} path Path to directory.
* @return {Promise<string[]>}
* @throws {import('./FileSystem/FileSystemException.ts').DirectoryNotFound}
* @since unreleased
* @since 0.1.1
*/
readDirectoryRecursive(path: string): Promise<string[]>

Expand All @@ -90,7 +90,7 @@ export interface FileSystem {
* @param {string} path Path to directory.
* @return {Promise<void>}
* @throws {import('./FileSystem/FileSystemException.ts').DirectoryNotFound}
* @since unreleased
* @since 0.1.1
*/
deleteDirectory(path: string): Promise<void>

Expand All @@ -100,7 +100,7 @@ export interface FileSystem {
* @param {string} path Path to directory.
* @return {Promise<boolean>}
* @throws {import('./FileSystem/FileSystemException.ts').DirectoryNotFound}
* @since unreleased
* @since 0.1.1
*/
isDirectory(path: string): Promise<boolean>

Expand All @@ -111,7 +111,7 @@ export interface FileSystem {
* @param {string} dest Destination path.
* @return {Promise<void>}
* @throws {import('./FileSystem/FileSystemException.ts').FileSystemException}
* @since unreleased
* @since 0.1.1
*/
copy(src: string, dest: string): Promise<void>

Expand All @@ -122,7 +122,7 @@ export interface FileSystem {
* @param {string} dest Destination path.
* @return {Promise<void>}
* @throws {import('./FileSystem/FileSystemException.ts').FileSystemException}
* @since unreleased
* @since 0.1.1
*/
move(src: string, dest: string): Promise<void>

Expand All @@ -131,7 +131,7 @@ export interface FileSystem {
*
* @param {string} path Path to file or directory.
* @return {Promise<boolean>}
* @since unreleased
* @since 0.1.1
*/
exists(path: string): Promise<boolean>
}
14 changes: 7 additions & 7 deletions src/FileSystem/FileSystemException.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Exception } from '../Exception/Exception.ts'
/**
* File system exception message.
*
* @since unreleased
* @since 0.1.1
*/
export enum FileSystemExceptionMessage {
DirectoryAlreadyExists = 'Directory already exists.',
Expand All @@ -16,15 +16,15 @@ export enum FileSystemExceptionMessage {
/**
* File system exception.
*
* @since unreleased
* @since 0.1.1
*/
export class FileSystemException extends Exception {
/**
* FileSystemException class constructor.
*
* @param {string} path Path to directory.
* @param {ErrorOptions} options Error options.
* @since unreleased
* @since 0.1.1
*/
public constructor(
public readonly path: string,
Expand All @@ -42,27 +42,27 @@ export class FileSystemException extends Exception {
/**
* Directory already exists exception.
*
* @since unreleased
* @since 0.1.1
*/
export class DirectoryAlreadyExists extends FileSystemException {}

/**
* File or directory not found exception.
*
* @since unreleased
* @since 0.1.1
*/
export class FileOrDirectoryNotFound extends FileSystemException {}

/**
* Directory not found exception.
*
* @since unreleased
* @since 0.1.1
*/
export class DirectoryNotFound extends FileOrDirectoryNotFound {}

/**
* File not found exception.
*
* @since unreleased
* @since 0.1.1
*/
export class FileNotFound extends FileOrDirectoryNotFound {}
Loading

0 comments on commit 3558f68

Please sign in to comment.