Skip to content

Commit

Permalink
Merge branch 'main' into ijjk/add-single-invoke-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Mar 4, 2022
2 parents 4b91176 + 1e54d60 commit e073235
Show file tree
Hide file tree
Showing 205 changed files with 77,451 additions and 24 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -56,7 +56,8 @@
"build": "turbo run build",
"vercel-build": "mkdir -p public && echo '<a href=\"https://vercel.com/import\">Import</a>' > public/output.html",
"pre-commit": "lint-staged",
"test-unit": "node utils/run.js test-unit",
"test": "jest --rootDir=\"test\" --testPathPattern=\"\\.test.js\"",
"test-unit": "yarn test && node utils/run.js test-unit",
"test-integration-cli": "node utils/run.js test-integration-cli",
"test-integration-once": "node utils/run.js test-integration-once",
"test-integration-dev": "node utils/run.js test-integration-dev",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "24.0.1-canary.3",
"version": "24.0.1-canary.4",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
Expand Down Expand Up @@ -45,7 +45,7 @@
"dependencies": {
"@vercel/build-utils": "2.14.1-canary.3",
"@vercel/go": "1.3.1-canary.3",
"@vercel/node": "1.13.1-canary.3",
"@vercel/node": "1.13.1-canary.4",
"@vercel/python": "2.2.1-canary.3",
"@vercel/ruby": "1.3.1-canary.3",
"update-notifier": "4.1.0"
Expand Down
11 changes: 7 additions & 4 deletions packages/cli/src/util/get-config.ts
Expand Up @@ -42,11 +42,14 @@ export default async function getConfig(
if (localConfig instanceof CantParseJSONFile) {
return localConfig;
}
if (localConfig !== null) {
config = localConfig;
config[fileNameSymbol] = configFile;
return config;

if (localConfig === null) {
return new CantFindConfig([humanizePath(localFilePath)]);
}

config = localConfig;
config[fileNameSymbol] = configFile;
return config;
}

// Then try with `vercel.json` or `now.json` in the same directory
Expand Down
24 changes: 24 additions & 0 deletions packages/cli/test/integration.js
Expand Up @@ -436,6 +436,30 @@ test('deploy using --local-config flag v2', async t => {
t.is(anotherMainRes.status, 404, 'Should not deploy/build main now.json');
});

test('deploy fails using --local-config flag with non-existent path', async t => {
const target = fixture('local-config-v2');

const { exitCode, stderr, stdout } = await execa(
binaryPath,
[
'deploy',
target,
'--local-config',
'does-not-exist.json',
...defaultArgs,
'--confirm',
],
{
reject: false,
}
);

t.is(exitCode, 1, formatOutput({ stderr, stdout }));

t.regex(stderr, /Error! Couldn't find a project configuration file at/);
t.regex(stderr, /does-not-exist\.json/);
});

test('deploy using --local-config flag above target', async t => {
const root = fixture('local-config-above-target');
const target = path.join(root, 'dir');
Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "1.13.1-canary.3",
"version": "1.13.1-canary.4",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
Expand All @@ -19,6 +19,7 @@
],
"dependencies": {
"@types/node": "*",
"@vercel/node-bridge": "2.1.2-canary.0",
"ts-node": "8.9.1",
"typescript": "4.3.4"
},
Expand All @@ -34,7 +35,6 @@
"@vercel/build-utils": "2.14.1-canary.3",
"@vercel/ncc": "0.24.0",
"@vercel/nft": "0.17.5",
"@vercel/node-bridge": "2.1.2-canary.0",
"content-type": "1.0.4",
"cookie": "0.4.0",
"etag": "1.8.1",
Expand Down
12 changes: 12 additions & 0 deletions packages/redwood/build.js
@@ -0,0 +1,12 @@
const execa = require('execa');
const { remove } = require('fs-extra');

async function main() {
await remove('dist');
await execa('tsc', [], { stdio: 'inherit' });
}

main().catch(err => {
console.error(err);
process.exit(1);
});
30 changes: 30 additions & 0 deletions packages/redwood/package.json
@@ -0,0 +1,30 @@
{
"name": "@vercel/redwood",
"version": "0.5.2-canary.1",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs",
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/vercel/vercel.git",
"directory": "packages/redwood"
},
"scripts": {
"build": "node build.js",
"test-integration-once": "jest --env node --verbose --runInBand --bail",
"prepublishOnly": "node build.js"
},
"dependencies": {
"@vercel/nft": "0.17.5",
"semver": "6.1.1"
},
"devDependencies": {
"@types/aws-lambda": "8.10.19",
"@types/node": "*",
"@types/semver": "6.0.0",
"@vercel/build-utils": "2.14.1-canary.3"
}
}

0 comments on commit e073235

Please sign in to comment.