Comparing version 3.5.3 to 3.6.0
@@ -289,5 +289,6 @@ import { Awaitable, Promisify, Dict } from 'cosmokit'; | ||
static readonly filter: unique symbol; | ||
static readonly source: unique symbol; | ||
static readonly expose: unique symbol; | ||
static readonly shadow: unique symbol; | ||
/** @deprecated use `Context.current` instead */ | ||
static readonly source: unique symbol; | ||
static readonly current: unique symbol; | ||
@@ -294,0 +295,0 @@ static readonly internal: unique symbol; |
{ | ||
"name": "cordis", | ||
"description": "AOP Framework for Modern JavaScript Applications", | ||
"version": "3.5.3", | ||
"version": "3.6.0", | ||
"sideEffects": false, | ||
@@ -6,0 +6,0 @@ "main": "lib/index.cjs", |
@@ -61,5 +61,6 @@ import { defineProperty, Dict, isNullable } from 'cosmokit' | ||
static readonly filter = Symbol.for('cordis.filter') | ||
static readonly source = Symbol.for('cordis.source') | ||
static readonly expose = Symbol.for('cordis.expose') | ||
static readonly shadow = Symbol.for('cordis.shadow') | ||
/** @deprecated use `Context.current` instead */ | ||
static readonly source = Symbol.for('cordis.current') | ||
static readonly current = Symbol.for('cordis.current') | ||
@@ -170,4 +171,4 @@ static readonly internal = Symbol.for('cordis.internal') | ||
ctx.root[key] = value | ||
if (value && (typeof value === 'object' || typeof value === 'function')) { | ||
defineProperty(value, Context.source, ctx) | ||
if (value instanceof Object) { | ||
defineProperty(value, Context.current, ctx) | ||
} | ||
@@ -216,3 +217,3 @@ ctx.root.emit(self, 'internal/service', name, oldValue) | ||
self[internal[key]['key']] = new constructor(self, config) | ||
self[internal[key]['key']][Context.source] = self | ||
defineProperty(self[internal[key]['key']], Context.current, self) | ||
} | ||
@@ -219,0 +220,0 @@ } |
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
184092
3217