Skip to content

release: 0.4.0#5

Open
stainless-app[bot] wants to merge 33 commits intomainfrom
release-please--branches--main--changes--next
Open

release: 0.4.0#5
stainless-app[bot] wants to merge 33 commits intomainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented Apr 22, 2026

Automated Release PR

0.4.0 (2026-04-25)

Full Changelog: v0.3.0...v0.4.0

Features

  • api: api update (e9d6bea)
  • api: api update (607c495)
  • api: api update (7197e8f)
  • cli: add --raw-output/-r option to print raw (non-JSON) strings (28be4fa)
  • cli: alias parameters in data with x-stainless-cli-data-alias (96d1bfc)
  • cli: send filename and content type when reading input from files (4dc5824)

Bug Fixes

  • escape ampersand in OpenAPI summaries for C# XML docs (6d5da37)
  • fix for failing to drop invalid module replace in link script (a086faf)

Chores

  • add documentation for ./scripts/link (1fe38e3)
  • ci: support manually triggering release workflow (c947c68)
  • cli: additional test cases for ShowJSONIterator (3d20d69)
  • cli: fall back to JSON when using default "explore" with non-TTY (f48c1f0)
  • cli: let --format raw be used in conjunction with --transform (5a0010a)
  • cli: switch long lists of positional args over to param structs (21a0bc9)
  • cli: use ShowJSONOpts as argument to formatJSON instead of many positionals (9a34472)
  • internal: codegen related update (f783c02)
  • internal: more robust bootstrap script (262e4d3)
  • sync OpenAPI spec (0f0687b)
  • wire production_repo for all targets (d46e8ec)

Documentation

  • add Contributor Covenant 2.1 Code of Conduct (#2192) (c253bcb)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Note

Add --raw-output flag and ShowJSONOpts output pipeline to all CLI commands for v0.4.0

  • Introduces a global --raw-output (-r) flag that prints string JSON values without quotes, and refactors all command handlers to pass output options via a new ShowJSONOpts struct (replacing positional os.Stdout args).
  • ShowJSON and ShowJSONIterator now fall back from explore to json format when stdout is not a terminal, emitting a warning if --format was explicitly set.
  • Removes the integrations command group and its subcommands from the CLI entirely.
  • Adds --media flag to x:tweets create and makes --text optional when media is provided; adds --count/--woeid to x get-trends; adds --email/--proxy-country to x:accounts reauth; adds --after/--limit to radar trending topics.
  • Alias translation is added so YAML/stdin keys using user-facing flag aliases are rewritten to canonical API field names before encoding.
  • Risk: removing the integrations command group is a breaking CLI change for any scripts relying on those subcommands.

Macroscope summarized e3afe9b.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 927aa2d to 62d40bb Compare April 22, 2026 21:17
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Apr 22, 2026

🧪 Testing

To try out this version of the SDK:

Download and unzip: 'https://pkg.stainless.com/s/x-twitter-scraper-cli/262e4d3ee4b8d64258ffda8ca1f8d283bdbc35bf/dist.zip'. On macOS, run 'xattr -d com.apple.quarantine {executable name}'.

Expires at: Mon, 25 May 2026 05:29:03 GMT
Updated at: Sat, 25 Apr 2026 05:29:03 GMT

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This is an automated Stainless SDK release (v0.4.0) that ships three main feature areas: a ShowJSONOpts struct refactor consolidating ShowJSON/ShowJSONIterator/formatJSON signatures, a new --raw-output/-r flag (strips JSON quotes from string results, à la jq -r), and a fileUpload wrapper that carries filename and content-type metadata for multipart uploads. It also adds x-stainless-cli-data-alias support (key aliasing in piped YAML/JSON), drops the integrations API resource, and makes the tweet --text parameter optional when --media is provided.

Confidence Score: 5/5

This PR is safe to merge; all remaining findings are P2 or lower.

The refactoring is thorough and consistent across all 83 files. The only known issue (reversed expected/actual in two ContentType assertions) was already flagged in a previous review thread and does not affect test pass/fail outcomes. No logic bugs or security concerns were found in the new features.

pkg/cmd/flagoptions_test.go (reversed require.Equal args at lines 365/379, already flagged in prior thread)

Important Files Changed

Filename Overview
pkg/cmd/cmdutil.go Refactored ShowJSON, ShowJSONIterator, and formatJSON to accept a ShowJSONOpts struct instead of positional args; added --raw-output flag support (strips JSON quotes from strings, like jq -r) and explore→json fallback on non-TTY with optional warning.
pkg/cmd/flagoptions.go Added fileUpload struct with Filename/ContentType metadata for multipart uploads; added applyDataAliases/rewriteAliases for x-stainless-cli-data-alias support; added EmbedIOReader handling for FilePathValue (direct file path without @ prefix).
internal/requestflag/innerflag.go Added DataAliases field and GetDataAliases/GetInnerField accessor methods to InnerFlag and HasOuterFlag interface for the data-alias feature.
internal/requestflag/requestflag.go Added DataAliases field and GetDataAliases method to Flag and InRequest interface, enabling alias translation for piped YAML/JSON input.
pkg/cmd/cmdutil_test.go Added comprehensive tests for formatJSON (raw format, RawOutput, transforms), ShowJSONIterator (limits, transforms), and explore→json fallback; require.Equal arguments are correctly ordered throughout.
pkg/cmd/flagoptions_test.go Added TestEmbedFilesUploadMetadata verifying filename and content-type metadata on fileUpload; ContentType() assertions have reversed expected/actual arguments at lines 365 and 379 (previously flagged).
pkg/cmd/integration.go Entire file deleted — integrations API resource removed from the CLI following upstream API update.
pkg/cmd/xtweet.go Made --text optional (now valid without text when media is provided); added --media flag for media URL arrays; updated usage strings; migrated ShowJSON calls to ShowJSONOpts struct.
pkg/cmd/cmd.go Added --raw-output/-r global flag; removed integrations command group from the CLI root.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["CLI handler\ncmd.Root().Bool('raw-output')\ncmd.Root().String('format')"] --> B["ShowJSON(res, ShowJSONOpts)"]
    B --> C{format?}
    C -->|auto| D["recurse with 'json'"]
    C -->|explore| E{isTerminal?}
    E -->|yes| F["jsonview.ExploreJSON"]
    E -->|no| G["warn if ExplicitFormat\nrecurse with 'json'"]
    C -->|other| H["formatJSON(res, opts)"]
    H --> I{RawOutput && String?}
    I -->|yes| J["return res.Str + newline\n(no JSON quotes)"]
    I -->|no| K{format switch}
    K -->|raw| L["res.Raw + newline"]
    K -->|json| M["pretty.Pretty + color"]
    K -->|jsonl| N["@ugly + newline"]
    K -->|yaml| O["json2yaml.Convert"]
    K -->|pretty| P["jsonview.RenderJSON"]

    Q["piped/flag YAML body"] --> R["applyDataAliases(cmd, bodyMap)"]
    R --> S["rewriteAliases: alias key → canonical key"]
    S --> T["flagOptions merges with flag values"]
Loading

Reviews (4): Last reviewed commit: "release: 0.4.0" | Re-trigger Greptile

Comment thread pkg/cmd/flagoptions_test.go
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch 3 times, most recently from 928d091 to 0834429 Compare April 23, 2026 02:44
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​Xquik-dev/​x-twitter-scraper-go@​v0.3.0 ⏵ v0.4.072100100100100

View full report

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 0834429 to e3afe9b Compare April 25, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants