Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add documentation for publishing new packages #236

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions docs/CodingGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ Guidelines that code authors and code reviewers are expected to adhere to in the

## Table of contents

- [Components](#components)
- [Code Style](#code-style)
- [Documentation](#documentation)
- [Pull Requests](#pull-requests)
- [Tests](#tests)
- [Coding guidelines](#coding-guidelines)
- [Table of contents](#table-of-contents)
- [Components](#components)
- [Code style](#code-style)
- [Documentation](#documentation)
- [Pull requests](#pull-requests)
- [Tests](#tests)
- [Packages](#packages)

---

Expand Down Expand Up @@ -214,4 +217,16 @@ Guidelines that code authors and code reviewers are expected to adhere to in the
it(“button dispatches onClick event”)
```

- Tests should, at minimum, cover all core feature use-cases and identifiable edge-cases or boundary conditions.
- Tests should, at minimum, cover all core feature use-cases and identifiable edge-cases or boundary conditions.

## Packages

- Packages in the monorepo each represent a publishable, standalone functionality.
- To ensure new packages are published to NPM, add a corresponding GitHub action step to `.github/workflows/npm-publish.yml`.
```
- name: Publish {MY PACKAGE NAME}
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/{MY PACKAGE PATH}/package.json'
token: ${{ secrets.NPM_TOKEN }}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": "[email protected]:awslabs/iot-app-kit.git",
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
"npm": ">=8.5.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm/cli#3637

There is a bug in NPM that was fixed in 8.5.0 which prevents npm install from erroring out when finding packages that don't exist in the registry but DO exist in the workspace

},
"workspaces": {
"packages": [
Expand Down