From 6b07c527f10638ea35ae636f11fc85bb63b7e5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20W=C3=B3jcik?= <1711174+lwojcik@users.noreply.github.com> Date: Sun, 4 Aug 2024 19:57:51 +0200 Subject: [PATCH] Project deprecation (#320) --- .github/FUNDING.yml | 5 -- .mergify.yml | 74 ------------------------- CODE_OF_CONDUCT.md | 128 -------------------------------------------- CONTRIBUTING.md | 101 ---------------------------------- README.md | 35 ++---------- appveyor.yml | 19 ------- package.json | 31 +---------- 7 files changed, 6 insertions(+), 387 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .mergify.yml delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 appveyor.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 6081fe6..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,5 +0,0 @@ -github: lwojcik -ko_fi: lukem -custom: https://paypal.me/lksv -liberapay: lukem -patreon: lukem_tt diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index 3113cd7..0000000 --- a/.mergify.yml +++ /dev/null @@ -1,74 +0,0 @@ -queue_rules: - - name: default - conditions: - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - -pull_request_rules: - - name: Automatic merge of Snyk dependency upgrades (bot) - conditions: - - author=snyk-bot - - -conflict - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - actions: - queue: - method: squash - name: default - - name: Automatic merge of Snyk dependency upgrades (me) - conditions: - - author=lwojcik - - title~=[Snyk] - - title~=Upgrade - - -conflict - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - actions: - queue: - method: squash - name: default - - name: Automatic merge of Dependabot dependency upgrades - conditions: - - author=dependabot[bot] - - -conflict - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - actions: - queue: - method: squash - name: default - - name: Ask to resolve conflict - conditions: - - conflict - actions: - comment: - message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 cc @lwojcik - - name: Automatic merge of owner-made PRs for main when CI passes and owner approves - conditions: - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - - author=lwojcik - - base=main - - -conflict - - label!=work-in-progress - - label=ready-to-merge - actions: - queue: - method: squash - name: default - - name: Automatic merge of PRs for main when CI passes and owner approves - conditions: - - status-success=continuous-integration/appveyor/branch - - status-success=continuous-integration/appveyor/pr - - author!=lwojcik - - author!=snyk-bot - - author!=dependabot[bot] - - -conflict - - base=main - - label!=work-in-progress - - approved-reviews-by=lwojcik - - label=ready-to-merge - actions: - queue: - method: squash - name: default diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index feb2d0d..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,128 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible 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. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or - advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders 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, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -support.github@lukem.net. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 2d5b1de..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,101 +0,0 @@ -# Contributing - -StarCraft2-API is as an open source project. Contributions of any kind are welcome. - -You can contribute to the project in many ways: - -- file a bug report -- suggest a feature -- improve documentation either within the project itself or the [doc site repository](https://github.com/blizzapi/starcraft2-api-docs) -- submit a pull request - -## Bug reports - -If you encounter unexpected behavior, design flaw or any other kind of error that needs to be fixed, feel free to file a bug report in [Issues section on GitHub](https://github.com/blizzapi/starcraft2-api-docs/issues). - -There is no specific format you have to follow while filing your report. However, it's highly advisable you include at least some of following information: - -- clear and concise bug description -- steps to reproduce the problem -- code samples or test cases that induce faulty behavior (if applicable) -- expected behavior - what you expected to happen -- any other contextual information about the problem (if applicable) - -## Feature suggestions - -You can use GitHub Issues section to suggest ideas or features you would like to be added to the project. - -There is no specific format you have to follow while filling your request. Just be sure to provide clear and concise description of the feature. Examples, test cases and any additional context would be greatly appreciated. - -## Documentation improvements - -Documentation in StarCraft2-API exists primarily in two forms: - -- Text files such as README.md that function alongside project code -- Documentation site maintained at https://github.com/blizzapi/starcraft2-api-docs - -Feel free to submit any relevant fixes (typos, error corrections, improvements to code samples) regardless of how trivial they seem. - -## Pull requests - -Code patches that add features or fix bugs can be sent as [pull requests on GitHub](https://github.com/blizzapi/starcraft2-api/pulls). - -To make the process of merging your pull request as quick as possible, be sure to read and follow the guidelines below: - -- All GitHub status checks marked as 'Required' MUST pass in order to merge the pull request. - -- It's highly appreciated if you attempt to fix any failing status checks not marked as 'Required'. Their purpose is to help maintaining general project hygiene but they aren't meant to be gatekeepers. A small percentage of issues may be false positives that can be safely ignored. Use your best judgement while deciding whether it's something you should spend time working on. - -- Adding tests for your code is highly appreciated but not mandatory. Again, use your best judgement whether this is something you can provide within reasonable timeframe. - -- If your pull request isn't ready to be merged, please prefix its title with 'WIP' (Work In Progress) or indicate this in the description. - -- Pull requests are merged to `master` branch via squash-and-merge strategy. There are no specific requirements about quality and quantity of commits within feature branches. - -- Feel free to add yourself to [AUTHORS](https://github.com/starcraft2-api/blob/master/AUTHORS) file if you haven't done so. - -## Technical information - -This section intends to explain how the project works from the developer's point of view. If you have any questions that weren't answered here, feel free to [submit an issue on GitHub](https://github.com/blizzapi/starcraft2-api/issues). - -### Development - -StarCraft2-API is written in TypeScript and compiles to ES5 with `tsc` command. To run the project in development mode, use `npm run dev` or `tsc -w`. - -Full project build, including linting and testing, can be triggered with `npm run build`. To trigger a build without linting and testing use `tsc`. - -Type definitions are storted in `types.ts` file. Storing them in a separate file allows for reusing them in multiple places. - -StarCraft2-API uses [BlizzAPI](https://github.com/blizzapi/blizzapi) for authenticating and fetching data from Blizzard Battle.net APIs. - -### Code conventions / linting - -StarCraft2-API uses [Airbnb style guide](https://github.com/airbnb/javascript) as a base for linting. - -Internal project code is intended to follow basic principles of functional programming. Non-functional constructs, such as `StarCraft2-API` class, are occasionally used for user interface. - -Linting is a part of build process. Unresolved lint errors fail the build. However, in justified situations it's acceptable to [disable selected lint rules with inline comments](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments). - -### Testing - -For automated unit testing, StarCraft2-API uses [Jest](https://jestjs.io/). All code related to testing is contained in `tests` folder which mimicks the structure of `src` directory. Names of test files follow the following pattern: `nameOfRelevantSourceFile.test.ts`. - -Testing is done via: - -- manual and automatic mocks contained in `__mocks__` directory as well as within the test files, -- reusable sample data sets contained within `__testData__` directory -- auto-generated Jest snapshots within `__snapshots__` directory which describe desired outcome of code being tested - -All test components and assertions are treated as an integral part of project code. - -It's possible to create new snapshots in test assertions with help of [`toMatchSnapshot()`](https://jestjs.io/docs/en/snapshot-testing) method. Jest will auto-generate new snapshots on next run of `npm test`. Resulting changes must be committed to Git. - -If a code change modifies one or more existing snapshots or makes any of the existing snapshots obsolete, snapshot changes have to be reviewed and accepted manually before proceeding. Accepting snapshot changes is done by running `npm test -- -u`. Resulting changes must be committed to Git. - -Each run of `npm test` command generates human-readable coverage report which can be accessed locally in a web browser by opening `/path/to/starcraft2-api/coverage/lcov-report/index.html`. Those reports often provide hints on how to fill coverage gaps. - -Note that automated unit tests are powerful tool for quick quality control, but they don't replace the need for integration testing against real-life contexts. In other words, be sure to test your change with Battle.net API. :) - -### Releases - -Whenever possible, StarCraft2-API follows [semantic versioning](https://semver.org/) for all releases available in [Releases section on GitHub](https://github.com/blizzapi/starcraft2-api/releases) and on [NPM package manager](https://www.npmjs.com/package/starcraft2-api). The project is considered production-ready and it doesn't follow any specific release schedule. diff --git a/README.md b/README.md index 0c60794..55edee8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,8 @@ -StarCraft2-API logo - # StarCraft2-API -[![npm (latest)](https://img.shields.io/npm/v/starcraft2-api/latest.svg)](https://www.npmjs.com/package/starcraft2-api) -[![Build status](https://ci.appveyor.com/api/projects/status/p4f467gw2ufh1gub/branch/master?svg=true)](https://ci.appveyor.com/project/lwojcik/starcraft2-api/branch/master) -[![codecov](https://codecov.io/gh/blizzapi/starcraft2-api/branch/master/graph/badge.svg?token=L8OOti0dKF)](https://codecov.io/gh/blizzapi/starcraft2-api) +> **This project is no longer maintained or updated. While Battle.net API has been reasonably stable within last few years and that means the library should theoretically continue working for a while, I am no longer able to provide any support or maintenance.** > **In case of bugs or breaking changes, feel free to fork the repo and publish your own updated version.** -Flexible and feature-rich JavaScript / TypeScript library for easy access to [StarCraft II Community APIs](https://develop.battle.net/documentation/starcraft-2/community-apis) and [StarCraft II Game Data APIs](https://develop.battle.net/documentation/starcraft-2/game-data-apis) powered by [BlizzAPI](https://github.com/blizzapi/blizzapi). +Flexible and feature-rich JavaScript / TypeScript library for easy access to StarCraft II Community APIs. ## Install @@ -42,36 +38,15 @@ console.log(data); ## Manual build ```bash -git clone https://github.com/blizzapi/starcraft2-api.git +git clone https://github.com/lwojcik/starcraft2-api.git cd starcraft2-api npm install npm run build ``` -## Documentation & examples - -- [starcraft2-api.lukem.net](https://starcraft2-api.lukem.net) - documentation -- [starcraft2-api-docs](https://github.com/blizzapi/starcraft2-api-docs) - documentation repo on GitHub -- [starcraft2-api-example](https://github.com/blizzapi/starcraft2-api-example) - sample Express.js REST API with usage examples -- [Repositories that depend on StarCraft2-API](https://github.com/blizzapi/starcraft2-api/network/dependents) - -## Contributions - -Contributions of any kind are welcome. - -You can contribute to StarCraft2-API by: - -- submiting a bug report or a feature suggestion -- improving documentation either within the project itself or in the [doc site repository](https://github.com/blizzapi/starcraft2-api-docs) -- submitting pull requests - -Before contributing be sure to read [Contributing Guidelines](https://github.com/blizzapi/starcraft2-api/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/blizzapi/starcraft2-api/blob/master/CODE_OF_CONDUCT.md). - -## Contributors - -To all who contribute code, improve documentation, submit issues or feature requests - thank you for making StarCraft2-API even better! +## Documentation -We maintain an [AUTHORS](https://github.com/blizzapi/starcraft2-api/blob/master/AUTHORS) file where we keep a list of all project contributors. Please consider adding your name there with your next PR. +See [starcraft2-api-docs](https://github.com/lwojcik/starcraft2-api-docs) repo. ## Legal diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f00b656..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,19 +0,0 @@ -image: Ubuntu2004 -platform: x64 -stack: node lts/* - -install: - - npm install --ignore-scripts - -build_script: - - npm run build - -test_script: - - curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import > /dev/null - - curl -Os https://uploader.codecov.io/latest/linux/codecov > /dev/null - - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM > /dev/null - - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig > /dev/null - - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - - shasum -a 256 -c codecov.SHA256SUM - - chmod +x codecov - - ./codecov --disable=gcov diff --git a/package.json b/package.json index e70ec01..1d5ad8e 100644 --- a/package.json +++ b/package.json @@ -2,29 +2,6 @@ "name": "starcraft2-api", "version": "2.5.6", "description": "Flexible and feature-rich library for StarCraft II Community and Game Data APIs", - "keywords": [ - "starcraft", - "starcraft2", - "sc2", - "api", - "blizzard", - "battlenet", - "battle-net", - "battle-net-api" - ], - "homepage": "https://starcraft2-api.lukem.net", - "bugs": { - "url": "https://github.com/blizzapi/starcraft2-api/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/blizzapi/starcraft2-api.git" - }, - "license": "MIT", - "author": { - "name": "BlizzAPI + Contributors", - "url": "https://github.com/blizzapi" - }, "main": "./dist/index.js", "module": "dist/index.mjs", "browser": "dist/index.js", @@ -78,11 +55,5 @@ "sort-package-json": "^2.10.0", "ts-jest": "^29.2.4", "typescript": "^5.5.4" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/blizzapi/starcraft2-api/blob/master/LICENSE" - } - ] + } }