* Added support for updating tsconfig.json when using astro add
* Refactor
* Remove unneeded change
* Fix build failling due to type difference
* Extend changeset description
* Run astro check on all examples in CI
* Output stderr
* Build Astro before running checks
* Making things faster + colors
* Fix errors inside examples
* Add congrats message
* Revert unentional change to tsconfigs
* Remove more unneeded changes
* `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>
* update node test coverage to include v18, more windows tests
* chore(ci): update turbo to account for OS and NODE_VERSION
* chore: disable node@18, add TODO
Co-authored-by: Nate Moore <nate@astro.build>
* feat: add docs and astrobuild to checkout
* fix: checkout external repos after main
* wip: build each external repo separately?
* Revert "wip: build each external repo separately?"
This reverts commit 042a3b2a8b33cfcff1622c2002bdfa43a5532ea8.
* fix: move checkout to smoke/
* chore: add react to peer dep ignores for CI
* enabling eslint on the all packages and tests
* enabling for all packages
* TEMP: adding an only() test to verify it fails CI
* using our eslint config and ignore in CI
* removing the temporary .only() test
* update lock file
* lint: fixing new test with a no-shadow warning
* chore: update lock file
* adding Tailwind E2E tests with Playwright
* package.json updates
* adding e2e tests to CI workflow
* using e2e for dev tests, mocha for build tests
* refactor: sharing test-utils helpers
* chore: update lockfile
* Adding contributing docs
* Revert "refactor: sharing test-utils helpers"
This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.
* refactor: simpler solution to resolving e2e test fixtures
* chore: updating lockfile
* refactor: cleaning up how URLs are resolved in e2e tests
* install playwright deps in CI
* ensure playwright deps are installed during CI
* adding a basic HMR test for tailwind styles
* using @e2e for playwright test packages
* adding react hydration and HMR tests
* adding hydration and HMR tests for preact
* adding svelte hydration and HMR tests
* adding solid-js hydration and HMR tests
* adding solid hydration and HMR tests
* adding vue hydration and HMR tests
* adding client:media tests
* fixing Lit hydration and HMR tests
* fixing up the Vue e2e tests
* fixing up svelte tests
* chore: test cleanup
* chore: cleaning up test element IDs
* chore: updating lock file
* chore: update lockfile after merge
* TEMP: disabling React e2e tests
* Revert "TEMP: disabling React e2e tests"
This reverts commit ed1bad9cbc.
* updating to use the new editFiles helper
* chore: updating lock file
* updating lock file
* updating lockfile
* TEMP: watching for console logs
* TEMP: testing typescript tests
* updating test:e2e scripts for config file
* seems like it didn't find the config file?
* use a fresh dev server for each test
* removing Lit tests for now
* Revert "removing Lit tests for now"
This reverts commit 4970a8093e.
* updating test config for CI
* WIP: disabling HMR tests to track down why they're unreliable
* TEMP: logging to debug HMR test
* afterEach isn't a global in Playwright
* fix: the test's file reset helper was using a URL not filepath
* one last try, why is the HMR test hanging at cleanup?
* resetting files after tailwind HMR test
* create the onNextChange watcher before editFile is called
* moving the file changed sync into editFile()
* code refactor + Astro Component HMR test
* chore: lint fixes
* adding a test suite for the framework-multiple example app
* adding Tailwind E2E tests with Playwright
* package.json updates
* adding e2e tests to CI workflow
* using e2e for dev tests, mocha for build tests
* refactor: sharing test-utils helpers
* chore: update lockfile
* Adding contributing docs
* Revert "refactor: sharing test-utils helpers"
This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.
* refactor: simpler solution to resolving e2e test fixtures
* chore: updating lockfile
* refactor: cleaning up how URLs are resolved in e2e tests
* install playwright deps in CI
* trying pnpm playwright install to fix version mismatch
* WIP: adding test coverage
* test fixes
* moving the shared lib up a directory to reproduce the bug
* fix: transform with the module ID instead of parsing the filepath
* adding the shared lib to the workspaces list
* fix: client-only assets now get the full URL from vite
* why is this needed for windows?
* WIP: using /@fs to handle windows filepaths
* fix: remove /@fs from hoisted script imports
* nit: removing unused imports
* fix: strip off the path root when mapping client:only styles
* had to reverse the `/@fs` handling to work on windows and unix
* chore: adding comments to explain the fix
* chore: adding changeset
* wip: add prompt for directory with validation
* feat: wire up dir response to cwd
* feat: improve error handling on non-empty dirs
* fix: update test helpers to execaSync
* chore: add .skipped to old tests for clarity
* deps: add mocha and chai to create-astro
* feat: add directory step test with fixture
* feat: update turbo to run create-astro tests again 🥳
* chore: changeset