Skip to content

Commit

Permalink
Merge pull request #80 from whereby/revert-79-kevinhanna/pan-329-fix-…
Browse files Browse the repository at this point in the history
…assert-issue

Revert "Move to esbuild"
  • Loading branch information
kevinwhereby authored Oct 12, 2023
2 parents 586c7d5 + ac4a684 commit 7dffe34
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 232 deletions.
41 changes: 0 additions & 41 deletions build.js

This file was deleted.

33 changes: 13 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,17 @@
},
"browserslist": "> 0.5%, last 2 versions, not dead",
"source": "src/index.js",
"module": "dist/index.esm.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import":"./dist/index.esm.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import":"./dist/react/index.esm.js"
},
"./embed": {
"types": "./dist/embed/index.d.ts",
"import":"./dist/embed/index.esm.js"
}
},
"main": "dist/lib.cjs",
"module": "dist/lib.esm.js",
"type": "module",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/*.d.ts"
],
"types": "dist/index.d.ts",
"types": "dist/types.d.ts",
"scripts": {
"prebuild": "rimraf dist",
"build": "node build.js",
"postbuild": "tsc --emitDeclarationOnly --declaration --project tsconfig.build.json",
"build": "rollup -c",
"build:storybook": "build-storybook",
"dev": "start-storybook -p 6006",
"test": "yarn test:lint && yarn test:unit",
Expand All @@ -47,6 +33,10 @@
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@storybook/addon-actions": "^6.5.14",
"@storybook/addon-essentials": "^6.5.14",
"@storybook/addon-links": "^6.5.14",
Expand All @@ -61,7 +51,6 @@
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"babel-loader": "^8.2.5",
"esbuild": "^0.19.4",
"eslint": "^8.29.0",
"eslint-plugin-jest": "^26.5.3",
"jest": "29.4.3",
Expand All @@ -71,6 +60,10 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^3.0.2",
"rollup": "^2.75.6",
"rollup-plugin-dts": "^5.1.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "29.0.5",
"tslib": "^2.4.1",
"typescript": "^4.9.4"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/react/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { default as VideoView } from "./VideoView";
export { default as useLocalMedia } from "./useLocalMedia";
export { useRoomConnection } from "./useRoomConnection";
export { default as useRoomConnection } from "./useRoomConnection";
5 changes: 4 additions & 1 deletion src/lib/react/useRoomConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@ export type RoomConnectionRef = {
_ref: RoomConnection;
};

export function useRoomConnection(roomUrl: string, roomConnectionOptions: UseRoomConnectionOptions): RoomConnectionRef {
export default function useRoomConnection(
roomUrl: string,
roomConnectionOptions: UseRoomConnectionOptions
): RoomConnectionRef {
const [roomConnection] = useState<RoomConnection>(
() =>
new RoomConnection(roomUrl, {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/components/VideoExperience.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import DisplayNameForm from "./DisplayNameForm";
import { LocalMediaRef } from "../../lib/react/useLocalMedia";
import { useRoomConnection } from "../../lib/react/useRoomConnection";
import useRoomConnection from "../../lib/react/useRoomConnection";

export default function VideoExperience({
displayName,
Expand Down
10 changes: 0 additions & 10 deletions tsconfig.build.json

This file was deleted.

28 changes: 14 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"compilerOptions": {
"target": "es6",
"downlevelIteration": true,
"importHelpers": true,
"lib": ["dom", "dom.iterable", "esnext", "es2015.collection", "es2015.iterable"],
"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"checkJs": false,
"declaration": true,
"downlevelIteration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"isolatedModules": true,
"jsx": "react",
"lib": ["dom", "dom.iterable", "esnext", "es2015.collection", "es2015.iterable"],
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"declaration": true,
"jsx": "react",
"baseUrl": "./",
"paths": {
"~/*": ["src/*"],
"@tests/*": ["tests/*"],
"@types": ["src/__types__/index.ts"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es6"
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "tests/**/*.tsx"]
}
Loading

0 comments on commit 7dffe34

Please sign in to comment.