You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: update verdaccio config and react native development guide (#2690)
* chore: proxy @bugsnag/cli in verdaccio config
* chore: move verdaccio config to test directory
* chore: update dev instructions in React Native contributing guide
Copy file name to clipboardExpand all lines: packages/react-native/CONTRIBUTING.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,46 +37,43 @@ To solve this problem we publish to a local npm clone, which proxies requests fo
37
37
38
38
#### Prerequisites
39
39
40
-
The proxy of choice is [verdaccio](https://verdaccio.org/):
40
+
The proxy of choice is [verdaccio](https://verdaccio.org/). This is already included as a dev dependency in the bugsnag-js repository, along with a config file at `test/local-npm.config.yml`.
41
41
42
-
```sh
43
-
# install it globally on your system
44
-
npm i -g verdaccio
42
+
To start the verdaccio server, run the `local-npm:start` npm script from the repo root:
45
43
46
-
# starts the on the default port
47
-
verdaccio
48
-
49
-
# log in to the registry
50
-
# (you can enter anything, just be sure to remember them when
51
-
# your session times out and you need to "sign in" again)
52
-
npm adduser --registry http://localhost:4873
53
44
```
45
+
npm run local-npm:start
46
+
```
47
+
48
+
This will start verdaccio running on port `5539`. You will need to keep this running for the following steps.
54
49
55
-
On the project you want to install the development notifier, create an a `.npmrc` file at the project root alongside `package.json`:
50
+
In the project where you want to install the development notifier, create an a `.npmrc` file at the project root alongside `package.json` and set the local registry URL:
56
51
57
52
```
58
-
registry=http://localhost:4873
53
+
registry=http://localhost:5539
59
54
```
60
55
61
-
Alternatively you can just supply the `--registry=http://localhost:4873` to each npm/yarn command you issue.
56
+
Alternatively you can just supply the `--registry=http://localhost:5539` to each npm/yarn command you issue.
62
57
63
-
#### Installing the development notifier on a React Native project
58
+
#### Installing the development notifier in a React Native project
64
59
65
60
1. Make changes.
66
-
2.Run the following command to publish to the local registry:
61
+
2.In a new terminal window, from the repo root, run the `local-npm:publish-all` npm script to publish to the local registry:
VERSION_IDENTIFIER=8.99.99 npm run local-npm:publish-all
70
65
```
71
66
72
-
This should prompt you for each module that has changed since the last proper publish.
67
+
This will publish all of the packages in the repo to verdaccio with the specified version.
68
+
69
+
Note: You'll need to ensure you publish using the same major version as is currently in the repository. This is because some packages declare a peer dependency on `@bugsnag/core`, and lerna does not update peer dependencies when versioning, so changing the major version will mean the packages fail to install (since the peer dependency cannot be resolved from the local registry).
73
70
74
-
4. Reset the changes that were made to `lerna.json` and `package-lock.json`s `git reset --hard HEAD` (we don't want to store these throwaway versions)
71
+
4. Reset the changes that were made to `package.json`, `lerna.json` and `package-lock.json` files with `git reset --hard HEAD` (we don't want to commit these throwaway versions)
75
72
76
-
On the project you want to install `@bugsnag/react-native` substitute the version's output from above:
73
+
In the project where you want to install `@bugsnag/react-native` substitute the version's output from above:
0 commit comments