-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
263 changed files
with
59,052 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"root": true, | ||
"plugins": [ | ||
"eslint-plugin-tsdoc" | ||
], | ||
"parserOptions": { | ||
"project": ["tsconfig.json"] | ||
}, | ||
"extends": ["@scaleway/react/typescript"], | ||
"rules": { | ||
"tsdoc/syntax": "warn", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "enumMember", | ||
"format": ["PascalCase"] | ||
} | ||
], | ||
"import/prefer-default-export": "off", | ||
"import/no-default-export": "error", | ||
"no-await-in-loop": "off", | ||
"@typescript-eslint/no-namespace": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"extends": [ | ||
":combinePatchMinorReleases", | ||
":separateMultipleMajorReleases", | ||
"group:monorepos", | ||
"group:recommended", | ||
"helpers:disableTypesNodeMajor" | ||
], | ||
"assignees": ["team:devtools"], | ||
"assigneesSampleSize": 1, | ||
"reviewers": ["team:devtools", "team:console"], | ||
"reviewersSampleSize": 2, | ||
"updateNotScheduled": true, | ||
"lockFileMaintenance": { "enabled": false }, | ||
"enabledManagers": ["github-actions", "npm"], | ||
"prCreation": "not-pending", | ||
"prHourlyLimit": 5, | ||
"prConcurrentLimit": 10, | ||
"automerge": false, | ||
"rangeStrategy": "bump", | ||
"rebaseWhen": "auto", | ||
"dependencyDashboard": true, | ||
"packageRules": [ | ||
{ | ||
"automerge": false, | ||
"matchPackagePatterns": ["^@scaleway/"], | ||
"stabilityDays": 0, | ||
"matchUpdateTypes": ["major", "minor", "patch"] | ||
}, | ||
{ | ||
"labels": ["UPDATE-MAJOR"], | ||
"stabilityDays": 14, | ||
"matchUpdateTypes": ["major"] | ||
}, | ||
{ | ||
"labels": ["UPDATE-MINOR"], | ||
"stabilityDays": 5, | ||
"matchUpdateTypes": ["minor"] | ||
}, | ||
{ | ||
"labels": ["UPDATE-PATCH"], | ||
"stabilityDays": 1, | ||
"matchUpdateTypes": ["patch"] | ||
}, | ||
{ | ||
"matchPackagePatterns": [ | ||
"^@babel/", | ||
"^@commitlint/", | ||
"^babel-", | ||
"cz-conventional-changelog", | ||
"eslint", | ||
"husky", | ||
"jest", | ||
"lint-staged" | ||
], | ||
"automerge": true, | ||
"automergeType": "branch", | ||
"semanticCommitScope": "minor-deps", | ||
"stabilityDays": 3, | ||
"matchUpdateTypes": ["minor"] | ||
}, | ||
{ | ||
"matchPackagePatterns": [ | ||
"^@babel/", | ||
"^@commitlint/", | ||
"^@semantic-release/", | ||
"^@types/", | ||
"^babel-", | ||
"^eslint", | ||
"cz-conventional-changelog", | ||
"husky", | ||
"jest", | ||
"lint-staged" | ||
], | ||
"automerge": true, | ||
"automergeType": "branch", | ||
"semanticCommitScope": "patch-deps", | ||
"stabilityDays": 1, | ||
"matchUpdateTypes": ["patch"] | ||
} | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
...ub/workflows/check_pull_request_title.yml → .github/workflows/check_pull_request.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,35 +49,4 @@ jobs: | |
- run: pnpm run build | ||
- run: pnpm run test:coverage | ||
- uses: codecov/[email protected] | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
needs: [test] | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: "0" | ||
persist-credentials: false | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Git Identity | ||
run: | | ||
git config --global user.name 'Scaleway Bot' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 17 | ||
check-latest: true | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: pnpm lerna publish -y --create-release github --ignore-scripts --no-verify-access | ||
env: | ||
HUSKY: 0 | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# dependencies | ||
node_modules/ | ||
yarn.lock | ||
|
||
# misc | ||
.DS_Store | ||
|
||
# lint | ||
.eslintcache | ||
|
||
# test & build | ||
.reports | ||
docs | ||
public | ||
dist | ||
coverage | ||
|
||
# Protobuf definition | ||
protobuf | ||
.bufcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
[ -n "$CI" ] && exit 0 | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
[ -n "$CI" ] && exit 0 | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
[ -n "$CI" ] && exit 0 | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
|
||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"semi": false, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making 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 | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
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 | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
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. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
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. | ||
|
||
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 | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Contribute to `scaleway-sdk-js` | ||
|
||
`scaleway-sdk-js` is Apache 2.0 licensed and accepts contributions via GitHub. | ||
This document will cover how to contribute to the project and report issues. | ||
|
||
## Topics | ||
|
||
- [Reporting Security Issues](#reporting-security-issues) | ||
- [Reporting Issues](#reporting-issues) | ||
- [Suggesting feature](#suggesting-feature) | ||
- [Contributing Code](#contributing-code) | ||
- [Community Guidelines](#community-guidelines) | ||
|
||
## Reporting security issues | ||
|
||
At Scaleway we take security seriously. | ||
If you have any issue regarding security, please notify us by sending an email to [[email protected]](mailto:[email protected]). | ||
|
||
Please _DO NOT_ create a GitHub issue. | ||
|
||
We will follow up with you promptly with more information and a plan for remediation. | ||
We currently do not offer a paid security bounty program, but we would love to send some Scaleway swag your way along with our deepest gratitude for your assistance in making Scaleway a more secure Cloud ecosystem. | ||
|
||
## Reporting issues | ||
|
||
A great way to contribute to the project is to send a detailed report when you encounter a bug. | ||
We always appreciate a well-written, thorough bug report, and will thank you for it! | ||
Before opening a new issue, we appreciate you reviewing open issues to see if there are any similar requests. | ||
If there is a match, thumbs up the issue with a 👍 and leave a comment if you have additional information. | ||
|
||
When reporting an issue, include the following: | ||
|
||
- The version of `scaleway-sdk-js` you are using (e.g. v1.0.0-beta1, v2.0.0, master, ...) | ||
- The environment and its version (e.g. NodeJS v16.10) | ||
|
||
## Suggesting a feature | ||
|
||
When requesting a feature, some of the questions we want to answer are: | ||
|
||
- What value does this feature bring to end users? | ||
- How urgent is the need (nice to have feature or need to have)? | ||
- Does this align with the goals of `scaleway-sdk-js`? | ||
|
||
## Contributing code | ||
|
||
Part of this repo is automatically generated from our [protocol buffer](https://en.wikipedia.org/wiki/Protocol_Buffers) monorepo. This enables us to keep Scaleway toolings up to date with the latest version of our APIs ([developer website](http://developers.scaleway.com), CLI, SDKs, etc). | ||
|
||
Generated files and folders are located in [scaleway-sdk-js/packages/clients/api](./packages/clients/api). They always start with the following line: | ||
|
||
```ts | ||
// This file was automatically generated. DO NOT EDIT. | ||
``` | ||
|
||
### Submit code | ||
|
||
To submit code: | ||
|
||
- Create a fork of the project | ||
- Create a topic branch from where you want to base your work (usually master) | ||
- Add tests to cover contributed code | ||
- Push your commit(s) to your topic branch on your fork | ||
- Open a pull request against `scaleway-sdk-js` master branch that follows [PR guidelines](#pull-request-guidelines) | ||
|
||
The maintainers of `scaleway-sdk-js` use a "Let's Get This Merged" (LGTM) message in the pull request to note that the commits are ready to merge. | ||
After one or more maintainer states LGTM, we will merge. | ||
If you have questions or comments on your code, feel free to correct these in your branch through new commits. | ||
|
||
### Pull Request Guidelines | ||
|
||
The goal of the following guidelines is to have Pull Requests (PRs) that are fairly easy to review and comprehend, and code that is easy to maintain in the future. | ||
|
||
- **Pull Request title should be clear** on what is being fixed or added to the code base. | ||
If you are addressing an open issue, please start the title with "fix(api): #XXX" or "feat: #XXX" | ||
- **Keep it readable for human reviewers** and prefer a subset of functionality (code) with tests and documentation over delivering them separately | ||
- **Don't forget commenting code** to help reviewers understand the modification | ||
- **Notify Work In Progress PRs** by prefixing the title with `Draft:` | ||
- **Please, keep us updated.** | ||
We will try our best to merge your PR, but please notice that PRs may be closed after 30 days of inactivity. | ||
|
||
Your pull request should be rebased against the current master branch. Please do not merge | ||
the current master branch in with your topic branch, nor use the Update Branch button provided | ||
by GitHub on the pull request page. | ||
|
||
Keep in mind only the **Pull Request Title** will be used as commit message as we stash all commits on merge. | ||
|
||
## Community guidelines | ||
|
||
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). | ||
|
||
Thank you for reading through all of this, if you have any question feel free to [reach us](README.md#reach-us)! |
Oops, something went wrong.