Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

chore: use pnpm for framework monorepo #7895

Merged
merged 32 commits into from Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1cac124
chore: migrate to pnpm
danielroe Sep 28, 2022
10aed85
fix: set `strict-peer-dependencies=false`
danielroe Sep 28, 2022
cc2cddd
chore: update docs script
danielroe Sep 28, 2022
450f839
fix: use cross-env for windows
danielroe Sep 28, 2022
f5cf116
fix: use pnpm's native shell emulator
danielroe Sep 28, 2022
266bcfc
ci: cache playwright
danielroe Sep 29, 2022
b82efc7
chore: migrate docs to pnpm as well
danielroe Oct 6, 2022
8fddcc8
chore: remove leftover yarn config
danielroe Oct 6, 2022
78ce4a5
chore: add netlify.toml overrides
danielroe Oct 6, 2022
a6e52a8
chore: stub nuxi
danielroe Oct 6, 2022
66ee9bf
chore: force base
danielroe Oct 6, 2022
94d83a6
chore: generate docs
danielroe Oct 6, 2022
9ccbfc6
fix: try explicitly running generate
danielroe Oct 6, 2022
6f8a6aa
chore: tweak netlify config
danielroe Oct 9, 2022
30e0233
fix: update build command
danielroe Oct 9, 2022
899061d
chore: try explicit config
danielroe Oct 9, 2022
81e2a7e
fix: remove preset
danielroe Oct 9, 2022
1a21932
Merge branch 'main' into chore/pnpm
pi0 Oct 16, 2022
9910bcf
keep monorepo versions to latest release
pi0 Oct 16, 2022
26af14d
remove yarn from git
pi0 Oct 16, 2022
cb8509f
update nitro and content-edge
pi0 Oct 16, 2022
4b6550b
try reverting docs back to yarn
pi0 Oct 16, 2022
a54c30c
add build:ci script
pi0 Oct 16, 2022
a8c20e8
build as well!
pi0 Oct 16, 2022
7aa2fa0
remove pm field from docs
pi0 Oct 17, 2022
ca8a8c8
fix docs yarn version
pi0 Oct 17, 2022
93fb8b9
Merge branch 'main' into chore/pnpm
pi0 Oct 17, 2022
275d6b9
fix bump-edge script
pi0 Oct 17, 2022
3a666fc
use local scripts to bump rc (remove lerna)
pi0 Oct 17, 2022
0be165b
chore: update scripts
pi0 Oct 17, 2022
2f742a4
update local development docs
pi0 Oct 17, 2022
86279cb
add leftover script updates
pi0 Oct 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
109 changes: 79 additions & 30 deletions .github/workflows/ci.yml
Expand Up @@ -3,12 +3,12 @@ name: CI
on:
push:
paths-ignore:
- 'docs/**'
- "docs/**"
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- "docs/**"
branches:
- main

Expand All @@ -25,16 +25,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Build
run: yarn build
run: pnpm build

- name: Cache dist
uses: actions/cache@v3
Expand All @@ -54,16 +55,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Lint
run: yarn lint
run: pnpm lint

typecheck:
runs-on: ${{ matrix.os }}
Expand All @@ -77,19 +79,20 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Stub
run: yarn stub
- name: Build (stub)
run: pnpm build:stub

- name: Typecheck
run: yarn typecheck
run: pnpm typecheck

test-fixtures:
runs-on: ${{ matrix.os }}
Expand All @@ -103,25 +106,47 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
# Install playwright's binary under custom directory to cache
- name: Set Playwright path
if: runner.os != 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
- name: Set Playwright path (windows)
if: runner.os == 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV

- name: Cache Playwright's binary
uses: actions/cache@v3
with:
# Playwright removes unused browsers automatically
# So does not need to add playwright version to key
key: ${{ runner.os }}-playwright-bin-v1
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}

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

- name: Stub
run: yarn stub
- name: Build (stub)
run: pnpm build:stub

- name: Test (unit)
run: yarn test:unit
run: pnpm test:unit

- name: Test (fixtures)
run: yarn test:fixtures
run: pnpm test:fixtures

- name: Test (fixtures with dev)
run: yarn test:fixtures:dev
run: pnpm test:fixtures:dev
env:
NODE_OPTIONS: --max-old-space-size=8192

Expand All @@ -137,19 +162,41 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
# Install playwright's binary under custom directory to cache
- name: Set Playwright path (non-windows)
if: runner.os != 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
- name: Set Playwright path (windows)
if: runner.os == 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV

