Commit graph

216 commits

Author SHA1 Message Date
natemoo-re
6a59531ff9 [ci] format 2023-02-06 16:21:48 +00:00
Nate Moore
8d2187d8b8
Refactor create-astro (#6082)
* refactor: new version of create-astro

* chore: update README

* fix(create-astro): update project name logic

* test(create-astro): fix test on windows

* test(create-astro): fix test on windows

* test(create-astro): remove unused import

* chore: remove log

* chore: increase test timeout

* fix: message when skipping

* fix: message for env.d.ts file

* fix: always hard exit

* fix: return from next-steps

* chore: add message

* refactor dependencies, bundle create-astro

* chore: disable create-astro typings

* chore: switch to arg

* chore: update message

* fix: split typescript into two steps, fix context test

* chore: update wording

* chore: update wording

* Update packages/create-astro/src/actions/dependencies.ts

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>

* refactor: move tests back to mocha/chai

* chore: update cli-kit

* update test script

* chore: add comment about setStdout

* chore: update cli-kit

* Update packages/create-astro/src/messages.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/create-astro/src/messages.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore: update lockfile

* fix(create-astro): support scoped package names, improve project-name tests

* better git initialization

* update cli-kit

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-02-06 10:19:37 -06:00
Houston (Bot)
d9787a6ff6
[ci] release (#5995)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-30 12:38:31 -05:00
matthewp
5e3d538812 [ci] format 2023-01-26 20:36:29 +00:00
Chris Banford
5c64324c0a
Add a check for existing .git directory (and skip if one is found). (#5953)
* Add a check for existing .git directory (and skip if one is found).

* Changeset attempt :-)

* Update .changeset/try-button-rumor.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-26 15:34:49 -05:00
Houston (Bot)
398a516f03
[ci] release (#5959)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-24 11:12:02 -06:00
Nate Moore
d0d7f61182
fix(create-astro): typescript prompt handling (#5958)
* fix(create-astro): typescript prompt handling

* fallback

* fix(create-astro): additional case

Co-authored-by: Nate Moore <nate@astro.build>
2023-01-24 11:01:26 -06:00
Houston (Bot)
73ca0ef383
[ci] release (#5948)
* [ci] release

* Update changelogs (#5955)

* [ci] release

* Wrap astro 2.0 beta logs in `<details>`

* Add link to docs upgrade guide

* First pass cleaning up 2.0 release notes

* mdx changes from Sarah

* combine 5584 and 5842 in deno, image, netlify

* markdown/remark incl (5684 & 5769) to match mdx

* Tweak markdown/remark formatting

* Format astro-prism

* Format astro-rss

* Format create-astro

* Format cloudflare

* Format lit

* Format partytown

* Format node

* Format preact

* Format react

* Format solid

* Format svelte

* Format tailwind

* Format vercel

* Format vue

* Format telemetry

* Format webapi

* Format scripts

* Reinstate h3s for headings

Co-authored-by: Ben Holmes <hey@bholmes.dev>

* Reformat mdx

* astro & markdown/remark: Combine #5679 & #5684 changelogs

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2023-01-24 11:38:06 -05:00
Houston (Bot)
a75177f843
[ci] release (beta) (#5911)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-23 16:11:39 -05:00
Chris Swithinbank
f27bb3d79f
Improve error message for third-party template 404s (#5920) 2023-01-21 00:04:39 +01:00
natemoo-re
ad13467a84 [ci] format 2023-01-20 14:54:53 +00:00
Reuben Tier
d8919b1a21
Add headless support to create-astro (#5898)
* Add headless support to create-astro

* Document new flags for create-astro
2023-01-20 08:53:12 -06:00
Fred K. Bot
02b797fd3c
[ci] release (beta) (#5792)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-12 11:40:35 -05:00
Le Minh Tri
21a55b3276
test(create-astro): correct wrong argument (#5812) 2023-01-11 00:57:16 +08:00
Erika
1f92d64ea3
Drop Node 14 support (#5782)
* chore: Update engines field

* fix(deps): Remove node-fetch

* feat(polyfills): Remove node-fetch for undici

* feat(webapi): Remove node-fetch from the webapis polyfills for undici

* feat(core): Remove node-fetch for undici in Astro core

* feat(telemetry): Remove node-fetch for undici

* feat(node): Remove node-fetch for undici in node integration

* feat(vercel): Remove node-fetch for undici in Vercel integration

* chore: update lockfile

* chore: update lockfile

* chore: changeset

* fix(set): Fix set directives not streaming correctly on Node 16

* Try another approach

* Debugging

* Debug fetch

* Use global fetch if there is one

* changeset for lit

* Remove web-streams-polyfill

* Remove web-streams-polyfill license note

* Update .changeset/stupid-wolves-explain.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-09 16:59:20 -05:00
Anders Kaseorg
53e0c98dae
Fix spelling mistakes found by codespell and mwic (#5627) 2022-12-19 12:00:00 +01:00
Fred K. Bot
fc46ca53d1
[ci] release (#5607)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-16 15:54:19 -05:00
Nate Moore
61302ab7a0
fix(create-astro): skip Houston on windows until prompts are fixed (#5616)
Co-authored-by: Nate Moore <nate@astro.build>
2022-12-16 15:48:03 -05:00
董雨航
2c2c65297a
upgrade giget for support proxy config (#5579) 2022-12-14 13:08:44 -06:00
Fred K. Bot
49c1a5d439
[ci] release (#5399)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-16 10:07:56 -05:00
bluwy
095de72a17 [ci] format 2022-11-15 07:29:00 +00:00
李瑞丰
505abfd643
fix(create-astro): fix error when don't have template input (#5404) 2022-11-15 15:27:16 +08:00
Fred K. Bot
e8ff4571f2
[ci] release (#5325)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-08 13:00:53 -05:00
Nate Moore
b211eadeff
create-astro bug fixes (#5319)
* fix(create-astro): upgrade cli-kit

* fix(create-astro): avoid setRawMode error

* chore(lint): disable create-astro linting

Co-authored-by: Nate Moore <nate@astro.build>
2022-11-08 10:33:36 -06:00
Andy
77e20d54c7
Fix typo in create-astro messages (#5312) 2022-11-07 10:07:21 -05:00
Fred K. Bot
5016166acf
[ci] release (#5239)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-31 10:21:09 -04:00
natemoo-re
daa062cc3d [ci] format 2022-10-28 19:07:40 +00:00
Nate Moore
d9be7e36b8
fix(create-astro): improve error messages when create-astro fails (#5240)
Co-authored-by: Nate Moore <nate@astro.build>
2022-10-28 14:05:46 -05:00
natemoo-re
e35bc26186 [ci] format 2022-10-28 17:26:22 +00:00
Nate Moore
641b6d7d58
feat(create-astro): add --fancy flag (#5226)
Co-authored-by: Nate Moore <nate@astro.build>
2022-10-28 12:24:14 -05:00
Fred K. Bot
50841bb7fd
[ci] release (#5199)
* [ci] release

* Update packages/integrations/cloudflare/CHANGELOG.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-27 09:41:03 -04:00
natemoo-re
814327f409 [ci] format 2022-10-26 15:16:54 +00:00
Nate Moore
0408376281
[Create Astro] Improved prompts, template handling, Houston (#5088)
* feat(create-astro): add houston, improve prompts

* refactor(create-astro): move to giget

* chore: add changeset

* chore: update lockfile

* test(create-astro): update tests to match new output

* chore: prefer named functions

* fix: update template prompt

* fix: update typescript message

* chore: add explicit --skip-houston flag

* test(create-astro): skip flaky typescript test

Co-authored-by: Nate Moore <nate@astro.build>
2022-10-26 10:13:56 -05:00
Fred K. Bot
077134ae2c
[ci] release (#4846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27 12:12:44 -04:00
matthewp
6ce8ae261f [ci] format 2022-09-22 18:39:14 +00:00
Michael Rienstra
7481ffda02
create-astro: always create tsconfig.json (#4810)
* `create-astro`: always create `tsconfig.json`

Currently, we only make sure `tsconfig.json` exists when `strict` or `strictest` is selected. Both `default` & `optout` are intended to correspond to `base` -- and will do so for all [23 official templates](https://github.com/withastro/astro/tree/main/examples), but not necessarily for third-party templates.

The [example command for installing a third-party template](https://github.com/withastro/astro/blob/a800bf7/packages/create-astro/README.md?plain=1#L31-L35) is (rather conveniently for the sake of this PR!) an example of a template without a `tsconfig.json` file, and installing it with the `default` ("Relaxed") Typescript option results in no `tsconfig.json` file, rather than a `tsconfig.json` file containing `{ "extends": "astro/tsconfigs/base" }` as would be expected.

This PR addresses this scenario. 

It also explicitly sets the `tsconfig.json` file to `{ "extends": "astro/tsconfigs/base" }` when `default` (which I renamed to `base`, still presented to the user as "Relaxed") or `optout` is selected (`optout` has always printed a warning about the importance of `tsconfig.json` & `src/env.d.ts` but otherwise behaved identically to `default`). This is necessary in two scenarios:

1. When the `tsconfig.json` file was created by this script.
2. When it either didn't already include `"extends"`, or it extended a different config by default. For example, some third-party templates might default to `strict`, in which case I'm guessing we'd want to respect the user's choice and change that to `base`.

* update `del` 6.1.1 --> 7.0.0

* test: prevent excess writes
(without this it triggers many times)

* test: create-astro typescript prompt

* changeset

* fix: recursive `mkdirSync`

* test: longer timeout for `windows-latest` OS
(see if this fixes failing tests)

* better glob path creation, don't hardcode `/`

* test: longer timeout for windows-latest OS
(since I'm about to trigger another CI run by pushing a commit, might as well try this too)

* create-astro test: show last CLI output on timeout

* drop variable timeout
Typescript tests are slower than directory tests, but they are all usually less than 5000 ms. Less complexity, easier to maintain.

* DRY new error output

* Update lockfile

* Sync lockfile with main

* Update lockfile

Co-authored-by: Princesseuh <princssdev@gmail.com>
2022-09-22 14:37:01 -04:00
Fred K. Bot
a08b178cdb
[ci] release (#4811)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-20 15:15:54 -04:00
HiDeoo
c84d85ba4d
Add support for running create-astro in cloned empty git repository (#4805) 2022-09-20 08:30:13 -04:00
Michael Rienstra
a800bf7ec1
.md only: npm init astro --> npm create astro (#4760)
* .md only: npm init astro --> npm create astro

For consistency with https://github.com/withastro/docs/pull/360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same.

Search:
`\b(npm|yarn|pnpm) init astro\b`
Replace:
`$1 create astro`

Except for two instances:

1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog.

2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in https://github.com/withastro/astro/pull/3168.

* docs: add `@latest` to `npm create astro`
Co-authored-by: Bjorn Lu <bjorn@bjornlu.com>

Co-authored-by: Michael Rienstra <michael@goodmoney.com>
2022-09-16 12:40:06 -05:00
Dan Jutan
e6c80843f8
use unused self-documenting variable (#4605) 2022-09-06 08:41:36 -04:00
Fred K. Bot
ff03313848
[ci] release (#4495)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-26 13:01:30 -04:00
Fred K. Bot
7960fb80a1
[ci] release (next) (#4480)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-25 17:27:35 -04:00
Erika
77ce6be30c
Add template tsconfigs for users to extend from (#4439)
* Add tsconfig templates to extend from

* Add changeset

* Right order for assign parameters

* Add tsconfigs to export map
2022-08-25 15:15:27 -04:00
Eldemarkki
439f1d1c0d
Fix typo in stricter tsconfig (#4394) 2022-08-20 20:45:23 +08:00
Nate Moore
9f067dca27
Astro 1.0.0 (#4214)
* chore: remove changesets patch

* chore: add changesets

* chore: version packages

* chore: normalize formatting

* chore: update lockfile

* chore: fix codeblocks

* Update packages/astro/CHANGELOG.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/CHANGELOG.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/CHANGELOG.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore: fixup code samples

* chore: move v0.25 message out of note

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-08-09 11:10:25 -05:00
Fred K. Bot
3a7e0221b3
[ci] release (#4186)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-06 09:06:57 -07:00
Erika
77c018e515
Fix relaxed and default TypeScript settings not working (#4183)
* Fix relaxed and default TypeScript settings not working

* Create itchy-hats-exist.md
2022-08-06 07:04:39 -07:00
Fred K. Bot
4e4061f485
[ci] release (#4159)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-05 21:48:35 -07:00
Erika
d344f9e3ec
Add a TypeScript step to create-astro (#4179)
* Add a TypeScript step to create-astro

* Add changeset

* fred pass

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-08-05 21:06:18 -07:00
Fred K. Bot
84193e3ea1
[ci] release (#4081)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-28 15:53:57 -04:00