* Add prettier as a dependency
* Add format command and configure prettier
I opted for single quotes to be in line with other simple-icons projects
I ignore the data file because changing its formatting is quite a bit of
trouble for all open PRs.
* Run prettier
* Replace all functions by arrow functions
* Move prettier configuration to config file
Move it to a file so editors (and other software) can pick up on the
configuration. I went with .js because (a) it allows for comments and
(2) it seems most of the config files are in JavaScript already.
* Add prettier --check when running npm run lint (This adds it to the CI as well)
* Add husky and format changes before committing
* Use object destructuring for imports consistently
* Add shebang and fileoverview to jsonlint.js
* Use PAT to avoid version bump commit problems due to branch protections
Following the instructions of stefanzweifel/git-auto-commit-action [1]
for pushing to branches with branch protections, this changes the create
release workflow to fetch the repo with a PAT (that must belong to an
admin for this to work). As a result, when pushing the version bump
commit, the required status checks are not required (provided the rules
are not applied to admins).
---
1. https://github.com/stefanzweifel/git-auto-commit-action#push-to-protected-branches
* Add warning to not add `on: push` to create release workflow
* Enforce that create-release isn'ttriggered by push events
Add the `workflow_dispatch` trigger to the Create Release Pull Request
workflow. This will allow us to more easily trigger the release Pull
Request if either 1) the scheduled run failed for whatever reason or 2)
an extra release is needed as per the DISCLAIMER.md.
You can read more about `workflow_dispatch` in the GitHub docs at:
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
* Restructure scripts/ directory
And update references to this scripts everywhere.
* Update names of file-level constants in bump-version.js
* Normalize quotes between all scripts
* Move "create-release.yml" scripts to scripts/release
* Move slugs table script to scripts/release
* Update relative path logic in update-slugs-table.js
* Add script to bump major version in README
On lines 29-32, we could alternatively use `replaceAll`, I opted not to
as it is not yet(?) part of an LTS release of NodeJS.
* Bump CDN version in README automatically for new releases
* Rename "bump-cdn-version.js" to "update-cdn-urls.js"
* Update names of file-level constants in update-cdn-urls.js
* Rename workflow setp for updating CDN URLs
* Rename packageJsonFile constant in update-cdn-urls
* Remove semver dependency
* Generalize update-cdn-urls script
* Update workflow names
Most importantly gives unique names to `create-release.yml` and
`merge-release.yml`.
Other than that, this attempts to improve and unify the names of all
workflows.
* Update release workflow names
Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com>
Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com>
* Remove .travis.yml reference from .gitattributes
* Minor refactoring of .svglintrc.js
- Remove unused variables
- Fix missing semi-colons
- Remove unneeded indentation
* Prevent error in clean command due to missing files
* Fix indentations
* Further improvements to Editorconfig and indentation
* Format YAML files
- Update indentation for array notation
- Normalize use of newlines
* Split release workflow into two
Split the release workflow - which so far created and helped merging
release PRs - into a workflow for reating the release PR and one for
helping to merge it.
* Simplify merge-release.yml if-condition