From 484777cf484a49902d5a9123fb829dd92746f8e3 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 8 Aug 2024 21:39:30 +0300 Subject: [PATCH 1/3] Remove unused imports --- bin/get-graphql-schemas.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/get-graphql-schemas.js b/bin/get-graphql-schemas.js index 6dbe4f449d..bca7b3423d 100755 --- a/bin/get-graphql-schemas.js +++ b/bin/get-graphql-schemas.js @@ -1,9 +1,7 @@ #! /usr/bin/env node import {Octokit} from '@octokit/rest' -import {createTokenAuth} from '@octokit/auth-token' import * as fs from 'fs' import * as path from 'path' -import * as readline from 'readline' import {spawn} from 'child_process' const BRANCH = 'main' From 1d2e96c9a86468d91aeb5f56b1883ad16e6294ff Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 8 Aug 2024 21:52:22 +0300 Subject: [PATCH 2/3] Fetch files from spin when running graphql-codegen:get-graphql-schemas with bin/spin --- bin/get-graphql-schemas.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/get-graphql-schemas.js b/bin/get-graphql-schemas.js index bca7b3423d..b2b9ffb512 100755 --- a/bin/get-graphql-schemas.js +++ b/bin/get-graphql-schemas.js @@ -132,4 +132,16 @@ async function fetchFiles() { } } -fetchFiles() +async function fetchFilesFromSpin() { + for (const schema of schemas) { + const remotePath = `~/src/github.com/Shopify/${schema.repo}/${schema.pathToFile}` + const localPath = schema.localPath + await runCommand('spin', ['copy', `${process.env.SPIN_INSTANCE}:${remotePath}`, localPath]) + } +} + +if (process.env.SPIN_INSTANCE) { + fetchFilesFromSpin() +} else { + fetchFiles() +} From da85fc5877bac1a1a6e3d8e7d17f2124e55c100c Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 11 Aug 2024 14:19:05 +0300 Subject: [PATCH 3/3] Remove unused package --- package.json | 1 - pnpm-lock.yaml | 8 -------- 2 files changed, 9 deletions(-) diff --git a/package.json b/package.json index a47bd16191..5e59710f7a 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "@graphql-codegen/near-operation-file-preset": "3.0.0", "@nx/eslint-plugin": "19.3.0", "@nx/workspace": "19.3.0", - "@octokit/auth-token": "5.1.1", "@octokit/core": "^4.2.4", "@octokit/rest": "20.1.1", "@shopify/eslint-plugin-cli": "file:packages/eslint-plugin-cli", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 869da45629..13a7febb11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,9 +34,6 @@ importers: '@nx/workspace': specifier: 19.3.0 version: 19.3.0 - '@octokit/auth-token': - specifier: 5.1.1 - version: 5.1.1 '@octokit/core': specifier: ^4.2.4 version: 4.2.4 @@ -5417,11 +5414,6 @@ packages: engines: {node: '>= 18'} dev: true - /@octokit/auth-token@5.1.1: - resolution: {integrity: sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==} - engines: {node: '>= 18'} - dev: true - /@octokit/core@3.6.0: resolution: {integrity: sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==} dependencies: