Socket
Socket
Sign inDemoInstall

@starbeam/modifier

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@starbeam/modifier - npm Package Compare versions

Comparing version 0.7.4 to 0.8.0

.eslintrc.json

15

CHANGELOG.md
# @starbeam/modifier
## 0.8.0
### Minor Changes
- 1a553c5: Prepare for 0.8
### Patch Changes
- Updated dependencies [1a553c5]
- @starbeam/debug@0.8.0
- @starbeam/interfaces@0.8.0
- @starbeam/shared@1.3.0
- @starbeam/universal@0.8.0
- @starbeam/verify@0.8.0
## 0.7.4

@@ -4,0 +19,0 @@

13

dist/index.js

@@ -1,4 +0,4 @@

import { Cell, DelegateInternals } from '@starbeam/core';
import { REUSE_ID } from '@starbeam/debug';
import { UNINITIALIZED, REACTIVE } from '@starbeam/shared';
import { Cell, DelegateInternals } from '@starbeam/universal';
import { verified, isPresent, verify, expected } from '@starbeam/verify';

@@ -9,3 +9,3 @@

const ref = Object.create(null);
const element = Cell(UNINITIALIZED, {
const elementCell = Cell(UNINITIALIZED, {
description: description.implementation(REUSE_ID, {

@@ -15,13 +15,11 @@ reason: "element cell"

});
REFS.set(ref, element);
REFS.set(ref, elementCell);
return {
[REACTIVE]: DelegateInternals([element]),
[REACTIVE]: DelegateInternals([elementCell]),
initialize(value) {
const element = verified(REFS.get(ref), isPresent);
verify(value, value => value instanceof type, expected(`A ref (${description.describe()})`).toBe(`initialized with an instance of ${type.name}`).butGot(() => `an instance of ${value.constructor.name}`));
verify(value, anyElement => anyElement instanceof type, expected(`A ref (${description.describe()})`).toBe(`initialized with an instance of ${type.name}`).butGot(() => `an instance of ${value.constructor.name}`));
element.current = value;
element.freeze();
},
get current() {

@@ -31,3 +29,2 @@ const current = verified(REFS.get(ref), isPresent).current;

}
};

@@ -34,0 +31,0 @@ }

{
"name": "@starbeam/modifier",
"version": "0.7.4",
"version": "0.8.0",
"type": "module",
"main": "dist/index.cjs",
"starbeam:type": "library",
"dependencies": {
"@starbeam/core": "^0.7.4",
"@starbeam/debug": "^0.7.4",
"@starbeam/shared": "^1.2.2",
"@starbeam/verify": "^0.7.3",
"@starbeam/interfaces": "^0.7.3"
},
"devDependencies": {
"@domtree/flavors": "^0.9.1"
},
"types": "dist/index.d.ts",
"exports": {

@@ -24,3 +14,18 @@ ".": {

},
"types": "dist/index.d.ts"
"starbeam:type": "library:public",
"dependencies": {
"@starbeam/debug": "^0.8.0",
"@starbeam/interfaces": "^0.8.0",
"@starbeam/shared": "^1.3.0",
"@starbeam/universal": "^0.8.0",
"@starbeam/verify": "^0.8.0"
},
"devDependencies": {
"@domtree/flavors": "^0.9.2",
"@starbeam-dev/build-support": "1.0.0"
},
"scripts": {
"test:lint": "eslint",
"test:types": "tsc -b"
}
}
import type { anydom } from "@domtree/flavors";
import { Cell, DelegateInternals } from "@starbeam/core";
import { type Description, REUSE_ID } from "@starbeam/debug";
import type { ReactiveProtocol } from "@starbeam/interfaces";
import { REACTIVE, UNINITIALIZED } from "@starbeam/shared";
import { Cell, DelegateInternals } from "@starbeam/universal";
import { expected, isPresent, verified, verify } from "@starbeam/verify";

@@ -29,3 +29,3 @@

const ref = Object.create(null) as object;
const element = Cell<anydom.Element | UNINITIALIZED>(UNINITIALIZED, {
const elementCell = Cell<anydom.Element | UNINITIALIZED>(UNINITIALIZED, {
description: description.implementation(REUSE_ID, {

@@ -36,6 +36,6 @@ reason: "element cell",

REFS.set(ref, element);
REFS.set(ref, elementCell);
return {
[REACTIVE]: DelegateInternals([element]),
[REACTIVE]: DelegateInternals([elementCell]),

@@ -46,3 +46,3 @@ initialize(value: anydom.Element): void {

value,
(value): value is E => value instanceof type,
(anyElement): anyElement is E => anyElement instanceof type,
expected(`A ref (${description.describe()})`)

@@ -49,0 +49,0 @@ .toBe(`initialized with an instance of ${type.name}`)

{
"extends": "../../.config/tsconfig/tsconfig.-package.json",
"extends": "../../../.config/tsconfig/tsconfig.shared.json",
"compilerOptions": {
"outDir": "../../dist/packages",
"composite": true,
"declaration": true,
"composite": true,
"declarationDir": "../../../dist/types",
"declarationMap": true,
"declarationDir": "../../dist/types",
"types": ["../env"]
}
"outDir": "../../../dist/packages",
"types": ["../../env"]
},
"exclude": ["dist/**/*"]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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