- name: Cache Playwright's binary
uses: actions/cache@v3
with:
# Playwright removes unused browsers automatically
# So does not need to add playwright version to key
key: ${{ runner.os }}-playwright-bin-v1
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}

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

- name: Stub
run: yarn stub
- name: Build (stub)
run: pnpm build:stub

- name: Test (fixtures)
run: yarn test:fixtures:webpack
run: pnpm test:fixtures:webpack

test-types:
needs:
Expand All @@ -165,13 +212,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Restore dist cache
uses: actions/cache@v3
Expand All @@ -180,7 +228,7 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}

- name: Test (types)
run: yarn test:types
run: pnpm test:types

build-release:
if: |
Expand All @@ -205,13 +253,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Restore dist cache
uses: actions/cache@v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs-e2e.yml
Expand Up @@ -19,13 +19,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "yarn"
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- run: node ./scripts/crawl.mjs
env:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/docs.yml
Expand Up @@ -3,14 +3,14 @@ name: Docs
on:
push:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- "docs/**"
- ".github/workflows/docs.yml"
branches:
- main
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- "docs/**"
- ".github/workflows/docs.yml"
branches:
- main

Expand All @@ -25,13 +25,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "pnpm"

- name: Install dependencies
run: yarn --immutable
run: pnpm install

- name: Lint (docs)
run: yarn lint:docs
run: pnpm lint:docs
7 changes: 2 additions & 5 deletions .gitignore
Expand Up @@ -3,7 +3,8 @@ node_modules
jspm_packages

package-lock.json
# */**/yarn.lock
*/**/yarn.lock
/.yarn

# Logs
*.log
Expand All @@ -13,10 +14,6 @@ package-lock.json
.tmp
.cache

# Yarn
**/.yarn/cache
**/.yarn/*state*

# Generated dirs
dist
.nuxt
Expand Down
6 changes: 3 additions & 3 deletions .gitpod.yml
@@ -1,8 +1,8 @@
tasks:
- init: |
npx yarn install
npx yarn stub
command: npx yarn play
npx pnpm install
npx pnpm build:stub
command: npx pnpm play

ports:
- port: 3000
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
@@ -0,0 +1,3 @@
shamefully-hoist=true
strict-peer-dependencies=false
shell-emulator=true
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

801 changes: 0 additions & 801 deletions .yarn/releases/yarn-3.2.4.cjs

This file was deleted.

11 changes: 0 additions & 11 deletions .yarnrc.yml

This file was deleted.

23 changes: 2 additions & 21 deletions README.md
Expand Up @@ -44,28 +44,9 @@ Nuxt's goal is to make web development intuitive and performant with a great dev
</tbody>
</table>

## πŸ’» Development
## Local Development

- Clone repository
- Ensure you have the latest LTS version of Node.js installed
- Install dependencies with `npx yarn install`
- Run `npx yarn stub` to activate passive development
- Open playground with `npx yarn dev`

Learn more about in our documentation on [how to contribute to Nuxt](https://v3.nuxtjs.org/community/contribution).

## πŸ“– Documentation

We are using [Docus](https://nuxtlabs.com/docus) for documentation (*It is planned to be open sourced in the following weeks*).

We recommend to install the [Docus extension](https://marketplace.visualstudio.com/items?itemName=NuxtLabs.docus) for VS Code.

- Run `npx yarn stub` once in the root directory
- Go into the docs directory: `cd docs`
- Install docs dependencies with `npx yarn install`
- Run `npx yarn dev` to start Docus in development mode

The pages are generated from [docs/content/](./docs/content), you can start editing them to start helping us on documenting Nuxt 3 πŸ’š
Follow the docs to [Set Up Your Local Development Environment](https://v3.nuxtjs.org/community/framework-contribution#set-up-your-local-development-environment) to contribute to the framework and documentation.

## License

Expand Down
4 changes: 4 additions & 0 deletions docs/.gitignore
Expand Up @@ -2,3 +2,7 @@ schema
**/*.configuration/nuxt.config.md
**/*.configuration/nuxt-config.md
static/sw.js

.yarn/*
!.yarn/releases
!yarn.lock
2 changes: 2 additions & 0 deletions docs/.yarnrc.yml
@@ -1 +1,3 @@
nmMode: hardlinks-local
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.2.4.cjs