Skip to content

Commit

Permalink
Releases (#335)
Browse files Browse the repository at this point in the history
* feat(frontend): implement featured KPI tokens (#321)

* chore: version packages (#323)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Avoid fetching all KPIs tokens if the blacklist is empty (#324)

* fix(frontend): avoid fetching all KPI tokens if the blacklist is empty

* docs: add changeset

* Implement blacklisted KPI tokens filter (#325)

* feat(sdk): implement blacklisted KPI tokens filters

* docs: add changeset

* refactor(frontend): move blacklist fetch to dedicated hook, use new static links

* feat(react): add blacklist param to KPI token hooks

* refactor(sdk): remove blacklist fetch, add optional blacklist param to fetchers

* docs: add changesets

* Replace __DEV__ env with __PROD__ (#326)

* refactor(frontend): replace __DEV__ env with __PROD__

* docs: add changeset

* docs: update changeset file

* fix(frontend): set __PROD__ to false in rollup config

* Fix error svg icon (#327)

* fix(ui): wrap error svg icon

* docs: add changeset

* Upgrade dependencies (#328)

* chore: upgrade dependencies

* feat(frontend): upgrade shared dependencies versions

* docs: add changeset

* feat(sdk): make library tree shakeable (#331)

* chore(sdk): move tests in dedicated folder

* chore(sdk): flatten module structure

* chore(sdk): fix broken import paths

* chore(sdk): make the package tree shakeable

* chore(frontend): use esbuild instead of terser to minify build

* chore(sdk): fix liting issues

* chore(frontend): minimize css

* chore(frontend): remove console log

---------

Co-authored-by: luzzifoss <[email protected]>

* chore(frontend): fix domain typo

* fix(frotnend): lint error (#332)

* chore(ui): flatten structure and make package tree shakeable (#333)

Co-authored-by: luzzifoss <[email protected]>

* chore(react): flatten file structure and make library tree shakeable (#334)

* chore(react): flatten file structure and make library tree shakeable

* chore(frontend): lower size limit

---------

Co-authored-by: luzzifoss <[email protected]>

---------

Co-authored-by: Paolo Guerra <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: luzzifoss <[email protected]>
  • Loading branch information
5 people authored Aug 11, 2023
1 parent ebddc71 commit deae513
Show file tree
Hide file tree
Showing 162 changed files with 1,664 additions and 487 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-kings-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/sdk": minor
---

Make the SDK package tree shakeable
8 changes: 8 additions & 0 deletions .changeset/fluffy-shoes-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@carrot-kpi/host-frontend": minor
"@carrot-kpi/react": minor
"@carrot-kpi/sdk": minor
"@carrot-kpi/ui": minor
---

Upgrade dependencies
5 changes: 5 additions & 0 deletions .changeset/giant-cups-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": minor
---

Use ESBuild instead of Terser to minify build
5 changes: 5 additions & 0 deletions .changeset/grumpy-frogs-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/sdk": patch
---

Move tests in dedicated tests folder
5 changes: 5 additions & 0 deletions .changeset/kind-ducks-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/ui": minor
---

Flatten package file structure and make it tree shakeable
5 changes: 5 additions & 0 deletions .changeset/new-balloons-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/ui": patch
---

Fix an issue with the svg error icon of the inputs components
5 changes: 5 additions & 0 deletions .changeset/ninety-rice-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": patch
---

Replace `__DEV__` env with `__PROD__` and fix carrot domain configuration
5 changes: 5 additions & 0 deletions .changeset/odd-owls-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/react": minor
---

Add optional blacklist param to KPI token hooks
5 changes: 5 additions & 0 deletions .changeset/proud-lizards-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": minor
---

Minify CSS
5 changes: 5 additions & 0 deletions .changeset/real-squids-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": patch
---

Avoid fetching all KPI tokens as featured when the blacklist is empty
5 changes: 5 additions & 0 deletions .changeset/sharp-falcons-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/sdk": patch
---

Flattened module structure
6 changes: 6 additions & 0 deletions .changeset/soft-crews-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@carrot-kpi/host-frontend": minor
"@carrot-kpi/react": minor
---

Flatten React library file structure and make it tree shakeable
5 changes: 5 additions & 0 deletions .changeset/witty-grapes-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/sdk": minor
---

Implement the KPI tokens blacklist filters in the fetcher
5 changes: 5 additions & 0 deletions .changeset/young-berries-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": minor
---

Add dedicated hook for the blacklisted KPI tokens
2 changes: 1 addition & 1 deletion packages/frontend/.size-limit.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"path": "dist/",
"limit": "5 MB"
"limit": "4 MB"
}
]
14 changes: 14 additions & 0 deletions packages/frontend/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require("dotenv").config();

const WorkboxWebpackPlugin = require("workbox-webpack-plugin");
const webpack = require("webpack");
const { EsbuildPlugin } = require("esbuild-loader");
const { join } = require("path");
const shared = require("./shared-dependencies.json");
const { getEnv } = require("./utils/env");
Expand All @@ -10,6 +11,19 @@ module.exports = {
webpack: {
configure: (config, { env }) => {
const production = env === "production";

for (const rule of config.module.rules) {
for (oneOf of rule.oneOf) {
if (!oneOf.use) continue;
for (const use of oneOf.use) {
if (use.loader.includes("postcss-loader")) {
use.options.postcssOptions.plugins.push("cssnano");
}
}
}
}

config.optimization.minimizer = [new EsbuildPlugin({})];
config.plugins.push(
new webpack.container.ModuleFederationPlugin({
name: "host",
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
"autoprefixer": "^10.4.14",
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"cssnano": "^6.0.1",
"dotenv": "^16.3.1",
"esbuild-loader": "^4.0.0",
"eslint-config-custom": "*",
"eslint-plugin-prettier": "^5.0.0",
"i18next": "^23.2.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { HashRouter } from "react-router-dom";

import { type Chain, type ChainProviderFn, Connector } from "wagmi";
import { App } from "./pages/app";
import { CarrotCoreProvider } from "@carrot-kpi/react";
import { CoreProvider } from "@carrot-kpi/react";
import {
getStandaloneConnectors,
standaloneProviders,
Expand Down Expand Up @@ -97,7 +97,7 @@ export const Root = ({
return (
<HashRouter>
<HostStateProvider>
<CarrotCoreProvider
<CoreProvider
supportedChains={resolvedSupportedChains}
providers={resolvedProviders}
getConnectors={resolvedGetConnectors}
Expand All @@ -112,7 +112,7 @@ export const Root = ({
oracleTemplateBaseURL={oracleTemplateBaseURL}
templateId={templateId}
/>
</CarrotCoreProvider>
</CoreProvider>
</HostStateProvider>
</HashRouter>
);
Expand Down
4 changes: 1 addition & 3 deletions packages/frontend/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export const DEFAULT_CHAIN: Chain = Object.values(ENABLED_CHAINS).filter(
(chain) => chain.enabled,
)[0];

export const CARROT_DOMAIN = __PROD__
? "carrot-kpi.community"
: "carrot-kpi.dev";
export const CARROT_DOMAIN = __PROD__ ? "carrot.community" : "carrot-kpi.dev";

export interface NavbarLink {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Loading

2 comments on commit deae513

@vercel
Copy link

@vercel vercel bot commented on deae513 Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

host-frontend – ./packages/frontend

host-frontend-carrot-labs.vercel.app
host-frontend-git-main-carrot-labs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on deae513 Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./packages/ui

ui-git-main-carrot-labs.vercel.app
ui.carrot-kpi.dev
ui-carrot-labs.vercel.app

Please sign in to comment.