mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
7481ffda02
* `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>
94 lines
3.4 KiB
JSON
94 lines
3.4 KiB
JSON
{
|
|
"name": "root",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/withastro/astro.git"
|
|
},
|
|
"scripts": {
|
|
"release": "pnpm run build && changeset publish",
|
|
"build": "turbo run build --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
|
"build:ci": "turbo run build:ci --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
|
"build:examples": "turbo run build --filter=\"@example/*\"",
|
|
"dev": "turbo run dev --no-deps --no-cache --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
|
"format": "pnpm run format:code",
|
|
"format:ci": "pnpm run format:imports && pnpm run format:code",
|
|
"format:code": "prettier -w . --cache --plugin-search-dir=.",
|
|
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
|
|
"test": "turbo run test --output-logs=new-only --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
|
"test:match": "cd packages/astro && pnpm run test:match",
|
|
"test:smoke": "turbo run build --filter=\"@example/*\" --filter=\"astro.build\" --filter=\"docs\" --output-logs=new-only --concurrency=1",
|
|
"test:vite-ci": "turbo run test --filter=astro --output-logs=new-only --no-deps --concurrency=1",
|
|
"test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e",
|
|
"test:e2e:match": "cd packages/astro && pnpm playwright install && pnpm run test:e2e:match",
|
|
"benchmark": "turbo run benchmark --filter=astro",
|
|
"lint": "eslint .",
|
|
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format"
|
|
},
|
|
"workspaces": [
|
|
"packages/markdown/*",
|
|
"packages/integrations/*",
|
|
"packages/*",
|
|
"examples/*",
|
|
"examples/component/demo",
|
|
"scripts",
|
|
"packages/astro/test/fixtures/component-library-shared",
|
|
"packages/astro/test/fixtures/custom-elements/my-component-lib",
|
|
"packages/astro/test/fixtures/static build/pkg"
|
|
],
|
|
"engines": {
|
|
"node": "^14.18.0 || >=16.12.0",
|
|
"pnpm": ">=7.9.5"
|
|
},
|
|
"packageManager": "pnpm@7.9.5",
|
|
"pnpm": {
|
|
"packageExtensions": {
|
|
"svelte2tsx": {
|
|
"peerDependenciesMeta": {
|
|
"typescript": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"peerDependencyRules": {
|
|
"ignoreMissing": [
|
|
"rollup",
|
|
"@babel/core",
|
|
"@babel/plugin-transform-react-jsx",
|
|
"vite",
|
|
"react",
|
|
"react-dom",
|
|
"@types/react"
|
|
]
|
|
},
|
|
"patchedDependencies": {
|
|
"@changesets/cli@2.23.0": "patches/@changesets__cli@2.23.0.patch"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"@astrojs/webapi": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@changesets/changelog-github": "0.4.4",
|
|
"@changesets/cli": "2.23.0",
|
|
"@octokit/action": "^3.18.1",
|
|
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
|
"@typescript-eslint/parser": "^5.27.1",
|
|
"del": "^7.0.0",
|
|
"esbuild": "^0.14.43",
|
|
"eslint": "^8.17.0",
|
|
"eslint-config-prettier": "^8.5.0",
|
|
"eslint-plugin-no-only-tests": "^2.6.0",
|
|
"eslint-plugin-prettier": "^4.0.0",
|
|
"execa": "^6.1.0",
|
|
"organize-imports-cli": "^0.10.0",
|
|
"prettier": "^2.7.0",
|
|
"prettier-plugin-astro": "^0.3.0",
|
|
"pretty-bytes": "^6.0.0",
|
|
"tiny-glob": "^0.2.9",
|
|
"turbo": "1.2.5",
|
|
"typescript": "~4.7.3"
|
|
}
|
|
}
|