From 02878a6df95f3e48f6cebcbe5214fedb8d467788 Mon Sep 17 00:00:00 2001 From: AssemblyAI Date: Mon, 10 Jun 2024 11:53:44 +0200 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: dd7d6fdf8ec1514adb32db1902039cc65aabde39 --- CHANGELOG.md | 4 ++++ package.json | 2 +- rollup.config.js | 25 ++++++++++++++++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b8557..02055dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [4.4.6] + +- Fix Rollup exports so \_\_SDK_VERSION\_\_ is properly replaced with the version of the SDK. + ## [4.4.5] - Add new `PiiPolicy` enum values diff --git a/package.json b/package.json index 436087c..5494e40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assemblyai", - "version": "4.4.5", + "version": "4.4.6", "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.", "engines": { "node": ">=18" diff --git a/rollup.config.js b/rollup.config.js index b64476e..7346530 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -69,7 +69,10 @@ module.exports = [ }, { input: "src/exports/index.ts", - plugins: [ts({ compilerOptions: { customConditions: ["node"] } })], + plugins: [ + replacePlugin, + ts({ compilerOptions: { customConditions: ["node"] } }), + ], external: ["fs", "stream", "stream/web", "ws"], output: [ { @@ -86,7 +89,10 @@ module.exports = [ }, { input: "src/exports/index.ts", - plugins: [ts({ compilerOptions: { customConditions: ["deno"] } })], + plugins: [ + replacePlugin, + ts({ compilerOptions: { customConditions: ["deno"] } }), + ], external: ["ws"], output: [ { @@ -98,7 +104,10 @@ module.exports = [ }, { input: "src/exports/index.ts", - plugins: [ts({ compilerOptions: { customConditions: ["bun"] } })], + plugins: [ + replacePlugin, + ts({ compilerOptions: { customConditions: ["bun"] } }), + ], external: ["ws"], output: [ { @@ -111,7 +120,10 @@ module.exports = [ // Browser ESM build { input: "src/exports/index.ts", - plugins: [ts({ compilerOptions: { customConditions: ["browser"] } })], + plugins: [ + replacePlugin, + ts({ compilerOptions: { customConditions: ["browser"] } }), + ], output: [ { file: `./dist/browser.mjs`, @@ -122,7 +134,10 @@ module.exports = [ }, { input: "src/exports/streaming.ts", - plugins: [ts({ compilerOptions: { customConditions: ["browser"] } })], + plugins: [ + replacePlugin, + ts({ compilerOptions: { customConditions: ["browser"] } }), + ], output: [ { file: `./dist/streaming.browser.mjs`,