Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Notification system" #4818

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

shauns
Copy link
Contributor

@shauns shauns commented Nov 8, 2024

Reverts #4149

@shauns shauns requested review from a team as code owners November 8, 2024 17:23
Copy link
Contributor

github-actions bot commented Nov 8, 2024

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/conf-store.d.ts
@@ -5,17 +5,13 @@ interface CacheValue<T> {
 }
 export type IntrospectionUrlKey = ;
 export type PackageVersionKey = ;
-export type NotificationsKey = ;
-export type NotificationKey = ;
 type MostRecentOccurrenceKey = ;
 type RateLimitKey = ;
-type ExportedKey = IntrospectionUrlKey | PackageVersionKey | NotificationsKey | NotificationKey;
+type ExportedKey = IntrospectionUrlKey | PackageVersionKey;
 interface Cache {
     [introspectionUrlKey: IntrospectionUrlKey]: CacheValue<string>;
     [packageVersionKey: PackageVersionKey]: CacheValue<string>;
-    [notifications: NotificationsKey]: CacheValue<string>;
-    [notification: NotificationKey]: CacheValue<string>;
-    [MostRecentOccurrenceKey: MostRecentOccurrenceKey]: CacheValue<boolean>;
+    [mostRecentOccurrenceKey: MostRecentOccurrenceKey]: CacheValue<boolean>;
     [rateLimitKey: RateLimitKey]: CacheValue<number[]>;
 }
 export interface ConfSchema {
@@ -49,13 +45,12 @@ type CacheValueForKey<TKey extends keyof Cache> = NonNullable<Cache[TKey]>['valu
  * @returns The value from the cache or the result of the function.
  */
 export declare function cacheRetrieveOrRepopulate(key: ExportedKey, fn: () => Promise<CacheValueForKey<typeof key>>, timeout?: number, config?: LocalStorage<ConfSchema>): Promise<CacheValueForKey<typeof key>>;
-export declare function cacheStore(key: ExportedKey, value: string, config?: LocalStorage<ConfSchema>): void;
 /**
  * Fetch from cache if already populated, otherwise return undefined.
  * @param key - The key to use for the cache.
- * @returns The chache element.
+ * @returns The value from the cache or the result of the function.
  */
-export declare function cacheRetrieve(key: ExportedKey, config?: LocalStorage<ConfSchema>): CacheValue<string> | undefined;
+export declare function cacheRetrieve(key: ExportedKey, config?: LocalStorage<ConfSchema>): CacheValueForKey<typeof key> | undefined;
 export declare function cacheClear(config?: LocalStorage<ConfSchema>): void;
 interface TimeInterval {
     days?: number;
packages/cli-kit/dist/public/node/cli.d.ts
@@ -34,8 +34,4 @@ export declare const globalFlags: {
     'no-color': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
     verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
 };
-/**
- * Clear the CLI cache, used to store some API responses and handle notifications status
- */
-export declare function clearCache(): void;
 export {};
\ No newline at end of file

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.04% (+0.27% 🔼)
8378/11629
🟡 Branches
68.49% (+0.24% 🔼)
4052/5916
🟡 Functions
71.37% (+0.06% 🔼)
2196/3077
🟡 Lines
72.44% (+0.23% 🔼)
7923/10937
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / loader.ts
93.09% (-0.05% 🔻)
83.33%
97.03% (-0.03% 🔻)
94% (-0.03% 🔻)
🟢
... / identifiers-extensions.ts
79.49% (-3.24% 🔻)
71.43% (-3.15% 🔻)
100%
80.95% (-2.89% 🔻)
🟢
... / base-command.ts
84.42% (-0.39% 🔻)
81.25% (+1.25% 🔼)
77.27%
85.07% (-0.43% 🔻)

Test suite run success

1899 tests passing in 867 suites.

Report generated by 🧪jest coverage report action from 3c98760

@isaacroldan isaacroldan added this pull request to the merge queue Nov 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 8, 2024
@alexanderMontague alexanderMontague added this pull request to the merge queue Nov 8, 2024
@alexanderMontague
Copy link
Contributor

cc @gonzaloriestra [slack thread]

Merged via the queue into main with commit 13f13f5 Nov 8, 2024
27 checks passed
@alexanderMontague alexanderMontague deleted the revert-4149-notifications branch November 8, 2024 18:50
@gonzaloriestra gonzaloriestra mentioned this pull request Nov 11, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants