Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18
node-version: 22
cache: pnpm
- run: pnpm install
- name: Fix lint issues

- name: πŸ“¦ Install dependencies
run: pnpm install

- name: πŸ”  Lint project (+ fix)
run: pnpm run lint:fix

- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
25 changes: 18 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,22 @@ jobs:
with:
node-version: 18
cache: pnpm
- run: pnpm install
- run: pnpm test:types
- run: pnpm build
- run: pnpm test:dist
- run: pnpm test:unit

- name: πŸ“¦ Install dependencies
run: pnpm install

- name: πŸ’ͺ Test types
run: pnpm test:types

- name: πŸ›  Build project
run: pnpm build

- name: πŸ§ͺ Test built `nuxi`
run: pnpm test:dist

- name: πŸ§ͺ Test (unit)
run: pnpm test:unit

- if: matrix.os != 'windows-latest'
uses: codecov/codecov-action@v5

Expand All @@ -78,9 +89,9 @@ jobs:

- name: πŸ“¦ release pkg.pr.new
if: github.event_name != 'push'
run: pnpm pkg-pr-new publish --compact --template './playground'
run: pnpm pkg-pr-new publish --compact --template './playground' ./packages/create-nuxt-app ./packages/nuxi ./packages/nuxt-cli

- name: πŸ“¦ release nuxi-nightly
- name: πŸ“¦ release nightly
if: github.event_name == 'push'
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc &&
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: corepack enable
- uses: actions/setup-node@v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18
node-version: 22
cache: pnpm
- run: pnpm install
- run: pnpm build
- name: Upload stats.json

- name: πŸ“¦ Install dependencies
run: pnpm install

- name: πŸ›  Build project
run: pnpm build

- name: ⏫ Upload stats.json
uses: actions/upload-artifact@v4
with:
name: head-stats
path: ./stats.json
path: ./packages/*/stats.json

# Build base for comparison and upload stats.json
# You may replace this with your own build method. All that
Expand All @@ -45,28 +50,38 @@ jobs:
with:
ref: ${{ github.base_ref }}
- run: corepack enable
- uses: actions/setup-node@v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18
node-version: 22
cache: pnpm
- run: pnpm install
- run: pnpm build
- name: Upload stats.json

- name: πŸ“¦ Install dependencies
run: pnpm install

- name: πŸ›  Build project
run: pnpm build

- name: ⏫ Upload stats.json
uses: actions/upload-artifact@v4
with:
name: base-stats
path: ./stats.json
path: ./packages/*/stats.json

