Commit graph

473 commits

Author SHA1 Message Date
Marco Moretti
b3e45fab5e
feat(cli): use default template when GH is offline (#12194)
fix #12136 

I add a prompt if there is an error when trying to download example files.
Maybe could be better to add an error class and in create-app.ts on every "console.error" trow a new Exception and manage it in catch. What you think ? 👯
2020-05-26 16:39:18 +00:00
Joe Haddad
89bc74909b
v9.4.3-canary.0 2020-05-23 21:52:57 -04:00
James Mosier
846ec74013
Special case default template in CNA (#12109)
This addresses #11910 in which `-e default` was not working because there was no example with the name `default`. This PR checks if a user inputted `default` as the example argument for `create-next-app` and if so it will use the local `default` template in the create-next-app directory.

Closes #11910
2020-05-23 22:50:31 +00:00
Joe Haddad
91b1548d32
v9.4.2 2020-05-20 15:32:29 -04:00
Joe Haddad
05a12cb742
v9.4.2-canary.5 2020-05-20 14:48:52 -04:00
JJ Kasper
b325f15e61
Update Create Next App to handle rename of org (#13138)
* Update Create Next App to handle rename

* Rethrow if we dont handle the error
2020-05-20 11:52:32 -05:00
Joe Haddad
5703362d77
v9.4.2-canary.4 2020-05-20 12:00:01 -04:00
Joe Haddad
d0d59782f5
v9.4.2-canary.3 2020-05-19 08:47:23 -04:00
Joe Haddad
53a2cebdf6
v9.4.2-canary.2 2020-05-18 23:23:08 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Joe Haddad
2b58755027
v9.4.2-canary.1 2020-05-18 09:48:48 -04:00
Joe Haddad
da1e2b32fb
v9.4.2-canary.0 2020-05-18 08:56:28 -04:00
Joe Haddad
ca372a9500
v9.4.1 2020-05-16 18:14:00 -04:00
Joe Haddad
d5d9013795
v9.4.1-canary.9 2020-05-16 17:53:08 -04:00
Joe Haddad
01211ba21d
v9.4.1-canary.8 2020-05-16 17:15:27 -04:00
Joe Haddad
fc927a2a7f
v9.4.1-canary.7 2020-05-15 17:17:10 -04:00
JJ Kasper
1872219959
v9.4.1-canary.6 2020-05-15 14:04:04 -05:00
Joe Haddad
99766ca9e2
v9.4.1-canary.5 2020-05-15 08:50:03 -04:00
Joe Haddad
fddf00c56f
v9.4.1-canary.4 2020-05-14 12:16:04 -04:00
Joe Haddad
b48eb89d08
v9.4.1-canary.3 2020-05-13 17:25:01 -04:00
Tim Neutkens
efa763e924 v9.4.1-canary.2 2020-05-13 13:34:53 +02:00
Joe Haddad
bfed6d8dd1
v9.4.1-canary.1 2020-05-12 19:39:52 -04:00
Joe Haddad
87e096eb5b
v9.4.1-canary.0 2020-05-11 19:40:55 -04:00
Joe Haddad
6d1167eed6
v9.4.0 2020-05-11 10:47:34 -04:00
Joe Haddad
f9e24ab54c
v9.3.7-canary.21 2020-05-11 10:24:14 -04:00
Joe Haddad
0900d57359
v9.3.7-canary.20 2020-05-11 02:03:32 -04:00
Joe Haddad
565e111cb0
v9.3.7-canary.19 2020-05-10 20:49:17 -04:00
Maxi Gimenez
ce830af202
chore(create-next-app): add missing types (#12691) 2020-05-10 17:51:47 -04:00
Maxi Gimenez
cf0b1d9472
chore(create-next-app): add missing return types on helpers (#12616)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-05-10 12:55:46 +02:00
Tim Neutkens
61599b8598 v9.3.7-canary.18 2020-05-10 12:06:09 +02:00
Joe Haddad
80f1194421
v9.3.7-canary.17 2020-05-09 18:43:31 -04:00
Simon Knott
be02fe183f
Allow @babel/preset-typescript to be configured (#11840)
* Allow `@babel/preset-typescript` to be configured

Some usages, e.g. [getting parameter decorators to work properly](https://github.com/WarnerHooh/babel-plugin-parameter-decorator/pull/19), require configuring `@babel/preset-typescript`.

This commit adds that functionality to `next/babel`.

* Add unit test for babel/preset allowing to pass options to @babel/preset-typescript

* Add integration test for onlyRemoveTypeImports

* Update babel dependencies

* Update to compatible typescript version and fix types

* Fix linting and run pre-nccing

* Update size-limit test

* Add additional tests

* Re-Apply delta to be calculated using -262

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-05-09 17:12:02 +02:00
Joe Haddad
7a02581159
v9.3.7-canary.16 2020-05-08 10:29:37 -04:00
Joe Haddad
8d024554a7
v9.3.7-canary.15 2020-05-08 01:00:00 -04:00
Joe Haddad
9c1c551eeb
v9.3.7-canary.14 2020-05-07 01:36:27 -04:00
Joe Haddad
a795e48be1
v9.3.7-canary.13 2020-05-07 00:51:18 -04:00
Joe Haddad
177b016e76
v9.3.7-canary.12 2020-05-06 01:05:24 -04:00
Joe Haddad
8fd7338f77
v9.3.7-canary.11 2020-05-05 12:01:06 -04:00
Joe Haddad
ed86e2d10b
v9.3.7-canary.10 2020-05-04 17:27:30 -04:00
Joe Haddad
11404551f3
v9.3.7-canary.9 2020-05-03 21:56:50 -04:00
Joe Haddad
2906c8e9e5
v9.3.7-canary.8 2020-05-03 21:44:53 -04:00
Joe Haddad
d00445090e
v9.3.7-canary.7 2020-05-03 20:22:43 -04:00
Joe Haddad
8cf61bf23e
v9.3.7-canary.6 2020-05-02 01:59:59 -04:00
Joe Haddad
922b0ecc9b
v9.3.7-canary.5 2020-05-01 23:44:52 -04:00
Joe Haddad
84cf6aad2a
v9.3.7-canary.4 2020-04-30 13:27:28 -04:00
Joe Haddad
0ffeca26f6
v9.3.7-canary.3 2020-04-30 11:40:14 -04:00
Tim Neutkens
20b62de8d7 v9.3.7-canary.2 2020-04-30 16:51:26 +02:00
Tim Neutkens
0710b6b84a v9.3.7-canary.1 2020-04-30 11:30:29 +02:00
Tim Neutkens
61acc194ac v9.3.7-canary.0 2020-04-29 11:25:31 +02:00
Tim Neutkens
e6424fefaf v9.3.6 2020-04-28 11:57:59 +02:00
Tim Neutkens
bcd9b77768 v9.3.6-canary.16 2020-04-28 11:52:39 +02:00
Tim Neutkens
e40f8ff5d3 v9.3.6-canary.15 2020-04-28 10:16:33 +02:00
Joe Haddad
f0809316ee
v9.3.6-canary.14 2020-04-27 10:35:30 -04:00
Tim Neutkens
04f3d94b30 v9.3.6-canary.13 2020-04-27 12:03:17 +02:00
Joe Haddad
718d6a4274
v9.3.6-canary.12 2020-04-26 15:17:39 -04:00
Joe Haddad
2a3e0772fb
v9.3.6-canary.11 2020-04-24 18:01:23 -04:00
Tim Neutkens
970dadc862 v9.3.6-canary.10 2020-04-24 15:51:45 +02:00
Joe Haddad
ad16b8c823
v9.3.6-canary.9 2020-04-22 00:11:37 -04:00
Joe Haddad
c14ec9cf51
v9.3.6-canary.8 2020-04-21 17:37:03 -04:00
Tim Neutkens
c60511c76d v9.3.6-canary.7 2020-04-21 11:47:45 +02:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
JJ Kasper
16e7871066
v9.3.6-canary.6 2020-04-20 20:02:00 -05:00
Joe Haddad
544654989f
v9.3.6-canary.5 2020-04-20 01:31:23 -04:00
Joe Haddad
86236bc76b
v9.3.6-canary.4 2020-04-19 03:05:13 -04:00
JJ Kasper
28ca0a7086
Add API route to default CNA template (#11981) 2020-04-17 16:28:58 -05:00
Joe Haddad
2ef814a274
v9.3.6-canary.3 2020-04-17 15:26:31 -04:00
Tim Neutkens
e0d4ae0447 v9.3.6-canary.2 2020-04-17 11:24:55 +02:00
Tim Neutkens
5d0932ce25 v9.3.6-canary.1 2020-04-16 13:44:51 +02:00
Joe Haddad
92dac59630
v9.3.6-canary.0 2020-04-15 02:48:57 -04:00
Joe Haddad
c0724cac82
v9.3.5 2020-04-14 23:24:53 -04:00
Joe Haddad
df1e54877c
v9.3.5-canary.13 2020-04-14 19:39:12 -04:00
Joe Haddad
682120b732
v9.3.5-canary.12 2020-04-14 19:16:15 -04:00
Joe Haddad
d1b987f524
v9.3.5-canary.11 2020-04-14 10:49:42 -04:00
Tim Neutkens
5713bcbb6c v9.3.5-canary.10 2020-04-14 11:35:38 +02:00
matamatanot
7dbdf1d89e
Remove update-check.d.ts (#11858)
Co-authored-by: matamatanot <matamatanot@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-13 14:47:01 -04:00
matamatanot
e686545c0d
Update @types in create-next-app (#11815)
* remove self made types

* add types

Co-authored-by: matamatanot <matamatanot@gmail.com>
2020-04-13 13:06:19 -04:00
JJ Kasper
2594bb93ab
v9.3.5-canary.9 2020-04-13 11:26:11 -05:00
Tim Neutkens
099ea8b932 v9.3.5-canary.8 2020-04-11 12:45:39 +02:00
JJ Kasper
46ecb00112
v9.3.5-canary.7 2020-04-10 18:12:02 -05:00
Joe Haddad
13cf97055f
v9.3.5-canary.6 2020-04-09 10:24:02 -04:00
Joe Haddad
43a8e57b3e
v9.3.5-canary.5 2020-04-07 13:38:48 -04:00
Dylan Brookes
bc7d18367b
Confirm if user wants example when creating app (#10543)
* Confirm if user wants example when creating app

* Only ask user to choose example if they provide --example flag

* Simplify the search

* Added test

* Use a select to pick the template

* Updated test

* check for lowercase and updated no example message

* Add message if no template is selected

* Updated tests

* Handle error if fetching the examples fails

* Fixed tests

* Updated test timeout

* Update examples.ts

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-07 13:11:29 -04:00
matamatanot
1f15072e99
Update got in create-next-app (#11725)
Co-authored-by: “kosuke_matano” <kosuke_matano@cyberagent.co.jp>
2020-04-07 09:24:57 -04:00
JJ Kasper
43b9f8fbfe
v9.3.5-canary.4 2020-04-06 14:24:16 -05:00
matamatanot
c89ddc97e2
Remove node-promisepipe library (#11700)
* remove promisepipe

* commit yarn.lock

Co-authored-by: “kosuke_matano” <kosuke_matano@cyberagent.co.jp>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-06 10:46:04 -04:00
Brandon Duffany
1fbd20dc37
Allow top-level GitHub repo URLs as examples (#11691)
* Support top-level GitHub repo URLs

Adds support for top-level GitHub repo URLs, e.g.
https://github.com/username/my-cool-next-example.

This is already possible, but you have to enter "/tree/master" (or the
desired branch name) after the repo URL.

The change itself simply expands that URL to
https://github.com/username/cool-next-example/tree/$DEFAULT_BRANCH_NAME
where DEFAULT_BRANCH_NAME is the default branch configured for the repo
in GitHub.

* Fix formatting issues
2020-04-06 15:57:19 +02:00
Tim Neutkens
69984de796 v9.3.5-canary.3 2020-04-06 11:51:39 +02:00
Shu Uesugi
7b0802eb40
Use function for function components (#11695) 2020-04-06 10:44:40 +02:00
Sriram Thiagarajan
eec18ecafe
[create-next-app] update logic for shouldUseYarn function (#11683)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-06 09:32:20 +02:00
JJ Kasper
9baa103bb8
v9.3.5-canary.2 2020-04-04 12:39:57 -05:00
Joe Haddad
ed1aba0dbb
v9.3.5-canary.1 2020-04-03 13:18:26 -04:00
JJ Kasper
ef1bfc962b
v9.3.5-canary.0 2020-04-02 10:12:50 -05:00
Tim Neutkens
8c899ee5e4 v9.3.4 2020-04-01 16:05:04 +02:00
Tim Neutkens
e000d843b2 v9.3.4-canary.4 2020-04-01 16:04:03 +02:00
Tim Neutkens
a99244402e v9.3.4-canary.3 2020-04-01 12:14:38 +02:00
JJ Kasper
f9cd7c581f
v9.3.4-canary.2 2020-03-31 14:30:10 -05:00
Joe Haddad
0bfc0b3f18
v9.3.4-canary.1 2020-03-30 16:29:38 -04:00
Joe Haddad
7038d275d0
v9.3.4-canary.0 2020-03-30 13:04:48 -04:00
Joe Haddad
b5d8660ef3
v9.3.3 2020-03-30 10:00:26 -04:00
Tim Neutkens
ac223e2761 v9.3.3-canary.0 2020-03-30 14:21:05 +02:00
Tim Neutkens
ee0081356d v9.3.2 2020-03-26 20:11:41 +01:00
Joe Haddad
dd4cee7245
v9.3.2-canary.9 2020-03-26 15:00:03 -04:00
Joe Haddad
ee249ee6cd
v9.3.2-canary.8 2020-03-26 13:18:16 -04:00
Tim Neutkens
e83cd4aa96 v9.3.2-canary.7 2020-03-26 14:13:54 +01:00
JJ Kasper
d8155b22ff
Add initial support for new env handling (#10525)
* Add initial support for new env config file

* Fix serverless processEnv call when no env is provided

* Add missing await for test method

* Update env config to .env.json and add dotenv loading

* ncc dotenv package

* Update type

* Update with new discussed behavior removing .env.json

* Update hot-reloader createEntrypoints

* Make sure .env is loaded before next.config.js

* Add tests for all separate .env files

* Remove comments

* Add override tests

* Add test for overriding env vars based on local environment

* Add support for .env.test

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Use chalk for env loaded message

* Remove constant as it’s not needed

* Update test

* Update errsh, taskr, and CNA template ignores

* Make sure to only consider undefined missing

* Remove old .env ignore

* Update to not populate process.env with loaded env

* Add experimental flag and add loading of global env values

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-26 13:32:41 +01:00
Joe Haddad
aac2e3e2db
v9.3.2-canary.6 2020-03-25 15:02:15 -04:00
Joe Haddad
e7842aff23
v9.3.2-canary.5 2020-03-24 22:19:47 -04:00
Tim Neutkens
55186cabd6 v9.3.2-canary.4 2020-03-24 12:40:29 +01:00
Joe Haddad
130733129d
v9.3.2-canary.3 2020-03-23 18:46:48 -04:00
Joe Haddad
c68de947a4
v9.3.2-canary.2 2020-03-23 11:20:28 -04:00
Tim Neutkens
f25f9b8753 v9.3.2-canary.1 2020-03-20 13:07:04 +01:00
Joe Haddad
bf93ca4af6
v9.3.2-canary.0 2020-03-18 13:00:25 -04:00
Tim Neutkens
9730be6734 v9.3.1 2020-03-17 16:06:51 +01:00
Tim Neutkens
d661fac733 v9.3.1-canary.7 2020-03-17 15:39:49 +01:00
Tim Neutkens
25d8652283 v9.3.1-canary.6 2020-03-16 10:57:41 +01:00
Tim Neutkens
30cf4d5ab6 v9.3.1-canary.5 2020-03-15 15:15:19 +01:00
Joe Haddad
925d843503
v9.3.1-canary.4 2020-03-13 09:09:10 -04:00
Joe Haddad
8f8030f7eb
v9.3.1-canary.3 2020-03-12 14:09:12 -04:00
Joe Haddad
a86184eb89
v9.3.1-canary.2 2020-03-12 07:31:26 -04:00
Joe Haddad
33503f70a7
v9.3.1-canary.1 2020-03-11 10:37:26 -04:00
Joe Haddad
a4ab088746
v9.3.1-canary.0 2020-03-09 14:59:13 -04:00
Tim Neutkens
befb5006f4 v9.3.0 2020-03-09 19:08:52 +01:00
Joe Haddad
713340600d
v9.2.3-canary.29 2020-03-09 13:31:12 -04:00
Tim Neutkens
f0cec748d8 v9.2.3-canary.28 2020-03-09 11:01:02 +01:00
Tim Neutkens
1d16b10e3a v9.2.3-canary.27 2020-03-09 10:45:11 +01:00
Tim Neutkens
9edafc6469 v9.2.3-canary.26 2020-03-06 12:20:38 +01:00
Joe Haddad
d07db4a054
v9.2.3-canary.25 2020-03-05 13:54:01 -05:00
Tim Neutkens
69ba79346f
Update README-template.md 2020-03-05 17:35:41 +01:00
Tim Neutkens
2d64986733 v9.2.3-canary.24 2020-03-05 16:00:12 +01:00
Joe Haddad
640e8f3548
v9.2.3-canary.23 2020-03-04 11:56:58 -05:00
Joe Haddad
6598e99b49
v9.2.3-canary.22 2020-03-02 19:03:10 -05:00
JJ Kasper
4056e98280
v9.2.3-canary.21 2020-03-02 12:34:46 -06:00
Joe Haddad
2b74db73fa
v9.2.3-canary.20 2020-03-02 12:22:31 -05:00
Joe Haddad
94009422c5
v9.2.3-canary.19 2020-03-01 22:34:22 -05:00
Joe Haddad
bc4f7bd216
v9.2.3-canary.18 2020-03-01 11:44:44 -05:00
Joe Haddad
586fdf4eba
v9.2.3-canary.17 2020-02-28 09:44:58 -05:00
JJ Kasper
0ff41daa48
v9.2.3-canary.16 2020-02-27 12:05:45 -06:00
Luis Alvarez D
75559f1431
Add --example=<github-url> to create-next-app (#10226)
* Initial support for URLs

* Added folder support

* Added --example-path

* Bug fix

* Also install deps

* Updated error message

* Bug fix and replace the file path

* Added tests

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-02-27 16:32:32 +01:00
Tim Neutkens
0b88d17aeb v9.2.3-canary.15 2020-02-27 15:34:27 +01:00
Tim Neutkens
5cba994016 v9.2.3-canary.14 2020-02-27 14:10:49 +01:00
JJ Kasper
b3ffdabbad
v9.2.3-canary.13 2020-02-26 13:49:08 -06:00
Shu Uesugi
c57cdbb31d
Rename zeit.co/new → zeit.co/import (#10674)
* Replace zeit.co/new → zeit.co/import

* Update deployment.md
2020-02-24 19:08:34 -05:00
Joe Haddad
0ee18741e7
v9.2.3-canary.12 2020-02-24 16:47:54 -05:00
Joe Haddad
008a558d03
v9.2.3-canary.11 2020-02-24 13:41:19 -05:00
Joe Haddad
91a4732440
v9.2.3-canary.10 2020-02-22 12:15:54 -05:00
Joe Haddad
0890b586f4
v9.2.3-canary.9 2020-02-22 00:17:18 -05:00
JJ Kasper
16b3a54caa
v9.2.3-canary.8 2020-02-20 15:48:47 -06:00
Tim Neutkens
90480b84c9 v9.2.3-canary.7 2020-02-20 20:27:24 +01:00
JJ Kasper
61025b8693
v9.2.3-canary.6 2020-02-19 15:47:06 -06:00
Joe Haddad
0acea5f44a
v9.2.3-canary.5 2020-02-19 13:21:33 -05:00