Skip to content

Commit e2afeba

Browse files
chore: use strict package manager version (#227)
* fix: use strict pacakge manager version * fix: update package manager also in CI actions * update script and instructions * use 10.11 --------- Co-authored-by: Michał Pierzchała <[email protected]>
1 parent a4e72c8 commit e2afeba

File tree

5 files changed

+8
-15
lines changed

5 files changed

+8
-15
lines changed

.github/actions/setup-node/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- uses: pnpm/action-setup@v4
88
with:
9-
version: 10.2.1
9+
version: 10.11.0
1010

1111
# Cache node_modules
1212
- uses: actions/setup-node@v4
@@ -16,5 +16,5 @@ runs:
1616

1717
- run: pnpm install --frozen-lockfile
1818
shell: bash
19-
19+
2020
- uses: nrwl/nx-set-shas@v4

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
link-workspace-packages=true
22
auto-install-peers=true
3+
package-manager-strict=true
4+
package-manager-strict-version=true

CONTRIBUTING.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,11 @@ cd /path/to/cloned/rnef/
2424
pnpm link-packages
2525
```
2626

27-
And then in your test project:
27+
And then in your test project link dependencies you're using, e.g.:
2828

2929
```sh
3030
cd /my/test/project/
31-
pnpm link --global "@rnef/cli" "@rnef/config" "@rnef/tools" "@rnef/platform-android" "@rnef/platform-ios" "@rnef/platform-apple-helpers" "@rnef/create-app" "@rnef/plugin-metro" "@rnef/plugin-repack" "@rnef/plugin-brownfield-ios"
32-
```
33-
34-
Update entries in package.json to look like this:
35-
36-
```json
37-
{
38-
"@rnef/cli": "link:../../rnef/packages/cli",
39-
"@rnef/platform-android": "link:../../rnef/packages/platform-android"
40-
}
31+
pnpm link @rnef/cli @rnef/platform-android @rnef/platform-ios @rnef/plugin-metro
4132
```
4233

4334
#### Hoist pnpm dependencies

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
"nx": {
6060
"includedScripts": []
6161
},
62-
"packageManager": "pnpm@10.2.1"
62+
"packageManager": "pnpm@10.11.0"
6363
}

scripts/linkPackages.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ const pm = pmArg.replace('--', '');
99
for (const project of projects) {
1010
const cwd = path.dirname(project);
1111
console.log(`Running "${pm} link" in ${cwd}`);
12-
await spawn(pm, ['link', '--global'], { cwd, stdio: 'inherit' });
12+
await spawn(pm, ['link'], { cwd, stdio: 'inherit' });
1313
}

0 commit comments

Comments
 (0)