Open
Conversation
New files created - pnpm-workspace.yaml - Workspace packages definition (replaces workspaces in package.json) - .npmrc - pnpm config: node-linker=hoisted, ignore-scripts=true - pnpm-lock.yaml - Generated lockfile Files modified - package.json - Updated packageManager to pnpm@9.15.4, removed workspaces array, removed @yarnpkg/sdks devDep, converted resolutions to pnpm.overrides, added pnpm.packageExtensions (from .yarnrc.yml), added @types/minimatch override (fix for stub package hoisting), converted all scripts to pnpm, added missing build:storybook script - packages/adena-extension/package.json - Changed workspace deps to workspace:* protocol - packages/adena-torus-signin/package.json - Removed packageManager and resolutions - packages/adena-module/rollup.config.js - Added explicit include patterns for rpt2 (fix for picomatch extglob compatibility) - packages/adena-module/tsconfig.json - Added skipLibCheck: true (fixes @types/node compatibility with TS 4.9.5) - packages/adena-torus-signin/tsconfig.json - Added skipLibCheck: true - .github/actions/setup/action.yml - Added pnpm/action-setup@v4, changed cache to pnpm - .github/workflows/pull-request-test.yml - yarn -> pnpm install/pnpm - .github/workflows/build-deploy.yml - yarn -> pnpm install/pnpm - .husky/pre-commit - yarn lint-staged -> pnpm lint-staged - .gitignore - Removed yarn entries, added pnpm-debug.log*, added yarn.lock - README.md / packages/adena-module/README.md - yarn -> pnpm in commands Files deleted - .yarn/ (entire directory - plugins, releases, sdks) - .yarnrc.yml, .yarnrc - yarn.lock Verification - pnpm install - 1699 packages installed - pnpm build:module - Both adena-module and adena-torus-signin build successfully - pnpm build:service - Extension builds successfully (webpack compiled with only size warnings) - pnpm run test - 121 test suites, 200 tests all passing
Replace legacy build stack (Babel, Rollup, Jest, Prettier, legacy ESLint) with modern equivalents (tsdown, Vitest, flat ESLint config with @Stylistic). Replace libsodium-wrappers-sumo (~350KB WASM) with lightweight pure-JS @noble packages for all three crypto operations: - Argon2id: @noble/hashes/argon2 - Ed25519 keypair/sign/verify: @noble/curves/ed25519 - XChaCha20-Poly1305 AEAD: @noble/ciphers/chacha This eliminates the WASM initialization overhead (no more `await sodium.ready`) while maintaining full API compatibility — all methods remain async to avoid breaking callers. Simplify platform-detection shims left over from the Webpack/Babel era: - pbkdf2.ts: Remove getCryptoModule/getSubtle/pbkdf2Sha512Subtle/ pbkdf2Sha512Crypto cascade; delegate directly to @noble/hashes/pbkdf2 which works universally in Node and browsers. - random.ts: Remove window/self/msCrypto/require("crypto") fallback chain; use globalThis.crypto.getRandomValues() which is standard in all modern runtimes. Fix all ESLint errors: - Remove all `any` types from pbkdf2.ts and random.ts (eliminated by the refactors above). - Add targeted eslint-disable for intentionally loose interop types in multisig.ts (AminoMessage, ProtoMessage) and messages.ts (encodeMessageValue, Document.msgs). - Fix pre-existing build errors in messages.ts: loosen encodeMessageValue parameter type to match actual callers, fix null vs undefined in MsgRun send field, add MemPackage cast. - Add explicit vitest imports (describe, it, expect, etc.) to all spec files. - Fix missing .js extensions on internal imports for ESM compatibility. All 26 tests pass, build succeeds with zero lint errors.
Migrate adena-extension from legacy Webpack/Babel/Jest/Prettier toolchain
to modern Vite/Vitest/ESLint stack, matching patterns from adena-module.
Bundler: Webpack 5 + Babel -> Vite 6 + @crxjs/vite-plugin
- Replace 25 webpack/babel dependencies with 4 (vite, crxjs, react plugin, node polyfills)
- Create vite.config.ts with CRXJS for MV3 extension building, 16 path aliases,
polyfill shim resolution for pnpm strict mode, and lottie-web light build alias
- Update manifest.json to reference source TS files (CRXJS convention)
- Create popup.html, register.html, security.html at project root as Vite entry points
- Copy static assets (icons, fonts) to public/ for Vite static serving
- Fix lottie-web import from non-standard CJS default to standard ESM default import
- Delete webpack.config.js, .babelrc.json
Linting: ESLint 8 + Prettier -> ESLint 10 + @Stylistic
- Replace 11 eslint/prettier deps with 7 modern equivalents
- Create eslint.config.mjs (flat config) with @Stylistic for formatting,
react/react-hooks plugins, simple-import-sort, typescript-eslint
- Single quotes, 2-space indent, trailing commas, sorted imports
- Disable React Compiler rules from react-hooks v7 (not using React Compiler)
- Downgrade pre-existing violations to warnings (181 any, 279 exhaustive-deps, etc.)
- Fix 11 unused catch variables, 1 missing Error cause
- Run eslint --fix across 878 source files
- Delete .eslintrc.json, .eslintignore, .prettierrc
Testing: Jest 29 -> Vitest 4.1
- Remove jest, babel-jest, ts-jest, jest-environment-jsdom, @types/jest, @jest/globals
- Add vitest 4.1.2, update @testing-library/jest-dom to 6.9.1
- Create vitest.config.ts with path aliases, jsdom env, 30s timeout,
SALT_KEY env var for argon2id key derivation in migration tests
- Create vitest.setup.ts with @testing-library/jest-dom/vitest matchers
- Replace 3 jest.fn() calls with vi.fn()
- Delete jest.config.js, jest.setup.js, svgTransformer.js
- All 116 test files pass (174 tests)
TypeScript: 4.9.5 -> 6.0.2
- Update tsconfig: target es5->es2020, module esnext->es2022,
moduleResolution node->bundler, lib dom+es5+es6->dom+es2022
- Remove unnecessary allowJs, downlevelIteration options
- Remove node/jest/@types/styled-components from types array
- Exclude spec/test/stories from main type-checking
- 13 pre-existing type errors from tm2-js-client version mismatch (not new)
Dependency cleanup:
- Remove @types/styled-components (v6 bundles types)
- Update @types/react 18.2.21->18.3.28, @types/react-dom 18.2.7->18.3.7
- Add lodash as explicit dependency (was implicit via webpack hoisting)
- Sort devDependencies alphabetically
- Clean lockfile
- Refactor GnoProvider to use Tm2Client.abciQuery() via @gnolang/tm2-rpc instead of raw HTTP calls (axios.post, fetch, RestService.post). - Remove the getStatus() override (inherited from BaseTm2Provider), rewrite getGasPrice(), simulateTx(), and getRealmDocument() to use the new ABCI query API, and clean up unused utilities from utils.ts. - Also fix three TypeScript errors: - adena-provider: use async GnoProvider.create() instead of sync constructor - signature-list-item.styles: replace theme.white with theme.neutral._1 - approve-login: wrap navigate() call to discard Promise return - Fix HighlightNumber crash on empty string by guarding BigNumber input, and add explicit vitest imports to all 116 test files.
… to original to ease review
Author
|
Done for public modules. Pending for torus-signin Builds/Tests fine. Next step: extended manual testing |
albttx
reviewed
Apr 8, 2026
| run: | | ||
| yarn | ||
| yarn build | ||
| pnpm install |
| }, | ||
| build: { | ||
| assetsInlineLimit: 0, | ||
| sourcemap: true, |
There was a problem hiding this comment.
Production source maps expose the full wallet source code, making it easier for attackers to study the code for vulnerabilities.
Set to false or 'hidden' for production.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals: