Skip to content

Commit

Permalink
Separate out code linting into its own workflow (#1065)
Browse files Browse the repository at this point in the history
* Clean up changelog a bit
  • Loading branch information
Shaptic authored Sep 27, 2024
1 parent 87b0fa1 commit 3258c8a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Code Formatting

on:
push:
branches: [ master ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20

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

- name: Run Linter Checks
run: yarn _prettier && (git diff-index --quiet HEAD; git diff)
5 changes: 1 addition & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,5 @@ jobs:
- name: Browser Tests
run: yarn test:browser

- name: Browser No Axios Tests
- name: Browser Tests (No Axios)
run: yarn test:browser:no-axios

- name: Linter Tests
run: yarn _prettier && (git diff-index --quiet HEAD; git diff)
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ export interface BalanceResponse {
};
}
```

- New build target for creating a browser bundle without Axios dependency. Set USE_AXIOS=false environment variable to build stellar-sdk-no-axios.js and stellar-sdk-no-axios.min.js in the dist/ directory. Use yarn build:browser:no-axios to generate these files.
- Similarly, a new import path for the node package without the Axios dependency can be used. Import the SDK using `@stellar/stellar-sdk/no-axios`. For Node.js environments that don't support the package.json `exports` configuration, use `@stellar/stellar-sdk/lib/no-axios/index`.
- You can now build the browser bundle without the `axios` dependency. Set `USE_AXIOS=false` `stellar-sdk-no-axios.js` and `stellar-sdk-no-axios.min.js` in the `dist/` directory, or just run `yarn build:browser:no-axios` to generate these files.
- Similarly, you can import Node packages without the `axios` dependency via `@stellar/stellar-sdk/no-axios`. For Node environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-axios/index`.
- There is also a new build target for creating a browser bundle without EventSource dependency. Set USE_EVENTSOURCE=false environment variable to build stellar-sdk-no-eventsource.js and stellar-sdk-no-eventsource.min.js in the dist/ directory. Use yarn build:browser:no-eventsource to generate these files.
- A new import path for the node package without the EventSource dependency can be used with `@stellar/stellar-sdk/no-eventsource`. For Node.js environments that don't support the package.json `exports` configuration, use `@stellar/stellar-sdk/lib/no-eventsource/index`.
- To use a minimal build without Axios and EventSource, use `stellar-sdk-minimal.js` for the browser build and import from `@stellar/stellar-sdk/minimal` for the node package.
- The Node.js code will now Babelify to Node 18 instead of Node 16, but we stopped supporting Node 16 long ago so this shouldn't be a breaking change.

## [Version Number] - YYYY-MM-DD
- Updated the Node.js target in the Babel configuration from 16 to 18 for production builds.

## [v12.3.0](https://github.com/stellar/js-stellar-sdk/compare/v12.2.0...v12.3.0)

Expand Down

0 comments on commit 3258c8a

Please sign in to comment.