Browse Source

ref(js): Remove makeSafeRefluxStore (#39774)

Evan Purkhiser 2 years ago
parent
commit
4b7b97730f

+ 3 - 0
static/app/stores/alertStore.tsx

@@ -36,6 +36,9 @@ const storeConfig: AlertStoreDefinition = {
   count: 0,
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.alerts = [];
     this.count = 0;
   },

+ 3 - 0
static/app/stores/committerStore.tsx

@@ -43,6 +43,9 @@ export const storeConfig: CommitterStoreDefinition = {
   state: {},
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.reset();
   },
 

+ 3 - 0
static/app/stores/configStore.tsx

@@ -24,6 +24,9 @@ const storeConfig: ConfigStoreDefinition = {
   config: {} as Config,
 
   init(): void {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.config = {} as Config;
   },
 

+ 3 - 0
static/app/stores/debugMetaStore.tsx

@@ -19,6 +19,9 @@ const storeConfig: StoreDefinition & DebugMetaStoreInterface & Internals = {
   filter: null,
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.reset();
   },
 

+ 3 - 0
static/app/stores/externalIssueStore.tsx

@@ -10,6 +10,9 @@ interface ExternalIssueStoreDefinition extends StoreDefinition {
 
 const storeConfig: ExternalIssueStoreDefinition = {
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.items = [];
   },
 

+ 3 - 0
static/app/stores/formSearchStore.tsx

@@ -34,6 +34,9 @@ const storeConfig: ExternalIssuesDefinition = {
   searchMap: null,
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.reset();
   },
 

+ 3 - 0
static/app/stores/groupStore.tsx

@@ -93,6 +93,9 @@ const storeConfig: GroupStoreDefinition = {
   statuses: {},
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.reset();
   },
 

+ 3 - 0
static/app/stores/groupingStore.tsx

@@ -191,6 +191,9 @@ const storeConfig: GroupingStoreDefinition = {
   api: new Client(),
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     const state = this.getInitialState();
 
     Object.entries(state).forEach(([key, value]) => {

+ 3 - 0
static/app/stores/guideStore.tsx

@@ -94,6 +94,9 @@ const storeConfig: GuideStoreDefinition = {
   browserHistoryListener: null,
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.state = defaultState;
 
     window.addEventListener('load', this.onURLChange, false);

+ 3 - 0
static/app/stores/hookStore.tsx

@@ -19,6 +19,9 @@ const storeConfig: HookStoreDefinition = {
   hooks: {},
 
   init() {
+    // XXX: Do not use `this.listenTo` in this store. We avoid usage of reflux
+    // listeners due to their leaky nature in tests.
+
     this.hooks = {};
   },
 

Some files were not shown because too many files changed in this diff