Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore https-proxy-agent dependency in browser environments #2133

Merged
merged 3 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/xrpl/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module.exports = {
plugins: [],
extends: ['@xrplf/eslint-config/base', 'plugin:mocha/recommended'],
rules: {
// Disabled until https://github.com/import-js/eslint-plugin-import/pull/2305 is resolved to
// accomodate this change https://github.com/XRPLF/xrpl.js/pull/2133
'import/no-unused-modules': 'off',
'eslint-comments/no-unused-disable': 'off',
// Certain rippled APIs require snake_case naming
'@typescript-eslint/naming-convention': [
'error',
Expand Down
4 changes: 4 additions & 0 deletions packages/xrpl/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xrpl-announce) for release announcements. We recommend that xrpl.js (ripple-lib) users stay up-to-date with the latest stable release.
## Unreleased

### Fixed
* Ignore `https-proxy-agent` in browsers for improved Vite integration

### Added
* Optional custom amount field to `fundWallet`.

Expand Down
3 changes: 2 additions & 1 deletion packages/xrpl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test": "test"
},
"browser": {
"ws": "./dist/npm/client/WSWrapper.js"
"ws": "./dist/npm/client/WSWrapper.js",
"https-proxy-agent": false
},
"dependencies": {
"bignumber.js": "^9.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/xrpl/src/client/WSWrapper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/no-unused-modules -- Used by webpack */
/* eslint-disable max-classes-per-file -- Needs to be a wrapper for ws */
import { EventEmitter } from 'events'

Expand Down
1 change: 0 additions & 1 deletion packages/xrpl/src/models/methods/subscribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export interface LedgerStream extends BaseStream {
/**
* This response mirrors the LedgerStream, except it does NOT include the 'type' nor 'txn_count' fields.
*/
// eslint-disable-next-line import/no-unused-modules -- Detailed enough to be worth exporting for end users.
export interface LedgerStreamResponse {
/**
* The reference transaction cost as of this ledger version, in drops of XRP.
Expand Down