Skip to content

Commit

Permalink
chore: remove codegen setup (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
deini committed Mar 25, 2024
1 parent fbc49e1 commit 6deba4a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 1,739 deletions.
6 changes: 6 additions & 0 deletions .changeset/loud-jars-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@bigcommerce/create-catalyst": minor
"@bigcommerce/catalyst-core": minor
---

removes graphql codegen setup, all graphql calls are done using gql.tada
7 changes: 2 additions & 5 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint, Typecheck, GraphQL Codegen
name: Lint, Typecheck, gql.tada

on:
push:
Expand Down Expand Up @@ -38,12 +38,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Graphql Tada
- name: Gql Tada
run: pnpm run -r generate

- name: Graphql Codegen
run: pnpm run -r codegen

- name: Lint
run: pnpm run lint -- --max-warnings=0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div align="center">

[![MIT License](https://img.shields.io/github/license/bigcommerce/catalyst)](LICENSE.md)
[![Lighthouse Report](https://github.com/bigcommerce/catalyst/actions/workflows/lighthouse.yml/badge.svg)](https://github.com/bigcommerce/catalyst/actions/workflows/lighthouse.yml) [![Lint, Typecheck, GraphQL Codegen](https://github.com/bigcommerce/catalyst/actions/workflows/basic.yml/badge.svg)](https://github.com/bigcommerce/catalyst/actions/workflows/basic.yml)
[![Lighthouse Report](https://github.com/bigcommerce/catalyst/actions/workflows/lighthouse.yml/badge.svg)](https://github.com/bigcommerce/catalyst/actions/workflows/lighthouse.yml) [![Lint, Typecheck, gql.tada](https://github.com/bigcommerce/catalyst/actions/workflows/basic.yml/badge.svg)](https://github.com/bigcommerce/catalyst/actions/workflows/basic.yml)

</div>

Expand Down
27 changes: 0 additions & 27 deletions apps/core/codegen.ts

This file was deleted.

12 changes: 2 additions & 10 deletions apps/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
"version": "0.2.1",
"private": true,
"scripts": {
"dev": "npm run generate && concurrently \"npm:dev-*\"",
"dev-next": "next dev",
"dev-codegen": "dotenv -e .env.local -- npm run codegen -- -w",
"codegen": "dotenv -e .env.local -- gql-gen --errors-only --config codegen.ts",
"dev": "npm run generate && next dev",
"generate": "dotenv -e .env.local -- node ./scripts/generate.cjs",
"build": "npm run generate && npm run codegen && next build",
"build": "npm run generate && next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc --noEmit",
Expand All @@ -18,7 +15,6 @@
"dependencies": {
"@bigcommerce/catalyst-client": "workspace:^",
"@bigcommerce/components": "workspace:^",
"@graphql-typed-document-node/core": "^3.2.0",
"@icons-pack/react-simple-icons": "^9.2.0",
"@vercel/analytics": "^1.1.1",
"@vercel/kv": "^1.0.0",
Expand Down Expand Up @@ -46,10 +42,6 @@
"@0no-co/graphqlsp": "^1.7.0",
"@bigcommerce/eslint-config-catalyst": "workspace:^",
"@gql.tada/cli-utils": "^0.3.0",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/schema-ast": "^4.0.0",
"@parcel/watcher": "^2.3.0",
"@tailwindcss/container-queries": "^0.1.1",
"@testing-library/react": "^14.1.2",
"@types/lodash.debounce": "^4.0.7",
Expand Down
6 changes: 0 additions & 6 deletions packages/create-catalyst/src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@ export const create = async (options: CreateCommandOptions) => {
failText: (err) => chalk.red(`Failed to create GraphQL schema: ${err.message}`),
});

await spinner(exec(`${packageManager} run codegen`, { cwd: projectDir }), {
text: 'Generating GraphQL types...',
successText: 'GraphQL types generated successfully',
failText: (err) => chalk.red(`Failed to generate GraphQL types: ${err.message}`),
});

await spinner(exec(`${packageManager} run lint -- --fix`, { cwd: projectDir }), {
text: 'Linting to validate generated types...',
successText: 'GraphQL types validated successfully',
Expand Down
Loading

0 comments on commit 6deba4a

Please sign in to comment.