Commit Graph

11 Commits

Author SHA1 Message Date
m5o
9d19d02a0a [tests] Return an empty array if nowJson.builds is empty (#3886)
* return an empty array if nowJson.builds is empty
  * https://github.com/zeit/now/pull/3622#issuecomment-578995344
  * extracted from PR discussion
    * occur after following change a645d4ee88
  * kudos to @styfle

/cc @styfle
2020-03-06 20:12:44 +00:00
Steven
71b6a58783 [all] Exclude @now/build-utils in bundled builder to fix tests (#3848)
This fixes a bug in our `@now/build-utils` tests that pair the current build-utils with a stable builder. Since ncc was bundling `@now/build-utils`, we weren't able to configure a different version and these tests were not actually testing the correct version of build-utils.

A nice side-effect is that each builder will be about 50% smaller (compared by measuring `dist`).
2020-02-27 15:48:03 -05:00
Steven
cc3026ffcb [tests] Fix builder debug flag (#3805)
When testing, you can set `NOW_BUILDER_DEBUG=1` to print verbose logs from builders.

However, this was causing some tests to fail that depended on a build environment variable.

This PR fixes the assignment so that it preserves the environment variables from the tests by adding `NOW_BUILDER_DEBUG` instead of replacing.
2020-02-18 22:57:17 +00:00
JJ Kasper
5d1069d464 [now-next] Make sure to 404 and clear cache header for invalid _next requests (#3801)
This handles an edge case where deeply nested dynamic routes were handling `_next` 404s that were cached forever since the immutable header we set isn't cleared after not matching on the filesystem.

I updated our cache-header fixture to check for this edge case also to make sure we don't regress on this
2020-02-17 17:42:51 +00:00
Steven
1a046744f2 [now-go] Add support for root go.mod in api directory (#3793)
Some users wish to put all Go related code in the `/api` directory and the root is reserved for a frontend framework.

This PR adds support for `/api/go.mod` which will act the same as `/go.mod` by moving the file to the root.
2020-02-14 17:32:20 +00:00
JJ Kasper
49b375ed6a [now-next] Disable running next export from export-intent (#3448)
As requested by @timneutkens after investigating we're disabling auto running `next export` for the user during a build since most users who want their app exported will define `next export` in their `build` script
2019-12-18 03:01:33 +00:00
JJ Kasper
5fc9b7d36d [now-next] Add loading of custom routes (#3279)
This adds loading of `redirects` and `rewrites` from the `routes-manifest` in supported Next.js versions
2019-11-11 12:36:00 +01:00
JJ Kasper
1c40d693c1 [now-next] Add Beta iSSG Support (#3067)
Adds support for new SPRv2 handling in Next.js.

x-ref: #3021
2019-11-11 12:16:36 +01:00
Steven
b6697dd432 [now-static-build] Add Eleventy to optimized framework list (#3060)
* [now-static-build] Add eleventy to frameworks

* Add test using eleventy-base-blog

* Fix tests with dot files

* Add now.json to 27-eleventy fixture
2019-09-30 09:36:16 -04:00
Steven
8253e76ec0 [now-python] Fix headers with multiple values (#3053)
* [now-python] Add format_headers()

* Add tests

* Fix filenames

* Fix test probes
2019-09-30 09:35:44 -04:00
Steven
b0ad5238f7 Create monorepo (#2812)
* Move now-cli to /packages/now-cli

* Fix .gitignore paths

* Add now-client

* Add lerna to top level

* Add scripts

* Update codeowners

* Fix `/now-cli/build.ts` script

* Fix circleci path to artifacts

* Use relative paths

* Fix path to scripts

* Add test-lint script

* Add missing return type

* Fix typo in test-lint

* Fix string match in shell scripts

* Fix path to hugo

* Add package node_modules

* Delete lock files in packages, use root yarn.lock

* Add missing b.js file

* Add test-integration-now-dev script

* Add missing test files

* Add missing integration test script

* Add missing test files

* Delete travis.yml

* Fix ts-jest in now-client

* Add support for Node 8 (ES2015 target)

* Add support for Node 8

* Add polyfill for Node 8

* Fix polyfill for Node 8

* Only run coverage for now-cli

* Add packages from now-builders

* Run integration tests for builders

* Add node_modules to cache

* Add root readme.md

* Move readme to top level

* Add yarn bootstrap

* Add bootstrap step

* Add dist to `persist_to_workspace`

* Fix 08-yarn-npm integration test

* Remove duplicate path

* Change stdio to inherit

* Add back store_artifacts

* testing - remove bootstrap step

* Add back now-build-utils

* Remove bootstrap step

* Fix test again

* Add console.log()

* Fix lint

* Use local ncc version

* Install go

* Revert changes to stdio and console.log()

* Add missing now-go test

* Add missing integration tests

* Add --runInBand flag

* Fix now-node-bridge persistence

* Add missing symlinks

* Add codeowners

* Consolidate into single run.sh function

* Run uniq

* Fix typo

* Change now-routing-utils to test-unit

* Special case test for node 8

* Add docs from builders

* Only run script for modified packages

* Add test-integration-once which only runs once

* Fix set intersection
2019-08-23 23:57:00 +00:00