Skip to content

Commit

Permalink
Merge pull request #24 from hckrnews/commonjs
Browse files Browse the repository at this point in the history
Fix exports
  • Loading branch information
w3nl authored Dec 2, 2022
2 parents 7f27983 + 4b3474c commit 1aff575
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hckrnews/error",
"description": "Extended Errors",
"version": "1.0.0",
"version": "1.0.1",
"author": {
"name": "Pieter Wigboldus",
"url": "https://hckr.news/"
Expand All @@ -19,7 +19,7 @@
"build": "microbundle --target node src/index.js"
},
"type": "module",
"main": "dist/error.js",
"main": "dist/error.umd.cjs",
"files": [
"src/index.js",
"src/app-error.js",
Expand All @@ -41,17 +41,18 @@
"dist/error.umd.cjs",
"dist/error.umd.cjs.map"
],
"source": "src/error.js",
"source": "src/index.js",
"module": "dist/error.module.mjs",
"unpkg": "dist/error.umd.cjs",
"umd:main": "dist/error.umd.cjs",
"exports": {
"node": {
"default": "./dist/error.umd.cjs",
"module": "./src/index.js",
"require": "./dist/error.umd.cjs"
},
"require": "./dist/error.umd.cjs",
"default": "./src/index.js"
"default": "./dist/error.umd.cjs"
},
"devDependencies": {
"@babel/core": "^7.9.0",
Expand Down Expand Up @@ -90,7 +91,7 @@
"catch"
],
"dependencies": {
"@hckrnews/validator": "^8.0.0"
"@hckrnews/validator": "^8.0.4"
},
"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 '@hckrnews/validator';
import errorSchema from './schemas/error.js';

const validator = new Validator(errorSchema);
Expand Down
13 changes: 0 additions & 13 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ import RateLimitError from './rate-limit-error.js';

const AppError = makeAppError();

export default Object.freeze({
makeAppError,
AppError,
AuthenticationError,
NoContentError,
NotFoundError,
NotImplementedError,
ServerError,
TimeoutError,
ValidationError,
RateLimitError,
});

export {
makeAppError,
AppError,
Expand Down

0 comments on commit 1aff575

Please sign in to comment.