Compare commits

...

7 Commits

Author SHA1 Message Date
Steven
5e66d4b2cc Publish Stable
- @vercel/build-utils@3.0.1
 - vercel@24.2.2
 - @vercel/client@11.0.2
 - @vercel/go@1.4.2
 - @vercel/node@1.15.2
 - @vercel/python@2.3.2
 - @vercel/redwood@0.8.2
 - @vercel/ruby@1.3.5
 - @vercel/static-build@0.25.0
2022-05-12 17:19:06 -04:00
Ethan Arrowood
44d7473e7c Publish Canary
- @vercel/redwood@0.8.2-canary.2
 - @vercel/static-build@0.24.2-canary.2
2022-05-12 13:48:21 -06:00
Ethan Arrowood
fddec1286c [redwood][static-build] move path logic up so both commands get pnpm7 (#7792)
move path logic up so both commands get pnpm7
2022-05-12 13:47:09 -06:00
Ethan Arrowood
6e5e700e8d Publish Canary
- vercel@24.2.2-canary.2
 - @vercel/node@1.15.2-canary.1
 - @vercel/redwood@0.8.2-canary.1
 - @vercel/static-build@0.24.2-canary.1
2022-05-12 09:04:20 -06:00
Ryan Carniato
b6e8609b83 [examples] Update SolidStart to Build Output API v3 (#7790) 2022-05-11 23:12:53 -07:00
Ethan Arrowood
78b7bd5ec8 [redwood][static-build] add pnpm7 detection logic to builders (#7787)
add pnpm7 detection logic to builders
2022-05-11 19:37:01 -04:00
Steven
4104a45c2d [tests] Fix node tests (#7786)
Since we released Node.js 16, these tests now resolve `engines` differently
2022-05-11 23:36:18 +00:00
52 changed files with 1129 additions and 568 deletions

View File

@@ -1,9 +0,0 @@
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js",
"paths": {
"~/*": ["./src/*"]
}
}
}

View File

@@ -7,14 +7,14 @@
"type": "module",
"private": true,
"devDependencies": {
"solid-app-router": "^0.1.14",
"solid-js": "^1.2.6",
"solid-meta": "^0.27.2",
"solid-app-router": "^0.3.2",
"solid-js": "^1.3.15",
"solid-meta": "^0.27.3",
"solid-start": "next",
"solid-start-vercel": "next",
"vite": "^2.7.1"
"vite": "^2.9.9"
},
"engines": {
"node": "14.x"
"node": "16.x"
}
}

View File

@@ -0,0 +1,4 @@
import { hydrate } from "solid-js/web";
import { StartClient } from "solid-start/entry-client";
hydrate(() => <StartClient />, document);

View File

@@ -0,0 +1,7 @@
import { StartServer, createHandler, renderAsync } from "solid-start/entry-server";
import { inlineServerModules } from "solid-start/server";
export default createHandler(
inlineServerModules,
renderAsync((context) => <StartServer context={context} />)
);

View File

@@ -1,21 +0,0 @@
// @refresh reload
import { Links, Meta, Outlet, Scripts } from "solid-start/components";
export default function Root({ Start }) {
return (
<Start>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<Outlet />
<Scripts />
</body>
</html>
</Start>
);
}

View File

@@ -0,0 +1,25 @@
// @refresh reload
import { Links, Meta, Routes, Scripts } from "solid-start/root";
import { ErrorBoundary } from "solid-start/error-boundary";
import { Suspense } from "solid-js";
export default function Root() {
return (
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<ErrorBoundary>
<Suspense>
<Routes />
</Suspense>
</ErrorBoundary>
<Scripts />
</body>
</html>
);
}

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"jsxImportSource": "solid-js",
"jsx": "preserve",
"types": ["vite/client"],
"baseUrl": "./",
"paths": {
"~/*": ["./src/*"]
}
}
}

View File

