Skip to content

Commit

Permalink
[all] Rename GitHub repo to vercel/vercel (vercel#4506)
Browse files Browse the repository at this point in the history
We renamed the GitHub repository from `zeit/now` to `vercel/vercel` so this PR updates all references to the repo URL.

There were also a few remaining references to Now CLI that have been updated to Vercel CLI.
  • Loading branch information
styfle authored May 28, 2020
1 parent e844a38 commit 56c8af5
Show file tree
Hide file tree
Showing 127 changed files with 375 additions and 447 deletions.
18 changes: 9 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/zeit/now/discussions/new) with the owners of this repository before submitting a Pull Request.
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.

Please read our [code of conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.

Expand All @@ -11,7 +11,7 @@ This project is configured in a monorepo pattern where one repo contains multipl
To get started, execute the following:

```
git clone https://github.com/zeit/now
git clone https://github.com/vercel/vercel
yarn install
yarn bootstrap
yarn build
Expand Down Expand Up @@ -82,24 +82,24 @@ trace(['path/to/entrypoint.js'], {
.then(e => console.error(e));
```

When you run this script, you'll see all imported files. If anything file is missing, the bug is in [@zeit/node-file-trace](https://github.com/zeit/node-file-trace) and not the Builder.
When you run this script, you'll see all imported files. If anything file is missing, the bug is in [@zeit/node-file-trace](https://github.com/vercel/node-file-trace) and not the Builder.

## Deploy a Builder with existing project

Sometimes you want to test changes to a Builder against an existing project, maybe with `now dev` or an actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or an actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.

1. Change directory to the desired Builder `cd ./packages/now-node`
2. Run `yarn build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
4. Run `now *.tgz` to upload the tarball file and get a URL
4. Run `vercel *.tgz` to upload the tarball file and get a URL
5. Edit any existing `vercel.json` project and replace `use` with the URL
6. Run `now` or `now dev` to deploy with the experimental Builder
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder

## Add a New Framework

You can add support for a new Framework by creating a Pull Request for this repository and following the steps below:

1. Add the Framework to the `@now/frameworks` package: The file is located in `packages/frameworks/frameworks.json`. You can copy the structure of an existing one and adjust the required fields. Note that the `settings` property either contains a `value` or a `placeholder`. The `value` property is used when something is not configurable, the `placeholder` is used when something is configurable and can be changed with configuration. An example would be the Output Directory for Hugo, it's `public` by default but can be changed through its config file, so we use `placeholder` with an explanation of what can be used.
2. Add an example to the `examples/` directory: The name of the directory should equal the slug of the framework used in `@now/frameworks`. The `.github/EXAMPLE_README_TEMPLATE.md` file can be used to create a `README.md` file for the example.
3. Update the `@now/static-build` package: The file `packages/now-static-build/src/frameworks.ts` has to be extended. You can add default routes that will always be applied to projects that use this Framework or specify some paths that will be cached to speed up the build process.
1. Add the Framework to the `@vercel/frameworks` package: The file is located in `./packages/frameworks/frameworks.json`. You can copy the structure of an existing one and adjust the required fields. Note that the `settings` property either contains a `value` or a `placeholder`. The `value` property is used when something is not configurable, the `placeholder` is used when something is configurable and can be changed with configuration. An example would be the Output Directory for Hugo, it's `public` by default but can be changed through its config file, so we use `placeholder` with an explanation of what can be used.
2. Add an example to the `./examples` directory: The name of the directory should equal the slug of the framework used in `@vercel/frameworks`. The `.github/EXAMPLE_README_TEMPLATE.md` file can be used to create a `README.md` file for the example.
3. Update the `@vercel/static-build` package: The file `./packages/now-static-build/src/frameworks.ts` has to be extended. You can add default routes that will always be applied to projects that use this Framework or specify some paths that will be cached to speed up the build process.
4. After your Pull Request has been merged and released, other users can select the example on the Vercel dashboard and deploy it.
6 changes: 3 additions & 3 deletions .github/EXAMPLE_README_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ This directory is a brief example of a [Name](site-link) site that can be deploy

Deploy your own [Name] project with Vercel.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/example-directory)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/example-directory)

### How We Created This Example

To get started with [Name] on Vercel, you can use the [CLI Tool Used](CLI-link) to initialize the project:

```shell
$ now init charge
$ vercel init [Name]]
```

### Deploying From Your Terminal

Once initialized, you can deploy the [Name] example with just a single command:

```shell
$ now
$ vercel
```
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ contact_links:
url: https://vercel.com/support/request
about: Report a bug using the Vercel support form
- name: Feature Request
url: https://github.com/zeit/now/discussions/new?category_id=66161
url: https://github.com/vercel/vercel/discussions/new?category_id=66161
about: Share ideas for new features
- name: Ask a Question
url: https://github.com/zeit/now/discussions/new?category_id=66160
url: https://github.com/vercel/vercel/discussions/new?category_id=66160
about: Ask the community for help
46 changes: 23 additions & 23 deletions DEVELOPING_A_RUNTIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export analyze({
If you are using TypeScript, you should use the following types:

```ts
import { AnalyzeOptions } from '@now/build-utils'
import { AnalyzeOptions } from '@vercel/build-utils'

