Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphprotocol/graph-tooling
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @graphprotocol/graph-cli@0.95.0
Choose a base ref
...
head repository: graphprotocol/graph-tooling
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @graphprotocol/graph-cli@0.96.0
Choose a head ref

Commits on Jan 27, 2025

  1. fix(deps): update dependency file-type to v20 (#1905)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4cbd657 View commit details
  2. chore(deps): update dependency typescript to v5.7.3 (#1895)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4b73fb1 View commit details
  3. chore(deps): update dependency vitest to v3 (#1906)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    76179a0 View commit details
  4. add oclif to renovate exceptions (#1922)

    YaroShkvorets authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3da25a3 View commit details
  5. chore: exclude github actions from batching with minor updates (#1924)

    YaroShkvorets authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6ee85d1 View commit details

Commits on Jan 28, 2025

  1. fix(deps): update all non-major dependencies (#1834)

    * fix(deps): update all non-major dependencies
    
    * chore(dependencies): updated changesets for modified dependencies
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    renovate[bot] and github-actions[bot] authored Jan 28, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0058157 View commit details
  2. chore(deps): lock file maintenance (#1838)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 28, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    65b28a9 View commit details
  3. Move external actions and workflows locally (#1919)

    * move actions and workflows locally
    
    * move shared workflows
    YaroShkvorets authored Jan 28, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    955f7b0 View commit details
  4. fix(deps): update all non-major dependencies (#1927)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 28, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4914d79 View commit details

Commits on Jan 29, 2025

  1. graph codegen: handle reserved words (#1929)

    * handle reserved words in abi
    
    * handle reserved words in schema.ts generation
    
    * handle reserved words in scaffolding
    
    * cleanup
    
    * don't rename fields themselves, only functions
    
    * add test
    
    * changeset
    
    * remove unnecessary reserved words
    YaroShkvorets authored Jan 29, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4311d0e View commit details

Commits on Feb 2, 2025

  1. upgrade tailwindcss to v4 (#1940) [no ci]

    YaroShkvorets authored Feb 2, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7956faa View commit details

Commits on Feb 3, 2025

  1. Examples README (#1945)

    * Update README.md
    
    
    * fix lint
    
    ---------
    
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    idalithb and YaroShkvorets authored Feb 3, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cb1cc2f View commit details
  2. chore: fix CI (#1946)

    * exclude oclif from renovate
    
    * use latest pnpm to fix ci
    
    * change pnpm version
    
    * fix pnpm version in example dockerfile
    YaroShkvorets authored Feb 3, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ab4b290 View commit details
  3. fix(deps): update dependency tailwind-merge to v3 (#1938)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    37c5d31 View commit details

Commits on Feb 4, 2025

  1. chore(deps): lock file maintenance (#1943)

    * chore(deps): lock file maintenance
    
    * ifx pnpm lock
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    renovate[bot] and YaroShkvorets authored Feb 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d1f9ce5 View commit details
  2. fix(deps): update all non-major dependencies (#1932)

    * fix(deps): update all non-major dependencies
    
    * chore(dependencies): updated changesets for modified dependencies
    
    * regenerate lock file, add packageManager
    
    * bump up pnpm version
    
    * bump up pnpm version in ci
    
    * lint
    
    * remove packageManager
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    3 people authored Feb 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    80a2ae9 View commit details
  3. Fixing examples readme links (#1948)

    * Update README.md
    
    * Update README.md
    
    * Update README.md
    idalithb authored Feb 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f474ee0 View commit details
  4. chore(deps): update dependency @types/node to v22.13.1 (#1947)

    * chore(deps): update dependency @types/node to v22.13.1
    
    * fix ci
    
    * downgrade pnpm in example dockerfile
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    renovate[bot] and YaroShkvorets authored Feb 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ee3a209 View commit details
  5. chore: pin pnpm version (#1950)

    ">=9" is was making renovate bot runner choose v10 that has some breaking changes and messes up lock file when updating dependencies
    
    Updating to v10 is not possible because Cloudflare still uses v9 and can't handle v10 lock file and fails when deploying website app.
    YaroShkvorets authored Feb 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ff6a269 View commit details

Commits on Feb 7, 2025

  1. typify graphql response (#1955)

    YaroShkvorets authored Feb 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    af4513f View commit details
  2. Fix "other wallets" integration (#1954)

    * use walletconnect project ID
    
    * changeset
    YaroShkvorets authored Feb 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9fc413f View commit details
  3. fix(deps): update all non-major dependencies (#1949)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0a49305 View commit details
  4. chore(deps): update pnpm/action-setup action to v4.1.0 (#1953)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    197c4d3 View commit details

Commits on Feb 10, 2025

  1. chore(deps): lock file maintenance (#1958)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ef2957e View commit details

Commits on Feb 11, 2025

  1. graph init: Improve error reporting (#1960)

    * show error on abi fetch fail
    
    * changeset
    YaroShkvorets authored Feb 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    33a7148 View commit details
  2. Use Sourcify v2 endpoint for contract lookups (#1957)

    * Use Sourcify v2 endpoint for contract lookups
    
    * Fix lint
    
    * simplify sourcify error handling
    
    * add test, relax timeout values for init.test.ts
    
    ---------
    
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    0237h and YaroShkvorets authored Feb 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e4af888 View commit details
  3. Add YAML parsing support to mappings (#1935)

    * feat: add yaml parsing support to mappings
    
    * add test
    
    * fix test runner
    
    ---------
    
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    isum and YaroShkvorets authored Feb 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0c36a02 View commit details
  4. graph init: format subgraph name to match graph-node rules (#1962)

    * format subgraph slug
    
    * changeset
    
    * fix test
    
    * remove slug formatter to keep default formatting
    YaroShkvorets authored Feb 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7f22631 View commit details

Commits on Feb 13, 2025

  1. graph init: add subgraph composition (#1920)

    * Fix subgraphs without abi field failing to build
    
    * Fix graph init for composed subgraphs
    
    * Add changeset
    
    * Fix validation not working
    
    * Support declared calls in manifest
    
    * Lint fix
    
    * Address review comments
    
    * Dont allow adding new contracts when subgraph is a composed subgraph
    
    * Allow init of subgraph datasource subgraphs without the interactive mode
    
    * Reduce code duplication between subgraph datasource and normal data source
    
    * prevent using --from-contract and --from-source-subgraph flags together
    
    * cli: validate protocol and source subgraph relationship
    
    * chore(dependencies): updated changesets for modified dependencies
    
    * change flag name for source subgraph
    
    * Refactor manifest validation util functions
    
    * get start block from source manifest
    
    * set fromSubgraph to be default value for graph init in interactive mode
    
    * fix protocol flag validation
    
    * Add init test for subgraphs
    
    * Fix error message
    
    * chore(dependencies): updated changesets for modified dependencies
    
    ---------
    
    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Co-authored-by: YaroShkvorets <shkvorets@gmail.com>
    3 people authored Feb 13, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b6d7f1c View commit details

Commits on Feb 14, 2025

  1. fix test

    YaroShkvorets committed Feb 14, 2025
    Copy the full SHA
    d249be6 View commit details
  2. add test timeout

    YaroShkvorets committed Feb 14, 2025
    Copy the full SHA
    49ffbe3 View commit details
  3. chore: fix lint

    YaroShkvorets committed Feb 14, 2025
    Copy the full SHA
    0c34c86 View commit details

Commits on Feb 15, 2025

  1. Fix composite subgraph scaffolding for case-sensitive environments (#…

    …1963)
    
    * fix composite subgraph scaffolding for case-sensitive environments
    
    * remove tests that don't test anything new
    YaroShkvorets authored Feb 15, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    19331a3 View commit details
  2. Concurrent ABI fetch (#1964)

    * fetch rpc/api endpoints concurrently
    
    * add timeouts
    
    * improve error messages
    YaroShkvorets authored Feb 15, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    50aed5d View commit details

Commits on Feb 19, 2025

  1. graph init: Bump up api and spec versions (#1965)

    * bump apiVersion and specVersion
    
    * bump apiVersion in composite subgraph scaffolding
    
    * changeset
    YaroShkvorets authored Feb 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e7b0e72 View commit details
  2. chore(release): update monorepo packages versions (#1926)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Feb 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9c69575 View commit details
Showing with 5,327 additions and 4,617 deletions.
  1. +85 −0 .github/actions/setup-node/action.yml
  2. +8 −8 .github/workflows/ci.yml
  3. +5 −5 .github/workflows/pr.yml
  4. +3 −3 .github/workflows/release.yml
  5. +54 −0 .github/workflows/shared-changesets-dependencies.yml
  6. +88 −0 .github/workflows/shared-release-snapshot.yml
  7. +16 −0 .prettierrc.js
  8. +0 −1 .prettierrc.json
  9. +44 −2 examples/README.md
  10. +1 −1 examples/ethereum-basic-event-handlers/hardhat/Dockerfile
  11. +2 −2 package.json
  12. +38 −0 packages/cli/CHANGELOG.md
  13. +11 −11 packages/cli/package.json
  14. +23 −0 packages/cli/src/codegen/schema.test.ts
  15. +10 −4 packages/cli/src/codegen/schema.ts
  16. +49 −1 packages/cli/src/codegen/util.ts
  17. +42 −19 packages/cli/src/command-helpers/contracts.test.ts
  18. +153 −107 packages/cli/src/command-helpers/contracts.ts
  19. +7 −0 packages/cli/src/command-helpers/subgraph.ts
  20. +0 −1 packages/cli/src/commands/codegen.ts
  21. +154 −59 packages/cli/src/commands/init.ts
  22. +39 −19 packages/cli/src/compiler/index.ts
  23. +1 −1 packages/cli/src/protocols/ethereum/scaffold/manifest.ts
  24. +1 −0 packages/cli/src/protocols/subgraph/manifest.graphql
  25. +4 −2 packages/cli/src/protocols/subgraph/scaffold/manifest.ts
  26. +1 −1 packages/cli/src/scaffold/__snapshots__/cosmos.test.ts.snap
  27. +2 −2 packages/cli/src/scaffold/__snapshots__/ethereum.test.ts.snap
  28. +1 −1 packages/cli/src/scaffold/__snapshots__/near.test.ts.snap
  29. +49 −15 packages/cli/src/scaffold/index.ts
  30. +5 −2 packages/cli/src/scaffold/mapping.ts
  31. +67 −0 packages/cli/src/utils.ts
  32. +43 −9 packages/cli/tests/cli/__snapshots__/init.test.ts.snap
  33. +1 −1 packages/cli/tests/cli/add/expected/subgraph.yaml
  34. +29 −2 packages/cli/tests/cli/init.test.ts
  35. 0 packages/cli/tests/cli/init/subgraph/.gitkeep
  36. +6 −0 packages/ts/CHANGELOG.md
  37. +299 −0 packages/ts/common/yaml.ts
  38. +31 −1 packages/ts/global/global.ts
  39. +1 −0 packages/ts/index.ts
  40. +1 −1 packages/ts/package.json
  41. +7 −3 packages/ts/test/test.mjs
  42. +207 −0 packages/ts/test/yaml.ts
  43. +3,597 −4,209 pnpm-lock.yaml
  44. +6 −2 renovate.json
  45. +1 −0 website/.env.example
  46. +10 −10 website/package.json
  47. +1 −2 website/postcss.config.js
  48. +5 −5 website/src/components/ui/button.tsx
  49. +1 −1 website/src/components/ui/input.tsx
  50. +2 −2 website/src/components/ui/select.tsx
  51. +1 −1 website/src/components/ui/textarea.tsx
  52. +4 −4 website/src/components/ui/toast.tsx
  53. +1 −1 website/src/components/wallet-provider.tsx
  54. +87 −3 website/src/global.css
  55. +13 −3 website/src/lib/graphql.ts
  56. +10 −10 website/src/routes/publish.lazy.tsx
  57. +0 −80 website/tailwind.config.js
85 changes: 85 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Note: This is a composite GitHub Actions, it should do all env setup, caching an so on, so other pipelines can just compose their own stuff on top of that.
# Docs: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

name: Configure Environment
description: Shared configuration for checkout, Node.js and package manager
inputs:
nodeVersion:
description: Node.js version to use
required: true
default: '20'
workingDirectory:
description: Working directory
required: false
default: ./
packageManager:
description: Package manager
required: false
default: yarn
packageManagerVersion:
description: Package manager version
required: false
default: ''

runs:
using: composite
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
continue-on-error: true
with:
access_token: ${{ github.token }}

- name: check pnpm version
shell: bash
id: pnpm
if: inputs.packageManager == 'pnpm'
working-directory: ${{ inputs.workingDirectory }}
run: |
PNPM_VERSION=${PNPM_VERSION:-9.0.6}
PKG_JSON=$(cat package.json | jq -r '.packageManager' | awk -F@ '{print $2}')
if [ ! -z $PKG_JSON ]; then
PNPM_VERSION=$PKG_JSON
fi
if [ ! -z {{inputs.packageManager}} ]; then
PNPM_VERSION=${{ inputs.packageManagerVersion }}
fi
echo "Using PNPM version $PNPM_VERSION"
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT
- name: Setup ${{ inputs.packageManager }}
id: pnpm_setup
if: inputs.packageManager == 'pnpm'
uses: pnpm/action-setup@v4.1.0
with:
version: ${{ steps.pnpm.outputs.version }}
run_install: false
package_json_file: ${{ inputs.workingDirectory }}/package.json

- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
cache: ${{ inputs.packageManager }}
cache-dependency-path: |
**/pnpm-lock.yaml
**/yarn.lock
patches/**
- name: yarn install
shell: bash
if: inputs.packageManager == 'yarn' && inputs.packageManagerVersion == ''
run: yarn install --ignore-engines --frozen-lockfile --immutable
working-directory: ${{ inputs.workingDirectory }}

- name: modern yarn install
shell: bash
if: inputs.packageManager == 'yarn' && inputs.packageManagerVersion == 'modern'
run: corepack enable && yarn
working-directory: ${{ inputs.workingDirectory }}

- name: pnpm install
shell: bash
if: inputs.packageManager == 'pnpm'
run: pnpm install --frozen-lockfile
working-directory: ${{ inputs.workingDirectory }}
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -15,12 +15,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: the-guild-org/shared-config/setup@main
- uses: ./.github/actions/setup-node
name: Setup Env
with:
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9

- name: Lint
run: pnpm lint
@@ -37,12 +37,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: the-guild-org/shared-config/setup@main
- uses: ./.github/actions/setup-node
name: Setup Env
with:
nodeVersion: ${{ matrix.node-version }}
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9

- name: Setup git user information
run: |
@@ -67,12 +67,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: the-guild-org/shared-config/setup@main
- uses: ./.github/actions/setup-node
name: Setup Env
with:
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9

- name: Build Packages
run: pnpm build
@@ -95,12 +95,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: the-guild-org/shared-config/setup@main
- uses: ./.github/actions/setup-node
name: Setup Env
with:
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9

- name: Build Packages
run: pnpm build # will also check types
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -8,33 +8,33 @@ permissions: write-all

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

alpha:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
uses: ./.github/workflows/shared-release-snapshot.yml
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
npmTag: alpha
buildScript: build
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}

release-candidate:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
uses: ./.github/workflows/shared-release-snapshot.yml
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
with:
npmTag: rc
buildScript: build
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9
restoreDeletedChangesets: true
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -20,11 +20,11 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup environment
uses: the-guild-org/shared-config/setup@main
uses: ./.github/actions/setup-node
with:
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
packageManagerVersion: 9

- name: Set variables
id: vars
@@ -38,7 +38,7 @@ jobs:
if: ${{ startsWith(github.event.head_commit.message, env.RELEASE_COMMIT_MSG) }}
run: pnpm --filter=@graphprotocol/graph-cli oclif:pack
- name: Release / pull_request
uses: dotansimha/changesets-action@v1.5.0
uses: pinax-network/changesets-release-action@v1.5.2
with:
publish: pnpm release
version: pnpm changeset version
54 changes: 54 additions & 0 deletions .github/workflows/shared-changesets-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Note: this is a shared pipeline used by other repositories.
# Docs: https://docs.github.com/en/actions/using-workflows/reusing-workflows

on:
workflow_call:
inputs:
installDependencies:
type: boolean
default: false
preCommit:
type: string
required: false
packageManager:
type: string
required: false
default: yarn
packageManagerVersion:
type: string
description: Package manager version
required: false
default: ''
nodeVersion:
required: false
type: string
default: '20'
secrets:
githubToken:
required: true

jobs:
changeset:
runs-on: ubuntu-24.04
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.githubToken }}

- uses: ./.github/actions/setup-node
name: setup env and install dependencies
if: ${{ inputs.installDependencies }}
with:
nodeVersion: ${{ inputs.nodeVersion }}
packageManager: ${{ inputs.packageManager }}
packageManagerVersion: ${{ inputs.packageManagerVersion }}

- name: Create/Update Changesets
uses: pinax-network/changesets-dependencies-action@v1.2.2
with:
preCommit: ${{ inputs.preCommit }}
env:
GITHUB_TOKEN: ${{ secrets.githubToken }}
88 changes: 88 additions & 0 deletions .github/workflows/shared-release-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Note: this is a shared pipeline used by other repositories.
# Docs: https://docs.github.com/en/actions/using-workflows/reusing-workflows

on:
workflow_call:
inputs:
packageManager:
type: string
required: false
default: yarn
packageManagerVersion:
description: Package manager version
type: string
required: false
default: ''
nodeVersion:
required: false
type: string
default: '20'
buildScript:
required: false
type: string
default: build
npmTag:
required: false
type: string
default: npmTag
exitPre:
required: false
type: boolean
default: false
restoreDeletedChangesets:
required: false
type: boolean
default: false
secrets:
githubToken:
required: true
npmToken:
required: true
outputs:
published:
description: A boolean value to indicate whether a publishing is happened or not
value: ${{ jobs.snapshot.outputs.published }}
publishedPackages:
description:
'A JSON array to present the published packages. The format is [{"name": "@xx/xx",
"version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]'
value: ${{ jobs.snapshot.outputs.publishedPackages }}

jobs:
snapshot:
runs-on: ubuntu-24.04
if: github.event.pull_request.head.repo.full_name == github.repository
outputs:
published: ${{ steps.changesets.outputs.published }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/setup-node
name: setup env
with:
nodeVersion: ${{inputs.nodeVersion}}
packageManager: ${{inputs.packageManager}}
packageManagerVersion: ${{inputs.packageManagerVersion}}

- if: inputs.exitPre
name: Exit Prerelease Mode
run: ${{inputs.packageManager}} run changeset pre exit

- if: inputs.restoreDeletedChangesets
name: restore deleted changesets
run: git checkout HEAD~1 -- .

- name: ${{ inputs.npmTag }} release
id: changesets
uses: pinax-network/changesets-snapshot-action@v0.0.3
with:
tag: ${{ inputs.npmTag }}
prepareScript: '${{inputs.packageManager}} run ${{ inputs.buildScript }}'
env:
NPM_TOKEN: ${{ secrets.npmToken }}
GITHUB_TOKEN: ${{ secrets.githubToken }}
16 changes: 16 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import prettierConfig from '@theguild/prettier-config';

export default {
...prettierConfig,
overrides: [
...(prettierConfig.overrides || []),
{
files: '*.md{,x}',
options: {
semi: false,
trailingComma: 'none',
proseWrap: 'preserve',
},
},
],
};
1 change: 0 additions & 1 deletion .prettierrc.json

This file was deleted.

Loading