Skip to content

Commit

Permalink
style: apply prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
domwebber committed Dec 29, 2023
1 parent 9e60c6c commit 7e2e71e
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 57 deletions.
11 changes: 7 additions & 4 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Hello and welcome! This folder has been automatically generated by
`@changesets/cli`, a build tool that works with multi-package repos, or
single-package repos to help you version and publish your code. You can find the
full documentation for it
[in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
We have a quick list of common questions to get you started engaging with this
project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
15 changes: 10 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Please ensure the following are done before submitting an issue:

- [ ] I am running the latest version that is compatible with my Cloud API version.
- [ ] I am running the latest version that is compatible with my Cloud API
version.
- [ ] I searched the official documentation didn't find the answer.
- [ ] I made sure that this issue is not a duplicate of an existing issue.

Expand All @@ -16,19 +17,22 @@ Describe the current behavior.

# Failure information (for bug reporting)

If this is a bug, please complete the sections below. Otherwise, delete and enter your feature request here.
If this is a bug, please complete the sections below. Otherwise, delete and
enter your feature request here.

## Steps to Reproduce

Detailed steps to reproduce the issue. Be as detailed as possible without compromising any sensitive data.
Detailed steps to reproduce the issue. Be as detailed as possible without
compromising any sensitive data.

1. ...
2. ...
3. ...

## Context

Please provide any other relevant information about your application or configuration.
Please provide any other relevant information about your application or
configuration.

- Are you a BSP (yes/no):
- Operating system or other system info (e.g. cloud stack):
Expand All @@ -38,4 +42,5 @@ Please provide any other relevant information about your application or configur

## Failure Logs

Please paste any relevant logs here. REMEMBER TO REMOVE ANY/ALL sensitive data (e.g. phone numbers, names, security keys, etc.)!!!
Please paste any relevant logs here. REMEMBER TO REMOVE ANY/ALL sensitive data
(e.g. phone numbers, names, security keys, etc.)!!!
28 changes: 19 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
# Description

Summary of the change and if it fixes an existing filed issue, make sure to reference it here. Include details on why this change is important.
Summary of the change and if it fixes an existing filed issue, make sure to
reference it here. Include details on why this change is important.

Fixes # (issue)

## Test Plan

Please provide clear instructions on how the changes were verified. Attach screenshots if applicable.
Please provide clear instructions on how the changes were verified. Attach
screenshots if applicable.

## Types of changes

- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Breaking change (fix or feature that would cause existing functionality to
change)

## Performance Impact

Describe any known/tested performance impact (+/-) of this PR. Also include how you characterized/tested the performance impact?
Describe any known/tested performance impact (+/-) of this PR. Also include how
you characterized/tested the performance impact?

## Checklist:

- [ ] My code doesn't have any type casts or non-null assertions.
- [ ] I all made corresponding changes or additions to the documentation to successfully generate accurate Docusaurus docs.
- [ ] I all made corresponding changes or additions to the documentation to
successfully generate accurate Docusaurus docs.
- [ ] My code follows the code style of this project.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] My changes generate no new warnings and all new/existing unit tests pass locally.
- [ ] I have read the **[CONTRIBUTING](https://github.com/facebookresearch/beanmachine/blob/main/CONTRIBUTING.md)** document.
- [ ] I have completed the Meta Contributor License Agreement. Complete your CLA here: <https://code.facebook.com/cla>
- [ ] I have added tests that prove my fix is effective or that my feature
works.
- [ ] My changes generate no new warnings and all new/existing unit tests pass
locally.
- [ ] I have read the
**[CONTRIBUTING](https://github.com/facebookresearch/beanmachine/blob/main/CONTRIBUTING.md)**
document.
- [ ] I have completed the Meta Contributor License Agreement. Complete your CLA
here: <https://code.facebook.com/cla>
19 changes: 15 additions & 4 deletions .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ jobs:
- uses: actions/stale@v7
with:
start-date: "2022-01-01T00:00:00Z"
stale-issue-message: This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
stale-pr-message: This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
close-issue-message: This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
close-pr-message: This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.
stale-issue-message:
This issue is stale because it has been open 30 days with no
activity. Remove stale label or comment or this will be closed in 30
days.
stale-pr-message:
This PR is stale because it has been open 90 days with no activity.
Remove stale label or comment or this will be closed in 30 days.
close-issue-message:
This issue was closed because it has been stalled for 30 days with
no activity. Please open a new issue if the issue is still relevant,
linking to this one.
close-pr-message:
This PR was closed because it has been stalled for 30 days with no
activity. Please open a new PR if the issue is still relevant,
linking to this one.
days-before-issue-stale: 30
days-before-pr-stale: 90
days-before-issue-close: 30
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
matrix:
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x]
shard: [1/1]
name: Node v${{ matrix.node-version }} on ${{ inputs.os }} ${{ matrix.shard }}
name:
Node v${{ matrix.node-version }} on ${{ inputs.os }} ${{ matrix.shard }}
runs-on: ${{ inputs.os }}

steps:
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist/
coverage/
*.md
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
- 6d13401: build(deps-dev): bump cspell from 8.1.3 to 8.2.4
- 9e4d740: build(deps-dev): bump @typescript-eslint/parser from 6.13.2 to 6.16.0
- 1027c91: build(deps-dev): bump eslint from 8.55.0 to 8.56.0
- 45ed5be: build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.13.2 to 6.15.0
- 45ed5be: build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.13.2 to
6.15.0

## 6.1.0

Expand Down
36 changes: 19 additions & 17 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
contributors and maintainers pledge to make participation in our project and our
community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Expand All @@ -23,25 +23,25 @@ include:
Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

Expand All @@ -62,17 +62,19 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <[email protected]>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
<https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ outlined on that page and do not file a public issue.
- Tabs, not spaces.
- 80 character line length
- Spaces between special characters to improve readability.
- Follows the unofficial [Typescript styling guide](https://google.github.io/styleguide/tsguide.html#identifiers) except when not possible, for the name "WhatsApp," or other circumstances.
- Follows the unofficial
[Typescript styling guide](https://google.github.io/styleguide/tsguide.html#identifiers)
except when not possible, for the name "WhatsApp," or other circumstances.

## License

Expand Down
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ LICENSE file in the root directory of this source tree.

A SDK for Meta's WhatsApp Business Messaging APIs - Cloud API.

[![npm (scoped)][]][sdk-npmjs]
[![Lint, Format, Test & Build][]][sdk-ci]
[![npm (scoped)][]][sdk-npmjs] [![Lint, Format, Test & Build][]][sdk-ci]

[npm (scoped)]: https://img.shields.io/npm/v/%40great-detail/whatsapp
[sdk-npmjs]: https://www.npmjs.com/package/@great-detail/whatsapp
[Lint, Format, Test & Build]: https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml/badge.svg
[sdk-ci]: https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml
[Lint, Format, Test & Build]:
https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml/badge.svg
[sdk-ci]:
https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml

## Getting started

<!-- TODO -->

```typescript
import CloudAPI from "@great-detail/whatsapp";

// const CloudAPI = require("@great-detail/whatsapp");

// const businessID = "123...etc...";
const sdk = new CloudAPI({ businessID });
const message = sdk.message.text({ body: "Hello"}, { toNumber: "1234567890" });
const message = sdk.message.text({ body: "Hello" }, { toNumber: "1234567890" });
const sendReceipt = await message.send();
```

Expand All @@ -52,25 +54,30 @@ pnpm add @great-detail/WhatsApp-Nodejs-SDK

## Compatibility

This SDK is designed to be compatible with both the Cloud API and On-Premises
API. The On-Premises API is currently developed fully based on documentation.
This SDK is designed to be compatible with the Cloud API API.

| SDK Version | Cloud API Versions | Premises API Versions |
| :---------- | -----------------: | --------------------: |
| TODO | TODO | TODO |
| SDK Version | Cloud API Versions |
| :---------- | -----------------: |
| TODO | TODO |

Whilst the SDK may work with alternative versions of the Graph API, it is
designed to work with the above. If you find any compatibility issues, please
report them via [GitHub Issues](https://github.com/great-detail/WhatsApp-Nodejs-SDK/issues).
report them via
[GitHub Issues](https://github.com/great-detail/WhatsApp-Nodejs-SDK/issues).

## Code of Conduct

Meta has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Meta has adopted a Code of Conduct that we expect project participants to adhere
to. Please read the full text so that you can understand what actions will and
will not be tolerated.

## Contribute

See the [CONTRIBUTING](CONTRIBUTING.md) file for our development process, how to propose bugfixes and improvements, and how to build and test your changes to the WhatsApp Business Platform Node.js SDK.
See the [CONTRIBUTING](CONTRIBUTING.md) file for our development process, how to
propose bugfixes and improvements, and how to build and test your changes to the
WhatsApp Business Platform Node.js SDK.

## License

The WhatsApp Business Platform Node.js SDK for the Cloud API is Meta Platforms licensed, as found in the LICENSE file.
The WhatsApp Business Platform Node.js SDK for the Cloud API is Meta Platforms
licensed, as found in the LICENSE file.

0 comments on commit 7e2e71e

Please sign in to comment.