Skip to content

Commit

Permalink
Ignore https-proxy-agent dependency in browser environments (#2133)
Browse files Browse the repository at this point in the history
* Ignore https-proxy-agent in browsers

* ignore eslint-comments/no-unused-disable linting rule
  • Loading branch information
mpint committed Nov 16, 2022
1 parent c4c8e58 commit a4c2bb9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/xrpl/.eslintrc.js
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
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
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
@@ -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
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

0 comments on commit a4c2bb9

Please sign in to comment.