Skip to content

Migrate to eslint 9#6821

Closed
gonzaloriestra wants to merge 1 commit intomainfrom
migrate-eslint-9
Closed

Migrate to eslint 9#6821
gonzaloriestra wants to merge 1 commit intomainfrom
migrate-eslint-9

Conversation

@gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Feb 5, 2026

WHY are these changes introduced?

ESLint 8 has reached end of life and the ecosystem has moved to ESLint 9 with its new "flat config" format. More info here: https://eslint.org/docs/latest/use/migrate-to-9.0.0

This migration is necessary to:

  • Stay on supported tooling with security updates
  • Unblock dependency updates that require ESLint 9
  • Adopt the simpler flat config format that replaces the complex cascading .eslintrc.* configuration
  • Update to @typescript-eslint v8 which includes improved type checking and drops deprecated rules like ban-types

WHAT is this pull request doing?

Configuration Migration:

  • Migrates from .eslintrc.cjs to eslint.config.js (flat config format)
  • Deletes .eslintignore (ignores are now defined inline in the config)
  • Updates @shopify/eslint-plugin-cli to export flat config

Plugin Updates:

  • eslint: 8.x → 9.x
  • @typescript-eslint/*: 7.x → 8.x
  • @shopify/eslint-plugin: → 50.0.0 (flat config compatible)
  • eslint-plugin-importeslint-plugin-import-x (ESM compatible replacement)
  • eslint-plugin-nodeeslint-plugin-n (maintained fork, node/n/ prefix)
  • eslint-plugin-vitest@vitest/eslint-plugin

Rule Changes:

  • Removes @typescript-eslint/ban-types references (deprecated in v8, replaced by no-restricted-types)
  • Updates import/ rule prefix to import-x/
  • Updates node/ rule prefix to n/
  • Disables @shopify/strict-component-boundaries (incompatible with import-x resolver)
  • Removes obsolete eslint-disable comments for rules that no longer exist

Type Fixes:

  • Fixes TypeScript errors in ui-extensions-server-kit and ui-extensions-test-utils uncovered by stricter type checking
  • Updates GraphQLVariables type to be compatible with generated GraphQL interfaces

How to test your changes?

CI

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@gonzaloriestra gonzaloriestra force-pushed the migrate-eslint-9 branch 2 times, most recently from fba5233 to c8574b4 Compare February 5, 2026 13:11
@gonzaloriestra gonzaloriestra changed the title Migrate to eslint 9.26 Migrate to eslint 9 Feb 5, 2026
@gonzaloriestra gonzaloriestra force-pushed the migrate-eslint-9 branch 3 times, most recently from a3d582a to 3233390 Compare February 5, 2026 13:51
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.67% (+0.45% 🔼)
14457/18145
🟡 Branches
74% (+0.89% 🔼)
7174/9695
🟡 Functions
79.79% (+0.42% 🔼)
3687/4621
🟢 Lines
80.04% (+0.46% 🔼)
13669/17078
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / admin-as-app.ts
100% 100% 100% 100%
🟢
... / metafield_definitions.ts
100% 100% 100% 100%
🟢
... / metaobject_definitions.ts
100% 100% 100% 100%
🟢
... / bulk-operation-cancel.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-mutation.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-query.ts
100% 100% 100% 100%
🟢
... / get-bulk-operation-by-id.ts
100% 100% 100% 100%
🟢
... / list-bulk-operations.ts
100% 100% 100% 100%
🟢
... / staged-uploads-create.ts
100% 100% 100% 100%
🟢
... / fetch_store_by_domain.ts
100% 100% 100% 100%
🟢
... / organization_exp_flags.ts
100% 100% 100% 100%
🔴
... / import-custom-data-definitions.ts
0% 100% 0% 0%
🔴
... / cancel.ts
0% 100% 0% 0%
🔴
... / execute.ts
0% 0% 0% 0%
🔴
... / status.ts
0% 0% 0% 0%
🔴
... / pull.ts
0% 100% 0% 0%
🟡
... / execute-operation.ts
75.68% 50% 100% 75.68%
🔴
... / pull.ts
0% 0% 0% 0%
🟢
... / bulk-operation-status.ts
96.55% 92.11% 100% 100%
🟢
... / cancel-bulk-operation.ts
100% 100% 100% 100%
🟢
... / constants.ts
100% 100% 100% 100%
🟢
... / download-bulk-operation-results.ts
100% 100% 100% 100%
🟢
... / execute-bulk-operation.ts
87.14% 83.67% 100% 88.41%
🟢
... / format-bulk-operation-status.ts
100% 100% 100% 100%
🟢
... / run-mutation.ts
100% 100% 100% 100%
🟢
... / run-query.ts
100% 100% 100% 100%
🟡
... / stage-file.ts
73.53% 62.5% 85.71% 72.73%
🟢
... / watch-bulk-operation.ts
100% 94.74% 100% 100%
🟢
... / utilities.ts
100% 100% 100% 100%
🟢
... / declarative-definitions.ts
98.54% 93.18% 100% 98.51%
🟢
... / common.ts
97.62% 95% 100% 97.06%
🟢
... / execute-command-helpers.ts
100% 100% 100% 100%
🟢
... / file-formatter.ts
100% 100% 100% 100%
🔴
... / promiseWithResolvers.ts
33.33% 50% 50% 33.33%
🟢
... / theme-listing.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / execute.ts
0%
0% (-100% 🔻)
0% 0%
🟢
... / loader.ts
94.06% (+0.2% 🔼)
86.41% (-0.42% 🔻)
97.17% (+0.11% 🔼)
94.85% (+0.18% 🔼)
🟢
... / extension-instance.ts
84.8% (+0.23% 🔼)
77.6% (-0.91% 🔻)
92.06% (+0.13% 🔼)
85.11% (+0.24% 🔼)
🟡
... / specification.ts
69.64% (+0.55% 🔼)
75.61% (+2.44% 🔼)
76.47% (-1.31% 🔻)
69.39% (+0.64% 🔼)
🟢
... / ui_extension.ts
88.61% (-6.22% 🔻)
78.57% (-2.68% 🔻)
85.19% (-14.81% 🔻)
90.79% (-5.67% 🔻)
🟢
... / store-context.ts
100%
82.35% (-0.98% 🔻)
100% 100%
🟢
... / Logs.tsx
90%
90.91% (-5.97% 🔻)
100% 90%
🟢
... / fetch.ts
84.21% (+0.88% 🔼)
82.35% (-0.98% 🔻)
75%
85.29% (+1.42% 🔼)
🟢
... / app-event-watcher-handler.ts
86.36% (-4.11% 🔻)
75% 86.67%
85.71% (-5.19% 🔻)
🟡
... / middlewares.ts
77.33% (-0.87% 🔻)
75%
68.42% (-1.58% 🔻)
76.39% (-0.94% 🔻)
🔴
... / server.ts
1.23% (-0.02% 🔻)
0% 0%
1.3% (-0.02% 🔻)
🟢
... / setup-dev-processes.ts
93.62% (+0.14% 🔼)
66.67% (-4.76% 🔻)
90%
92.86% (+0.17% 🔼)
🟢
... / bundle.ts
93.22%
63.33% (-3.33% 🔻)
94.12% (+5.88% 🔼)
96.3%
🟢
... / developer-platform-client.ts
84.62% (-1.5% 🔻)
71.43% (+0.84% 🔼)
81.82% (+1.82% 🔼)
93.75% (+0.42% 🔼)
🔴
... / http-reverse-proxy.ts
58.97% (-4.91% 🔻)
37.04% (-2.96% 🔻)
58.33% (-5.3% 🔻)
59.46% (-5.25% 🔻)
🟢
... / api.ts
87.07% (-0.43% 🔻)
76.71% (-0.1% 🔻)
100%
86.49% (-0.43% 🔻)
🟢
... / device-authorization.ts
88.24% (-0.83% 🔻)
76.47% (-2.94% 🔻)
100%
88.24% (-0.83% 🔻)
🟢
... / SingleTask.tsx
84.21% (-15.79% 🔻)
50% (-50% 🔻)
80% (-20% 🔻)
84.21% (-15.79% 🔻)
🔴
... / environment.ts
35% (-5% 🔻)
41.18%
40% (-10% 🔻)
36.84% (-5.26% 🔻)
🔴
... / ui.tsx
50.82% (-0.79% 🔻)
42.86% (-5.53% 🔻)
54.55% (+1.42% 🔼)
50% (-0.82% 🔻)
🟢
... / console.ts
81.82% (+15.15% 🔼)
75% (-25% 🔻)
100% (+33.33% 🔼)
81.82% (+15.15% 🔼)
🟢
... / init.ts
88% (-0.89% 🔻)
71.43% (+4.76% 🔼)
86.67% (+4.85% 🔼)
88% (-0.89% 🔻)
🟢
... / storefront-renderer.ts
90.2% (-0.54% 🔻)
78.95%
81.82% (-1.52% 🔻)
90.2% (-0.54% 🔻)
🟡
... / theme-polling.ts
67.57% (-0.49% 🔻)
68.75% 78.57%
66.18% (-1.47% 🔻)
🟢
... / ExtensionServerClient.ts
92.23% (+0.15% 🔼)
87.67% (-1.06% 🔻)
87.5%
94.9% (+0.11% 🔼)

Test suite run success

3718 tests passing in 1438 suites.

Report generated by 🧪jest coverage report action from 0a85c6e

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

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
@@ -123,12 +123,10 @@ interface RunWithRateLimitOptions {
  * @returns true, or undefined if the task was not run.
  */
 export declare function runWithRateLimit(options: RunWithRateLimitOptions, config?: LocalStorage<ConfSchema>): Promise<boolean>;