@@ -1,7 +1,7 @@
{
"build": {
"env": {
"ENABLE_FILE_SYSTEM_API": "1"
"ENABLE_VC_BUILD": "1"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/build-utils",
"version": "3.0.1-canary.1",
"version": "3.0.1",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "24.2.2-canary.1",
"version": "24.2.2",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -43,11 +43,11 @@
"node": ">= 12"
},
"dependencies": {
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/go": "1.4.2-canary.0",
"@vercel/node": "1.15.2-canary.0",
"@vercel/python": "2.3.2-canary.0",
"@vercel/ruby": "1.3.5-canary.0",
"@vercel/build-utils": "3.0.1",
"@vercel/go": "1.4.2",
"@vercel/node": "1.15.2",
"@vercel/python": "2.3.2",
"@vercel/ruby": "1.3.5",
"update-notifier": "4.1.0"
},
"devDependencies": {
@@ -90,7 +90,7 @@
"@types/update-notifier": "5.1.0",
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@vercel/client": "11.0.2-canary.0",
"@vercel/client": "11.0.2",
"@vercel/frameworks": "0.9.0",
"@vercel/ncc": "0.24.0",
"@zeit/fun": "0.11.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "11.0.2-canary.0",
"version": "11.0.2",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -41,7 +41,7 @@
]
},
"dependencies": {
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",
"async-sema": "3.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/go",
"version": "1.4.2-canary.0",
"version": "1.4.2",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -24,7 +24,7 @@
"@types/fs-extra": "^5.0.5",
"@types/node-fetch": "^2.3.0",
"@types/tar": "^4.0.0",
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@vercel/ncc": "0.24.0",
"async-retry": "1.3.1",
"execa": "^1.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "1.15.2-canary.0",
"version": "1.15.2",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -44,7 +44,7 @@
"@types/etag": "1.8.0",
"@types/jest": "27.4.1",
"@types/test-listen": "1.1.0",
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@vercel/ncc": "0.24.0",
"@vercel/nft": "0.18.1",
"content-type": "1.0.4",

View File

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

View File

@@ -1,5 +1,5 @@
{
"engines": {
"node": "12.0.0 - 12.99.99"
"node": "14.0.0 - 14.99.99"
}
}

View File

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

View File

@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"sharp": "0.23.0"
"sharp": "0.30.4"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "2.3.2-canary.0",
"version": "2.3.2",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -22,7 +22,7 @@
"devDependencies": {
"@types/execa": "^0.9.0",
"@types/jest": "27.4.1",
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@vercel/ncc": "0.24.0",
"execa": "^1.0.0",
"typescript": "4.3.4"

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/redwood",
"version": "0.8.2-canary.0",
"version": "0.8.2",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs",
@@ -27,6 +27,6 @@
"@types/aws-lambda": "8.10.19",
"@types/node": "*",
"@types/semver": "6.0.0",
"@vercel/build-utils": "3.0.1-canary.1"
"@vercel/build-utils": "3.0.1"
}
}

View File

@@ -73,29 +73,39 @@ export const build: BuildV2 = async ({
);
const spawnOpts = getSpawnOptions(meta, nodeVersion);
if (!spawnOpts.env) {
spawnOpts.env = {};
}
const { cliType, lockfileVersion } = await scanParentDirs(
entrypointFsDirname
);
if (cliType === 'npm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16
) {
// Ensure that npm 7 is at the beginning of the `$PATH`
spawnOpts.env.PATH = `/node16/bin-npm7:${spawnOpts.env.PATH}`;
console.log('Detected `package-lock.json` generated by npm 7...');
}
} else if (cliType === 'pnpm') {
if (typeof lockfileVersion === 'number' && lockfileVersion === 5.4) {
// Ensure that pnpm 7 is at the beginning of the `$PATH`
spawnOpts.env.PATH = `/pnpm7/node_modules/.bin:${spawnOpts.env.PATH}`;
console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
}
}
if (typeof installCommand === 'string') {
if (installCommand.trim()) {
console.log(`Running "install" command: \`${installCommand}\`...`);
const { cliType, lockfileVersion } = await scanParentDirs(
entrypointFsDirname
);
const env: Record<string, string> = {
YARN_NODE_LINKER: 'node-modules',
...spawnOpts.env,
};
if (cliType === 'npm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16
) {
// Ensure that npm 7 is at the beginning of the `$PATH`
env.PATH = `/node16/bin-npm7:${env.PATH}`;
console.log('Detected `package-lock.json` generated by npm 7...');
}
}
await execCommand(installCommand, {
...spawnOpts,
env,

View File

@@ -1,7 +1,7 @@
{
"name": "@vercel/ruby",
"author": "Nathan Cahill <nathan@nathancahill.com>",
"version": "1.3.5-canary.0",
"version": "1.3.5",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -22,7 +22,7 @@
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@vercel/ncc": "0.24.0",
"execa": "2.0.4",
"fs-extra": "^7.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "0.24.2-canary.0",
"version": "0.25.0",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -36,7 +36,7 @@
"@types/ms": "0.7.31",
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@vercel/build-utils": "3.0.1-canary.1",
"@vercel/build-utils": "3.0.1",
"@vercel/frameworks": "0.9.0",
"@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "1.13.2",

View File

@@ -408,6 +408,10 @@ export const build: BuildV2 = async ({
);
const spawnOpts = getSpawnOptions(meta, nodeVersion);
if (!spawnOpts.env) {
spawnOpts.env = {};
}
/* Don't fail the build on warnings from Create React App.
Node.js will load 'false' as a string, not a boolean, so it's truthy still.
This is to ensure we don't accidentally break other packages that check
@@ -418,12 +422,29 @@ export const build: BuildV2 = async ({
https://github.com/vercel/community/discussions/30
*/
if (framework?.slug === 'create-react-app') {
if (!spawnOpts.env) {
spawnOpts.env = {};
}
spawnOpts.env.CI = 'false';
}
const { cliType, lockfileVersion } = await scanParentDirs(entrypointDir);
if (cliType === 'npm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16
) {
// Ensure that npm 7 is at the beginning of the `$PATH`
spawnOpts.env.PATH = `/node16/bin-npm7:${spawnOpts.env.PATH}`;
console.log('Detected `package-lock.json` generated by npm 7...');
}
} else if (cliType === 'pnpm') {
if (typeof lockfileVersion === 'number' && lockfileVersion === 5.4) {
// Ensure that pnpm 7 is at the beginning of the `$PATH`
spawnOpts.env.PATH = `/pnpm7/node_modules/.bin:${spawnOpts.env.PATH}`;
console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
}
}
if (meta.isDev) {
debug('Skipping dependency installation because dev mode is enabled');
} else {
@@ -442,25 +463,11 @@ export const build: BuildV2 = async ({
} else if (typeof installCommand === 'string') {
if (installCommand.trim()) {
console.log(`Running "install" command: \`${installCommand}\`...`);
const { cliType, lockfileVersion } = await scanParentDirs(
entrypointDir
);
const env: Record<string, string> = {
YARN_NODE_LINKER: 'node-modules',
...spawnOpts.env,
};
if (cliType === 'npm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16
) {
// Ensure that npm 7 is at the beginning of the `$PATH`
env.PATH = `/node16/bin-npm7:${env.PATH}`;
console.log('Detected `package-lock.json` generated by npm 7...');
}
}
await execCommand(installCommand, {
...spawnOpts,

View File

@@ -0,0 +1,9 @@
{
"private": "true",
"scripts": {
"build": "mkdir public && pnpm -v && (printf \"pnpm version: \" && pnpm -v) >> public/index.txt"
},
"dependencies": {
"once": "^1.4.0"
}
}

View File

@@ -0,0 +1,19 @@
lockfileVersion: 5.4
specifiers:
once: ^1.4.0
dependencies:
once: 1.4.0
packages:
/once/1.4.0:
resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=}
dependencies:
wrappy: 1.0.2
dev: false
/wrappy/1.0.2:
resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=}
dev: false

View File

@@ -0,0 +1,15 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build"
}
],
"probes": [
{
"path": "/",
"mustContain": "pnpm version: 7"
}
]
}