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

[CHORE] Core dependency upgrade #1865

Merged
merged 39 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
45ecef5
Bump the major group across 5 directories with 83 updates
dependabot[bot] Jan 19, 2025
9d78969
upgrades all syntax for breaking changes
aristidesstaffieri Jan 30, 2025
d8c655a
updates test harness and syntax for new major versions, updates Route…
aristidesstaffieri Jan 30, 2025
514edaf
migrate navigateTo to use v7 API, fix tests for send payment
aristidesstaffieri Jan 30, 2025
429201d
updates account tests for new router model
aristidesstaffieri Jan 31, 2025
4a7f495
updates account creator tests for new router model
aristidesstaffieri Jan 31, 2025
081b57a
updates account history tests for new router model
aristidesstaffieri Jan 31, 2025
d68a8e7
updates grant access tests for new router model
aristidesstaffieri Jan 31, 2025
fc3d4e1
updates manage assets tests for new router model
aristidesstaffieri Jan 31, 2025
e333ae9
updates mnemonic phrase tests for new router model
aristidesstaffieri Jan 31, 2025
71102d5
updates review auth tests for new router model
aristidesstaffieri Jan 31, 2025
f95ec60
updates send token payment tests for new router model
aristidesstaffieri Jan 31, 2025
65c7d68
updates sign tx tests for new router model
aristidesstaffieri Jan 31, 2025
5cb10ab
updates swap tests for new router model
aristidesstaffieri Jan 31, 2025
a4bc4d0
updates swap unfunded tests for new router model
aristidesstaffieri Jan 31, 2025
6c80d2a
updates operation keyval tests for new router model
aristidesstaffieri Jan 31, 2025
601063f
catches up e2e tests to upstream changes
aristidesstaffieri Jan 31, 2025
c9da8f0
bumps node version in CI to 22
aristidesstaffieri Jan 31, 2025
54db544
cleans up imports in ManageAssets test, adds jest dom types to API ts…
aristidesstaffieri Jan 31, 2025
df47a2b
temporarily dont fail on eslint failure
aristidesstaffieri Jan 31, 2025
7aa9973
fixes routing logic for nested routes
aristidesstaffieri Jan 31, 2025
184d8f5
disable eslint - temporary
aristidesstaffieri Jan 31, 2025
4b1ef80
fixes nested routing path handling for router v7, disables tests that…
aristidesstaffieri Jan 31, 2025
f8f2b7f
updates test ID reference in e2e payment tests
aristidesstaffieri Feb 3, 2025
b3ab691
bumps docs node engine to >=22
aristidesstaffieri Feb 3, 2025
25909fe
trigger build to retry docs preview
aristidesstaffieri Feb 3, 2025
79eb390
bumps node version in npm rc for docs
aristidesstaffieri Feb 3, 2025
03bcd79
restores swap index route
aristidesstaffieri Feb 3, 2025
5618e3d
properly handle second level nested routed for settings
aristidesstaffieri Feb 4, 2025
96ef7f5
adds getPathFromRoute to clean up sub routing changes
aristidesstaffieri Feb 11, 2025
add3f0c
upgrades all actions to use node version 22
aristidesstaffieri Feb 11, 2025
d88f696
removes stray comment from refactor
aristidesstaffieri Feb 11, 2025
9134812
redo eslint, prettier, ts configs to be compatible with new major ver…
aristidesstaffieri Feb 11, 2025
c934bef
release/5.27.2 (#1827) (#1828)
piyalbasu Feb 4, 2025
2ed128d
bump versions to 5.27.2 (#1837)
piyalbasu Feb 6, 2025
b7bde94
Release 5.28.0 (#1798)
aristidesstaffieri Feb 20, 2025
71fad87
Bump versions to 5.28.0 (#1862)
github-actions[bot] Feb 20, 2025
4560ad8
Bump @stellar/freighter-api version to (#1864)
github-actions[bot] Feb 21, 2025
7c33f68
Merge remote-tracking branch 'origin' into chore/core-dep-reroll-1
aristidesstaffieri Feb 21, 2025
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
53 changes: 0 additions & 53 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deployFreighterApiBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Build package
uses: actions/setup-node@v4
with:
node-version: "21"
node-version: 22
- name: Version npm package
run: |
cd @stellar/freighter-api
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployFreighterApiProduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Build package
uses: actions/setup-node@v4
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
node-version: 22
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Version npm package
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runSnapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 21
node-version: 22
- name: Checkout code
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 21
node-version: 22
- run: npm install -g yarn && yarn
- run: npx playwright install --with-deps chromium
- run: yarn setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submitBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Build extension
uses: actions/setup-node@v4
with:
node-version: "21"
node-version: 22
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production
- name: Use BETA icons
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submitProduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build extension
uses: actions/setup-node@v4
with:
node-version: "21"
node-version: 22
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production --env AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}" SENTRY_KEY="${{ secrets.SENTRY_KEY }}"
- name: Install zip
uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 #v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submitSafari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Build extension
uses: actions/setup-node@v4
with:
node-version: "21"
node-version: 22
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production --env AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}" SENTRY_KEY="${{ secrets.SENTRY_KEY }}"
- name: Convert extension to Xcode project
run: xcrun safari-web-extension-converter ./extension/build --project-location $GYM_PROJECT --macos-only
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v21
v22
10 changes: 10 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
arrowParens: "always"
bracketSpacing: true
bracketSameLine: false
printWidth: 80
proseWrap: "always"
semi: true
singleQuote: false
tabWidth: 2
trailingComma: "all"
useTabs: false
1 change: 0 additions & 1 deletion @shared/api/helpers/xdr/bigint-encoder.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Ported from https://github.com/stellar/js-xdr/pull/96
// Can remove this and use them through stellar base once it is merged

/* eslint-disable */
export function encodeBigIntFromBits(
parts: any[],
size: number,
Expand Down
2 changes: 0 additions & 2 deletions @shared/api/helpers/xdr/large-int.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
} from "./bigint-encoder";
import { XdrNotImplementedDefinitionError, XdrWriterError } from "./errors";

/* eslint-disable */

/* tslint:disable */
export class LargeInt extends XdrPrimitiveType {
constructor(args) {
Expand Down
10 changes: 4 additions & 6 deletions @shared/api/helpers/xdr/xdr-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { XdrReader } from "./serialization/xdr-reader";
import { XdrWriter } from "./serialization/xdr-writer";
import { XdrNotImplementedDefinitionError } from "./errors";

/* eslint-disable */

/* tslint:disable */
class XdrType {
write: any;
Expand Down Expand Up @@ -90,7 +88,7 @@ export class XdrPrimitiveType extends XdrType {
* @return {this}
* @abstract
*/
// eslint-disable-next-line no-unused-vars

static read(reader) {
throw new XdrNotImplementedDefinitionError();
}
Expand All @@ -102,7 +100,7 @@ export class XdrPrimitiveType extends XdrType {
* @return {void}
* @abstract
*/
// eslint-disable-next-line no-unused-vars

static write(value, writer) {
throw new XdrNotImplementedDefinitionError();
}
Expand All @@ -113,7 +111,7 @@ export class XdrPrimitiveType extends XdrType {
* @return {Boolean}
* @abstract
*/
// eslint-disable-next-line no-unused-vars

static isValid(value) {
return false;
}
Expand All @@ -128,7 +126,7 @@ export class XdrCompositeType extends XdrType {
* @return {Boolean}
* @abstract
*/
// eslint-disable-next-line no-unused-vars

isValid(value) {
return false;
}
Expand Down
30 changes: 12 additions & 18 deletions @shared/api/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,12 @@ export const getAccountBalancesStandalone = async ({
balances = resp.balances;
subentryCount = resp.subentryCount;

// eslint-disable-next-line no-plusplus
for (let i = 0; i < Object.keys(resp.balances).length; i++) {
const k = Object.keys(resp.balances)[i];
const v = resp.balances[k];
if (v.liquidityPoolId) {
const server = stellarSdkServer(networkUrl, networkPassphrase);
// eslint-disable-next-line no-await-in-loop

const lp = await server
.liquidityPools()
.liquidityPoolId(v.liquidityPoolId)
Expand Down Expand Up @@ -623,7 +622,6 @@ export const getAccountBalancesStandalone = async ({
1 tx with an operation for each value.
*/
try {
/* eslint-disable no-await-in-loop */
const { balance, symbol, ...rest } = await getSorobanTokenBalance(
server,
tokenId,
Expand All @@ -635,7 +633,6 @@ export const getAccountBalancesStandalone = async ({
},
params,
);
/* eslint-enable no-await-in-loop */

const total = new BigNumber(balance);

Expand Down Expand Up @@ -877,15 +874,15 @@ export const getAssetIcons = async ({
if (balances) {
let icon = "";
const balanceValues = Object.values(balances);
// eslint-disable-next-line no-plusplus

for (let i = 0; i < balanceValues.length; i++) {
const { token } = balanceValues[i];
if (token && "issuer" in token) {
const {
issuer: { key },
code,
} = token;
// eslint-disable-next-line no-await-in-loop

icon = await getIconUrlFromIssuer({ key, code, networkDetails });
assetIcons[`${code}:${key}`] = icon;
}
Expand Down Expand Up @@ -931,15 +928,15 @@ export const getAssetDomains = async ({

if (balances) {
const balanceValues = Object.values(balances);
// eslint-disable-next-line no-plusplus

for (let i = 0; i < balanceValues.length; i++) {
const { token } = balanceValues[i];
if (token && "issuer" in token) {
const {
issuer: { key },
code,
} = token;
// eslint-disable-next-line no-await-in-loop

const domain = await getDomainFromIssuer({ key, code, networkDetails });
assetDomains[`${code}:${key}`] = domain;
}
Expand Down Expand Up @@ -1124,15 +1121,14 @@ export const submitFreighterSorobanTransaction = async ({
// Poll this until the status is not "NOT_FOUND"
while (txResponse.status === GetTxStatus.NotFound) {
// See if the transaction is complete
// eslint-disable-next-line no-await-in-loop

txResponse = await server.getTransaction(response.hash);
// Wait a second
// eslint-disable-next-line no-await-in-loop

await new Promise((resolve) => setTimeout(resolve, 1000));
}

return response;
// eslint-disable-next-line no-else-return
} else {
throw new Error(
`Unabled to submit transaction, status: ${response.status}`,
Expand Down Expand Up @@ -1517,18 +1513,17 @@ export const simulateTokenTransfer = async (args: {
const options = {
method: "POST",
headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
"Content-Type": "application/json",
},
body: JSON.stringify({
address,
// eslint-disable-next-line @typescript-eslint/naming-convention

pub_key: publicKey,
memo,
params,
// eslint-disable-next-line @typescript-eslint/naming-convention

network_url: networkDetails.sorobanRpcUrl,
// eslint-disable-next-line @typescript-eslint/naming-convention

network_passphrase: networkDetails.networkPassphrase,
}),
};
Expand All @@ -1548,14 +1543,13 @@ export const simulateTransaction = async (args: {
const options = {
method: "POST",
headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
"Content-Type": "application/json",
},
body: JSON.stringify({
xdr,
// eslint-disable-next-line @typescript-eslint/naming-convention

network_url: networkDetails.sorobanRpcUrl,
// eslint-disable-next-line @typescript-eslint/naming-convention

network_passphrase: networkDetails.networkPassphrase,
}),
};
Expand Down
13 changes: 6 additions & 7 deletions @shared/api/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
"name": "@shared/api",
"prettier": "@stellar/prettier-config",
"prettier": "../../.prettierrc.yaml",
"version": "1.0.0",
"private": true,
"dependencies": {
"@blockaid/client": "^0.31.0",
"@stellar/js-xdr": "^3.1.1",
"bignumber.js": "^9.1.1",
"prettier": "^2.0.5",
"@stellar/js-xdr": "^3.1.2",
"bignumber.js": "^9.1.2",
"prettier": "^3.4.2",
"stellar-sdk": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"stellar-sdk-next": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"typescript": "~3.7.2",
"typescript": "~5.7.3",
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1",
"@stellar/prettier-config": "^1.0.1"
"@lavamoat/allow-scripts": "^3.3.1"
},
"lavamoat": {
"allowScripts": {
Expand Down
2 changes: 0 additions & 2 deletions @shared/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ export type AssetType = AssetBalance | NativeBalance | TokenBalance;

export type TokenBalances = SorobanBalance[];

/* eslint-disable camelcase */
export type HorizonOperation = Horizon.ServerApi.OperationRecord;
/* eslint-enable camelcase */

export interface AccountBalancesInterface {
balances: Balances;
Expand Down
7 changes: 3 additions & 4 deletions @shared/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"name": "@shared/constants",
"prettier": "@stellar/prettier-config",
"prettier": "../../.prettierrc.yaml",
"version": "1.0.0",
"dependencies": {
"stellar-sdk": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"stellar-sdk-next": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"typescript": "~3.7.2"
"typescript": "~5.7.3"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1",
"@stellar/prettier-config": "^1.0.1"
"@lavamoat/allow-scripts": "^3.3.1"
},
"lavamoat": {
"allowScripts": {
Expand Down
10 changes: 4 additions & 6 deletions @shared/helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"name": "@shared/helpers",
"prettier": "@stellar/prettier-config",
"prettier": "../../.prettierrc.yaml",
"version": "1.0.0",
"dependencies": {
"bignumber.js": "^9.1.1",
"bignumber.js": "^9.1.2",
"stellar-sdk": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"stellar-sdk-next": "yarn:@stellar/stellar-sdk@13.0.0-beta.1",
"typescript": "~3.7.2"
"typescript": "~5.7.3"
},
"devDependencies": {
"@stellar/prettier-config": "^1.0.1"
}
"devDependencies": {}
}
Loading