Skip to content

Commit

Permalink
Get rid of rush and move to pnpm (#2775)
Browse files Browse the repository at this point in the history
Remove the opinionated (wrongly so most of the time) middleman that
brings more config pain than value.

Things to check:
- [x] Parallel build performance vs rush
- [ ] Publishing with submodule
- [x] Changesets
  • Loading branch information
timotheeguerin authored Jan 24, 2024
1 parent e542ce8 commit 842405e
Show file tree
Hide file tree
Showing 51 changed files with 2,381 additions and 2,226 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [["@typespec/*"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 2 additions & 0 deletions .changeset/neat-ducks-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
32 changes: 32 additions & 0 deletions .github/workflows/consistency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Consistency

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch: {}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-changes:
name: Check Changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 ## Needed for Changesets to find `main` branch

- run: git pull --force --no-tags origin main:main
name: Get main ref

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- run: npx -p @changesets/cli changeset status --since=main
name: Check changelog
if: ${{ !startsWith(github.head_ref, 'publish/') && !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'backmerge/') }}
6 changes: 4 additions & 2 deletions .github/workflows/website-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2

- name: Install dependencies
run: node common/scripts/install-run-rush.js install --max-install-attempts 3
run: pnpm install

- name: Build
run: node common/scripts/install-run-rush.js build --to @typespec/website -v
run: pnpm run build --to @typespec/website -v
env:
# Only when deploying to microsoft.github.io/typespec. For typespec.io use the default value.
# TYPESPEC_WEBSITE_BASE_PATH: "/typespec/"
Expand Down
File renamed without changes.
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
common/temp/
common/scripts/
common/changes/
common/config/rush/pnpm-lock.yaml

# Pnpm lock file
pnpm-lock.yaml

# Emu spec file, formatting is wrong
packages/spec/src/spec.emu.html

# Coverage report directory
**/coverage/
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tabWidth": 2,
"plugins": [
"./packages/prettier-plugin-typespec/dist/index.js",
"./packages/compiler/node_modules/prettier-plugin-organize-imports/index.js"
"./node_modules/prettier-plugin-organize-imports/index.js"
],
"overrides": [
{
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
"pnpm-config.json": "jsonc",
"version-policies.json": "jsonc"
},
"typescript.tsdk": "./packages/compiler/node_modules/typescript/lib",
"typescript.tsdk": "./node_modules/typescript/lib",
"git.ignoreLimitWarning": true,
"vitest.enable": true,
"vitest.commandLine": "node ./packages/compiler/node_modules/vitest/vitest.mjs",
"prettier.prettierPath": "./packages/compiler/node_modules/prettier/index.cjs",
"vitest.commandLine": "node ./node_modules/vitest/vitest.mjs",
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"prettier.documentSelectors": ["**/*.tsp"],
"testExplorer.errorDecoration": false,
"typespec.tsp-server.path": "${workspaceFolder}/packages/compiler"
Expand Down
25 changes: 0 additions & 25 deletions common/config/rush/.npmrc-publish

This file was deleted.

37 changes: 0 additions & 37 deletions common/config/rush/.pnpmfile.cjs

This file was deleted.

220 changes: 0 additions & 220 deletions common/config/rush/command-line.json

This file was deleted.

Loading

0 comments on commit 842405e

Please sign in to comment.