From 901c329545dbe53bf129b0bd294c54452b983326 Mon Sep 17 00:00:00 2001 From: Pieter Wigboldus Date: Fri, 2 Dec 2022 20:27:19 +0100 Subject: [PATCH 1/2] Fix exports --- package-lock.json | 18 +++++++++--------- package.json | 9 +++++---- src/app-error.js | 2 +- src/index.js | 13 ------------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41e6c58..0485b69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@hckrnews/error", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hckrnews/error", - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "dependencies": { - "@hckrnews/validator": "^8.0.0" + "@hckrnews/validator": "^8.0.4" }, "devDependencies": { "@babel/core": "^7.9.0", @@ -1962,9 +1962,9 @@ } }, "node_modules/@hckrnews/validator": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@hckrnews/validator/-/validator-8.0.0.tgz", - "integrity": "sha512-7kuNLWW/XviI0l2f4oicO//GyBhsh5dKJ/L4keSuHR/wuwV5kPOxOp3whOSXezDe28lbjdfnlBltKnexhLAt9g==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@hckrnews/validator/-/validator-8.0.4.tgz", + "integrity": "sha512-3QcWw4leg7gxOu4oUSpSMLUYtJZ9NQxUc/92i1Vd2qa4EW3Da87nKWzsl1wQX+c+HieDQwMj5KOWDq5Unw++SA==", "engines": { "node": ">= 18" }, @@ -14079,9 +14079,9 @@ "requires": {} }, "@hckrnews/validator": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@hckrnews/validator/-/validator-8.0.0.tgz", - "integrity": "sha512-7kuNLWW/XviI0l2f4oicO//GyBhsh5dKJ/L4keSuHR/wuwV5kPOxOp3whOSXezDe28lbjdfnlBltKnexhLAt9g==" + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@hckrnews/validator/-/validator-8.0.4.tgz", + "integrity": "sha512-3QcWw4leg7gxOu4oUSpSMLUYtJZ9NQxUc/92i1Vd2qa4EW3Da87nKWzsl1wQX+c+HieDQwMj5KOWDq5Unw++SA==" }, "@humanwhocodes/config-array": { "version": "0.11.7", diff --git a/package.json b/package.json index 18dad83..0f32dcc 100644 --- a/package.json +++ b/package.json @@ -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/" @@ -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", @@ -47,11 +47,12 @@ "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", @@ -90,7 +91,7 @@ "catch" ], "dependencies": { - "@hckrnews/validator": "^8.0.0" + "@hckrnews/validator": "^8.0.4" }, "funding": { "type": "github", diff --git a/src/app-error.js b/src/app-error.js index f211302..e969812 100644 --- a/src/app-error.js +++ b/src/app-error.js @@ -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); diff --git a/src/index.js b/src/index.js index 55e56ea..b22b852 100644 --- a/src/index.js +++ b/src/index.js @@ -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, From 4b3474c9b7235cd17629a962c31534ad4a9acd71 Mon Sep 17 00:00:00 2001 From: Pieter Wigboldus Date: Fri, 2 Dec 2022 20:29:45 +0100 Subject: [PATCH 2/2] Fix source file --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f32dcc..57b2578 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "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",