Compare commits

..

24 Commits

Author SHA1 Message Date
Chris Barber
9019810288 Move tsc options to tsconfig 2023-09-05 17:26:45 -05:00
Chris Barber
5e4a8aff34 Merge branch 'esbuild' into esbuild-python 2023-09-05 17:26:38 -05:00
Nathan Rajlich
55d574cd26 Merge branch 'main' of github.com:vercel/vercel into esbuild 2023-09-05 14:39:13 -07:00
Nathan Rajlich
18cdcf35d3 Move "emitDeclarationOnly" to tsconfig.json 2023-09-05 14:38:55 -07:00
Nathan Rajlich
d2ce05ba27 Lint 2023-09-05 14:19:54 -07:00
Nathan Rajlich
3f5f368b19 Parse tsconfig and pass relevant valuse to esbuild 2023-09-05 14:16:32 -07:00
Chris Barber
48520ff329 Merge branch 'esbuild' into esbuild-python 2023-09-01 11:42:18 -07:00
Nathan Rajlich
10c3251b95 Merge branch 'main' into esbuild 2023-09-01 10:07:07 -07:00
Nathan Rajlich
bdd8958895 Merge branch 'main' into esbuild 2023-09-01 00:00:27 -07:00
Chris Barber
2d4d87e7dc Remove build script 2023-08-31 15:56:50 -07:00
Chris Barber
a94450d78e [python] Use new build 2023-08-31 15:35:35 -07:00
Nathan Rajlich
52e0c01cf5 . 2023-08-31 15:12:21 -07:00
Nathan Rajlich
65ecb16b04 Fix Windows? 2023-08-31 15:01:33 -07:00
Nathan Rajlich
6ce38c4cc8 . 2023-08-31 14:41:01 -07:00
Nathan Rajlich
a27cfd661b Debug Windows 2023-08-31 14:40:18 -07:00
Nathan Rajlich
6523ab43b2 . 2023-08-31 14:14:22 -07:00
Nathan Rajlich
102a83f1b5 Merge branch 'main' of github.com:vercel/vercel into esbuild 2023-08-31 13:58:25 -07:00
Nathan Rajlich
93c5a2b182 . 2023-08-31 13:58:07 -07:00
Nathan Rajlich
323a8d7122 . 2023-08-31 13:49:08 -07:00
Nathan Rajlich
4ab1720df2 Convert a few more 2023-08-31 13:43:22 -07:00
Chris Barber
6495dd150e [frameworks] Use new build 2023-08-31 13:37:54 -07:00
Nathan Rajlich
1d69870141 Add changeset 2023-08-31 13:28:52 -07:00
Nathan Rajlich
2eee17de24 Use npm-run-all 2023-08-31 13:28:37 -07:00
Nathan Rajlich
e62b3da5a7 Add common esbuild script and enable for @vercel/error-utils 2023-08-31 13:19:41 -07:00
3231 changed files with 367502 additions and 1237962 deletions

View File

@@ -0,0 +1,5 @@
---
"@vercel/build-utils": patch
---
add descriptions to NodeVersion properties

View File

@@ -0,0 +1,2 @@
---
---

View File

@@ -0,0 +1,5 @@
---
'vercel': patch
---
Migrates the vc env command to the command data structure for use in the help output.

View File

@@ -0,0 +1,5 @@
---
'vercel': patch
---
Update domains command to new structure

View File

@@ -0,0 +1,5 @@
---
"vercel": patch
---
migrate `rollback` command structure for help output

View File

@@ -0,0 +1,5 @@
---
"vercel": patch
---
migrate `inti` command structure for help output

View File

@@ -0,0 +1,5 @@
---
'vercel': patch
---
Remove mri workaround

View File

@@ -0,0 +1,5 @@
---
"vercel": patch
---
migrate dev command structure for help output

View File

@@ -0,0 +1,2 @@
---
---

View File

