Compare commits

..

11 Commits

Author SHA1 Message Date
Steven
85b253cdd0 Publish Canary
- vercel@21.3.3-canary.1
 - @vercel/node@1.9.1-canary.2
2021-03-05 16:58:30 -05:00
Steven
a6e4f8d8bb [node] Bump nft to 0.9.6 (#5932)
Bump nft to version [0.9.6](https://github.com/vercel/nft/releases/tag/0.9.6)
2021-03-05 21:56:04 +00:00
Steven
9c7e27b551 [tests] Install Go in GH Actions Workflows (#5931)
We need to make CI explicit about the lowest common denominator for Go Version like we do with the Node.js Version.

This will add about 10 seconds to CI which is negligible to the 8 min+ CI currently.
2021-03-05 19:41:47 +00:00
Mark Glagola
60b882c493 use vercel.app instead of now.sh for integration test (#5929) 2021-03-04 16:20:22 -06:00
Steven
21072b1f1f Publish Canary
- vercel@21.3.3-canary.0
 - @vercel/node@1.9.1-canary.1
2021-03-03 17:28:21 -05:00
Steven
a186ad643a [node] Update tests for Node.js 14 (#5925) 2021-03-03 17:27:21 -05:00
Nathan Rajlich
4c0055eaf0 Publish Stable
- vercel@21.3.2
 - @vercel/python@2.0.0
2021-03-02 11:03:53 -08:00
Nathan Rajlich
910a905192 Remove @vercel/python stable publish blacklist (#5920) 2021-03-02 11:01:02 -08:00
Steven
156a9be06e Publish Stable
- vercel@21.3.1
 - @vercel/go@1.2.1
2021-02-26 16:21:51 -05:00
Steven
e2132ee36d Publish Canary
- vercel@21.3.1-canary.0
 - @vercel/go@1.2.1-canary.0
2021-02-26 15:22:59 -05:00
Steven
4572230c1d [go] Fix analyze ignore list (#5906)
A regression was introduced in #5873 that caused the analyze step to parse Go's internal source files (eg `golang/test/bombad.go`) instead of only parsing the user's source code (eg `api/users.go`).

This resulted in the error:

```
Failed to parse AST for "api/users.go"
Error: Command failed: /vercel/1ab928d537d26157/.build-utils/.builder/node_modules/@vercel/go/dist/analyze -modpath=/vercel/workpath1 /vercel/workpath1/api/users.go
2021/02/26 14:26:42 Could not parse Go file "/vercel/workpath1/.vercel/cache/golang/test/bombad.go"
```
2021-02-26 20:15:34 +00:00
21 changed files with 60 additions and 68 deletions

View File

@@ -12,10 +12,13 @@ jobs:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-go@v2
with:
go-version: '1.13.15'
- uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/checkout@v1
- name: Install
run: yarn install --check-files --frozen-lockfile --network-timeout 1000000
- name: Build

View File

@@ -19,6 +19,12 @@ jobs:
node: [12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.13.15'
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
with:
fetch-depth: 100
@@ -28,9 +34,6 @@ jobs:
- run: git diff origin/master...HEAD --name-only
- run: yarn install --network-timeout 1000000
- run: yarn run build
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn test-integration-cli --clean false
env:
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}

View File

@@ -19,6 +19,12 @@ jobs:
node: [12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.13.15'
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
with:
fetch-depth: 100
@@ -31,9 +37,6 @@ jobs:
run: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
- run: yarn install --network-timeout 1000000
- run: yarn run build
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn test-integration-dev --clean false
env:
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}

View File

@@ -14,6 +14,12 @@ jobs:
timeout-minutes: 120
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.13.15'
- uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/checkout@v2
with:
fetch-depth: 100

View File

@@ -19,6 +19,12 @@ jobs:
node: [12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.13.15'
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
with:
fetch-depth: 100
@@ -26,9 +32,6 @@ jobs:
- run: git fetch origin master --depth=100
- run: git fetch origin ${{ github.ref }} --depth=100
- run: git diff origin/master...HEAD --name-only
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn install --network-timeout 1000000
- run: yarn run build
- run: yarn run lint

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "21.3.0",
"version": "21.3.3-canary.1",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -62,9 +62,9 @@
},
"dependencies": {
"@vercel/build-utils": "2.10.0",
"@vercel/go": "1.2.0",
"@vercel/node": "1.9.1-canary.0",
"@vercel/python": "1.2.5-canary.1",
"@vercel/go": "1.2.1",
"@vercel/node": "1.9.1-canary.2",
"@vercel/python": "2.0.0",
"@vercel/ruby": "1.2.6-canary.0",
"update-notifier": "4.1.0"
},

View File

@@ -2290,7 +2290,7 @@ test('try to revert a deployment and assign the automatic aliases', async t => {
const { name } = JSON.parse(
fs.readFileSync(path.join(firstDeployment, 'now.json'))
);
const url = `https://${name}.user.now.sh`;
const url = `https://${name}.user.vercel.app`;
{
const { stdout: deploymentUrl, stderr, exitCode } = await execute([

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/go",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",

View File

@@ -18,7 +18,7 @@ import (
var ignoredFoldersRegex []*regexp.Regexp
func init() {
ignoredFolders := []string{"vendor", "testdata", ".now"}
ignoredFolders := []string{"vendor", "testdata", ".now", ".vercel"}
// Build the regex that matches if a path contains the respective ignored folder
// The pattern will look like: (.*/)?vendor/.*, which matches every path that contains a vendor folder

View File

@@ -105,6 +105,7 @@ async function main() {
);
await fs.rename(join(mainDir, 'index.js'), join(outDir, 'index.js'));
await fs.remove(mainDir);
await fs.remove(join(outDir, 'example-import.js'));
}
main().catch(err => {

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "1.9.1-canary.0",
"version": "1.9.1-canary.2",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -33,7 +33,7 @@
"@types/etag": "1.8.0",
"@types/test-listen": "1.1.0",
"@vercel/ncc": "0.24.0",
"@vercel/nft": "0.9.5",
"@vercel/nft": "0.9.6",
"content-type": "1.0.4",
"cookie": "0.4.0",
"etag": "1.8.1",

View File

@@ -1,31 +1,13 @@
const assert = require('assert');
async function test1({ deploymentUrl, fetch, randomness }) {
const bodyMustBe = `${randomness}:content-length`;
const resp = await fetch(`https://${deploymentUrl}/test1.js`);
assert.equal(resp.status, 401);
assert.equal(await resp.text(), bodyMustBe);
assert.equal(resp.headers.get('content-length'), bodyMustBe.length);
}
async function test2({ deploymentUrl, fetch }) {
const bodyMustBe = '';
const resp = await fetch(`https://${deploymentUrl}/test2.js`);
assert.equal(resp.status, 401);
assert.equal(await resp.text(), bodyMustBe);
assert.equal(resp.headers.get('content-length'), bodyMustBe.length);
}
const { strictEqual } = require('assert');
async function test3({ deploymentUrl, fetch, randomness }) {
const bodyMustBe = `${randomness}:content-length`;
const resp = await fetch(`https://${deploymentUrl}/test3.js`);
assert.equal(resp.status, 401);
assert.equal(await resp.text(), bodyMustBe);
assert.equal(resp.headers.get('content-length'), bodyMustBe.length);
strictEqual(resp.status, 401);
strictEqual(await resp.text(), bodyMustBe);
strictEqual(resp.headers.get('content-length'), String(bodyMustBe.length));
}
module.exports = async ({ deploymentUrl, fetch, randomness }) => {
await test1({ deploymentUrl, fetch, randomness });
await test2({ deploymentUrl, fetch, randomness });
await test3({ deploymentUrl, fetch, randomness });
};

View File

@@ -1,4 +0,0 @@
module.exports = (_, resp) => {
resp.writeHead(401, { 'content-length': 4242 });
resp.end(`${process.env.RANDOMNESS_ENV_VAR}:content-length`);
};

View File

@@ -1,4 +0,0 @@
module.exports = (_, resp) => {
resp.writeHead(401, { 'content-length': 2 });
resp.end();
};

View File

@@ -1,5 +1,5 @@
{
"engines": {
"node": "10.x"
"node": "12.x"
}
}

View File

@@ -1,5 +1,5 @@
{
"engines": {
"node": "10.0.0 - 10.99.99"
"node": "12.0.0 - 12.99.99"
}
}

View File

@@ -7,9 +7,9 @@
}
],
"probes": [
{ "path": "/empty", "mustContain": "RANDOMNESS_PLACEHOLDER:12" },
{ "path": "/greater", "mustContain": "RANDOMNESS_PLACEHOLDER:12" },
{ "path": "/major", "mustContain": "RANDOMNESS_PLACEHOLDER:10" },
{ "path": "/range", "mustContain": "RANDOMNESS_PLACEHOLDER:10" }
{ "path": "/empty", "mustContain": "RANDOMNESS_PLACEHOLDER:14" },
{ "path": "/greater", "mustContain": "RANDOMNESS_PLACEHOLDER:14" },
{ "path": "/major", "mustContain": "RANDOMNESS_PLACEHOLDER:12" },
{ "path": "/range", "mustContain": "RANDOMNESS_PLACEHOLDER:12" }
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "1.2.5-canary.1",
"version": "2.0.0",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",

6
utils/changelog.js vendored
View File

@@ -48,12 +48,6 @@ async function main() {
pkgs.add('vercel');
}
// NOTE: `@vercel/python` stable must not be released
// until March 1st, 2021 due to breaking behavior with
// the request URL (https://github.com/vercel/vercel/pull/5739).
// After that date this can be removed.
pkgs.delete('@vercel/python');
const pub = Array.from(pkgs).join(',');
console.log('To publish a stable release, execute the following:');

View File

@@ -2092,12 +2092,12 @@
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.24.0.tgz#a2e8783a185caa99b5d8961a57dfc9665de16296"
integrity sha512-crqItMcIwCkvdXY/V3/TzrHJQx6nbIaRqE1cOopJhgGX6izvNov40SmD//nS5flfEvdK54YGjwVVq+zG6crjOg==
"@vercel/nft@0.9.5":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.9.5.tgz#bf795944a4764ca49ca1a642f17ab32f9ac701d2"
integrity sha512-EhSFOYwqvH3KZyK1pKyFj/DRoCZ2KFu8sRaVaJ+KGlU4kroAWm8okeA2EtIY11+/fMX3YQkNno7kf5H4FZrDvg==
"@vercel/nft@0.9.6":
version "0.9.6"
resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.9.6.tgz#c25ac94f3bff7c2e44d257fb4f40890b3879bd25"
integrity sha512-+6GfIjkwp53NfFC3SkBdlNqjVUkPH7OG/+bFmBvPhDXXr4lR3vWSIWPaJzfCsm6yUDj9oLf1I6fFp5OSJIwkYA==
dependencies:
acorn "^7.1.1"
acorn "^7.4.1"
acorn-class-fields "^0.3.2"
acorn-export-ns-from "^0.1.0"
acorn-import-meta "^1.1.0"
@@ -2276,6 +2276,11 @@ acorn@^7.1.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe"
integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==
acorn@^7.4.1:
version "7.4.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"