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

@quenty/servicebag

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quenty/servicebag - npm Package Compare versions

Comparing version 6.7.0 to 6.7.1-canary.376.7a91a6d.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [6.7.1-canary.376.7a91a6d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/servicebag@6.7.0...@quenty/servicebag@6.7.1-canary.376.7a91a6d.0) (2023-06-24)
**Note:** Version bump only for package @quenty/servicebag
# [6.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/servicebag@6.6.1...@quenty/servicebag@6.7.0) (2023-05-26)

@@ -8,0 +16,0 @@

10

package.json
{
"name": "@quenty/servicebag",
"version": "6.7.0",
"version": "6.7.1-canary.376.7a91a6d.0",
"description": "Service providing mechanisms for Nevermore",

@@ -29,5 +29,5 @@ "keywords": [

"dependencies": {
"@quenty/baseobject": "^6.2.1",
"@quenty/loader": "^6.2.1",
"@quenty/signal": "^2.4.0"
"@quenty/baseobject": "6.2.1",
"@quenty/loader": "6.2.1",
"@quenty/signal": "2.4.0"
},

@@ -37,3 +37,3 @@ "publishConfig": {

},
"gitHead": "11058e90e51ea83d3dad6ae9abe59cc19c36b94b"
"gitHead": "7a91a6d3f90f6c748e60ee82d76afba0d0d9ba0a"
}

@@ -107,2 +107,32 @@ ## ServiceBag

```
```
## Classes versus singletons
Right now services and classes aren't the same. There's no contract to transform a class with lifetime
into a service. However, because some of our services actually implement a .new() method (i.e. service definitions can be classes), we can't differentiate easily.
The issue is around life-cycle.
1. Service.new() can either be a constructor which establishes just data for the service or...
2. Service.new() can actually establish state data.
Other service providers solve this issue by doing the following...
1. Separating out the service identifier from the actual service definition (interfaces)
2. Separating out the addition of services from the actual services
We inherently don't want to separate out interfaces yet because we don't know what the actors or tie-interfaces for hot reloading will even look like.
It's important that we don't define this yet because there's a good chance separation at the service layer will be very important (i.e. we'll want to observe service state existing).
### Potential solution: Interface provision
We could establish a contract that providing an interface will be allowed. That is, a service can return a value it'd like to use as an interface instead. We may need to wait until we resolve these other problems first.
## Major changes in the future
1. Require-by-name
1. Interfaces as definition
2. Hot reloading
3. Async interfaces
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