Skip to content

Commit

Permalink
chore(deps): update all non-major dependencies (main) (nuxt#25342)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
renovate[bot] and danielroe authored Jan 29, 2024
1 parent 0d91e52 commit 7d65769
Show file tree
Hide file tree
Showing 20 changed files with 818 additions and 600 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: pnpm build

- name: Cache dist
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: dist
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
run: pnpm install

- name: Initialize CodeQL
uses: github/codeql-action/init@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
languages: javascript
queries: +security-and-quality
Expand All @@ -97,7 +97,7 @@ jobs:
path: packages

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
category: "/language:javascript"

Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
TEST_CONTEXT: ${{ matrix.context }}
SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.context == 'default' || runner.os == 'Windows' }}

- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
- uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
if: github.event_name != 'push' && matrix.env == 'built' && matrix.builder == 'vite' && matrix.context == 'default' && matrix.os == 'ubuntu-latest' && matrix.manifest == 'manifest-on'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
sarif_file: results.sarif
28 changes: 14 additions & 14 deletions docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,23 @@ Non primitive JS types | ❌ No | ✅ Yes

Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file as the single source of trust for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt.

Name | Config File | How To Configure
|----------------------------------------------|---------------------------|-------------------------
| [Nitro](https://nitro.unjs.io) | ~~`nitro.config.ts`~~ | Use [`nitro`](/docs/api/nuxt-config#nitro) key in `nuxt.config`
| [PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Use [`postcss`](/docs/api/nuxt-config#postcss) key in `nuxt.config`
| [Vite](https://vitejs.dev) | ~~`vite.config.ts`~~ | Use [`vite`](/docs/api/nuxt-config#vite) key in `nuxt.config`
| [webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Use [`webpack`](/docs/api/nuxt-config#webpack-1) key in `nuxt.config`
Name | Config File | How To Configure
---------------------------------------------|---------------------------|-------------------------
[Nitro](https://nitro.unjs.io) | ~~`nitro.config.ts`~~ | Use [`nitro`](/docs/api/nuxt-config#nitro) key in `nuxt.config`
[PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Use [`postcss`](/docs/api/nuxt-config#postcss) key in `nuxt.config`
[Vite](https://vitejs.dev) | ~~`vite.config.ts`~~ | Use [`vite`](/docs/api/nuxt-config#vite) key in `nuxt.config`
[webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Use [`webpack`](/docs/api/nuxt-config#webpack-1) key in `nuxt.config`

Here is a list of other common config files:

Name | Config File | How To Configure
|----------------------------------------------|-------------------------|--------------------------
| [TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [More Info](/docs/guide/concepts/typescript#nuxttsconfigjson)
| [ESLint](https://eslint.org) | `.eslintrc.js` | [More Info](https://eslint.org/docs/latest/use/configure/configuration-files)
| [Prettier](https://prettier.io) | `.prettierrc.json` | [More Info](https://prettier.io/docs/en/configuration.html)
| [Stylelint](https://stylelint.io) | `.stylelintrc.json` | [More Info](https://stylelint.io/user-guide/configure)
| [TailwindCSS](https://tailwindcss.com) | `tailwind.config.js` | [More Info](https://tailwindcss.nuxtjs.org/tailwind/config)
| [Vitest](https://vitest.dev) | `vitest.config.ts` | [More Info](https://vitest.dev/config)
Name | Config File | How To Configure
---------------------------------------------|-------------------------|--------------------------
[TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [More Info](/docs/guide/concepts/typescript#nuxttsconfigjson)
[ESLint](https://eslint.org) | `.eslintrc.js` | [More Info](https://eslint.org/docs/latest/use/configure/configuration-files)
[Prettier](https://prettier.io) | `.prettierrc.json` | [More Info](https://prettier.io/docs/en/configuration.html)
[Stylelint](https://stylelint.io) | `.stylelintrc.json` | [More Info](https://stylelint.io/user-guide/configure)
[TailwindCSS](https://tailwindcss.com) | `tailwind.config.js` | [More Info](https://tailwindcss.nuxtjs.org/tailwind/config)
[Vitest](https://vitest.dev) | `vitest.config.ts` | [More Info](https://vitest.dev/config)

## Vue Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/5.community/6.roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ Each active version has its own nightly releases which are generated automatical

Release | | Initial release | End Of Life | Docs
----------------------------------------|---------------------------------------------------------------------------------------------------|-----------------|--------------|-------
**4.x** (scheduled) | | 2024 Q1 | |
**4.x** (scheduled) | | 2024 Q1 | | &nbsp;
**3.x** (stable) | <a href="https://npmjs.com/package/nuxt"><img alt="Nuxt latest 3.x version" src="https://flat.badgen.net/npm/v/nuxt?label="></a> | 2022-11-16 | TBA | [nuxt.com](/docs)
**2.x** (maintenance) | <a href="https://www.npmjs.com/package/nuxt?activeTab=versions"><img alt="Nuxt 2.x version" src="https://flat.badgen.net/npm/v/nuxt/2x?label="></a> | 2018-09-21 | 2024-06-30 | [v2.nuxt.com](https://v2.nuxt.com/docs)
**1.x** (unsupported) | <a href="https://www.npmjs.com/package/nuxt?activeTab=versions"><img alt="Nuxt 1.x version" src="https://flat.badgen.net/npm/v/nuxt/1x?label="></a> | 2018-01-08 | 2019-09-21 |
**1.x** (unsupported) | <a href="https://www.npmjs.com/package/nuxt?activeTab=versions"><img alt="Nuxt 1.x version" src="https://flat.badgen.net/npm/v/nuxt/1x?label="></a> | 2018-01-08 | 2019-09-21 | &nbsp;

### Support Status

Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@nuxt/schema": "workspace:*",
"@nuxt/vite-builder": "workspace:*",
"@nuxt/webpack-builder": "workspace:*",
"rollup": "^4.9.5",
"rollup": "^4.9.6",
"nuxt": "workspace:*",
"vite": "5.0.12",
"vue": "3.4.15",
Expand All @@ -48,32 +48,32 @@
"@nuxt/test-utils": "3.11.0",
"@nuxt/webpack-builder": "workspace:*",
"@types/fs-extra": "11.0.4",
"@types/node": "20.11.5",
"@types/node": "20.11.10",
"@types/semver": "7.5.6",
"@vitest/coverage-v8": "1.2.2",
"@vue/test-utils": "2.4.3",
"@vue/test-utils": "2.4.4",
"case-police": "0.6.1",
"changelogen": "0.5.5",
"consola": "3.2.3",
"devalue": "4.3.2",
"eslint": "8.56.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsdoc": "48.0.2",
"eslint-plugin-jsdoc": "48.0.4",
"eslint-plugin-no-only-tests": "3.1.0",
"eslint-plugin-unicorn": "50.0.1",
"execa": "8.0.1",
"fs-extra": "11.2.0",
"globby": "14.0.0",
"h3": "1.10.0",
"happy-dom": "13.2.0",
"h3": "1.10.1",
"happy-dom": "13.3.4",
"jiti": "1.21.0",
"markdownlint-cli": "0.38.0",
"markdownlint-cli": "0.39.0",
"nitropack": "2.8.1",
"nuxi": "3.10.0",
"nuxt": "workspace:*",
"ofetch": "1.3.3",
"pathe": "1.1.2",
"playwright-core": "1.41.0",
"playwright-core": "1.41.1",
"rimraf": "5.0.5",
"semver": "7.5.4",
"std-env": "3.7.0",
Expand All @@ -82,11 +82,11 @@
"vitest": "1.2.2",
"vitest-environment-nuxt": "1.0.0",
"vue": "3.4.15",
"vue-eslint-parser": "9.4.0",
"vue-eslint-parser": "9.4.2",
"vue-router": "4.2.5",
"vue-tsc": "1.8.27"
},
"packageManager": "pnpm@8.14.1",
"packageManager": "pnpm@8.15.0",
"engines": {
"node": "^14.18.0 || >=16.10.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ufo": "^1.3.2",
"unctx": "^2.3.1",
"unimport": "^3.7.1",
"untyped": "^1.4.0"
"untyped": "^1.4.2"
},
"devDependencies": {
"@types/hash-sum": "1.0.2",
Expand All @@ -54,7 +54,7 @@
"unbuild": "latest",
"vite": "5.0.12",
"vitest": "1.2.2",
"webpack": "5.89.0"
"webpack": "5.90.0"
},
"engines": {
"node": "^14.18.0 || >=16.10.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@
"defu": "^6.1.4",
"destr": "^2.0.2",
"devalue": "^4.3.2",
"esbuild": "^0.19.11",
"esbuild": "^0.20.0",
"escape-string-regexp": "^5.0.0",
"estree-walker": "^3.0.3",
"fs-extra": "^11.2.0",
"globby": "^14.0.0",
"h3": "^1.10.0",
"h3": "^1.10.1",
"hookable": "^5.5.3",
"jiti": "^1.21.0",
"klona": "^2.0.6",
Expand All @@ -91,7 +91,7 @@
"mlly": "^1.5.0",
"nitropack": "^2.8.1",
"nuxi": "^3.10.0",
"nypm": "^0.3.4",
"nypm": "^0.3.6",
"ofetch": "^1.3.3",
"ohash": "^1.1.3",
"pathe": "^1.1.2",
Expand All @@ -109,7 +109,7 @@
"unimport": "^3.7.1",
"unplugin": "^1.6.0",
"unplugin-vue-router": "^0.7.0",
"untyped": "^1.4.0",
"untyped": "^1.4.2",
"vue": "^3.4.15",
"vue-bundle-renderer": "^2.0.0",
"vue-devtools-stub": "^0.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/nuxt/src/core/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
resolveSchema as resolveUntypedSchema
} from 'untyped'
import type { Schema, SchemaDefinition } from 'untyped'
// @ts-expect-error TODO: add upstream type
import untypedPlugin from 'untyped/babel-plugin'
import jiti from 'jiti'

Expand Down
8 changes: 4 additions & 4 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"@vitejs/plugin-vue-jsx": "3.1.0",
"@vue/compiler-core": "3.4.15",
"c12": "1.6.1",
"esbuild-loader": "4.0.2",
"h3": "1.10.0",
"esbuild-loader": "4.0.3",
"h3": "1.10.1",
"ignore": "5.3.0",
"nitropack": "2.8.1",
"ofetch": "1.3.3",
Expand All @@ -56,7 +56,7 @@
"vue-bundle-renderer": "2.0.0",
"vue-loader": "17.4.2",
"vue-router": "4.2.5",
"webpack": "5.89.0",
"webpack": "5.90.0",
"webpack-dev-middleware": "7.0.0"
},
"dependencies": {
Expand All @@ -70,7 +70,7 @@
"std-env": "^3.7.0",
"ufo": "^1.3.2",
"unimport": "^3.7.1",
"untyped": "^1.4.0"
"untyped": "^1.4.2"
},
"engines": {
"node": "^14.18.0 || >=16.10.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/schema/src/config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ export default defineUntypedSchema({
* @type {typeof import('../src/types/config').NuxtAppConfig['head']}
*/
head: {
$resolve: async (val, get) => {
const resolved: Required<AppHeadMetaObject> = defu(val, await get('meta'), {
$resolve: async (val: Partial<AppHeadMetaObject> | undefined, get) => {
const resolved = defu(val, await get('meta') as Partial<AppHeadMetaObject>, {
meta: [],
link: [],
style: [],
script: [],
noscript: []
})
} as Required<Pick<AppHeadMetaObject, 'meta' | 'link' | 'style' | 'script' | 'noscript'>>)

// provides default charset and viewport if not set
if (!resolved.meta.find(m => m.charset)?.charset) {
Expand Down Expand Up @@ -240,7 +240,7 @@ export default defineUntypedSchema({
* @type {string | boolean}
*/
spaLoadingTemplate: {
$resolve: async (val, get) => typeof val === 'string' ? resolve(await get('srcDir'), val) : val ?? null
$resolve: async (val: string | boolean | undefined, get) => typeof val === 'string' ? resolve(await get('srcDir') as string, val) : val ?? null
},

/**
Expand Down Expand Up @@ -291,6 +291,6 @@ export default defineUntypedSchema({
* @type {string[]}
*/
css: {
$resolve: val => (val ?? []).map((c: any) => c.src || c)
$resolve: (val: string[] | undefined) => (val ?? []).map((c: any) => c.src || c)
}
})
19 changes: 10 additions & 9 deletions packages/schema/src/config/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineUntypedSchema({
* @type {'vite' | 'webpack' | { bundle: (nuxt: typeof import('../src/types/nuxt').Nuxt) => Promise<void> }}
*/
builder: {
$resolve: async (val, get) => {
$resolve: async (val: 'vite' | 'webpack' | { bundle: (nuxt: unknown) => Promise<void> } | undefined = 'vite', get) => {
if (typeof val === 'object') {
return val
}
Expand All @@ -27,7 +27,7 @@ export default defineUntypedSchema({
* @type {boolean | { server?: boolean | 'hidden', client?: boolean | 'hidden' }}
*/
sourcemap: {
$resolve: async (val, get) => {
$resolve: async (val: boolean | { server?: boolean | 'hidden', client?: boolean | 'hidden' } | undefined, get) => {
if (typeof val === 'boolean') {
return { server: val, client: val }
}
Expand All @@ -46,7 +46,7 @@ export default defineUntypedSchema({
* @type {'silent' | 'info' | 'verbose'}
*/
logLevel: {
$resolve: (val) => {
$resolve: (val: string | undefined) => {
if (val && !['silent', 'info', 'verbose'].includes(val)) {
consola.warn(`Invalid \`logLevel\` option: \`${val}\`. Must be one of: \`silent\`, \`info\`, \`verbose\`.`)
}
Expand All @@ -71,7 +71,7 @@ export default defineUntypedSchema({
* @type {Array<string | RegExp | ((ctx: { isClient?: boolean; isServer?: boolean; isDev: boolean }) => string | RegExp | false)>}
*/
transpile: {
$resolve: val => [].concat(val).filter(Boolean)
$resolve: (val: Array<string | RegExp | ((ctx: { isClient?: boolean; isServer?: boolean; isDev: boolean }) => string | RegExp | false)> | undefined) => (val || []).filter(Boolean)
},

/**
Expand Down Expand Up @@ -109,8 +109,8 @@ export default defineUntypedSchema({
* @type {boolean | { enabled?: boolean } & ((0 extends 1 & typeof import('webpack-bundle-analyzer').BundleAnalyzerPlugin.Options ? {} : typeof import('webpack-bundle-analyzer').BundleAnalyzerPlugin.Options) | typeof import('rollup-plugin-visualizer').PluginVisualizerOptions)}
*/
analyze: {
$resolve: async (val, get) => {
const [rootDir, analyzeDir] = await Promise.all([get('rootDir'), get('analyzeDir')])
$resolve: async (val: boolean | { enabled?: boolean } | Record<string, unknown>, get) => {
const [rootDir, analyzeDir] = await Promise.all([get('rootDir'), get('analyzeDir')]) as [string, string]
return defu(typeof val === 'boolean' ? { enabled: val } : val, {
template: 'treemap',
projectRoot: rootDir,
Expand All @@ -135,15 +135,16 @@ export default defineUntypedSchema({
* @type {Array<{ name: string, source?: string | RegExp, argumentLength: number }>}
*/
keyedComposables: {
$resolve: val => [
$resolve: (val: Array<{ name: string, argumentLength: string }> | undefined) => [
{ name: 'callOnce', argumentLength: 2 },
{ name: 'defineNuxtComponent', argumentLength: 2 },
{ name: 'useState', argumentLength: 2 },
{ name: 'useFetch', argumentLength: 3 },
{ name: 'useAsyncData', argumentLength: 3 },
{ name: 'useLazyAsyncData', argumentLength: 3 },
{ name: 'useLazyFetch', argumentLength: 3 }
].concat(val).filter(Boolean)
{ name: 'useLazyFetch', argumentLength: 3 },
...val || []
].filter(Boolean)
},

/**
Expand Down
Loading

0 comments on commit 7d65769

Please sign in to comment.