Skip to content

Commit 3575982

Browse files
authored
chore: pnpm support (#199)
* feat: initial pnpm support * feat: lock files * fix: github actions * fix: lerna bootstrap * fix: lerna useWorkspaces * fix: lerna no ci * fix: lint * fix: audit * chore: changeset * fix: publish action
1 parent d6942dc commit 3575982

Some content is hidden

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

52 files changed

+20359
-4916
lines changed

.changeset/unlucky-wombats-jump.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@bbob/plugin-helper": minor
3+
"@bbob/preset-html5": minor
4+
"@bbob/preset-react": minor
5+
"@bbob/preset-vue": minor
6+
"vue2-example": minor
7+
"@bbob/parser": minor
8+
"@bbob/preset": minor
9+
"@bbob/react": minor
10+
"@bbob/core": minor
11+
"@bbob/html": minor
12+
"@bbob/vue2": minor
13+
"@bbob/vue3": minor
14+
"@bbob/cli": minor
15+
---
16+
17+
All build processes and CI actions now using PNPM as default Package Manager

.github/workflows/benchmark.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,27 @@ jobs:
1818
node-version-file: '.nvmrc'
1919
cache: 'npm'
2020

21+
- name: Install PNPM
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 8
25+
run_install: false
26+
27+
- name: Get pnpm store directory
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
32+
- uses: actions/cache@v3
33+
name: Setup pnpm cache
34+
with:
35+
path: ${{ env.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
2140
- name: Install dependencies
22-
run: npm ci
41+
run: pnpm install --frozen-lockfile
2342

2443
- name: Bootstrap dependencies
2544
run: npm run build && npm run bootstrap

.github/workflows/publish.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,27 @@ jobs:
2323
node-version-file: '.nvmrc'
2424
cache: 'npm'
2525

26-
- name: Install Dependencies
27-
run: npm ci
26+
- name: Install PNPM
27+
uses: pnpm/action-setup@v2
28+
with:
29+
version: 8
30+
run_install: false
31+
32+
- name: Get pnpm store directory
33+
shell: bash
34+
run: |
35+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36+
37+
- uses: actions/cache@v3
38+
name: Setup pnpm cache
39+
with:
40+
path: ${{ env.STORE_PATH }}
41+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
restore-keys: |
43+
${{ runner.os }}-pnpm-store-
44+
45+
- name: Install dependencies
46+
run: pnpm install --frozen-lockfile
2847

2948
- name: Create Release Pull Request or Publish to npm
3049
id: changesets

.github/workflows/test.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,30 @@ jobs:
2222
node-version: ${{ matrix.node-version }}
2323
cache: 'npm'
2424

25-
- name: Install Codecov
26-
run: npm install -g codecov
25+
- name: Install PNPM ${{ matrix.node-version }}
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: 8
29+
run_install: false
30+
31+
- name: Get pnpm store directory ${{ matrix.node-version }}
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
36+
- uses: actions/cache@v3
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ env.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ matrix.node-version }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-${{ matrix.node-version }}
2743
2844
- name: Install dependencies
29-
run: npm ci
45+
run: pnpm install --frozen-lockfile
46+
47+
- name: Install Codecov
48+
run: pnpm install --global codecov
3049

3150
- name: Bootstrap packages
3251
run: npm run bootstrap

benchmark/package-lock.json

Lines changed: 0 additions & 89 deletions
This file was deleted.

benchmark/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
"url": "https://artkost.ru/"
1414
},
1515
"dependencies": {
16-
"@bbob/parser": "3.0.2",
16+
"@bbob/parser": "workspace:*",
1717
"benchmark": "2.1.4",
1818
"picocolors": "1.0.0",
1919
"xbbcode-parser": "0.1.2",
2020
"ya-bbcode": "1.0.12"
21-
},
22-
"version": null
21+
}
2322
}

benchmark/pnpm-lock.yaml

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)