Skip to content

Commit

Permalink
chore: merge branch 'main' into refactor/types
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 24, 2022
2 parents 5ebf049 + bafccf5 commit b67e766
Show file tree
Hide file tree
Showing 181 changed files with 2,143 additions and 5,105 deletions.
1 change: 1 addition & 0 deletions .npmrc
Expand Up @@ -6,3 +6,4 @@ hoist-pattern[]=pug
hoist-pattern[]=source-map-support
hoist-pattern[]=ts-node
strict-peer-dependencies=false
shell-emulator=true
6 changes: 6 additions & 0 deletions docs/config/preview-options.md
Expand Up @@ -75,3 +75,9 @@ Uses [`http-proxy`](https://github.com/http-party/node-http-proxy). Full options
- **Default:** [`server.cors`](./server-options#server-cors)

Configure CORS for the preview server. This is enabled by default and allows any origin. Pass an [options object](https://github.com/expressjs/cors) to fine tune the behavior or `false` to disable.

## preview.headers

- **Type:** `OutgoingHttpHeaders`

Specify server response headers.
5 changes: 2 additions & 3 deletions docs/config/server-options.md
Expand Up @@ -297,10 +297,9 @@ export default defineConfig({
## server.fs.deny

- **Type:** `string[]`
- **Default:** `['.env', '.env.*', '*.{pem,crt}']`

Blocklist for sensitive files being restricted to be served by Vite dev server.

Default to `['.env', '.env.*', '*.{pem,crt}']`.
Blocklist for sensitive files being restricted to be served by Vite dev server. This will have higher priority than [`server.fs.allow`](#server-fs-allow). [picomatch patterns](https://github.com/micromatch/picomatch#globbing-features) are supported.

## server.origin

Expand Down
10 changes: 10 additions & 0 deletions docs/config/shared-options.md
Expand Up @@ -158,6 +158,16 @@ Export keys ending with "/" is deprecated by Node and may not work well. Please

List of fields in `package.json` to try when resolving a package's entry point. Note this takes lower precedence than conditional exports resolved from the `exports` field: if an entry point is successfully resolved from `exports`, the main field will be ignored.

## resolve.browserField

- **Type:** `boolean`
- **Default:** `true`
- **Deprecated**

Whether to enable resolving to `browser` field.

In future, `resolve.mainFields`'s default value will be `['browser', 'module', 'jsnext:main', 'jsnext']` and this option will be removed.

## resolve.extensions

- **Type:** `string[]`
Expand Down
54 changes: 0 additions & 54 deletions docs/guide/static-deploy.md
Expand Up @@ -276,60 +276,6 @@ You can also add custom domains and handle custom build settings on Pages. Learn

You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge dist yourdomain.com`.

## Heroku

1. Install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).

2. Create a Heroku account by [signing up](https://signup.heroku.com).

3. Run `heroku login` and fill in your Heroku credentials:

```bash
$ heroku login
```

4. Create a file called `static.json` in the root of your project with the below content:

`static.json`:

```json
{
"root": "./dist"
}
```

This is the configuration of your site; read more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).

5. Set up your Heroku git remote:

```bash
# version change
$ git init
$ git add .
$ git commit -m "My site ready for deployment."

# creates a new app with a specified name
$ heroku apps:create example
```

6. Set buildpacks. We use `heroku/nodejs` to build the project and `heroku-buildpack-static` to serve it.

```bash
# set buildpacks
$ heroku buildpacks:set heroku/nodejs
$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static.git
```

7. Deploy your site:

```bash
# publish site
$ git push heroku main

# opens a browser to view the Dashboard version of Heroku CI
$ heroku open
```

## Azure Static Web Apps

You can quickly deploy your Vite app with Microsoft Azure [Static Web Apps](https://aka.ms/staticwebapps) service. You need:
Expand Down
48 changes: 24 additions & 24 deletions package.json
Expand Up @@ -20,25 +20,25 @@
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
"test": "run-s test-unit test-serve test-build",
"test-serve": "vitest run -c vitest.config.e2e.ts",
"test-build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"test-build-without-plugin-commonjs": "cross-env VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
"test-unit": "vitest run",
"test-docs": "pnpm run docs-build",
"debug-serve": "cross-env VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
"debug-build": "cross-env VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
"docs": "vitepress dev docs",
"docs-build": "vitepress build docs",
"docs-serve": "vitepress serve docs",
"build": "pnpm -r --filter=./packages/* run build",
"dev": "pnpm -r --parallel --filter=./packages/* run dev",
"build": "pnpm -r --filter='./packages/*' run build",
"dev": "pnpm -r --parallel --filter='./packages/*' run dev",
"release": "tsx scripts/release.ts",
"ci-publish": "tsx scripts/publishCI.ts",
"ci-docs": "run-s build docs-build"
},
"devDependencies": {
"@babel/types": "^7.18.13",
"@microsoft/api-extractor": "^7.29.5",
"@rollup/plugin-typescript": "^8.4.0",
"@babel/types": "^7.19.0",
"@microsoft/api-extractor": "^7.31.2",
"@rollup/plugin-typescript": "^8.5.0",
"@types/babel__core": "^7.1.19",
"@types/babel__standalone": "^7.1.4",
"@types/convert-source-map": "^1.5.2",
Expand All @@ -51,30 +51,30 @@
"@types/micromatch": "^4.0.2",
"@types/minimist": "^1.2.2",
"@types/node": "^17.0.42",
"@types/prompts": "^2.4.0",
"@types/picomatch": "^2.3.0",
"@types/prompts": "^2.0.14",
"@types/resolve": "^1.20.2",
"@types/sass": "~1.43.1",
"@types/semver": "^7.3.12",
"@types/stylus": "^0.48.38",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3",
"esbuild": "^0.14.47",
"eslint": "^8.23.0",
"eslint-define-config": "^1.6.0",
"eslint": "^8.23.1",
"eslint-define-config": "^1.7.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"execa": "^6.1.0",
"fast-glob": "^3.2.11",
"fast-glob": "^3.2.12",
"fs-extra": "^10.1.0",
"lint-staged": "^13.0.3",
"minimist": "^1.2.6",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"playwright-chromium": "^1.25.1",
"pnpm": "^7.9.5",
"playwright-chromium": "^1.26.0",
"pnpm": "^7.12.2",
"prettier": "2.7.1",
"prompts": "^2.4.2",
"resolve": "^1.22.1",
Expand All @@ -84,13 +84,13 @@
"semver": "^7.3.7",
"simple-git-hooks": "^2.8.0",
"tslib": "^2.4.0",
"tsx": "^3.8.2",
"tsx": "^3.9.0",
"typescript": "^4.6.4",
"unbuild": "^0.8.9",
"unbuild": "^0.8.11",
"vite": "workspace:*",
"vitepress": "^1.0.0-alpha.12",
"vitest": "^0.22.1",
"vue": "^3.2.37"
"vitepress": "^1.0.0-alpha.15",
"vitest": "^0.23.4",
"vue": "^3.2.39"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false",
Expand All @@ -110,7 +110,7 @@
"eslint --cache --fix"
]
},
"packageManager": "pnpm@7.9.5",
"packageManager": "pnpm@7.12.2",
"pnpm": {
"overrides": {
"vite": "workspace:*",
Expand Down
13 changes: 13 additions & 0 deletions packages/create-vite/CHANGELOG.md
@@ -1,3 +1,16 @@
## 3.1.0 (2022-09-05)

* refactor(create-vite): migrate to TypeScript (#9941) ([85fa2c8](https://github.com/vitejs/vite/commit/85fa2c8)), closes [#9941](https://github.com/vitejs/vite/issues/9941)
* perf: bundle create-vite (#9034) ([37ac91e](https://github.com/vitejs/vite/commit/37ac91e)), closes [#9034](https://github.com/vitejs/vite/issues/9034)
* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888)
* test(cli): remove unnecessary generics usage (#9859) ([45d6797](https://github.com/vitejs/vite/commit/45d6797)), closes [#9859](https://github.com/vitejs/vite/issues/9859)
* feat: skip `.git` when emptying dir (#9659) ([07fe65e](https://github.com/vitejs/vite/commit/07fe65e)), closes [#9659](https://github.com/vitejs/vite/issues/9659)
* feat(create-vite): add support for custom init commands (`create-vue`, Nuxt, and SvelteKit) (#9406) ([1673f3d](https://github.com/vitejs/vite/commit/1673f3d)), closes [#9406](https://github.com/vitejs/vite/issues/9406)
* chore(deps): update all non-major dependencies (#9675) ([4e56e87](https://github.com/vitejs/vite/commit/4e56e87)), closes [#9675](https://github.com/vitejs/vite/issues/9675)
* chore(deps): update all non-major dependencies (#9778) ([aceaefc](https://github.com/vitejs/vite/commit/aceaefc)), closes [#9778](https://github.com/vitejs/vite/issues/9778)



## <small>3.0.2 (2022-08-12)</small>


Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/package.json
@@ -1,6 +1,6 @@
{
"name": "create-vite",
"version": "3.0.2",
"version": "3.1.0",
"type": "module",
"license": "MIT",
"author": "Evan You",
Expand Down Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/vitejs/vite/tree/main/packages/create-vite#readme",
"devDependencies": {
"cross-spawn": "^7.0.3",
"kolorist": "^1.5.1",
"kolorist": "^1.6.0",
"minimist": "^1.2.6",
"prompts": "^2.4.2"
}
Expand Down

0 comments on commit b67e766

Please sign in to comment.