Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Go back to pnpm #756

Merged
merged 18 commits into from
Apr 11, 2024
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Build
run: bun turbo build --filter "./packages/*"
run: pnpm turbo build --filter "./packages/*"
- name: Test
run: bun run test
run: pnpm run test

lint:
runs-on: ubuntu-latest
Expand All @@ -46,7 +46,7 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Lint
run: bun run lint
run: pnpm run lint

format:
runs-on: ubuntu-latest
Expand All @@ -60,7 +60,7 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Format
run: bun run format:check
run: pnpm run format:check

typecheck:
runs-on: ubuntu-latest
Expand All @@ -74,5 +74,5 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Typecheck
run: bun run typecheck
run: pnpm run typecheck

4 changes: 2 additions & 2 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Build UT packages
run: bun run build
run: pnpm run build

- name: Run build
run: bun turbo --filter ./examples/${{ matrix.dir }} build
run: pnpm turbo --filter ./examples/${{ matrix.dir }} build
2 changes: 1 addition & 1 deletion .github/workflows/release-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Check packages for common errors
run: bun turbo --filter "./packages/*" build
run: pnpm turbo --filter "./packages/*" build

- name: Bump version to canary
run: node .github/canary-version.js
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: ./tooling/gh-actions/setup

- name: Check packages for common errors
run: bun turbo --filter "./packages/*" build lint test typecheck
run: pnpm turbo --filter "./packages/*" build lint test typecheck

# Using custom token `MY_GITHUB_TOKEN` with more access to avoid rate limiting
- name: Create Release
Expand All @@ -35,6 +35,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Changeset has some issues with pnpm so we sync it up manually
- name: Sync lockfile if necessary
if: steps.changeset.outputs.hasChangesets == 'true'
run: |
git checkout changeset-release/main
pnpm install --no-frozen-lockfile
git add .
git commit -m "chore(release): 📦 sync lockfile"
git push origin changeset-release/main

- name: Send a discord notification
if: steps.changeset.outputs.published == 'true'
uses: actions/github-script@v7
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ yarn-error.log*
# turbo
.turbo

dist
.solid
.vercel

# cf
.wrangler
.dev.vars
Expand All @@ -53,4 +49,8 @@ packages/*/*/
!packages/*/src/
!packages/*/test/

dist

.svelte-kit
.solid
.vercel
7 changes: 7 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Prevent pnpm from adding the "workspace:"" prefix to local
# packages as it casues issues with manypkg
# @link https://pnpm.io/npmrc#prefer-workspace-packages
save-workspace-protocol=false
prefer-workspace-packages=true

engine-strict=true
7 changes: 4 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ coverage
**/next-env.d.ts
out/
build
dist

.DS_Store
*.pem
Expand All @@ -21,9 +22,9 @@ yarn-error.log*

.turbo

dist
.solid

CHANGELOG.md

.svelte-kit
.solid

pnpm-lock.yaml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ community.

