Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": ["@workspace/workspace-plugin"]
"ignore": [
"operation-location-migration-e2e",
"typescript-resolver-files-e2e",
"@workspace/workspace-plugin",
"@workspace/testing"
]
}
7 changes: 7 additions & 0 deletions .changeset/twenty-phones-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@eddeee888/gcg-operation-location-migration': minor
'@eddeee888/gcg-typescript-resolver-files': minor
'@eddeee888/gcg-server-config': minor
---

Migrate to ESM
47 changes: 3 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
node-version: '24.x'

jobs:
install-deps:
strategy:
Expand All @@ -21,30 +18,8 @@ jobs:
runs-on: ${{ matrix.os }}
name: Install Dependencies
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ env.node-version }}
cache: yarn
cache-dependency-path: '**/yarn.lock'

- name: Install deps
run: yarn install --prefer-offline --frozen-lockfile

- name: Cache node_modules
uses: actions/cache@v6
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
tools/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-
- uses: actions/checkout@v7
- uses: pnpm/setup@v2

precheck:
name: Check jobs to run
Expand All @@ -60,23 +35,7 @@ jobs:
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ env.node-version }}

- name: Restore node_modules cache
uses: actions/cache@v6
with:
path: |
node_modules
packages/*/node_modules
tools/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-

- uses: pnpm/setup@v2
- name: Check affected projects
id: affected
run: |
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/operation-location-migration-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,23 @@ name: operation-location-migration-e2e
on:
workflow_call:

env:
node-version: '24.x'

jobs:
operation-location-migration-e2e:
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
node-version: [22.x, 24.x]
node-version: [22, 24]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
- uses: pnpm/setup@v2
with:
node-version: ${{ matrix.node-version }}

- name: Use graphql@16 # packages like `typescript-react-apollo` are not compatible with graphql@17
run: yarn add -DEW graphql@16
runtime: node@${{ matrix.node-version }}

- name: e2e
run: yarn nx e2e operation-location-migration-e2e
run: pnpm nx e2e operation-location-migration-e2e
29 changes: 6 additions & 23 deletions .github/workflows/operation-location-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,21 @@ name: operation-location-migration
on:
workflow_call:

env:
node-version: '24.x'

jobs:
operation-location-migration:
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
node-version: [22.x, 24.x]
node-version: [22, 24]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}

- name: Restore node_modules cache
uses: actions/cache@v6
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
path: |
node_modules
packages/*/node_modules
tools/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-
runtime: node@${{ matrix.node-version }}

- name: Lint
run: yarn nx lint operation-location-migration
run: pnpm nx lint operation-location-migration

- name: Build
run: yarn nx build operation-location-migration
run: pnpm nx build operation-location-migration
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,13 @@ jobs:

steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v7
with:
node-version: ${{ env.node-version }}
cache: yarn
cache-dependency-path: '**/yarn.lock'

- run: yarn install --prefer-offline
- uses: pnpm/setup@v2

- name: Create Release Pull Request or Publish to NPM
id: changesets
uses: changesets/action@v1.9.0
with:
publish: yarn release
publish: pnpm release
commit: 'chore(release): update packages versions'
title: 'Upcoming Release Changes'
env:
Expand Down Expand Up @@ -112,21 +105,13 @@ jobs:
persist-credentials: true
repository: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.repo.full_name }}
ref: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.ref }}

- uses: actions/setup-node@v7
with:
node-version: ${{ env.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
cache-dependency-path: '**/yarn.lock'

- run: yarn install --prefer-offline
- uses: pnpm/setup@v2

- name: Deploy snapshot
run: |
yarn changeset version --snapshot $RELEASE_TAG
yarn nx run-many --target=build
yarn changeset publish --tag alpha --no-git-tag
pnpm changeset version --snapshot $RELEASE_TAG
pnpm nx run-many --target=build
pnpm changeset publish --tag alpha --no-git-tag
env:
GITHUB_TOKEN: ${{ env.github-token }}
RELEASE_TAG: ${{ env.snapshot-release-tag }}
Expand Down
27 changes: 5 additions & 22 deletions .github/workflows/typescript-resolver-files-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,23 @@ name: typescript-resolver-files-e2e
on:
workflow_call:

env:
node-version: '24.x'

jobs:
typescript-resolver-files-e2e:
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
node-version: [22.x, 24.x]
node-version: [22, 24]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}

- name: Restore node_modules cache
uses: actions/cache@v6
- uses: pnpm/setup@v2
with:
path: |
node_modules
packages/*/node_modules
tools/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-
runtime: node@${{ matrix.node-version }}

- name: e2e
run: yarn nx e2e typescript-resolver-files-e2e
run: pnpm nx e2e typescript-resolver-files-e2e
31 changes: 8 additions & 23 deletions .github/workflows/typescript-resolver-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,26 @@ name: typescript-resolver-files
on:
workflow_call:

env:
node-version: '24.x'

jobs:
typescript-resolver-files:
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
node-version: [22.x, 24.x]
node-version: [22, 24]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
- uses: actions/checkout@v7
with:
node-version: ${{ matrix.node-version }}

- name: Restore node_modules cache
uses: actions/cache@v6
fetch-depth: 0
- uses: pnpm/setup@v2
with:
path: |
node_modules
packages/*/node_modules
tools/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-
runtime: node@${{ matrix.node-version }}

- name: Lint
run: yarn nx lint typescript-resolver-files
run: pnpm nx lint typescript-resolver-files

- name: Test
run: yarn nx test typescript-resolver-files
run: pnpm nx test typescript-resolver-files

- name: Build
run: yarn nx build typescript-resolver-files
run: pnpm nx build typescript-resolver-files
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# compiled output
dist
tmp
/out-tsc
out-tsc

# dependencies
node_modules
Expand Down Expand Up @@ -45,6 +45,7 @@ Thumbs.db
vite.config.*.timestamp*
vitest.config.*.timestamp*
.claude/worktrees
.claude/settings.local.json
.nx/polygraph
.nx/self-healing
.nx/migrate-runs
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage

/.nx/cache
/.nx/workspace-data

.nx/self-healing
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ List of [GraphQL Code Generator](https://www.the-guild.dev/graphql/codegen) plug

- [Node](https://nodejs.org/)
- [nvm](https://github.com/nvm-sh/nvm): Node Version Manager
- [Yarn Classic](https://classic.yarnpkg.com/)
- [pnpm](https://pnpm.io/)
- [Nx](https://nx.dev/): Monorepo management tool
- (Optional) Install Nx globally using `yarn global add nx`. This allows you to run `nx <command>`, otherwise you need to run `yarn nx <command>`
- (Optional) Install Nx globally using `pnpm global add nx`. This allows you to run `nx <command>`, otherwise you need to run `pnpm nx <command>`
- [Changesets](https://github.com/changesets/changesets): Releasing NPM packages

### Get started
Expand All @@ -31,7 +31,7 @@ nvm use
Install packages:

```bash
yarn install
pnpm install
```

### Contribution process
Expand All @@ -40,7 +40,7 @@ yarn install
2. Fork the repo and make changes
3. Add unit tests and e2e tests
4. Document new config option in the package's README if required
5. Create changeset record for new package version with `yarn changeset` if required
5. Create changeset record for new package version with `pnpm changeset` if required
6. Create a PR

Refer to README in each package for more info.
Loading