export analyze(options: AnalyzeOptions) {
return 'fingerprint goes here'
Expand Down Expand Up @@ -67,7 +67,7 @@ build({
If you are using TypeScript, you should use the following types:

```ts
import { BuildOptions } from '@now/build-utils'
import { BuildOptions } from '@vercel/build-utils'

export build(options: BuildOptions) {
// Build the code here
Expand Down Expand Up @@ -100,7 +100,7 @@ prepareCache({
If you are using TypeScript, you can import the types for each of these functions by using the following:

```ts
import { PrepareCacheOptions } from '@now/build-utils'
import { PrepareCacheOptions } from '@vercel/build-utils'

export prepareCache(options: PrepareCacheOptions) {
return { 'path-to-file': File }
Expand All @@ -109,7 +109,7 @@ export prepareCache(options: PrepareCacheOptions) {

### `shouldServe`

An **optional** exported function that is only used by `now dev` in [Now CLI](https:///download) and indicates whether a [Runtime](https://vercel.com/docs/runtimes) wants to be responsible for building a certain request path.
An **optional** exported function that is only used by `vercel dev` in [Vercel CLI](https:///download) and indicates whether a [Runtime](https://vercel.com/docs/runtimes) wants to be responsible for building a certain request path.

```js
shouldServe({
Expand All @@ -124,14 +124,14 @@ shouldServe({
If you are using TypeScript, you can import the types for each of these functions by using the following:

```ts
import { ShouldServeOptions } from '@now/build-utils'
import { ShouldServeOptions } from '@vercel/build-utils'

export shouldServe(options: ShouldServeOptions) {
return Boolean
}
```

If this method is not defined, Now CLI will default to [this function](https://github.com/zeit/now/blob/52994bfe26c5f4f179bdb49783ee57ce19334631/packages/now-build-utils/src/should-serve.ts).
If this method is not defined, Vercel CLI will default to [this function](https://github.com/vercel/vercel/blob/52994bfe26c5f4f179bdb49783ee57ce19334631/packages/now-build-utils/src/should-serve.ts).

### Runtime Options

Expand All @@ -147,7 +147,7 @@ The exported functions [`analyze`](#analyze), [`build`](#build), and [`prepareCa

## Examples

Check out our [Node.js Runtime](https://github.com/zeit/now/tree/master/packages/now-node), [Go Runtime](https://github.com/zeit/now/tree/master/packages/now-go), [Python Runtime](https://github.com/zeit/now/tree/master/packages/now-python) or [Ruby Runtime](https://github.com/zeit/now/tree/master/packages/now-ruby) for examples of how to build one.
Check out our [Node.js Runtime](https://github.com/vercel/vercel/tree/master/packages/now-node), [Go Runtime](https://github.com/vercel/vercel/tree/master/packages/now-go), [Python Runtime](https://github.com/vercel/vercel/tree/master/packages/now-python) or [Ruby Runtime](https://github.com/vercel/vercel/tree/master/packages/now-ruby) for examples of how to build one.

## Technical Details

Expand All @@ -171,14 +171,14 @@ The env and secrets specified by the user as `build.env` are passed to the Runti

### Utilities as peerDependencies

When you publish your Runtime to npm, make sure to not specify `@now/build-utils` (as seen below in the API definitions) as a dependency, but rather as part of `peerDependencies`.
When you publish your Runtime to npm, make sure to not specify `@vercel/build-utils` (as seen below in the API definitions) as a dependency, but rather as part of `peerDependencies`.

## Types

### `Files`

```ts
import { File } from '@now/build-utils';
import { File } from '@vercel/build-utils';
type Files = { [filePath: string]: File };
```

Expand All @@ -200,7 +200,7 @@ An example of a valid output `Files` object is:
This is an abstract type that can be imported if you are using TypeScript.

```ts
import { File } from '@now/build-utils';
import { File } from '@vercel/build-utils';
```

Valid `File` types include:
Expand All @@ -212,7 +212,7 @@ Valid `File` types include:
### `FileRef`

```ts
import { FileRef } from '@now/build-utils';
import { FileRef } from '@vercel/build-utils';
```

This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract file instance stored in our platform, based on the file identifier string (its checksum). When a `Files` object is passed as an input to `analyze` or `build`, all its values will be instances of `FileRef`.
Expand All @@ -229,7 +229,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `FileFsRef`

```ts
import { FileFsRef } from '@now/build-utils';
import { FileFsRef } from '@vercel/build-utils';
```

This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract instance of a file present in the filesystem that the build process is executing in.
Expand All @@ -247,7 +247,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `FileBlob`

```ts
import { FileBlob } from '@now/build-utils';
import { FileBlob } from '@vercel/build-utils';
```

This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract instance of a file present in memory.
Expand All @@ -265,7 +265,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `Lambda`

```ts
import { Lambda } from '@now/build-utils';
import { Lambda } from '@vercel/build-utils';
```

This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), called a Serverless Function, that can be created by supplying `files`, `handler`, `runtime`, and `environment` as an object to the [`createLambda`](#createlambda) helper. The instances of this class should not be created directly. Instead, invoke the [`createLambda`](#createlambda) helper function.
Expand Down Expand Up @@ -293,20 +293,20 @@ This is an abstract enumeration type that is implemented by one of the following

## JavaScript API

The following is exposed by `@now/build-utils` to simplify the process of writing Runtimes, manipulating the file system, using the above types, etc.
The following is exposed by `@vercel/build-utils` to simplify the process of writing Runtimes, manipulating the file system, using the above types, etc.

### `createLambda`

Signature: `createLambda(Object spec) : Lambda`

```ts
import { createLambda } from '@now/build-utils';
import { createLambda } from '@vercel/build-utils';
```

Constructor for the [`Lambda`](#lambda) type.

```js
const { createLambda, FileBlob } = require('@now/build-utils');
const { createLambda, FileBlob } = require('@vercel/build-utils');
await createLambda({
runtime: 'nodejs8.10',
handler: 'index.main',
Expand All @@ -321,7 +321,7 @@ await createLambda({
Signature: `download() : Files`

```ts
import { download } from '@now/build-utils';
import { download } from '@vercel/build-utils';
```

This utility allows you to download the contents of a [`Files`](#files) data structure, therefore creating the filesystem represented in it.
Expand All @@ -339,15 +339,15 @@ await download(files, workPath, meta);
Signature: `glob() : Files`

```ts
import { glob } from '@now/build-utils';
import { glob } from '@vercel/build-utils';
```

This utility allows you to _scan_ the filesystem and return a [`Files`](#files) representation of the matched glob search string. It can be thought of as the reverse of [`download`](#download).

The following trivial example downloads everything to the filesystem, only to return it back (therefore just re-creating the passed-in [`Files`](#files)):

```js
const { glob, download } = require('@now/build-utils')
const { glob, download } = require('@vercel/build-utils')

exports.build = ({ files, workPath }) => {
await download(files, workPath)
Expand All @@ -360,7 +360,7 @@ exports.build = ({ files, workPath }) => {
Signature: `getWriteableDirectory() : String`

```ts
import { getWriteableDirectory } from '@now/build-utils';
import { getWriteableDirectory } from '@vercel/build-utils';
```

In some occasions, you might want to write to a temporary directory.
Expand All @@ -370,13 +370,13 @@ In some occasions, you might want to write to a temporary directory.
Signature: `rename(Files) : Files`

```ts
import { rename } from '@now/build-utils';
import { rename } from '@vercel/build-utils';
```

Renames the keys of the [`Files`](#files) object, which represent the paths. For example, to remove the `*.go` suffix you can use:

```js
const rename = require('@now/build-utils')
const rename = require('@vercel/build-utils')
const originalFiles = { 'one.go': fileFsRef1, 'two.go': fileFsRef2 }
const renamedFiles = rename(originalFiles, path => path.replace(/\.go$/, '')
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

END OF TERMS AND CONDITIONS

Copyright 2017 ZEIT, Inc.
Copyright 2017 Vercel, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<p align="center">Develop. Preview. Ship.</p>
</p>

[![CI Status](https://badgen.net/github/checks/zeit/now?label=CI)](https://github.com/zeit/now/actions?workflow=CI)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/zeit/now/discussions)
[![CI Status](https://badgen.net/github/checks/vercel/vercel?label=CI)](https://github.com/vercel/vercel/actions?workflow=CI)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/vercel/vercel/discussions)

## Usage

Expand All @@ -31,4 +31,4 @@ As always, you should use `yarn test-unit` to run the tests and see if your chan

## How to Create a Release

If you have write access to this repository, you can read more about how to publish a release [here](https://github.com/zeit/now/wiki/Creating-a-Release).
If you have write access to this repository, you can read more about how to publish a release [here](https://github.com/vercel/vercel/wiki/Creating-a-Release).
1 change: 1 addition & 0 deletions api/_lib/examples/github-repo-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export async function getGitHubRepoInfo(repo: Repo) {
}

if (data.id === 'vercel/vercel' && data.subdir && data.subdir[0] === 'examples') {

// from our examples, add `homepage` and `description` fields
const example = data.subdir[1];
const exampleList = await getExampleList();
Expand Down
2 changes: 1 addition & 1 deletion api/examples/info.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// A proxy to get the basic info of an existing github/gitlab repo:
// GET /info?repo=zeit/micro
// GET /info?repo=vercel/micro

// @ts-ignore
import parseGitUrl from 'parse-github-url';
Expand Down
2 changes: 1 addition & 1 deletion errors/deploy-invalid-dc.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ When passing multiple `--regions` as a CLI parameter,
make sure they're separated by a comma (`,`). For example:

```console
now --regions sfo,bru,gru
vercel --regions sfo,bru,gru
```
6 changes: 3 additions & 3 deletions errors/domain-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The domain you supplied cannot be verified using either the intended set of name

Apply the intended set of nameservers to your domain or add the given TXT verification record through your domain provider.

You can retrieve both the intended nameservers and TXT verification record for the domain you wish to verify by running `now domains inspect <domain>`.
You can retrieve both the intended nameservers and TXT verification record for the domain you wish to verify by running `vercel domains inspect <domain>`.

When you have added either verification method to your domain, you can run `now domains verify <domain>` again to complete verification for your domain.
When you have added either verification method to your domain, you can run `vercel domains verify <domain>` again to complete verification for your domain.

Vercel will also automatically check periodically that your domain has been verified and automatically mark it as such if we detect either verification method on the domain.

If you would not like to verify your domain, you can remove it from your account using `now domains rm <domain>`.
If you would not like to verify your domain, you can remove it from your account using `vercel domains rm <domain>`.

#### Resources

Expand Down
4 changes: 2 additions & 2 deletions errors/env-no-secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ You specified the `--env` or `-e` flag with the value of a secret. However, the
Make sure to specify the environment variable and secret like that:

```bash
now -e VARIABLE_NAME=@secret-name
vercel -e VARIABLE_NAME=@secret-name
```

In addition, ensure that the secret (`@secret-name` in the example above) exists in the current scope (the team or user account that you're using).

You can run `now switch` or `--scope` to switch to a different team or user.
You can run `vercel switch` or `--scope` to switch to a different team or user.
2 changes: 1 addition & 1 deletion errors/missing-dotenv-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ You specified a path as the value for the `--dotenv` flag, but the target of the

#### Possible Ways to Fix It

Make sure the target file you've specified exists and is readable by Now CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work.
Make sure the target file you've specified exists and is readable by Vercel CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work.
Loading

0 comments on commit 56c8af5

Please sign in to comment.