From 7e2e71e10653a04032c34ac0a4eb7582be12a9ae Mon Sep 17 00:00:00 2001 From: Dom Webber Date: Fri, 29 Dec 2023 17:19:25 +0000 Subject: [PATCH] style: apply prettier formatting --- .changeset/README.md | 11 ++++++---- .github/ISSUE_TEMPLATE.md | 15 ++++++++----- .github/PULL_REQUEST_TEMPLATE.md | 28 ++++++++++++++++-------- .github/workflows/close-stale.yml | 19 ++++++++++++---- .github/workflows/test.yml | 3 ++- .prettierignore | 1 - CHANGELOG.md | 3 ++- CODE_OF_CONDUCT.md | 36 ++++++++++++++++--------------- CONTRIBUTING.md | 4 +++- README.md | 35 ++++++++++++++++++------------ 10 files changed, 98 insertions(+), 57 deletions(-) diff --git a/.changeset/README.md b/.changeset/README.md index e5b6d8d..468dd17 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -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) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index dcdc49e..f9c0ec6 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -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. @@ -16,11 +17,13 @@ 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. ... @@ -28,7 +31,8 @@ Detailed steps to reproduce the issue. Be as detailed as possible without compro ## 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): @@ -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.)!!! diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index dcc1283..61f1785 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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: +- [ ] 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: diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index 71708a1..e037005 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62d8597..b432cb1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/.prettierignore b/.prettierignore index 0f7a085..a60030e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,2 @@ dist/ coverage/ -*.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5008ddf..8f76d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index b15e642..30a0a12 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 @@ -23,13 +23,13 @@ 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 @@ -37,11 +37,11 @@ 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 @@ -62,8 +62,9 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at . 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 @@ -71,8 +72,9 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at + [homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00a1c7e..cf9dad5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index 9588ca7..6f355a2 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ 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 @@ -23,11 +24,12 @@ A SDK for Meta's WhatsApp Business Messaging APIs - Cloud API. ```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(); ``` @@ -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.