* Fix 3rd party extensions order and add test to avoid regression
* Prevent possible error in test
* Apply suggestions from code review
* Apply suggestion
* Remove uneeded import
* switch from jest to uvu
* remove jest config
* convert index.test.js to uvu
* use assert.type
* Get rid of jest-diff
* Remove uneeded splits
* remove out.txt
* switch to fake-diff
* make building async and minify with esbuild
* switch from fs/promises to fs.promises
* cleanup fs.promises
* fix conflicts
* fix conflicts
* revert test file changes
* refactor: reorganize tests, reduce repetition
* fix conflicts
* fix conflicts
* remove unnecessary type checks and use toStrictEqual
* move index tests to separate file
* test svg values in testIcon
* Use getter for 'svg' instead of 'path' in packaged javascript version of icons
* Use variable to avoid calling `escape` twice
* Convert title to HTML friendly in build script
* Update tests
* Only friendly title for SVG content
* Add equality test for SVG contents
* Add missing import
* Test using icons template
* Fix lint error
* Fix lint error in utils
* Read files synchronicly in tests
* Remove done from tests, make them pass
* Remove uneeded imports
* Remove replacements in tests
* Update with changes in develop
* Drop uneeded requirement
* Space between requirements
* Simplify encoding utility
* Fix syntax error
* Apply @ericcornelissen's suggestions
* Apply @ericcornelissen's suggestions
* 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
* 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
# Fix indentation of format function.
# Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
# Update formatting in scripts/lint.js
# Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
# Fix Handshake order
# Require Sorting by Slug
* Accept icon rather than title in `iconToSlug`
This removes the need in (most of the) calls to this function to
seperately check if there is a custom slug already defined for the icon.
* Rename `titleToSlug` to `getIconSlug`
* Revert unnecessary style change
* Update function documentation
* Keep `titleToSlug` and add `getIconSlug` helper
Unfortunately `this` is not available because we're using arrow syntax
for these functions, but refering to `titleToSlug` through
`module.exports` works fine as well.
* Fix parameter name in `getIconSlug` docs
* Add "license" object to the data file JSON schema
* Add license to GNU and GNU social
As an example, based on the discussion in:
https://github.com/simple-icons/simple-icons/issues/1167
* Use `"additionalProperties": false` in JSON schema
... to detect properties in the data file that shouldn't be there.
For more info, see:
https://json-schema.org/understanding-json-schema/reference/object.html
* Update JSON scheme descriptions
* Switch from jsonlint2 to jsonschema
This gives is better support for advanced features of JSON schema.
A couple of clarifications:
- There does exist a jsonschema-cli package, but it is rather limited
and crucially doens't exit with a non-zero exit code if there is an
error. (it is also pretty old and not maintained), hence the custom
script.
- I renamed .jsonlintschema 1) for clarity (lint is no longer accurate)
and 2) the .json extension allows easy imorting in the script and 3)
it adds syntax highlighting.
- The script outputs the number of errors in the end because the output
gets pretty big pretty quickly, this way you can see it easily from
your CLI.
- We could customize how the errors are logged, but I feel that is
beyond this PR.
* Two minor changes
* Use `oneOf` to require URL for custom licenses
The updated configuration allows the `"license"` field to be either
1) a SPDX license, optional with a URL
2) a "custom" license with a required URL
Read more about the "oneOf" feature of jsonschema at:
https://json-schema.org/understanding-json-schema/reference/combining.html#oneof
* Include license field in Contributing Guidelines
- Rename `titleToFilename` to `titleToSlug`
- Fix indentation where necessary
- Use quotes internally consistently (to reduce the diff size, unfortunately this is the opposite quote from what we use in other projects)
- Update comments & documentation
- Construct file paths
And more...
* 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