Skip to content

Commit

Permalink
ref(scope): Delete unused public getStack() (#12737)
Browse files Browse the repository at this point in the history
`getStack()` is a leftover from the Hub API and was removed with v8. The
method does not need to be public anymore and therefore deleted.
  • Loading branch information
s1gr1d authored Jul 4, 2024
1 parent 4018f80 commit e0adb41
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/core/src/asyncContext/stackStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class AsyncContextStack {
assignedIsolationScope = isolationScope;
}

// scope stack for domains or the process
this._stack = [{ scope: assignedScope }];
this._isolationScope = assignedIsolationScope;
}
Expand Down Expand Up @@ -90,13 +91,6 @@ export class AsyncContextStack {
return this._isolationScope;
}

/**
* Returns the scope stack for domains or the process.
*/
public getStack(): Layer[] {
return this._stack;
}

/**
* Returns the topmost scope layer in the order domain > local > process.
*/
Expand All @@ -110,7 +104,7 @@ export class AsyncContextStack {
private _pushScope(): ScopeInterface {
// We want to clone the content of prev scope
const scope = this.getScope().clone();
this.getStack().push({
this._stack.push({
client: this.getClient(),
scope,
});
Expand All @@ -121,8 +115,8 @@ export class AsyncContextStack {
* Pop a scope from the stack.
*/
private _popScope(): boolean {
if (this.getStack().length <= 1) return false;
return !!this.getStack().pop();
if (this._stack.length <= 1) return false;
return !!this._stack.pop();
}
}

Expand Down

0 comments on commit e0adb41

Please sign in to comment.