Skip to content

Commit

Permalink
Revert "chore: dependencies cleanup (#598)"
Browse files Browse the repository at this point in the history
This reverts commit 3c0ada3.
  • Loading branch information
mateuszjasiuk authored Feb 15, 2024
1 parent 3c0ada3 commit 2f88e7f
Show file tree
Hide file tree
Showing 39 changed files with 32,258 additions and 12,803 deletions.
1 change: 0 additions & 1 deletion .github/actions/yarn-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ runs:
./apps/*/node_modules
./packages/*/node_modules
./e2e/node_modules
./storybook/node_modules
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/deploy-wallet-at-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,36 +239,6 @@ jobs:
name: namada-extension-firefox
path: ./apps/extension/build/firefox/artifact/*

build-faucet:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache

- name: Build the faucet
working-directory: ./apps/faucet
run: yarn build
env:
NAMADA_INTERFACE_FAUCET_API_URL: "http://127.0.0.1:5000"
NAMADA_INTERFACE_FAUCET_API_ENDPOINT: "/api/v1/faucet"
NAMADA_INTERFACE_FAUCET_LIMIT: 1000

build-storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache

- name: Build the storybook
working-directory: ./storybook
run: yarn build-storybook

E2E-tests:
needs:
[build-interface, build-extension-chrome]
Expand Down
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs

nmHoistingLimits: "workspaces"
31 changes: 13 additions & 18 deletions apps/airdrop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,31 @@
"jotai": "^2.5.1",
"lodash.groupby": "^4.6.0",
"node-forge": "^1.3.1",
"react": "^18.2.0",
"react": "^17.0.2",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.0",
"react-simple-toasts": "^5.10.0",
"styled-components": "^5.3.11",
"styled-components": "^5.3.5",
"typescript": "^5.1.3"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@keplr-wallet/types": "^0.10.19",
"@svgr/webpack": "^8.1.0",
"@svgr/webpack": "^6.3.1",
"@types/dompurify": "^3.0.2",
"@types/lodash.groupby": "^4.6.9",
"@types/node": "^20.11.10",
"@types/node-forge": "^1.3.6",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/styled-components": "^5.1.34",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/styled-components": "^5.1.26",
"dotenv": "^16.0.3",
"eslint-import-resolver-typescript": "^3.5.0",
"local-cors-proxy": "^1.1.0",
"postcss": "^8.4.33",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.5.1",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typescript-plugin-styled-components": "^3.0.0",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"typescript-plugin-styled-components": "^2.0.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
}
}
9 changes: 3 additions & 6 deletions apps/extension/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ const config: Config.InitialOptions = {
setupFilesAfterEnv: ["./src/setupTests.ts"],
testEnvironment: "jsdom",

moduleNameMapper: {
...pathsToModuleNameMapper(rootCompilerOptions.paths, {
prefix: "<rootDir>/src",
}),
"^webextension-polyfill$": "<rootDir>/src/test/fake-browser.ts",
},
moduleNameMapper: pathsToModuleNameMapper(rootCompilerOptions.paths, {
prefix: "<rootDir>/src",
}),
};

export default config;
56 changes: 26 additions & 30 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"wasm:build:dev:multicore": "node ./scripts/build.js --multicore"
},
"dependencies": {
"@cosmjs/encoding": "^0.32.2",
"@cosmjs/encoding": "^0.29.0",
"@dao-xyz/borsh": "^5.1.5",
"@ledgerhq/hw-transport": "^6.30.0",
"@ledgerhq/hw-transport-webhid": "^6.28.0",
Expand All @@ -48,50 +48,47 @@
"@namada/types": "0.2.1",
"@namada/utils": "0.2.1",
"@zondax/ledger-namada": "^0.0.3",
"bignumber.js": "9.1.2",
"bignumber.js": "^9.1.1",
"buffer": "^6.0.3",
"clsx": "^2.1.0",
"dompurify": "^3.0.2",
"framer-motion": "6.5.1",
"framer-motion": "6.2.4",
"js-sha256": "^0.10.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.12.0",
"react-router-dom": "^6.0.0",
"styled-components": "^6.1.8",
"typescript": "^5.1.3",
"uuid": "^9.0.0",
"webextension-polyfill": "^0.10.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@jest/expect-utils": "^28.0.0",
"@svgr/webpack": "^8.1.0",
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@namada/config": "workspace:^",
"@svgr/webpack": "^6.3.1",
"@types/chrome": "^0.0.237",
"@types/dompurify": "^3.0.2",
"@types/firefox-webext-browser": "^120.0.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.10",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/uuid": "^9.0.8",
"@types/firefox-webext-browser": "^94.0.1",
"@types/jest": "^29.0.0",
"@types/node": "^18.7.14",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/uuid": "^8.3.4",
"@types/webextension-polyfill": "^0.10.6",
"@types/zxcvbn": "^4.4.1",
"babel-jest": "^29.7.0",
"chalk": "^4.0.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.9.1",
"css-loader": "^6.8.1",
"dotenv": "^16.0.3",
"expect": "^28.0.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"fake-indexeddb": "^4.0.1",
"file-loader": "^6.2.0",
"jest": "^29.7.0",
"jest-diff": "^28.0.0",
"jest": "^29.0.1",
"jest-environment-jsdom": "^29.3.1",
"jest-message-util": "^28.0.0",
"jest-validate": "^28.0.0",
"leb128": "^0.0.5",
"merge-jsons-webpack-plugin": "^2.0.1",
"mockzilla": "^0.14.0",
Expand All @@ -100,14 +97,13 @@
"postcss-preset-env": "^9.3.0",
"remove-files-webpack-plugin": "^1.5.0",
"rimraf": "^3.0.2",
"style-loader": "^3.3.4",
"tailwindcss": "^3.4.1",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"style-loader": "^3.3.3",
"tailwindcss": "^3.3.6",
"ts-jest": "^29.0.3",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"web-ext": "^7.8.0",
"webpack": "^5.90.0",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^4.10.0",
"webpack-extension-reloader": "^1.1.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const SeedPhraseImport: React.FC<Props> = ({ onConfirm }) => {
);

const onShowPassphraseChange = useCallback(
(e: React.MouseEvent) => {
(e) => {
e.preventDefault();
if (!showPassphrase) {
setPassphrase("");
Expand Down
3 changes: 2 additions & 1 deletion apps/extension/src/background/vault/tests/service.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Result } from "@namada/utils";
import { KVPrefix } from "router";
import { KVStoreMock } from "test/init";
import { VaultService } from "../service";
import { SessionPassword, VaultStore } from "../types";
import { Result } from "@namada/utils";

/* eslint-disable @typescript-eslint/no-var-requires */
const cryptoMemory = require("@namada/crypto").__wasm.memory;
jest.mock("webextension-polyfill", () => ({}));

