Compare commits

...

8 Commits

Author SHA1 Message Date
Steven
86a2640fff Publish
- @now/go@0.5.9
 - @now/next@0.5.10
 - @now/node@0.12.5
 - @now/routing-utils@1.2.2
2019-08-08 17:48:44 -07:00
Steven
351a85f875 [now-go] Fix go concurrent/parallel builds (#900)
* [now-go] Fix concurrent go install

* Add test

* Fix typo

* Add config.parallel
2019-08-08 17:47:53 -07:00
Connor Davis
00fd570ce5 [now-routing-utils] Allow the combined use of continue and dest (#897)
* allow continue dest

* remove test
2019-08-08 17:47:47 -07:00
Steven
4ff1f05cf3 [now-node] Fix windows typescript entrypoint bug (#899) 2019-08-08 17:47:39 -07:00
Steven
fb9035bc00 [now-node][now-next] Bump node-file-trace to 0.2.7 (#892) 2019-08-08 17:47:28 -07:00
Steven
9258a74986 [tests] Add automerge (#893) 2019-08-08 17:46:02 -07:00
Leo Lamprecht
f7c21bbde6 Publish
- @now/static-build@0.9.6
2019-08-07 23:10:28 +00:00
Leo Lamprecht
4c6c17af8a [now-static-build] Capture file system routes for CRA apps (#891)
* Capture file system routes for CRA apps

* Added integration test

* Fixed defaults
2019-08-07 23:09:55 +00:00
18 changed files with 95 additions and 46 deletions

16
.kodiak.toml Normal file
View File

@@ -0,0 +1,16 @@
version = 1
[merge]
automerge_label = "automerge"
blacklist_title_regex = "^WIP.*"
blacklist_labels = ["work in progress"]
method = "squash"
delete_branch_on_merge = true
block_on_reviews_requested = false
notify_on_conflict = true
optimistic_updates = true
[merge.message]
title = "pull_request_title"
include_pr_number = true
body_type = "markdown"

View File

@@ -1,2 +1,4 @@
ncc build index.ts -o dist
ncc build install.ts -o dist/install
mv dist/install/index.js dist/install.js
rm -rf dist/install

View File

@@ -1,6 +1,6 @@
{
"name": "@now/go",
"version": "0.5.8",
"version": "0.5.9",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/v2/deployments/official-builders/go-now-go",
@@ -13,7 +13,7 @@
"build": "./build.sh",
"test": "./build.sh && jest",
"prepublish": "./build.sh",
"now-postinstall": "node dist/install/index.js"
"now-postinstall": "node dist/install.js"
},
"files": [
"dist"

View File

@@ -0,0 +1,9 @@
package handler
import (
"fmt"
"net/http"
)
// Handler is cool
func Handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "ONE:RANDOMNESS_PLACEHOLDER")
}

View File

@@ -0,0 +1,9 @@
package handler
import (
"fmt"
"net/http"
)
// Handler is cool
func Handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "TWO:RANDOMNESS_PLACEHOLDER")
}

View File

@@ -0,0 +1,3 @@
module go-example
go 1.12

View File

@@ -0,0 +1,25 @@
{
"version": 2,
"builds": [
{
"src": "/api/go-one/one.go",
"use": "@now/go",
"config": { "parallel": true }
},
{
"src": "/api/go-two/two.go",
"use": "@now/go",
"config": { "parallel": true }
}
],
"probes": [
{
"path": "/api/go-one/one.go",
"mustContain": "ONE:RANDOMNESS_PLACEHOLDER"
},
{
"path": "/api/go-two/two.go",
"mustContain": "TWO:RANDOMNESS_PLACEHOLDER"
}
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@now/next",
"version": "0.5.9",
"version": "0.5.10",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/v2/deployments/official-builders/next-js-now-next",
@@ -21,6 +21,7 @@
"@types/next-server": "8.0.0",
"@types/resolve-from": "5.0.1",
"@types/semver": "6.0.0",
"@zeit/node-file-trace": "0.2.7",
"fs-extra": "7.0.0",
"get-port": "5.0.0",
"resolve-from": "5.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@now/node",
"version": "0.12.4",
"version": "0.12.5",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/v2/deployments/official-builders/node-js-now-node",
@@ -28,7 +28,7 @@
"@types/etag": "1.8.0",
"@types/test-listen": "1.1.0",
"@zeit/ncc": "0.20.4",
"@zeit/node-file-trace": "0.2.6",
"@zeit/node-file-trace": "0.2.7",
"content-type": "1.0.4",
"cookie": "0.4.0",
"etag": "1.8.1",

View File

@@ -239,7 +239,12 @@ async function compile(
}
}
// Rename .ts -> .js (except for entry)
if (path !== entrypoint && tsCompiled.has(path)) {
// There is a bug on Windows where entrypoint uses forward slashes
// and workPath uses backslashes so we use resolve before comparing.
if (
resolve(workPath, path) !== resolve(workPath, entrypoint) &&
tsCompiled.has(path)
) {
preparedFiles[
path.slice(0, -3 - Number(path.endsWith('x'))) + '.js'
] = entry;

View File

@@ -1,6 +1,6 @@
{
"name": "@now/routing-utils",
"version": "1.2.1",
"version": "1.2.2",
"description": "ZEIT Now route validation utilities",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@@ -70,14 +70,6 @@ export function normalizeRoutes(
handling.push(route.handle);
}
} else if (route.src) {
// typeof normal route
if (route.continue && route.dest) {
errors.push({
message: `Cannot use both continue and dest`,
src: route.src,
});
}
// Route src should always start with a '^'
if (!route.src.startsWith('^')) {
route.src = `^${route.src}`;

View File

@@ -115,12 +115,6 @@ describe('normalizeRoutes', () => {
handle: 'filesystem',
});
routes.push({ src: '^/about$', dest: '/about', continue: true });
errors.push({
message: 'Cannot use both continue and dest',
src: '^/about$',
});
routes.push({ src: '^/(broken]$' });
errors.push({
message: 'Invalid regular expression: "^/(broken]$"',

View File

@@ -1,6 +1,6 @@
{
"name": "@now/static-build",
"version": "0.9.5",
"version": "0.9.6",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/v2/deployments/official-builders/static-build-now-static-build",

View File

@@ -158,33 +158,20 @@ export default [
{
src: '/static/(.*)',
headers: { 'cache-control': 's-maxage=31536000, immutable' },
dest: '/static/$1',
},
{
src: '/favicon.ico',
dest: '/favicon.ico',
},
{
src: '/asset-manifest.json',
dest: '/asset-manifest.json',
},
{
src: '/manifest.json',
dest: '/manifest.json',
},
{
src: '/precache-manifest.(.*)',
dest: '/precache-manifest.$1',
continue: true,
},
{
src: '/service-worker.js',
headers: { 'cache-control': 's-maxage=0' },
dest: '/service-worker.js',
continue: true,
},
{
src: '/sockjs-node/(.*)',
dest: '/sockjs-node/$1',
},
{
handle: 'filesystem',
},
{
src: '/(.*)',
headers: { 'cache-control': 's-maxage=0' },

View File

@@ -1,9 +1,14 @@
{
"version": 2,
"builds": [
{ "src": "package.json", "use": "@now/static-build", "config": { "zeroConfig": true } }
{
"src": "package.json",
"use": "@now/static-build",
"config": { "zeroConfig": true }
}
],
"probes": [
{ "path": "/", "mustContain": "React App" }
{ "path": "/", "mustContain": "React App" },
{ "path": "/testing-output-dir.txt", "mustContain": "This is some content" }
]
}

View File

@@ -0,0 +1 @@
This is some content

View File

@@ -1480,10 +1480,10 @@
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.20.4.tgz#00f0a25a88cac3712af4ba66561d9e281c6f05c9"
integrity sha512-fmq+F/QxPec+k/zvT7HiVpk7oiGFseS6brfT/AYqmCUp6QFRK7vZf2Ref46MImsg/g2W3g5X6SRvGRmOAvEfdA==
"@zeit/node-file-trace@0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@zeit/node-file-trace/-/node-file-trace-0.2.6.tgz#0884bf7a7176f6aa865a40c8c8b95513d59ee463"
integrity sha512-b6OPed+EtVPMNdSdumBPIBFq0h6CgvVj7sa4Lmbq/KJu9KnOJ19Vu4YrJvSWRjgzP4SJqlQ4ya/HUXRP/LWVog==
"@zeit/node-file-trace@0.2.7":
version "0.2.7"
resolved "https://registry.yarnpkg.com/@zeit/node-file-trace/-/node-file-trace-0.2.7.tgz#af6efa0fd1753e70eff6f627581963c5f0a23b64"
integrity sha512-4y8fLbe6heqlsAcu8M1LbwNHLx11P8LSsdh5aYoz2PL2yAo70t47qPY74njM1NuIHqdWInKDx4bGc8fOsn7AdA==
dependencies:
acorn "^6.1.1"
acorn-stage3 "^2.0.0"