Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
1.3.0CHANGELOGentry for1.3.0Tests
yarn typecheckRUN v0.26.3 ✓ src/enums/__tests__/error-code-system.spec-d.ts (1) ✓ unit-d:enums/SystemErrorCode (1) ✓ should have members of type Uppercase<string> ✓ src/enums/__tests__/error-code.spec-d.ts (1) ✓ unit-d:enums/ErrorCode (1) ✓ should have members of type Uppercase<string> ✓ src/interfaces/__tests__/err-invalid-url.spec-d.ts (3) ✓ unit-d:interfaces/ErrInvalidUrl (3) ✓ should extend NodeError<TypeError> ✓ should match [code: ErrorCode.ERR_INVALID_URL] ✓ should match [input: string] ✓ src/interfaces/__tests__/errno-exception.spec-d.ts (6) ✓ unit-d:interfaces/ErrnoException (6) ✓ should extend Error ✓ should match [code: SystemErrorCode] ✓ should match [errno: number] ✓ should match [message: string] ✓ should match [path?: string | undefined] ✓ should match [syscall: string] ✓ src/types/__tests__/fn-message.spec-d.ts (2) ✓ unit-d:types/MessageFn (2) ✓ should extract parameters from type parameter ✓ should return string ✓ src/types/__tests__/node-error-constructor.spec-d.ts (5) ✓ unit-d:types/NodeErrorConstructor (5) ✓ should extract parameters of type any[] if M extends string ✓ should extract parameters of type M if M extends any[] ✓ should extract parameters of type Parameters<M> if M extends MessageFn ✓ should match [prototype: NodeError<T>] ✓ should return NodeError<T> ✓ src/types/__tests__/node-error.spec-d.ts (2) ✓ unit-d:types/NodeError (2) ✓ should have type param extend Error type ✓ should match [code: ErrorCode] Test Files 7 passed (7) Tests 20 passed (20) Type Errors no errors Start at 20:36:09 Duration 2.45syarn testRUN v0.26.3 Coverage enabled with c8 ✓ src/enums/__tests__/error-code.spec-d.ts > unit-d:enums/ErrorCode > should have members of type Uppercase<string> ✓ src/enums/__tests__/error-code-system.spec-d.ts > unit-d:enums/SystemErrorCode > should have members of type Uppercase<string> ✓ src/internal/__tests__/k-is-node-error.spec.ts > unit:internal/kIsNodeError > should have description "kIsNodeError" ✓ src/internal/__tests__/format-list.spec.ts > unit:internal/formatList > should return list string ✓ src/enums/__tests__/error-code-system.spec.ts > unit:enums/SystemErrorCode > should map system error codes to system error codes ✓ src/interfaces/__tests__/err-invalid-url.spec-d.ts > unit-d:interfaces/ErrInvalidUrl > should extend NodeError<TypeError> ✓ src/interfaces/__tests__/err-invalid-url.spec-d.ts > unit-d:interfaces/ErrInvalidUrl > should match [code: ErrorCode.ERR_INVALID_URL] ✓ src/interfaces/__tests__/err-invalid-url.spec-d.ts > unit-d:interfaces/ErrInvalidUrl > should match [input: string] ✓ src/internal/__tests__/prepare-stack-trace.spec.ts > unit:internal/prepareStackTrace > should return error with new stack trace ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should extend Error ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should match [code: SystemErrorCode] ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should match [errno: number] ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should match [message: string] ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should match [path?: string | undefined] ✓ src/interfaces/__tests__/errno-exception.spec-d.ts > unit-d:interfaces/ErrnoException > should match [syscall: string] ✓ src/models/__tests__/err-ambiguous-argument.spec.ts > unit:models/ERR_AMBIGUOUS_ARGUMENT > should return TypeError instance ✓ src/models/__tests__/err-ambiguous-argument.spec.ts > unit:models/ERR_AMBIGUOUS_ARGUMENT > should set error code ✓ src/models/__tests__/err-ambiguous-argument.spec.ts > unit:models/ERR_AMBIGUOUS_ARGUMENT > should set error message ✓ src/models/__tests__/err-arg-not-iterable.spec.ts > unit:models/ERR_ARG_NOT_ITERABLE > should return TypeError instance ✓ src/models/__tests__/err-arg-not-iterable.spec.ts > unit:models/ERR_ARG_NOT_ITERABLE > should set error code ✓ src/models/__tests__/err-arg-not-iterable.spec.ts > unit:models/ERR_ARG_NOT_ITERABLE > should set error message ✓ src/internal/__tests__/format-message.spec.ts > unit:internal/formatMessage > should return formatted messsage if msg is MessageFn ✓ src/internal/__tests__/format-message.spec.ts > unit:internal/formatMessage > should return formatted messsage if msg is string ✓ src/internal/__tests__/format-message.spec.ts > unit:internal/formatMessage > should throw if args length is invalid ✓ src/models/__tests__/err-ambiguous-argument.spec.ts > unit:models/ERR_AMBIGUOUS_ARGUMENT > should set error message ✓ src/models/__tests__/err-async-callback.spec.ts > unit:models/ERR_ASYNC_CALLBACK > should return TypeError instance ✓ src/models/__tests__/err-async-callback.spec.ts > unit:models/ERR_ASYNC_CALLBACK > should set error code ✓ src/models/__tests__/err-async-callback.spec.ts > unit:models/ERR_ASYNC_CALLBACK > should set error message ✓ src/models/__tests__/err-import-assertion-type-failed.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_FAILED > should return TypeError instance ✓ src/models/__tests__/err-import-assertion-type-missing.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_MISSING > should return TypeError instance ✓ src/models/__tests__/err-import-assertion-type-missing.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_MISSING > should set error code ✓ src/models/__tests__/err-import-assertion-type-missing.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_MISSING > should set error message ✓ src/models/__tests__/err-import-assertion-type-failed.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_FAILED > should return TypeError instance ✓ src/models/__tests__/err-import-assertion-type-failed.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_FAILED > should set error code ✓ src/models/__tests__/err-illegal-constructor.spec.ts > unit:models/ERR_ILLEGAL_CONSTRUCTOR > should return TypeError instance ✓ src/models/__tests__/err-illegal-constructor.spec.ts > unit:models/ERR_ILLEGAL_CONSTRUCTOR > should set error code ✓ src/models/__tests__/err-illegal-constructor.spec.ts > unit:models/ERR_ILLEGAL_CONSTRUCTOR > should set error message ✓ src/models/__tests__/err-import-assertion-type-missing.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_MISSING > should set error message ✓ src/models/__tests__/err-import-assertion-type-failed.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_FAILED > should set error code ✓ src/models/__tests__/err-import-assertion-type-failed.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_FAILED > should set error message ✓ src/models/__tests__/err-import-assertion-type-unsupported.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED > should return TypeError instance ✓ src/models/__tests__/err-import-assertion-type-unsupported.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED > should set error code ✓ src/models/__tests__/err-import-assertion-type-unsupported.spec.ts > unit:models/ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED > should set error message ✓ src/models/__tests__/err-incompatible-option-pair.spec.ts > unit:models/ERR_INCOMPATIBLE_OPTION_PAIR > should return TypeError instance ✓ src/models/__tests__/err-incompatible-option-pair.spec.ts > unit:models/ERR_INCOMPATIBLE_OPTION_PAIR > should set error code ✓ src/models/__tests__/err-incompatible-option-pair.spec.ts > unit:models/ERR_INCOMPATIBLE_OPTION_PAIR > should set error message ✓ src/models/__tests__/err-invalid-arg-type.spec.ts > unit:models/ERR_INVALID_ARG_TYPE > should return TypeError instance ✓ src/models/__tests__/err-invalid-arg-type.spec.ts > unit:models/ERR_INVALID_ARG_TYPE > should set error code ✓ src/models/__tests__/err-invalid-arg-type.spec.ts > unit:models/ERR_INVALID_ARG_TYPE > should set error message ✓ src/models/__tests__/err-invalid-arg-type.spec.ts > unit:models/ERR_INVALID_ARG_TYPE > should throw if expected is not a string or string[] ✓ src/models/__tests__/err-invalid-arg-type.spec.ts > unit:models/ERR_INVALID_ARG_TYPE > should throw if name is not a string ✓ src/models/__tests__/err-invalid-module-specifier.spec.ts > unit:models/ERR_INVALID_MODULE_SPECIFIER > should return TypeError instance ✓ src/models/__tests__/err-invalid-module-specifier.spec.ts > unit:models/ERR_INVALID_MODULE_SPECIFIER > should set error code ✓ src/models/__tests__/err-invalid-module-specifier.spec.ts > unit:models/ERR_INVALID_MODULE_SPECIFIER > should set error message ✓ src/models/__tests__/err-invalid-arg-value.spec.ts > unit:models/ERR_INVALID_ARG_VALUE > should return TypeError instance ✓ src/models/__tests__/err-invalid-arg-value.spec.ts > unit:models/ERR_INVALID_ARG_VALUE > should set error code ✓ src/models/__tests__/err-invalid-arg-value.spec.ts > unit:models/ERR_INVALID_ARG_VALUE > should set error message ✓ src/models/__tests__/err-invalid-package-config.spec.ts > unit:models/ERR_INVALID_PACKAGE_CONFIG > should return Error instance ✓ src/models/__tests__/err-invalid-package-target.spec.ts > unit:models/ERR_INVALID_PACKAGE_TARGET > should return Error instance ✓ src/models/__tests__/err-invalid-package-target.spec.ts > unit:models/ERR_INVALID_PACKAGE_TARGET > should set error code ✓ src/models/__tests__/err-invalid-package-target.spec.ts > unit:models/ERR_INVALID_PACKAGE_TARGET > should set error message ✓ src/models/__tests__/err-invalid-package-config.spec.ts > unit:models/ERR_INVALID_PACKAGE_CONFIG > should return Error instance ✓ src/models/__tests__/err-invalid-package-config.spec.ts > unit:models/ERR_INVALID_PACKAGE_CONFIG > should set error code ✓ src/models/__tests__/err-invalid-package-config.spec.ts > unit:models/ERR_INVALID_PACKAGE_CONFIG > should set error message ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should return TypeError instance ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should return TypeError instance ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should set #input ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should set #input ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should set error code ✓ src/models/__tests__/err-invalid-url.spec.ts > unit:models/ERR_INVALID_URL > should set error message ✓ src/models/__tests__/err-method-not-implemented.spec.ts > unit:models/ERR_METHOD_NOT_IMPLEMENTED > should return Error instance ✓ src/models/__tests__/err-method-not-implemented.spec.ts > unit:models/ERR_METHOD_NOT_IMPLEMENTED > should set error code ✓ src/models/__tests__/err-method-not-implemented.spec.ts > unit:models/ERR_METHOD_NOT_IMPLEMENTED > should set error message ✓ src/models/__tests__/err-missing-option.spec.ts > unit:models/ERR_MISSING_OPTION > should return TypeError instance ✓ src/models/__tests__/err-missing-option.spec.ts > unit:models/ERR_MISSING_OPTION > should return TypeError instance ✓ src/models/__tests__/err-missing-option.spec.ts > unit:models/ERR_MISSING_OPTION > should set error code ✓ src/models/__tests__/err-missing-option.spec.ts > unit:models/ERR_MISSING_OPTION > should set error code ✓ src/models/__tests__/err-missing-option.spec.ts > unit:models/ERR_MISSING_OPTION > should set error message ✓ src/models/__tests__/err-module-not-found.spec.ts > unit:models/ERR_MODULE_NOT_FOUND > should return Error instance ✓ src/models/__tests__/err-module-not-found.spec.ts > unit:models/ERR_MODULE_NOT_FOUND > should set error code ✓ src/models/__tests__/err-module-not-found.spec.ts > unit:models/ERR_MODULE_NOT_FOUND > should set error message ✓ src/models/__tests__/err-package-import-not-defined.spec.ts > unit:models/ERR_PACKAGE_IMPORT_NOT_DEFINED > should return TypeError instance ✓ src/models/__tests__/err-package-import-not-defined.spec.ts > unit:models/ERR_PACKAGE_IMPORT_NOT_DEFINED > should set error code ✓ src/models/__tests__/err-package-import-not-defined.spec.ts > unit:models/ERR_PACKAGE_IMPORT_NOT_DEFINED > should set error message ✓ src/models/__tests__/err-operation-failed.spec.ts > unit:models/ERR_OPERATION_FAILED > should return Error instance ✓ src/models/__tests__/err-operation-failed.spec.ts > unit:models/ERR_OPERATION_FAILED > should set error code ✓ src/models/__tests__/err-operation-failed.spec.ts > unit:models/ERR_OPERATION_FAILED > should set error message ✓ src/models/__tests__/err-network-import-disallowed.spec.ts > unit:models/ERR_NETWORK_IMPORT_DISALLOWED > should return Error instance ✓ src/models/__tests__/err-network-import-disallowed.spec.ts > unit:models/ERR_NETWORK_IMPORT_DISALLOWED > should set error code ✓ src/models/__tests__/err-network-import-disallowed.spec.ts > unit:models/ERR_NETWORK_IMPORT_DISALLOWED > should set error message ✓ src/models/__tests__/err-package-path-not-exported.spec.ts > unit:models/ERR_PACKAGE_PATH_NOT_EXPORTED > should return Error instance ✓ src/models/__tests__/err-package-path-not-exported.spec.ts > unit:models/ERR_PACKAGE_PATH_NOT_EXPORTED > should set error code ✓ src/models/__tests__/err-package-path-not-exported.spec.ts > unit:models/ERR_PACKAGE_PATH_NOT_EXPORTED > should set error message ✓ src/models/__tests__/err-unhandled-error.spec.ts > unit:models/ERR_UNHANDLED_ERROR > should return Error instance ✓ src/models/__tests__/err-unhandled-error.spec.ts > unit:models/ERR_UNHANDLED_ERROR > should set error code ✓ src/models/__tests__/err-unhandled-error.spec.ts > unit:models/ERR_UNHANDLED_ERROR > should set error message ✓ src/models/__tests__/err-unknown-file-extension.spec.ts > unit:models/ERR_UNKNOWN_FILE_EXTENSION > should return TypeError instance ✓ src/models/__tests__/err-unknown-file-extension.spec.ts > unit:models/ERR_UNKNOWN_FILE_EXTENSION > should set error code ✓ src/models/__tests__/err-unknown-file-extension.spec.ts > unit:models/ERR_UNKNOWN_FILE_EXTENSION > should set error code ✓ src/models/__tests__/err-unknown-file-extension.spec.ts > unit:models/ERR_UNKNOWN_FILE_EXTENSION > should set error message ✓ src/models/__tests__/err-unknown-encoding.spec.ts > unit:models/ERR_UNKNOWN_ENCODING > should return TypeError instance ✓ src/models/__tests__/err-unknown-encoding.spec.ts > unit:models/ERR_UNKNOWN_ENCODING > should set error code ✓ src/models/__tests__/err-unknown-encoding.spec.ts > unit:models/ERR_UNKNOWN_ENCODING > should set error message ✓ src/models/__tests__/err-unsupported-dir-import.spec.ts > unit:models/ERR_UNSUPPORTED_DIR_IMPORT > should return Error instance ✓ src/models/__tests__/err-unsupported-dir-import.spec.ts > unit:models/ERR_UNSUPPORTED_DIR_IMPORT > should set error code ✓ src/models/__tests__/err-unsupported-dir-import.spec.ts > unit:models/ERR_UNSUPPORTED_DIR_IMPORT > should set error message ✓ src/models/__tests__/err-unknown-module-format.spec.ts > unit:models/ERR_UNKNOWN_MODULE_FORMAT > should return RangeError instance ✓ src/models/__tests__/err-unknown-module-format.spec.ts > unit:models/ERR_UNKNOWN_MODULE_FORMAT > should set error code ✓ src/models/__tests__/err-unknown-module-format.spec.ts > unit:models/ERR_UNKNOWN_MODULE_FORMAT > should set error message ✓ src/types/__tests__/fn-message.spec-d.ts > unit-d:types/MessageFn > should extract parameters from type parameter ✓ src/models/__tests__/err-unsupported-esm-url-scheme.spec.ts > unit:models/ERR_UNSUPPORTED_ESM_URL_SCHEME > should return Error instance ✓ src/models/__tests__/err-unsupported-esm-url-scheme.spec.ts > unit:models/ERR_UNSUPPORTED_ESM_URL_SCHEME > should set error code ✓ src/models/__tests__/err-unsupported-esm-url-scheme.spec.ts > unit:models/ERR_UNSUPPORTED_ESM_URL_SCHEME > should set error message ✓ src/types/__tests__/fn-message.spec-d.ts > unit-d:types/MessageFn > should return string ✓ src/types/__tests__/node-error-constructor.spec-d.ts > unit-d:types/NodeErrorConstructor > should extract parameters of type any[] if M extends string ✓ src/types/__tests__/node-error-constructor.spec-d.ts > unit-d:types/NodeErrorConstructor > should extract parameters of type M if M extends any[] ✓ src/types/__tests__/node-error-constructor.spec-d.ts > unit-d:types/NodeErrorConstructor > should extract parameters of type Parameters<M> if M extends MessageFn ✓ src/types/__tests__/node-error-constructor.spec-d.ts > unit-d:types/NodeErrorConstructor > should match [prototype: NodeError<T>] ✓ src/types/__tests__/node-error-constructor.spec-d.ts > unit-d:types/NodeErrorConstructor > should return NodeError<T> ✓ src/types/__tests__/node-error.spec-d.ts > unit-d:types/NodeError > should have type param extend Error type ✓ src/types/__tests__/node-error.spec-d.ts > unit-d:types/NodeError > should match [code: ErrorCode] ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect bigint ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect boolean ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect function ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect instance object ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect null ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect number ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect string ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect symbol ✓ src/utils/__tests__/determine-specific-type.spec.ts > unit:utils/determineSpecificType > should detect undefined ✓ src/utils/__tests__/create-node-error.spec.ts > unit:utils/createNodeError > should return NodeErrorConstructor ✓ src/utils/__tests__/create-node-error.spec.ts > unit:utils/createNodeError > NodeError > should return NodeError instance Test Files 41 passed (41) Tests 122 passed (122) Start at 20:36:25 Duration 10.51s (transform 2.70s, setup 24.59s, collect 6.99s, tests 2.09s) % Coverage report from c8 -------------------------------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------------------|---------|----------|---------|---------|------------------- All files | 100 | 100 | 100 | 100 | enums | 100 | 100 | 100 | 100 | error-code-system.ts | 100 | 100 | 100 | 100 | error-code.ts | 100 | 100 | 100 | 100 | internal | 100 | 100 | 100 | 100 | format-list.ts | 100 | 100 | 100 | 100 | format-message.ts | 100 | 100 | 100 | 100 | k-is-node-error.ts | 100 | 100 | 100 | 100 | prepare-stack-trace.ts | 100 | 100 | 100 | 100 | models | 100 | 100 | 100 | 100 | err-ambiguous-argument.ts | 100 | 100 | 100 | 100 | err-arg-not-iterable.ts | 100 | 100 | 100 | 100 | err-async-callback.ts | 100 | 100 | 100 | 100 | err-illegal-constructor.ts | 100 | 100 | 100 | 100 | err-import-assertion-type-failed.ts | 100 | 100 | 100 | 100 | err-import-assertion-type-missing.ts | 100 | 100 | 100 | 100 | err-import-assertion-type-unsupported.ts | 100 | 100 | 100 | 100 | err-incompatible-option-pair.ts | 100 | 100 | 100 | 100 | err-invalid-arg-type.ts | 100 | 100 | 100 | 100 | err-invalid-arg-value.ts | 100 | 100 | 100 | 100 | err-invalid-module-specifier.ts | 100 | 100 | 100 | 100 | err-invalid-package-config.ts | 100 | 100 | 100 | 100 | err-invalid-package-target.ts | 100 | 100 | 100 | 100 | err-invalid-url.ts | 100 | 100 | 100 | 100 | err-method-not-implemented.ts | 100 | 100 | 100 | 100 | err-missing-option.ts | 100 | 100 | 100 | 100 | err-module-not-found.ts | 100 | 100 | 100 | 100 | err-network-import-disallowed.ts | 100 | 100 | 100 | 100 | err-operation-failed.ts | 100 | 100 | 100 | 100 | err-package-import-not-defined.ts | 100 | 100 | 100 | 100 | err-package-path-not-exported.ts | 100 | 100 | 100 | 100 | err-unhandled-error.ts | 100 | 100 | 100 | 100 | err-unknown-encoding.ts | 100 | 100 | 100 | 100 | err-unknown-file-extension.ts | 100 | 100 | 100 | 100 | err-unknown-module-format.ts | 100 | 100 | 100 | 100 | err-unsupported-dir-import.ts | 100 | 100 | 100 | 100 | err-unsupported-esm-url-scheme.ts | 100 | 100 | 100 | 100 | utils | 100 | 100 | 100 | 100 | create-node-error.ts | 100 | 100 | 100 | 100 | determine-specific-type.ts | 100 | 100 | 100 | 100 | -------------------------------------------|---------|----------|---------|---------|-------------------yarn pack -o %s-%v.tgzAdditional context
N/A
Linked issues
N/A
Submission checklist