-export declare function getConfigStoreForPartnerStatus(): LocalStorage<{
-    [partnerToken: string]: {
-        status: true;
-        checkedAt: string;
-    };
-}>;
+export declare function getConfigStoreForPartnerStatus(): LocalStorage<Record<string, {
+    status: true;
+    checkedAt: string;
+}>>;
 export declare function getCachedPartnerAccountStatus(partnersToken: string): true | null;
 export declare function setCachedPartnerAccountStatus(partnersToken: string): void;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/common/collection.d.ts
@@ -8,9 +8,7 @@ import type { List, ValueIteratee } from 'lodash';
  * @param iteratee - The function invoked per iteration.
  * @returns Returns the composed aggregate object.
  */
-export declare function groupBy<T>(collection: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): {
-    [index: string]: T[];
-};
+export declare function groupBy<T>(collection: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): Record<string, T[]>;
 /**
  * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for,
  * while the second of which contains elements predicate returns falsey for.
packages/cli-kit/dist/public/node/dot-env.d.ts
@@ -9,9 +9,7 @@ export interface DotEnvFile {
     /**
      * Variables of the .env file.
      */
-    variables: {
-        [name: string]: string;
-    };
+    variables: Record<string, string>;
 }
 /**
  * Reads and parses a .env file.
@@ -30,7 +28,5 @@ export declare function writeDotEnv(file: DotEnvFile): Promise<void>;
  * @param envFileContent - .env file contents.
  * @param updatedValues - object containing new env variables values.
  */
