Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Submit a pull request
<!-- Submit a pull request -->

### 🎯 Goal

Expand Down
83 changes: 31 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,43 @@
"name": "stream-chat-react",
"version": "0.0.0-development",
"description": "React components to create chat conversations or livestream style chat",
"author": "GetStream",
"homepage": "https://getstream.io/chat/",
"license": "SEE LICENSE IN LICENSE",
"repository": {
"type": "git",
"url": "https://github.com/GetStream/stream-chat-react.git"
},
"types": "dist/index.d.ts",
"main": "dist/index.node.cjs",
"module": "dist/index.js",
"homepage": "https://getstream.io/chat/",
"author": {
"name": "GetStream.io, Inc.",
"url": "https://getstream.io/team/"
},
"types": "./dist/types/index.d.ts",
"main": "./dist/cjs/index.js",
"module": "./dist/es/index.mjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"node": {
"require": "./dist/index.node.cjs",
"import": "./dist/index.js"
},
"browser": {
"require": "./dist/index.browser.cjs",
"import": "./dist/index.js"
},
"default": "./dist/index.js"
"types": "./dist/types/index.d.ts",
"import": "./dist/es/index.mjs",
"require": "./dist/cjs/index.js",
"default": "./dist/cjs/index.js"
},
"./emojis": {
"types": "./dist/plugins/Emojis/index.d.ts",
"node": {
"require": "./dist/plugins/Emojis/index.node.cjs",
"import": "./dist/plugins/Emojis/index.js"
},
"browser": {
"require": "./dist/plugins/Emojis/index.browser.cjs",
"import": "./dist/plugins/Emojis/index.js"
},
"default": "./dist/plugins/Emojis/index.js"
"types": "./dist/types/plugins/Emojis/index.d.ts",
"import": "./dist/es/emojis.mjs",
"require": "./dist/cjs/emojis.js",
"default": "./dist/cjs/emojis.js"
},
"./mp3-encoder": {
"types": "./dist/plugins/encoders/mp3.d.ts",
"node": {
"require": "./dist/plugins/encoders/mp3.node.cjs",
"import": "./dist/plugins/encoders/mp3.js"
},
"browser": {
"require": "./dist/plugins/encoders/mp3.browser.cjs",
"import": "./dist/plugins/encoders/mp3.js"
},
"default": "./dist/plugins/encoders/mp3.js"
"types": "./dist/types/plugins/encoders/mp3.d.ts",
"import": "./dist/es/mp3-encoder.mjs",
"require": "./dist/cjs/mp3-encoder.js",
"default": "./dist/cjs/mp3-encoder.js"
},
"./experimental": {
"types": "./dist/experimental/index.d.ts",
"node": {
"require": "./dist/experimental/index.node.cjs",
"import": "./dist/experimental/index.js"
},
"browser": {
"require": "./dist/experimental/index.browser.cjs",
"import": "./dist/experimental/index.js"
},
"default": "./dist/experimental/index.js"
"types": "./dist/types/experimental/index.d.ts",
"import": "./dist/es/experimental.mjs",
"require": "./dist/cjs/experimental.js",
"default": "./dist/cjs/experimental.js"
},
"./dist/css/*": {
"default": "./dist/css/*"
Expand All @@ -77,13 +56,13 @@
"typesVersions": {
"*": {
"emojis": [
"./dist/plugins/Emojis/index.d.ts"
"./dist/types/plugins/Emojis/index.d.ts"
],
"mp3-encoder": [
"./dist/plugins/encoders/mp3.d.ts"
"./dist/types/plugins/encoders/mp3.d.ts"
],
"experimental": [
"./dist/experimental/index.d.ts"
"./dist/types/experimental/index.d.ts"
]
}
},
Expand Down Expand Up @@ -162,6 +141,7 @@
"README.md"
],
"devDependencies": {
"vite": "^7.3.0",
"@axe-core/react": "^4.3.2",
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
Expand Down Expand Up @@ -213,7 +193,6 @@
"core-js": "^3.6.5",
"dotenv": "^8.6.0",
"emoji-mart": "^5.5.2",
"esbuild": "^0.23.1",
"eslint": "^9.16.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.11.0",
Expand All @@ -240,8 +219,8 @@
"typescript-eslint": "^8.17.0"
},
"scripts": {
"build": "rm -rf dist && yarn build-translations && yarn bundle",
"bundle": "concurrently ./scripts/bundle-esm.mjs ./scripts/copy-css.sh scripts/bundle-cjs.mjs",
"clean": "rm -rf dist",
"build": "yarn clean && concurrently './scripts/copy-css.sh' 'yarn build-translations' 'vite build' 'tsc'",
"build-translations": "i18next-cli extract",
"coverage": "jest --collectCoverage && codecov",
"lint": "yarn prettier --list-different && yarn eslint && yarn validate-translations",
Expand All @@ -255,7 +234,7 @@
"prepare": "husky install",
"preversion": "yarn install",
"test": "jest",
"types": "tsc --noEmit",
"types": "tsc --emitDeclarationOnly false --noEmit",
"validate-translations": "node scripts/validate-translations.js",
"validate-cjs": "concurrently 'node scripts/validate-cjs-node-bundle.cjs' 'node scripts/validate-cjs-browser-bundle.cjs'",
"semantic-release": "semantic-release",
Expand Down
64 changes: 0 additions & 64 deletions scripts/bundle-cjs.mjs

This file was deleted.

35 changes: 0 additions & 35 deletions scripts/bundle-esm.mjs

This file was deleted.

125 changes: 0 additions & 125 deletions scripts/check-sidebar.mjs

This file was deleted.

6 changes: 2 additions & 4 deletions scripts/get-package-version.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { execSync } from 'node:child_process';
import packageJson from '../package.json' with { type: 'json' };

// get the latest version so that "process.env.STREAM_CHAT_REACT_VERSION" can be replaced with it in the source code (used for reporting purposes), see bundle-cjs.mjs/bundle-esm.mjs for source
// get the latest version so that "process.env.STREAM_CHAT_REACT_VERSION" can be replaced with it in the source code (used for reporting purposes), see vite.config.ts
export default function getPackageVersion() {
// "build" script ("prepack" hook) gets invoked when semantic-release runs "npm publish", at that point package.json#version already contains updated next version which we can use
let version = packageJson.version;
let version = process.env.npm_package_version;

// if it fails (loads a default), try pulling version from git
if (version === '0.0.0-development') {
Expand All @@ -15,7 +14,6 @@ export default function getPackageVersion() {
console.warn(
'Could not get latest version from git tags, falling back to package.json',
);
version = packageJson.version;
}
}

Expand Down
Loading
Loading