Skip to content

release: 11.0.0 #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:

- name: Run tests
run: ./scripts/test

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "10.1.0"
".": "11.0.0"
}
4 changes: 3 additions & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
configured_endpoints: 88
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-5f3a1cefec239fb0daed651397851795841e0d4b17d242968b946002d8feaa19.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-2689f5dc4d269f2e3c35e7775b2f342d0a790d5c70f2baf4ddf779cf35a45473.yml
openapi_spec_hash: 538747fd9fd542128cba80f547dfa1a3
config_hash: 46f10626d043984a33d2324b9409c702
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 11.0.0 (2025-03-27)

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

### ⚠ BREAKING CHANGES

* Fix type of `new_asset_settings` in Direct Uploads, and inline `UpdateReferrerDomainRestrictionRequest` ([#331](https://github.com/muxinc/mux-node-sdk/issues/331)) (#563)
* Changes the type of `new_asset_settings` to be a `CreateAssetRequest`, which exposes the correct set of fields to control asset creation
* Replaces `input` on `CreateAssetRequest` with `inputs`, which accepts the same type, and added deprecation notices
* Replaces `playback_policy` on `CreateAssetRequest` with `playback_policies`, which accepts the same type, and added deprecation notices

### Features

* 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))
* 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))


### Bug Fixes

* 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))
* **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))
* **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))
* 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))
* **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))


### Chores

* **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))
* **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))
* **internal:** codegen related update ([#558](https://github.com/muxinc/mux-node-sdk/issues/558)) ([a1a797a](https://github.com/muxinc/mux-node-sdk/commit/a1a797a82b0183e087824fc9b05cecd82a8bec1e))
* **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))

## 10.1.0 (2025-03-06)

Full Changelog: [v10.0.0...v10.1.0](https://github.com/muxinc/mux-node-sdk/compare/v10.0.0...v10.1.0)
Expand Down
37 changes: 8 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mux/mux-node",
"version": "10.1.0",
"version": "11.0.0",
"description": "The official TypeScript library for the Mux API",
"author": "Mux <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -108,38 +108,17 @@
"default": "./dist/index.mjs"
},
"./*.mjs": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"default": [
"./dist/*.mjs",
"./dist/*/index.mjs"
]
"types": "./dist/*.d.ts",
"default": "./dist/*.mjs"
},
"./*.js": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"default": [
"./dist/*.js",
"./dist/*/index.js"
]
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
},
"./*": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"require": [
"./dist/*.js",
"./dist/*/index.js"
],
"default": [
"./dist/*.mjs",
"./dist/*/index.mjs"
]
"types": "./dist/*.d.ts",
"require": "./dist/*.js",
"default": "./dist/*.mjs"
}
}
}
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

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

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
Expand Down
2 changes: 2 additions & 0 deletions src/_shims/index-deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ export declare class FsReadStream extends Readable {
const _ReadableStream = ReadableStream;
type _ReadableStream = ReadableStream;
export { _ReadableStream as ReadableStream };

export const init = () => {};
2 changes: 2 additions & 0 deletions src/_shims/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi
export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>;

export function isFsReadStream(value: any): value is FsReadStream;

export const init: () => void;
6 changes: 5 additions & 1 deletion src/_shims/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
*/
const shims = require('./registry');
const auto = require('@mux/mux-node/_shims/auto/runtime');
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
exports.init = () => {
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
};
for (const property of Object.keys(shims)) {
Object.defineProperty(exports, property, {
get() {
return shims[property];
},
});
}

exports.init();
6 changes: 5 additions & 1 deletion src/_shims/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
*/
import * as shims from './registry.mjs';
import * as auto from '@mux/mux-node/_shims/auto/runtime';
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
export const init = () => {
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
};
export * from './registry.mjs';

init();
11 changes: 8 additions & 3 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ import {
type RequestInit,
type Response,
type HeadersInit,
init,
} from './_shims/index';

// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
init();

export { type Response };
import { isMultipartBody } from './uploads';
export {
Expand Down Expand Up @@ -48,8 +53,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
}

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

Expand Down Expand Up @@ -381,7 +386,7 @@ export abstract class APIClient {
!headers ? {}
: Symbol.iterator in headers ?
Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
: { ...headers }
: { ...(headers as any as Record<string, string>) }
);
}

Expand Down
1 change: 1 addition & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './resources/index';
3 changes: 3 additions & 0 deletions src/resources/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './data/index';
3 changes: 3 additions & 0 deletions src/resources/data/monitoring.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './monitoring/index';
3 changes: 3 additions & 0 deletions src/resources/system.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './system/index';
3 changes: 3 additions & 0 deletions src/resources/video.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './video/index';
Loading