Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

editions

Package Overview
Dependencies
Maintainers
2
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editions - npm Package Compare versions

Comparing version 6.3.0 to 6.4.0-next.1627437542.0533fda972613bf5ce24254d21df62426860e4a0

2

compiled-types/index.d.ts

@@ -30,3 +30,3 @@ export declare type Range = string | boolean;

/**
* Use this property to decribe the edition in human readable terms. Such as what it does and who it is for. It is used to reference the edition in user facing reporting, such as error messages.
* Use this property to describe the edition in human readable terms. Such as what it does and who it is for. It is used to reference the edition in user facing reporting, such as error messages.
* @example

@@ -33,0 +33,0 @@ * ``` json

@@ -1,2 +0,1 @@

import Errlop from 'errlop';
interface ErrtionOptions {

@@ -9,4 +8,6 @@ /** The message to use for the error */

level?: string | number;
/** The parent of the error */
parent?: Errtion | Error;
}
export interface Errtion extends Errlop, ErrtionOptions {
export interface Errtion extends Error, ErrtionOptions {
}

@@ -17,4 +18,4 @@ /**

*/
export declare function errtion(this: void, opts: ErrtionOptions, parent?: Errlop | Error): Errtion;
export declare function errtion(this: void, opts: ErrtionOptions, parent?: Errtion | Error): Errtion;
export {};
//# sourceMappingURL=util.d.ts.map

@@ -215,3 +215,3 @@ var __assign = (this && this.__assign) || function () {

}
// Cycle through the editions determing the above
// Cycle through the editions determining the above
var failure = null;

@@ -218,0 +218,0 @@ for (var i = 0; i < editions.length; ++i) {

@@ -1,5 +0,1 @@

// As Errlop uses Editions, we should use a specific Errlop edition
// As otherwise, the circular reference may fail on some machines
// https://github.com/bevry/errlop/issues/2
import Errlop from 'errlop';
/**

@@ -10,4 +6,8 @@ * Allow code and level inputs on Errlop.

export function errtion(opts, parent) {
// extract opts
var code = opts.code, level = opts.level;
var message = opts.message;
if (parent == null)
parent = opts.parent;
// append message
if (code)

@@ -17,3 +17,7 @@ message = code + ": " + message;

message = level + ": " + message;
var error = new Errlop(message, parent);
if (parent)
message = message + "\n\u21AA" + (parent.message || parent);
// create error
var error = new Error(message);
// add properties
if (code)

@@ -23,3 +27,6 @@ error.code = code;

error.level = level;
if (parent)
error.parent = parent;
// return
return error;
}

@@ -226,3 +226,3 @@ "use strict";

}
// Cycle through the editions determing the above
// Cycle through the editions determining the above
var failure = null;

@@ -229,0 +229,0 @@ for (var i = 0; i < editions.length; ++i) {

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.errtion = void 0;
// As Errlop uses Editions, we should use a specific Errlop edition
// As otherwise, the circular reference may fail on some machines
// https://github.com/bevry/errlop/issues/2
var errlop_1 = __importDefault(require("errlop"));
/**

@@ -16,4 +9,8 @@ * Allow code and level inputs on Errlop.

function errtion(opts, parent) {
// extract opts
var code = opts.code, level = opts.level;
var message = opts.message;
if (parent == null)
parent = opts.parent;
// append message
if (code)

@@ -23,3 +20,7 @@ message = code + ": " + message;

message = level + ": " + message;
var error = new errlop_1.default(message, parent);
if (parent)
message = message + "\n\u21AA" + (parent.message || parent);
// create error
var error = new Error(message);
// add properties
if (code)

@@ -29,4 +30,7 @@ error.code = code;

error.level = level;
if (parent)
error.parent = parent;
// return
return error;
}
exports.errtion = errtion;
# History
## v6.4.0 2021 July 28
- Swapped `Errlop` for an in-house solution, that provides a concise and readable solution for this specific use case
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v6.3.0 2021 July 28

@@ -4,0 +9,0 @@

{
"name": "editions",
"version": "6.3.0",
"version": "6.4.0-next.1627437542.0533fda972613bf5ce24254d21df62426860e4a0",
"description": "Publish multiple editions for your JavaScript packages consistently and easily (e.g. source edition, esnext edition, es2015 edition)",

@@ -130,3 +130,2 @@ "homepage": "https://github.com/bevry/editions",

"dependencies": {
"errlop": "^4.2.0",
"version-range": "^1.2.0"

@@ -138,3 +137,2 @@ },

"@typescript-eslint/parser": "^4.28.5",
"assert-helpers": "^8.2.0",
"eslint": "^7.31.0",

@@ -141,0 +139,0 @@ "eslint-config-bevry": "^3.23.0",

@@ -34,3 +34,3 @@ // Imports

/**
* Use this property to decribe the edition in human readable terms. Such as what it does and who it is for. It is used to reference the edition in user facing reporting, such as error messages.
* Use this property to describe the edition in human readable terms. Such as what it does and who it is for. It is used to reference the edition in user facing reporting, such as error messages.
* @example

@@ -357,3 +357,3 @@ * ``` json

// Cycle through the editions determing the above
// Cycle through the editions determining the above
let failure: Errtion | null = null

@@ -360,0 +360,0 @@ for (let i = 0; i < editions.length; ++i) {

@@ -1,6 +0,1 @@

// As Errlop uses Editions, we should use a specific Errlop edition
// As otherwise, the circular reference may fail on some machines
// https://github.com/bevry/errlop/issues/2
import Errlop from 'errlop'
interface ErrtionOptions {

@@ -13,5 +8,7 @@ /** The message to use for the error */

level?: string | number
/** The parent of the error */
parent?: Errtion | Error
}
export interface Errtion extends Errlop, ErrtionOptions {}
export interface Errtion extends Error, ErrtionOptions {}

@@ -25,12 +22,24 @@ /**

opts: ErrtionOptions,
parent?: Errlop | Error
parent?: Errtion | Error
): Errtion {
// extract opts
const { code, level } = opts
let { message } = opts
if (parent == null) parent = opts.parent
// append message
if (code) message = `${code}: ${message}`
if (level) message = `${level}: ${message}`
const error = new Errlop(message, parent) as Errtion
if (parent) message = `${message}\n↪${parent.message || parent}`
// create error
const error = new Error(message) as Errtion
// add properties
if (code) error.code = code
if (level) error.level = level
if (parent) error.parent = parent
// return
return error
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc