Skip to content

Commit 9f37712

Browse files
committed
chore: update docs
1 parent fb4df28 commit 9f37712

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ docs
6969

7070
#lerna
7171
.changelog
72-
package.json.lerna_backup
7372

7473
# OS generated files
7574
.DS_Store

CONTRIBUTING.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Please also see [GitHub workflow](https://github.com/open-telemetry/community/bl
9696

9797
- [NPM](https://npmjs.com)
9898
- [TypeScript](https://www.typescriptlang.org/)
99-
- [lerna](https://github.com/lerna/lerna) to manage dependencies, compilations, and links between packages. Most lerna commands should be run by calling the provided npm scripts.
99+
- [nx](https://github.com/nrwl/nx) to manage dependencies, compilations, and links between packages. Most nx commands should be run by calling the provided npm scripts.
100100
- [npm workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces)
101101
- [MochaJS](https://mochajs.org/) for tests
102102
- [eslint](https://eslint.org/)
@@ -119,6 +119,29 @@ Some tests depend on other packages to be installed, so these steps are also req
119119

120120
Each of these commands can also be run in individual packages, as long as the initial install and compile are done first in the root directory.
121121

122+
If you're going to work on a single package and want to quickly jump into its development you can make use of the `focus` script. This scritp will run
123+
the necessary tasks to have only that package ready for development saving time. FOr example if you want to work with `@opentelemetry/resource-detector-aws`
124+
run the following command in the root folder
125+
126+
```sh
127+
npm run focus @opentelemetry/resource-detector-aws
128+
129+
130+
> nx run-many -t compile -p @opentelemetry/resource-detector-aws
131+
132+
133+
✔ nx run @opentelemetry/instrumentation-fs:version:update (796ms)
134+
✔ nx run @opentelemetry/contrib-test-utils:compile (3s)
135+
✔ nx run @opentelemetry/instrumentation-fs:compile (3s)
136+
✔ nx run @opentelemetry/resource-detector-aws:compile (3s)
137+
138+
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
139+
140+
> NX Successfully ran target compile for project @opentelemetry/resource-detector-aws and 3 tasks it depends on (7s)
141+
```
142+
143+
Once the command is done you can `cd` into the package and start using the ussual commands.
144+
122145
### CHANGELOG
123146

124147
The conventional commit type (in PR title) is very important to automatically bump versions on release. For instance:

RELEASING.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,14 @@ Create a pull request titled `chore: x.y.z release proposal`. The commit body sh
9090

9191
Merge the PR, and pull the changes locally (using the commands in the first step). Ensure that `chore: x.y.z release proposal` is the most recent commit.
9292

93-
## Publish all packages
93+
## Compile all packages
9494

95-
Go into each directory and use `npm publish` (requires permissions) to publish the package. You can use the following script to automate this.
95+
Go into the root folder and run `npm ci && npm run compile` to build all packages with the latest version of the code.
9696

97-
```bash
98-
#!/bin/bash
97+
## Publish all packages
9998

100-
for dir in $(ls packages); do
101-
pushd packages/$dir
102-
npm publish
103-
popd
104-
done
105-
```
99+
Use the dedicated script for publishing by running the command `node ./scripts/publish-to-npm.mjs` in the root folder. The script will
100+
walk over all non private packages and publish the ones that has not been published yet.
106101

107102
Check your e-mail and make sure the number of “you’ve published this module” emails matches the number you expect.
108103

0 commit comments

Comments
 (0)