Skip to content

Commit ed02861

Browse files
author
那里好脏不可以
authored
chore: fix code typos (#9033)
1 parent ea27701 commit ed02861

File tree

18 files changed

+46
-25
lines changed

18 files changed

+46
-25
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
7575

7676
- name: Install Playwright
77-
# does not need to explictly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
77+
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
7878
run: pnpm playwright install chromium
7979

8080
- name: Build

packages/plugin-legacy/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/plugin-vue/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-present, Yuxi (Evan) You and contributors
3+
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

packages/vite/src/node/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,14 @@ export interface UserConfig {
257257

258258
export interface ExperimentalOptions {
259259
/**
260-
* Append fake `&lang.(ext)` when queries are specified, to preseve the file extension for following plugins to process.
260+
* Append fake `&lang.(ext)` when queries are specified, to preserve the file extension for following plugins to process.
261261
*
262262
* @experimental
263263
* @default false
264264
*/
265265
importGlobRestoreExtension?: boolean
266266
/**
267-
* Allow finegrain contol over assets and public files paths
267+
* Allow finegrain control over assets and public files paths
268268
*
269269
* @experimental
270270
*/

packages/vite/src/node/optimizer/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export type DepOptimizationOptions = DepOptimizationConfig & {
151151
export interface DepOptimizationResult {
152152
metadata: DepOptimizationMetadata
153153
/**
154-
* When doing a re-run, if there are newly discovered dependendencies
154+
* When doing a re-run, if there are newly discovered dependencies
155155
* the page reload will be delayed until the next rerun so we need
156156
* to be able to discard the result
157157
*/

packages/vite/src/node/optimizer/optimizer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ async function createDepsOptimizer(
240240
depOptimizationProcessingQueue.push(depOptimizationProcessing)
241241

242242
// Create a new promise for the next rerun, discovered missing
243-
// dependencies will be asigned this promise from this point
243+
// dependencies will be assigned this promise from this point
244244
depOptimizationProcessing = newDepOptimizationProcessing()
245245
}
246246

247247
async function optimizeNewDeps() {
248-
// a succesful completion of the optimizeDeps rerun will end up
248+
// a successful completion of the optimizeDeps rerun will end up
249249
// creating new bundled version of all current and discovered deps
250250
// in the cache dir and a new metadata info object assigned
251251
// to _metadata. A fullReload is only issued if the previous bundled
@@ -391,7 +391,7 @@ async function createDepsOptimizer(
391391
} else {
392392
if (newDepsDiscovered) {
393393
// There are newly discovered deps, and another rerun is about to be
394-
// excecuted. Avoid the current full reload discarding this rerun result
394+
// executed. Avoid the current full reload discarding this rerun result
395395
// We don't resolve the processing promise, as they will be resolved
396396
// once a rerun is committed
397397
processingResult.cancel()
@@ -528,7 +528,7 @@ async function createDepsOptimizer(
528528
src: resolved,
529529
// Assing a browserHash to this missing dependency that is unique to
530530
// the current state of known + missing deps. If its optimizeDeps run
531-
// doesn't alter the bundled files of previous known dependendencies,
531+
// doesn't alter the bundled files of previous known dependencies,
532532
// we don't need a full reload and this browserHash will be kept
533533
browserHash: getDiscoveredBrowserHash(
534534
metadata.hash,

packages/vite/src/node/plugins/html.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface ScriptAssetsUrl {
4545
url: string
4646
}
4747

48-
const htmlProxyRE = /\?html-proxy=?[&inline\-css]*&index=(\d+)\.(js|css)$/
48+
const htmlProxyRE = /\?html-proxy=?(?:&inline-css)?&index=(\d+)\.(js|css)$/
4949
const inlineCSSRE = /__VITE_INLINE_CSS__([a-z\d]{8}_\d+)__/g
5050
// Do not allow preceding '.', but do allow preceding '...' for spread operations
5151
const inlineImportRE =

packages/vite/src/node/server/middlewares/transform.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ export function transformMiddleware(
218218
}
219219
// We don't need to log an error in this case, the request
220220
// is outdated because new dependencies were discovered and
221-
// the new pre-bundle dependendencies have changed.
221+
// the new pre-bundle dependencies have changed.
222222
// A full-page reload has been issued, and these old requests
223-
// can't be properly fullfilled. This isn't an unexpected
223+
// can't be properly fulfilled. This isn't an unexpected
224224
// error but a normal part of the missing deps discovery flow
225225
return
226226
}

packages/vite/src/node/ssr/ssrModuleLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async function nodeImport(
307307

308308
// rollup-style default import interop for cjs
309309
function proxyESM(mod: any) {
310-
// This is the only sensible option when the exports object is a primitve
310+
// This is the only sensible option when the exports object is a primitive
311311
if (isPrimitive(mod)) return { default: mod }
312312

313313
let defaultExport = 'default' in mod ? mod.default : mod

playground/css/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ <h1>CSS</h1>
100100
<pre class="charset-css"></pre>
101101

102102
<p class="css-dep">
103-
@import dependency w/ style enrtrypoints: this should be purple
103+
@import dependency w/ style entrypoints: this should be purple
104104
</p>
105105
<p class="css-dep-sass">
106-
@import dependency w/ sass enrtrypoints: this should be orange
106+
@import dependency w/ sass entrypoints: this should be orange
107107
</p>
108108
<p class="css-dep-stylus">
109-
@import dependency w/ styl enrtrypoints: this should be red
109+
@import dependency w/ styl entrypoints: this should be red
110110
</p>
111111

112112
<p class="dir-dep">PostCSS dir-dependency: this should be grey</p>

playground/define/__tests__/define.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test('string', async () => {
3737
)
3838
expect(await page.textContent('.no-identifier-substring')).toBe(String(true))
3939
expect(await page.textContent('.no-property')).toBe(String(true))
40-
// html would't need to define replacement
40+
// html wouldn't need to define replacement
4141
expect(await page.textContent('.exp-define')).toBe('__EXP__')
4242
expect(await page.textContent('.import-json')).toBe('__EXP__')
4343
expect(await page.textContent('.define-in-dep')).toBe(
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import def, { a } from './target'
22
import { x } from './callback'
33

4-
// we don't want to polute other checks' logs...
4+
// we don't want to pollute other checks' logs...
55
if (0 > 1) console.log(x)
66

77
console.log(`>>>>>> ${a} ${def}`)

playground/legacy/__tests__/legacy.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe.runIf(isBuild)('build', () => {
8181
test('should minify legacy chunks with terser', async () => {
8282
// This is a ghetto heuristic, but terser output seems to reliably start
8383
// with one of the following, and non-terser output (including unminified or
84-
// ebuild-minified) does not!
84+
// esbuild-minified) does not!
8585
const terserPattern = /^(?:!function|System.register)/
8686

8787
expect(findAssetFile(/chunk-async-legacy/)).toMatch(terserPattern)
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import jsdom from 'jsdom' // should be redireted to empty module
1+
import jsdom from 'jsdom' // should be redirected to empty module
22
export default ''
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import jsdom from 'jsdom' // should be redireted to empty module
1+
import jsdom from 'jsdom' // should be redirected to empty module
22
export default ''
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import jsdom from 'jsdom' // should be redireted to empty module
1+
import jsdom from 'jsdom' // should be redirected to empty module
22
export default '[success] resolve browser field'

playground/tailwind/src/router.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Page from './views/Page.vue'
33

44
const history = createWebHistory()
55

6-
const routeur = createRouter({
6+
const router = createRouter({
77
history: history,
88
routes: [
99
{
@@ -13,4 +13,4 @@ const routeur = createRouter({
1313
]
1414
})
1515

16-
export default routeur
16+
export default router

playground/vue/__tests__/vue.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('src imports', () => {
212212
await untilUpdated(() => getColor(el), 'red')
213213
})
214214

215-
test('tempalte src import hmr', async () => {
215+
test('template src import hmr', async () => {
216216
const el = await page.$('.src-imports-style')
217217
editFile('src-import/template.html', (code) =>
218218
code.replace('should be tan', 'should be red')

0 commit comments

Comments
 (0)