Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor JSONSchema and URL checks #10276

Merged
merged 11 commits into from
May 22, 2024

Conversation

mondeja
Copy link
Member

@mondeja mondeja commented Jan 12, 2024

  • Deduplicates URL regex checks and definitions.
  • Uses const instead of single value enum for custom license types in JSONSchema.
  • Includes .jsonschema.json file in JS package.
  • Improves types for getIconsData* functions of SDK.

@mondeja mondeja added meta Issues or pull requests regarding the project or repository itself package Pull requests or issues that affect the NPM package labels Jan 12, 2024
@mondeja mondeja requested a review from LitoMore January 12, 2024 15:43
.jsonschema.json Outdated Show resolved Hide resolved
Co-authored-by: Peter Noble <15157491+PeterShaggyNoble@users.noreply.github.com>
@mondeja mondeja changed the title Refactor JSONschema and URL checks Refactor JSONSchema and URL checks Jan 12, 2024
@LitoMore LitoMore added the breaking change Issues or pull requests that include a breaking change and scheduled for the next major release label Jan 18, 2024
@mondeja mondeja added this to the v12.0.0 milestone Jan 28, 2024
@mondeja mondeja mentioned this pull request Mar 4, 2024
3 tasks
@mondeja mondeja marked this pull request as draft March 4, 2024 22:21
@mondeja

This comment was marked as outdated.

@mondeja
Copy link
Member Author

mondeja commented Mar 8, 2024

The previous comment (now hidden) has no sense because in this PR I'm using the same regex for JSONSchema check and in the code. The regex can't be removed.

@mondeja mondeja marked this pull request as ready for review March 8, 2024 16:26
@adamrusted
Copy link
Member

Hey @mondeja - are you okay to resolve the conflicts on this ready for next week? We can look to merge in as part of the major release then :)

@LitoMore
Copy link
Member

As I remember we are planning to move the SDK part to a module.

@mondeja
Copy link
Member Author

mondeja commented May 19, 2024

Don't worry, I'll resolve the conflicts before the Wednesday regardless of whether we move the SDK to a separate npm package. In that case, the changes proposed by this PR must be included. Feel free to open the PR to separate the SDK meanwhile @LitoMore. If not, I'll open it before the weekend if I have time for it, anyways we can always postpone that change for v13.

@LitoMore
Copy link
Member

Ok, I will try to create the new repository for SDK.

@mondeja
Copy link
Member Author

mondeja commented May 19, 2024

Ok, I will try to create the new repository for SDK.

As you want but we can release it from this same repository. Probably this approach is better because there are some files in simple-icons/simple-icons that the SDK needs to work.

@LitoMore
Copy link
Member

As you want but we can release it from this same repository. Probably this approach is better because there are some files in simple-icons/simple-icons that the SDK needs to work.

Okay, we need to change this repository to workspaces. The folder structure needs some changes.

@mondeja
Copy link
Member Author

mondeja commented May 20, 2024

This is ready @LitoMore, would you mind to review it?

sdk.d.ts Show resolved Hide resolved
@adamrusted adamrusted merged commit 7880143 into simple-icons:develop May 22, 2024
3 checks passed
@mondeja mondeja deleted the refactor-schema branch May 22, 2024 11:21
simple-icons bot added a commit that referenced this pull request May 26, 2024
…enamed icons (v12.0.0)

## New Icons

- Audiobookshelf (#10605) (@21st-centuryman)
- Awwwards (#10539) (@stefanobartoletti)
- Foundry Virtual Tabletop (#10575) (@adamrusted)
- FusionAuth (#10776) (@service-paradis)
- Homepage (#10452) (@21st-centuryman)
- Hugging Face (#9259) (@PratyushJayachandran)
- Kagi (#10976) (@uncenter)
- n8n (#10909) (@CodeShakingSheep)
- Posit (#10987) (@cwickham)
- React Bootstrap (#10921) (@CodeShakingSheep)
- Sartorius (#10967) (@CodeShakingSheep)
- UiPath (#10773) (@Mvlprem)
- unpkg (#10317) (@service-paradis)
- Zigbee2MQTT (#10212) (@PeterShaggyNoble)

## Updated Icons

- Adidas (#10982) (@jglamp)
- FastAPI (#10663) (@uncenter)
- RenovateBot (#10996) (@sisp)

## Removed Icons

- FITE (#10060) (@PeterShaggyNoble)
- Flattr (#10380) (@service-paradis)
- Google Bard (#10453) (@PeterShaggyNoble)
- Integromat (#10152) (@PeterShaggyNoble)
- Niantic (#10979) (@PratyushJayachandran)
- Nintendo Network (#10006) (@adamrusted)
- Rome (#10113) (@PeterShaggyNoble)
- Shotcut (#10043) (@PeterShaggyNoble)
- Skynet (#10504) (@kwypchlo)
- Twitter (#9748) (@adamrusted)

## Renamed Icons

- `Airbrake.io` to `Airbrake` (#10513) (@PeterShaggyNoble)
- `Amazon Web Services` to `Amazon Web Services` (#10391) (@readboy8)
- `RStudio` to `RStudio IDE` (#10999) (@adamrusted)

## SDK Changes

### URL_REGEX -> urlRegex()

The exported const `URL_REGEX` has been removed. Please use `urlRegex()` instead:

```javascript
import {urlRegex} from 'simple-icons/sdk';
const regex = await urlRegex();
```

### .jsonschema.json

Now `.jsonschema.json` file is bundled in our package.

For more details, please see: #10276.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Issues or pull requests that include a breaking change and scheduled for the next major release meta Issues or pull requests regarding the project or repository itself package Pull requests or issues that affect the NPM package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants