From 05efd872b415518985a1d8ef23bf340a79ef004b Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Tue, 26 May 2026 00:57:52 +0000 Subject: [PATCH] [Refactor] Use uniq helper in store auth scopes Replaces manual array deduplication using Set spreads with the `uniq` helper from `@shopify/cli-kit/common/array` for better consistency and readability. --- packages/store/src/cli/services/store/auth/scopes.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/store/src/cli/services/store/auth/scopes.ts b/packages/store/src/cli/services/store/auth/scopes.ts index ea3225934a7..6e64dd4cfe1 100644 --- a/packages/store/src/cli/services/store/auth/scopes.ts +++ b/packages/store/src/cli/services/store/auth/scopes.ts @@ -1,5 +1,6 @@ import {AbortError} from '@shopify/cli-kit/node/error' import {outputContent, outputDebug} from '@shopify/cli-kit/node/output' +import {uniq} from '@shopify/cli-kit/common/array' import type {StoreTokenResponse} from './token-client.js' export function parseStoreAuthScopes(input: string): string[] { @@ -9,7 +10,7 @@ export function parseStoreAuthScopes(input: string): string[] { throw new AbortError('At least one scope is required.', 'Pass --scopes as a comma-separated list.') } - return [...new Set(scopes)] + return uniq(scopes) } function expandImpliedStoreScopes(scopes: string[]): Set {