diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 000000000..22decfdae --- /dev/null +++ b/.github/workflows/format.yml @@ -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) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3047b8afa..92f87cb67 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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) \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d7ec65c26..e0c79a895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)