Skip to content

Commit

Permalink
[go] Added support for 1.22 and updated Go minor versions of 1.19
Browse files Browse the repository at this point in the history
…, `1.20` and `1.21` (#11156)

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Vedant <83997633+vedantmgoyal9@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 4, 2024
1 parent b9f6d76 commit a3fb7e6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-bears-sip.md
@@ -0,0 +1,5 @@
---
"@vercel/go": patch
---

Add support for `1.22` and update Go minor versions `1.19`, `1.20` and `1.21`
2 changes: 1 addition & 1 deletion packages/cli/test/dev/integration-2.test.ts
Expand Up @@ -182,7 +182,7 @@ test(
test(
'[vercel dev] Should support `*.go` API serverless functions with `go.work` and lib',
testFixtureStdio('go-work-with-shared', async (testPath: any) => {
await testPath(200, `/api`, 'hello:go1.20.2');
await testPath(200, `/api`, 'hello:go1.20.14');
})
);

Expand Down
7 changes: 4 additions & 3 deletions packages/go/src/go-helpers.ts
Expand Up @@ -22,9 +22,10 @@ import type { Env } from '@vercel/build-utils';
const streamPipeline = promisify(pipeline);

const versionMap = new Map([
['1.21', '1.21.1'],
['1.20', '1.20.2'],
['1.19', '1.19.6'],
['1.22', '1.22.2'],
['1.21', '1.21.8'],
['1.20', '1.20.14'],
['1.19', '1.19.13'],
['1.18', '1.18.10'],
['1.17', '1.17.13'],
['1.16', '1.16.15'],
Expand Down
4 changes: 2 additions & 2 deletions packages/go/test/fixtures/01-cowsay/vercel.json
Expand Up @@ -5,10 +5,10 @@
{ "src": "subdirectory/index.go", "use": "@vercel/go" }
],
"probes": [
{ "path": "/", "mustContain": "cow:go1.21.1:RANDOMNESS_PLACEHOLDER" },
{ "path": "/", "mustContain": "cow:go1.22.2:RANDOMNESS_PLACEHOLDER" },
{
"path": "/subdirectory",
"mustContain": "subcow:go1.21.1:RANDOMNESS_PLACEHOLDER"
"mustContain": "subcow:go1.22.2:RANDOMNESS_PLACEHOLDER"
}
]
}
2 changes: 1 addition & 1 deletion packages/go/test/fixtures/10-go-mod-newer/vercel.json
Expand Up @@ -2,6 +2,6 @@
"version": 2,
"builds": [{ "src": "index.go", "use": "@vercel/go" }],
"probes": [
{ "path": "/", "mustContain": "version:go1.19.6:RANDOMNESS_PLACEHOLDER" }
{ "path": "/", "mustContain": "version:go1.19.13:RANDOMNESS_PLACEHOLDER" }
]
}
Expand Up @@ -2,7 +2,7 @@
"probes": [
{
"path": "/api/index.go",
"mustContain": "hello:go1.20.2"
"mustContain": "hello:go1.20.14"
}
]
}

0 comments on commit a3fb7e6

Please sign in to comment.