Skip to content
Closed
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
10 changes: 10 additions & 0 deletions .changeset/nasty-peas-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@graphql-tools/graphql-file-loader': patch
'@graphql-tools/code-file-loader': patch
'@graphql-tools/json-file-loader': patch
'@graphql-tools/load-files': patch
'@graphql-tools/documents': patch
'@graphql-tools/load': patch
---

Replace globby with tinyglobby and remove lodash.sortby dependency
10 changes: 10 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
paths-ignore:
- '**/*.test.ts'
- '**/*.spec.ts'
- '**/__tests__/**'
- '**/tests/**'
- '**/test/**'
- '**/test-files/**'
- '**/dist/**'
- '**/node_modules/**'
- '**/scripts/**'
43 changes: 43 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'docker' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
groups:
actions-deps:
patterns:
- '*'
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
groups:
actions-deps:
patterns:
- '*'
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
groups:
actions-deps:
patterns:
- '*'
exclude-patterns:
- '@changesets/*'
- 'typescript'
- '^@theguild/'
- 'next'
- 'tailwindcss'
- 'husky'
- '@pulumi/*'
- 'typedoc'
update-types:
- 'minor'
- 'patch'
105 changes: 105 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL Advanced'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches: ['master']
pull_request:
branches: ['master']
schedule:
- cron: '17 4 * * 0'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
Comment on lines +50 to +54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Duplicate language entries waste CI minutes and may error out.

javascript-typescript already subsumes plain javascript.

-          - language: javascript
-            build-mode: none
           - language: javascript-typescript
             build-mode: none
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- language: javascript
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
🤖 Prompt for AI Agents
In .github/workflows/codeql-analysis.yml around lines 50 to 54, there are
duplicate language entries for 'javascript' and 'javascript-typescript'. Since
'javascript-typescript' already includes 'javascript', remove the separate
'javascript' entry to avoid wasting CI minutes and potential errors.

# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3
with:
category: '/language:${{matrix.language}}'
7 changes: 4 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
dependencies:
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

alpha:
permissions:
Expand All @@ -23,7 +24,7 @@ jobs:
with:
npmTag: alpha
buildScript: build
nodeVersion: 22
nodeVersion: 24
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
Comment on lines 25 to 30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Node 24 may not yet be available on GitHub runners.

the-guild-org/shared-config/setup ultimately calls actions/setup-node. Unless Node 24 has been released to the runner image channel, this will fail the job.

-      nodeVersion: 24
+      # stay on the latest LTS the runners guarantee
+      nodeVersion: 22

(or make the version an input defaulted from the repo root).

Run a quick matrix job or check the Actions release notes before merging.


Use a supported Node version on GitHub runners
Node 24 isn’t available yet on the hosted images (and actions/setup-node will fail fetching it). Please pin to the latest LTS that runners guarantee—e.g. 22.

• File: .github/workflows/pr.yml (lines 25–30)

-      nodeVersion: 24
+      # use latest LTS supported by GitHub runners
+      nodeVersion: 22
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
npmTag: alpha
buildScript: build
nodeVersion: 22
nodeVersion: 24
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
npmTag: alpha
buildScript: build
# use latest LTS supported by GitHub runners
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
🤖 Prompt for AI Agents
In .github/workflows/pr.yml around lines 25 to 30, the Node.js version is set to
24, which is not yet supported on GitHub hosted runners and will cause the
setup-node action to fail. Change the nodeVersion value from 24 to a supported
version like 22, which is the latest LTS guaranteed by the runners.

8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
stable:
permissions:
contents: read
contents: write
id-token: write
pull-requests: write
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release
nodeVersion: 22
nodeVersion: 24
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
Comment on lines +20 to 23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Same Node 24 concern applies here.

The stable release job must be rock-solid; consider sticking to the current LTS until Node 24 images are officially GA.

🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 20 to 23, the Node.js version is
set to 24, which is not yet officially GA. To ensure stability for the stable
release job, change the nodeVersion value to the current LTS version instead of
24. This will use a proven, stable Node.js environment for the release workflow.

42 changes: 13 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
nodeVersion: 24

- name: Use GraphQL v15
run: node ./scripts/match-graphql.js 15
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
nodeVersion: 24
- name: Prettier
run: yarn prettier:check
- name: Lint
Expand All @@ -61,11 +61,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest] # remove windows to speed up the tests
node-version: [18, 20, 22, 23]
node-version: [18, 22, 24]
graphql_version:
- 15
- 16
include:
- node-version: 18
os: ubuntu-latest
graphql_version: 15
- node-version: 18
os: windows-latest
graphql_version: 16
Expand All @@ -83,7 +85,7 @@ jobs:
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines && git checkout yarn.lock
- name: Cache Jest
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: .cache/jest
key:
Expand All @@ -94,50 +96,32 @@ jobs:
- name: Build
run: yarn build
- name: Unit Tests
uses: nick-fields/retry@v3
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 10
max_attempts: 5
command: yarn test --ci
- name: Leak Tests
uses: nick-fields/retry@v3
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 10
max_attempts: 5
command: yarn test:leaks --ci
test-bun:
name: Unit Test on Bun (${{matrix.os}}) and GraphQL v${{matrix.graphql_version}}
name: Unit Test on Bun
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # remove windows to speed up the tests
graphql_version:
- 15
- 16
steps:
- name: Checkout Master
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 23

- name: Use GraphQL v${{matrix.graphql_version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines && git checkout yarn.lock
nodeVersion: 24
- name: Build
run: yarn build
- name: Unit Tests
uses: nick-fields/retry@v3
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 10
max_attempts: 5
command: yarn test:bun --ci --reporter=junit --reporter-outfile=./junit.xml
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: './junit.xml'
command: yarn test:bun --ci
5 changes: 2 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deployment:
Expand All @@ -18,13 +19,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
nodeVersion: 22
nodeVersion: 20
packageManager: yarn

- uses: the-guild-org/shared-config/website-cf@main
Expand Down
5 changes: 4 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ module.exports = {
['@babel/preset-env', { targets: { node: process.versions.node.split('.')[0] } }],
'@babel/preset-typescript',
],
plugins: ['@babel/plugin-proposal-class-properties'],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-explicit-resource-management',
],
};
Loading