Releases: encoredev/encore
v1.50.6 — Minor fix
What's Changed
Full Changelog: v1.50.5...v1.50.6
Minor fix
v1.50.4 — Minor improvements and bugfixes
What's Changed
- revise migration docs by @marcuskohlberg in #2088
- Revise migration article by @marcuskohlberg in #2089
- Add support for arbitrary precision numbers by @fredr in #2083
- cli: refactor trace store, break out jsonext package by @eandre in #2090
- runtimes/js: dont fail on re-init type constructors by @fredr in #2091
- runtime/js: type constructors fix by @fredr in #2092
- runtimes/js: add per-env type constructors by @eandre in #2094
- add simple e2e test that enabled worker pooling by @fredr in #2096
Full Changelog: v1.50.1...v1.50.4
v1.50.2 — Improvements & bugfixes
What's Changed
- revise migration docs by @marcuskohlberg in #2088
- Revise migration article by @marcuskohlberg in #2089
- Add support for arbitrary precision numbers by @fredr in #2083
- cli: refactor trace store, break out jsonext package by @eandre in #2090
- runtimes/js: dont fail on re-init type constructors by @fredr in #2091
- runtime/js: type constructors fix by @fredr in #2092
- runtimes/js: add per-env type constructors by @eandre in #2094
Full Changelog: v1.50.1...v1.50.2
v1.50.1 — Improvements & fixes
What's Changed
- added open in cursor to mcp docs by @ivancernja in #2060
- use HTML link format for cursor deeplink button by @ivancernja in #2061
- final cursor button: remove align-left and update copy by @ivancernja in #2062
- tsparser: fix panic in parseutil by @eandre in #2065
- tsparser: validate duplicate sqldb definitions by @eandre in #2066
- tsparser: validate sqldb query syntax by @eandre in #2067
- fix swc build by @fredr in #2071
- runtimes/js: output stack traces, error causes by @eandre in #2068
- runtimes/js: support for including error stacks in response logs by @eandre in #2070
- tsparser: validate more sqldb queries by @eandre in #2072
- goparser: detect usages for (objects.Bucket).Exists and .Attrs by @eandre in #2074
- Bump the max NSQ msg size to 10Mb to match gcp by @ekerfelt in #2076
- fix new clippy lints by @fredr in #2080
- error cause: dont coerce into object if val is undefined or null by @fredr in #2079
- Add docs for member management api by @ekerfelt in #2077
- parser: support literal types in GetConcreteType by @eandre in #2082
- Reduce docker build memory load by @ekerfelt in #2085
- Add e2e tests for js apps by @fredr in #2084
- Add endpoints for db browser by @ekerfelt in #2087
New Contributors
- @ivancernja made their first contribution in #2060
Full Changelog: v1.50.0...v1.50.1
v1.50.0 — Redact sensitive data & other improvements
Redacting sensitive data in Encore.ts
When handling sensitive information like API keys, passwords, or personally identifiable information (PII), you may want to prevent these details from appearing in traces.
Encore.ts now allows you to mark an endpoint as sensitive to redact payloads and headers from traces for that endpoint.
Read more in the docs
What's Changed
- runtimes/core: add support for pgvector type by @fredr in #2055
- runtimes/js: add tags to stream endpoints options by @fredr in #2056
- runtimes/core+js: add option to redact tracing details for endpoint by @fredr in #2057
- runtimes/go: fix custom http status on external service to service calls by @fredr in #2058
- docs/ts: sensitive api option by @fredr in #2059
Full Changelog: v1.49.3...v1.50.0
v1.49.3 — Minor improvements & Go 1.25.0 support
v1.49.3 is here and Encore is now bundled with Go 1.25.0 for encore.go ❤️
What's Changed
- fix: small possible typo in the doc by @jamesmindev in #2053
- Add new instructions for vscode vitest workaround by @yingzhox in #1607
- Remove redaction section from ts tracing docs by @asiFarran in #1963
- clientgen: Fix missing documentation in OpenAPI schema generation by @twindebank in #2029
- docs: use correct language by @fredr in #2054
New Contributors
- @jamesmindev made their first contribution in #2053
- @yingzhox made their first contribution in #1607
- @asiFarran made their first contribution in #1963
Full Changelog: v1.49.1...v1.49.3
v1.49.1 — Minor fix
What's Changed
- Add TryWithLeap component to quick start guide by @simon-johansson in #2049
- runtimes/core: enable tls for tokio-tungstenite by @fredr in #2051
Full Changelog: v1.49.0...v1.49.1
v1.49.0 — Custom HTTP Status Codes
Custom HTTP Status Codes
Encore now supports setting custom HTTP status codes in your API responses for both Encore.ts and Encore.go applications.
By default, Encore automatically sets appropriate HTTP status codes for your API responses. We recommend using these default status codes, but there are situations where you might need to set a custom HTTP status code, such as when porting an existing API that clients depend on for specific status codes.
Encore.ts
To set a custom HTTP status code, include an HttpStatus
field in your response interface:
import { api, HttpStatus } from "encore.dev/api";
interface Response {
message: string;
status: HttpStatus;
}
export const createUser = api(
{ expose: true, method: "POST", path: "/users" },
async (): Promise<Response> => {
return {
message: "User created successfully",
status: HttpStatus.Created
};
}
);
The HttpStatus
enum includes all standard HTTP status codes like HttpStatus.OK
, HttpStatus.Created
, HttpStatus.BadRequest
, etc.
Learn more: Defining APIs with Encore.ts
Encore.go
To set a custom HTTP status code, use the encore:"httpstatus"
struct tag on a field in your response type:
type Response struct {
Message string `json:"message"`
Status int `encore:"httpstatus"`
}
//encore:api public method=POST path=/users
func CreateUser(ctx context.Context) (*Response, error) {
return &Response{
Message: "User created successfully",
Status: 201, // HTTP 201 Created
}, nil
}
The field with the encore:"httpstatus"
tag can be an integer type and should contain a valid HTTP status code value.
Learn more: Defining APIs with Encore.go
Don't forget to update: encore version update
What's Changed
- hide internal method in middleware docs by @fredr in #2044
- runtimes/go: add support for setting custom http status codes by @fredr in #2042
- runtimes/core+js: add support for setting custom http status codes by @fredr in #2045
- docs: add docs for custom http statuses by @fredr in #2048
Full Changelog: v1.48.13...v1.49.0
v1.48.13 — Improvements
What's Changed
- Support ENCORE_APP_META_PATH in test mode by @eandre in #2027
- Resolve new clippy warnings by @fredr in #2036
- Update faq.md by @marcuskohlberg in #2041
- use background context for cleaning up test databases by @fredr in #2034
- runtimes/go: add method to request by @fredr in #2039
- runtimes/go: make it possible to add respone headers from middleware by @fredr in #2040
- runtime check usage of et package instead of when parsing by @fredr in #2037
- Optimize DB setup by @wilianto in #2032
Thanks to our first time contributor ❤️
Full Changelog: v1.48.12...v1.48.13