type VaultPublicValue = { foo: string };
type VaultPublicObj = { id: string; value: string };
Expand Down
3 changes: 3 additions & 0 deletions apps/extension/src/provider/Namada.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import * as utils from "extension/utils";
import { DBType, KVStoreMock, init } from "test/init";
import { ACTIVE_ACCOUNT, keyStore, password } from "./data.mock";

// Needed for now as utils import webextension-polyfill directly
jest.mock("webextension-polyfill", () => ({}));

describe("Namada", () => {
let namada: Namada;
let iDBStore: KVStoreMock<DBType>;
Expand Down
10 changes: 3 additions & 7 deletions apps/extension/src/services/requester.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createContext, useEffect, useState } from "react";
import browser from "webextension-polyfill";
import { createContext, useEffect, useState } from "react";

import { ExtensionKVStore } from "@namada/storage";
import { KVPrefix } from "router";
import {
ExtensionMessenger,
ExtensionRequester,
getNamadaRouterId,
} from "extension";
import { KVPrefix } from "router";

const store = new ExtensionKVStore(KVPrefix.LocalStorage, {
get: browser.storage.local.get,
Expand All @@ -17,11 +17,7 @@ const messenger = new ExtensionMessenger();

export const RequesterContext = createContext<ExtensionRequester | null>(null);

export const RequesterProvider = ({
children,
}: {
children: React.ReactNode;
}): JSX.Element => {
export const RequesterProvider: React.FC = ({ children }) => {
const [requester, setRequester] = useState<ExtensionRequester>();

useEffect(() => {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion apps/extension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const copyPatterns = [
},
// browser-polyfill expects a source-map
{
from: "node_modules/webextension-polyfill/dist/browser-polyfill.js.map",
from: "../../node_modules/webextension-polyfill/dist/browser-polyfill.js.map",
to: "./browser-polyfill.js.map",
},
{
Expand Down
12 changes: 0 additions & 12 deletions apps/faucet/.release-it.cjs

This file was deleted.

49 changes: 20 additions & 29 deletions apps/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"license": "MIT",
"private": true,
"scripts": {
"bump": "yarn workspace namada run bump --target apps/faucet",
"release": "release-it --verbose --ci",
"release:dry-run": "release-it --verbose --dry-run --ci",
"release:no-npm": "release-it --verbose --no-npm.publish --ci",
"start": "webpack-dev-server",
"start:proxy": "node ./scripts/startProxy.js",
"dev": "NODE_ENV=development yarn start",
Expand All @@ -20,51 +16,46 @@
"lint:fix": "yarn lint -- --fix"
},
"dependencies": {
"@cosmjs/encoding": "^0.32.2",
"@cosmjs/encoding": "^0.29.0",
"@namada/components": "0.2.1",
"@namada/hooks": "0.2.1",
"@namada/integrations": "0.2.1",
"@namada/utils": "0.2.1",
"bignumber.js": "^9.1.2",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"dompurify": "^3.0.2",
"node-forge": "^1.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.0",
"styled-components": "^5.3.11",
"styled-components": "^5.3.5",
"typescript": "^5.1.3"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@svgr/webpack": "^8.1.0",
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@namada/config": "workspace:^",
"@svgr/webpack": "^6.3.1",
"@types/dompurify": "^3.0.2",
"@types/node": "^20.11.10",
"@types/node-forge": "^1.3.6",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/styled-components": "^5.1.34",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.10.0",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/styled-components": "^5.1.26",
"dotenv": "^16.0.3",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"local-cors-proxy": "^1.1.0",
"postcss": "^8.4.33",
"postcss-loader": "^8.1.0",
"postcss-preset-env": "^9.3.0",
"stream": "^0.0.2",
"style-loader": "^3.3.4",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.5.1",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript-plugin-styled-components": "^3.0.0",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"typescript-plugin-styled-components": "^2.0.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
}
}
2 changes: 1 addition & 1 deletion apps/faucet/src/App/Faq.components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const DropDownTitle = styled.div`
align-items: start;
`;

export const DropDownTitleText = ({ children }: {children: React.ReactNode}): JSX.Element => {
export const DropDownTitleText: React.FC = ({ children }) => {
return (
<div
style={{
Expand Down
Loading

0 comments on commit 2f88e7f

Please sign in to comment.