Skip to content

Commit 92a53a2

Browse files
rajat1saxenaRajat Saxena
andauthored
Switch to pnpm (#573)
* Replaced yarn with pnpm; with build errors * Everything works except @courselit/web build * ported Dockerfiles * Queue dockerfile fix * Modified release.sh --------- Co-authored-by: Rajat Saxena <hi@rajatsaxena.dev>
1 parent 3ae1c62 commit 92a53a2

File tree

2,000 files changed

+19989
-26651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,000 files changed

+19989
-26651
lines changed

.eslintrc.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
module.exports = {
2-
"env": {
3-
"node": true,
4-
"jest": true
2+
env: {
3+
node: true,
4+
jest: true,
55
},
6-
"plugins": ["unused-imports"],
7-
"rules": {
8-
"no-console": ["error", {"allow": ["warn", "error"]}],
9-
"unused-imports/no-unused-imports": "error"
10-
}
11-
};
6+
plugins: ["unused-imports"],
7+
rules: {
8+
"no-console": ["error", { allow: ["warn", "error"] }],
9+
"unused-imports/no-unused-imports": "error",
10+
"@typescript-eslint/ban-ts-comment": "off",
11+
},
12+
};

.github/workflows/code-quality.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ jobs:
99
- uses: actions/setup-node@v1
1010
with:
1111
node-version: '18.x'
12-
- run: npm install -g yarn@2
13-
- run: yarn install
12+
- uses: pnpm/action-setup@v2
13+
with:
14+
version: 8
15+
- run: pnpm install
1416
- name: Linting and prettifying
1517
run: |
16-
yarn lint
17-
yarn prettier
18+
pnpm lint
19+
pnpm prettier
1820
working-directory: ./

.github/workflows/publish-packages.yaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,34 @@ jobs:
2525
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
2626
git checkout $LATEST_TAG
2727
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: 8
32+
2833
- name: Install Packages
29-
run: yarn install
34+
run: pnpm install
3035

3136
- name: Authenticate with Registry
3237
run: |
33-
yarn npm logout
34-
echo "npmAuthToken: $NPM_TOKEN" >> .yarnrc.yml
35-
yarn npm whoami
38+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
39+
pnpm whoami
3640
env:
3741
NPM_TOKEN: ${{ secrets.NPM }}
3842

3943
- name: Build packages
4044
run: |
41-
yarn workspace @courselit/icons build
42-
yarn workspace @courselit/common-models build
43-
yarn workspace @courselit/utils build
44-
yarn workspace @courselit/text-editor build
45-
yarn workspace @courselit/state-management build
46-
yarn workspace @courselit/components-library build
47-
yarn workspace @courselit/common-widgets build
45+
pnpm --filter @courselit/icons build
46+
pnpm --filter @courselit/common-models build
47+
pnpm --filter @courselit/utils build
48+
pnpm --filter @courselit/text-editor build
49+
pnpm --filter @courselit/state-management build
50+
pnpm --filter @courselit/components-library build
51+
pnpm --filter @courselit/common-widgets build
4852
4953
- name: Publish package
5054
run: |
51-
yarn publish
55+
pnpm publish
5256
env:
5357
GH_TOKEN: ${{ secrets.PAT }}
5458
GITHUB_TOKEN: ${{ secrets.PAT }}

.github/workflows/test.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ jobs:
99
- uses: actions/setup-node@v1
1010
with:
1111
node-version: '23.x'
12-
- run: npm install -g yarn@2
13-
- run: yarn install
12+
- uses: pnpm/action-setup@v2
13+
with:
14+
version: 8
15+
- run: pnpm install
1416
- name: Build packages
1517
run: |
16-
yarn workspace @courselit/icons build
17-
yarn workspace @courselit/common-models build
18-
yarn workspace @courselit/utils build
19-
yarn workspace @courselit/text-editor build
20-
yarn workspace @courselit/state-management build
21-
yarn workspace @courselit/components-library build
22-
yarn workspace @courselit/common-widgets build
18+
pnpm --filter @courselit/icons build
19+
pnpm --filter @courselit/common-models build
20+
pnpm --filter @courselit/utils build
21+
pnpm --filter @courselit/text-editor build
22+
pnpm --filter @courselit/state-management build
23+
pnpm --filter @courselit/components-library build
24+
pnpm --filter @courselit/common-widgets build
2325
- name: Running tests
2426
run: |
25-
yarn test
27+
pnpm test
2628
working-directory: ./

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ logs
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7-
lerna-debug.log*
87

98
# Dependencies
109
node_modules

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn dlx lint-staged
5-
yarn test
4+
pnpm exec lint-staged
5+
pnpm test
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)