@@ -0,0 +1,5 @@
---
"@vercel/next": patch
---
fix 404 enoent for i18n

View File

@@ -0,0 +1,5 @@
---
'vercel': patch
---
Migrate `vc secrets` to new help command structure

View File

@@ -0,0 +1,5 @@
---
"vercel": patch
---
migrate `promote` command structure for help output

View File

@@ -0,0 +1,5 @@
---
"@vercel/node": patch
---
remove console.log

View File

@@ -0,0 +1,5 @@
---
"examples": patch
---
update examples to use at least node@16

View File

@@ -0,0 +1,5 @@
---
"vercel": patch
---
migrate `git` command structure for help output

View File

@@ -0,0 +1,5 @@
---
'vercel': patch
---
Update project command to new data structure

View File

@@ -10,7 +10,6 @@ packages/*/test/fixtures
packages/cli/@types
packages/cli/download
packages/cli/dist
packages/cli/test/fixtures
packages/cli/test/dev/fixtures
packages/cli/bin
packages/cli/link
@@ -39,7 +38,7 @@ packages/static-build/test/cache-fixtures
packages/redwood/test/fixtures
# remix
packages/remix/test/fixtures-*
packages/remix/test/fixtures
# gatsby-plugin-vercel-analytics
packages/gatsby-plugin-vercel-analytics

24
.github/CODEOWNERS vendored
View File

@@ -2,17 +2,19 @@
# https://help.github.com/en/articles/about-code-owners
# Restricted Paths
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @vercel/compute
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @leerob
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Timer
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Kikobeats
* @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek
/.github/workflows @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/routing-utils @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/edge @vercel/compute
/examples @leerob
/examples/create-react-app @Timer
/examples/nextjs @timneutkens @ijjk @styfle
/examples/hugo @styfle
/examples/jekyll @styfle
/examples/zola @styfle
/packages/node @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @Kikobeats
# Unrestricted Paths
.changeset/

View File

@@ -1,3 +1,108 @@
## Contributing
# Contributing
See the [Contributing Guidelines](../README.md#contributing) for more details.
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.
## Local development
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
To get started, execute the following:
```
git clone https://github.com/vercel/vercel
cd vercel
corepack enable
pnpm install
pnpm build
pnpm lint
pnpm test-unit
```
Make sure all the tests pass before making changes.
### Running Vercel CLI Changes
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
```
cd ./packages/cli
pnpm dev <cli-commands...>
```
See [CLI Local Development](../packages/cli#local-development) for more details.
## Verifying your change
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
```
pnpm test-unit
```
from the root of the project.
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
## Pull Request Process
Once you are confident that your changes work properly, open a pull request on the main repository.
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
## Interpreting test errors
There are 2 kinds of tests in this repository Unit tests and Integration tests.
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
### Integration tests
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
```
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
NO_STATUS_CODE_FRO Response headers:
cache-control=s-maxage=0
connection=close
content-type=text/plain; charset=utf-8
date=Wed, 19 Jun 2019 18:01:37 GMT
server=now
strict-transport-security=max-age=63072000
transfer-encoding=chunked
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
x-now-trace=iad1]
```
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
### @vercel/nft
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
```js
const { nodeFileTrace } = require('@vercel/nft');
nodeFileTrace(['path/to/entrypoint.js'], {
ts: true,
mixedModules: true,
})
.then(o => console.log(o.fileList))
.then(e => console.error(e));
```
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) 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 `vercel dev` or 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/node`
2. Run `pnpm build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
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 `vercel` or `vercel dev` to deploy with the experimental Builder

View File

@@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Bug Report
url: https://vercel.com/help
about: Reach out to our support team
url: https://vercel.com/support/request
about: Report a bug using the Vercel support form
- name: Feature Request
url: https://github.com/orgs/vercel/discussions/new?category=ideas
about: Share ideas for new features

275
.github/dependabot.yml vendored
View File

@@ -1,275 +0,0 @@
version: 2
updates:
- directory: /packages/static-build/test/fixtures/angular-v17
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@angular*'
ignore:
- dependency-name: '@angular*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@angular*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/astro-v4
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'astro*'
ignore:
- dependency-name: 'astro*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'astro*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/hydrogen-v2023
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@remix-run*'
- dependency-name: '@shopify*'
ignore:
- dependency-name: '@remix-run*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: '@shopify*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@remix-run*'
- '@shopify*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/ionic-angular-v7
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@ionic*'
- dependency-name: '@angular*'
ignore:
- dependency-name: '@ionic*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: '@angular*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@angular*'
- '@ionic*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/ionic-react-v7
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@ionic*'
- dependency-name: 'react*'
ignore:
- dependency-name: '@ionic*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: 'react*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@ionic*'
- 'react*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/nuxt-v3
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'nuxt'
- dependency-name: 'vue'
- dependency-name: 'vue-router'
- dependency-name: '@nuxt-devtools'
ignore:
- dependency-name: 'nuxt'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: 'vue'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: 'vue-router'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: '@nuxt-devtools'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'nuxt'
- 'vue'
- 'vue-router'
- '@nuxt-devtools'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/preact-v10
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'preact*'
ignore:
- dependency-name: 'preact*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'preact*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/stencil-v4
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@stencil/core'
ignore:
- dependency-name: '@stencil/core'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@stencil/core'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/vite-v5
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'vite'
ignore:
- dependency-name: 'vite'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'vite'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/vitepress
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
- 'jefsee55'
- 'onsclom'
- 'erikareads'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'vitepress'
ignore:
- dependency-name: 'vitepress'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'vitepress'
update-types:
- 'minor'

View File

@@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
# 0 means fetch all commits so we can commit and push in the script below
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 14
- name: Enable corepack
run: corepack enable pnpm
- name: Update Gatsby Fixtures
uses: actions/github-script@v7
uses: actions/github-script@v6
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}

View File

@@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
# 0 means fetch all commits so we can commit and push in the script below
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable pnpm
- name: Create Pull Request
uses: actions/github-script@v7
uses: actions/github-script@v6
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}

View File

@@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
# 0 means fetch all commits so we can commit and push in the script below
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable pnpm
- name: Create Pull Request
uses: actions/github-script@v7
uses: actions/github-script@v6
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}

View File

@@ -21,13 +21,13 @@ jobs:
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 16
@@ -61,7 +61,7 @@ jobs:
- name: Trigger Update (if a Publish Happened)
if: steps.changesets.outputs.published == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
script: |
@@ -70,18 +70,9 @@ jobs:
- name: Set latest Release to `vercel` (if a Publish Happened)
if: steps.changesets.outputs.published == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
script: |
const script = require('./utils/update-latest-release.js')
await script({ github, context })
summary:
name: Summary
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- release
steps:
- name: Check All
run: echo OK

View File

@@ -24,12 +24,11 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.title != 'Version Packages'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- run: git fetch origin ${{ github.event.pull_request.head.sha }}:pr-${{ github.event.pull_request.number }}
- run: git checkout pr-${{ github.event.pull_request.number }}
- run: git checkout ${{ github.event.pull_request.head.ref }}
- name: install pnpm@8.3.1
run: npm i -g pnpm@8.3.1
- run: pnpm install
@@ -41,8 +40,8 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: install pnpm@8.3.1
@@ -50,5 +49,3 @@ jobs:
- run: pnpm install
- run: pnpm run lint
- run: pnpm run prettier-check
- run: pnpm run build
- run: pnpm run type-check

View File

@@ -26,10 +26,10 @@ jobs:
tests: ${{ steps['set-tests'].outputs['tests'] }}
dplUrl: ${{ steps.waitForTarball.outputs.url }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: install pnpm@8.3.1
@@ -59,29 +59,31 @@ jobs:
matrix:
include: ${{ fromJson(needs.setup.outputs['tests']) }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION }}
# yarn 1.22.21 introduced a Corepack bug when running tests.
# this can be removed once https://github.com/yarnpkg/yarn/issues/9015 is resolved
- name: install yarn@1.22.19
run: npm i -g yarn@1.22.19
- name: Install Hugo
if: matrix.runner == 'macos-latest'
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/cli/test/dev/fixtures/08-hugo/
- name: install pnpm@8.3.1
run: npm i -g pnpm@8.3.1
- run: pnpm install
- name: fetch ssl certificate before build (linux, os x)
if: matrix.runner != 'windows-latest'
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
- name: Build ${{matrix.packageName}} and all its dependencies
run: node utils/gen.js && node_modules/.bin/turbo run build --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --include-dependencies --no-deps
env:
FORCE_COLOR: '1'
- name: Test ${{matrix.packageName}}
run: node utils/gen.js && node_modules/.bin/turbo run ${{matrix.testScript}} --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
run: node utils/gen.js && node_modules/.bin/turbo run test --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
shell: bash
env:
JEST_JUNIT_OUTPUT_FILE: ${{github.workspace}}/.junit-reports/${{matrix.scriptName}}-${{matrix.packageName}}-${{matrix.chunkNumber}}-${{ matrix.runner }}.xml
@@ -89,16 +91,13 @@ jobs:
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
FORCE_COLOR: '1'
- name: 'Determine Turbo HIT or MISS'
if: ${{ !cancelled() }}
id: turbo-summary
shell: bash
run: |
TURBO_MISS_COUNT=`node utils/determine-turbo-hit-or-miss.js`
echo "MISS COUNT: $TURBO_MISS_COUNT"
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
- name: fetch ssl certificate after tests (linux, os x)
if: matrix.runner != 'windows-latest'
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
- name: 'Upload Test Report to Datadog'
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
if: always()
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
env:
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}

View File

@@ -12,17 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
uses: actions/setup-node@v3
- name: Enable corepack
run: corepack enable pnpm
- name: Update @remix-run/dev
uses: actions/github-script@v7
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
script: |

View File

@@ -1 +0,0 @@
v16.20.2

1
.nvmrc
View File

@@ -1 +0,0 @@
16.20.2

View File

@@ -29,7 +29,6 @@ turbo-cache-key.json
packages/*/dist
packages/*/node_modules
packages/**/test/fixtures
packages/**/test/fixtures-*
packages/**/test/dev/fixtures
packages/**/test/build-fixtures
packages/**/test/cache-fixtures

