Skip to content

Commit f304429

Browse files
release: 11.0.0 (#557)
* feat: add SKIP_BREW env var to ./scripts/bootstrap (#556) * chore(internal): codegen related update (#558) * chore(internal): remove extra empty newlines (#559) * fix(exports): ensure resource imports don't require /index (#560) * chore(exports): cleaner resource index imports (#561) * chore(exports): stop using path fallbacks (#562) * fix!: Fix type of new_asset_settings in Direct Uploads, and inline UpdateReferrerDomainRestrictionRequest (#331) (#563) * fix: avoid type error in certain environments (#564) * feat: Replace input with inputs and playback_policy with playback_policies (#335) (#565) * fix(exports): add missing type exports (#566) * codegen metadata * fix(internal): work around vercel/next.js#76881 (#567) * release: 11.0.0 * update changelog --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Justin Sanford <[email protected]>
1 parent 83e7fff commit f304429

23 files changed

+721
-52
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ jobs:
6363

6464
- name: Run tests
6565
run: ./scripts/test
66-

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "10.1.0"
2+
".": "11.0.0"
33
}

.stats.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
configured_endpoints: 88
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-5f3a1cefec239fb0daed651397851795841e0d4b17d242968b946002d8feaa19.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-2689f5dc4d269f2e3c35e7775b2f342d0a790d5c70f2baf4ddf779cf35a45473.yml
3+
openapi_spec_hash: 538747fd9fd542128cba80f547dfa1a3
4+
config_hash: 46f10626d043984a33d2324b9409c702

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## 11.0.0 (2025-03-27)
4+
5+
Full Changelog: [v10.1.0...v11.0.0](https://github.com/muxinc/mux-node-sdk/compare/v10.1.0...v11.0.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* Fix type of `new_asset_settings` in Direct Uploads, and inline `UpdateReferrerDomainRestrictionRequest` ([#331](https://github.com/muxinc/mux-node-sdk/issues/331)) (#563)
10+
* Changes the type of `new_asset_settings` to be a `CreateAssetRequest`, which exposes the correct set of fields to control asset creation
11+
* Replaces `input` on `CreateAssetRequest` with `inputs`, which accepts the same type, and added deprecation notices
12+
* Replaces `playback_policy` on `CreateAssetRequest` with `playback_policies`, which accepts the same type, and added deprecation notices
13+
14+
### Features
15+
16+
* add SKIP_BREW env var to ./scripts/bootstrap ([#556](https://github.com/muxinc/mux-node-sdk/issues/556)) ([d7b9122](https://github.com/muxinc/mux-node-sdk/commit/d7b91226ab8174fbdc836f7f2348a6915f3e15f9))
17+
* Replace input with inputs and playback_policy with playback_policies ([#335](https://github.com/muxinc/mux-node-sdk/issues/335)) ([#565](https://github.com/muxinc/mux-node-sdk/issues/565)) ([f477926](https://github.com/muxinc/mux-node-sdk/commit/f4779269b5b0939ac22d917bfccfdcaf56a73347))
18+
19+
20+
### Bug Fixes
21+
22+
* avoid type error in certain environments ([#564](https://github.com/muxinc/mux-node-sdk/issues/564)) ([d57d25d](https://github.com/muxinc/mux-node-sdk/commit/d57d25d7e6693978e9fb06e0517aa1f9c9d57f54))
23+
* **exports:** add missing type exports ([#566](https://github.com/muxinc/mux-node-sdk/issues/566)) ([94654c9](https://github.com/muxinc/mux-node-sdk/commit/94654c940956c4f7744441612b1ef45567ff6802))
24+
* **exports:** ensure resource imports don't require /index ([#560](https://github.com/muxinc/mux-node-sdk/issues/560)) ([31a9554](https://github.com/muxinc/mux-node-sdk/commit/31a95542229094432ec901f763ee566f684bfda7))
25+
* Fix type of new_asset_settings in Direct Uploads, and inline UpdateReferrerDomainRestrictionRequest ([#331](https://github.com/muxinc/mux-node-sdk/issues/331)) ([#563](https://github.com/muxinc/mux-node-sdk/issues/563)) ([f8342e9](https://github.com/muxinc/mux-node-sdk/commit/f8342e9cfd33ac1d720f0649cc9043ad3920e44f))
26+
* **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#567](https://github.com/muxinc/mux-node-sdk/issues/567)) ([6305af8](https://github.com/muxinc/mux-node-sdk/commit/6305af861e3a79eb6b74fc7958d1346fecf4e54c))
27+
28+
29+
### Chores
30+
31+
* **exports:** cleaner resource index imports ([#561](https://github.com/muxinc/mux-node-sdk/issues/561)) ([7a71c93](https://github.com/muxinc/mux-node-sdk/commit/7a71c9309c6bcc22841ae404c068b84bbb0ef226))
32+
* **exports:** stop using path fallbacks ([#562](https://github.com/muxinc/mux-node-sdk/issues/562)) ([ab7f871](https://github.com/muxinc/mux-node-sdk/commit/ab7f8717b6e3b521eeefef13ab69918cab8bd3a7))
33+
* **internal:** codegen related update ([#558](https://github.com/muxinc/mux-node-sdk/issues/558)) ([a1a797a](https://github.com/muxinc/mux-node-sdk/commit/a1a797a82b0183e087824fc9b05cecd82a8bec1e))
34+
* **internal:** remove extra empty newlines ([#559](https://github.com/muxinc/mux-node-sdk/issues/559)) ([407398f](https://github.com/muxinc/mux-node-sdk/commit/407398fd5eb873af96860ebd267de81a5f9b91c7))
35+
336
## 10.1.0 (2025-03-06)
437

538
Full Changelog: [v10.0.0...v10.1.0](https://github.com/muxinc/mux-node-sdk/compare/v10.0.0...v10.1.0)

package.json

+8-29
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mux/mux-node",
3-
"version": "10.1.0",
3+
"version": "11.0.0",
44
"description": "The official TypeScript library for the Mux API",
55
"author": "Mux <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -108,38 +108,17 @@
108108
"default": "./dist/index.mjs"
109109
},
110110
"./*.mjs": {
111-
"types": [
112-
"./dist/*.d.ts",
113-
"./dist/*/index.d.ts"
114-
],
115-
"default": [
116-
"./dist/*.mjs",
117-
"./dist/*/index.mjs"
118-
]
111+
"types": "./dist/*.d.ts",
112+
"default": "./dist/*.mjs"
119113
},
120114
"./*.js": {
121-
"types": [
122-
"./dist/*.d.ts",
123-
"./dist/*/index.d.ts"
124-
],
125-
"default": [
126-
"./dist/*.js",
127-
"./dist/*/index.js"
128-
]
115+
"types": "./dist/*.d.ts",
116+
"default": "./dist/*.js"
129117
},
130118
"./*": {
131-
"types": [
132-
"./dist/*.d.ts",
133-
"./dist/*/index.d.ts"
134-
],
135-
"require": [
136-
"./dist/*.js",
137-
"./dist/*/index.js"
138-
],
139-
"default": [
140-
"./dist/*.mjs",
141-
"./dist/*/index.mjs"
142-
]
119+
"types": "./dist/*.d.ts",
120+
"require": "./dist/*.js",
121+
"default": "./dist/*.mjs"
143122
}
144123
}
145124
}

scripts/bootstrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
88
brew bundle check >/dev/null 2>&1 || {
99
echo "==> Installing Homebrew dependencies…"
1010
brew bundle

src/_shims/index-deno.ts

+2
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,5 @@ export declare class FsReadStream extends Readable {
108108
const _ReadableStream = ReadableStream;
109109
type _ReadableStream = ReadableStream;
110110
export { _ReadableStream as ReadableStream };
111+
112+
export const init = () => {};

src/_shims/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi
7979
export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>;
8080

8181
export function isFsReadStream(value: any): value is FsReadStream;
82+
83+
export const init: () => void;

src/_shims/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
*/
44
const shims = require('./registry');
55
const auto = require('@mux/mux-node/_shims/auto/runtime');
6-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6+
exports.init = () => {
7+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8+
};
79
for (const property of Object.keys(shims)) {
810
Object.defineProperty(exports, property, {
911
get() {
1012
return shims[property];
1113
},
1214
});
1315
}
16+
17+
exports.init();

src/_shims/index.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
*/
44
import * as shims from './registry.mjs';
55
import * as auto from '@mux/mux-node/_shims/auto/runtime';
6-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6+
export const init = () => {
7+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8+
};
79
export * from './registry.mjs';
10+
11+
init();

src/core.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ import {
1616
type RequestInit,
1717
type Response,
1818
type HeadersInit,
19+
init,
1920
} from './_shims/index';
21+
22+
// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
23+
init();
24+
2025
export { type Response };
2126
import { isMultipartBody } from './uploads';
2227
export {
@@ -48,8 +53,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
4853
}
4954

5055
const contentType = response.headers.get('content-type');
51-
const isJSON =
52-
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
56+
const mediaType = contentType?.split(';')[0]?.trim();
57+
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
5358
if (isJSON) {
5459
const json = await response.json();
5560

@@ -381,7 +386,7 @@ export abstract class APIClient {
381386
!headers ? {}
382387
: Symbol.iterator in headers ?
383388
Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
384-
: { ...headers }
389+
: { ...(headers as any as Record<string, string>) }
385390
);
386391
}
387392

src/resources.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './resources/index';

src/resources/data.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './data/index';

src/resources/data/monitoring.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './monitoring/index';

src/resources/system.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './system/index';

src/resources/video.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './video/index';

0 commit comments

Comments
 (0)