Skip to content

Commit

Permalink
chore: migrate to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstark committed Sep 17, 2024
1 parent 573db0d commit 78cc38e
Show file tree
Hide file tree
Showing 14 changed files with 5,759 additions and 8,871 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.x"
node-version: "20.17.x"
- name: Setup pnpm
uses: pnpm/[email protected]
# Install stuff
- name: Set up yarn scope
run: yarn config set npmAuthToken $NPM_TOKEN
- name: Install Dependencies
run: pnpm install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Dependencies
run: yarn install --immutable
# Do releases
- name: semantic-release
run: |
npm config set workspaces-update false |
yarn release
pnpm release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/run-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache node_modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.x"
node-version: "20.17.x"
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Run Prettier
run: yarn prettier --check .
run: pnpm prettier --check .
20 changes: 5 additions & 15 deletions .github/workflows/run-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache node_modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.x"
node-version: "20.17.x"
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Run Build Command
run: yarn build
run: pnpm build
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
node_modules
yarn-error.log
build
dist
.yarnrc.yml
.swc/

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
**/dist*
**/build*
node_modules
.yarn
.github
.pnp.*
CHANGELOG.md
CHANGELOG.md
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[
"@semantic-release/git",
{
"assets": ["package.json", "yarn.lock", "CHANGELOG.md", "dist"],
"assets": ["package.json", "pnpm-lock.yaml", "CHANGELOG.md", "dist"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
Expand Down
925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.5.0.cjs

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ For automated release notes to work well, try to describe what was added or chan

### Develop

To start a dev server: `yarn dev`, check `public/index.html` for details.
To start a dev server: `pnpm dev`, check `demo` and `public/index.html` for details.

Familiarity with the HTML5 video standard, shaka, hlsjs, or other engines
is recommended before contributing.
Expand All @@ -422,7 +422,7 @@ Tested on OSX, Windows, Linux

Releases are triggered via a github action that will automatically increment the version and write a changelog based on commits.

Manual releases can be made by running `yarn release`.
Manual releases can be made by running `pnpm release`.

# Support

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "webpack --config webpack.prod.cjs && tsc -p tsconfig.json --emitDeclarationOnly",
"pretty": "prettier --write .",
"release": "semantic-release",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"devDependencies": {
"@emotion/react": "11.13.3",
Expand Down Expand Up @@ -51,8 +51,8 @@
"webpack": "5.93.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "^5.0.2",
"webpack-dev-server": "5.0.2",
"webpack-merge": "5.10.0"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]"
}
Loading

0 comments on commit 78cc38e

Please sign in to comment.