Skip to content

Commit

Permalink
SDK Modernization (#69)
Browse files Browse the repository at this point in the history
* Blatant copy-paste from stellar-sdk + re-yarning
* Dependency shuffle and full upgrade
* Adjust babel to broader browser compatibility
  • Loading branch information
Shaptic authored May 18, 2023
1 parent 683a7a8 commit 678bbaa
Show file tree
Hide file tree
Showing 34 changed files with 3,986 additions and 6,053 deletions.
26 changes: 20 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"presets": ["es2015"],
"plugins": [
["babel-plugin-transform-builtin-extend", {
"globals": ["Error"]
}]
]
"comments": true,
"presets": [
"@babel/preset-env",
"@babel/typescript",
],
"env": {
"development": {
"plugins": [
"istanbul"
]
}
},
"targets": {
"node": 14,
"browsers": [
"> 2%",
"ie 11",
"not op_mini all"
]
}
}
9 changes: 5 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = {
parser: "@babel/eslint-parser",
env: {
node: true
node: true,
},
extends: ['eslint:recommended', 'plugin:node/recommended'],
extends: ["eslint:recommended", "plugin:node/recommended"],
rules: {
'node/no-unpublished-require': 0
}
"node/no-unpublished-require": 0,
},
};
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
6 changes: 3 additions & 3 deletions .github/workflows/gh_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout SDK
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout Base
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: stellar/js-stellar-base
path: js-stellar-base
Expand All @@ -30,7 +30,7 @@ jobs:
run: gulp

- name: Checkout GH pages
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: stellar/js-soroban-client
ref: gh-pages
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Depencencies
run: yarn
run: yarn install

- name: Build
run: yarn version
- name: Build, Test, and Package
run: yarn preversion

- name: Publish npm package
run: yarn publish
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@ jobs:

strategy:
fail-fast: false
max-parallel: 2
max-parallel: 4
matrix:
node-version: [14, 16]
node-version: [14, 16, 18]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

# Workaround for some `yarn` nonsense, see:
# https://github.com/yarnpkg/yarn/issues/6312#issuecomment-429685210
- name: Install Dependencies
run: yarn install
run: yarn install --network-concurrency 1

- name: Build
run: gulp
run: yarn build:prod

- name: Unit Tests
run: gulp test:unit

- name: Browser Tests
run: gulp test:browser
run: yarn test:node

- name: Integration Tests
run: gulp test:integration
run: yarn test:integration

- name: Browser Tests
run: yarn test:browser
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
/jsdoc/
.DS_Store
.idea/
.nyc_output/
js-stellar-base/
.envrc
4 changes: 0 additions & 4 deletions .jshintrc

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

3 changes: 3 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@istanbuljs/nyc-config-babel"
}
192 changes: 0 additions & 192 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit 678bbaa

Please sign in to comment.