Skip to content

Commit

Permalink
Merge pull request #180 from api3dao/main
Browse files Browse the repository at this point in the history
Release 2.4.0
  • Loading branch information
hiletmis authored Jan 18, 2024
2 parents 1bff08a + 15abb6b commit b080d1b
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 556 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-ducks-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@phase21/logos": minor
---

\`@nodary/utilities\` replaced with \`@phase21/api-integrations\`.
30 changes: 13 additions & 17 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
name: dispatch receiver
name: Trigger on release

on:
repository_dispatch:
types: [release]
release:
types: [published]
jobs:
build:
name: Run renovate
Trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Self-hosted Renovate
uses: renovatebot/github-action@v39.2.4
env:
RENOVATE_REPOSITORIES: api3dao/logos
RENOVATE_ONBOARDING: "false"
RENOVATE_PLATFORM_COMMIT: "true"
RENOVATE_BASE_BRANCH: main
with:
configurationFile: renovate.json
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4

- name: Repository Dispatch - Release logos
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT }}
repository: api3dao/update-sentry
event-type: release
client-payload: '{"repository": "logos"}'
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -49,4 +49,4 @@ jobs:
commit: "ci: release packages"
title: "ci: release packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
"@babel/preset-react": "^7.23.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@nodary/utilities": "^1.3.0",
"@phase21/api-integrations": "^1.0.0",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"svgo": "^3.2.0"
},
Expand Down
10 changes: 10 additions & 0 deletions raw/symbols/frxETH.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
],
"matchPackagePatterns": [
"@api3\/.*",
"@nodary\/.*",
"@phase21\/.*"
],
"matchUpdateTypes": [
Expand All @@ -30,7 +29,6 @@
],
"matchPackagePatterns": [
"@api3\/.*",
"@nodary\/.*",
"@phase21\/.*"
],
"matchUpdateTypes": [
Expand Down
12 changes: 7 additions & 5 deletions scripts/build-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ const fs = require('fs/promises');
const { rimraf } = require('rimraf')
const babel = require('@babel/core');
const utils = require('../helpers/utils');
const apiIntegrations = require('@phase21/api-integrations');
const { nodaryFeeds } = require('@nodary/utilities');
const { apisData, getApiProviderAliases } = require('@phase21/api-integrations');
const camelcase = require('camelcase');

const outputPath = './dist';
Expand All @@ -29,9 +28,10 @@ function getLogoList(mode) {
case 'chain':
return [...getManualLogos(mode), ...chains.CHAINS.map((chain) => chain.id)];
case 'symbol':
return [...getManualLogos(mode), ...new Set(nodaryFeeds.map((feed) => feed.name.split('/')).flat())];
const supportedFeed = [... new Set(getApiProviderAliases().map((apiProvider) => Object.values(apisData[apiProvider].supportedFeedsInBatches).flat(2)).flat())];
return [...getManualLogos(mode), ...new Set(supportedFeed.map((feed) => feed.split('/')).flat())];
case 'api-provider':
return [...getManualLogos(mode), ...apiIntegrations.getApiProviderAliases()];
return [...getManualLogos(mode), ...getApiProviderAliases()];
default:
break;
}
Expand Down Expand Up @@ -68,10 +68,12 @@ function buildLogoImports(files, mode, format) {
function getMissingLogos(files, mode) {
const logos = getLogoList(mode);
const prefix = mode === 'chain' ? 'Chain' : '';
return logos.filter(
const missingLogos = logos.filter(
(logo) =>
!files.find((file) => file.toLowerCase() === `${utils.sanitizeName(logo, '', prefix).toLowerCase()}.svg`)
);
console.log(`Missing ${mode} logos: ${missingLogos}`);
return missingLogos;
}

async function buildBatch(files, outDir, format = 'esm', batchName, mode) {
Expand Down
1 change: 0 additions & 1 deletion viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@testing-library/user-event": "^14.5.2",
"@phase21/logos": "file:./logos.tgz",
"framer-motion": "^10.18.0",
"@nodary/utilities": "^1.3.0",
"gh-pages": "^6.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
36 changes: 36 additions & 0 deletions viewer/src/Components/ChangeLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@ import '../md.css';
const DocsView = () => {
const markdown = `# @api3/logos
## 2.4.0
### Minor Changes
- \`@nodary/utilities\` replaced with \`@phase21/api-integrations\`.
## 2.3.0
### Minor Changes
- e7ef4c3: New symbols are added.
- \`uniETH\`
- \`osETH\`
- \`weETH\`
- \`PYUSD\`
- \`WLD\`
## 2.2.0
### Minor Changes
- a539166: Dependency update: \`@phase21/chains\`
## 2.1.0
### Minor Changes
- 6ccfa82: Update api - integrations to\`@phase21/api-integrations\`
## 2.0.0
### Major Changes
- f8cb93a: Package moved to phase21 organization
## 1.0.0
### Major Changes
Expand Down
5 changes: 3 additions & 2 deletions viewer/src/Components/SymbolsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { SymbolLogo } from '@phase21/logos';
import SearchRow from '../Custom/SearchRow';
import { useState } from 'react';
import InfoView from '../Custom/InfoView';
import { nodaryFeeds } from '@nodary/utilities';
import { apisData, getApiProviderAliases } from '@phase21/api-integrations';

const SymbolsView = () => {
const [symbol, setSymbol] = useState('');
const [selectedSymbol, setSelectedSymbol] = useState('');

const getSymbols = () => {
const filteredFeeds = [...new Set(nodaryFeeds.map((feed) => feed.name.split('/')).flat())];
const supportedFeed = [...new Set(getApiProviderAliases().map((apiProvider) => Object.values(apisData[apiProvider].supportedFeedsInBatches).flat(2)).flat())];
const filteredFeeds = [...new Set(supportedFeed.map((feed) => feed.split('/')).flat())];
return filteredFeeds.filter((feed) => feed.toLowerCase().includes(symbol.toLowerCase()));
};

Expand Down
Loading

0 comments on commit b080d1b

Please sign in to comment.