Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
paulshryock committed Oct 1, 2023
1 parent 4261dca commit 81a7e69
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ 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.git/compare/HEAD..v0.1.2)
## [Unreleased](https://github.com/paulshryock/node-abstractions.git/compare/HEAD..v0.1.3)

### Added

- ProcessInput.

### Changed

- Rewrite LocalFileSystem.copy with standard library.

### Deprecated

### Removed

- Uninstall fs-extra.

### Fixed

### Security

## [v0.1.2](https://github.com/paulshryock/node-abstractions.git/releases/tag/v0.1.2) - 2023-09-20
## [v0.1.3](https://github.com/paulshryock/node-abstractions.git/releases/tag/v0.1.3) - 2023-10-01

### Added
- ProcessInput.

- Rewrite LocalFileSystem.copy with standard library.

- Uninstall fs-extra.

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

- Export RecordStorage.
- Export RecordStorageException.
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.2",
"version": "0.1.3",
"description": "Reusable abstractions for Node.js.",
"keywords": [
"abstraction",
Expand Down
2 changes: 1 addition & 1 deletion src/FileSystem/LocalFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class LocalFileSystem implements FileSystem {
* @param {string} src Directory to copy.
* @param {string} dest Destination path to copy the directory to.
* @return {Promise<void>}
* @since unreleased
* @since 0.1.3
*/
private async copyDirectory(src: string, dest: string): Promise<void> {
for (const item of await this.readDirectory(src))
Expand Down
18 changes: 9 additions & 9 deletions src/Input/ProcessInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ type Configuration = Record<string, unknown>
/**
* Process input class.
*
* @since unreleased
* @since 0.1.3
*/
export class ProcessInput {
/**
* Gets process arguments, if there are any.
*
* @return {string[]} Process arguments, if there are any.
* @since unreleased
* @since 0.1.3
*/
public getArguments(): string[] {
return process.argv.slice(2)
Expand All @@ -23,7 +23,7 @@ export class ProcessInput {
*
* @param {string} key Environment variable name.
* @return {unknown} Environment variable value.
* @since unreleased
* @since 0.1.3
*/
public getEnvironmentVariable(key: string): unknown {
return process.env[key]
Expand All @@ -34,7 +34,7 @@ export class ProcessInput {
*
* @param {string[]} keys Names of environment variables to get.
* @return {typeof process.env} Environment variable values.
* @since unreleased
* @since 0.1.3
*/
public getEnvironmentVariables(keys: string[]): typeof process.env {
return keys.reduce((output, key) => {
Expand All @@ -49,7 +49,7 @@ export class ProcessInput {
* Gets long flags.
*
* @return {Configuration} Long flag key value pairs.
* @since unreleased
* @since 0.1.3
*/
public getLongFlags(): Configuration {
const flags: Configuration = {}
Expand All @@ -69,7 +69,7 @@ export class ProcessInput {
*
* @param {Configuration} flagsMutable Flags to mutate.
* @return {void}
* @since unreleased
* @since 0.1.3
*/
private convertFalseFlagsToBoolean(flagsMutable: Configuration): void {
for (const flag in flagsMutable)
Expand All @@ -83,7 +83,7 @@ export class ProcessInput {
* @param {number} index Current index.
* @param {Configuration} flagsMutable Flags to mutate.
* @return {void}
* @since unreleased
* @since 0.1.3
*/
private parseArgFromArgsAtIndexToFlags(
args: string[],
Expand All @@ -108,7 +108,7 @@ export class ProcessInput {
* @param {string[]} args All args.
* @param {number} index Index to check.
* @return {boolean} Whether the arg has a value.
* @since unreleased
* @since 0.1.3
*/
private argAtIndexHasValue(args: string[], index: number): boolean {
return (
Expand All @@ -122,7 +122,7 @@ export class ProcessInput {
* @param {string} arg Arg to split.
* @param {Configuration} flagsMutable Flags to mutate.
* @return {void}
* @since unreleased
* @since 0.1.3
*/
private splitArgAtEquals(arg: string, flagsMutable: Configuration): void {
const [key, value] = arg.split('=')
Expand Down
4 changes: 2 additions & 2 deletions tests/Input/ProcessInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('ProcessInput', () => {
*
* @param {typeof process.env} obj Object to stringify.
* @return {string} Stringified object.
* @since unreleased
* @since 0.1.3
*/
function stringifyObject(obj: typeof process.env): string {
return `{ ${Object.entries(obj).map(stringifyEntry).join(', ')} }`
Expand All @@ -157,7 +157,7 @@ function stringifyObject(obj: typeof process.env): string {
*
* @param {[key: string, value: string | undefined]} entry Test case entry.
* @return {string} Stringified entry.
* @since unreleased
* @since 0.1.3
*/
function stringifyEntry(
entry: [key: string, value: string | undefined],
Expand Down

0 comments on commit 81a7e69

Please sign in to comment.