diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faf510f..3bf7ee2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' @@ -17,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/steel-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -36,7 +38,7 @@ jobs: timeout-minutes: 5 name: build runs-on: ${{ github.repository == 'stainless-sdks/steel-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read id-token: write diff --git a/.gitignore b/.gitignore index 2412bb7..c85fe68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log node_modules yarn-error.log codegen.log diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5e39b94..513fac0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.18.0" + ".": "0.18.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 00fd031..adeb05e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 0.18.1 (2026-03-27) + +Full Changelog: [v0.18.0...v0.18.1](https://github.com/steel-dev/steel-node/compare/v0.18.0...v0.18.1) + +### Chores + +* **ci:** skip lint on metadata-only changes ([24d527e](https://github.com/steel-dev/steel-node/commit/24d527ee0bbb9159048c661a2d3d0033c633ad08)) +* **internal:** tweak CI branches ([fa4a3c8](https://github.com/steel-dev/steel-node/commit/fa4a3c8cb25f384b0011669024aa85d51d908636)) +* **internal:** update gitignore ([8f42087](https://github.com/steel-dev/steel-node/commit/8f42087e15148c16aa986c3eea1b97b92f6c4823)) +* **internal:** update multipart form array serialization ([30cc0e9](https://github.com/steel-dev/steel-node/commit/30cc0e9954f7b602cabeec5267a1fcb9fd4f96de)) +* **tests:** bump steady to v0.19.4 ([ebe3263](https://github.com/steel-dev/steel-node/commit/ebe3263f2a981298c9bfe55b8459b33b0dc0ed86)) +* **tests:** bump steady to v0.19.5 ([9f1d01b](https://github.com/steel-dev/steel-node/commit/9f1d01b37859cfff93c2573125e071cfe0a91625)) +* **tests:** bump steady to v0.19.6 ([c17e027](https://github.com/steel-dev/steel-node/commit/c17e02724dd15ae8305d459156fd2bf76f596d77)) +* **tests:** bump steady to v0.19.7 ([c92d874](https://github.com/steel-dev/steel-node/commit/c92d8740ee32a60c865f8ee8ef73b16a3fbc0fd0)) + + +### Refactors + +* **tests:** switch from prism to steady ([afabeb3](https://github.com/steel-dev/steel-node/commit/afabeb349db6ed4586b5312c263350af5d6eaec9)) + ## 0.18.0 (2026-03-16) Full Changelog: [v0.17.0...v0.18.0](https://github.com/steel-dev/steel-node/compare/v0.17.0...v0.18.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2a9271..d000233 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ $ pnpm link --global steel-sdk ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/package.json b/package.json index 8d1b622..3fc6e2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steel-sdk", - "version": "0.18.0", + "version": "0.18.1", "description": "The official TypeScript library for the Steel API", "author": "Steel ", "types": "dist/index.d.ts", diff --git a/scripts/mock b/scripts/mock index bcf3b39..290e21b 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 7bce051..a1ebb5e 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi diff --git a/src/version.ts b/src/version.ts index 74131f9..53b4ff4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.18.0'; // x-release-please-version +export const VERSION = '0.18.1'; // x-release-please-version diff --git a/tests/api-resources/files.test.ts b/tests/api-resources/files.test.ts index ab17d35..07ac6c4 100644 --- a/tests/api-resources/files.test.ts +++ b/tests/api-resources/files.test.ts @@ -42,8 +42,7 @@ describe('resource files', () => { ); }); - // Mock server doesn't support application/octet-stream responses - test.skip('download: request options instead of params are passed correctly', async () => { + test('download: request options instead of params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect(client.files.download('path', { path: '/_stainless_unknown_path' })).rejects.toThrow( Steel.NotFoundError, diff --git a/tests/api-resources/sessions/files.test.ts b/tests/api-resources/sessions/files.test.ts index cc343b0..2515e16 100644 --- a/tests/api-resources/sessions/files.test.ts +++ b/tests/api-resources/sessions/files.test.ts @@ -60,16 +60,14 @@ describe('resource files', () => { ).rejects.toThrow(Steel.NotFoundError); }); - // Mock server doesn't support application/octet-stream responses - test.skip('download: request options instead of params are passed correctly', async () => { + test('download: request options instead of params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.sessions.files.download('sessionId', 'path', { path: '/_stainless_unknown_path' }), ).rejects.toThrow(Steel.NotFoundError); }); - // Mock server doesn't support application/zip responses - test.skip('downloadArchive: request options instead of params are passed correctly', async () => { + test('downloadArchive: request options instead of params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.sessions.files.downloadArchive('sessionId', { path: '/_stainless_unknown_path' }),