Skip to content

Commit

Permalink
devop: upgrade rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Sep 11, 2023
1 parent 8b0bafb commit d5db1d4
Show file tree
Hide file tree
Showing 25 changed files with 3,554 additions and 2,966 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@swc/core": "^1.3.80",
"@swc/core": "^1.3.84",
"concurrently": "^7.6.0",
"devmoji": "^2.3.0",
"husky": "^8.0.3",
"node-notifier": "^10.0.1",
"nodemon": "^2.0.22",
"ultra-runner": "^3.10.5"
},
"resolutions": {
"@ledgerhq/compressjs": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.2.1.tgz"
}
}
7 changes: 3 additions & 4 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.27.0",
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@types/webextension-polyfill": "^0.10.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^8.2.1",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import commonjs from "@rollup/plugin-commonjs";
import nodeResolve from "@rollup/plugin-node-resolve";
import { uglify } from "rollup-plugin-uglify";
import inject from "@rollup/plugin-inject";
import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import packageJson from "../package.json" assert { type: "json" };

const enableMinification = process.env.minify === "on";
const base = {
Expand All @@ -14,9 +15,12 @@ const base = {
sourcemap: process.env.minify !== "on",
},
plugins: [
replace({
preventAssignment: true,
__VERSION__: JSON.stringify(packageJson.version),
}),
typescript(),
commonjs(),
json(),
inject({
Buffer: ["buffer", "Buffer"],
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Base from "./rollup.config.base";
import Base from "./rollup.config.base.mjs";
Base.input.push("src/scripts/contentscript.ts");
export default Base;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Base from "./rollup.config.base";
import Base from "./rollup.config.base.mjs";
Base.input.push("src/scripts/inject.ts");
export default Base;
42 changes: 21 additions & 21 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
"build:chrome": "cross-env BROWSER='chrome' vue-cli-service build && yarn build:rollup",
"build:firefox": "cross-env BROWSER='firefox' vue-cli-service build && yarn build:rollup && node configs/get-system-info.js",
"lint": "vue-cli-service lint --fix",
"build:rollup": "cross-env minify=on rollup --config configs/rollup.config.contentscript.js && cross-env minify=on rollup --config configs/rollup.config.inject.js",
"build:rollup": "cross-env minify=on rollup --config configs/rollup.config.contentscript.mjs && cross-env minify=on rollup --config configs/rollup.config.inject.mjs",
"inspectWebpack": "vue-cli-service inspect > webpack.log",
"test": "ts-mocha --require ./configs/testNullCompiler.js --paths -p configs/tsconfig.test.json ./**/*.mocha.ts",
"watch": "rimraf dist && concurrently 'npm:watch-*(!firefox)'",
"watch:firefox": "concurrently 'npm:watch-*(!chrome)'",
"watch-contentscript": "rollup --watch --config configs/rollup.config.contentscript.js",
"watch-inject": "rollup --watch --config configs/rollup.config.inject.js",
"watch-contentscript": "rollup --watch --config configs/rollup.config.contentscript.mjs",
"watch-inject": "rollup --watch --config configs/rollup.config.inject.mjs",
"watch-vue-chrome": "cross-env BROWSER='chrome' vue-cli-service build --watch --no-clean",
"watch-vue-firefox": "cross-env BROWSER='firefox' vue-cli-service build --watch --no-clean"
},
"dependencies": {
"@babel/runtime": "^7.22.10",
"@babel/runtime": "^7.22.15",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -30,11 +30,12 @@
"@ethereumjs/common": "^3.2.0",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-transport-webusb": "^6.27.19",
"@metamask/eth-sig-util": "^6.0.0",
"@types/chrome": "^0.0.244",
"@metamask/eth-sig-util": "^6.0.1",
"@rollup/plugin-replace": "^5.0.2",
"@types/chrome": "^0.0.245",
"@types/events": "^3.0.0",
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.197",
"@types/less": "^3.0.4",
"@types/lodash": "^4.14.198",
"@types/utf-8-validate": "^5.0.0",
"@vueuse/core": "^9.13.0",
"add": "^2.0.6",
Expand All @@ -44,7 +45,7 @@
"bitcoinjs-message": "^2.2.0",
"chai": "^4.3.8",
"concurrently": "^7.6.0",
"core-js": "^3.32.1",
"core-js": "^3.32.2",
"echarts": "^5.4.3",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-util": "^7.1.5",
Expand Down Expand Up @@ -79,17 +80,16 @@
"@polkadot/ui-shared": "^3.6.2",
"@polkadot/util": "^12.4.2",
"@polkadot/wasm-crypto": "^7.2.2",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-inject": "^4.0.4",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@rollup/plugin-typescript": "^8.5.0",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-inject": "^5.0.3",
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-typescript": "^11.1.3",
"@types/ethereumjs-abi": "^0.6.3",
"@types/mocha": "^10.0.1",
"@types/url-parse": "^1.4.8",
"@types/uuid": "^9.0.2",
"@types/url-parse": "^1.4.9",
"@types/uuid": "^9.0.3",
"@types/wif": "^2.0.2",
"@types/zxcvbn": "^4.4.1",
"@types/zxcvbn": "^4.4.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vue/cli-plugin-babel": "~5.0.8",
Expand All @@ -100,7 +100,7 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^8.7.1",
Expand All @@ -111,15 +111,15 @@
"path-browserify": "^1.0.1",
"prettier": "^2.8.8",
"rimraf": "^4.4.1",
"rollup": "^2.79.1",
"rollup": "^3.29.1",
"rollup-plugin-uglify": "^6.0.4",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"systeminformation": "^5.21.1",
"systeminformation": "^5.21.4",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
"url": "^0.11.1",
"url": "^0.11.2",
"webextension-polyfill": "^0.10.0"
},
"installConfig": {
Expand Down
2 changes: 0 additions & 2 deletions packages/extension/src/configs/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
import packagejson from "@/../package.json";
export const EXTENSION_VERSION = packagejson.version;
export const EXTENSION_NAMESPACE =
"dfc62431af1c3c1258035e5ab4058b6440e507238cf0fe429ea39827a7ee43fc"; //keccak256("enkrypt")
3 changes: 1 addition & 2 deletions packages/extension/src/providers/bitcoin/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import {
ProviderInterface,
SendMessageHandler,
} from "@/types/provider";
import { EXTENSION_VERSION } from "@/configs/constants";
import { EnkryptWindow } from "@/types/globals";
import { BitcoinNetworks } from "./types";

export class Provider extends EventEmitter implements ProviderInterface {
connected: boolean;
name: ProviderName;
type: ProviderType;
version: string = EXTENSION_VERSION;
version: string = __VERSION__;
autoRefreshOnNetworkChange = false;
networks: typeof BitcoinNetworks;
sendMessageHandler: SendMessageHandler;
Expand Down
5 changes: 2 additions & 3 deletions packages/extension/src/providers/ethereum/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
EIP6963ProviderInfo,
EIP6963Events,
} from "@/types/provider";
import { EXTENSION_VERSION } from "@/configs/constants";
import { SettingsType } from "@/libs/settings-state/types";
import { EnkryptWindow } from "@/types/globals";
import { v4 as randomUUID } from "uuid";
Expand All @@ -30,7 +29,7 @@ export class Provider extends EventEmitter implements ProviderInterface {
connected: boolean;
name: ProviderName;
type: ProviderType;
version: string = EXTENSION_VERSION;
version: string = __VERSION__;
autoRefreshOnNetworkChange = false;
sendMessageHandler: SendMessageHandler;
constructor(options: ProviderOptions) {
Expand All @@ -43,7 +42,7 @@ export class Provider extends EventEmitter implements ProviderInterface {
this.connected = true;
this.name = options.name;
this.type = options.type;
this.version = EXTENSION_VERSION;
this.version = __VERSION__;
this.sendMessageHandler = options.sendMessageHandler;
}
async request(request: EthereumRequest): Promise<EthereumResponse> {
Expand Down
3 changes: 1 addition & 2 deletions packages/extension/src/providers/polkadot/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
import InjectedProvider from "./libs/injected-provider";
import { SubstrateInjectedProvider } from "./types";
import MessageRouter from "./libs/message-router";
import { EXTENSION_VERSION } from "@/configs/constants";
import { InjectedSendMessageHandler } from "./types";
import { OnMessageResponse, RPCRequestType } from "@enkryptcom/types";
import { SettingsType } from "@/libs/settings-state/types";
Expand All @@ -24,7 +23,7 @@ export class Provider
{
name: ProviderName;
type: ProviderType;
version = EXTENSION_VERSION;
version = __VERSION__;
sendMessageHandler: SendMessageHandler;
constructor(options: ProviderOptions) {
super();
Expand Down
3 changes: 1 addition & 2 deletions packages/extension/src/types/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { InjectedProvider as EthereumProvider } from "../providers/ethereum
import type { InjectedProvider as PolkadotProvider } from "@/providers/polkadot/types";
import type { InjectedProvider as BitcoinProvider } from "@/providers/bitcoin/types";
import EventEmitter from "eventemitter3";
import { EXTENSION_VERSION } from "@/configs/constants";
import {
MiddlewareFunction,
NetworkNames,
Expand Down Expand Up @@ -77,7 +76,7 @@ export enum EIP6963Events {
export abstract class ProviderInterface extends EventEmitter {
name: ProviderName;
type: ProviderType;
version: string = EXTENSION_VERSION;
version = "";
sendMessageHandler: SendMessageHandler;
constructor(options: ProviderOptions) {
super();
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/types/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
declare module "*.vue";
declare module "vue3-lottie";
declare const __VERSION__: string;
12 changes: 6 additions & 6 deletions packages/hw-wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"node": ">=14.15.0"
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.8",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand All @@ -48,13 +48,13 @@
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-app-eth": "^6.34.3",
"@ledgerhq/hw-app-eth": "^6.34.5",
"@ledgerhq/hw-transport": "^6.28.8",
"@ledgerhq/hw-transport-webusb": "^6.27.19",
"@ledgerhq/live-common": "^24.1.0",
"@ledgerhq/live-common": "^31.7.0",
"@polkadot/types": "^10.9.1",
"@polkadot/util": "^12.4.2",
"@trezor/connect-web": "^9.1.1",
"@trezor/connect-web": "^9.1.2",
"@zondax/ledger-substrate": "^0.40.7",
"ethereumjs-util": "^7.1.5",
"hdkey": "^2.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/hw-wallets/src/ledger/ledgerConnect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NetworkNames } from "@enkryptcom/types";
import getDeviceInfo from "@ledgerhq/live-common/src/hw/getDeviceInfo";
import openApp from "@ledgerhq/live-common/src/hw/openApp";
import getAppAndVersion from "@ledgerhq/live-common/src/hw/getAppAndVersion";
import getDeviceInfo from "@ledgerhq/live-common/lib/hw/getDeviceInfo";
import openApp from "@ledgerhq/live-common/lib/hw/openApp";
import getAppAndVersion from "@ledgerhq/live-common/lib/hw/getAppAndVersion";
import type LedgerEthereum from "./ethereum";
import type LedgerSubstrate from "./substrate";
import { ledgerAppNames } from "../configs";
Expand Down
8 changes: 4 additions & 4 deletions packages/keyring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@polkadot/util": "^12.4.2",
"assert": "^2.0.0",
"assert": "^2.1.0",
"bip39": "^3.1.0"
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.8",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/name-resolution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"node": ">=14.15.0"
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.8",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"node-fetch": "^2.7.0",
"reconnecting-websocket": "^4.4.0",
"uuid": "^9.0.0",
"ws": "^8.13.0"
"ws": "^8.14.1"
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.8",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/signers/bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
},
"devDependencies": {
"@enkryptcom/types": "workspace:^",
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/hdkey": "^2.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/signers/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
},
"devDependencies": {
"@enkryptcom/types": "workspace:^",
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/hdkey": "^2.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.7",
"@types/node": "^20.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand Down
Loading

1 comment on commit d5db1d4

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.