-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from shiguredo/feature/remove-pnpm-workspace
pnpm workspace を examples のみにする
- Loading branch information
Showing
39 changed files
with
117 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# テストに利用する Sora の Signaling URL を指定してください | ||
# サンプルやテストに利用する Sora の Signaling URL を指定してください | ||
VITE_SORA_SIGNALING_URL=ws://127.0.0.1:5000/signaling | ||
# テストに利用する Sora の ChannelID のプレフィックスを指定してください | ||
VITE_SORA_CHANNEL_ID_PREFIX=sora-js-sdk-e2e-test_ | ||
# テストに利用する Sora の API URL を指定ください、不要であれば空欄で大丈夫です | ||
# サンプルやテストに利用する Sora の ChannelID のプレフィックスを指定してください | ||
VITE_SORA_CHANNEL_ID_PREFIX=sora-js-sdk_ | ||
# サンプルやテストに利用する Sora の API URL を指定ください、不要であれば空欄で大丈夫です | ||
VITE_SORA_API_URL=http://127.0.0.1:5000/ | ||
# テストに利用するアクセストークンを指定してください、不要であれば空欄で大丈夫です | ||
VITE_ACCESS_TOKEN=access_token | ||
# サンプルやテストに利用するアクセストークンを指定してください、不要であれば空欄で大丈夫です | ||
VITE_ACCESS_TOKEN=access_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { resolve } from 'node:path' | ||
import { defineConfig } from 'vite' | ||
|
||
// root が examples なので examples/dist にビルドされる | ||
|
||
export default defineConfig({ | ||
root: resolve(__dirname), | ||
resolve: { | ||
// NPM_PKG_E2E_TEST が true の時は alias を無効化する | ||
// これは .github/workflows/npm-pkg-e2e-test.yml で、 | ||
// E2E テストで複数のバージョンの npm の sora-js-sdk をインストールして利用するため | ||
alias: process.env.NPM_PKG_E2E_TEST | ||
? {} | ||
: { | ||
'sora-js-sdk': resolve(__dirname, '../dist/sora.mjs'), | ||
}, | ||
}, | ||
build: { | ||
rollupOptions: { | ||
input: { | ||
index: resolve(__dirname, 'index.html'), | ||
sendrecv: resolve(__dirname, 'sendrecv/index.html'), | ||
sendonly: resolve(__dirname, 'sendonly/index.html'), | ||
recvonly: resolve(__dirname, 'recvonly/index.html'), | ||
check_stereo: resolve(__dirname, 'check_stereo/index.html'), | ||
check_stereo_multi: resolve(__dirname, 'check_stereo_multi/index.html'), | ||
replace_track: resolve(__dirname, 'replace_track/index.html'), | ||
simulcast: resolve(__dirname, 'simulcast/index.html'), | ||
spotlight_sendrecv: resolve(__dirname, 'spotlight_sendrecv/index.html'), | ||
spotlight_sendonly: resolve(__dirname, 'spotlight_sendonly/index.html'), | ||
spotlight_recvonly: resolve(__dirname, 'spotlight_recvonly/index.html'), | ||
sendonly_audio: resolve(__dirname, 'sendonly_audio/index.html'), | ||
messaging: resolve(__dirname, 'messaging/index.html'), | ||
data_channel_signaling_only: resolve(__dirname, 'data_channel_signaling_only/index.html'), | ||
}, | ||
}, | ||
}, | ||
envDir: resolve(__dirname, '..'), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,14 @@ | |
} | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"examples": "vite build", | ||
"build": "vite build", | ||
"watch": "vite build --watch", | ||
"dev": "vite --config examples/vite.config.mjs", | ||
"e2e-test": "pnpm run build && playwright test --project=chromium", | ||
"build": "pnpm -r --filter=./packages/* build", | ||
"lint": "biome lint", | ||
"fmt": "biome format --write", | ||
"test": "pnpm -r --filter=./packages/* test", | ||
"check": "pnpm -r --filter=./packages/* --filter=./examples check", | ||
"check": "tsc --noEmit", | ||
"test": "vitest run", | ||
"doc": "typedoc" | ||
}, | ||
"repository": { | ||
|
@@ -40,11 +40,13 @@ | |
"@playwright/test": "1.49.1", | ||
"typedoc": "0.27.5", | ||
"typescript": "5.7.2", | ||
"jsdom": "25.0.1", | ||
"vite-plugin-dts": "4.3.0", | ||
"vite": "6.0.3", | ||
"vitest": "2.1.8" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
packages: | ||
- "packages/*" | ||
- "examples" | ||
- "examples" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
packages/sdk/tests/utils.test.ts → tests/vitest/utils.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
import { resolve } from 'node:path' | ||
import { defineConfig } from 'vite' | ||
import dts from 'vite-plugin-dts' | ||
import pkg from './package.json' | ||
|
||
// root が examples なので examples/dist にビルドされる | ||
|
||
const banner = `/** | ||
* ${pkg.name} | ||
* ${pkg.description} | ||
* @version: ${pkg.version} | ||
* @author: ${pkg.author} | ||
* @license: ${pkg.license} | ||
**/ | ||
` | ||
export default defineConfig({ | ||
root: resolve(__dirname, 'examples'), | ||
resolve: { | ||
// NPM_PKG_E2E_TEST が true の時は alias を無効化する | ||
// これは .github/workflows/npm-pkg-e2e-test.yml で、 | ||
// E2E テストで複数のバージョンの npm の sora-js-sdk をインストールして利用するため | ||
alias: process.env.NPM_PKG_E2E_TEST | ||
? {} | ||
: { | ||
'sora-js-sdk': resolve(__dirname, 'dist/sora.mjs'), | ||
}, | ||
define: { | ||
__SORA_JS_SDK_VERSION__: JSON.stringify(pkg.version), | ||
}, | ||
root: process.cwd(), | ||
build: { | ||
minify: 'esbuild', | ||
target: 'es2020', | ||
emptyOutDir: true, | ||
manifest: true, | ||
outDir: resolve(__dirname, './dist'), | ||
lib: { | ||
entry: resolve(__dirname, 'src/sora.ts'), | ||
name: 'WebRTC SFU Sora JavaScript SDK', | ||
formats: ['es'], | ||
fileName: 'sora', | ||
}, | ||
rollupOptions: { | ||
input: { | ||
index: resolve(__dirname, 'examples/index.html'), | ||
sendrecv: resolve(__dirname, 'examples/sendrecv/index.html'), | ||
sendonly: resolve(__dirname, 'examples/sendonly/index.html'), | ||
recvonly: resolve(__dirname, 'examples/recvonly/index.html'), | ||
check_stereo: resolve(__dirname, 'examples/check_stereo/index.html'), | ||
check_stereo_multi: resolve(__dirname, 'examples/check_stereo_multi/index.html'), | ||
replace_track: resolve(__dirname, 'examples/replace_track/index.html'), | ||
simulcast: resolve(__dirname, 'examples/simulcast/index.html'), | ||
spotlight_sendrecv: resolve(__dirname, 'examples/spotlight_sendrecv/index.html'), | ||
spotlight_sendonly: resolve(__dirname, 'examples/spotlight_sendonly/index.html'), | ||
spotlight_recvonly: resolve(__dirname, 'examples/spotlight_recvonly/index.html'), | ||
sendonly_audio: resolve(__dirname, 'examples/sendonly_audio/index.html'), | ||
messaging: resolve(__dirname, 'examples/messaging/index.html'), | ||
data_channel_signaling_only: resolve( | ||
__dirname, | ||
'examples/data_channel_signaling_only/index.html', | ||
), | ||
output: { | ||
banner: banner, | ||
}, | ||
}, | ||
}, | ||
envDir: resolve(__dirname, './'), | ||
plugins: [ | ||
dts({ | ||
include: ['src/**/*'], | ||
}), | ||
], | ||
}) |
Oops, something went wrong.