View File

@@ -385,16 +385,15 @@ This is a [class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refere
This is an abstract enumeration type that is implemented by one of the following possible `String` values:
- `nodejs20.x`
- `nodejs18.x`
- `nodejs16.x`
- `go1.x`
- `java11`
- `python3.9`
- `dotnet6`
- `dotnetcore3.1`
- `ruby2.7`
- `provided.al2`
- `provided.al2023`
## `@vercel/build-utils` Helper Functions

135
README.md
View File

@@ -13,17 +13,17 @@
<a href="https://vercel.com/docs"><strong>Documentation</strong></a> ·
<a href="https://vercel.com/changelog"><strong>Changelog</strong></a> ·
<a href="https://vercel.com/templates"><strong>Templates</strong></a> ·
<a href="https://vercel.com/docs/cli"><strong>CLI</strong></a>
<a href="https://vercel.com/cli"><strong>CLI</strong></a>
</p>
<br/>
## Vercel
Vercels Frontend Cloud provides the developer experience and infrastructure to build, scale, and secure a faster, more personalized Web.
Vercel's frontend cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web.
## Deploy
Get started by [importing a project](https://vercel.com/new) or using the [Vercel CLI](https://vercel.com/docs/cli). Then, `git push` to deploy.
Get started by [importing a project](https://vercel.com/new) or using the [Vercel CLI](https://vercel.com/cli). Then, `git push` to deploy.
## Documentation
@@ -35,134 +35,7 @@ This project uses [pnpm](https://pnpm.io/) to install dependencies and run scrip
You can use the `dev` script to run local changes as if you were invoking Vercel CLI. For example, `vercel deploy --cwd=/path/to/project` could be run with local changes with `pnpm dev deploy --cwd=/path/to/project`.
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.
### Local development
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
To get started, execute the following:
```
git clone https://github.com/vercel/vercel
cd vercel
corepack enable
pnpm install
pnpm build
pnpm lint
pnpm test-unit
```
Make sure all the tests pass before making changes.
#### Running Vercel CLI Changes
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
```
cd ./packages/cli
pnpm dev <cli-commands...>
```
See [CLI Local Development](../packages/cli#local-development) for more details.
### Verifying your change
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
```
pnpm test-unit
```
from the root of the project.
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
### Pull Request Process
Once you are confident that your changes work properly, open a pull request on the main repository.
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
### Interpreting test errors
There are 2 kinds of tests in this repository Unit tests and Integration tests.
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
#### Integration tests
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
```
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
NO_STATUS_CODE_FRO Response headers:
cache-control=s-maxage=0
connection=close
content-type=text/plain; charset=utf-8
date=Wed, 19 Jun 2019 18:01:37 GMT
server=now
strict-transport-security=max-age=63072000
transfer-encoding=chunked
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
x-now-trace=iad1]
```
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
##### Running integration tests locally
While running the full integration suite locally is not recommended, it's sometimes useful to isolate a failing test by running it on your machine. To do so, you'll need to ensure you have the appropriate credentials sourced in your shell:
1. Create an access token. Follow the insructions here https://vercel.com/docs/rest-api#creating-an-access-token. Ensure the token scope is for your personal
account.
2. Grab the team ID from the Vercel dashboard at `https://vercel.com/<MY-TEAM>/~/settings`.
3. Source these into your shell rc file: `echo 'export VERCEL_TOKEN=<MY-TOKEN> VERCEL_TEAM_ID=<MY-TEAM-ID>' >> ~/.zshrc`
From there, you should be able to trigger an integration test. Choose one
that's already isolated to check that things work:
```
cd packages/next
```
Run the test:
```
pnpm test test/fixtures/00-server-build/index.test.js
```
#### @vercel/nft
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
```js
const { nodeFileTrace } = require('@vercel/nft');
nodeFileTrace(['path/to/entrypoint.js'], {
ts: true,
mixedModules: true,
})
.then(o => console.log(o.fileList))
.then(e => console.error(e));
```
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) 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 `vercel dev` or 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/node`
2. Run `pnpm build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
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 `vercel` or `vercel dev` to deploy with the experimental Builder
See the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.
## Reference

View File

@@ -13,7 +13,7 @@ function initSentry() {
sentryInitDone = true;
init({
// Cannot figure out what's going wrong here. VSCode resolves this fine. But when we build it blows up.
// Cannot figure out whats going wrong here. VSCode resolves this fine. But when we build it blows up.
// @ts-ignore
dsn: assertEnv('SENTRY_DSN'),
environment: process.env.NODE_ENV || 'production',

View File

@@ -7,7 +7,7 @@
"scripts": {},
"dependencies": {
"@sentry/node": "5.11.1",
"got": "11.8.5",
"got": "10.2.1",
"node-fetch": "2.6.7",
"parse-github-url": "1.0.2",
"tar-fs": "2.0.0",

View File

@@ -50,4 +50,4 @@ Ensure any segments used in the `destination` property are also used in the `sou
- [path-to-regexp](https://github.com/pillarjs/path-to-regexp/tree/v6.1.0)
- [named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#named-parameters)
- [un-named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
- [un-named paramters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)

13
examples/CHANGELOG.md vendored
View File

@@ -1,13 +0,0 @@
# examples
## null
### Patch Changes
- chore: update Nuxt example ([#10869](https://github.com/vercel/vercel/pull/10869))
## null
### Patch Changes
- update examples to use at least node@16 ([#10395](https://github.com/vercel/vercel/pull/10395))

2
examples/README.md vendored
View File

@@ -1,6 +1,6 @@
# Vercel Examples
To get started using any of these examples as your own project, [install Vercel](https://vercel.com/docs/cli) and use either of the following commands in your terminal:
To get started using any of these examples as your own project, [install Vercel](https://vercel.com/cli) and use either of the following commands in your terminal:
```sh
vercel init # Pick an example in the CLI

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy angular', async () => {
await deployExample('angular');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy astro', async () => {
await deployExample('astro');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy blitzjs', async () => {
await deployExample('blitzjs');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy brunch', async () => {
await deployExample('brunch');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy create-react-app', async () => {
await deployExample('create-react-app');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy docusaurus-2', async () => {
await deployExample('docusaurus-2');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy docusaurus', async () => {
await deployExample('docusaurus');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy dojo', async () => {
await deployExample('dojo');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy eleventy', async () => {
await deployExample('eleventy');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy ember', async () => {
await deployExample('ember');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy gatsby', async () => {
await deployExample('gatsby');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy gridsome', async () => {
await deployExample('gridsome');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy hexo', async () => {
await deployExample('hexo');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy hugo', async () => {
await deployExample('hugo');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy hydrogen-2', async () => {
await deployExample('hydrogen-2');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy hydrogen', async () => {
await deployExample('hydrogen');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy ionic-angular', async () => {
await deployExample('ionic-angular');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy ionic-react', async () => {
await deployExample('ionic-react');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy jekyll', async () => {
await deployExample('jekyll');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy middleman', async () => {
await deployExample('middleman');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy nextjs', async () => {
await deployExample('nextjs');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy node_modules', async () => {
await deployExample('node_modules');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy nuxtjs', async () => {
await deployExample('nuxtjs');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy parcel', async () => {
await deployExample('parcel');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy polymer', async () => {
await deployExample('polymer');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy preact', async () => {
await deployExample('preact');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy redwoodjs', async () => {
await deployExample('redwoodjs');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy remix', async () => {
await deployExample('remix');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy saber', async () => {
await deployExample('saber');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy sanity', async () => {
await deployExample('sanity');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy sapper', async () => {
await deployExample('sapper');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy scully', async () => {
await deployExample('scully');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +0,0 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy solidstart-1', async () => {
await deployExample('solidstart-1');
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy solidstart', async () => {
await deployExample('solidstart');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy stencil', async () => {
await deployExample('stencil');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,4 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy storybook', async () => {
await deployExample('storybook');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy svelte', async () => {
await deployExample('svelte');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy sveltekit-1', async () => {
await deployExample('sveltekit-1');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy sveltekit', async () => {
await deployExample('sveltekit');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy umijs', async () => {
await deployExample('umijs');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy vite', async () => {
await deployExample('vite');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy vitepress', async () => {
await deployExample('vitepress');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy vue', async () => {
await deployExample('vue');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy vuepress', async () => {
await deployExample('vuepress');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -1,4 +1,5 @@
import { deployExample } from '../test-utils';
it('[examples] should deploy zola', async () => {
await deployExample('zola');
it('should deploy', async () => {
await deployExample(__filename);
});

View File

@@ -4,7 +4,7 @@ import { lstatSync, readdirSync } from 'fs';
export async function deployExample(filename: string) {
const { testDeployment } = require('../../test/lib/deployment/test-deployment.js');
const example = basename(filename).replace(/\.test\.ts$/, '');
await testDeployment(join(process.cwd(), example));
await testDeployment(join(filename, '..', '..', '..', example));
}
export function getExamples() {

View File

@@ -3,10 +3,9 @@
This directory is a brief example of an [Astro](https://astro.build/) site that can be deployed to Vercel with zero configuration. This demo showcases:
- `/` - A static page (pre-rendered)
- `/ssr` - A page that uses server-side rendering (through [Vercel Edge Functions](https://vercel.com/docs/functions/edge-functions))
- `/ssr-with-swr-caching` - Similar to the previous page, but also caches the response on the [Vercel Edge Network](https://vercel.com/docs/edge-network/overview) using `cache-control` headers
- `/image` - Astro [Asset](https://docs.astro.build/en/guides/assets/) using Vercel [Image Optimization](https://vercel.com/docs/image-optimization)
- `/edge.json` - An Astro API Endpoint that returns JSON data using [Vercel Edge Functions](https://vercel.com/docs/functions/edge-functions)
- `/ssr` - A page that uses server-side rendering (through Vercel Edge Functions)
- `/ssr-with-swr-caching` - Similar to the previous page, but also caches the response on the Vercel Edge Network using `cache-control` headers
- `/edge.json` - An Astro API Endpoint that returns JSON data using Vercel Edge Functions
Learn more about [Astro on Vercel](https://vercel.com/docs/frameworks/astro).

View File

@@ -1,17 +1,7 @@
import { defineConfig } from 'astro/config';
// Use Vercel Edge Functions (Recommended)
import vercel from '@astrojs/vercel/edge';
// Can also use Serverless Functions
// import vercel from '@astrojs/vercel/serverless';
// Or a completely static build
// import vercel from '@astrojs/vercel/static';
export default defineConfig({
output: 'server',
experimental: {
assets: true
},
adapter: vercel({
imageService: true,
}),
adapter: vercel(),
});

View File

@@ -8,8 +8,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vercel": "3.8.2",
"astro": "^2.10.14",
"@astrojs/vercel": "3.2.2",
"astro": "^2.2.1",
"react": "18.2.0",
"web-vitals": "^3.3.1"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,4 +1,4 @@
/// <reference types="astro/client-image" />
/// <reference types="astro/client" />
interface ImportMetaEnv {
readonly PUBLIC_VERCEL_ANALYTICS_ID: string;

View File

@@ -1,6 +0,0 @@
---
import { Image } from 'astro:assets';
import astroLogo from '../assets/logo.png';
---
<Image src={astroLogo} alt="Astro Logo" width={50} quality={75} />

47
examples/ember/.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: CI
on:
push:
branches:
- main
- master
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm test

View File

@@ -1,5 +0,0 @@
{
"engines": {
"node": "18.x"
}
}

View File

@@ -8,6 +8,6 @@ menu:
main: {}
---
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
{{< form-contact action="https://example.com" >}}

View File

@@ -8,7 +8,7 @@ This directory is a brief example of a [Hydrogen v2](https://shopify.dev/custom-
_Live Example: https://hydrogen-v2-template.vercel.app_
You can also deploy using the [Vercel CLI](https://vercel.com/docs/cli):
You can also deploy using the [Vercel CLI](https://vercel.com/cli):
```sh
npm i -g vercel

File diff suppressed because it is too large Load Diff

6467
examples/hydrogen/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
<!-- Replace the API key with your own, see:
https://developers.google.com/maps/documentation/javascript/get-api-key -->
<!-- <script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=<YOUR_GOOGLE_MAPS_API_KEY>"></script> -->
<!-- <script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB8pf6ZdFQj5qw7rc_HSGrhUwQKfIe9ICw"></script> -->
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>

View File

@@ -23,7 +23,7 @@
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-scripts": "3.3.0",
"typescript": "4.9.5"
"typescript": "3.8.3"
},
"scripts": {
"start": "react-scripts start",

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,3 @@ end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Webrick not installed by default in Ruby 3.0+
gem "webrick"

Some files were not shown because too many files have changed in this diff Show More