Skip to content

Commit bdec2fb

Browse files
committed
refactor: remove unused changeDir, currentDir and OsError
1 parent 629d637 commit bdec2fb

File tree

6 files changed

+4
-44
lines changed

6 files changed

+4
-44
lines changed

src/change-dir.test.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/change-dir.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/current-dir.test.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/current-dir.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/errors.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
analyzing a package and extracting its API.
44
*/
55
export type ExtractorError =
6-
| OsError
76
| FsError
87
| InstallPackageError
98
| PackageNameError
@@ -12,19 +11,10 @@ export type ExtractorError =
1211
| PackageDeclarationsError
1312
| ProjectError;
1413

15-
/**
16-
`OsError` is thrown when an operation involving `process` fails.
17-
*/
18-
export class OsError extends Error {
19-
constructor(message: string, options?: ErrorOptions) {
20-
// For all errors see the following links:
21-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#differentiate_between_similar_errors
22-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
23-
// https://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript
24-
super(message, options);
25-
this.name = this.constructor.name;
26-
}
27-
}
14+
// For all errors see the following links:
15+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#differentiate_between_similar_errors
16+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
17+
// https://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript
2818

2919
/**
3020
`FsError` is thrown when an operation involving the file system fails.

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export type {
55
export {
66
FsError,
77
InstallPackageError,
8-
OsError,
98
PackageDeclarationsError,
109
PackageJsonError,
1110
PackageNameError,

0 commit comments

Comments
 (0)