Skip to content

Commit

Permalink
fixes types aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1995 committed Jan 21, 2025
1 parent ac8675f commit e5785a5
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 47 deletions.
151 changes: 143 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@rollup/plugin-typescript": "^12.1.2",
"@toruslabs/config": "^2.2.0",
"@toruslabs/eslint-config-typescript": "^3.3.4",
"@toruslabs/torus-scripts": "^6.1.6",
"@toruslabs/torus-scripts": "^6.1.7",
"@types/chai": "^5.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^22",
Expand All @@ -26,12 +26,13 @@
"mocha": "^10.8.2",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"rollup-plugin-tsconfig-paths": "^1.5.2",
"ts-node": "^10.9.2",
"ts-patch": "^3.3.0",
"tsconfig-paths": "^4.2.0",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"tslib": "^2.8.1",
"typescript": "~5.6.3"
"typescript": "~5.6.3",
"typescript-transform-paths": "^3.5.3"
},
"engines": {
"node": ">=18.x",
Expand Down Expand Up @@ -78,7 +79,7 @@
"test-debugger": "cross-env FORCE_COLOR=1 lerna run test-debugger --parallel"
},
"workspaces": [
"packages/modal",
"packages/no-modal"
"packages/no-modal",
"packages/modal"
]
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/modal/src/ui/components/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ArrowDark from "../assets/arrow-left-dark.svg";
import ArrowLight from "../assets/arrow-left-light.svg";
import XDark from "../assets/x-dark.svg";
import XLight from "../assets/x-light.svg";
import ArrowDark from "../../../assets/arrow-left-dark.svg";
import ArrowLight from "../../../assets/arrow-left-light.svg";
import XDark from "../../../assets/x-dark.svg";
import XLight from "../../../assets/x-light.svg";

interface IconProps {
iconName: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/modal/src/ui/loginModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./css/web3auth.css";
import "../../css/web3auth.css";

import { applyWhiteLabelTheme, LANGUAGES, SafeEventEmitter } from "@web3auth/auth";
import {
Expand Down
6 changes: 3 additions & 3 deletions packages/modal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "test", "css", "assets"],
"include": ["src", "css", "assets"],
"compilerOptions": {
"resolveJsonModule": true,
"jsx": "react-jsx"
// "resolveJsonModule": true,
"jsx": "react-jsx",
}
}
11 changes: 6 additions & 5 deletions packages/no-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"@toruslabs/solana-embed": "^2.1.0",
"@toruslabs/torus-embed": "^5.0.0",
"@toruslabs/tweetnacl-js": "^1.0.4",
"@walletconnect/sign-client": "^2.17.3",
"@walletconnect/types": "^2.17.3",
"@walletconnect/utils": "^2.17.3",
"@wallet-standard/app": "^1.1.0",
"@wallet-standard/base": "^1.1.0",
"@wallet-standard/features": "^1.1.0",
"@walletconnect/sign-client": "^2.17.3",
"@walletconnect/types": "^2.17.3",
"@walletconnect/utils": "^2.17.3",
"@web3auth/auth": "^9.6.2",
"@web3auth/ws-embed": "^3.4.4",
"assert": "^2.1.0",
Expand All @@ -60,8 +60,8 @@
"bs58": "^5.0.0",
"deepmerge": "^4.3.1",
"ethers": "^6.13.4",
"jsonschema": "^1.4.1",
"json-rpc-random-id": "^1.0.1",
"jsonschema": "^1.4.1",
"jwt-decode": "^4.0.0",
"loglevel": "^1.9.2",
"mipd": "^0.0.7",
Expand All @@ -73,9 +73,10 @@
},
"devDependencies": {
"@toruslabs/ethereum-controllers": "^7.1.3",
"@types/json-rpc-random-id": "^1.0.3",
"@types/elliptic": "6.4.18",
"@types/json-rpc-random-id": "^1.0.3",
"react": "^18.x",
"ttypescript": "^1.5.15",
"vue": "^3.x"
},
"exports": {
Expand Down
12 changes: 0 additions & 12 deletions packages/no-modal/rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/no-modal/torus.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module.exports = require("../../torus.config");
// TODO: Import this file into packages which need it
// TODO: Import this file into packages which need it
11 changes: 11 additions & 0 deletions packages/no-modal/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"compilerOptions": {
"outDir": "dist",
"declarationDir": "./dist/types",
"plugins": [
{ "transform": "typescript-transform-paths", "afterDeclarations": true, }
]
}
}
8 changes: 7 additions & 1 deletion packages/no-modal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"include": ["src", "test"],
"compilerOptions": {
"strict": true,
},
"paths": {
"@/core/base": ["./src/base"],
"@/core/*-adapter": ["./src/adapters/*-adapter"],
"@/core/*-plugin": ["./src/plugins/*-plugin"],
"@/core/*-provider": ["./src/providers/*-provider"]
}
}
}
11 changes: 11 additions & 0 deletions packages/no-modal/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const generateWebpackConfig = require("../../webpack.config");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");

const config = generateWebpackConfig({
alias: {
Expand Down Expand Up @@ -29,6 +30,16 @@ const config = generateWebpackConfig({
'@/core/ethereum-mpc-provider': path.resolve(__dirname, 'src/providers/ethereum-mpc-provider'),
'@/core/xrpl-provider': path.resolve(__dirname, 'src/providers/xrpl-provider')
},
plugins: [
new ForkTsCheckerWebpackPlugin({
typescript: {
mode: "write-dts",
context: path.resolve(__dirname, '.'),
configFile: path.resolve(__dirname, 'tsconfig.build.json'),
typescriptPath: require.resolve("ts-patch/compiler"),
},
}),
]
});


Expand Down
Loading

0 comments on commit e5785a5

Please sign in to comment.