-export declare function patchEnvFile(envFileContent: string | null, updatedValues: {
-    [key: string]: string | undefined;
-}): string;
+export declare function patchEnvFile(envFileContent: string | null, updatedValues: Record<string, string | undefined>): string;
 export declare function createDotEnvFileLine(key: string, value?: string, quote?: string): string;
\ No newline at end of file
packages/cli-kit/dist/public/node/environments.d.ts
@@ -1,7 +1,5 @@
 import { JsonMap } from '../../private/common/json.js';
-export interface Environments {
-    [name: string]: JsonMap;
-}
+export type Environments = Record<string, JsonMap>;
 interface LoadEnvironmentOptions {
     from?: string;
     silent?: boolean;
packages/cli-kit/dist/public/node/error.d.ts
@@ -1,5 +1,5 @@
 import { AlertCustomSection } from './ui.js';
-import { OutputMessage } from '../../public/node/output.js';
+import { OutputMessage } from './output.js';
 import { InlineToken, TokenItem } from '../../private/node/ui/components/TokenizedText.js';
 export { ExtendableError } from 'ts-error';
 export declare enum FatalErrorType {
packages/cli-kit/dist/public/node/fs.d.ts
@@ -1,5 +1,5 @@
-import { RandomNameFamily } from '../common/string.js';
 import { OverloadParameters } from '../../private/common/ts/overloaded-parameters.js';
+import { RandomNameFamily } from '../common/string.js';
 import { findUp as internalFindUp } from 'find-up';
 import { ReadStream, WriteStream } from 'fs';
 import type { Pattern, Options as GlobOptions } from 'fast-glob';
packages/cli-kit/dist/public/node/git.d.ts
@@ -17,9 +17,7 @@ export declare function initializeGitRepository(directory: string, initialBranch
  * @returns Files ignored by the lockfile.
  */
 export declare function checkIfIgnoredInGitRepository(directory: string, files: string[]): Promise<string[]>;
-export interface GitIgnoreTemplate {
-    [section: string]: string[];
-}
+export type GitIgnoreTemplate = Record<string, string[]>;
 /**
  * Create a .gitignore file in the given directory.
  *
packages/cli-kit/dist/public/node/json-schema.d.ts
@@ -1,9 +1,7 @@
 import { ParseConfigurationResult } from './schema.js';
 import { ErrorObject, SchemaObject } from 'ajv';
 export type HandleInvalidAdditionalProperties = 'strip' | 'fail';
-type AjvError = ErrorObject<string, {
-    [key: string]: unknown;
-}>;
+type AjvError = ErrorObject<string, Record<string, unknown>>;
 /**
  * Normalises a JSON Schema by standardising it's internal implementation.
  *
packages/cli-kit/dist/public/node/local-storage.d.ts
@@ -2,9 +2,7 @@
  * A wrapper around the  package that provides a strongly-typed interface
  * for accessing the local storage.
  */
-export declare class LocalStorage<T extends {
-    [key: string]: any;
-}> {
+export declare class LocalStorage<T extends Record<string, any>> {
     private readonly config;
     constructor(options: {
         projectName?: string;
packages/cli-kit/dist/public/node/metadata.d.ts
@@ -33,9 +33,7 @@ export type SensitiveSchema<T> = T extends RuntimeMetadataManager<infer _TPublic
  * @param defaultPublicMetadata - Optional, default data for the container.
  * @returns A container for the metadata.
  */
-export declare function createRuntimeMetadataContainer<TPublic extends AnyJson, TSensitive extends AnyJson = {
-    [key: string]: never;
-}>(defaultPublicMetadata?: Partial<TPublic>): RuntimeMetadataManager<TPublic, TSensitive>;
+export declare function createRuntimeMetadataContainer<TPublic extends AnyJson, TSensitive extends AnyJson = Record<string, never>>(defaultPublicMetadata?: Partial<TPublic>): RuntimeMetadataManager<TPublic, TSensitive>;
 type CmdFieldsFromMonorail = PickByPrefix<MonorailEventPublic, 'cmd_all_'> & PickByPrefix<MonorailEventPublic, 'cmd_app_'> & PickByPrefix<MonorailEventPublic, 'cmd_create_app_'> & PickByPrefix<MonorailEventPublic, 'cmd_theme_'> & PickByPrefix<MonorailEventPublic, 'store_'>;
 declare const coreData: RuntimeMetadataManager<CmdFieldsFromMonorail, {
     commandStartOptions: {
packages/cli-kit/dist/public/node/mimes.d.ts
@@ -10,6 +10,4 @@ export declare function lookupMimeType(fileName: string): string;
  *
  * @param newTypes - Object of key-values where key is extension and value is mime type.
  */
-export declare function setMimeTypes(newTypes: {
-    [key: string]: string;
-}): void;
\ No newline at end of file
+export declare function setMimeTypes(newTypes: Record<string, string>): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/multiple-installation-warning.d.ts
@@ -5,6 +5,4 @@
  * @param directory - The directory of the project.
  * @param dependencies - The dependencies of the project.
  */
-export declare function showMultipleCLIWarningIfNeeded(directory: string, dependencies: {
-    [key: string]: string;
-}): Promise<void>;
\ No newline at end of file
+export declare function showMultipleCLIWarningIfNeeded(directory: string, dependencies: Record<string, string>): Promise<void>;
\ No newline at end of file
packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -13,9 +13,7 @@ export declare const bunLockfile = "bun.lockb";
 export declare const pnpmWorkspaceFile = "pnpm-workspace.yaml";
 /** An array containing the lockfiles from all the package managers */
 export declare const lockfiles: Lockfile[];
-export declare const lockfilesByManager: {
-    [key in PackageManager]: Lockfile | undefined;
-};
+export declare const lockfilesByManager: Record<PackageManager, Lockfile | undefined>;
 export type Lockfile = 'yarn.lock' | 'package-lock.json' | 'pnpm-lock.yaml' | 'bun.lockb';
 /**
  * A union type that represents the type of dependencies in the package.json
@@ -113,9 +111,7 @@ export declare function getPackageVersion(packageJsonPath: string): Promise<stri
  * @param packageJsonPath - Path to the package.json file
  * @returns A promise that resolves with the list of dependencies.
  */
-export declare function getDependencies(packageJsonPath: string): Promise<{
-    [key: string]: string;
-}>;
+export declare function getDependencies(packageJsonPath: string): Promise<Record<string, string>>;
 /**
  * Returns true if the app uses workspaces, false otherwise.
  * @param packageJsonPath - Path to the package.json file
@@ -167,27 +163,19 @@ export interface PackageJson {
     /**
      * The scripts attribute of the package.json
      */
-    scripts?: {
-        [key: string]: string;
-    };
+    scripts?: Record<string, string>;
     /**
      * The dependencies attribute of the package.json
      */
-    dependencies?: {
-        [key: string]: string;
-    };
+    dependencies?: Record<string, string>;
     /**
      * The devDependencies attribute of the package.json
      */
-    devDependencies?: {
-        [key: string]: string;
-    };
+    devDependencies?: Record<string, string>;
     /**
      * The peerDependencies attribute of the package.json
      */
-    peerDependencies?: {
-        [key: string]: string;
-    };
+    peerDependencies?: Record<string, string>;
     /**
      * The optional oclif settings attribute of the package.json
      */
@@ -201,15 +189,11 @@ export interface PackageJson {
     /**
      * The resolutions attribute of the package.json. Only useful when using yarn as package manager
      */
-    resolutions?: {
-        [key: string]: string;
-    };
+    resolutions?: Record<string, string>;
     /**
      * The overrides attribute of the package.json. Only useful when using npm o npmn as package managers
      */
-    overrides?: {
-        [key: string]: string;
-    };
+    overrides?: Record<string, string>;
     /**
      *  The prettier attribute of the package.json
      */
@@ -284,9 +268,7 @@ export declare function findUpAndReadPackageJson(fromDirectory: string): Promise
     path: string;
     content: PackageJson;
 }>;
-export declare function addResolutionOrOverride(directory: string, dependencies: {
-    [key: string]: string;
-}): Promise<void>;
+export declare function addResolutionOrOverride(directory: string, dependencies: Record<string, string>): Promise<void>;
 /**
  * Writes the package.json file to the given directory.
  *
packages/cli-kit/dist/public/node/output.d.ts
@@ -49,9 +49,7 @@ export declare function formatPackageManagerCommand(packageManager: PackageManag
 export declare function outputContent(strings: TemplateStringsArray, ...keys: (ContentToken<unknown> | string)[]): TokenizedString;
 /** Log levels. */
 export type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
-export declare let collectedLogs: {
-    [key: string]: string[];
-};
+export declare let collectedLogs: Record<string, string[]>;
 /**
  * This is only used during UnitTesting.
  * If we are in a testing context, instead of printing the logs to the console,
packages/cli-kit/dist/public/node/plugins.d.ts
@@ -20,30 +20,22 @@ type AppSpecificMonorailFields = PickByPrefix<MonorailEventPublic, 'app_', 'proj
 type AppSpecificSensitiveMonorailFields = PickByPrefix<MonorailEventSensitive, 'app_'>;
 export interface HookReturnsPerPlugin extends HookReturnPerTunnelPlugin {
     public_command_metadata: {
-        options: {
-            [key: string]: never;
-        };
+        options: Record<string, never>;
         pluginReturns: {
             '@shopify/app': Partial<AppSpecificMonorailFields>;
             [pluginName: string]: JsonMap;
         };
     };
     sensitive_command_metadata: {
-        options: {
-            [key: string]: never;
-        };
+        options: Record<string, never>;
         pluginReturns: {
             '@shopify/app': Partial<AppSpecificSensitiveMonorailFields>;
             [pluginName: string]: JsonMap;
         };
     };
     [hookName: string]: {
-        options: {
-            [key: string]: unknown;
-        };
-        pluginReturns: {
-            [key: string]: unknown;
-        };
+        options: Record<string, unknown>;
+        pluginReturns: Record<string, unknown>;
     };
 }
 export type PluginReturnsForHook<TEvent extends keyof TPluginMap, TPluginName extends keyof TPluginMap[TEvent]['pluginReturns'], TPluginMap extends HookReturnsPerPlugin = HookReturnsPerPlugin> = TPluginMap[TEvent]['pluginReturns'][TPluginName];
packages/cli-kit/dist/public/node/system.d.ts
@@ -2,9 +2,7 @@ import { AbortSignal } from './abort.js';
 import type { Writable, Readable } from 'stream';
 export interface ExecOptions {
     cwd?: string;
-    env?: {
-        [key: string]: string | undefined;
-    };
+    env?: Record<string, string | undefined>;
     stdin?: Readable | 'inherit';
     stdout?: Writable | 'inherit';
     stderr?: Writable | 'inherit';
packages/cli-kit/dist/private/node/analytics/bounded-collections.d.ts
@@ -38,8 +38,6 @@ export declare class BMap<TKey, TValue> extends Map<TKey, TValue> {
     set(key: TKey, value: TValue): this;
     delete(key: TKey): boolean;
     clear(): void;
-    toObject(): {
-        [key: string]: TValue;
-    };
+    toObject(): Record<string, TValue>;
     private enforceLimit;
 }
\ No newline at end of file
packages/cli-kit/dist/private/node/api/graphql.d.ts
@@ -1,6 +1,4 @@
 import { Variables } from 'graphql-request';
-export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: {
-    [key: string]: string;
-}): void;
+export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: Record<string, string>): void;
 export declare function sanitizeVariables(variables: Variables): string;
 export declare function errorHandler(api: string): (error: unknown, requestId?: string) => unknown;
\ No newline at end of file
packages/cli-kit/dist/private/node/api/headers.d.ts
@@ -13,12 +13,8 @@ export declare class GraphQLClientError extends RequestClientError {
  * @param headers - HTTP headers.
  * @returns A sanitized version of the headers as a string.
  */
-export declare function sanitizedHeadersOutput(headers: {
-    [key: string]: string;
-}): string;
-export declare function buildHeaders(token?: string): {
-    [key: string]: string;
-};
+export declare function sanitizedHeadersOutput(headers: Record<string, string>): string;
+export declare function buildHeaders(token?: string): Record<string, string>;
 /**
  * This utility function returns the https.Agent to use for a given service.
  */
packages/cli-kit/dist/private/node/api/rest.d.ts
@@ -1,9 +1,5 @@
 import { AdminSession } from '../../../public/node/session.js';
 export declare function restRequestBody<T>(requestBody?: T): string | undefined;
-export declare function restRequestUrl(session: AdminSession, apiVersion: string, path: string, searchParams?: {
-    [name: string]: string;
-}): string;
-export declare function restRequestHeaders(session: AdminSession): {
-    [key: string]: string;
-};
+export declare function restRequestUrl(session: AdminSession, apiVersion: string, path: string, searchParams?: Record<string, string>): string;
+export declare function restRequestHeaders(session: AdminSession): Record<string, string>;
 export declare function isThemeAccessSession(session: AdminSession): boolean;
\ No newline at end of file
packages/cli-kit/dist/private/node/session/exchange.d.ts
@@ -19,9 +19,7 @@ export interface ExchangeScopes {
  * @param store - the store to use, only needed for admin API
  * @returns An array with the application access tokens.
  */
-export declare function exchangeAccessForApplicationTokens(identityToken: IdentityToken, scopes: ExchangeScopes, store?: string): Promise<{
-    [x: string]: ApplicationToken;
-}>;
+export declare function exchangeAccessForApplicationTokens(identityToken: IdentityToken, scopes: ExchangeScopes, store?: string): Promise<Record<string, ApplicationToken>>;
 /**
  * Given an expired access token, refresh it to get a new one.
  */
@@ -62,7 +60,5 @@ type IdentityDeviceError = 'authorization_pending' | 'access_denied' | 'expired_
  * @returns An instance with the identity access tokens.
  */
 export declare function exchangeDeviceCodeForAccessToken(deviceCode: string): Promise<Result<IdentityToken, IdentityDeviceError>>;
-export declare function requestAppToken(api: API, token: string, scopes?: string[], store?: string): Promise<{
-    [x: string]: ApplicationToken;
-}>;
+export declare function requestAppToken(api: API, token: string, scopes?: string[], store?: string): Promise<Record<string, ApplicationToken>>;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/common/ts/json-narrowing.d.ts
@@ -4,6 +4,4 @@
  * @param unknownBlob - The unknown object to validate.
  * @throws BugError - Thrown if the unknownBlob is not a string map.
  */
-export declare function assertStringMap(unknownBlob: unknown): asserts unknownBlob is {
-    [key: string]: string;
-};
\ No newline at end of file
+export declare function assertStringMap(unknownBlob: unknown): asserts unknownBlob is Record<string, string>;
\ No newline at end of file
packages/cli-kit/dist/public/node/api/admin.d.ts
@@ -73,9 +73,7 @@ interface ApiVersion {
  * @param apiVersion - Admin API version.
  * @returns - The {@link RestResponse}.
  */
-export declare function restRequest<T>(method: string, path: string, session: AdminSession, requestBody?: T, searchParams?: {
-    [name: string]: string;
-}, apiVersion?: string): Promise<RestResponse>;
+export declare function restRequest<T>(method: string, path: string, session: AdminSession, requestBody?: T, searchParams?: Record<string, string>, apiVersion?: string): Promise<RestResponse>;
 /**
  * Respose of a REST request.
  */
@@ -91,8 +89,6 @@ export interface RestResponse {
     /**
      * HTTP response headers.
      */
-    headers: {
-        [key: string]: string[];
-    };
+    headers: Record<string, string[]>;
 }
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/api/app-dev.d.ts
@@ -1,5 +1,5 @@
-import { UnauthorizedHandler } from './graphql.js';
 import { RequestOptions } from './app-management.js';
+import { UnauthorizedHandler } from './graphql.js';
 import { Variables } from 'graphql-request';
 import { TypedDocumentNode } from '@graphql-typed-document-node/core';
 /**
packages/cli-kit/dist/public/node/api/app-management.d.ts
@@ -2,9 +2,7 @@ import { CacheOptions, GraphQLResponse, UnauthorizedHandler } from './graphql.js
 import { RequestModeInput } from '../http.js';
 import { TypedDocumentNode } from '@graphql-typed-document-node/core';
 import { Variables } from 'graphql-request';
-export declare const appManagementHeaders: (token: string) => {
-    [key: string]: string;
-};
+export declare const appManagementHeaders: (token: string) => Record<string, string>;
 export declare const appManagementAppLogsUrl: (organizationId: string, cursor?: string, filters?: {
     status?: string;
     source?: string;
packages/cli-kit/dist/public/node/api/graphql.d.ts
@@ -3,14 +3,10 @@ import { LocalStorage } from '../local-storage.js';
 import { RequestModeInput } from '../http.js';
 import { rawRequest, RequestDocument, Variables } from 'graphql-request';
 import { TypedDocumentNode } from '@graphql-typed-document-node/core';
-export type Exact<T extends {
-    [key: string]: unknown;
-}> = {
+export type Exact<T extends Record<string, unknown>> = {
     [K in keyof T]: T[K];
 };
-export interface GraphQLVariables {
-    [key: string]: any;
-}
+export type GraphQLVariables = Record<string, any>;
 export type GraphQLResponse<T> = Awaited<ReturnType<typeof rawRequest<T>>>;
 export interface CacheOptions {
     cacheTTL: TimeInterval;
@@ -29,9 +25,7 @@ interface GraphQLRequestBaseOptions<TResult> {
     api: string;
     url: string;
     token?: string;
-    addedHeaders?: {
-        [header: string]: string;
-    };
+    addedHeaders?: Record<string, string>;
     responseOptions?: GraphQLResponseOptions<TResult>;
     cacheOptions?: CacheOptions;
     preferredBehaviour?: RequestModeInput;
@@ -42,9 +36,7 @@ export type GraphQLRequestOptions<T> = GraphQLRequestBaseOptions<T> & {
     unauthorizedHandler?: UnauthorizedHandler;
 };
 export type GraphQLRequestDocOptions<TResult, TVariables> = GraphQLRequestBaseOptions<TResult> & {
-    query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<{
-        [key: string]: never;
-    }>>;
+    query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<Record<string, never>>>;
     variables?: TVariables;
     unauthorizedHandler?: UnauthorizedHandler;
     autoRateLimitRestore?: boolean;
packages/cli-kit/dist/public/node/plugins/tunnel.d.ts
@@ -37,19 +37,13 @@ export interface HookReturnPerTunnelPlugin {
             port: number;
             provider: string;
         };
-        pluginReturns: {
-            [key: string]: Result<TunnelClient, TunnelError>;
-        };
+        pluginReturns: Record<string, Result<TunnelClient, TunnelError>>;
     };
     tunnel_provider: {
-        options: {
-            [key: string]: never;
-        };
-        pluginReturns: {
-            [pluginName: string]: {
-                name: string;
-            };
-        };
+        options: Record<string, never>;
+        pluginReturns: Record<string, {
+            name: string;
+        }>;
     };
 }
 export type TunnelProviderFunction = FanoutHookFunction<'tunnel_provider', ''>;
packages/cli-kit/dist/public/node/themes/conf.d.ts
@@ -2,9 +2,7 @@ import { LocalStorage } from '../local-storage.js';
 import { AdminSession } from '../session.js';
 type HostThemeId = string;
 type StoreFqdn = AdminSession['storeFqdn'];
-interface HostThemeLocalStorageSchema {
-    [themeStore: StoreFqdn]: HostThemeId;
-}
+type HostThemeLocalStorageSchema = Record<StoreFqdn, HostThemeId>;
 export declare function hostThemeLocalStorage(): LocalStorage<HostThemeLocalStorageSchema>;
 export declare function getHostTheme(storeFqdn: StoreFqdn): string | undefined;
 export declare function setHostTheme(storeFqdn: StoreFqdn, themeId: HostThemeId): void;
packages/cli-kit/dist/private/node/ui/contexts/LinksContext.d.ts
@@ -4,9 +4,7 @@ export interface Link {
     url: string;
 }
 export interface ContextValue {
-    links: React.RefObject<{
-        [key: string]: Link;
-    }>;
+    links: React.RefObject<Record<string, Link>>;
     addLink: (label: string | undefined, url: string) => string;
 }
 export declare const LinksContext: React.Context<ContextValue | null>;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/SelectInput.d.ts
@@ -1,7 +1,7 @@
 import React from 'react';
 import { DOMElement } from 'ink';
 declare module 'react' {
-    function forwardRef<T, P>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
+    function forwardRef<T, TProps>(render: (props: TProps, ref: React.Ref<T>) => React.ReactElement | null): (props: TProps & React.RefAttributes<T>) => React.ReactElement | null;
 }
 export interface SelectInputProps<T> {
     items: Item<T>[];
packages/cli-kit/dist/public/node/vendor/dev_server/dev-server-2016.d.ts
@@ -1,9 +1,17 @@
 import { HostOptions } from './types.js';
+/**
+ *
+ * @param projectName
+ */
 export declare function createServer(projectName: string): {
     host: (options?: HostOptions) => string;
     url: (options?: HostOptions) => string;
 };
 declare function assertRunning2016(projectName: string): void;
 declare let assertRunningOverride: typeof assertRunning2016 | undefined;
+/**
+ *
+ * @param override
+ */
 export declare function setAssertRunning(override: typeof assertRunningOverride): void;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/dev-server-2024.d.ts
@@ -1,9 +1,17 @@
 import type { HostOptions } from './types.js';
+/**
+ *
+ * @param projectName
+ */
 export declare function createServer(projectName: string): {
     host: (options?: HostOptions) => string;
     url: (options?: HostOptions) => string;
 };
 declare function assertRunning2024(projectName: string): void;
 declare let assertRunningOverride: typeof assertRunning2024 | undefined;
+/**
+ *
+ * @param override
+ */
 export declare function setAssertRunning(override: typeof assertRunningOverride): void;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/env.d.ts
@@ -1,2 +1,5 @@
 export declare const isDevServerEnvironment: boolean;
+/**
+ *
+ */
 export declare function assertCompatibleEnvironment(): void;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Prompts/InfoTable.d.ts
@@ -12,9 +12,7 @@ export interface InfoTableSection {
     emptyItemsText?: string;
 }
 export interface InfoTableProps {
-    table: {
-        [header: string]: Items;
-    } | InfoTableSection[];
+    table: Record<string, Items> | InfoTableSection[];
 }
 declare const InfoTable: FunctionComponent<InfoTableProps>;
 export { InfoTable };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.d.ts
@@ -1,5 +1,5 @@
-import { InfoMessageProps } from './InfoMessage.js';
 import { InfoTableProps } from './InfoTable.js';
+import { InfoMessageProps } from './InfoMessage.js';
 import { InlineToken, LinkToken, TokenItem } from '../TokenizedText.js';
 import { AbortSignal } from '../../../../../public/node/abort.js';
 import { PromptState } from '../../hooks/use-prompt.js';
packages/cli-kit/dist/private/node/ui/components/Table/ScalarDict.d.ts
@@ -1,5 +1,3 @@
 type Scalar = string | number | boolean | null | undefined;
-export default interface ScalarDict {
-    [key: string]: Scalar;
-}
-export {};
\ No newline at end of file
+type ScalarDict = Record<string, Scalar>;
+export default ScalarDict;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/network/host.d.ts
@@ -1,2 +1,9 @@
+/**
+ *
+ * @param hostname
+ */
 export declare function getIpFromHosts(hostname: string): string;
+/**
+ *
+ */
 export declare function TEST_ClearCache(): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/network/index.d.ts
@@ -5,5 +5,12 @@ export interface ConnectionArguments {
     port: number;
     timeout?: number;
 }
+/**
+ *
+ * @param options
+ */
 export declare function assertConnectable(options: ConnectionArguments): void;
+/**
+ *
+ */
 export declare function TEST_testResetCheckPort(): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/export/InstantaneousMetricReader.d.ts
@@ -1,5 +1,5 @@
-import type { PushMetricExporter } from '@opentelemetry/sdk-metrics';
 import { MetricReader } from '@opentelemetry/sdk-metrics';
+import type { PushMetricExporter } from '@opentelemetry/sdk-metrics';
 export interface InstantaneousMetricReaderOptions {
     /**
      * The backing exporter for the metric reader.
packages/cli-kit/dist/public/node/vendor/otel-js/service/types.d.ts
@@ -1,13 +1,11 @@
 import type { Counter, Histogram, MeterProvider, MetricAttributes, MetricOptions, UpDownCounter } from '@opentelemetry/api';
 import type { ViewOptions } from '@opentelemetry/sdk-metrics';
-export type CustomMetricLabels<TLabels extends {
-    [key in TKeys]: MetricAttributes;
-}, TKeys extends string = keyof TLabels & string> = {
+export type CustomMetricLabels<TLabels extends Record<TKeys, MetricAttributes>, TKeys extends string = keyof TLabels & string> = {
     [P in TKeys]: TLabels[P] extends MetricAttributes ? TLabels[P] : never;
 };
-export type MetricRecording<TAttributes extends MetricAttributes = any> = [value: number, labels?: TAttributes];
-export type RecordMetricFunction<TAttributes extends MetricAttributes = any> = (...args: MetricRecording<TAttributes>) => void;
-export type OnRecordCallback<TAttributes extends MetricAttributes = any> = (metricName: string, ...args: MetricRecording<TAttributes>) => MetricRecording<TAttributes> | void;
+export type MetricRecording<TAttributes extends MetricAttributes = MetricAttributes> = [value: number, labels?: TAttributes];
+export type RecordMetricFunction<TAttributes extends MetricAttributes = MetricAttributes> = (...args: MetricRecording<TAttributes>) => void;
+export type OnRecordCallback<TAttributes extends MetricAttributes = MetricAttributes> = (metricName: string, ...args: MetricRecording<TAttributes>) => MetricRecording<TAttributes> | void;
 export type MetricInstrument = Histogram | Counter | UpDownCounter;
 export declare enum MetricInstrumentType {
     Histogram = "Histogram",
@@ -23,14 +21,12 @@ export type MetricDescriptor = MetricOptions & ({
 } | {
     type: MetricInstrumentType.Counter | MetricInstrumentType.UpDownCounter;
 });
-export interface MetricsConfig {
-    [key: string]: MetricDescriptor;
-}
+export type MetricsConfig = Record<string, MetricDescriptor>;
 export interface OtelService {
     readonly serviceName: string;
     getMeterProvider(): MeterProvider;
     addView(viewOptions: ViewOptions): void;
-    record<TAttributes extends MetricAttributes = any>(...args: Parameters<OnRecordCallback<TAttributes>>): void;
+    record<TAttributes extends MetricAttributes = MetricAttributes>(...args: Parameters<OnRecordCallback<TAttributes>>): void;
     /**
      *  callback is called when a metric is recorded.
      * Returns a function to unsubscribe.
packages/cli-kit/dist/public/node/vendor/otel-js/utils/throttle.d.ts
@@ -1,7 +1,15 @@
-type ThrottledFunction<T extends (...args: any) => any> = (...args: Parameters<T>) => ReturnType<T>;
+type ThrottledFunction<T extends (...args: unknown[]) => unknown> = (...args: Parameters<T>) => ReturnType<T>;
 interface ThrottleOptions {
     leading?: boolean;
     trailing?: boolean;
 }
-export declare function throttle<T extends (...args: any) => any>(func: T, wait: number, { leading, trailing }?: ThrottleOptions): ThrottledFunction<T>;
+/**
+ *
+ * @param func
+ * @param wait
+ * @param root0
+ * @param root0.leading
+ * @param root0.trailing
+ */
+export declare function throttle<T extends (...args: unknown[]) => unknown>(func: T, wait: number, { leading, trailing }?: ThrottleOptions): ThrottledFunction<T>;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/utils/validators.d.ts
@@ -1 +1,5 @@
+/**
+ *
+ * @param value
+ */
 export declare function isValidMetricName(value: string): boolean;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/service/BaseOtelService/BaseOtelService.d.ts
@@ -32,6 +32,13 @@ export declare class BaseOtelService implements OtelService {
     protected readonly recordListeners: Set<OnRecordCallback>;
     /**
      * Bootstraps an Otel exporter which can send Otel metrics to a dedicated Shopify supported collector endpoint.
+     *
+     * @param root0
+     * @param root0.serviceName
+     * @param root0.prefixMetric
+     * @param root0.metrics
+     * @param root0.onRecord
+     * @param root0.meterProvider
      */
     constructor({ serviceName, prefixMetric, metrics, onRecord, meterProvider }: BaseOtelServiceOptions);
     getMeterProvider(): MeterProvider;
packages/cli-kit/dist/public/node/vendor/otel-js/service/DefaultOtelService/DefaultOtelService.d.ts
@@ -2,7 +2,7 @@ import { BaseOtelService } from '../BaseOtelService/BaseOtelService.js';
 import type { BaseOtelServiceOptions } from '../BaseOtelService/BaseOtelService.js';
 export interface DefaultOtelServiceOptions extends BaseOtelServiceOptions {
     /**
-     * What environment is being deployed (production, staging)
+     * What environment is being deployed (production, staging).
      */
     env?: string;
     /**
@@ -18,6 +18,17 @@ export interface DefaultOtelServiceOptions extends BaseOtelServiceOptions {
 export declare class DefaultOtelService extends BaseOtelService {
     /**
      * Bootstraps an Otel exporter which can send Otel metrics to a dedicated Shopify supported collector endpoint.
+     *
+     * @param root0
+     * @param root0.throttleLimit
+     * @param root0.env
+     * @param root0.serviceName
+     * @param root0.prefixMetric
+     * @param root0.metrics
+     * @param root0.onRecord
+     * @param root0.meterProvider
+     * @param root0.useXhr
+     * @param root0.otelEndpoint
      */
     constructor({ throttleLimit, env, serviceName, prefixMetric, metrics, onRecord, meterProvider, useXhr, otelEndpoint, }: DefaultOtelServiceOptions);
     shutdown(): Promise<void>;

@gonzaloriestra
Copy link
Contributor Author

Closing in favor of #6822

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.

1 participant