Skip to content

Commit

Permalink
Merge pull request #40 from hckrnews/feature/trojs
Browse files Browse the repository at this point in the history
Move to TroJS
  • Loading branch information
w3nl committed Apr 19, 2024
2 parents ad32ca9 + ab4489d commit fe12c39
Show file tree
Hide file tree
Showing 7 changed files with 695 additions and 610 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

HckrNews Error is Free and Open Source Software. Issues and pull requests are more than welcome!
TroJS Error is Free and Open Source Software. Issues and pull requests are more than welcome!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Hckr.News
Copyright (c) 2024 TroJS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @hckrnews/error
# @trojs/error

[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]
[![NPM version][npm-image]][npm-url]

With this package you can throw a custom error with more details.
The object extends an Error object.
Expand Down Expand Up @@ -51,14 +51,14 @@ In the catch method, you can use these fields:

Install the package:

`npm install @hckrnews/error`
`npm install @trojs/error`
or
`yarn add @hckrnews/error`
`yarn add @trojs/error`

Example usage:

```javascript
import { NotFoundError } from '@hckrnews/error'
import { NotFoundError } from '@trojs/error'

class Test {
/**
Expand Down Expand Up @@ -88,11 +88,5 @@ class Test {

```

[npm-url]: https://www.npmjs.com/package/@hckrnews/error
[npm-image]: https://img.shields.io/npm/v/@hckrnews/error.svg
[build-url]: https://scrutinizer-ci.com/g/hckrnews/error/build-status/main
[build-image]: https://scrutinizer-ci.com/g/hckrnews/error/badges/build.png?b=main
[coveralls-url]: https://coveralls.io/r/hckrnews/error
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/error/master.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/error/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/error/badges/quality-score.png?b=main
[npm-url]: https://www.npmjs.com/package/@trojs/error
[npm-image]: https://img.shields.io/npm/v/@trojs/error.svg
2 changes: 1 addition & 1 deletion jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
'^.+\\.js?$': 'babel-jest',
},

transformIgnorePatterns: ['node_modules/(?!(@hckrnews)/)'],
transformIgnorePatterns: ['node_modules/(?!(@hckrnews|@trojs)/)'],

moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
Expand Down
1,269 changes: 680 additions & 589 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@hckrnews/error",
"name": "@trojs/error",
"description": "Extended Errors",
"version": "2.0.3",
"version": "3.0.0",
"author": {
"name": "Pieter Wigboldus",
"url": "https://hckr.news/"
"url": "https://trojs.org/"
},
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"catch"
],
"dependencies": {
"@hckrnews/validator": "^9.0.0"
"@trojs/validator": "^10.0.0"
},
"funding": {
"type": "github",
Expand Down
2 changes: 1 addition & 1 deletion src/app-error.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** global: validator */
import { Validator } from '@hckrnews/validator';
import { Validator } from '@trojs/validator';
import errorSchema from './schemas/error.js';

const validator = new Validator(errorSchema);
Expand Down

0 comments on commit fe12c39

Please sign in to comment.