-
Notifications
You must be signed in to change notification settings - Fork 64
fix: resolve TypeScript errors with moduleResolution nodenext and skipLibCheck false #1313
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
14 commits
Select commit
Hold shift + click to select a range
f33e91f
resolve TypeScript errors with moduleResolution nodenext and skipLibC…
R-Delfino95 eccd375
fix: vendor mux-embed types to resolve nodenext moduleResolution errors
R-Delfino95 08cec08
re-generated mux-embed
R-Delfino95 1f3ea1a
chore: sync vendored mux-embed types with npm-installed version
R-Delfino95 025399a
chore: align vendored mux-embed types with npm-pinned version
R-Delfino95 378b827
chore: ignore vendored mux-embed types in prettier
R-Delfino95 e486a08
chore: update package-lock.json dependencies
R-Delfino95 289670b
Merge branch 'main' into fix/typeScript-errors
R-Delfino95 2bd606d
chore: add src/vendor to .eslintignore in playback-core
R-Delfino95 98fe70d
refactor: update mux-embed package discovery logic to prevent infinit…
R-Delfino95 35b1952
Merge branch 'main' into fix/typeScript-errors
R-Delfino95 dcb11e8
chore: add vendor verification script and update CI workflow to inclu…
Jerricho93 0c8003c
chore: update mux-embed source reference to version 5.16.1
Jerricho93 20b3459
chore: untrack vendored mux-embed types and remove drift verification
R-Delfino95 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ examples | |
| *.sublime-* | ||
| *.vscode* | ||
| *.md | ||
| packages/playback-core/src/vendor | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| src/vendor |
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,38 @@ | ||
| import { createRequire } from 'node:module'; | ||
| import { existsSync } from 'node:fs'; | ||
| import { mkdir, readFile, writeFile } from 'node:fs/promises'; | ||
| import { dirname, join, resolve } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
|
|
||
| const require = createRequire(import.meta.url); | ||
| const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
|
|
||
| // Resolve the mux-embed package root by walking up from its main entry | ||
| // (require.resolve respects exports, so we can't use a subpath directly) | ||
| const muxEmbedMain = require.resolve('mux-embed'); | ||
| let pkgRoot = dirname(muxEmbedMain); | ||
| while (!existsSync(join(pkgRoot, 'package.json'))) { | ||
| const parent = dirname(pkgRoot); | ||
| if (parent === pkgRoot) { | ||
| throw new Error(`Could not find mux-embed package.json starting from ${muxEmbedMain}`); | ||
| } | ||
| pkgRoot = parent; | ||
| } | ||
|
|
||
| const pkg = JSON.parse(await readFile(join(pkgRoot, 'package.json'), 'utf8')); | ||
| if (pkg.name !== 'mux-embed') { | ||
| throw new Error(`Found package.json at ${pkgRoot}, but it is "${pkg.name}", not mux-embed`); | ||
| } | ||
|
|
||
| const SOURCE = join(pkgRoot, 'dist/types/mux-embed.d.ts'); | ||
| const DEST = resolve(__dirname, '../src/vendor/mux-embed.ts'); | ||
| const HEADER = `// AUTO-GENERATED — do not edit. | ||
| // Source: mux-embed@${pkg.version} / dist/types/mux-embed.d.ts | ||
| // Run \`npm run vendor:types\` to refresh. | ||
|
|
||
| `; | ||
|
|
||
| const content = await readFile(SOURCE, 'utf8'); | ||
| await mkdir(dirname(DEST), { recursive: true }); | ||
| await writeFile(DEST, HEADER + content); | ||
| console.log(`Vendored mux-embed@${pkg.version} types -> ${DEST}`); | ||
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.
Uh oh!
There was an error while loading. Please reload this page.