mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
chore: fix typos (#7219)
This commit is contained in:
parent
1002d3f456
commit
a2495a6873
@ -38,7 +38,7 @@ Bugfixes for upcoming features won't be ported of course.
|
|||||||
|
|
||||||
### Edge Release Channel
|
### Edge Release Channel
|
||||||
|
|
||||||
After experimenting with `nuxt-edge` releases in the last time, the decisiion to do **nightly releases** for now instead of
|
After experimenting with `nuxt-edge` releases in the last time, the decision to do **nightly releases** for now instead of
|
||||||
releasing a version after _each commit_ was made.
|
releasing a version after _each commit_ was made.
|
||||||
|
|
||||||
## End of Life
|
## End of Life
|
||||||
|
@ -164,7 +164,7 @@ export default class ModuleContainer {
|
|||||||
throw new Error(message)
|
throw new Error(message)
|
||||||
} else {
|
} else {
|
||||||
// TODO: Remove in next major version
|
// TODO: Remove in next major version
|
||||||
message += ' Silently ignoring module as programatic usage detected.'
|
message += ' Silently ignoring module as programmatic usage detected.'
|
||||||
consola.warn(message)
|
consola.warn(message)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -473,6 +473,6 @@ describe('core: module', () => {
|
|||||||
const result = await module.addModule('test-build-module', true)
|
const result = await module.addModule('test-build-module', true)
|
||||||
|
|
||||||
expect(result).toBeUndefined()
|
expect(result).toBeUndefined()
|
||||||
expect(consola.warn).toBeCalledWith('Module `test-build-module` not found. Please ensure `test-build-module` is in `devDependencies` and installed. HINT: During build step, for npm/yarn, `NODE_ENV=production` or `--production` should NOT be used. Silently ignoring module as programatic usage detected.')
|
expect(consola.warn).toBeCalledWith('Module `test-build-module` not found. Please ensure `test-build-module` is in `devDependencies` and installed. HINT: During build step, for npm/yarn, `NODE_ENV=production` or `--production` should NOT be used. Silently ignoring module as programmatic usage detected.')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -224,7 +224,7 @@ describe('generator: generate route', () => {
|
|||||||
expect(returned).toEqual(true)
|
expect(returned).toEqual(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should generate file in flat folder if route is epmty', async () => {
|
test('should generate file in flat folder if route is empty', async () => {
|
||||||
const nuxt = createNuxt()
|
const nuxt = createNuxt()
|
||||||
nuxt.options.build.html = { minify: false }
|
nuxt.options.build.html = { minify: false }
|
||||||
const generator = new Generator(nuxt)
|
const generator = new Generator(nuxt)
|
||||||
|
@ -182,13 +182,13 @@ export default class Server {
|
|||||||
middleware = this._requireMiddleware(middleware)
|
middleware = this._requireMiddleware(middleware)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normalize handler to handle (backward compatiblity)
|
// Normalize handler to handle (backward compatibility)
|
||||||
if (middleware.handler && !middleware.handle) {
|
if (middleware.handler && !middleware.handle) {
|
||||||
middleware.handle = middleware.handler
|
middleware.handle = middleware.handler
|
||||||
delete middleware.handler
|
delete middleware.handler
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normalize path to route (backward compatiblity)
|
// Normalize path to route (backward compatibility)
|
||||||
if (middleware.path && !middleware.route) {
|
if (middleware.path && !middleware.route) {
|
||||||
middleware.route = middleware.path
|
middleware.route = middleware.path
|
||||||
delete middleware.path
|
delete middleware.path
|
||||||
@ -265,7 +265,7 @@ export default class Server {
|
|||||||
middleware.route = middleware.route.slice(0, -1)
|
middleware.route = middleware.route.slice(0, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign _middleware to handle to make accessable from app.stack
|
// Assign _middleware to handle to make accessible from app.stack
|
||||||
middleware.handle._middleware = middleware
|
middleware.handle._middleware = middleware
|
||||||
|
|
||||||
return middleware
|
return middleware
|
||||||
|
@ -65,7 +65,7 @@ export async function lock ({ id, dir, root, options }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!lockPaths.size) {
|
if (!lockPaths.size) {
|
||||||
// make sure to always cleanup our temporate lockPaths
|
// make sure to always cleanup our temporary lockPaths
|
||||||
onExit(() => {
|
onExit(() => {
|
||||||
for (const lockPath of lockPaths) {
|
for (const lockPath of lockPaths) {
|
||||||
fs.removeSync(lockPath)
|
fs.removeSync(lockPath)
|
||||||
|
@ -115,7 +115,7 @@ describe('util: locking', () => {
|
|||||||
expect(fs.remove).toHaveBeenCalledTimes(1)
|
expect(fs.remove).toHaveBeenCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('lock release also cleansup onExit set', async () => {
|
test('lock release also cleanup onExit set', async () => {
|
||||||
const release = jest.fn()
|
const release = jest.fn()
|
||||||
properlock.lock.mockImplementation(() => release)
|
properlock.lock.mockImplementation(() => release)
|
||||||
|
|
||||||
|
@ -83,12 +83,12 @@ describe('util: timer', () => {
|
|||||||
const timer = new Timer()
|
const timer = new Timer()
|
||||||
const hrtime = process.hrtime
|
const hrtime = process.hrtime
|
||||||
process.hrtime = {
|
process.hrtime = {
|
||||||
bigint: jest.fn(() => 'bingint hrtime')
|
bigint: jest.fn(() => 'bigint hrtime')
|
||||||
}
|
}
|
||||||
|
|
||||||
const time = timer.hrtime()
|
const time = timer.hrtime()
|
||||||
|
|
||||||
expect(time).toEqual('bingint hrtime')
|
expect(time).toEqual('bigint hrtime')
|
||||||
expect(process.hrtime.bigint).toBeCalledTimes(1)
|
expect(process.hrtime.bigint).toBeCalledTimes(1)
|
||||||
|
|
||||||
process.hrtime = hrtime
|
process.hrtime = hrtime
|
||||||
|
@ -48,8 +48,8 @@ Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-d
|
|||||||
<% if (nuxtOptions.render.ssrLog) { %>
|
<% if (nuxtOptions.render.ssrLog) { %>
|
||||||
const logs = NUXT.logs || []
|
const logs = NUXT.logs || []
|
||||||
if (logs.length > 0) {
|
if (logs.length > 0) {
|
||||||
const ssrLogSyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;'
|
const ssrLogStyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;'
|
||||||
console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ('%cNuxt SSR', ssrLogSyle)
|
console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ('%cNuxt SSR', ssrLogStyle)
|
||||||
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args))
|
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args))
|
||||||
delete NUXT.logs
|
delete NUXT.logs
|
||||||
console.groupEnd && console.groupEnd()
|
console.groupEnd && console.groupEnd()
|
||||||
|
@ -83,14 +83,14 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// if an error occured within NuxtError show a simple
|
// if an error occurred within NuxtError show a simple
|
||||||
// error message instead to prevent looping
|
// error message instead to prevent looping
|
||||||
if (this.errorFromNuxtError) {
|
if (this.errorFromNuxtError) {
|
||||||
this.$nextTick(() => (this.errorFromNuxtError = false))
|
this.$nextTick(() => (this.errorFromNuxtError = false))
|
||||||
|
|
||||||
return h('div', {}, [
|
return h('div', {}, [
|
||||||
h('h2', 'An error occured while showing the error page'),
|
h('h2', 'An error occurred while showing the error page'),
|
||||||
h('p', 'Unfortunately an error occured and while showing the error page another error occured'),
|
h('p', 'Unfortunately an error occurred and while showing the error page another error occurred'),
|
||||||
h('p', `Error details: ${this.errorFromNuxtError.toString()}`),
|
h('p', `Error details: ${this.errorFromNuxtError.toString()}`),
|
||||||
h('nuxt-link', { props: { to: '/' } }, 'Go back to home')
|
h('nuxt-link', { props: { to: '/' } }, 'Go back to home')
|
||||||
])
|
])
|
||||||
|
@ -239,7 +239,7 @@ export default class Package {
|
|||||||
case 'ERROR':
|
case 'ERROR':
|
||||||
return this.logger.error(event.error)
|
return this.logger.error(event.error)
|
||||||
|
|
||||||
// Eencountered an unrecoverable error
|
// Encountered an unrecoverable error
|
||||||
case 'FATAL':
|
case 'FATAL':
|
||||||
return this.logger.fatal(event.error)
|
return this.logger.fatal(event.error)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ const url = route => 'http://localhost:' + port + route
|
|||||||
// == Uniq Test ==
|
// == Uniq Test ==
|
||||||
// The idea behind is pages using a shared nextId() which returns an incrementing id
|
// The idea behind is pages using a shared nextId() which returns an incrementing id
|
||||||
// So all responses should strictly be different and length of unique responses should equal to responses
|
// So all responses should strictly be different and length of unique responses should equal to responses
|
||||||
// We strictly compare <foorbar>{id}</foorbar> section
|
// We strictly compare <Foobar>{id}</Foobar> section
|
||||||
// Because other response parts such as window.__NUXT may be different resulting false positive passes.
|
// Because other response parts such as window.__NUXT may be different resulting false positive passes.
|
||||||
const uniqueTest = async (url) => {
|
const uniqueTest = async (url) => {
|
||||||
const results = []
|
const results = []
|
||||||
|
@ -33,7 +33,7 @@ describe('basic browser', () => {
|
|||||||
await page.nuxt.navigate('/squared')
|
await page.nuxt.navigate('/squared')
|
||||||
|
|
||||||
expect(await page.$text('header')).toBe('Error layout')
|
expect(await page.$text('header')).toBe('Error layout')
|
||||||
expect(await page.$text('h2')).toBe('An error occured while showing the error page')
|
expect(await page.$text('h2')).toBe('An error occurred while showing the error page')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('/about loads normally', async () => {
|
test('/about loads normally', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user