Repository: graphprotocol/graph-tooling
Pull request #1983 (2025-03-06 12:27:37)

fix: broken AssemblyScript migration link
Hi! I noticed that the link to the AssemblyScript migration guide in the CLI error messages is broken. The old URL (`https://thegraph.com/docs/developer/assemblyscript-migration-guide`) no longer works and just leads to a 404 page.  

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 4d40c35d03aecfc787b1b79464d796cd4ba8ba83

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/dramarereg/graph-tooling/new/main?filename=.changeset/shaggy-foxes-tan.md&value=---%0A%22%40graphprotocol%2Fgraph-cli%22%3A%20patch%0A---%0A%0Afix%3A%20broken%20AssemblyScript%20migration%20link%0A)



Patch:
diff --git a/packages/cli/src/command-helpers/version.ts b/packages/cli/src/command-helpers/version.ts
index 4a33cd1c..77d14473 100644
--- a/packages/cli/src/command-helpers/version.ts
+++ b/packages/cli/src/command-helpers/version.ts
@@ -47,7 +47,7 @@ export const assertGraphTsVersion = async (sourceDir: string, minimumGraphTsVers
   if (graphTsVersion && semver.lt(semver.coerce(graphTsVersion)!, minimumGraphTsVersion)) {
     throw new Error(
       `To use this version of the graph-cli you must upgrade the graph-ts dependency to a version greater than or equal to ${minimumGraphTsVersion}
-Also, you'll probably need to take a look at our AssemblyScript migration guide because of language breaking changes: https://thegraph.com/docs/developer/assemblyscript-migration-guide`,
+Also, you'll probably need to take a look at our AssemblyScript migration guide because of language breaking changes: https://thegraph.com/docs/en/resources/migration-guides/assemblyscript-migration-guide/`,
     );
   }
 };
diff --git a/packages/cli/src/scaffold/index.ts b/packages/cli/src/scaffold/index.ts
index 2b9ae634..3dee1258 100644
--- a/packages/cli/src/scaffold/index.ts
+++ b/packages/cli/src/scaffold/index.ts
@@ -141,7 +141,7 @@ export default class Scaffold {
 
     return await prettier.format(
       `
-specVersion: 1.2.0
+specVersion: 1.3.0
 indexerHints:
   prune: auto
 schema:


Test patch:
diff --git a/packages/cli/src/command-helpers/version.test.ts b/packages/cli/src/command-helpers/version.test.ts
index 26aacc8d..08c0cf63 100644
--- a/packages/cli/src/command-helpers/version.test.ts
+++ b/packages/cli/src/command-helpers/version.test.ts
@@ -222,7 +222,7 @@ describe('Version Command Helpers', { concurrent: true }, () => {
       await expect(assertGraphTsVersion(fakeNodeModulesDir, minimumGraphTsVersion)).rejects.toThrow(
         new Error(
           `To use this version of the graph-cli you must upgrade the graph-ts dependency to a version greater than or equal to ${minimumGraphTsVersion}
-Also, you'll probably need to take a look at our AssemblyScript migration guide because of language breaking changes: https://thegraph.com/docs/developer/assemblyscript-migration-guide`,
+Also, you'll probably need to take a look at our AssemblyScript migration guide because of language breaking changes: https://thegraph.com/docs/en/resources/migration-guides/assemblyscript-migration-guide/`,
         ),
       );
     });
diff --git a/packages/cli/src/scaffold/__snapshots__/cosmos.test.ts.snap b/packages/cli/src/scaffold/__snapshots__/cosmos.test.ts.snap
index 53189f25..ae7426d0 100644
--- a/packages/cli/src/scaffold/__snapshots__/cosmos.test.ts.snap
+++ b/packages/cli/src/scaffold/__snapshots__/cosmos.test.ts.snap
@@ -1,7 +1,7 @@
 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
 
 exports[`Cosmos subgraph scaffolding > Manifest 1`] = `
-"specVersion: 1.2.0
+"specVersion: 1.3.0
 indexerHints:
   prune: auto
 schema:
diff --git a/packages/cli/src/scaffold/__snapshots__/ethereum.test.ts.snap b/packages/cli/src/scaffold/__snapshots__/ethereum.test.ts.snap
index e0264847..bad4cbb0 100644
--- a/packages/cli/src/scaffold/__snapshots__/ethereum.test.ts.snap
+++ b/packages/cli/src/scaffold/__snapshots__/ethereum.test.ts.snap
@@ -1,7 +1,7 @@
 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
 
 exports[`Ethereum subgraph scaffolding > Manifest 1`] = `
-"specVersion: 1.2.0
+"specVersion: 1.3.0
 indexerHints:
   prune: auto
 schema:
diff --git a/packages/cli/src/scaffold/__snapshots__/near.test.ts.snap b/packages/cli/src/scaffold/__snapshots__/near.test.ts.snap
index 60867ffa..ff2ef932 100644
--- a/packages/cli/src/scaffold/__snapshots__/near.test.ts.snap
+++ b/packages/cli/src/scaffold/__snapshots__/near.test.ts.snap
@@ -1,7 +1,7 @@
 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
 
 exports[`NEAR subgraph scaffolding > Manifest 1`] = `
-"specVersion: 1.2.0
+"specVersion: 1.3.0
 indexerHints:
   prune: auto
 schema: