Skip to content

Commit

Permalink
Introduce /unstable entrypoint, move stuff around
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Oct 29, 2024
1 parent 7f2ec2c commit be028ef
Show file tree
Hide file tree
Showing 13 changed files with 410 additions and 364 deletions.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
},
"default": "./dist/plugins/encoders/mp3.js"
},
"./unstable": {
"types": "./dist/unstable/index.d.ts",
"node": {
"require": "./dist/unstable/index.node.cjs",
"import": "./dist/unstable/index.js"
},
"browser": {
"require": "./dist/unstable/index.browser.cjs",
"import": "./dist/unstable/index.js"
},
"default": "./dist/unstable/index.js"
},
"./dist/css/*": {
"default": "./dist/css/*"
},
Expand All @@ -70,6 +82,9 @@
],
"mp3-encoder": [
"./dist/plugins/encoders/mp3.d.ts"
],
"unstable": [
"./dist/unstable/index.d.ts"
]
}
},
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const sdkEntrypoint = resolve(__dirname, '../src/index.ts');
const emojiEntrypoint = resolve(__dirname, '../src/plugins/Emojis/index.ts');
const mp3EncoderEntrypoint = resolve(__dirname, '../src/plugins/encoders/mp3.ts');
const unstableEntrypoint = resolve(__dirname, '../src/unstable/index.ts');
const outDir = resolve(__dirname, '../dist');

// Those dependencies are distributed as ES modules, and cannot be externalized
Expand All @@ -33,7 +34,7 @@ const external = deps.filter((dep) => !bundledDeps.includes(dep));

/** @type esbuild.BuildOptions */
const cjsBundleConfig = {
entryPoints: [sdkEntrypoint, emojiEntrypoint, mp3EncoderEntrypoint],
entryPoints: [sdkEntrypoint, emojiEntrypoint, mp3EncoderEntrypoint, unstableEntrypoint],
bundle: true,
format: 'cjs',
target: 'es2020',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Message/MessageOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const UnMemoizedMessageOptions = <
};

/**
* @deprecated Use MessageActions_UNSTABLE (`MessageActions` component) instead.
* @deprecated Consider moving to `MessageActions` from `stream-chat-react/unstable` instead.
*/
export const MessageOptions = React.memo(
UnMemoizedMessageOptions,
Expand Down
Loading

0 comments on commit be028ef

Please sign in to comment.