Socket
Socket
Sign inDemoInstall

staack

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

staack - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

dist/mod.d.ts

@@ -82,6 +82,4 @@ declare const INTERNAL: unique symbol;

declare class Staack {
static readonly MissingContextError: typeof MissingContextError;
private readonly [INTERNAL];
protected constructor(core?: StaackCoreValue);
static create(...keys: Array<KeyProvider<any>>): Staack;
constructor(core?: StaackCoreValue);
has(consumer: KeyConsumer<any, any>): boolean;

@@ -88,0 +86,0 @@ get<T, HasDefault extends boolean>(consumer: KeyConsumer<T, HasDefault>): HasDefault extends true ? T : T | null;

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

// src/Staack.ts
var _Staack = class {
var Staack = class {
[INTERNAL];

@@ -237,5 +237,2 @@ constructor(core = null) {

}
static create(...keys) {
return new _Staack(StaackCore.with(null, ...keys));
}
has(consumer) {

@@ -257,6 +254,6 @@ return StaackCore.has(this[INTERNAL], consumer);

instantiate(staackCore) {
if (this.constructor !== _Staack) {
if (this.constructor !== Staack) {
throw new Error("Cannot instantiate a Staack subclass, you need to override instantiate()");
}
return new _Staack(staackCore);
return new Staack(staackCore);
}

@@ -271,2 +268,5 @@ with(...keys) {

merge(other) {
if (other === this) {
return this;
}
const nextCore = StaackCore.merge(this[INTERNAL], other[INTERNAL]);

@@ -286,4 +286,2 @@ if (nextCore === this[INTERNAL]) {

};
var Staack = _Staack;
__publicField(Staack, "MissingContextError", MissingContextError);
// Annotate the CommonJS export names for ESM import in node:

@@ -290,0 +288,0 @@ 0 && (module.exports = {

{
"name": "staack",
"version": "2.0.1",
"version": "2.0.2",
"description": "A library to create type-safe opaque stacks",

@@ -35,3 +35,2 @@ "keywords": [

"build": "rimraf dist && tsup --format cjs,esm src/mod.ts --dts src/mod.ts",
"build:deno": "rimraf deno && denoify --out deno",
"lint": "prettier . --check && eslint . && tsc --noEmit",

@@ -51,7 +50,6 @@ "lint:fix": "prettier . --write . && eslint . --fix",

"devDependencies": {
"@types/node": "^20.3.0",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"@vitest/coverage-v8": "^0.32.0",
"denoify": "^1.5.8",
"eslint": "^8.42.0",

@@ -75,4 +73,4 @@ "eslint-config-prettier": "^8.8.0",

"before:init": [
"pnpm test",
"pnpm run build:deno"
"pnpm run build",
"pnpm test"
]

@@ -79,0 +77,0 @@ },

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