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

Republish package under @stellar/ scope #714

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
13 changes: 11 additions & 2 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ jobs:
- name: Test & Build
run: yarn preversion

- name: Publish release npm package
run: yarn publish --tag beta
- name: Publish npm package to both places
run: |
yarn publish --tag beta --access public
sed -i -e 's#"@stellar/stellar-base"#"stellar-base"#' package.json
yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deprecate the old package
run: |
npm deprecate stellar-base@latest "⚠️ This package has moved to @stellar/stellar-base! 🚚"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "stellar-base",
"name": "@stellar/stellar-base",
"version": "10.0.0-beta.4",
"description": "Low-level support library for the Stellar network.",
"main": "./lib/index.js",
Expand Down Expand Up @@ -123,7 +123,7 @@
"base32.js": "^0.1.0",
"bignumber.js": "^9.1.2",
"buffer": "^6.0.3",
"js-xdr": "^3.0.0",
"@stellar/js-xdr": "^3.0.1",
"sha.js": "^2.3.6",
"tweetnacl": "^1.0.3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/generated/curr_generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* jshint maxstatements:2147483647 */
/* jshint esnext:true */

import * as XDR from "js-xdr";
import * as XDR from "@stellar/js-xdr";

var types = XDR.config((xdr) => {
// Workaround for https://github.com/stellar/xdrgen/issues/152
Expand Down
2 changes: 1 addition & 1 deletion src/generated/next_generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* jshint maxstatements:2147483647 */
/* jshint esnext:true */

import * as XDR from "js-xdr";
import * as XDR from "@stellar/js-xdr";

var types = XDR.config((xdr) => {
// Workaround for https://github.com/stellar/xdrgen/issues/152
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export {
LiquidityPoolFeeV18
} from './get_liquidity_pool_id';
export { Keypair } from './keypair';
export { UnsignedHyper, Hyper } from 'js-xdr';
export { UnsignedHyper, Hyper } from '@stellar/js-xdr';
export { TransactionBase } from './transaction_base';
export { Transaction } from './transaction';
export { FeeBumpTransaction } from './fee_bump_transaction';
Expand Down
2 changes: 1 addition & 1 deletion src/memo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnsignedHyper } from 'js-xdr';
import { UnsignedHyper } from '@stellar/js-xdr';
import BigNumber from 'bignumber.js';
import xdr from './xdr';

Expand Down
2 changes: 1 addition & 1 deletion src/numbers/int128.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LargeInt } from 'js-xdr';
import { LargeInt } from '@stellar/js-xdr';

export class Int128 extends LargeInt {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/numbers/int256.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LargeInt } from 'js-xdr';
import { LargeInt } from '@stellar/js-xdr';

export class Int256 extends LargeInt {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/numbers/uint128.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LargeInt } from 'js-xdr';
import { LargeInt } from '@stellar/js-xdr';

export class Uint128 extends LargeInt {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/numbers/uint256.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LargeInt } from 'js-xdr';
import { LargeInt } from '@stellar/js-xdr';

export class Uint256 extends LargeInt {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/numbers/xdr_large_int.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint no-bitwise: ["error", {"allow": [">>"]}] */
import { Hyper, UnsignedHyper } from 'js-xdr';
import { Hyper, UnsignedHyper } from '@stellar/js-xdr';

import { Uint128 } from './uint128';
import { Uint256 } from './uint256';
Expand Down
2 changes: 1 addition & 1 deletion src/operation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-bitwise */

import { Hyper } from 'js-xdr';
import { Hyper } from '@stellar/js-xdr';
import BigNumber from 'bignumber.js';
import { trimEnd } from './util/util';
import { best_r } from './util/continued_fraction';
Expand Down
2 changes: 1 addition & 1 deletion src/operations/bump_sequence.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hyper } from 'js-xdr';
import { Hyper } from '@stellar/js-xdr';
import BigNumber from 'bignumber.js';
import xdr from '../xdr';

Expand Down
2 changes: 1 addition & 1 deletion src/operations/change_trust.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hyper } from 'js-xdr';
import { Hyper } from '@stellar/js-xdr';
import BigNumber from 'bignumber.js';
import xdr from '../xdr';
import { Asset } from '../asset';
Expand Down
2 changes: 1 addition & 1 deletion src/operations/manage_buy_offer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hyper } from 'js-xdr';
import { Hyper } from '@stellar/js-xdr';
import xdr from '../xdr';
/**
* Returns a XDR ManageBuyOfferOp. A "manage buy offer" operation creates, updates, or
Expand Down
2 changes: 1 addition & 1 deletion src/operations/manage_sell_offer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hyper } from 'js-xdr';
import { Hyper } from '@stellar/js-xdr';
import xdr from '../xdr';
/**
* Returns a XDR ManageSellOfferOp. A "manage sell offer" operation creates, updates, or
Expand Down
5 changes: 1 addition & 4 deletions src/soroban.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* @class Soroban
* Soroban helper class to assist with formatting and parsing token amounts.
*/
/** Soroban helper class to assist with formatting and parsing token amounts. */

Check warning on line 1 in src/soroban.js

View workflow job for this annotation

GitHub Actions / build

JSDoc syntax error

Check warning on line 1 in src/soroban.js

View workflow job for this annotation

GitHub Actions / build

JSDoc syntax error
export class Soroban {
/**
* Given a whole number smart contract amount of a token and an amount of
Expand Down
2 changes: 1 addition & 1 deletion src/transaction_builder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnsignedHyper } from 'js-xdr';
import { UnsignedHyper } from '@stellar/js-xdr';
import BigNumber from 'bignumber.js';

import xdr from './xdr';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/i256_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// import { XdrWriter, XdrReader } from 'js-xdr';
// import { XdrWriter, XdrReader } from '@stellar/js-xdr';
const I256 = StellarBase.Int256; // shorthand

describe('I256.isValid', function () {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/soroban_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ describe('Soroban', function () {
{
amount: '1000000001.1',
decimals: 7,
expected: /No decimal is allowed/
expected: /No decimals are allowed/
},
{
amount: '10000.00001.1',
decimals: 4,
expected: /No decimal is allowed/
expected: /No decimals are allowed/
}
];

Expand Down
2 changes: 1 addition & 1 deletion test/unit/transaction_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnsignedHyper } from 'js-xdr';
import { UnsignedHyper } from '@stellar/js-xdr';
import randomBytes from 'randombytes';

describe('Transaction', function () {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,11 @@
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==

"@stellar/js-xdr@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@stellar/js-xdr/-/js-xdr-3.0.1.tgz#d500f1e1332210cd56e0ef95e44c54506d9f48f3"
integrity sha512-dp5Eh7Nr1YjiIeqpdkj2cQYxfoPudDAH3ck8MWggp48Htw66Z/hUssNYUQG/OftLjEmHT90Z/dtey2Y77DOxIw==

"@tsconfig/node10@^1.0.7":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2"
Expand Down Expand Up @@ -4558,11 +4563,6 @@ js-tokens@^4.0.0:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-xdr@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/js-xdr/-/js-xdr-3.0.0.tgz#fb74275de0ed3cec61269721140a576edf6fca7e"
integrity sha512-tSt6UKJ2L7t+yaQURGkHo9kop9qnVbChTlCu62zNiDbDZQoZb/YjUj2iFJ3lgelhfg9p5bhO2o/QX+g36TPsSQ==

[email protected], js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
Expand Down
Loading