Skip to content

Commit 01f6aa3

Browse files
authored
build: migrate repo to use pnpm as the package manager (#10607)
* build: migrate repo to use `pnpm` as the pacakge manager * corepack enable * update lock file * format files * format .github * fix audit js * wrap in quotes * --frozen-lockfile * simplify packageManager field * lockfile * remove cache from audit workflow
1 parent 9e89193 commit 01f6aa3

File tree

75 files changed

+5692
-5360
lines changed

Some content is hidden

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

75 files changed

+5692
-5360
lines changed

.changes/config.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@
8181
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
8282
"prepublish": [
8383
{
84-
"command": "yarn",
84+
"command": "pnpm i --frozen-lockfile",
8585
"dryRunCommand": true
8686
},
8787
{
88-
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
88+
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
8989
"dryRunCommand": true,
9090
"pipe": true
9191
},
9292
{
93-
"command": "yarn audit",
93+
"command": "pnpm audit",
9494
"dryRunCommand": true,
9595
"runFromRoot": true,
9696
"pipe": true
@@ -108,12 +108,12 @@
108108
"publish": [
109109
"sleep 15s",
110110
{
111-
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
111+
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
112112
"dryRunCommand": true,
113113
"pipe": true
114114
},
115115
{
116-
"command": "yarn publish --access public --loglevel silly --tag next --provenance",
116+
"command": "pnpm publish --access public --loglevel silly --tag next --provenance",
117117
"dryRunCommand": "npm publish --dry-run --access public --provenance",
118118
"pipe": true
119119
},
@@ -142,16 +142,16 @@
142142
],
143143
"prepublish": [
144144
{
145-
"command": "yarn",
145+
"command": "pnpm",
146146
"dryRunCommand": true
147147
},
148148
{
149-
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
149+
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
150150
"dryRunCommand": true,
151151
"pipe": true
152152
},
153153
{
154-
"command": "yarn audit",
154+
"command": "pnpm audit",
155155
"dryRunCommand": true,
156156
"runFromRoot": true,
157157
"pipe": true
@@ -162,18 +162,18 @@
162162
"pipe": true
163163
},
164164
{
165-
"command": "yarn npm-pack",
165+
"command": "pnpm npm-pack",
166166
"dryRunCommand": true
167167
}
168168
],
169169
"publish": [
170170
{
171-
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
171+
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
172172
"dryRunCommand": true,
173173
"pipe": true
174174
},
175175
{
176-
"command": "yarn npm-publish",
176+
"command": "pnpm npm-publish",
177177
"dryRunCommand": true,
178178
"pipe": true
179179
},

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo
2424

2525
### A note on filesystem performance
2626

27-
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
27+
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `pnpm install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
2828

2929
To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).
3030

.github/CODE_OF_CONDUCT.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
1817
Examples of behavior that contributes to a positive environment for our
1918
community include:
2019

21-
* Demonstrating empathy and kindness toward other people
22-
* Being respectful of differing opinions, viewpoints, and experiences
23-
* Giving and gracefully accepting constructive feedback
24-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2524
and learning from the experience
26-
* Focusing on what is best not just for us as individuals, but for the overall
25+
- Focusing on what is best not just for us as individuals, but for the overall
2726
community
2827

2928
Examples of unacceptable behavior include:
3029

31-
* The use of sexualized language or imagery, and sexual attention or advances of
30+
- The use of sexualized language or imagery, and sexual attention or advances of
3231
any kind
33-
* Trolling, insulting or derogatory comments, and personal or political attacks
34-
* Public or private harassment
35-
* Publishing others' private information, such as a physical or email address,
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
3635
without their explicit permission
37-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3837
professional setting
3938

4039
## Enforcement Responsibilities
@@ -130,4 +129,4 @@ For answers to common questions about this code of conduct, see the FAQ at
130129
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131130
[Mozilla CoC]: https://github.com/mozilla/diversity
132131
[FAQ]: https://www.contributor-covenant.org/faq
133-
[translations]: https://www.contributor-covenant.org/translations
132+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
4848

4949
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
5050

51-
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
51+
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
5252

5353
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
5454

@@ -78,7 +78,7 @@ $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
7878

7979
### Developing the JS API
8080

81-
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `yarn build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
81+
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
8282

8383
## Financial Contribution
8484

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ body:
4545
id: info
4646
attributes:
4747
label: Full `tauri info` output
48-
description: "Output of `npm run tauri info` or `cargo tauri info`"
48+
description: 'Output of `npm run tauri info` or `cargo tauri info`'
4949
render: text
5050
validations:
5151
required: true
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: 📚 Docs Report
33
about: Create a report to help us improve the docs
4-
title: "[docs] "
4+
title: '[docs] '
55
labels: 'type: documentation'
66
assignees: ''
7-
87
---

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ body:
2222
attributes:
2323
label: "Describe the solution you'd like"
2424
description: A clear description of what change you would like
25-
placeholder: "I would like to..."
25+
placeholder: 'I would like to...'
2626
validations:
2727
required: true
2828

@@ -31,7 +31,7 @@ body:
3131
attributes:
3232
label: Alternatives considered
3333
description: "Any alternative solutions you've considered"
34-
34+
3535
- type: textarea
3636
id: context
3737
attributes:

.github/workflows/audit.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- '**/Cargo.lock'
1515
- '**/Cargo.toml'
1616
- '**/package.json'
17-
- '**/yarn.lock'
17+
- '**/pnpm-lock.yaml'
1818

1919
concurrency:
2020
group: ${{ github.workflow }}-${{ github.ref }}
@@ -34,11 +34,8 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v4
37-
- name: audit workspace
38-
run: yarn audit
39-
- name: audit @tauri-apps/api
40-
working-directory: tooling/api
41-
run: yarn audit
42-
- name: audit @tauri-apps/cli
43-
working-directory: tooling/cli/node
44-
run: yarn audit
37+
- run: corepack enable
38+
- uses: actions/setup-node@v4
39+
with:
40+
node-version: '18'
41+
- run: pnpm audit

.github/workflows/check-generated-files.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- 'core/tauri-config-schema/schema.json'
4040
- 'core/tauri-acl-schema/*.json'
4141
42-
4342
api:
4443
runs-on: ubuntu-latest
4544
needs: changes
@@ -49,7 +48,7 @@ jobs:
4948

5049
- name: build api
5150
working-directory: tooling/api
52-
run: yarn && yarn build
51+
run: pnpm i --frozen-lockfile && pnpm build
5352
- name: check api
5453
run: ./.scripts/ci/has-diff.sh
5554

.github/workflows/covector-comment-on-fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
uses: jbolda/covector/packages/action@covector-v0
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
30-
command: "status"
30+
command: 'status'

0 commit comments

Comments
 (0)