# run the action against the stats.json files
compare:
runs-on: ubuntu-latest
needs: [build-base, build-head]
permissions:
pull-requests: write
strategy:
matrix:
package: [nuxi, nuxt-cli, create-nuxt-app]
steps:
- uses: actions/download-artifact@v4
- name: ⏬ Download stats.json
uses: actions/download-artifact@v4
- uses: twk3/rollup-size-compare-action@v1.1.2
with:
title: ${{ matrix.package }} size comparison
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head-stats/stats.json
base-stats-json-path: ./base-stats/stats.json
current-stats-json-path: ./head-stats/${{ matrix.package }}/stats.json
base-stats-json-path: ./base-stats/${{ matrix.package }}/stats.json
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .nuxtrc

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default createConfigForNuxt({
},
dirs: {
src: [
'./playground',
'./packages/nuxi/playground',
],
},
}, antfu()).append({
Expand All @@ -21,7 +21,7 @@ export default createConfigForNuxt({
'style/indent-binary-ops': 'off',
},
}, {
files: ['playground/**'],
files: ['packages/nuxt-cli/playground/**'],
rules: {
'no-console': 'off',
},
Expand Down
32 changes: 30 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"workspaces": {
"playground": {
".": {
"ignoreDependencies": [
"vue"
]
},
"packages/nuxt-cli/playground": {
"ignoreDependencies": [
"nuxi",
"nuxt"
]
},
"packages/nuxt-cli": {
"ignoreDependencies": [
"c12",
"chokidar",
"clipboardy",
"consola",
"defu",
"fuse.js",
"giget",
"h3",
"httpxy",
"jiti",
"listhen",
"nypm",
"ofetch",
"ohash",
"pathe",
"perfect-debounce",
"pkg-types",
"scule",
"semver",
"ufo"
]
}
}
}
78 changes: 14 additions & 64 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,45 @@
{
"name": "nuxi",
"name": "nuxi-workspace",
"type": "module",
"version": "3.20.0",
"private": true,
"packageManager": "pnpm@9.15.4",
"description": "⚑️ Nuxt Generation CLI Experience",
"license": "MIT",
"repository": "nuxt/cli",
"exports": {
".": "./dist/index.mjs",
"./cli": "./bin/nuxi.mjs"
},
"types": "./dist/index.d.ts",
"bin": {
"nuxi": "./bin/nuxi.mjs",
"nuxi-ng": "./bin/nuxi.mjs",
"nuxt": "./bin/nuxi.mjs",
"nuxt-cli": "./bin/nuxi.mjs"
},
"files": [
"bin",
"dist"
],
"engines": {
"node": "^16.10.0 || >=18.0.0"
},
"scripts": {
"dev:prepare": "unbuild --stub",
"build": "unbuild",
"build:stub": "unbuild --stub",
"dev": "node ./bin/nuxi.mjs dev ./playground",
"dev:bun": "bun --bun ./bin/nuxi.mjs dev ./playground",
"dev:prepare": "pnpm -r dev:prepare",
"build": "pnpm -r build",
"build:stub": "pnpm -r dev:prepare",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"nuxi": "node ./bin/nuxi.mjs",
"nuxi-bun": "bun --bun ./bin/nuxi.mjs",
"prepack": "unbuild",
"prepack": "pnpm -r build",
"release": "pnpm test && changelogen --release && node ./scripts/release.mjs && git push --follow-tags",
"test": "pnpm lint && pnpm test:types && pnpm build && pnpm test:dist",
"test:dist": "node ./bin/nuxi.mjs info ./playground",
"test:types": "tsc --noEmit",
"test:knip": "knip",
"test:dist": "pnpm -r test:dist",
"test:unit": "vitest --coverage"
},
"dependencies": {
"c12": "^2.0.1",
"chokidar": "^4.0.3",
"citty": "^0.1.6",
"clipboardy": "^4.0.0",
"consola": "^3.4.0",
"defu": "^6.1.4",
"fuse.js": "^7.0.0",
"giget": "^1.2.3",
"h3": "^1.13.1",
"httpxy": "^0.1.6",
"jiti": "^2.4.2",
"listhen": "^1.9.0",
"nypm": "^0.4.1",
"ofetch": "^1.4.1",
"ohash": "^1.1.4",
"pathe": "^2.0.1",
"perfect-debounce": "^1.0.0",
"pkg-types": "^1.3.1",
"scule": "^1.3.0",
"semver": "^7.6.3",
"std-env": "^3.8.0",
"tinyexec": "^0.3.2",
"ufo": "^1.5.4"
},
"devDependencies": {
"@antfu/eslint-config": "^3.14.0",
"@nuxt/eslint-config": "^0.7.5",
"@nuxt/kit": "^3.15.2",
"@nuxt/schema": "^3.15.2",
"@nuxt/test-utils": "^3.15.4",
"@types/node": "^22.10.7",
"@types/semver": "^7.5.8",
"@vitest/coverage-v8": "^2.1.8",
"changelogen": "^0.5.7",
"eslint": "^9.18.0",
"knip": "^5.42.1",
"magicast": "^0.3.5",
"nitropack": "npm:nitropack-nightly",
"pkg-pr-new": "^0.0.39",
"rollup": "^4.30.1",
"rollup-plugin-visualizer": "^5.14.0",
"std-env": "^3.8.0",
"tinyexec": "^0.3.2",
"typescript": "^5.7.3",
"unbuild": "^3.3.1",
"unplugin-purge-polyfills": "^0.0.7",
"vitest": "^2.1.8"
"vitest": "^2.1.8",
"vue": "^3.5.13"
},
"resolutions": {
"@nuxt/cli": "workspace:*",
"@nuxt/schema": "3.15.2",
"create-nuxt-app": "workspace:*",
"h3": "^1.13.1",
"nitropack": "npm:nitropack-nightly",
"nuxi": "workspace:*"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import { defineBuildConfig } from 'unbuild'
import { purgePolyfills } from 'unplugin-purge-polyfills'

const isAnalysingSize = process.env.BUNDLE_SIZE === 'true'
const distribution = process.env.DISTRIBUTION ?? 'nuxi'

export default defineBuildConfig({
declaration: !isAnalysingSize,
failOnWarn: !isAnalysingSize,
hooks: {
'rollup:options': function (ctx, options) {
ctx.options.rollup.dts.respectExternal = false

const plugins = (options.plugins ||= []) as InputPluginOption[]
plugins.push(purgePolyfills.rollup({ logLevel: 'verbose' }))
if (isAnalysingSize) {
Expand All @@ -22,7 +19,10 @@ export default defineBuildConfig({
},
},
rollup: {
inlineDependencies: distribution === 'nuxi',
dts: {
respectExternal: false,
},
inlineDependencies: true,
resolve: {
exportConditions: ['production', 'node'],
},
Expand Down
43 changes: 43 additions & 0 deletions packages/create-nuxt-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "create-nuxt-app",
"type": "module",
"version": "6.0.0",
"description": "Create a Nuxt app in seconds",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt/cli.git",
"directory": "packages/create-nuxt-app"
},
"exports": {
".": "./dist/index.mjs",
"./cli": "./bin/create-nuxt-app.mjs"
},
"types": "./dist/index.d.ts",
"bin": {
"create-nuxt-app": "./bin/create-nuxt-app.mjs"
},
"files": [
"bin",
"dist"
],
"engines": {
"node": "^16.10.0 || >=18.0.0"
},
"scripts": {
"dev:prepare": "unbuild --stub",
"build": "unbuild",
"prepack": "unbuild"
},
"dependencies": {
"citty": "^0.1.6"
},
"devDependencies": {
"@types/node": "^22.10.5",
"rollup": "^4.30.1",
"rollup-plugin-visualizer": "^5.14.0",
"typescript": "^5.7.3",
"unbuild": "^3.3.0",
"unplugin-purge-polyfills": "^0.0.7"
}
}
File renamed without changes.
Loading
Loading