1. Fork and clone the repository
2. Ensure you have the LTS version of Node.js installed, as well as the latest
version of [Bun](https://bun.sh).
3. Install the project dependencies by running `bun install`.
version of [pnpm](https://pnpm.io).
3. Install the project dependencies by running `pnpm install`.
4. Implement your changes, as well as any documentation or tests that are
required.
5. Create a changeset for your changes by running `bun changeset`.
5. Create a changeset for your changes by running `pnpm changeset`.
6. Open a pull request with your changes and changeset.
Binary file removed bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"dependencies": {
"@radix-ui/react-accordion": "^1.1.2",
"@scalar/api-reference-react": "0.0.4",
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "workspace:*",
"next": "14.1.0",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0"
"uploadthing": "workspace:*"
},
"devDependencies": {
"@types/react": "18.2.60",
Expand Down
4 changes: 2 additions & 2 deletions examples/backend-adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ that are included here are:
- [H3](./server/src/h3.ts)

You can start the Vite frontend as well as any of your preferred server using
the `bun dev:<your-server>` command. The Vite app will then be available on
the `pnpm dev:<your-server>` command. The Vite app will then be available on
`http://localhost:5173` and the server at `http://localhost:3000`.

## QuickStart
Expand All @@ -24,7 +24,7 @@ the `bun dev:<your-server>` command. The Vite app will then be available on
https://uploadthing.com/dashboard
2. `cp server/.env.example server/.env` and paste in your API key in the newly
created `.env` file
3. `bun dev:<server>`, e.g. `bun dev:hono`
3. `pnpm dev:<server>`, e.g. `pnpm dev:hono`
4. Go to [http://localhost:3000](http://localhost:3000) and upload files!

## Further reference
Expand Down
4 changes: 2 additions & 2 deletions examples/backend-adapters/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"start": "vite preview"
},
"dependencies": {
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@types/react": "18.2.60",
Expand Down
20 changes: 10 additions & 10 deletions examples/backend-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
],
"scripts": {
"clean": "git clean -xdf node_modules client/node_modules client/dist server/node_modules server/dist",
"dev:cf": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:cf\"",
"dev:elysia": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:elysia\"",
"dev:express": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:express\"",
"dev:fastify": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:fastify\"",
"dev:hono": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:hono\"",
"dev:h3": "concurrently \"bun --cwd client dev\" \"bun --cwd server dev:h3\"",
"build": "bun --cwd client build && bun --cwd server build",
"start": "concurrently \"bun --cwd client start\" \"bun --cwd server start\"",
"dev:cf": "concurrently \"npm run -w client dev\" \"npm run -w server dev:cf\"",
"dev:elysia": "concurrently \"npm run -w client dev\" \"npm run -w server dev:elysia\"",
"dev:express": "concurrently \"npm run -w client dev\" \"npm run -w server dev:express\"",
"dev:fastify": "concurrently \"npm run -w client dev\" \"npm run -w server dev:fastify\"",
"dev:hono": "concurrently \"npm run -w client dev\" \"npm run -w server dev:hono\"",
"dev:h3": "concurrently \"npm run -w client dev\" \"npm run -w server dev:h3\"",
"build": "npm run -w client build && npm run -w server build",
"start": "concurrently \"npm run -w client start\" \"npm run -w server start\"",
"test": "playwright test"
},
"dependencies": {
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"concurrently": "^8.2.2",
"typescript": "^5.4.2",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@playwright/test": "1.42.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/backend-adapters/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
},
webServer: [
{
command: "bun dev:hono",
command: "pnpm dev:hono",
url: "http://localhost:3000/api",
reuseExistingServer: !process.env.CI,
stdout: "pipe",
Expand Down
2 changes: 1 addition & 1 deletion examples/backend-adapters/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"h3": "^1.11.1",
"hono": "^4.0.8",
"listhen": "^1.7.2",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240222.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-appdir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
https://uploadthing.com/dashboard
2. `cp .env.example .env` and paste in your API key in the newly created `.env`
file
3. `bun dev`
3. `pnpm i && pnpm dev`
4. Upload files!

## Further reference
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-appdir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@types/node": "^20.11.21",
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-astro-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"dependencies": {
"@astrojs/node": "^8.2.1",
"@astrojs/react": "^3.0.10",
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"astro": "^4.4.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@types/react": "18.2.60",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-pagedir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
https://uploadthing.com/dashboard
2. `cp .env.example .env` and paste in your API key in the newly created `.env`
file
3. `bun dev`
3. `pnpm i && pnpm dev`
4. Upload files!

## Further reference
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-pagedir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0"
"uploadthing": "6.9.0"
},
"devDependencies": {
"@types/node": "^20.11.21",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-solidstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
https://uploadthing.com/dashboard
2. `cp .env.example .env` and paste in your API key in the newly created `.env`
file
3. `bun dev`
3. `pnpm i && pnpm dev`
4. Upload files!

## Further reference
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-solidstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"@solidjs/meta": "^0.29.3",
"@solidjs/router": "^0.12.4",
"@solidjs/start": "^0.6.0",
"@uploadthing/solid": "workspace:6.3.4",
"@uploadthing/solid": "6.3.4",
"solid-js": "^1.8.15",
"uploadthing": "workspace:6.9.0",
"uploadthing": "6.9.0",
"vinxi": "0.3.4"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions examples/minimal-sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
},
"dependencies": {
"@fontsource-variable/inter": "^5.0.17",
"@uploadthing/svelte": "workspace:6.4.1",
"uploadthing": "workspace:6.9.0"
"@uploadthing/svelte": "6.4.1",
"uploadthing": "6.9.0"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.1.1",
"@sveltejs/kit": "^2.5.4",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"svelte": "^4.2.12",
"svelte-check": "^3.6.7",
"tslib": "^2.6.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-clerk-appdir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
https://clerk.com/docs/quickstarts/nextjs#set-environment-keys
3. `cp .env.example .env` and paste in your API keys in the newly created `.env`
file
4. `bun dev`
4. `pnpm i && pnpm dev`
5. Try to upload files without being signed in
6. Sign in and try again

Expand Down
4 changes: 2 additions & 2 deletions examples/with-clerk-appdir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"dependencies": {
"@clerk/nextjs": "^4.29.8",
"@t3-oss/env-nextjs": "^0.9.2",
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0",
"uploadthing": "6.9.0",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-clerk-pagesdir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
https://clerk.com/docs/quickstarts/nextjs#set-environment-keys
3. `cp .env.example .env` and paste in your API keys in the newly created `.env`
file
4. `bun dev`
4. `pnpm i && pnpm dev`
5. Try to upload files without being signed in
6. Sign in and try again

Expand Down
4 changes: 2 additions & 2 deletions examples/with-clerk-pagesdir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"dependencies": {
"@clerk/nextjs": "^4.29.8",
"@t3-oss/env-nextjs": "^0.9.2",
"@uploadthing/react": "workspace:6.4.4",
"@uploadthing/react": "6.4.4",
"next": "14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"uploadthing": "workspace:6.9.0",
"uploadthing": "6.9.0",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-drizzle-appdir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
https://uploadthing.com/dashboard
2. `cp .env.example .env` and paste in your API key in the newly created `.env`
file
3. `bun dev`
3. `pnpm i && pnpm dev`
4. Upload files!

## Further reference
Expand Down
Loading
Loading