Socket
Socket
Sign inDemoInstall

@starbeam/shared

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@starbeam/shared - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

tests/tsconfig.json

6

CHANGELOG.md
# @starbeam/shared
## 1.2.2
### Patch Changes
- 40844fd: Try to fix the build
## 1.2.1

@@ -4,0 +10,0 @@

74

dist/index.js

@@ -7,17 +7,24 @@ /**

* `Symbol.for`.
*/ const UNINITIALIZED = Symbol.for("starbeam.UNINITIALIZED");
*/
const UNINITIALIZED = Symbol.for("starbeam.UNINITIALIZED");
/**
* The `REACTIVE` symbol is the protocol entry point for reactive values. Implementations of
* the `ReactiveProtocol` interface specify their reactive behavior under this symbol.
*/ const REACTIVE = Symbol.for("starbeam.REACTIVE");
*/
const REACTIVE = Symbol.for("starbeam.REACTIVE");
/**
* The `NOW` symbol is the name on `globalThis` that is used to store the current timestamp.
*/ const COORDINATION$1 = Symbol.for("starbeam.COORDINATION");
*/
const COORDINATION$1 = Symbol.for("starbeam.COORDINATION");
function getCoordination() {
let coordination = globalThis[COORDINATION$1];
if (!coordination) {
globalThis[COORDINATION$1] = coordination = {};
}
return coordination;
let coordination = globalThis[COORDINATION$1];
if (!coordination) {
globalThis[COORDINATION$1] = coordination = {};
}
return coordination;
}

@@ -31,16 +38,23 @@

* context, which is their primary purpose.
*/ let idGenerator = COORDINATION.id;
*/
let idGenerator = COORDINATION.id;
if (!idGenerator) {
let CURRENT_ID = 1;
idGenerator = COORDINATION.id = {
get () {
return CURRENT_ID++;
}
};
let CURRENT_ID = 1;
idGenerator = COORDINATION.id = {
get() {
return CURRENT_ID++;
}
};
}
const ID_GENERATOR = idGenerator;
/**
* Get a fresh unique ID.
*/ function getID() {
return ID_GENERATOR.get();
*/
function getID() {
return ID_GENERATOR.get();
}

@@ -55,20 +69,28 @@

* each number represents a different moment in time.
*/ const coordination = getCoordination();
*/
const coordination = getCoordination();
let clock = coordination.now;
if (!clock) {
clock = coordination.now = {
timestamp: 0
};
clock = coordination.now = {
timestamp: 0
};
}
const CLOCK = clock;
/**
* Get the current timestamp.
*/ function now() {
return CLOCK.timestamp;
*/
function now() {
return CLOCK.timestamp;
}
/**
* Increment the current timestamp, and return the new one.
*/ function bump() {
CLOCK.timestamp = CLOCK.timestamp + 1;
return now();
*/
function bump() {
CLOCK.timestamp = CLOCK.timestamp + 1;
return now();
}

@@ -75,0 +97,0 @@

{
"name": "@starbeam/shared",
"description": "A package that facilitates having multiple copies of Starbeam in a single process that interoperate with each other",
"version": "1.2.1",
"version": "1.2.2",
"type": "module",
"main": "dist/index.cjs",
"dependencies": {},
"devDependencies": {},
"starbeam:type": "library",
"exports": {

@@ -10,0 +9,0 @@ ".": {

{
"private": true,
"name": "@starbeam-tests/peer",
"name": "@starbeam-tests/shared",
"version": "1.0.0",
"type": "module",
"starbeam:type": "tests",
"dependencies": {
"@starbeam/shared": "workspace:^"
},
"version": null
"publishConfig": {
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.cjs"
}
}
}
}
{
"extends": "../../.config/tsconfig/tsconfig.-package.json",
"compilerOptions": {
"outDir": "../../dist/packages",
"declaration": true,
"composite": true,
"declarationMap": true,
"declarationDir": "../../dist/types/@starbeam/shared",
"emitDeclarationOnly": true,
"declarationDir": "../../dist/types",
"types": ["../env"]
}
},
"include": ["index.ts", "src/**/*.ts", "package.json"]
}

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