-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: migrate monorepo #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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,16 +1,21 @@ | ||
| const path = require('node:path'); | ||
| const { getConfig } = require('react-native-builder-bob/babel-config'); | ||
| const pkg = require('../package.json'); | ||
|
|
||
| const root = path.resolve(__dirname, '..'); | ||
|
|
||
| module.exports = (api) => { | ||
| api.cache(true); | ||
|
|
||
| return getConfig( | ||
| { | ||
| presets: ['babel-preset-expo'], | ||
| }, | ||
| { root, pkg }, | ||
| ); | ||
| return { | ||
| presets: ['babel-preset-expo'], | ||
| plugins: [ | ||
| [ | ||
| 'module-resolver', | ||
| { | ||
| root: ['./'], | ||
| alias: { | ||
| 'react-native-youtube-bridge': '../packages/react-native-youtube-bridge/src/index', | ||
| '@react-native-youtube-bridge/core': '../packages/core/src/index', | ||
| '@react-native-youtube-bridge/react': '../packages/react/src/index', | ||
| }, | ||
| extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], | ||
| }, | ||
| ], | ||
| ], | ||
| }; | ||
| }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,9 @@ | ||
| import type { IframeApiType } from './src/types/iframe'; | ||
|
|
||
| declare global { | ||
| interface Window { | ||
| YT: IframeApiType; | ||
| onYouTubeIframeAPIReady: () => void; | ||
| _ytApiPromise: Promise<void>; | ||
| } | ||
| } |
This file contains hidden or 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,47 @@ | ||
| { | ||
| "name": "@react-native-youtube-bridge/core", | ||
| "version": "0.0.1", | ||
| "description": "Core package for react-native-youtube-bridge", | ||
| "private": true, | ||
| "main": "dist/index.js", | ||
| "module": "dist/index.mjs", | ||
| "types": "dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.mjs", | ||
| "require": "./dist/index.js" | ||
| } | ||
| }, | ||
| "files": ["dist", "package.json"], | ||
| "scripts": { | ||
| "build": "tsdown", | ||
| "typecheck": "tsc --noEmit" | ||
| }, | ||
| "keywords": [ | ||
| "react-native", | ||
| "ios", | ||
| "android", | ||
| "youtube", | ||
| "react-native-youtube", | ||
| "react-native-youtube-bridge", | ||
| "youtube-iframe-api", | ||
| "react-native-youtube-iframe" | ||
| ], | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/react-native-bridges/react-native-youtube-bridge.git" | ||
| }, | ||
| "author": "saseungmin <dbd02169@naver.com> (https://github.com/saseungmin)", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/react-native-bridges/react-native-youtube-bridge/issues" | ||
| }, | ||
| "homepage": "https://github.com/react-native-bridges/react-native-youtube-bridge#readme", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "devDependencies": { | ||
| "tsdown": "^0.12.8" | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,15 @@ | ||
| export const ERROR_CODES = { | ||
| 2: 'INVALID_PARAMETER_VALUE', | ||
| 5: 'HTML5_PLAYER_ERROR', | ||
| 100: 'VIDEO_NOT_FOUND_OR_PRIVATE', | ||
| 101: 'EMBEDDED_PLAYBACK_NOT_ALLOWED', | ||
| 150: 'EMBEDDED_RESTRICTED', | ||
| 1000: 'FAILED_TO_PARSE_WEBVIEW_MESSAGE', | ||
| 1001: 'WEBVIEW_LOADING_ERROR', | ||
| 1002: 'INVALID_YOUTUBE_VIDEO_ID', | ||
| 1003: 'FAILED_TO_LOAD_YOUTUBE_API', | ||
| 1004: 'UNKNOWN_ERROR', | ||
| } as const; | ||
|
|
||
| export const MATCH_URL_YOUTUBE = | ||
| /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/; |
This file contains hidden or 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,16 @@ | ||
| export { | ||
| type PlayerEvents, | ||
| type PlayerInfo, | ||
| PlayerState, | ||
| type YouTubeError, | ||
| type ProgressData, | ||
| type YoutubePlayerVars, | ||
| type PlaybackQuality, | ||
| type YoutubePlayerConfig, | ||
| type YouTubeSource, | ||
| type PlayerControls, | ||
| } from './types'; | ||
| export type { MessageData } from './types/webview'; | ||
| export { default as YoutubePlayerCore } from './YoutubePlayerCore'; | ||
| export { escapeHtml, extractVideoIdFromUrl, safeNumber, validateVideoId } from './utils'; | ||
| export { ERROR_CODES } from './constants'; |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix glob pattern spacing in
typeshookThe glob pattern
"*.{js,ts, jsx, tsx}"contains spaces that will prevent matching.jsxand.tsx. Align it with thelintglob:"*.{js,ts,jsx,tsx}".🤖 Prompt for AI Agents