* [now-static-build] Handle `buildCommand`, `devCommand` and `outputDirectory`
* Adjust tests
* Swap order
* Add `node_modules/.bin` to PATH
* Remove @types/execa
* Append PATH only to spawn options
* Remove test check
* Only add when there is a command
* [now-build-utils] Consider `yarn build` and `npm run build` as `buildCommand`
* [@now/build-utils] Update new detectors
* Update unit tests
* [@now/build-utils] Update detect-builder and detect-routes
* Update tests
* Run prettier
* Add more tests
* [now-cli] Use default detectors
* Add now-dev test
* Add a generic node project fallback
* Fix build
* Use public as default
* Ensure generic node project is last
* Update tests
* Update tests again
* Update packages/now-build-utils/src/detectors/filesystem.ts
Co-Authored-By: Nathan Rajlich <n@n8.io>
* Remove parentheses
* Revert "Remove parentheses"
This reverts commit 03f9aba07b0a6d4088719ca9afd602ce8fb1e9c1.
* Use getDependencyVersion instead of hasDependency
We expect `now@canary` to use canary builders. This PR fixes a bug where a zero config deployment was selecting `@now/static-build` instead of `@now/static-build@canary`.
* [now-build-utils] Ensure function paths are relative to the project and improve the error message
* Update packages/now-build-utils/src/detect-builders.ts
Co-Authored-By: Steven <steven@ceriously.com>
* Update packages/now-build-utils/src/detect-builders.ts
Co-Authored-By: Steven <steven@ceriously.com>
* [now-node] Use builder version 3
* [now-cgi] Use builder version 3
* [now-go] Use builder version 3
* [now-python] Use builder version 3
* [now-ruby] Use builder version 3
* Adjust docs
* [now-ruby] Remove unused import
* Temp. test in iad1
* Revert "Temp. test in iad1"
This reverts commit 4c495baa5888dda5ae8f184f679613e91ab7268c.
* [now-cli] Adjust `now dev` for builder version 3
* [now-build-utils] Do not allow non Community Runtimes
* Temp. Force Build in iad1
* Update DEVELOPING_A_RUNTIME.md
Co-Authored-By: Steven <steven@ceriously.com>
* Update docs
* Update test/lib/deployment/now-deploy.js
Co-Authored-By: Steven <steven@ceriously.com>
* Remove temp. iad1 check
* Check memory and maxDuration
* Use memory for Lambda
* Only cast once
* Skip tests
* Allow functions + next.js
* Don't allow empty or invalid functions
* Make sure runtimes match a source
* Update now-dev to use the functions property
* Functions must match a source file
* Split up functions
* Make sure @now/next does not receive any unused functions
* Allow memory and maxDuration properties on Lambdas
* Add lambda options to @now/node
* Add lambda options to @now/go
* Add lambda options to @now/python
* Add lambda options to @now/ruby
* Update lambda options on @now/node
* Add lambda optiosn to @now/cgi
* Make options optional
* Add lambda options to @now/next
* Fix assertion
* Add test
* Fix tests
* Skip 06-ruby test
* Skip correct tests
* Fix options and cache src check
* Adjust memory test
This fixes the scenario where the user defines `trailingSlash: true` and creates a file `/api/users.js`. They would expect to be able to visit `/api/users/` and it should run that function.
* [now-build-utils] Validate functions and allow them as config
* Apply suggestions from code review
Co-Authored-By: Steven <steven@ceriously.com>
* Change memory check
* Adjust test
This updates `@now/build-utils` to add support for the function property including types and tests.
Related: [PRODUCT-27]
[PRODUCT-27]: https://zeit.atlassian.net/browse/PRODUCT-27
This PR does a few things
- Separate tests into `integration.test.js` and `unit.test.js`
- Use one static build instead of many to avoid `should NOT have more than 128 items` error
- Add a new unit test so we don't regress
Fixes#3159